/* ==========================================================================
   MOBIL PLUS B2B DESIGN SYSTEM & STYLES
   ========================================================================== */

:root {
    --color-primary: #123F73;
    --color-primary-hover: #0D315A;
    --color-primary-light: #EBF2FA;

    --color-accent: #E53935;
    --color-accent-hover: #C92F2C;
    --color-accent-light: #FDE8E8;

    --color-white: #FFFFFF;

    --color-page-bg: #F5F7FA;
    --color-sidebar-bg: #F7F9FC;
    --color-panel-bg: #FFFFFF;

    --color-border: #D8E0EA;
    --color-border-light: #E8EDF3;

    --color-text: #1C2733;
    --color-text-secondary: #64748B;
    --color-text-muted: #94A3B8;

    --color-success: #168A45;
    --color-success-light: #E8F7EE;
    --color-warning: #D97706;
    --color-warning-light: #FEF3C7;
    --color-danger: #D92D20;
    --color-danger-light: #FEE2E2;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

    --topbar-height: 44px;
    --header-height: 76px;
    --sidebar-width: 288px;
    --sidebar-collapsed-width: 72px;

    --font-stack: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-page-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--color-primary-hover);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================================================
   IMPERSONATION BANNER
   ========================================================================== */
.impersonation-bar {
    background: #FEF3C7;
    border-bottom: 2px solid #D97706;
    color: #92400E;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.impersonation-bar a {
    color: #B45309;
    text-decoration: underline;
    margin-left: 12px;
}

/* ==========================================================================
   SERVICE TOPBAR (44px)
   ========================================================================== */
.service-topbar {
    height: var(--topbar-height);
    background-color: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 900;
    font-size: 13px;
}

.service-topbar-left, .service-topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
}

.topbar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-white);
}

.topbar-label {
    opacity: 0.72;
}

.topbar-val {
    font-weight: 600;
}

.manager-clickable {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    position: relative;
}

.manager-clickable:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Manager Dropdown (300px) */
.manager-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 310px;
    background: var(--color-white);
    color: var(--color-text);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: 18px;
    display: none;
    z-index: 1001;
    text-align: left;
}

.manager-dropdown.is-open {
    display: block;
}

.manager-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border-light);
}

.manager-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.manager-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

/* ==========================================================================
   APP LAYOUT (Sidebar + Main Content)
   ========================================================================== */
.app-wrapper {
    display: flex;
    min-height: calc(100vh - var(--topbar-height));
    position: relative;
}

/* Fixed Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-sidebar-bg);
    border-right: 1px solid var(--color-border);
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    z-index: 800;
    display: flex;
    flex-direction: column;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.app-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-logo-area {
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--color-border-light);
}

.logo-brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-badge {
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 6px;
    border-radius: var(--radius-sm);
}

.sidebar-toggle-btn:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}

.sidebar-nav {
    padding: 12px 10px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 52px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-weight: 500;
    transition: all 0.15s ease;
    margin-bottom: 4px;
    cursor: pointer;
    text-decoration: none;
}

.nav-item:hover {
    background: var(--color-border-light);
    color: var(--color-primary);
}

.nav-item.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}

.nav-item.promo-accent {
    color: var(--color-accent);
}
.nav-item.promo-accent:hover {
    background: var(--color-accent-light);
}

.nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.app-sidebar.collapsed .nav-label,
.app-sidebar.collapsed .logo-brand span,
.app-sidebar.collapsed .logo-badge {
    display: none;
}

.sidebar-divider {
    height: 1px;
    background: var(--color-border-light);
    margin: 12px 10px;
}

/* Main Content Area */
.app-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-main.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

/* ==========================================================================
   MAIN HEADER (76px)
   ========================================================================== */
.main-header {
    height: var(--header-height);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: var(--topbar-height);
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    gap: 24px;
}

.header-search-wrap {
    flex: 1;
    max-width: 620px;
    position: relative;
}

.header-search-input {
    width: 100%;
    height: 48px;
    background: var(--color-page-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0 16px 0 46px;
    font-size: 14px;
    color: var(--color-text);
    transition: all 0.15s ease;
}

.header-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(18, 63, 115, 0.12);
}

.search-icon-pos {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}

