/* ==========================================================================
   DAPENTO DESIGN SYSTEM (Human-Crafted Aesthetic / Standalone / No Node Daemon)
   Palette: Deep Navy (#0F172A), Slate (#1E293B, #334155), Emerald (#059669),
            Amber (#D97706), Crimson (#E11D48), Canvas (#F8FAFC)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-canvas: #F8FAFC;
    --surface: #FFFFFF;
    --surface-hover: #F1F5F9;
    --navy-900: #0F172A;
    --navy-800: #1E293B;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748B;
    --slate-400: #94A3B8;
    --slate-200: #E2E8F0;
    --slate-100: #F1F5F9;
    --emerald-600: #059669;
    --emerald-500: #10B981;
    --emerald-50: #ECFDF5;
    --amber-600: #D97706;
    --amber-500: #F59E0B;
    --amber-50: #FFFBEB;
    --crimson-600: #E11D48;
    --crimson-500: #F43F5E;
    --crimson-50: #FFF1F2;
    --teal-600: #0D9488;
    --teal-50: #F0FDFA;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-canvas);
    color: var(--navy-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* Sidebar Desktop */
.sidebar {
    width: 260px;
    background-color: var(--navy-900);
    color: #F8FAFC;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #0D9488, #059669);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.brand-text h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #FFFFFF;
}

.brand-text p {
    font-size: 0.7rem;
    color: var(--slate-400);
    margin-top: -2px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--slate-400);
    padding: 0.75rem 0.75rem 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    color: #CBD5E1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.nav-item.active {
    background-color: #0D9488;
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Header Top Bar */
.topbar {
    background-color: var(--surface);
    height: 64px;
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--slate-700);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.store-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--slate-100);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
}

.store-switcher select {
    background: transparent;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-900);
    cursor: pointer;
    outline: none;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-700);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--slate-200);
    color: var(--navy-800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Page Content */
.content-body {
    flex: 1;
    padding: 1.5rem;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy-900);
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--slate-500);
    margin-top: 0.15rem;
}

/* Alert Banners */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background-color: var(--emerald-50);
    color: var(--emerald-600);
    border: 1px solid #A7F3D0;
}

.alert-error {
    background-color: var(--crimson-50);
    color: var(--crimson-600);
    border: 1px solid #FECDD3;
}

.alert-warning {
    background-color: var(--amber-50);
    color: var(--amber-600);
    border: 1px solid #FDE68A;
}

/* Metric Cards Grid */
.metrics-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metrics-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background-color: var(--surface);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.metric-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--slate-400);
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.metric-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate-500);
}

.metric-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.metric-icon.navy { background: #F1F5F9; color: var(--navy-800); }
.metric-icon.green { background: var(--emerald-50); color: var(--emerald-600); }
.metric-icon.amber { background: var(--amber-50); color: var(--amber-600); }
.metric-icon.red { background: var(--crimson-50); color: var(--crimson-600); }

.metric-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--navy-900);
    line-height: 1.2;
}

.metric-value.profit { color: var(--emerald-600); }
.metric-value.loss { color: var(--crimson-600); }

.metric-sub {
    font-size: 0.75rem;
    color: var(--slate-500);
    margin-top: 0.35rem;
}

/* Data Table Card */
.table-card {
    background-color: var(--surface);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.table-header-bar {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background-color: #FAFBFD;
}

.table-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy-900);
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.data-table th {
    background-color: #F8FAFC;
    color: var(--slate-600);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--slate-200);
    white-space: nowrap;
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--slate-100);
    color: var(--navy-900);
    vertical-align: middle;
}

