/* ============================================
   CANDYCODE ADMIN - Dark Sidebar Theme
   ============================================ */

:root {
    --cc-purple: #7c3aed;
    --cc-purple-dark: #6d28d9;
    --cc-purple-light: #8b5cf6;
    --cc-sidebar-bg: #0f0f1a;
    --cc-sidebar-width: 240px;
    --cc-topbar-height: 56px;
    --cc-content-bg: #13131f;
    --cc-card-bg: #1a1a2e;
    --cc-border: rgba(255,255,255,0.07);
    --cc-text: #e2e8f0;
    --cc-text-muted: #94a3b8;
    --cc-hover: rgba(124, 58, 237, 0.15);
    --cc-active: rgba(124, 58, 237, 0.25);
    /* Populated for Android (WebViewGold wrapper doesn't support env(safe-area-inset-top)) by an inline script in master.blade.php; falls back to the real CSS env() for iOS/browsers. */
    --cc-safe-top: env(safe-area-inset-top, 0px);
}

/* ---- Reset top navbars ---- */
.navbar.navbar-dark,
.navbar.navbar-light.navbar-sticky {
    display: none !important;
}

/* ---- Body ---- */
html {
    overflow-x: hidden !important;
}
body {
    display: block !important;
    background: var(--cc-content-bg) !important;
    color: var(--cc-text) !important;
    font-family: 'Inter', 'Roboto', sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ---- Layout wrapper ---- */
.cc-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.cc-sidebar {
    width: var(--cc-sidebar-width);
    background: var(--cc-sidebar-bg);
    border-right: 1px solid var(--cc-border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
}
.cc-sidebar::-webkit-scrollbar { display: none; }

/* Brand */
.cc-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--cc-border);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.cc-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--cc-purple);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}
.cc-brand-name {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}
.cc-brand-sub {
    font-size: 10px;
    color: var(--cc-text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Nav section label */
.cc-nav-label {
    padding: 16px 16px 6px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--cc-text-muted);
}

/* Nav item */
.cc-nav-item {
    margin: 1px 8px;
}
.cc-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--cc-text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
}
.cc-nav-link:hover {
    background: var(--cc-hover);
    color: #fff;
    text-decoration: none;
}
.cc-nav-link.active {
    background: var(--cc-active);
    color: #fff;
    border-left: 3px solid var(--cc-purple);
}
.cc-nav-link i {
    font-size: 15px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.cc-nav-link .cc-arrow {
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.2s;
}
.cc-nav-item.open > .cc-nav-link .cc-arrow {
    transform: rotate(90deg);
}

/* Sub menu */
.cc-submenu {
    display: none;
    margin: 2px 0 4px 30px;
}
.cc-nav-item.open > .cc-submenu {
    display: block;
}
.cc-submenu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 6px;
    color: var(--cc-text-muted);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 400;
    transition: all 0.15s;
}
.cc-submenu-link:hover { color: #fff; background: var(--cc-hover); text-decoration: none; }
.cc-submenu-link.active { color: var(--cc-purple-light); font-weight: 600; }
.cc-submenu-link i { font-size: 13px; width: 16px; }

/* Sidebar bottom */
.cc-sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--cc-border);
    padding: 12px 8px;
}