/* Search Autocomplete Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1050;
    max-height: 480px;
    overflow-y: auto;
}

.search-result-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border-light);
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.1s;
}

.search-result-row:hover {
    background: var(--color-page-bg);
}

.search-result-thumb {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #FAFAFA;
    border-radius: 4px;
    border: 1px solid var(--color-border-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
    background: var(--color-page-bg);
    border: 1px solid var(--color-border-light);
}

.header-action-btn:hover {
    background: var(--color-border-light);
    color: var(--color-primary);
}

.header-cart-widget {
    background: var(--color-primary-light);
    border: 1px solid #C4D9F0;
    color: var(--color-primary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.header-cart-widget:hover {
    background: #DEEBF8;
}

/* ==========================================================================
   NAVIGATION DRAWERS & MEGA PANELS (Catalog & Brands)
   ========================================================================== */
.drawer-overlay {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 850;
    display: none;
}

.drawer-overlay.is-open {
    display: block;
}

.drawer-panel {
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    background: var(--color-white);
    z-index: 860;
    box-shadow: var(--shadow-lg);
    display: none;
    border-right: 1px solid var(--color-border);
}

.drawer-panel.is-open {
    display: flex;
}

/* Catalog Second Panel (330px) */
.catalog-drawer-left {
    width: 330px;
    left: var(--sidebar-width);
    flex-direction: column;
}

.app-sidebar.collapsed ~ .drawer-overlay ~ .catalog-drawer-left {
    left: var(--sidebar-collapsed-width);
}

.drawer-header {
    padding: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.drawer-filter-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.drawer-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.drawer-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    color: var(--color-text);
    transition: all 0.15s;
    text-decoration: none;
}

.drawer-list-item:hover, .drawer-list-item.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* Mega Panel (Third Level) */
.mega-panel-right {
    left: calc(var(--sidebar-width) + 330px);
    width: min(980px, calc(100vw - var(--sidebar-width) - 370px));
    min-width: 600px;
    padding: 32px 40px;
    flex-direction: column;
    overflow-y: auto;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
}

.mega-group-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--color-border-light);
}

.mega-sub-link {
    display: block;
    font-size: 13px;
    color: var(--color-text-secondary);
    padding: 4px 0;
    transition: color 0.15s;
}

.mega-sub-link:hover {
    color: var(--color-primary);
}

/* Brands Alphabet Drawer */
.brand-letter-group {
    margin-bottom: 16px;
}

.brand-letter-heading {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    padding: 4px 14px;
    background: var(--color-page-bg);
    border-radius: 4px;
    margin-bottom: 4px;
}

/* ==========================================================================
   PAGE CONTAINER & PROMO SLIDER
   ========================================================================== */
.page-container {
    padding: 28px 32px 60px;
    max-width: 1720px;
    width: 100%;
}

.promo-banner-card {
    height: 300px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #1A5499 100%);
    border-radius: var(--radius-xl);
    color: var(--color-white);
    display: flex;
    align-items: center;
    padding: 48px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.promo-banner-content {
    max-width: 600px;
    z-index: 2;
}

.promo-banner-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.promo-banner-sub {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.btn-cta {
    background: var(--color-accent);
    color: var(--color-white);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
    text-decoration: none;
}

.btn-cta:hover {
    background: var(--color-accent-hover);
    color: var(--color-white);
}

/* Section Headings */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
}

/* ==========================================================================
   PRODUCT GRID & CARDS
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

@media (min-width: 1600px) {
    .products-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1400px) and (max-width: 1599px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) and (max-width: 1399px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}

.product-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #B9CEE8;
}

.product-badge-pos {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}

.product-thumb-box {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: #FAFAFA;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.product-thumb-img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.product-brand-tag {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px;
}

.product-sku-row {
    font-size: 12px;
    color: var(--color-primary);
    font-family: monospace;
    margin-bottom: 10px;
}

.product-stock-tag {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.stock-in { color: var(--color-success); }
.stock-out { color: var(--color-text-muted); }

.product-price-box {
    margin-bottom: 14px;
}

.product-main-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text);
}

.product-rrc-price {
    font-size: 12px;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.product-card-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Quantity Control Widget */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    height: 38px;
}

.qty-btn {
    width: 32px;
    height: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}

.qty-input {
    width: 44px;
    height: 100%;
    border: none;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}

.qty-input:focus {
    outline: none;
}

.btn-add-cart {
    flex: 1;
    height: 38px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
}