.data-table tr:hover td {
    background-color: #F8FAFC;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success { background-color: var(--emerald-50); color: var(--emerald-600); border: 1px solid #A7F3D0; }
.badge-warning { background-color: var(--amber-50); color: var(--amber-600); border: 1px solid #FDE68A; }
.badge-danger { background-color: var(--crimson-50); color: var(--crimson-600); border: 1px solid #FECDD3; }
.badge-neutral { background-color: var(--slate-100); color: var(--slate-600); border: 1px solid var(--slate-200); }

/* Buttons & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--navy-900);
    color: #FFFFFF;
}
.btn-primary:hover {
    background-color: var(--navy-800);
}

.btn-teal {
    background-color: #0D9488;
    color: #FFFFFF;
}
.btn-teal:hover {
    background-color: #0F766E;
}

.btn-secondary {
    background-color: #FFFFFF;
    color: var(--slate-700);
    border-color: var(--slate-200);
}
.btn-secondary:hover {
    background-color: var(--slate-100);
}

.btn-danger {
    background-color: var(--crimson-50);
    color: var(--crimson-600);
    border-color: #FECDD3;
}
.btn-danger:hover {
    background-color: #FFE4E6;
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
}

.form-control {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--navy-900);
    background-color: #FFFFFF;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: #0D9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 0.35rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
    backdrop-filter: blur(2px);
}

.modal-overlay.open {
    display: flex;
}

.modal-card {
    background-color: #FFFFFF;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background-color: #F8FAFC;
    border-top: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Produk Belum Ada HPP (Red Highlight) */
.row-unpriced {
    background-color: #FFF1F2 !important;
}
.row-unpriced:hover td {
    background-color: #FFE4E6 !important;
}
.row-unpriced td:first-child {
    border-left: 4px solid #E11D48;
}

/* Mobile Sidebar Drawer & Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 39;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile & Tablet Responsive Rules */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 270px;
        z-index: 40;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open,
    .sidebar.mobile-open {
        left: 0 !important;
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    .top-header {
        padding: 0.75rem 1rem;
    }

    .content-body {
        padding: 1rem 0.85rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* 2 Kolom untuk Kartu Metrik di HP */
    .metrics-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .metrics-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .metric-card {
        padding: 0.85rem 0.75rem;
    }

    .metric-value {
        font-size: 1.15rem;
    }

    .metric-title {
        font-size: 0.68rem;
    }

    .metric-sub {
        font-size: 0.68rem;
    }

    .metric-icon {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }

    .settings-layout-grid {
        grid-template-columns: 1fr !important;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .modal-card {
        max-width: 95vw;
        margin: 0.5rem;
    }
}

/* === LANDING PAGE COMPONENT STYLES === */
body.landing-body {
    background-color: #0A0F1D;
    color: #F8FAFC;
    background-image: 
        radial-gradient(at 0% 0%, rgba(13, 148, 136, 0.15) 0, transparent 40%),
        radial-gradient(at 100% 0%, rgba(30, 41, 59, 0.4) 0, transparent 50%),
        radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.8) 0, transparent 80%);
    background-attachment: fixed;
}

.landing-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #FFFFFF;
}

.brand-mark {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #0D9488, #059669);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.35rem;
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4);
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: #FFFFFF;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.landing-nav a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.landing-nav a:hover {
    color: #2DD4BF;
}

.landing-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-section {
    padding: 5rem 0 4rem;
    text-align: center;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(13, 148, 136, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.3);
    color: #2DD4BF;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.75rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: #2DD4BF;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px #2DD4BF;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #94A3B8;
    max-width: 720px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.hero-preview-wrapper {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
}

.hero-preview-card {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    text-align: left;
}

.preview-header {
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preview-dots {
    display: flex;
    gap: 0.4rem;
}

.preview-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.preview-dots .dot.red { background-color: #EF4444; }
.preview-dots .dot.yellow { background-color: #F59E0B; }
.preview-dots .dot.green { background-color: #10B981; }

.preview-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94A3B8;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.preview-metric {
    background: #111827;
    padding: 1.5rem 1.25rem;
}

.preview-metric.highlight {
    background: rgba(13, 148, 136, 0.08);
    border-top: 2px solid #10B981;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.25s ease;
}

.feature-card:hover {
    border-color: rgba(45, 212, 191, 0.3);
    transform: translateY(-3px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(13, 148, 136, 0.15);
    color: #2DD4BF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.landing-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4rem 0 2rem;
    background: rgba(10, 15, 29, 0.95);
}

/* ==========================================================================
   ENHANCED POLISH & RESPONSIVENESS (Human-Crafted / Mobile-First Adaptability)
   ========================================================================== */

/* Brand & Logo */
.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.brand-custom-logo {
    max-height: 38px !important;
    max-width: 160px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Sidebar Logout Button Reset (Remove white background box) */
.btn-logout {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    color: #CBD5E1 !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-logout:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #EF4444 !important;
}

/* Sidebar Mobile Overlay & Close Button */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    margin-left: auto;
    border-radius: var(--radius-sm);
}

.sidebar-close-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

/* Pagination Clean Reset */
nav[role="navigation"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--slate-600);
}

nav[role="navigation"] > div:first-child {
    display: none !important;
}

nav[role="navigation"] > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.75rem;
}

nav[role="navigation"] svg {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
}

nav[role="navigation"] span, 
nav[role="navigation"] a {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: 1px solid var(--slate-200);
    background: var(--surface);
    color: var(--navy-900);
    font-weight: 500;
}

nav[role="navigation"] a:hover {
    background-color: var(--slate-100);
    border-color: var(--slate-300);
}

nav[role="navigation"] span[aria-current="page"] > span {
    background: var(--navy-900);
    color: #FFFFFF;
    border-color: var(--navy-900);
    font-weight: 700;
}

/* Tablet & Mobile Breakpoints */
@media (max-width: 992px) {
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border: 1px solid var(--slate-200);
        border-radius: var(--radius-sm);
        background: var(--surface);
        color: var(--slate-700);
        cursor: pointer;
        padding: 0;
        transition: var(--transition);
    }

    .mobile-menu-btn:hover {
        background: var(--slate-100);
        color: var(--navy-900);
    }

    .sidebar {
        position: fixed !important;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 270px;
        height: 100vh;
        z-index: 50;
        box-shadow: none;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.open {
        left: 0 !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar-overlay {
        display: block;
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-close-btn {
        display: block;
    }

    .main-wrapper {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .main-content {
        padding: 1.25rem !important;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 0 1rem;
        height: 56px;
    }

    .store-switcher select {
        max-width: 130px;
        text-overflow: ellipsis;
        font-size: 0.78rem;
    }

    .user-badge span:first-child {
        display: none;
    }

    .main-content {
        padding: 0.85rem !important;
    }

    .kpi-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .table-container {
        border-radius: var(--radius-sm);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    .page-header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .page-header-actions .btn {
        flex: 1;
        justify-content: center;
    }
}