/* ---- TOPBAR ---- */
.cc-topbar {
    position: fixed;
    top: 0;
    left: var(--cc-sidebar-width);
    right: 0;
    height: calc(var(--cc-topbar-height) + var(--cc-safe-top));
    background: var(--cc-sidebar-bg);
    border-bottom: 1px solid var(--cc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--cc-safe-top) 24px 0;
    z-index: 999;
}
.cc-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cc-topbar-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}
.cc-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cc-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--cc-hover);
    border: 1px solid var(--cc-border);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--cc-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    position: relative;
}
.cc-user-btn:hover { background: var(--cc-active); color: #fff; text-decoration: none; }
.cc-avatar {
    width: 28px;
    height: 28px;
    background: var(--cc-purple);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.cc-user-dropdown {
    display: none;
    position: absolute;
    top: 42px;
    right: 0;
    background: var(--cc-card-bg);
    border: 1px solid var(--cc-border);
    border-radius: 10px;
    min-width: 160px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.cc-user-btn:hover .cc-user-dropdown { display: block; }
.cc-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--cc-text-muted);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.15s;
}
.cc-user-dropdown a:hover { background: var(--cc-hover); color: #fff; }

/* ---- MAIN CONTENT ---- */
.cc-main {
    margin-left: var(--cc-sidebar-width);
    margin-top: calc(var(--cc-topbar-height) + var(--cc-safe-top));
    min-height: calc(100vh - var(--cc-topbar-height) - var(--cc-safe-top));
    padding: 24px;
    flex: 1;
}

/* ---- Override page-content ---- */
.page-content {
    display: block !important;
    margin-left: var(--cc-sidebar-width) !important;
    margin-top: calc(var(--cc-topbar-height) + var(--cc-safe-top)) !important;
    padding: 20px 14px !important;
    background: var(--cc-content-bg) !important;
    width: calc(100vw - var(--cc-sidebar-width)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - var(--cc-sidebar-width)) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}
.content-wrapper {
    background: transparent !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* Remove Limitless .content class extra horizontal margin — all pages get same margin as dashboard */
.content {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* No outer border on cards — clean flat look */
.card {
    border: none !important;
}
.panel {
    border: none !important;
}
/* Fix Bootstrap containers */
.page-content .container,
.page-content .container-fluid,
.page-content > .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* Fix rows */
.page-content .row {
    margin-left: -15px !important;
    margin-right: -15px !important;
}
/* Tables scroll inside, not page */
.dataTables_wrapper {
    width: 100% !important;
    overflow-x: auto !important;
}
.table-responsive {
    overflow-x: auto !important;
}
/* Kill any fixed min-widths */
.page-content table {
    min-width: unset !important;
}

/* ---- Cards dark ---- */
.card, .panel, .panel-body,
[class*="bg-white"], [class*="bg-light"],
.card.bg-white, .card.bg-light,
.widget-user, .widget-numeric,
.card-body, .panel-body {
    background: var(--cc-card-bg) !important;
    border: 1px solid var(--cc-border) !important;
    color: var(--cc-text) !important;
}
.card-header, .panel-heading {
    background: rgba(255,255,255,0.04) !important;
    border-bottom: 1px solid var(--cc-border) !important;
    color: #fff !important;
}
.card-footer {
    background: rgba(255,255,255,0.03) !important;
    border-top: 1px solid var(--cc-border) !important;
}
/* Force all white/light backgrounds dark */
[style*="background: #fff"],
[style*="background:#fff"],
[style*="background: white"],
[style*="background-color: #fff"],
[style*="background-color:#fff"],
[style*="background-color: white"] {
    background: var(--cc-card-bg) !important;
    background-color: var(--cc-card-bg) !important;
}

/* ---- Buttons dark ---- */
.btn-action-secondary,
.btn-default,
.btn-light,
.btn-white,
.btn-outline-light,
.btn-secondary {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid var(--cc-border) !important;
    color: var(--cc-text) !important;
}
.btn-action-secondary:hover,
.btn-default:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
}

/* ---- Badges dark ---- */
.badge-flat {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: var(--cc-text) !important;
}
.badge.text-default {
    color: var(--cc-text) !important;
}

/* ---- Recent order inner cards ---- */
.recent-order-card {
    border-bottom: 1px solid var(--cc-border) !important;
    background: transparent !important;
}
.recent-order-card:last-child { border-bottom: none !important; }

/* ---- New signups inner items ---- */
.new-users > div {
    border-bottom: 1px solid var(--cc-border) !important;
}

/* ---- Store/Restaurant images (white bg logos) ---- */
.recent-order-card img {
    border-radius: 6px;
    border: 1px solid var(--cc-border);
}

/* ---- Tables dark ---- */
.table {
    color: var(--cc-text) !important;
    border-color: var(--cc-border) !important;
}
.table thead th {
    background: rgba(255,255,255,0.05) !important;
    border-color: var(--cc-border) !important;
    color: var(--cc-text-muted) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.table tbody tr { border-color: var(--cc-border) !important; }
.table tbody tr:hover { background: rgba(255,255,255,0.03) !important; }
.table td { border-color: var(--cc-border) !important; color: var(--cc-text) !important; }
.table-striped tbody tr:nth-of-type(odd) { background: rgba(255,255,255,0.02) !important; }

/* ---- Inputs dark ---- */
.form-control, .select2-selection {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--cc-border) !important;
    color: var(--cc-text) !important;
    border-radius: 8px !important;
}
.form-control:focus {
    background: rgba(255,255,255,0.08) !important;
    border-color: var(--cc-purple) !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.2) !important;
    color: #fff !important;
}
label { color: var(--cc-text-muted) !important; font-size: 12px; font-weight: 600; }

/* ---- Buttons ---- */
.btn-primary, .btn-success {
    background: var(--cc-purple) !important;
    border-color: var(--cc-purple) !important;
}
.btn-primary:hover, .btn-success:hover {
    background: var(--cc-purple-dark) !important;
    border-color: var(--cc-purple-dark) !important;
}

/* ---- Dashboard specific ---- */
.dashboard-display,
.dashboard-recent-orders-block,
.dashboard-new-users-block,
.recent-order-card,
.new-users {
    background: var(--cc-card-bg) !important;
    border: 1px solid var(--cc-border) !important;
    border-radius: 8px !important;
    color: var(--cc-text) !important;
}
.dashboard-display h4,
.dashboard-recent-orders-block h4,
.dashboard-new-users-block h4 {
    color: var(--cc-text) !important;
}
.dashboard-display-number {
    color: #fff !important;
}
.text-muted, .font-size-sm.text-muted {
    color: var(--cc-text-muted) !important;
}
.text-default {
    color: var(--cc-text) !important;
}

/* ---- Stat cards (dashboard) ---- */
.cc-stat-card {
    background: var(--cc-card-bg);
    border: 1px solid var(--cc-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cc-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
}
.cc-stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--cc-text-muted);
    margin-top: 4px;
}
.cc-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* ---- Page header ---- */
.page-header-content, .page-header {
    background: transparent !important;
    border-bottom: none !important;
    padding: 0 0 20px !important;
}
h1.page-title, .page-title {
    color: #fff !important;
    font-size: 20px !important;
    font-weight: 700 !important;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    background: transparent !important;
}
.breadcrumb-item, .breadcrumb-item a, .breadcrumb-item.active {
    color: var(--cc-text-muted) !important;
    font-size: 12px;
}

/* ---- Badges ---- */
.badge-success { background: #065f46 !important; color: #10b981 !important; }
.badge-danger { background: #7f1d1d !important; color: #ef4444 !important; }
.badge-warning { background: #78350f !important; color: #f59e0b !important; }
.badge-info { background: #1e3a5f !important; color: #60a5fa !important; }

/* ---- Datatable ---- */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--cc-border) !important;
    color: var(--cc-text) !important;
    border-radius: 6px !important;
}
.dataTables_info, .dataTables_paginate { color: var(--cc-text-muted) !important; }
.paginate_button { color: var(--cc-text-muted) !important; }
.paginate_button.current, .paginate_button:hover {
    background: var(--cc-purple) !important;
    border-color: var(--cc-purple) !important;
    color: #fff !important;
    border-radius: 6px !important;
}

/* ---- Select2 dark ---- */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--cc-border) !important;
}
.select2-dropdown {
    background: var(--cc-card-bg) !important;
    border: 1px solid var(--cc-border) !important;
}
.select2-container--default .select2-results__option {
    color: var(--cc-text) !important;
}
.select2-container--default .select2-results__option--highlighted {
    background: var(--cc-purple) !important;
}
.select2-selection__rendered { color: var(--cc-text) !important; }

/* ---- Zone selector ---- */
.nav-zone-selection { display: none !important; }

/* ---- Misc ---- */
hr { border-color: var(--cc-border) !important; }
.text-muted { color: var(--cc-text-muted) !important; }
a { color: var(--cc-purple-light); }
a:hover { color: #a78bfa; }

/* ---- Mobile Drawer ---- */
.cc-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}
.cc-overlay.active { display: block; opacity: 1; }

@media (max-width: 768px) {
    /* Drawer slide-in */
    .cc-sidebar {
        transform: translateX(-100%);
        transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
        width: min(82vw, 295px) !important;
        border-right: none !important;
        box-shadow: 6px 0 40px rgba(0,0,0,0.6);
        z-index: 1000;
        background: #0f111a !important;
    }
    .cc-sidebar.open { transform: translateX(0); }

    /* Brand */
    .cc-brand {
        padding: calc(18px + var(--cc-safe-top)) 16px 16px;
        background: linear-gradient(135deg,#1a1040 0%,#1e1b4b 100%);
        border-bottom: 1px solid rgba(255,255,255,0.06) !important;
        position: relative;
    }
    .cc-brand-icon { width:38px; height:38px; border-radius:12px; font-size:17px; }
    .cc-brand-name { font-size:15px; }

    /* Close button */
    .cc-drawer-close {
        position: absolute; top:14px; right:14px;
        width:28px; height:28px; border-radius:8px;
        background: rgba(255,255,255,0.08);
        display:flex; align-items:center; justify-content:center;
        cursor:pointer; color:rgba(255,255,255,0.5); font-size:13px; border:none;
        transition: background .15s;
    }
    .cc-drawer-close:hover { background: rgba(255,255,255,0.15); color:#fff; }

    /* User info strip */
    .cc-user-strip {
        display: flex; align-items:center; gap:12px;
        padding: 14px 16px;
        background: rgba(124,58,237,0.05);
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .cc-user-strip-av {
        width:40px; height:40px; border-radius:13px;
        background: linear-gradient(135deg,#7C3AED,#4f46e5);
        display:flex; align-items:center; justify-content:center;
        font-size:17px; font-weight:800; color:#fff; flex-shrink:0;
    }
    .cc-user-strip-name { font-size:13px; font-weight:700; color:#f1f5f9; line-height:1.3; }
    .cc-user-strip-role { font-size:10px; color:#475569; margin-top:2px; text-transform:uppercase; letter-spacing:0.8px; font-weight:700; }

    /* Section labels */
    .cc-nav-label {
        padding: 14px 16px 5px;
        font-size: 9px; font-weight:800; letter-spacing:1.5px; color:#253347;
    }

    /* Nav items */
    .cc-nav-item { margin: 2px 10px; }
    .cc-nav-link {
        padding: 10px 12px; border-radius:13px;
        font-size:13.5px; font-weight:600; color:#64748b;
        gap:12px; display:flex; align-items:center;
    }
    .cc-nav-link:hover { background:rgba(124,58,237,0.1); color:#e2e8f0; text-decoration:none; }
    .cc-nav-link.active {
        background: rgba(124,58,237,0.14) !important;
        color:#fff !important; border-left:none !important;
    }

    /* Icon box */
    .cc-nav-link i:first-child {
        width:34px !important; height:34px !important;
        display:inline-flex !important; align-items:center !important; justify-content:center !important;
        border-radius:10px !important; background:rgba(255,255,255,0.05) !important;
        font-size:15px !important; flex-shrink:0 !important; text-align:center !important;
    }
    .cc-nav-link:hover i:first-child { background:rgba(124,58,237,0.15) !important; color:#a78bfa !important; }
    .cc-nav-link.active i:first-child { background:rgba(124,58,237,0.25) !important; color:#a78bfa !important; }

    /* Submenu */
    .cc-submenu { margin: 2px 0 4px 56px !important; }
    .cc-submenu-link { padding:9px 12px; border-radius:10px; font-size:13px; font-weight:500; }
    .cc-submenu-link i { font-size:13px; }

    /* Sidebar bottom - logout */
    .cc-sidebar-bottom { padding:10px 10px 16px; border-top:1px solid rgba(255,255,255,0.05); }
    .cc-sidebar-bottom .cc-nav-link { color:#f87171 !important; }
    .cc-sidebar-bottom .cc-nav-link i:first-child { background:rgba(239,68,68,0.1) !important; color:#f87171 !important; }
    .cc-sidebar-bottom .cc-nav-link:hover { background:rgba(239,68,68,0.08) !important; }

    /* Topbar */
    .cc-topbar { left:0; width:100% !important; }
    .page-content {
        margin-left:0 !important; width:100vw !important;
        max-width:100vw !important; overflow-x:hidden;
        padding-left:10px !important; padding-right:10px !important;
    }
    .content-wrapper { padding:0 !important; }
    .cc-mob-toggle { display:flex !important; }
}

.cc-mob-toggle {
    display: none;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: var(--cc-hover);
    border-radius: 8px; cursor: pointer;
    color: var(--cc-text); border: none;
}


/* ---- Fix: white-bg slide panels (editItem / newItem) ---- */
.editItem-slide-content-block,
.newItem-slide-content-block {
    background-color: #f7f8fb !important;
}
.editItem-slide-content-block .form-control,
.newItem-slide-content-block .form-control,
.editItem-slide-content-block textarea.form-control,
.newItem-slide-content-block textarea.form-control {
    background: #ffffff !important;
    color: #1a1a2e !important;
    border: 1px solid #e2e8f0 !important;
}
.editItem-slide-content-block .form-control:focus,
.newItem-slide-content-block .form-control:focus {
    background: #ffffff !important;
    color: #1a1a2e !important;
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15) !important;
}
.editItem-slide-content-block label,
.newItem-slide-content-block label {
    color: #4a5568 !important;
}
.editItem-slide-content-block .select2-selection,
.newItem-slide-content-block .select2-selection {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}
.editItem-slide-content-block .select2-selection__rendered,
.newItem-slide-content-block .select2-selection__rendered {
    color: #1a1a2e !important;
}
.editItem-slide-content-block .card,
.editItem-slide-content-block .panel,
.newItem-slide-content-block .card,
.newItem-slide-content-block .panel {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1a1a2e !important;
}
.editItem-slide-content-block h4,
.editItem-slide-content-block h5,
.editItem-slide-content-block p,
.editItem-slide-content-block span,
.newItem-slide-content-block h4,
.newItem-slide-content-block h5,
.newItem-slide-content-block p,
.newItem-slide-content-block span {
    color: #1a1a2e !important;
}
.editItem-slide-content-block .text-muted,
.newItem-slide-content-block .text-muted {
    color: #718096 !important;
}



/* ---- Fix: modal inputs (Add New Item etc.) ---- */
.modal-content {
    background-color: #f7f8fb !important;
    color: #1a1a2e !important;
}
.modal-body .form-control,
.modal-body input.form-control,
.modal-body textarea.form-control,
.modal-body select.form-control {
    background: #ffffff !important;
    color: #1a1a2e !important;
    border: 1px solid #e2e8f0 !important;
}
.modal-body .form-control:focus {
    background: #ffffff !important;
    color: #1a1a2e !important;
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15) !important;
}
.modal-body label {
    color: #4a5568 !important;
}
.modal-body .select2-selection {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}
.modal-body .select2-selection__rendered {
    color: #1a1a2e !important;
}
.modal-body h4, .modal-body h5,
.modal-body p, .modal-body span,
.modal-body .text-default {
    color: #1a1a2e !important;
}
.modal-body .text-muted {
    color: #718096 !important;
}
.modal-header {
    background-color: #edf2f7 !important;
    color: #1a1a2e !important;
}
.modal-header .modal-title,
.modal-header h4, .modal-header h5 {
    color: #1a1a2e !important;
}



/* ---- Fix: modal buttons (Add Discounted Price etc.) ---- */
.modal-body .btn-secondary,
.modal-body .btn-default,
.modal-body .btn-light,
.modal-body .btn-labeled {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e0 !important;
    color: #2d3748 !important;
}
.modal-body .btn-secondary:hover,
.modal-body .btn-default:hover,
.modal-body .btn-light:hover {
    background: #cbd5e0 !important;
    color: #1a202c !important;
}

   ADD NEW ITEM MODAL — Full Redesign (ani = add-new-item)
   ============================================================ */

/* Dialog */
.ani-modal { max-width: 620px; margin: 24px auto; }
@media (max-width: 640px) {
    .ani-modal { margin: 0; max-width: 100%; height: 100%; }
    .ani-modal .ani-modal-content { border-radius: 0; min-height: 100vh; }
}

/* Content shell */
.ani-modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
}

/* Header */
.ani-header {
    padding: 18px 22px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}
.ani-header-inner { display: flex; align-items: center; gap: 12px; }
.ani-header-icon {
    width: 38px; height: 38px;
    background: #7c3aed;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px; flex-shrink: 0;
}
.ani-title { font-size: 15px; font-weight: 700; color: #111827; line-height: 1.2; }
.ani-subtitle { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.ani-close {
    width: 30px; height: 30px;
    background: #f1f5f9; border: none; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #64748b; font-size: 13px; cursor: pointer; line-height: 1;
    flex-shrink: 0;
}
.ani-close:hover { background: #e2e8f0; color: #111827; }

/* Body */
.ani-body { overflow-y: auto; flex: 1; }

/* Sections */
.ani-section {
    padding: 18px 22px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
}
.ani-section-label {
    font-size: 10px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    color: #9ca3af; margin-bottom: 14px;
}

/* Fields */
.ani-field { margin-bottom: 12px; }
.ani-field:last-child { margin-bottom: 0; }
.ani-label {
    display: block; font-size: 12.5px; font-weight: 600;
    color: #374151; margin-bottom: 6px;
}
.ani-optional { font-size: 11px; font-weight: 400; color: #9ca3af; }
.ani-input {
    height: 40px !important;
    border-radius: 9px !important;
    border: 1.5px solid #e5e7eb !important;
    font-size: 13.5px !important;
    color: #111827 !important;
    background: #fff !important;
    padding: 0 12px !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ani-input:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1) !important;
    color: #111827 !important;
    background: #fff !important;
}

/* Select2 inside modal */
#addNewItemModal .select2-selection--single,
#addNewItemModal .select2-selection--multiple {
    border-radius: 9px !important;
    border: 1.5px solid #e5e7eb !important;
    background: #fff !important;
    min-height: 40px !important;
}
#addNewItemModal .select2-selection__rendered { color: #111827 !important; line-height: 38px !important; }
#addNewItemModal .select2-selection__arrow { top: 7px !important; }

/* Two-col layout */
.ani-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
@media (max-width: 480px) { .ani-two-col { grid-template-columns: 1fr; } }

/* Price row */
.ani-price-row { display: flex; align-items: flex-end; gap: 10px; }
.ani-field-grow { flex: 1; }
.ani-field-shrink { flex-shrink: 0; }
.ani-btn-discount {
    height: 40px; padding: 0 14px;
    background: #f3f0ff; border: 1.5px solid #ddd6fe;
    color: #7c3aed; border-radius: 9px;
    font-size: 12.5px; font-weight: 600;
    white-space: nowrap; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    transition: all 0.15s;
}
.ani-btn-discount:hover { background: #ede9fe; border-color: #c4b5fd; }

/* Image preview */
.ani-preview-img {
    width: 80px; height: 80px;
    border-radius: 10px; object-fit: cover;
    margin-bottom: 10px; display: block;
    border: 1px solid #e5e7eb;
}

/* Toggles */
.ani-toggles-row {
    display: flex; gap: 28px; flex-wrap: wrap; align-items: center;
}
.ani-toggle-item { display: flex; align-items: center; gap: 8px; }
.ani-toggle-label { font-size: 13px; font-weight: 500; color: #374151; }

/* Radio pills */
.ani-radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.ani-radio-pill {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px; font-weight: 500; color: #374151;
    cursor: pointer; margin-bottom: 0;
    transition: all 0.15s;
    background: #fff;
}
.ani-radio-pill input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.ani-radio-pill:has(input:checked) {
    border-color: #7c3aed;
    background: #f3f0ff;
    color: #7c3aed;
}
.ani-radio-pill:hover { border-color: #c4b5fd; background: #f8f5ff; }

/* Footer */
.ani-footer {
    padding: 14px 22px;
    background: #fff;
    border-top: 1px solid #eef2f7;
    display: flex; justify-content: flex-end; gap: 8px;
    position: sticky; bottom: 0; z-index: 10;
    flex-shrink: 0;
}
.ani-btn-cancel {
    padding: 9px 18px;
    background: #f1f5f9; border: 1px solid #e2e8f0;
    color: #64748b; border-radius: 9px;
    font-size: 13px; font-weight: 600; cursor: pointer;
}
.ani-btn-cancel:hover { background: #e2e8f0; color: #1a202c; }
.ani-btn-save {
    padding: 9px 22px;
    background: #7c3aed; border: none;
    color: #fff; border-radius: 9px;
    font-size: 13px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
}
.ani-btn-save:hover { background: #6d28d9; color: #fff; }

/* Summernote inside modal fix */
#addNewItemModal .note-editor { border-radius: 9px !important; border: 1.5px solid #e5e7eb !important; }
#addNewItemModal .note-toolbar { background: #f8fafc !important; border-radius: 9px 9px 0 0 !important; }
#addNewItemModal .note-editable { color: #111827 !important; background: #fff !important; min-height: 100px !important; }

/* ============================================
   Order items box (Order page + Thermal Bill)
   Was an inline light #f7f8fb box, so the light theme text vanished on it.
   ============================================ */
@media screen {
    .cc-order-items {
        background: rgba(255,255,255,0.03) !important;
        border: 1px solid var(--cc-border) !important;
        border-radius: 12px !important;
        padding: 12px 14px !important;
    }
    .cc-order-items strong,
    .cc-order-items .d-flex { color: var(--cc-text) !important; }
    .cc-order-items .badge,
    .cc-order-items .badge.text-default {
        background: rgba(124,58,237,0.16) !important;
        border: 1px solid rgba(139,92,246,0.35) !important;
        color: #ddd6fe !important;
        font-weight: 700 !important;
        white-space: nowrap;
    }
    .cc-order-items .table { background: transparent !important; margin: 6px 0 4px; }
    .cc-order-items .table th { color: var(--cc-text-muted) !important; font-size: 11px !important; }
    .cc-order-items .table td { font-size: 12.5px !important; }
    .cc-order-items-sep { border-bottom: 1px dashed rgba(255,255,255,0.12); }
}
@media screen and (max-width: 575.98px) {
    .cc-order-items { padding: 10px 12px !important; }
    .cc-order-items .d-flex { font-size: 0.95rem !important; gap: 4px; }
    .cc-order-items .table th, .cc-order-items .table td { padding: 6px 8px !important; }
}

/* ============================================
   Printing (Print Bill / Thermal Bill / Ctrl+P)
   The dark theme's light text printed as near-white on white paper.
   The bill blocks are matched by id so these rules beat the theme's
   class rules (which are !important too).
   ============================================ */
@media print {
    html, body { background: #fff !important; color: #000 !important; }
    body * { color: #000 !important; text-shadow: none !important; box-shadow: none !important; }
    #printThis, #printThis *, #printOrderBlock, #printOrderBlock * {
        color: #000 !important;
        background: transparent !important;
        border-color: #bbb !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    #printThis .cc-order-items, #printOrderBlock .cc-order-items { border: 1px solid #bbb !important; border-radius: 6px !important; padding: 6px 8px !important; }
    #printThis .cc-order-items-sep, #printOrderBlock .cc-order-items-sep { border-bottom: 1px dashed #999 !important; }
    #printThis .badge, #printOrderBlock .badge { border: 1px solid #999 !important; }
    .sidebar, .cc-sidebar, .cc-topbar, .cc-overlay, .navbar, .page-header, #printButton, #btn,
    .btn, .modal, .breadcrumb-line { display: none !important; }
    .cc-main, .page-content, .content-wrapper, .content { margin: 0 !important; padding: 0 !important; background: #fff !important; }
}
/* ============================================================
   CD106-M (2026-10-30) - mobile first
   1) Top bar on phones: title on one line, compact account chip.
   2) Item edit pages (Admin + Store panel, wrapper .cc-ie): padded form card,
      48 px fields, toggles as label + switch rows, veg / non-veg as big pills,
      full-width image, styled file picker, Update button always reachable.
   ============================================================ */
@media (max-width: 768px) {
    .cc-topbar { padding-left: 12px !important; padding-right: 12px !important; gap: 10px; }
    .cc-topbar-left { min-width: 0; flex: 1 1 auto; gap: 10px; }
    .cc-topbar-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
    .cc-topbar-right { flex: 0 1 auto; min-width: 0; gap: 8px; }
    .cc-user-btn { padding: 4px 8px; max-width: 44vw; min-height: 40px; }
    .cc-user-btn > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .cc-zone-select { width: 118px !important; padding-left: 8px !important; padding-right: 22px !important; font-size: 13px !important; }
}
@media (max-width: 420px) {
    .cc-user-btn > span, .cc-user-btn > .icon-arrow-down22 { display: none; }
    .cc-user-btn { padding: 4px; }
}

/* Item edit pages (Admin + Store panel), every screen size: dark file picker, pill radios */
.cc-ie .uniform-uploader { display: flex !important; width: 100% !important; min-height: 44px; border-radius: 12px; overflow: hidden; border: 1px solid var(--cc-border); margin-top: 6px; background: transparent !important; }
.cc-ie .uniform-uploader .filename { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; padding: 0 14px; background: rgba(255, 255, 255, .04) !important; color: var(--cc-text-muted) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 0 !important; }
.cc-ie .uniform-uploader .action { display: flex !important; align-items: center; padding: 0 16px !important; border-radius: 0 !important; margin: 0 !important; background: var(--cc-purple) !important; color: #fff !important; border: 0 !important; }
.cc-ie .form-group.row > .d-flex:has(> .radio-inline) { display: flex !important; flex-wrap: wrap; gap: 8px; }
.cc-ie .radio-inline {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; min-width: 110px; margin: 0 !important; padding: 0 14px; border: 1px solid var(--cc-border);
    border-radius: 12px; cursor: pointer; font-weight: 600; color: var(--cc-text) !important;
}
.cc-ie .radio-inline input { width: 18px; height: 18px; margin: 0; accent-color: var(--cc-purple); }
.cc-ie .radio-inline:has(input:checked) { border-color: var(--cc-purple); background: rgba(124, 58, 237, .16); color: #fff !important; }

@media (max-width: 767.98px) {
    /* page header: one compact line instead of a tall empty card */
    .cc-ie-header, .cc-ie-header .page-header-content { padding: 0 !important; min-height: 0 !important; }
    .cc-ie-header { margin: 2px 0 12px !important; }
    .cc-ie-header .page-title { padding: 0 !important; }
    .cc-ie-header h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 15px !important; line-height: 1.3; }
    .cc-ie-header h4 > i { display: none; }
    .cc-ie-header .badge { white-space: normal; text-align: left; font-size: 12px; line-height: 1.35; padding: 6px 10px; max-width: 100%; }
    .cc-ie-header .header-elements-toggle { display: none !important; }

    /* form card */
    .cc-ie { padding-bottom: 92px !important; }
    .cc-ie > .col-md-8 { padding: 0 !important; max-width: 100% !important; flex: 0 0 100% !important; }
    .cc-ie .card { border-radius: 16px !important; margin-bottom: 14px; }
    .cc-ie .card-body { padding: 18px 16px !important; }
    .cc-ie legend { margin-bottom: 14px !important; }
    .cc-ie .form-group.row { margin: 0 0 16px !important; }
    .cc-ie .form-group.row > [class*="col-"] { padding-left: 0 !important; padding-right: 0 !important; flex: 0 0 100%; max-width: 100%; }
    .cc-ie .col-form-label { padding: 0 0 6px !important; font-size: 13px; font-weight: 600; color: var(--cc-text-muted) !important; }
    .cc-ie .form-control { min-height: 48px; font-size: 16px !important; border-radius: 12px !important; }
    .cc-ie textarea.form-control { min-height: 96px; }
    .cc-ie .select2-container { width: 100% !important; }
    .cc-ie .select2-selection--single { min-height: 48px !important; border-radius: 12px !important; display: flex !important; align-items: center; }
    .cc-ie .select2-selection--single .select2-selection__rendered { flex: 1 1 auto; min-width: 0; line-height: 1.3 !important; padding-top: 0 !important; padding-bottom: 0 !important; padding-right: 36px !important; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .cc-ie .select2-selection--multiple { min-height: 48px !important; border-radius: 12px !important; }
    .cc-ie .note-editor { border-radius: 12px !important; overflow: hidden; }
    .cc-ie .note-toolbar { padding: 6px !important; }
    .cc-ie .note-toolbar .note-btn { padding: 6px 9px !important; }
    .cc-ie .note-editable { min-height: 140px; font-size: 15px; background: #0f0f23 !important; color: #e2e8f0 !important; }
    .cc-ie .note-toolbar { background: #1a1a2e !important; }

    /* toggles: label on the left, switch on the right, one tidy row each */
    .cc-ie .form-group.row:has(.checkbox-switchery) {
        display: flex !important; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px;
        padding: 10px 14px; border: 1px solid var(--cc-border); border-radius: 12px; min-height: 56px;
    }
    .cc-ie .form-group.row:has(.checkbox-switchery) > .col-form-label { flex: 1 1 auto; max-width: none; padding: 0 !important; font-size: 14px; color: var(--cc-text) !important; }
    .cc-ie .form-group.row:has(.checkbox-switchery) > [class*="col-"]:not(.col-form-label) { flex: 0 0 auto; width: auto !important; max-width: none; }
    .cc-ie .checkbox-switchery { margin: 0 !important; }
    .cc-ie .checkbox-switchery label { margin: 0 !important; }

    /* veg / non-veg / none: pills fill the row on phones */
    .cc-ie .form-group.row > .d-flex:has(> .radio-inline) { flex-wrap: nowrap; }
    .cc-ie .radio-inline { flex: 1 1 0; min-width: 0; padding: 0 8px; }

    /* image: full width preview, big remove link, dark file picker */
    .cc-ie img[alt="Image"], .cc-ie .slider-preview-image:not(.hidden) {
        width: 100% !important; max-width: 100%; height: auto; aspect-ratio: 486 / 355; object-fit: cover; border-radius: 12px !important;
    }
    .cc-ie #removeItemImage { display: inline-flex; align-items: center; min-height: 40px; }
    .cc-ie .uniform-uploader { min-height: 48px; }
    .cc-ie .uploader .help-text { display: block; margin-top: 6px; font-size: 12px; }

    /* Enable / Delete side by side, Update fixed at the bottom of the screen */
    .cc-ie .cc-item-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 0 !important; }
    .cc-ie .cc-item-actions .btn-group { width: 100% !important; }
    .cc-ie .cc-item-actions .btn { width: 100%; min-height: 48px; border-radius: 12px !important; display: flex !important; align-items: center; justify-content: center; gap: 6px; padding-top: 0 !important; padding-bottom: 0 !important; }
    .cc-ie form > .text-right {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: var(--cc-sidebar-bg); border-top: 1px solid var(--cc-border);
        box-shadow: 0 -6px 18px -10px rgba(0, 0, 0, .6);
    }
    /* demo sites have their own fixed banner at the bottom: keep Update in the page there */
    body:has(#fdm-bar) .cc-ie form > .text-right { position: static; padding: 14px 0 0; background: none; border: 0; box-shadow: none; }
    .cc-ie form > .text-right .btn { width: 100%; min-height: 50px; border-radius: 14px !important; font-size: 16px; font-weight: 700; margin: 0 !important; background: var(--cc-purple) !important; background-image: none !important; box-shadow: none !important; }
    .cc-ie .cc-item-actions .btn-danger { background: #EF4444 !important; background-image: none !important; box-shadow: none !important; }
    .cc-ie .cc-item-actions .btn-primary { background: var(--cc-purple) !important; background-image: none !important; box-shadow: none !important; }
}

/* ============================================================
   CD110 (2026-10-30) - bulk item upload window + phone fixes
   (always the last block of this file; port_cd110.py replaces it on re-run)
   ============================================================ */

/* ---- Phones: icon buttons ("Add New Item", "Bulk CSV Upload" ...) ----
   The layout's phone CSS sets .btn-labeled { padding-left:14px } while the
   icon stays absolutely positioned, so the icon covered the first letters.
   The icon now sits in the row, before the text. */
@media (max-width: 767px) {
    .btn.btn-labeled:not(.btn-block) { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; }
    .btn.btn-labeled.btn-block { display: flex !important; align-items: center; justify-content: center; gap: 8px; }
    .btn.btn-labeled > b {
        position: static !important; display: inline-flex !important; align-items: center;
        width: auto !important; height: auto !important; padding: 0 !important; margin: 0 !important;
        background: none !important; border: 0 !important; top: auto !important; left: auto !important; right: auto !important;
        color: inherit !important;
    }
    .btn.btn-labeled.btn-labeled-right > b { order: 2; }
    .btn.btn-labeled > b > i { top: 0 !important; }
    /* modal titles wrapped in a <span> took the light body-text colour on the light header */
    .modal-header .modal-title span { color: inherit !important; }
}

/* ---- Admin > Items: header on phones ---- */
@media (max-width: 767px) {
    .cc-items-head { flex-direction: column; align-items: stretch !important; gap: 12px; }
    .cc-items-head h3 { font-size: 20px; margin: 0; }
    .cc-items-head > div { display: flex; flex-wrap: wrap; gap: 8px; }
    .cc-items-head > div .btn { margin: 0 !important; flex: 1 1 auto; }
}

/* ---- Upload result (shown above the items list after an upload) ---- */
.cc-bu-done {
    position: relative; margin: 0 0 14px; padding: 14px 44px 14px 16px;
    border-radius: 14px; border: 1px solid rgba(16, 185, 129, .35); background: rgba(16, 185, 129, .10);
}
.cc-bu-done-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: #d1fae5 !important; line-height: 1.35; }
.cc-bu-done-title i { color: #34d399; font-size: 18px; }
.cc-bu-done-rows { margin-top: 8px; display: grid; gap: 6px; }
.cc-bu-done-row { display: grid; grid-template-columns: 1fr; gap: 2px; font-size: 13px; }
.cc-bu-done-k { color: #6ee7b7 !important; font-weight: 600; }
.cc-bu-done-v { color: #e2e8f0 !important; word-break: break-word; }
.cc-bu-done-x {
    position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 8px;
    background: rgba(255, 255, 255, .06); color: #a7f3d0; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
@media (min-width: 768px) {
    .cc-bu-done-row { grid-template-columns: 220px 1fr; gap: 12px; }
}

/* ---- Upload window: a bottom sheet on phones, a centred card on desktop ---- */
.cc-bu-modal .cc-bu-dialog {
    margin: 0 !important; max-width: 100% !important; width: 100%;
    min-height: 100%; display: flex; align-items: flex-end;
}
.cc-bu-modal.fade .cc-bu-dialog { transform: translateY(32px); transition: transform .25s ease-out; }
.cc-bu-modal.show .cc-bu-dialog { transform: none; }
.cc-bu-modal .cc-bu-sheet {
    width: 100%; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden;
    background: #ffffff !important; color: #111827 !important;
    border: 0 !important; border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -6px 24px rgba(15, 23, 42, .18) !important;
    font-family: 'Inter', 'Roboto', sans-serif;
}
@media (min-width: 576px) {
    .cc-bu-modal .cc-bu-dialog { max-width: 560px !important; margin: 0 auto !important; align-items: center; padding: 24px 0; }
    .cc-bu-modal.fade .cc-bu-dialog { transform: translateY(-16px); }
    .cc-bu-modal.show .cc-bu-dialog { transform: none; }
    .cc-bu-modal .cc-bu-sheet { max-height: calc(100vh - 48px); border-radius: 18px !important; box-shadow: 0 12px 32px rgba(15, 23, 42, .22) !important; }
}

.cc-bu-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid #eef2f7; flex-shrink: 0; }
.cc-bu-head-icon { width: 40px; height: 40px; border-radius: 11px; background: #7c3aed; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cc-bu-head-text { flex: 1; min-width: 0; }
.cc-bu-sheet .cc-bu-title { font-size: 17px; font-weight: 700; color: #111827 !important; line-height: 1.25; }
.cc-bu-sheet .cc-bu-sub { font-size: 12.5px; color: #6b7280 !important; margin-top: 2px; }
.cc-bu-x { width: 40px; height: 40px; border: 0; border-radius: 10px; background: #f1f5f9; color: #475569; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.cc-bu-x:hover { background: #e2e8f0; color: #111827; }

.cc-bu-form { display: flex; flex-direction: column; min-height: 0; flex: 1; margin: 0; }
.cc-bu-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 8px; flex: 1; min-height: 0; }

.cc-bu-step { padding: 14px 0; border-bottom: 1px solid #f1f5f9; }
.cc-bu-step-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cc-bu-sheet .cc-bu-step-head span:last-child { font-size: 14px; font-weight: 700; color: #111827 !important; }
.cc-bu-sheet .cc-bu-num { width: 22px; height: 22px; border-radius: 50%; background: #ede9fe; color: #6d28d9 !important; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.cc-bu-sheet .cc-bu-hint { font-size: 12.5px; color: #6b7280 !important; margin-top: 6px; }
.cc-bu-sheet .cc-bu-field-err { font-size: 12.5px; color: #b91c1c !important; margin-top: 6px; font-weight: 600; }

.cc-bu-sheet .cc-bu-select {
    width: 100%; height: 48px; padding: 0 40px 0 14px; border-radius: 12px; border: 1.5px solid #e5e7eb;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    -webkit-appearance: none; appearance: none; font-size: 15px; color: #111827; font-family: inherit;
}
.cc-bu-sheet .cc-bu-select:focus { outline: 0; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .12); }

/* file picker: the whole box is the tap target */
.cc-bu-sheet .cc-bu-drop {
    position: relative; display: flex !important; align-items: center; gap: 12px; margin: 0 !important;
    min-height: 72px; padding: 14px; border-radius: 14px; border: 1.5px dashed #c4b5fd; background: #faf8ff; cursor: pointer;
    font-size: inherit !important; font-weight: inherit !important; color: inherit !important;
}
.cc-bu-sheet .cc-bu-drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.cc-bu-sheet .cc-bu-drop-has { border-style: solid; border-color: #7c3aed; background: #f5f3ff; }
.cc-bu-sheet .cc-bu-drop-bad { border-color: #fca5a5; background: #fef2f2; }
.cc-bu-drop-icon { width: 44px; height: 44px; border-radius: 12px; background: #7c3aed; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.cc-bu-drop-text { display: flex; flex-direction: column; min-width: 0; }
.cc-bu-sheet .cc-bu-drop-main { font-size: 15px; font-weight: 700; color: #4c1d95 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-bu-sheet .cc-bu-drop-sub { font-size: 12.5px; color: #6b7280 !important; margin-top: 2px; }

.cc-bu-preview { margin-top: 12px; }
.cc-bu-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cc-bu-stat { border: 1px solid #eef2f7; border-radius: 12px; padding: 10px 8px; text-align: center; background: #fff; }
.cc-bu-sheet .cc-bu-stat-n { display: block; font-size: 20px; font-weight: 800; color: #111827 !important; line-height: 1.1; }
.cc-bu-sheet .cc-bu-stat-l { display: block; font-size: 11.5px; color: #6b7280 !important; margin-top: 2px; }
.cc-bu-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cc-bu-sheet .cc-bu-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.cc-bu-sheet .cc-bu-chip-ok { background: #ecfdf5; color: #047857 !important; border: 1px solid #a7f3d0; }
.cc-bu-sheet .cc-bu-chip-off { background: #f8fafc; color: #64748b !important; border: 1px solid #e2e8f0; }
.cc-bu-sheet .cc-bu-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e !important; font-size: 12.5px; line-height: 1.45; }

/* checkboxes */
.cc-bu-sheet label.cc-bu-check {
    position: relative; display: flex !important; align-items: flex-start; gap: 12px; padding: 10px 0; margin: 0 !important; cursor: pointer;
    font-size: inherit !important; font-weight: inherit !important; color: inherit !important;
}
.cc-bu-check input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cc-bu-check-box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #cbd5e1; background: #fff; flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; }
.cc-bu-check input[type=checkbox]:checked + .cc-bu-check-box { background: #7c3aed; border-color: #7c3aed; }
.cc-bu-check input[type=checkbox]:checked + .cc-bu-check-box::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.cc-bu-check input[type=checkbox]:focus-visible + .cc-bu-check-box { box-shadow: 0 0 0 3px rgba(124, 58, 237, .25); }
.cc-bu-check-text { display: flex; flex-direction: column; }
.cc-bu-sheet .cc-bu-check-title { font-size: 14px; font-weight: 600; color: #111827 !important; }
.cc-bu-sheet .cc-bu-check-sub { font-size: 12.5px; color: #6b7280 !important; margin-top: 2px; line-height: 1.4; }

/* column guide */
.cc-bu-guide { padding: 12px 0 4px; }
.cc-bu-sheet .cc-bu-guide summary { font-size: 14px; font-weight: 700; color: #6d28d9 !important; cursor: pointer; padding: 6px 0; list-style-position: inside; }
.cc-bu-guide-body { margin-top: 6px; border: 1px solid #eef2f7; border-radius: 12px; overflow: hidden; }
.cc-bu-guide-row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 9px 12px; border-bottom: 1px solid #f1f5f9; }
.cc-bu-sheet .cc-bu-guide-k { font-size: 13px; font-weight: 700; color: #111827 !important; }
.cc-bu-sheet .cc-bu-guide-k em { font-style: normal; font-size: 11px; font-weight: 600; color: #b91c1c; margin-left: 4px; }
.cc-bu-sheet .cc-bu-guide-v { font-size: 12.5px; color: #4b5563 !important; }
.cc-bu-sheet .cc-bu-guide-note { padding: 10px 12px; font-size: 12px; color: #6b7280 !important; background: #f8fafc; line-height: 1.5; }
@media (min-width: 576px) {
    .cc-bu-guide-row { grid-template-columns: 170px 1fr; gap: 10px; }
}

/* errors after a failed upload */
.cc-bu-alert { margin: 12px 0 2px; padding: 12px 14px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; }
.cc-bu-sheet .cc-bu-alert-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #991b1b !important; }
.cc-bu-sheet .cc-bu-alert-text { font-size: 12.5px; color: #7f1d1d !important; margin-top: 4px; }
.cc-bu-alert-list { margin: 8px 0 0; padding-left: 18px; max-height: 220px; overflow-y: auto; }
.cc-bu-sheet .cc-bu-alert-list li { font-size: 12.5px; color: #7f1d1d !important; margin-bottom: 4px; word-break: break-word; }

/* footer buttons */
.cc-bu-foot {
    display: flex; gap: 10px; padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eef2f7; background: #fff; flex-shrink: 0;
}
.cc-bu-sheet .cc-bu-btn {
    height: 48px; padding: 0 18px; border-radius: 12px; font-size: 15px; font-weight: 700; font-family: inherit;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none !important; white-space: nowrap;
}
.cc-bu-sheet a.cc-bu-btn-ghost, .cc-bu-sheet .cc-bu-btn-ghost { flex: 0 0 auto; background: #f5f3ff; border: 1.5px solid #ddd6fe; color: #6d28d9 !important; }
.cc-bu-sheet .cc-bu-btn-ghost:hover { background: #ede9fe; }
.cc-bu-sheet .cc-bu-btn-primary { flex: 1 1 auto; background: #7c3aed; border: 0; color: #fff !important; }
.cc-bu-sheet .cc-bu-btn-primary:hover { background: #6d28d9; }
.cc-bu-sheet .cc-bu-btn-primary:disabled { background: #a78bfa; cursor: wait; }
.cc-bu-sheet .cc-bu-btn span, .cc-bu-sheet .cc-bu-btn i { color: inherit !important; }
@media (min-width: 576px) {
    .cc-bu-foot { justify-content: flex-end; padding: 14px 20px; }
    .cc-bu-head { padding: 18px 20px 14px; }
    .cc-bu-body { padding: 4px 20px 8px; }
    .cc-bu-sheet .cc-bu-btn-primary { flex: 0 0 auto; min-width: 180px; }
}

/* Sidebar user strip + drawer close button on desktop (CD111). Their styles lived only in the phone media
   query, so on desktop the strip showed as plain text and the close button as a bare browser button. */
@media (min-width: 769px) {
    .cc-drawer-close { display: none; }
    .cc-user-strip {
        display: flex; align-items: center; gap: 12px;
        padding: 14px 20px;
        background: rgba(124,58,237,0.05);
        border-bottom: 1px solid var(--cc-border);
    }
    .cc-user-strip-av {
        width: 36px; height: 36px; border-radius: 10px;
        background: linear-gradient(135deg,#7C3AED,#4f46e5);
        display: flex; align-items: center; justify-content: center;
        font-size: 16px; font-weight: 800; color: #fff; flex-shrink: 0;
    }
    .cc-user-strip-name { font-size: 13px; font-weight: 700; color: #f1f5f9; line-height: 1.3; word-break: break-word; }
    .cc-user-strip-role { font-size: 10px; color: var(--cc-text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; }
}

/* Top-bar zone picker on phones (CD111): a general mobile rule gave it 11 px top/bottom padding inside a
   35 px box, so "All Zones" was cut in half. */
@media (max-width: 768px) {
    .cc-topbar .cc-zone-select { height: 40px !important; padding-top: 0 !important; padding-bottom: 0 !important; line-height: 1.2 !important; font-size: 13px !important; }
}