.btn-add-cart:hover {
    background: var(--color-primary-hover);
}

/* ==========================================================================
   B2B TABLE CATALOG MODE (STICKY HEADER & 11 COLUMNS)
   ========================================================================== */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    margin-bottom: 20px;
}

.catalog-table-wrap {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.b2b-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.b2b-table th {
    background: #F8FAFC;
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: calc(var(--topbar-height) + var(--header-height));
    z-index: 10;
}

.b2b-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
    font-size: 13px;
}

.b2b-table tr:hover td {
    background: #F8FAFD;
}

.table-thumb {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #FAFAFA;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
}

/* Bulk Action Bar */
.bulk-action-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-white);
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 20px;
    z-index: 999;
}

.bulk-action-bar.is-visible {
    display: flex;
}

/* ==========================================================================
   BUTTONS, BADGES, CARDS & UTILITIES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-primary { background: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { background: var(--color-primary-hover); color: var(--color-white); }

.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-outline:hover { background: var(--color-border-light); border-color: var(--color-text-secondary); }

.btn-success { background: var(--color-success); color: var(--color-white); }
.btn-danger { background: var(--color-danger); color: var(--color-white); }
.btn-warning { background: var(--color-warning); color: var(--color-white); }

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: var(--color-success-light); color: var(--color-success); }
.badge-warning { background: var(--color-warning-light); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-light); color: var(--color-danger); }
.badge-info { background: var(--color-primary-light); color: var(--color-primary); }

.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

/* Flash alerts */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success { background: var(--color-success-light); color: #0F5B2E; border: 1px solid #B8E6CB; }
.alert-error, .alert-danger { background: var(--color-danger-light); color: #991B1B; border: 1px solid #FCA5A5; }

/* ==========================================================================
   AUTH PAGES (520px card)
   ========================================================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-page-bg);
}

.auth-top-strip {
    height: 44px;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    color: var(--color-white);
    font-size: 13px;
}

.auth-card-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.auth-card {
    width: 520px;
    max-width: 100%;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 44px 48px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--color-text);
    transition: border-color 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(18, 63, 115, 0.1);
}

/* ==========================================================================
   ADMIN LAYOUT
   ========================================================================== */
.admin-sidebar {
    width: 260px;
    background: #0F2D52;
    color: var(--color-white);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 800;
    display: flex;
    flex-direction: column;
}

.admin-sidebar-head {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    font-size: 16px;
}

.admin-nav {
    padding: 14px 10px;
    flex: 1;
    overflow-y: auto;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 500;
    margin-bottom: 4px;
    text-decoration: none;
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
}

.admin-nav-item.active {
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
}

.admin-main {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    height: 64px;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 700;
}

/* Dashboard Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.stat-val {
    font-size: 26px;
    font-weight: 800;
    color: var(--color-primary);
    margin-top: 6px;
}

.stat-lbl {
    font-size: 13px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1199px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.mobile-open {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0 !important;
    }
    .service-topbar-left .topbar-company,
    .service-topbar-left .topbar-provider {
        display: none;
    }
    .catalog-drawer-left {
        left: 0;
    }
    .mega-panel-right {
        left: 330px;
        width: calc(100vw - 330px);
    }
}

@media (max-width: 767px) {
    .admin-sidebar { position: static; width: 100%; }
    body > div:has(> .admin-sidebar) { flex-direction: column; }
    .admin-main { margin-left: 0; width: 100%; }
    .admin-sidebar-head { height: 48px; }
    .admin-nav { display: flex; gap: 4px; overflow-x: auto; flex-wrap: nowrap; }
    .admin-nav-item { white-space: nowrap; }
    .admin-header { padding: 12px 16px; height: auto; gap: 12px; flex-wrap: wrap; position: static; }
    .page-container div[style*="grid-template-columns"], .auth-card div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .card:has(> .b2b-table) { overflow-x: auto !important; }
    .service-topbar {
        padding: 0 14px;
        font-size: 12px;
    }
    .main-header {
        padding: 0 14px;
        height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
        flex-wrap: wrap;
    }
    .header-search-wrap {
        order: 2;
        max-width: 100%;
        width: 100%;
    }
    .auth-card {
        width: 100%;
        padding: 24px 20px;
    }
    .mega-panel-right {
        display: none !important;
    }
    .catalog-drawer-left {
        width: 100%;
    }
}
