/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --theme-gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --theme-gradient-2: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --theme-gradient-3: linear-gradient(135deg, #10b981 0%, #6366f1 100%);
    --theme-gradient-4: linear-gradient(135deg, #f59e0b 0%, #6366f1 100%);
    --theme-gradient-5: linear-gradient(135deg, #ef4444 0%, #8b5cf6 100%);
    --theme-gradient-6: linear-gradient(135deg, #6366f1 0%, #10b981 100%);
    --theme-gradient-7: linear-gradient(135deg, #8b5cf6 0%, #f59e0b 100%);
    --theme-gradient-8: linear-gradient(135deg, #3b82f6 0%, #f5f7fa 100%);
    --theme-gradient-9: linear-gradient(135deg, #10b981 0%, #f59e0b 100%);
    --theme-gradient-10: linear-gradient(135deg, #6366f1 0%, #f5f7fa 100%);
    /* Extra Modern, Pastel, Unique, Attractive Gradients */
    --theme-mint-rose: linear-gradient(135deg, #b8f2e6 0%, #ffb6b9 100%);
    --theme-sky-lavender: linear-gradient(135deg, #a3bffa 0%, #c3bffa 100%);
    --theme-peach-cream: linear-gradient(135deg, #ffd6e0 0%, #fff5e1 100%);
    --theme-coral-teal: linear-gradient(135deg, #ffb6b9 0%, #b8f2e6 100%);
    --theme-lemon-mint: linear-gradient(135deg, #ffe066 0%, #b8f2e6 100%);
    --theme-blush-blue: linear-gradient(135deg, #c3bffa 0%, #a3bffa 100%);
    --theme-ice-cream: linear-gradient(135deg, #fff5e1 0%, #ffd6e0 100%);
    --theme-aurora: linear-gradient(135deg, #a3bffa 0%, #ffe066 100%);
    --theme-mango-mint: linear-gradient(135deg, #ffe066 0%, #b8f2e6 100%);
    --theme-pastel-rainbow: linear-gradient(90deg, #a3bffa 0%, #ffe066 33%, #b8f2e6 66%, #ffb6b9 100%);
    --theme-cotton-candy: linear-gradient(135deg, #ffb6b9 0%, #a3bffa 100%);
    --theme-lime-ice: linear-gradient(135deg, #b8f2e6 0%, #ffe066 100%);
    --theme-berry-bliss: linear-gradient(135deg, #c3bffa 0%, #ffb6b9 100%);
    --theme-sunset-peach: linear-gradient(135deg, #ffd6e0 0%, #ffe066 100%);
    --theme-mint-blue: linear-gradient(135deg, #b8f2e6 0%, #a3bffa 100%);
    --theme-rose-lavender: linear-gradient(135deg, #ffb6b9 0%, #c3bffa 100%);
    --theme-ice-lavender: linear-gradient(135deg, #fff5e1 0%, #c3bffa 100%);
    --theme-peach-mint: linear-gradient(135deg, #ffd6e0 0%, #b8f2e6 100%);
    --theme-lemon-rose: linear-gradient(135deg, #ffe066 0%, #ffb6b9 100%);
    --theme-blueberry-cream: linear-gradient(135deg, #a3bffa 0%, #fff5e1 100%);
    /* Extra Solid Colors (Modern, Attractive) */
    --theme-solid-1: #F9AFAE;
    /* Soft Coral */
    --theme-solid-2: #A3BFFA;
    /* Pastel Blue */
    --theme-solid-3: #B8F2E6;
    /* Mint Green */
    --theme-solid-4: #FFE066;
    /* Lemon Yellow */
    --theme-solid-5: #FFB6B9;
    /* Blush Pink */
    --theme-solid-6: #C3BFFA;
    /* Lavender */
    --theme-solid-7: #FFD6E0;
    /* Peach Cream */
    --theme-solid-8: #FFF5E1;
    /* Ice Cream */
    --theme-solid-9: #F7CAC9;
    /* Rose Quartz */
    --theme-solid-10: #92A8D1;
    /* Serenity Blue */
    --theme-solid-11: #B5EAD7;
    /* Aqua Mint */
    --theme-solid-12: #E2F0CB;
    /* Light Lime */
    --theme-solid-13: #FFDAC1;
    /* Apricot */
    --theme-solid-14: #E6E6FA;
    /* Lavender Mist */
    --theme-solid-15: #F6DFEB;
    /* Orchid Petal */
    --theme-solid-16: #D6EAF8;
    /* Sky Mist */
    --theme-solid-17: #FDEDEC;
    /* Pink Cloud */
    --theme-solid-18: #F5F5DC;
    /* Beige Soft */
    --theme-solid-19: #D1C4E9;
    /* Amethyst */
    --theme-solid-20: #FFF8DC;
    /* Cornsilk */
    /* Light Mode Colors */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-tertiary: #a0aec0;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Status Colors */
    --color-unpaid: #f59e0b;
    --color-to-ship: #3b82f6;
    --color-shipping: #8b5cf6;
    --color-completed: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;

    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
}

[data-theme="dark"] {
    /* Dark Mode Colors - Reference Match */
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2d2d2d;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-tertiary: #6c757d;
    --border-color: #2d2d2d;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   Sidebar Navigation
   ======================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 200px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: none;
}

/* Sidebar is always expanded; disable hover expansion */
.sidebar:hover,
.sidebar.expanded {
    width: 200px;
}

.sidebar-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    min-height: 70px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo i {
    font-size: 24px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 1;
    transition: none;
}

/* Always show title */
.sidebar:hover .sidebar-title,
.sidebar.expanded .sidebar-title {
    opacity: 1;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    margin: 0 8px;
    border-radius: 8px;
}

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    white-space: nowrap;
    opacity: 1;
    transition: none;
}

/* Always show nav text */
.sidebar:hover .nav-text,
.sidebar.expanded .nav-text {
    opacity: 1;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.nav-item.active i {
    color: white;
}

.nav-badge {
    position: absolute;
    right: 12px;
    background: var(--color-error);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    opacity: 1;
    transition: none;
}

/* Always show badges */
.sidebar:hover .nav-badge,
.sidebar.expanded .nav-badge {
    opacity: 1;
}

.nav-badge:empty,
.nav-badge[data-count="0"] {
    display: none;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-version {
    font-size: 11px;
    color: var(--text-tertiary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar:hover .sidebar-version,
.sidebar.expanded .sidebar-version {
    opacity: 1;
}

/* Main Content Wrapper */
.main-wrapper {
    margin-left: 200px;
    transition: none;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

#dashboardView .container {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

#dashboardView {
    height: 100vh;
    overflow: hidden;
}

@media (max-width: 1200px) {
    #dashboardView {
        height: auto;
        overflow: visible;
    }

    #dashboardView .container {
        height: auto;
        overflow: visible;
    }
}

/* Header Styles */
.header {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 32px;
    color: var(--accent-primary);
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

#dashboardView .header {
    padding: 14px 16px;
    margin-bottom: 16px;
}

#dashboardView .header-content {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

#dashboardView .logo {
    gap: 10px;
}

#dashboardView .logo i {
    font-size: 26px;
}

#dashboardView .logo h1 {
    font-size: 20px;
}

#dashboardView .header-controls {
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
    row-gap: 8px;
    gap: 12px;
}

#dashboardView .theme-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}

#dashboardView .theme-selector label {
    font-size: 12px !important;
    line-height: 1;
    margin-right: 0 !important;
}

#dashboardView #themeSelect {
    padding: 4px 8px;
    font-size: 12px;
    height: 30px;
    border-radius: 10px;
    width: 160px;
    max-width: 40vw;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: var(--text-primary);
    outline: none;
}

#dashboardView #themeSelect option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] #dashboardView #themeSelect {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #dashboardView #themeSelect option {
    background: #1e1e1e;
    color: #f8f9fa;
}

#dashboardView .refresh-label {
    font-size: 12px;
}

#dashboardView .switch {
    width: 42px;
    height: 20px;
}

#dashboardView .slider:before {
    height: 14px;
    width: 14px;
}

#dashboardView input:checked+.slider:before {
    transform: translateX(22px);
}

#dashboardView .control-group {
    flex-wrap: wrap;
    gap: 10px;
}

#dashboardView .action-group {
    flex-wrap: wrap;
    gap: 8px;
}

#dashboardView .btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 14px;
}

#dashboardView .financial-section .summary-card.iklan-card {
    border: 1px solid rgba(239, 68, 68, 0.28) !important;
    border-left: 3px solid #ef4444 !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.03)) !important;
}

#dashboardView #iklanCostCard {
    border: 1px solid rgba(239, 68, 68, 0.28) !important;
    border-left: 3px solid #ef4444 !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.03)) !important;
}

@media (max-width: 900px) {
    #dashboardView .header-controls {
        width: 100%;
        justify-content: flex-start;
    }

    #dashboardView #themeSelect {
        width: 200px;
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    #dashboardView .theme-selector label {
        display: none;
    }

    #dashboardView #themeSelect {
        width: 100%;
    }

    #dashboardView .btn-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
}

.refresh-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-refresh {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-refresh i {
    transition: transform 0.3s ease;
}

.btn-refresh:active i {
    transform: rotate(180deg);
}

.btn-add {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-settings {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.btn-settings:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.theme-toggle {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.last-update {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent-primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Control and Action Groups */
.control-group {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.btn-icon.btn-sync-toko {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: white;
}

.btn-icon.btn-sync-toko:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.btn-icon.btn-update-omset {
    background: linear-gradient(135deg, var(--color-success), #10b981);
    border-color: var(--color-success);
    color: white;
}

.btn-icon.btn-update-omset:hover {
    background: linear-gradient(135deg, #10b981, var(--color-success));
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* Summary Section */
.summary-section {
    background: radial-gradient(1200px 240px at -10% -20%, rgba(99, 102, 241, 0.15), transparent 60%), radial-gradient(900px 200px at 110% -30%, rgba(16, 185, 129, 0.18), transparent 60%), var(--bg-secondary);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
    border: 1px solid rgba(148, 163, 184, 0.2);
    position: relative;
    overflow: hidden;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label i {
    color: var(--accent-primary);
}

.summary-grid {
    display: grid;
    gap: 18px;
}

.financial-grid {
    grid-template-columns: repeat(4, 1fr);
}

.order-grid {
    grid-template-columns: repeat(6, 1fr);
}

.valid-sales-grid {
    grid-template-columns: repeat(3, 1fr);
}

.shipping-grid {
    grid-template-columns: repeat(4, 1fr);
}

#dashboardView .financial-section,
#dashboardView .valid-sales-section {
    padding: 10px;
    border-radius: 14px;
}

#dashboardView .financial-section .section-label,
#dashboardView .valid-sales-section .section-label {
    font-size: 12px;
    margin-bottom: 10px;
}

#dashboardView .financial-section .summary-grid,
#dashboardView .valid-sales-section .summary-grid {
    gap: 10px;
}

#dashboardView .financial-section .summary-card,
#dashboardView .valid-sales-section .summary-card {
    padding: 10px 12px;
    border-radius: 12px;
    gap: 8px;
    align-items: flex-start;
}

#dashboardView .financial-section .summary-icon,
#dashboardView .valid-sales-section .summary-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    border-radius: 10px;
    margin-top: 2px;
}

#dashboardView .financial-section .summary-value,
#dashboardView .valid-sales-section .summary-value {
    font-size: 20px;
    margin-bottom: 2px;
}

#dashboardView .financial-section .omset-value,
#dashboardView .financial-section .omset-bersih-value,
#dashboardView .financial-section .keuntungan-value,
#dashboardView .financial-section .ad-card .summary-value {
    font-size: 16px !important;
}

#dashboardView .financial-section .summary-label,
#dashboardView .valid-sales-section .summary-label {
    font-size: 11px;
}

#dashboardView .financial-section .summary-comparison {
    font-size: 10px;
    margin-top: 3px;
    gap: 4px;
}

.shop-ranking-section,
.sku-section {
    margin-top: 10px;
}

#dashboardView .dash-right .sku-section {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

#dashboardView .dash-right .sku-section .ranking-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: clamp(240px, 42vh, 460px);
}

#dashboardView .dash-right {
    gap: 16px;
}

#dashboardView .dash-right>.sku-section {
    margin-top: 0;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.35);
    position: relative;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
}

#dashboardView .dash-right>.sku-section .section-header {
    margin-bottom: 12px;
}

#dashboardView .dash-right>.sku-section .section-title {
    font-size: 15px;
    margin-bottom: 0;
    gap: 10px;
}

#dashboardView .dash-right>.sku-section .ranking-table-wrap {
    margin-top: 10px;
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

#dashboardView .dash-right>.order-section {
    flex: 0 0 auto;
    height: clamp(320px, 36vh, 420px);
}

@media (max-width: 1200px) {
    #dashboardView .dash-right>.order-section {
        height: auto;
    }

    #dashboardView .dash-right>.sku-section {
        min-height: auto;
    }
}

#dashboardView .dash-right>.order-section {
    padding: 12px;
}

#dashboardView .dash-right>.order-section .section-label {
    margin-bottom: 10px;
    font-size: 12px;
}

#dashboardView .dash-right .order-grid {
    position: relative;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 10px 8px 8px;
    align-items: stretch;
    align-content: center;
}

#dashboardView .dash-right .order-section .mini-card {
    padding: 10px 10px 9px;
    gap: 6px;
}

#dashboardView .dash-right .order-grid::before,
#dashboardView .dash-right .order-grid::after {
    content: '';
    position: absolute;
    pointer-events: none;
    opacity: 0.55;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.55));
    border-radius: 999px;
    animation: orderGridPulse 3.2s ease-in-out infinite;
}

#dashboardView .dash-right .order-grid::before {
    left: 50%;
    top: 14px;
    bottom: 14px;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, transparent, rgba(0, 245, 212, 0.7), rgba(99, 102, 241, 0.6), transparent);
}

#dashboardView .dash-right .order-grid::after {
    top: 50%;
    left: 14px;
    right: 14px;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.75), rgba(0, 245, 212, 0.65), transparent);
}

@keyframes orderGridPulse {

    0%,
    100% {
        opacity: 0.35;
    }

    50% {
        opacity: 0.7;
    }
}

#dashboardView .dash-right .order-grid .mini-card {
    min-height: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#dashboardView .dash-right .order-grid .mini-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

#dashboardView .dash-right .order-grid .mini-card:nth-child(2) {
    grid-column: 3;
    grid-row: 1;
}

#dashboardView .dash-right .order-grid .mini-card:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
}

#dashboardView .dash-right .order-grid .mini-card:nth-child(4) {
    grid-column: 3;
    grid-row: 3;
}

#dashboardView .dash-right .order-grid .mini-card:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
    z-index: 2;
    transform: translateZ(0) scale(1.02);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25), 0 18px 34px rgba(15, 23, 42, 0.55);
    border-color: rgba(0, 245, 212, 0.22);
}

#dashboardView .dash-right .order-grid .mini-card:nth-child(5) .summary-icon {
    animation: orderCenterGlow 2.6s ease-in-out infinite;
}

#dashboardView .dash-right .order-grid .mini-card .summary-icon {
    margin: 0;
}

#dashboardView .dash-right .order-grid .mini-card .summary-content {
    width: 100%;
    text-align: center;
}

#dashboardView .dash-right .order-grid .mini-card .summary-value,
#dashboardView .dash-right .order-grid .mini-card .summary-label {
    width: 100%;
    text-align: center;
}

@keyframes orderCenterGlow {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 245, 212, 0));
    }

    50% {
        transform: scale(1.06);
        filter: drop-shadow(0 0 12px rgba(0, 245, 212, 0.55));
    }
}

@media (max-width: 640px) {
    #dashboardView .dash-right .order-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        padding: 0;
    }

    #dashboardView .dash-right .order-grid::before,
    #dashboardView .dash-right .order-grid::after {
        display: none;
    }

    #dashboardView .dash-right .order-grid .mini-card {
        grid-column: auto;
        grid-row: auto;
        transform: none;
    }
}

#dashboardView .dash-right .order-section .mini-card .summary-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
}

#dashboardView .dash-right .order-section .mini-card .summary-value {
    font-size: 18px !important;
    margin-bottom: 2px;
}

#dashboardView .dash-right .order-section .mini-card .summary-label {
    font-size: 10px;
}

#dashboardView .dash-right>.sku-section .ranking-table-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#dashboardView .dash-right>.sku-section .ranking-table-wrap::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.45);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

#dashboardView .dash-right>.sku-section .ranking-table-wrap::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 245, 212, 0.85), rgba(245, 158, 11, 0.75));
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.65);
}

#dashboardView .dash-right>.sku-section .ranking-table-wrap::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.9), rgba(0, 245, 212, 0.85));
}

#dashboardView .dash-right>.sku-section .ranking-table-wrap {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 245, 212, 0.9) rgba(15, 23, 42, 0.45);
}

.sku-table {
    table-layout: fixed;
}

.sku-table th,
.sku-table td {
    padding: 8px 10px;
}

.sku-table th:nth-child(1),
.sku-table td:nth-child(1) {
    width: 48px;
}

.sku-table th:nth-child(3),
.sku-table td:nth-child(3) {
    width: 68px;
}

.sku-table th:nth-child(4),
.sku-table td:nth-child(4) {
    width: 110px;
}

.sku-table td:nth-child(2) {
    white-space: normal;
}

.sku-text {
    max-width: 100%;
}

.sku-text-sku {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sku-text-variant {
    max-width: 100%;
}

.ranking-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ranking-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-secondary);
}

.ranking-filter input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 12px;
    min-width: 180px;
}

.ranking-select {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 12px;
}

.ranking-table-wrap {
    margin-top: 12px;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.6);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ranking-table th,
.ranking-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    text-align: left;
    white-space: nowrap;
}

.ranking-table.sku-table th,
.ranking-table.sku-table td {
    padding: 7px 8px;
    font-size: 11px;
}

.ranking-table.sku-table td:nth-child(2) {
    padding-left: 6px;
    padding-right: 6px;
}

.sku-thumb {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.6);
    display: inline-block;
}

.sku-thumb-empty {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
    font-size: 12px;
}

.sku-main-cell {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.sku-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sku-text-sku {
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    line-height: 1.15;
}

.sku-text-variant {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.15;
}

.sku-hover-card {
    position: fixed;
    left: 0;
    top: 0;
    width: min(640px, calc(100vw - 24px));
    background:
        radial-gradient(320px 180px at 25% 20%, rgba(0, 245, 212, 0.18), transparent 60%),
        radial-gradient(320px 180px at 85% 30%, rgba(245, 158, 11, 0.12), transparent 60%),
        rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(0, 245, 212, 0.22);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), 0 0 30px rgba(0, 245, 212, 0.10);
    padding: 14px;
    opacity: 0;
    transform: translate3d(0, 4px, 0) scale(0.98);
    transition: opacity 0.12s ease, transform 0.12s ease;
    pointer-events: none;
    z-index: 9999;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.sku-hover-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00f5d4, #f59e0b, #7c3aed, #00f5d4);
    background-size: 200% 200%;
    animation: neonFlow 3s linear infinite;
    opacity: 0.95;
}

.sku-hover-card::after {
    content: '';
    position: absolute;
    inset: -60px;
    background:
        radial-gradient(380px 220px at 20% 20%, rgba(0, 245, 212, 0.18), transparent 60%),
        radial-gradient(420px 240px at 85% 35%, rgba(245, 158, 11, 0.14), transparent 60%),
        radial-gradient(420px 240px at 60% 90%, rgba(124, 58, 237, 0.14), transparent 65%);
    filter: blur(18px);
    opacity: 0.55;
    pointer-events: none;
}

.sku-hover-card.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.sku-hover-card-inner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.sku-hover-thumb {
    width: 168px;
    height: 168px;
    border-radius: 16px;
    overflow: hidden;
    flex: 0 0 auto;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.sku-hover-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sku-hover-thumb-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.5);
}

.sku-hover-meta {
    min-width: 0;
    flex: 1 1 auto;
}

.sku-hover-sku {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sku-hover-variant {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sku-hover-stats {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.sku-hover-stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.sku-hover-stat-label {
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.sku-hover-stat-value {
    margin-top: 2px;
    font-size: 16px;
    font-weight: 900;
    color: #e0f2fe;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-table th {
    background: rgba(15, 23, 42, 0.8);
    font-weight: 700;
    color: #cbd5f5;
    position: sticky;
    top: 0;
    z-index: 1;
}

.ranking-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.08);
}

.ranking-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.18);
    color: #c7d2fe;
    font-weight: 700;
    font-size: 11px;
}

.trend-section {
    margin-top: 10px;
}

#dashboardView .trend-section {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    overflow: visible;
}

#dashboardView .trend-section::after {
    display: none;
}

#dashboardView .trend-section .section-label {
    margin-bottom: 12px;
}

#dashboardView .trend-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.trend-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 14px;
    min-height: 180px;
}

#dashboardView .trend-card {
    display: flex;
    flex-direction: column;
}

.trend-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 700;
    color: #cbd5f5;
}

.trend-subtitle {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.trend-body {
    margin-top: 12px;
    min-height: 120px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(148, 163, 184, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

#dashboardView .trend-section .trend-body {
    flex: 1 1 auto;
    min-height: 220px;
    background: transparent;
    border: none;
}

.trend-empty {
    font-size: 12px;
    color: var(--text-tertiary);
}

.dash-bar-chart {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 10px 6px 10px;
}

.dash-bar {
    flex: 1;
    min-width: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dash-bar-fill {
    width: 100%;
    height: 130px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.dash-bar-fill::before {
    content: '';
    display: block;
    width: 100%;
    height: calc(var(--h) * 1%);
    border-radius: 10px 10px 6px 6px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.95), rgba(34, 197, 94, 0.85));
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28);
}

.dash-bar-label {
    font-size: 10px;
    color: var(--text-tertiary);
    font-weight: 700;
}

.dash-compare-chart {
    width: 100%;
    height: 180px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 10px 10px 6px 10px;
}

.dash-compare-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.dash-compare-bar {
    width: 100%;
    height: 130px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: flex-end;
    padding: 10px;
}

.dash-compare-bar span {
    display: block;
    width: 100%;
    height: calc(var(--h) * 1%);
    border-radius: 10px 10px 6px 6px;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.95), rgba(239, 68, 68, 0.85));
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28);
}

.dash-compare-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 800;
}

.dashboard-bigseller-grid {
    display: grid;
    grid-template-columns: clamp(260px, 22vw, 320px) minmax(0, 1fr) clamp(280px, 26vw, 360px);
    gap: 16px;
    align-items: stretch;
}

#dashboardView .dashboard-bigseller-grid {
    flex: 1 1 auto;
    min-height: 0;
}

.dash-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    min-height: 0;
}

.dash-left,
.dash-center,
.dash-right {
    min-width: 0;
    min-height: 0;
}

#dashboardView .dash-center {
    min-height: 0;
}

#dashboardView .dash-center {
    overflow: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 245, 212, 0.7) rgba(15, 23, 42, 0.35);
}

#dashboardView .dash-center::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#dashboardView .dash-center::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.35);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

#dashboardView .dash-center::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 245, 212, 0.85), rgba(245, 158, 11, 0.75));
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.65);
}

#dashboardView .dash-center::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.9), rgba(0, 245, 212, 0.85));
}

#dashboardView .dash-center>* {
    flex-shrink: 0;
}

#dashboardView .dash-center .trend-section {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#dashboardView .dash-center .trend-section .trend-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#dashboardView .dash-center .trend-section .trend-card {
    flex: 1 1 auto;
    min-height: 0;
}

.dash-left .summary-section,
.dash-right .summary-section,
.dash-center .summary-section,
.dash-left .accounts-section,
.dash-right .accounts-section {
    margin-bottom: 0;
}

.dash-panel-top {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.35);
}

.dash-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.dash-tab {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.dash-tab.active {
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.6);
    background: rgba(99, 102, 241, 0.16);
}

.dash-left-body {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 22px 14px 14px 14px;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
}

.shop-donut {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: 50%;
    background:
        conic-gradient(#22c55e calc(var(--p) * 1%), rgba(148, 163, 184, 0.18) 0);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
}

.shop-donut::before {
    content: '';
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.shop-donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 10px;
}

.shop-donut-value {
    font-weight: 900;
    font-size: 34px;
    letter-spacing: -0.6px;
    color: #e0f2fe;
}

.shop-donut-label {
    font-size: 12px;
    font-weight: 800;
    color: #c7d2fe;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-donut-sub {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

@media (max-width: 1400px) {
    .dashboard-bigseller-grid {
        grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    }

    .dash-right {
        grid-column: 1 / -1;
    }
}

#dashboardView .shop-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding-right: 6px;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 245, 212, 0.85) rgba(15, 23, 42, 0.45);
}

.shop-ranking-list::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.shop-ranking-list::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.45);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.shop-ranking-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 245, 212, 0.85), rgba(245, 158, 11, 0.75));
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.65);
}

.shop-ranking-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.9), rgba(0, 245, 212, 0.85));
}

.shop-rank-item {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.shop-rank-item:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.06);
}

.shop-rank-item.active {
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.08);
}

.shop-rank-no {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.18);
    color: #c7d2fe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}

.shop-rank-main {
    min-width: 0;
}

.shop-rank-name {
    font-weight: 800;
    font-size: 12px;
    color: #e5e7eb;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-rank-sub {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

.shop-rank-bar {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
    min-width: 90px;
}

.shop-rank-bar>span {
    display: block;
    height: 6px;
    width: calc(var(--w) * 1%);
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.9), rgba(59, 130, 246, 0.9));
    border-radius: 999px;
}

.shop-rank-right {
    font-weight: 900;
    font-size: 12px;
    color: #e0f2fe;
}

@media (max-width: 1200px) {
    .dashboard-bigseller-grid {
        grid-template-columns: 1fr;
    }

    .dash-right {
        grid-column: auto;
    }

    .shop-donut {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 1200px) {
    .financial-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .order-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .valid-sales-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .shipping-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trend-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 0;
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        width: 200px;
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .financial-grid {
        grid-template-columns: 1fr;
    }

    .order-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .valid-sales-grid {
        grid-template-columns: 1fr;
    }

    .shipping-grid {
        grid-template-columns: 1fr;
    }

    .ranking-filter input {
        min-width: 120px;
    }


    .control-group {
        display: none;
    }

    .action-group {
        gap: 4px;
    }
}

.summary-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.6));
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.35);
    position: relative;
    overflow: hidden;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.45);
    border-color: rgba(99, 102, 241, 0.5);
}

.mini-card {
    padding: 14px;
}

.mini-card .summary-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.mini-card .summary-value {
    font-size: 18px !important;
}

.mini-card .summary-label {
    font-size: 11px;
}

.action-card {
    cursor: pointer;
    border: 2px dashed var(--accent-primary);
    background: transparent;
}

.action-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-style: solid;
}

.highlight-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(124, 58, 237, 0.1)) !important;
    border: 2px solid rgba(139, 92, 246, 0.4) !important;
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
}

.summary-icon.unpaid {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.summary-icon.to-ship {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.summary-icon.shipping {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.summary-icon.completed {
    background: linear-gradient(135deg, #10b981, #059669);
}

.summary-icon.omset {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.summary-icon.omset-bersih {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.summary-icon.keuntungan {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.omset-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05)) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.omset-bersih-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.05)) !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.keuntungan-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05)) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
}

.ad-card {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(192, 57, 43, 0.05)) !important;
    border: 1px solid rgba(231, 76, 60, 0.3) !important;
}

.ad-card .summary-value {
    color: #e74c3c;
    font-size: 22px !important;
}

.omset-value {
    color: #f59e0b;
    font-size: 22px !important;
}

.omset-bersih-value {
    color: #22c55e;
    font-size: 22px !important;
}

.keuntungan-value {
    color: #8b5cf6;
    font-size: 22px !important;
}

.summary-content {
    flex: 1;
    min-width: 0;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-actions {
    display: flex;
    gap: 8px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.summary-value {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.summary-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* Comparison with yesterday */
.summary-comparison {
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.comparison-yesterday {
    color: var(--text-muted);
}

.comparison-change {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.comparison-change.positive {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.comparison-change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.comparison-change.neutral {
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.1);
}

/* Accounts Section */
.accounts-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--accent-primary);
}

.account-count {
    font-size: 14px;
    color: var(--text-tertiary);
    font-weight: 400;
    margin-left: auto;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Horizontal Account List - Dashboard Overview */
.accounts-list-horizontal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-row {
    display: flex;
    align-items: stretch;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.account-row:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow);
}

.account-row-header {
    min-width: 160px;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.account-row-header .account-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.account-row-header .account-shop-id {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.account-row-header .account-status-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: fit-content;
}

.account-row-header .account-status-badge.error {
    background: rgba(239, 68, 68, 0.8);
}

.account-row-stats {
    display: flex;
    flex: 1;
    padding: 12px 16px;
    gap: 16px;
    align-items: center;
    overflow-x: auto;
}

.account-row-stats::-webkit-scrollbar {
    height: 4px;
}

.account-row-stats::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-box.highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-box.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
    border-color: rgba(245, 158, 11, 0.3);
}

.stat-box .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-box.highlight .stat-value {
    color: #3b82f6;
}

.stat-box.warning .stat-value {
    color: #f59e0b;
}

.stat-box .stat-label {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 4px;
    text-align: center;
}

.account-row-omset {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    min-width: 200px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(139, 92, 246, 0.05));
    border-left: 1px solid var(--border-color);
}

.omset-mini-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.omset-mini-row i {
    width: 14px;
    font-size: 11px;
}

.omset-mini-row.omset i {
    color: #f59e0b;
}

.omset-mini-row.bersih i {
    color: #22c55e;
}

.omset-mini-row.ad-cost i {
    color: #e74c3c;
}

.omset-mini-row.keuntungan i {
    color: #8b5cf6;
}

.omset-mini-row .omset-label {
    color: var(--text-tertiary);
    font-size: 10px;
    min-width: 45px;
}

.omset-mini-row .omset-value {
    font-weight: 600;
    color: var(--text-primary);
}

.omset-mini-row.omset .omset-value {
    color: #f59e0b;
}

.omset-mini-row.bersih .omset-value {
    color: #22c55e;
}

.omset-mini-row.ad-cost .omset-value {
    color: #e74c3c;
}

.omset-mini-row.keuntungan .omset-value {
    color: #8b5cf6;
}

.account-row-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border-left: 1px solid var(--border-color);
}

.account-row-actions .btn-small {
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.account-row-actions .btn-edit {
    background: var(--accent-primary);
    color: white;
}

.account-row-actions .btn-edit:hover {
    background: var(--accent-secondary);
}

.account-row-actions .btn-danger {
    background: transparent;
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

.account-row-actions .btn-danger:hover {
    background: var(--color-error);
    color: white;
}

/* Account Row Error State */
.account-row.error .account-row-header {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.account-row.error .account-row-stats {
    justify-content: center;
}

.account-row-error-message {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-error);
    font-size: 13px;
}

.account-row-error-message i {
    font-size: 24px;
}

@media (max-width: 900px) {
    .account-row {
        flex-direction: column;
    }

    .account-row-header {
        min-width: auto;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .account-row-stats {
        flex-wrap: wrap;
    }

    .account-row-omset {
        flex-direction: row;
        flex-wrap: wrap;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }

    .account-row-actions {
        flex-direction: row;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
}

/* Account Card */
.account-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.account-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow);
}

.account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.account-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.account-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.account-status.success {
    background: #d1fae5;
    color: #065f46;
}

[data-theme="dark"] .account-status.success {
    background: #064e3b;
    color: #6ee7b7;
}

.account-status.error {
    background: #fee2e2;
    color: #991b1b;
}

[data-theme="dark"] .account-status.error {
    background: #7f1d1d;
    color: #fca5a5;
}

.account-shop-id {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-label i {
    font-size: 12px;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
}

.stat-value.highlight {
    color: var(--color-to-ship);
}

.stat-value.warning {
    color: var(--color-warning);
}

.account-omset {
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.omset-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.omset-row i {
    color: #f59e0b;
    font-size: 14px;
    width: 18px;
}

.omset-row.bersih i {
    color: #22c55e;
}

.omset-row.keuntungan i {
    color: #8b5cf6;
}

.omset-row.ad-cost i {
    color: #e74c3c;
}

.omset-row.keuntungan-after-ads i {
    color: #f39c12;
}

.omset-label {
    color: var(--text-secondary);
    font-size: 12px;
    min-width: 45px;
}

.omset-amount {
    color: #f59e0b;
    font-weight: 700;
    font-size: 15px;
}

.omset-bersih-amount {
    color: #22c55e;
    font-weight: 700;
    font-size: 15px;
}

.keuntungan-amount {
    color: #8b5cf6;
    font-weight: 700;
    font-size: 15px;
}

.omset-orders {
    color: var(--text-tertiary);
    font-size: 11px;
    margin-left: auto;
}

.account-timestamp {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Error Message */
.error-message {
    background: var(--color-error);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-message i {
    font-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }

    .summary-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .accounts-grid {
        grid-template-columns: 1fr;
    }

    .logo h1 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .summary-section {
        grid-template-columns: 1fr;
    }

    .account-stats {
        grid-template-columns: 1fr;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h3 i {
    color: var(--accent-primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--color-error);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group label .required {
    color: var(--color-error);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input:read-only {
    background: var(--bg-primary);
    cursor: not-allowed;
}

.form-group select,
.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.form-group select:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.settings-section h4 {
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-section h4 i {
    color: var(--accent-primary);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.form-row .form-group {
    margin-bottom: 15px;
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn select {
    flex: 1;
}

.input-with-btn .btn-sm {
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.input-with-btn .btn-sm:hover {
    background: var(--accent-primary);
    color: white;
}

.help-text {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 6px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.settings-preview {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.settings-preview p {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.settings-preview ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
}

.settings-preview li strong {
    color: #8b5cf6;
}

.time-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    text-align: center;
    letter-spacing: 1px;
    font-weight: 500;
}

.time-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.time-input::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: normal;
}

.btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
}

/* Edit Button on Account Card */
.account-edit-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.account-edit-btn:hover {
    background: var(--accent-secondary);
    transform: scale(1.05);
}

.account-edit-btn i {
    font-size: 11px;
}

.needs-config-badge {
    background: var(--color-warning);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* No Accounts State */
.no-accounts {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-accounts i {
    font-size: 64px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.no-accounts h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-accounts p {
    font-size: 14px;
}

/* Textarea Styles */
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    font-family: monospace;
    resize: vertical;
    transition: all 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Delete Button */
.btn-danger {
    background: var(--color-error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.delete-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    color: var(--color-error);
    margin-bottom: 12px;
}

.delete-warning i {
    font-size: 24px;
}

.delete-info {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Modal Large */
.modal-large {
    max-width: 600px;
}

/* Order List Modal */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.order-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.order-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.order-account {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.order-account i {
    color: var(--accent-primary);
}

.order-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.status-perlu-dikirim {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-selesai {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-dibatalkan {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.order-id {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.order-id i {
    color: var(--color-warning);
}

.order-buyer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.order-buyer i {
    color: var(--text-tertiary);
}

.order-items {
    margin-bottom: 12px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
}

.order-item:last-child {
    border-bottom: none;
}

.item-name {
    flex: 1;
}

.variation-thumbnail {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid var(--border-color);
}

.product-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.variation {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
}

.item-quantity {
    font-weight: 600;
    color: var(--color-warning);
    min-width: 40px;
    text-align: right;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.order-price,
.order-shipping,
.order-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-tertiary);
}

.order-price i {
    color: var(--color-unpaid);
}

.order-shipping i {
    color: var(--color-shipping);
}

.order-time i {
    color: var(--text-tertiary);
}

.loading-orders,
.error-orders,
.no-orders {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.loading-orders i,
.error-orders i,
.no-orders i {
    font-size: 36px;
    margin-bottom: 16px;
    color: var(--text-tertiary);
}

/* Responsive */
@media (max-width: 768px) {
    .orders-grid {
        grid-template-columns: 1fr;
        max-height: 70vh;
    }

    .order-card {
        padding: 12px;
    }

    .order-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* Account Card Actions */
.account-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.btn-update {
    background: var(--accent-primary);
    color: white;
}

.btn-update:hover {
    background: var(--accent-secondary);
}

.btn-delete {
    background: transparent;
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

.btn-delete:hover {
    background: var(--color-error);
    color: white;
}

/* ========================================
   BigSeller-Style Order Management
   ======================================== */

.modal-fullscreen {
    width: 98%;
    max-width: 1600px;
    height: 95vh;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.order-modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 16px 24px;
    border-radius: 16px 16px 0 0;
}

.order-modal-header h3 {
    color: white;
}

.order-modal-header .modal-close {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.order-modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.order-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

/* Filter Section */
.order-filters {
    background: var(--bg-tertiary);
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-group label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-group label i {
    font-size: 9px;
    color: var(--accent-primary);
}

.filter-select,
.filter-input {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 12px;
    min-width: 120px;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.filter-input {
    min-width: 200px;
}

.btn-filter-apply,
.btn-filter-reset {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-filter-apply {
    background: var(--accent-primary);
    color: white;
    border: none;
}

.btn-filter-apply:hover {
    background: var(--accent-secondary);
}

.btn-filter-reset {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-filter-reset:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Order Tabs */
.order-tabs-container {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.order-tabs-group-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.order-tabs-group-title i {
    font-size: 11px;
}

.btn-check-new-instant,
.btn-check-new-kilat {
    margin-left: auto;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-check-new-instant:hover,
.btn-check-new-kilat:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-check-new-instant:active,
.btn-check-new-kilat:active {
    transform: translateY(0);
}

.btn-check-new-instant i,
.btn-check-new-kilat i {
    font-size: 8px;
}

.btn-check-new-instant.loading,
.btn-check-new-kilat.loading {
    opacity: 0.7;
    cursor: wait;
}

.btn-check-new-instant.loading i,
.btn-check-new-kilat.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.order-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 0 5px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.order-tabs::-webkit-scrollbar {
    height: 4px;
}

.order-tabs::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.order-tab {
    padding: 6px 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 3px;
    position: relative;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.order-tab:hover {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.order-tab.active {
    color: var(--accent-primary);
    font-weight: 600;
}

.order-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
}

.tab-count {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.order-tab.active .tab-count {
    background: var(--accent-primary);
    color: white;
}

/* Order Actions */
.order-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.action-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.checkbox-all input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.selected-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.action-right {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    border: none;
}

.btn-refresh-orders {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-refresh-orders:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-bulk-refresh {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-bulk-refresh:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.btn-bulk-refresh:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-action.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-action.loading i {
    animation: spin 1s linear infinite;
}

.btn-bulk-print {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-bulk-print:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.btn-bulk-print:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Order Table */
.order-table-container {
    flex: 1;
    overflow: auto;
    background: var(--bg-secondary);
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.order-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.order-table th {
    background: var(--bg-tertiary);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.order-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.order-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

.col-check {
    width: 40px;
    text-align: center;
}

.col-product {
    min-width: 280px;
}

.col-total {
    min-width: 120px;
}

.col-buyer {
    min-width: 180px;
}

.col-checkbox {
    min-width: 40px;
    text-align: center;
}

.col-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #10b981;
}

.col-order {
    min-width: 150px;
}

.col-time {
    min-width: 100px;
}

.col-shipping {
    min-width: 140px;
}

.col-status {
    min-width: 100px;
}

/* Product Cell - Single Item */
.product-cell {
    display: flex;
    gap: 12px;
}

/* Product Cell - Multiple Items */
.product-cell-multi {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.product-item-additional {
    background: var(--bg-secondary);
}

.product-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-tertiary);
}

.product-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    font-size: 16px;
}

.product-detail {
    flex: 1;
    min-width: 0;
}

.product-detail .product-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-detail .product-variant {
    font-size: 10px;
    color: var(--accent-primary);
    margin-bottom: 1px;
}

.product-detail .product-sku {
    font-size: 9px;
    color: var(--text-tertiary);
    font-family: monospace;
}

.product-detail .product-qty {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-warning);
    margin-top: 2px;
}

.product-summary {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 4px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.product-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.product-info {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-variant {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.product-sku {
    font-size: 10px;
    color: var(--text-tertiary);
}

.product-qty {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-top: 4px;
}

/* Total Cell */
.total-cell .price {
    font-weight: 600;
    color: var(--color-warning);
    font-size: 14px;
}

.total-cell .payment-method {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.payment-cod {
    color: #22c55e;
    font-weight: 600;
}

/* Buyer Cell */
.buyer-cell .buyer-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.buyer-cell .buyer-location {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.buyer-cell .buyer-location i {
    margin-top: 2px;
    color: var(--accent-primary);
}

/* Order Cell */
.order-cell .order-sn {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.order-cell .account-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 10px;
    color: var(--text-secondary);
}

.order-cell .account-badge i {
    color: var(--accent-primary);
}

/* Time Cell */
.time-cell {
    font-size: 12px;
    color: var(--text-secondary);
}

.time-cell .date {
    font-weight: 500;
    color: var(--text-primary);
}

/* Shipping Cell */
.shipping-cell .shipping-method {
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.shipping-cell .tracking-no {
    font-size: 11px;
    font-family: monospace;
    color: var(--text-secondary);
}

.shipping-cell .shipping-carrier {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 2px;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    display: inline-block;
}

/* Status Cell */
.status-badge-large {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.status-to-process {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-processed {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.status-shipping {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-completed {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-unknown {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Loading Cell */
.loading-cell {
    text-align: center;
    padding: 60px 20px !important;
    color: var(--text-secondary);
}

.loading-cell .spinner {
    margin: 0 auto 16px;
}

/* Pagination */
.order-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 12px;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-page {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-page:hover:not(:disabled) {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .filter-row {
        gap: 8px;
    }

    .filter-select,
    .filter-input {
        min-width: 120px;
    }

    .order-table {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .modal-fullscreen {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select,
    .filter-input {
        width: 100%;
    }

    .order-tabs {
        overflow-x: auto;
        padding: 0 12px;
    }

    .order-tab {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* ========================================
   Cetak Resi Button & Modal
   ======================================== */
.col-action {
    width: 100px;
    text-align: center;
}

.btn-cetak-resi {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-cetak-resi:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.btn-cetak-resi:active {
    transform: translateY(0);
}

.btn-cetak-resi:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Button for already printed resi */
.btn-cetak-resi.printed {
    background: linear-gradient(135deg, #10b981, #059669);
}

.btn-cetak-resi.printed:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* Button for print error state */
.btn-cetak-resi.print-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.btn-cetak-resi i {
    font-size: 11px;
}

/* Resi Info Modal */
.resi-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resi-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.resi-row:last-child {
    border-bottom: none;
}

.resi-row-copy {
    align-items: center;
    background: var(--bg-tertiary);
    padding: 12px;
    border-radius: 8px;
    border-bottom: none;
    margin-bottom: 8px;
}

.resi-label {
    min-width: 80px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.resi-value {
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-word;
    flex: 1;
}

.resi-number {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--accent-primary);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.btn-copy {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

.resi-note {
    margin-top: 16px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.resi-note i {
    color: var(--accent-primary);
}

/* Modal for Resi */
#resiModal .modal-content {
    max-width: 480px;
}

#resiModal .modal-body {
    padding: 20px;
}

/* ========================================
   Process Order Button
   ======================================== */
.btn-process-order {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-process-order:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.btn-process-order:active {
    transform: translateY(0);
}

.btn-process-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-process-order i {
    font-size: 11px;
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* Single Order Refresh Button */
.btn-refresh-single {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-refresh-single:hover {
    color: var(--accent-primary);
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    transform: rotate(90deg);
}

.btn-refresh-single.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-refresh-single.loading i {
    animation: spin 1s linear infinite;
}

.btn-refresh-single.success {
    color: #10b981;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.btn-refresh-single.error {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.btn-refresh-single:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-cancel-accept,
.btn-cancel-reject {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-accept {
    color: #10b981;
}

.btn-cancel-reject {
    color: #ef4444;
}

.btn-cancel-accept:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: #10b981;
}

.btn-cancel-reject:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: #ef4444;
}

.btn-cancel-accept.loading,
.btn-cancel-reject.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-cancel-accept.loading i,
.btn-cancel-reject.loading i {
    animation: spin 1s linear infinite;
}

.btn-cancel-accept:disabled,
.btn-cancel-reject:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Bulk Process Buttons */
.bulk-process-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.btn-process-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-process-all:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.btn-process-selected {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: white;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-process-selected:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.4);
}

/* ========================================
   View Container Styles
   ======================================== */
.view-container {
    min-height: 100vh;
    animation: fadeIn 0.3s ease;
}

/* ========================================
   Manage Toko - Shops Table
   ======================================== */
.shops-list-container {
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.shops-table {
    width: 100%;
    border-collapse: collapse;
}

.shops-table thead {
    background: var(--bg-tertiary);
}

.shops-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shops-table th:first-child {
    width: 60px;
    text-align: center;
}

.shops-table th:last-child {
    width: 150px;
    text-align: center;
}

.shops-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.shops-table tr:last-child td {
    border-bottom: none;
}

.shops-table tr:hover {
    background: var(--bg-tertiary);
}

.shops-table td:first-child {
    text-align: center;
    font-weight: 600;
    color: var(--text-tertiary);
}

.loading-cell {
    text-align: center;
    padding: 60px 20px !important;
    color: var(--text-secondary);
}

.loading-cell .spinner {
    margin-bottom: 16px;
}

.shop-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.shop-status.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.shop-status.status-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.shop-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-edit-shop,
.btn-delete-shop {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-edit-shop {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-edit-shop:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-delete-shop {
    background: transparent;
    border: 2px solid var(--color-error);
    color: var(--color-error);
}

.btn-delete-shop:hover {
    background: var(--color-error);
    color: white;
    transform: scale(1.1);
}

@media (max-width: 768px) {

    .shops-table th,
    .shops-table td {
        padding: 12px 14px;
        font-size: 13px;
    }

    .shop-actions {
        flex-direction: column;
        gap: 4px;
    }

    .btn-edit-shop,
    .btn-delete-shop {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* ========================================
   Packing View (Embedded)
   ======================================== */
.packing-container {
    max-width: 900px;
}

.automation-container {
    max-width: 900px;
}

.automation-header {
    position: sticky;
    top: 16px;
    z-index: 30;
    backdrop-filter: blur(8px);
}

.automation-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.automation-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.automation-breadcrumb .crumb {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.automation-breadcrumb .crumb.active {
    color: var(--accent-primary);
}

.automation-breadcrumb .crumb-sep {
    opacity: 0.6;
}

.automation-breadcrumb .crumb-current {
    color: var(--text-primary);
    font-weight: 700;
}

.automation-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.automation-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 10px;
    min-width: 320px;
    flex: 1;
}

.shops-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 10px;
    min-width: 260px;
}

.shops-search i {
    color: var(--text-tertiary);
    font-size: 12px;
}

.shops-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    color: var(--text-primary);
    font-size: 13px;
}

.cookie-validity-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: rgba(16, 185, 129, 1);
    font-weight: 700;
}

.cookie-valid-until {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(16, 185, 129, 1);
}

.cookie-valid-until.expired {
    color: #ef4444;
}

.automation-search i {
    color: var(--text-tertiary);
    font-size: 12px;
}

.automation-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    color: var(--text-primary);
    font-size: 13px;
}

.automation-tabs {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.automation-tab {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.automation-tab:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.automation-tab.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.automation-section {
    scroll-margin-top: 160px;
}

.shop-settings-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.shop-settings-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 10px;
    min-width: 280px;
    flex: 1;
}

.shop-settings-search i {
    color: var(--text-tertiary);
    font-size: 12px;
}

.shop-settings-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    color: var(--text-primary);
    font-size: 13px;
}

.shop-setting-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.shop-setting-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-primary);
}

.shop-setting-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 13px;
}

.shop-setting-meta {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 700;
}

.shop-setting-body {
    padding: 12px 14px 14px 14px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.shop-setting-body[hidden] {
    display: none !important;
}

@media (max-width: 820px) {
    .automation-search {
        min-width: 220px;
        width: 100%;
    }

    .shops-search {
        min-width: 220px;
        width: 100%;
    }

    .shop-settings-search {
        min-width: 220px;
        width: 100%;
    }

    .automation-header {
        top: 8px;
    }
}

/* Packing User Info */
.packing-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.packing-role {
    background: var(--accent-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.packing-role.master {
    background: #f59e0b;
}

/* Packing Login Section */
.packing-login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.packing-login-box {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 100%;
}

.packing-login-box h2 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--accent-primary);
}

.packing-login-box h2 i {
    margin-right: 10px;
}

.packing-login-hint {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.btn-block {
    width: 100%;
}

/* Packing Tabs */
.packing-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.packing-tab {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.packing-tab:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
}

.packing-tab.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.packing-tab-content {
    display: none;
}

.packing-tab-content.active {
    display: block;
}

/* Packing Scanner Section */
.packing-scanner-section {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.packing-scanner-section h3 {
    color: var(--accent-primary);
    margin-bottom: 10px;
}

.packing-hint {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.packing-scanner-input {
    width: 100%;
    padding: 20px;
    font-size: 20px;
    text-align: center;
    background: var(--bg-tertiary);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.packing-scanner-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.packing-status {
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.packing-status.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #10b981;
    display: block;
}

.packing-status.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #ef4444;
    display: block;
}

/* Packing Recent/History Section */
.packing-recent-section,
.packing-history-section {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.packing-recent-section h3,
.packing-history-section h3 {
    color: var(--accent-primary);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.packing-count {
    color: #10b981;
    font-size: 14px;
    font-weight: normal;
}

.packing-date-input {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.packing-list {
    max-height: 300px;
    overflow-y: auto;
}

.packing-item {
    background: var(--bg-tertiary);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.packing-item-info {
    font-weight: 500;
    color: var(--text-primary);
}

.packing-item-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.packing-item-time {
    color: var(--text-tertiary);
    font-size: 12px;
}

.packing-empty {
    text-align: center;
    color: var(--text-tertiary);
    padding: 20px;
}

/* Packing Stats Grid */
.packing-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.packing-stat-card {
    background: var(--bg-secondary);
    padding: 24px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.packing-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-primary);
}

.packing-stat-label {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 5px;
}

/* Packing Users Section */
.packing-users-section {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.packing-users-section h3 {
    color: var(--accent-primary);
    margin-bottom: 15px;
}

.packing-user-list {
    margin-bottom: 20px;
}

.packing-user-item {
    background: var(--bg-tertiary);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.packing-user-name {
    font-weight: 500;
    color: var(--text-primary);
}

.packing-user-actions {
    display: flex;
    gap: 8px;
}

.packing-user-actions button {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
}

/* Packing Add User Form */
.packing-add-user-form {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 12px;
}

.packing-add-user-form h4 {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.packing-add-user-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.packing-add-user-form select {
    width: 100%;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
}

/* Validation Styles */
.validation-container {
    margin: 20px 0;
    padding: 0;
}

.validation-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.validation-section h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.validation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.validation-item {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.validation-item.success {
    border-color: var(--color-completed);
    background: rgba(16, 185, 129, 0.1);
}

.validation-item.warning {
    border-color: var(--color-warning);
    background: rgba(245, 158, 11, 0.1);
}

.validation-item.error {
    border-color: var(--color-error);
    background: rgba(239, 68, 68, 0.1);
}

.account-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 16px;
}

.validation-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat:last-child {
    border-bottom: none;
}

.stat .label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
}

.stat .api-value {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 14px;
}

.stat .db-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.error-message {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    color: var(--color-error);
    font-size: 12px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ========================================
   Sync Progress Bar (Fixed Top Right)
   ======================================== */
.sync-progress-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 99999;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sync-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
}

.sync-progress-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.sync-progress-title i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.sync-progress-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sync-progress-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.sync-progress-close i {
    font-size: 12px;
}

.sync-progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
}

.sync-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: 0 4px 4px 0;
    transition: width 0.3s ease;
    position: relative;
}

.sync-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.sync-progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-tertiary);
}

#syncProgressPercent {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
}

#syncProgressStats {
    font-size: 13px;
    color: var(--text-secondary);
}

[data-theme="dark"] .sync-progress-container {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .sync-progress-info {
    background: var(--bg-tertiary);
}

@media (max-width: 480px) {
    .sync-progress-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }

    .sync-progress-header {
        padding: 12px 16px;
    }

    .sync-progress-info {
        padding: 10px 16px;
    }
}

/* ========================================
   Toast Notifications
   ======================================== */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(100%);
}

.toast i {
    font-size: 16px;
    flex-shrink: 0;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success i {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error i {
    color: #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning i {
    color: #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info i {
    color: #3b82f6;
}

.toast span {
    flex: 1;
    word-break: break-word;
}

/* ========================================
   Sync Progress Popup - Modern & Animated
   ======================================== */
@keyframes syncPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(99, 102, 241, 0);
    }
}

@keyframes syncGlow {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

@keyframes progressFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.sync-progress-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 360px;
    max-width: 420px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sync-progress-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-end;
    pointer-events: none;
}

.sync-progress-stack .sync-progress-popup {
    position: relative;
    top: auto;
    right: auto;
    pointer-events: auto;
}

.sync-progress-popup.hiding {
    animation: slideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sync-progress-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7, #8b5cf6, #6366f1);
    background-size: 200% 100%;
    animation: progressFlow 2s linear infinite;
}

.sync-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sync-popup-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #f1f5f9;
}

.sync-popup-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    animation: syncPulse 2s infinite;
}

.sync-popup-icon.syncing i {
    animation: spin 1.5s linear infinite;
}

.sync-popup-icon.done {
    background: linear-gradient(135deg, #10b981, #059669);
    animation: bounce 0.5s ease;
}

.sync-popup-icon.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.sync-popup-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.sync-popup-close.visible {
    opacity: 1;
    pointer-events: auto;
}

.sync-popup-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: scale(1.1);
}

.sync-popup-close.toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    transform: scale(1.05);
}

.sync-progress-popup.minimized {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    height: 72px;
    border-radius: 18px;
}

.sync-progress-popup.minimized::before {
    display: none;
}

.sync-progress-popup.minimized .sync-popup-body {
    display: none !important;
}

.sync-progress-popup.minimized .sync-popup-header {
    padding: 0;
    border-bottom: none;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sync-progress-popup.minimized .sync-popup-title {
    gap: 0;
}

.sync-progress-popup.minimized .sync-popup-title>div:not(.sync-popup-icon) {
    display: none;
}

.sync-progress-popup.minimized .sync-popup-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

.sync-progress-popup.minimized .sync-popup-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 10px;
    opacity: 1;
    pointer-events: auto;
}

.sync-popup-body {
    padding: 16px 20px 20px;
    flex: 1;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.multi-sync-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 60vh;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.multi-sync-item {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.multi-sync-item-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.sync-popup-account {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sync-popup-account i {
    color: #6366f1;
}

.sync-progress-container {
    position: relative;
    margin-bottom: 14px;
}

.sync-progress-popup .sync-progress-container {
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    max-width: 100%;
    z-index: auto;
    box-shadow: none;
    animation: none;
}

.sync-progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.sync-progress-bar {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7);
    background-size: 200% 100%;
    animation: progressFlow 1.5s linear infinite;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sync-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: progressFlow 1s linear infinite;
}

.sync-progress-bar.done {
    background: linear-gradient(90deg, #10b981, #059669, #10b981);
}

.sync-progress-bar.done::after {
    animation: none;
}

.sync-progress-popup .sync-progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.sync-progress-popup .sync-progress-percent {
    font-size: 24px;
    font-weight: 700;
    text-align: right;
    flex: 0 0 auto;
    min-width: 84px;
    margin-left: 12px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sync-progress-popup .sync-progress-percent.done {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    background-clip: text;
}

.sync-progress-popup .sync-progress-desc {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
}

.sync-popup-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sync-stat {
    text-align: center;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.sync-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 2px;
}

.sync-stat-label {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sync-popup-footer {
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: flex-end;
}

.sync-popup-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.sync-popup-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.sync-popup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.sync-popup-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.sync-popup-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Dark theme adjustments */
[data-theme="dark"] .sync-progress-popup {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
}

/* ========================================
   Order Stats Boxes with Glowing Border
   ======================================== */
.order-stats-boxes {
    display: flex;
    gap: 12px;
    align-items: center;
}

.order-stat-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    border: 2px solid;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.order-stat-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 12px;
    padding: 2px;
    background: inherit;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.order-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.order-stat-box:hover::before {
    opacity: 1;
}

/* Revenue Box - Green Glow */
.revenue-box {
    border-color: rgba(34, 197, 94, 0.5);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.05));
    box-shadow:
        0 0 15px rgba(34, 197, 94, 0.3),
        0 0 30px rgba(34, 197, 94, 0.1),
        inset 0 0 15px rgba(34, 197, 94, 0.05);
    animation: glowGreen 2s ease-in-out infinite alternate;
}

.revenue-box::before {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.revenue-box:hover {
    box-shadow:
        0 0 20px rgba(34, 197, 94, 0.5),
        0 0 40px rgba(34, 197, 94, 0.2),
        0 8px 25px rgba(34, 197, 94, 0.15);
}

@keyframes glowGreen {
    0% {
        box-shadow:
            0 0 15px rgba(34, 197, 94, 0.3),
            0 0 30px rgba(34, 197, 94, 0.1),
            inset 0 0 15px rgba(34, 197, 94, 0.05);
    }

    100% {
        box-shadow:
            0 0 20px rgba(34, 197, 94, 0.5),
            0 0 40px rgba(34, 197, 94, 0.2),
            inset 0 0 20px rgba(34, 197, 94, 0.1);
    }
}

/* Orders Box - Blue Glow */
.orders-box {
    border-color: rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
    box-shadow:
        0 0 15px rgba(59, 130, 246, 0.3),
        0 0 30px rgba(59, 130, 246, 0.1),
        inset 0 0 15px rgba(59, 130, 246, 0.05);
    animation: glowBlue 2s ease-in-out infinite alternate;
}

.orders-box::before {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.orders-box:hover {
    box-shadow:
        0 0 20px rgba(59, 130, 246, 0.5),
        0 0 40px rgba(59, 130, 246, 0.2),
        0 8px 25px rgba(59, 130, 246, 0.15);
}

@keyframes glowBlue {
    0% {
        box-shadow:
            0 0 15px rgba(59, 130, 246, 0.3),
            0 0 30px rgba(59, 130, 246, 0.1),
            inset 0 0 15px rgba(59, 130, 246, 0.05);
    }

    100% {
        box-shadow:
            0 0 20px rgba(59, 130, 246, 0.5),
            0 0 40px rgba(59, 130, 246, 0.2),
            inset 0 0 20px rgba(59, 130, 246, 0.1);
    }
}

/* Products Box - Purple Glow */
.products-box {
    border-color: rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05));
    box-shadow:
        0 0 15px rgba(139, 92, 246, 0.3),
        0 0 30px rgba(139, 92, 246, 0.1),
        inset 0 0 15px rgba(139, 92, 246, 0.05);
    animation: glowPurple 2s ease-in-out infinite alternate;
}

.products-box::before {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.products-box:hover {
    box-shadow:
        0 0 20px rgba(139, 92, 246, 0.5),
        0 0 40px rgba(139, 92, 246, 0.2),
        0 8px 25px rgba(139, 92, 246, 0.15);
}

@keyframes glowPurple {
    0% {
        box-shadow:
            0 0 15px rgba(139, 92, 246, 0.3),
            0 0 30px rgba(139, 92, 246, 0.1),
            inset 0 0 15px rgba(139, 92, 246, 0.05);
    }

    100% {
        box-shadow:
            0 0 20px rgba(139, 92, 246, 0.5),
            0 0 40px rgba(139, 92, 246, 0.2),
            inset 0 0 20px rgba(139, 92, 246, 0.1);
    }
}

/* Gross Income Box - Orange Glow */
.gross-income-box {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
    box-shadow:
        0 0 15px rgba(245, 158, 11, 0.3),
        0 0 30px rgba(245, 158, 11, 0.1),
        inset 0 0 15px rgba(245, 158, 11, 0.05);
    animation: glowOrange 2s ease-in-out infinite alternate;
}

.gross-income-box::before {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.gross-income-box:hover {
    box-shadow:
        0 0 20px rgba(245, 158, 11, 0.5),
        0 0 40px rgba(245, 158, 11, 0.2),
        0 8px 25px rgba(245, 158, 11, 0.15);
}

@keyframes glowOrange {
    0% {
        box-shadow:
            0 0 15px rgba(245, 158, 11, 0.3),
            0 0 30px rgba(245, 158, 11, 0.1),
            inset 0 0 15px rgba(245, 158, 11, 0.05);
    }

    100% {
        box-shadow:
            0 0 20px rgba(245, 158, 11, 0.5),
            0 0 40px rgba(245, 158, 11, 0.2),
            inset 0 0 20px rgba(245, 158, 11, 0.1);
    }
}

/* Ad Cost Box - Red Glow */
.ad-cost-box {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
    box-shadow:
        0 0 15px rgba(239, 68, 68, 0.3),
        0 0 30px rgba(239, 68, 68, 0.1),
        inset 0 0 15px rgba(239, 68, 68, 0.05);
    animation: glowRed 2s ease-in-out infinite alternate;
}

.ad-cost-box::before {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.ad-cost-box:hover {
    box-shadow:
        0 0 20px rgba(239, 68, 68, 0.5),
        0 0 40px rgba(239, 68, 68, 0.2),
        0 8px 25px rgba(239, 68, 68, 0.15);
}

@keyframes glowRed {
    0% {
        box-shadow:
            0 0 15px rgba(239, 68, 68, 0.3),
            0 0 30px rgba(239, 68, 68, 0.1),
            inset 0 0 15px rgba(239, 68, 68, 0.05);
    }

    100% {
        box-shadow:
            0 0 20px rgba(239, 68, 68, 0.5),
            0 0 40px rgba(239, 68, 68, 0.2),
            inset 0 0 20px rgba(239, 68, 68, 0.1);
    }
}

/* Net Profit Box - Pink Glow */
.net-profit-box {
    border-color: rgba(236, 72, 153, 0.5);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(219, 39, 119, 0.05));
    box-shadow:
        0 0 15px rgba(236, 72, 153, 0.3),
        0 0 30px rgba(236, 72, 153, 0.1),
        inset 0 0 15px rgba(236, 72, 153, 0.05);
    animation: glowPink 2s ease-in-out infinite alternate;
}

.net-profit-box::before {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.net-profit-box:hover {
    box-shadow:
        0 0 20px rgba(236, 72, 153, 0.5),
        0 0 40px rgba(236, 72, 153, 0.2),
        0 8px 25px rgba(236, 72, 153, 0.15);
}

@keyframes glowPink {
    0% {
        box-shadow:
            0 0 15px rgba(236, 72, 153, 0.3),
            0 0 30px rgba(236, 72, 153, 0.1),
            inset 0 0 15px rgba(236, 72, 153, 0.05);
    }

    100% {
        box-shadow:
            0 0 20px rgba(236, 72, 153, 0.5),
            0 0 40px rgba(236, 72, 153, 0.2),
            inset 0 0 20px rgba(236, 72, 153, 0.1);
    }
}

.order-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.revenue-box .order-stat-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.orders-box .order-stat-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.products-box .order-stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.gross-income-box .order-stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.ad-cost-box .order-stat-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.net-profit-box .order-stat-icon {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.order-stat-content {
    display: flex;
    flex-direction: column;
}

.order-stat-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2px;
}

.revenue-box .order-stat-value {
    color: #22c55e;
}

.orders-box .order-stat-value {
    color: #3b82f6;
}

.products-box .order-stat-value {
    color: #8b5cf6;
}

.gross-income-box .order-stat-value {
    color: #f59e0b;
}

.ad-cost-box .order-stat-value {
    color: #ef4444;
}

.net-profit-box .order-stat-value {
    color: #ec4899;
}

.order-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .order-stats-boxes {
        flex-wrap: wrap;
    }

    .order-stat-box {
        flex: 1 1 calc(33.333% - 8px);
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .order-stats-boxes {
        width: 100%;
        justify-content: space-between;
    }

    .order-stat-box {
        flex: 1 1 calc(33.333% - 8px);
        min-width: 100px;
        padding: 8px 12px;
    }

    .order-stat-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .order-stat-value {
        font-size: 16px;
    }

    .order-stat-label {
        font-size: 10px;
    }
}

/* ==========================================================================
   NEW ORDER METRICS CARDS (Reference "Neon Style" - Compact Version)
   ========================================================================== */

/* Container */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* Reduced min-width */
    gap: 12px;
    /* Reduced gap */
    width: 100%;
}

/* Card Styling */
.info-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;

    /* Dark Glassy Look */
    background: linear-gradient(145deg, #1a1b26 0%, #13141c 100%);

    border-radius: 12px;
    /* Slightly smaller radius */
    padding: 15px;
    /* Reduced padding (was 20px) */
    min-height: 100px;
    height: 100px;
    /* Reduced min-height (was 130px) */

    /* Enhanced Shadow */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Glass border */
    border: 1px solid rgba(255, 255, 255, 0.05);

    /* Neon Top Border container */
    position: relative;
    overflow: hidden;

    width: 100%;
}

/* Hover Effect */
.info-box:hover {
    transform: translateY(-3px);
    /* Subtle hover */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.order-total-sub {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1;
}

.order-total-profit {
    color: #10b981;
    font-weight: 600;
}

.order-total-profit.negative {
    color: #ef4444;
}

.metric-yesterday {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 6px;
    width: 100%;
    font-size: 7px;
}

.metric-yesterday-label {
    opacity: 0.75;
    white-space: nowrap;
}

.metric-yesterday-value {
    font-weight: 600;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.delta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    margin-left: 0;
    border: 1px solid transparent;
    white-space: nowrap;
}

.delta-pill.up {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

.delta-pill.down {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

.delta-pill.flat {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.35);
}

.order-total-popover {
    position: fixed;
    z-index: 9999;
    width: 280px;
    background: #ffffff;
    color: #0f172a;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 10px 12px;
}

.order-total-popover .row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    padding: 3px 0;
}

.order-total-popover .order-total-svc-row {
    font-size: 10px;
}

.order-total-popover .title {
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 6px;
}

.order-total-popover .section {
    margin-top: 10px;
}

.order-total-popover .muted {
    opacity: 0.75;
}

.order-total-popover .positive {
    color: #10b981;
    font-weight: 700;
}

.order-total-popover .negative {
    color: #ef4444;
    font-weight: 700;
}

/* THE NEON LINE (Animated) */
.info-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;

    /* Seamless Loop Gradient */
    background: linear-gradient(90deg, #4361ee, #7209b7, #06d6a0, #4361ee);

    background-size: 200% 100%;
    animation: none;

    box-shadow: 0 0 8px #4361ee;
    opacity: 0;
}

body.neon-ready .info-box::after {
    animation: neonFlow 3s linear infinite;
    opacity: 1;
}

@keyframes neonFlow {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

#dashboardView .summary-section::after,
#dashboardView .summary-card::after,
#dashboardView .dash-panel-top::after,
#dashboardView .dash-left-body::after,
#dashboardView .dash-right>.sku-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4361ee, #7209b7, #06d6a0, #4361ee);
    background-size: 200% 100%;
    animation: none;
    box-shadow: 0 0 8px #4361ee;
    opacity: 0;
    pointer-events: none;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

body.neon-ready #dashboardView .summary-section::after,
body.neon-ready #dashboardView .summary-card::after,
body.neon-ready #dashboardView .dash-panel-top::after,
body.neon-ready #dashboardView .dash-left-body::after,
body.neon-ready #dashboardView .dash-right>.sku-section::after {
    animation: neonFlow 3s linear infinite;
    opacity: 1;
}

#dashboardView .summary-section:hover::after,
#dashboardView .summary-card:hover::after,
#dashboardView .dash-panel-top:hover::after,
#dashboardView .dash-left-body:hover::after {
    opacity: 1;
}

#dashboardView .dash-panel-top,
#dashboardView .dash-left-body {
    position: relative;
    overflow: hidden;
}

/* Icon Styling (Floating Top Right) */
.info-icon {
    position: absolute;
    top: 15px;
    /* Adjusted position */
    right: 15px;
    /* Adjusted position */
    font-size: 1.1rem;
    /* Reduced font size (was 1.5rem) */
    width: 36px;
    /* Reduced dim (was 45px) */
    height: 36px;
    /* Reduced dim (was 45px) */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    color: #4361ee;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Content Styling */
.info-content {
    width: 100%;
    z-index: 1;
}

.info-content h4 {
    margin: 0 0 5px 0;
    /* Reduced margin */
    font-size: 10px;
    /* Subtle reduction */
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.info-content p.value {
    margin: 0;
    font-size: 20px;
    /* Reduced from 28px */
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.2;
    text-shadow: 0 0 15px rgba(67, 97, 238, 0.1);
}

/* Responsive */
@media (max-width: 600px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   HEADER ALIGNMENT FIXES
   ========================================================================== */
.order-header {
    display: flex !important;
    align-items: center !important;
    /* Vertically center */
    padding-top: 8px !important;
    /* Move content up/reduce space */
    padding-bottom: 8px !important;
    /* Balanced bottom padding */
    min-height: auto !important;
    /* Allow it to shrink to fit content if needed */
}

/* ==========================================================================
   TOAST NOTIFICATION STYLES (Neon Style)
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Base Toast Style (Glassmorphism) */
.toast {
    background: rgba(23, 23, 30, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 320px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 16px;
    pointer-events: auto;

    /* Animation Start State */
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Animation Active State */
.toast.show {
    transform: translateX(0);
}

/* Animation Hide State */
.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Side Color Bar Indicator */
.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color, #4361ee);
}

/* Colors for Success */
.toast.toast-success::before {
    background: #00b894;
    box-shadow: 0 0 10px #00b894;
}

/* Colors for Error */
.toast.toast-error::before {
    background: #ff7675;
    box-shadow: 0 0 10px #ff7675;
}

/* Colors for Warning */
.toast.toast-warning::before {
    background: #fdcb6e;
    box-shadow: 0 0 10px #fdcb6e;
}

/* Colors for Info */
.toast.toast-info::before {
    background: #4361ee;
    box-shadow: 0 0 10px #4361ee;
}

/* Icon & Text Styling */
.toast-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.85rem;
    opacity: 0.8;
    word-break: break-word;
}

.tools-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    margin-top: 14px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, rgba(139, 92, 246, 0.10) 35%, rgba(16, 185, 129, 0.10) 100%);
    box-shadow: var(--shadow-lg);
}

.tools-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 700;
    letter-spacing: 0.2px;
    width: fit-content;
}

.tools-hero-title {
    font-size: 28px;
    line-height: 1.15;
    margin-top: 10px;
    color: var(--text-primary);
}

.tools-hero-subtitle {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    max-width: 620px;
}

.tools-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.tools-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: var(--theme-gradient-2);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.tools-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(99, 102, 241, 0.30);
    filter: brightness(1.03);
}

.tools-download-btn.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: rgba(148, 163, 184, 0.25);
    color: var(--text-secondary);
    box-shadow: none;
}

.tools-secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.16);
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.15s ease, background 0.15s ease;
}

.tools-secondary-btn:hover {
    transform: translateY(-1px);
    background: rgba(0, 0, 0, 0.20);
}

.tools-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.tools-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 12px;
    color: var(--text-secondary);
}

.tools-hero-visual {
    display: flex;
    justify-content: flex-end;
}

.tools-hero-card {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}

.tools-hero-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text-primary);
}

.tools-hero-card-body {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.tools-hero-stat {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(17, 24, 39, 0.55);
}

.tools-hero-stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
}

.tools-hero-stat-value {
    margin-top: 3px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    word-break: break-word;
}

.tools-hero-card-foot {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tools-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
    font-size: 12px;
    color: var(--text-secondary);
}

.tools-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.tools-card {
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: var(--shadow);
    padding: 14px;
    overflow: hidden;
}

.tools-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.tools-grad-1 {
    background: var(--theme-gradient-6);
}

.tools-grad-2 {
    background: var(--theme-gradient-7);
}

.tools-grad-3 {
    background: var(--theme-gradient-2);
}

.tools-card-title {
    margin-top: 10px;
    font-weight: 800;
    color: var(--text-primary);
    font-size: 14px;
}

.tools-card-text {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.tools-steps {
    margin-top: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: var(--shadow);
    padding: 14px;
}

.tools-steps-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text-primary);
}

.tools-steps-list {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tools-step {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(99, 102, 241, 0.06);
}

.tools-step-num {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #fff;
    background: var(--theme-gradient-1);
    flex: 0 0 auto;
}

.tools-step-title {
    font-weight: 800;
    color: var(--text-primary);
    font-size: 13px;
}

.tools-step-text {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 1100px) {
    .tools-hero {
        grid-template-columns: 1fr;
    }

    .tools-hero-visual {
        justify-content: flex-start;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tools-steps-list {
        grid-template-columns: 1fr;
    }
}

/* Animated Shop Ranking - Dynamic Neon Colors */
.shop-rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
}

.shop-rank-item:hover,
.shop-rank-item.active {
    background: linear-gradient(90deg, var(--item-color-alpha, rgba(255, 255, 255, 0.1)), transparent);
    transform: translateX(5px) scale(1.02);
    border-color: var(--item-color, #4361ee);
    box-shadow: 0 0 20px -5px var(--item-color-alpha, rgba(67, 97, 238, 0.2));
    z-index: 1;
}

.shop-rank-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--item-color, #4361ee);
    box-shadow: 0 0 15px var(--item-color, #4361ee);
    animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 5px var(--item-color);
    }

    to {
        box-shadow: 0 0 20px var(--item-color);
    }
}

.shop-rank-no {
    font-weight: 800;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    width: 28px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    transition: color 0.3s;
}

.shop-rank-item.active .shop-rank-no {
    color: var(--item-color, #4361ee);
    text-shadow: 0 0 10px var(--item-color, #4361ee);
    transform: scale(1.1);
}

.shop-rank-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.shop-rank-name {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-rank-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.shop-rank-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    max-width: 120px;
}

.shop-rank-bar span {
    display: block;
    height: 100%;
    width: calc(var(--w) * 1%);
    background: var(--item-color, #4361ee);
    box-shadow: 0 0 8px var(--item-color, #4361ee);
    border-radius: 3px;
    transition: width 0.5s ease-out;
}

.shop-rank-right {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}


/* Smooth Donut Animation */
@property --p {
    syntax: '<number>';
    inherits: false;
    initial-value: 0;
}

.shop-donut {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(var(--item-color, #4361ee) calc(var(--p) * 1%), rgba(255, 255, 255, 0.05) 0);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: --p 1s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s;
    box-shadow: 0 0 30px -10px var(--item-color, #4361ee);
    margin: 8px auto 16px;
}

.shop-donut::after {
    content: '';
    position: absolute;
    inset: 12px;
    background: #111827;
    /* Match dashboard bg */
    border-radius: 50%;
    z-index: 0;
}

.shop-donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.shop-donut-value {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    text-shadow: 0 0 20px var(--item-color, rgba(67, 97, 238, 0.5));
}

.shop-donut-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--item-color, #4361ee);
    margin-top: 4px;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-donut-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

/* Shop List Alignment Fix */
.shop-rank-item {
    min-height: 52px;
    /* Ensure consistent height */
    padding: 8px 14px;
}

.shop-rank-main {
    overflow: hidden;
    /* Fix overlap */
    padding-right: 10px;
}

.shop-rank-name {
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 2px;
}

.shop-rank-sub {
    font-size: 10px;
}


/* Cool Orbiting Animation for Donut Chart */
.shop-donut::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: conic-gradient(#4361ee, #7209b7, #06d6a0, #4361ee);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    animation: orbitSpin 3s linear infinite;
    z-index: 0;
    opacity: 0.85;
    box-shadow: 0 0 14px rgba(67, 97, 238, 0.35);
}

/* Secondary Orbit Ring (Counter-Clockwise) */
.shop-donut .orbit-ring-2 {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    animation: orbitSpinReverse 7s linear infinite;
    z-index: 0;
}

@keyframes orbitSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.05);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes orbitSpinReverse {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Add a glowing particle that follows orbit */
.shop-donut .orbit-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    /* Larger than donut */
    transform: translate(-50%, -50%);
    animation: particleRotate 4s linear infinite;
    pointer-events: none;
    z-index: 2;
}

.shop-donut .orbit-particle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--item-color, #4361ee), 0 0 40px var(--item-color, #4361ee);
    transform: translate(-50%, -50%);
}

@keyframes particleRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


/* Enhanced Financial Summary Cards (Orders Style) */
.summary-card {
    background: rgba(31, 41, 55, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
}

.summary-card:hover {
    transform: translateY(-2px);
    background: rgba(31, 41, 55, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

/* Specific Card Styles matching Orders page neon theme */
.omset-card {
    border-left: 3px solid #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.05);
}

.omset-card .summary-value {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.omset-card .summary-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.omset-bersih-card {
    border-left: 3px solid #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.05);
}

.omset-bersih-card .summary-value {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.omset-bersih-card .summary-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.keuntungan-card {
    border-left: 3px solid #8b5cf6;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.05);
}

.keuntungan-card .summary-value {
    color: #8b5cf6;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.keuntungan-card .summary-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.ad-card {
    border-left: 3px solid #ef4444;
}

.ad-card .summary-value {
    color: #ef4444;
}

.ad-card .summary-icon {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444;
}


/* Update Status Order cards to be cleaner/neon */
.order-grid .summary-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.order-grid .summary-card:hover {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.6));
    border-color: rgba(255, 255, 255, 0.1);
}

.order-grid .summary-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.order-grid .summary-value {
    font-size: 18px;
}

.order-grid .summary-label {
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Clean up table ranking */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FDB931);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-2 {
    background: linear-gradient(135deg, #E0E0E0, #BDBDBD);
    color: #000;
    box-shadow: 0 0 10px rgba(224, 224, 224, 0.5);
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: #fff;
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}


/* Fix Order Status Grid Layout */
.order-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.mini-card {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    /* Prevent overflow */
}

.mini-card .summary-icon {
    margin-bottom: 4px;
}

.mini-card .summary-content {
    text-align: left;
}


/* Updated Orbit Animation - Slower & Pastel */
.shop-donut::before {
    animation: orbitSpin 6s linear infinite;
    /* Slower from 3s to 6s */
    border-top-color: transparent;
    /* Use gradient border via mask or simpler approach for now */
    border-bottom-color: transparent;
    background: conic-gradient(from 0deg, transparent 80%, var(--item-color, #4361ee));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #fff calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #fff calc(100% - 2px));
    border: none;
    /* override previous border */
}

/* Update Particle to Pastel Gradient */
.shop-donut .orbit-particle::after {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), var(--item-color, #4361ee));
    box-shadow: 0 0 15px var(--item-color, #4361ee), 0 0 30px var(--item-color, #4361ee);
    width: 10px;
    height: 10px;
}

@keyframes particleRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Make Financial Cards Proportional */
.summary-grid.financial-grid {
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 columns equal width */
    gap: 16px;
}

.summary-card {
    min-height: 110px;
    /* Ensure uniform height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Modernize Trend Chart - Add gradient mask or placeholder style */
.trend-body {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}


/* Modern SVG Trend Chart */
.trend-chart-container {
    position: relative;
    width: 100%;
    height: 220px;
    padding-bottom: 25px;
    /* space for labels */
}

.trend-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.trend-area {
    opacity: 0.8;
    filter: drop-shadow(0 0 10px rgba(67, 97, 238, 0.2));
}

.trend-line {
    filter: drop-shadow(0 0 5px #4361ee);
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawLine 2s ease-out forwards;
}

.trend-dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.trend-dot:hover {
    r: 9;
    stroke-width: 4px;
    filter: drop-shadow(0 0 8px #fff);
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.chart-labels {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
}

.chart-label {
    position: absolute;
    bottom: 0;
    transform: translateX(-50%);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

/* Tooltip on hover */
.chart-tooltips {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.chart-point {
    position: absolute;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    background: transparent;
    border-radius: 50%;
}

.chart-point:hover::after {
    content: attr(data-val) '\a' attr(data-date);
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    white-space: pre;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 10;
    backdrop-filter: blur(4px);
}


/* ========== PREMIUM TREND CHART ========== */
.trend-chart-premium {
    position: relative;
    width: 100%;
    height: 280px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.6) 100%);
    border-radius: 16px;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 30px rgba(0, 245, 212, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.trend-chart-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00f5d4, #7b2cbf, #f72585);
    opacity: 0.8;
}

.trend-svg-premium {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.trend-area-premium {
    filter: blur(0.5px);
}

.trend-line-premium {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawNeonLine 2s ease-out forwards;
}

@keyframes drawNeonLine {
    to {
        stroke-dashoffset: 0;
    }
}

.trend-line-highlight {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawNeonLine 2s ease-out 0.2s forwards;
}

.trend-point-group {
    opacity: 0;
    animation: fadeInPoint 0.5s ease-out forwards;
    animation-delay: calc(0.8s + var(--delay, 0s));
}

@keyframes fadeInPoint {
    from {
        opacity: 0;
        transform: scale(0);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.trend-glow-circle {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.6;
        r: 20;
    }

    50% {
        opacity: 0.3;
        r: 25;
    }
}

.trend-dot-outer {
    transition: all 0.3s ease;
    cursor: pointer;
}

.trend-dot-outer:hover {
    r: 10;
    stroke-width: 4px;
}

.trend-dot-inner {
    animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Floating value cards */
.trend-value-cards {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.trend-value-card {
    position: absolute;
    transform: translate(-50%, -130%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(0, 245, 212, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 245, 212, 0.2);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.trend-point-group {
    cursor: pointer;
}

.trend-point-group:hover .trend-dot-outer {
    r: 11;
    stroke-width: 4px;
}

.trend-point-group:hover .trend-glow-circle {
    opacity: 1;
    r: 28;
}

/* Only show card with .visible class (controlled by JS) */
.trend-value-card.visible {
    opacity: 1;
    transform: translate(-50%, -140%);
    animation: floatCard 3s ease-in-out infinite;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translate(-50%, -140%);
    }

    50% {
        transform: translate(-50%, -145%);
    }
}

.trend-value-amount {
    font-size: 14px;
    font-weight: 700;
    color: #00f5d4;
    text-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
    white-space: nowrap;
}

.trend-value-date {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 2px;
}

.trend-cursor-tooltip {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, calc(-100% - 14px));
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(0, 245, 212, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    opacity: 0;
    transition: opacity 0.12s ease;
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 245, 212, 0.2);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.trend-cursor-tooltip.visible {
    opacity: 1;
}

.trend-cursor-tooltip[data-dir="below"] {
    transform: translate(-50%, 14px);
}

.trend-tooltip-amount {
    font-size: 13px;
    font-weight: 800;
    color: #00f5d4;
    text-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
    line-height: 1.2;
}

.trend-tooltip-date {
    margin-top: 2px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    line-height: 1.2;
}

/* Empty state */
.trend-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.5) 0%, rgba(30, 41, 59, 0.3) 100%);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}



/* ========== PREMIUM REALTIME HOURLY CHART ========== */
.realtime-chart-premium {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.6) 100%);
    border-radius: 16px;
    padding: 20px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 30px rgba(0, 245, 212, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.realtime-chart-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4361ee, #7209b7, #06d6a0, #4361ee);
    opacity: 0.8;
    border-radius: 16px 16px 0 0;
}

.realtime-chart-premium::after {
    content: '';
    position: absolute;
    inset: -60px;
    background:
        radial-gradient(420px 220px at 20% 20%, rgba(0, 245, 212, 0.18), transparent 60%),
        radial-gradient(520px 260px at 80% 25%, rgba(247, 37, 133, 0.12), transparent 65%),
        radial-gradient(520px 260px at 60% 90%, rgba(123, 44, 191, 0.12), transparent 65%),
        radial-gradient(380px 200px at 10% 80%, rgba(245, 158, 11, 0.10), transparent 60%);
    opacity: 0.65;
    filter: blur(18px);
    animation: realtimeAurora 10s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes realtimeAurora {
    0% {
        transform: translate3d(-10px, -6px, 0) scale(1);
    }

    50% {
        transform: translate3d(14px, 8px, 0) scale(1.03);
    }

    100% {
        transform: translate3d(-6px, 10px, 0) scale(1.01);
    }
}

.realtime-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    gap: 10px;
}

.realtime-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    min-width: 0;
}

.realtime-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 0;
}

.realtime-mode {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.45);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.rtm-btn {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    line-height: 1;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.rtm-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 245, 212, 0.35);
    box-shadow: 0 0 16px rgba(0, 245, 212, 0.10);
    color: rgba(255, 255, 255, 0.9);
}

.rtm-btn.active {
    border-color: rgba(0, 245, 212, 0.35);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.65), rgba(114, 9, 183, 0.55), rgba(6, 214, 160, 0.45));
    color: #e0f2fe;
    box-shadow: 0 0 18px rgba(0, 245, 212, 0.12);
}

.rtm-btn:active {
    transform: translateY(0);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-dot.yesterday {
    background: linear-gradient(180deg, rgba(67, 97, 238, 0.70) 0%, rgba(114, 9, 183, 0.65) 50%, rgba(6, 214, 160, 0.62) 100%);
    box-shadow: 0 0 8px rgba(114, 9, 183, 0.35);
}

.legend-dot.today {
    background: linear-gradient(180deg, rgba(67, 97, 238, 0.95) 0%, rgba(114, 9, 183, 0.9) 45%, rgba(6, 214, 160, 0.86) 75%, rgba(245, 158, 11, 0.80) 100%);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.35);
}

.legend-value {
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.realtime-change {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.realtime-change.up {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.realtime-change.down {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.realtime-chart-body {
    display: flex;
    gap: 10px;
    height: 180px;
    position: relative;
    z-index: 2;
}

.realtime-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-align: right;
    padding-right: 8px;
    min-width: 50px;
}

.realtime-bars-container {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
}

.realtime-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.realtime-line {
    fill: none;
    opacity: 0.72;
}

.realtime-line.today {
    opacity: 0.55;
}

.realtime-line.yesterday {
    opacity: 0.38;
    stroke-dasharray: 7 7;
    animation: realtimeDash 2.4s linear infinite;
}

@keyframes realtimeDash {
    to {
        stroke-dashoffset: -28;
    }
}

.realtime-line-hit {
    position: absolute;
    left: var(--x, 0%);
    top: var(--y, 0%);
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 999px;
    z-index: 4;
    pointer-events: auto;
}

.realtime-line-hit::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(67, 97, 238, 0.95) 0%, rgba(114, 9, 183, 0.9) 45%, rgba(6, 214, 160, 0.86) 75%, rgba(245, 158, 11, 0.80) 100%);
    box-shadow: 0 0 14px rgba(0, 245, 212, 0.18);
    opacity: 0.65;
}

.realtime-line-hit:hover::after {
    opacity: 1;
    box-shadow: 0 0 18px rgba(0, 245, 212, 0.32);
}

.realtime-bars-container::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 25%;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
}

.realtime-bars-container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
}

.realtime-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 2;
}

.realtime-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 100%;
    width: 100%;
}

.realtime-bar {
    flex: 1;
    height: var(--h, 0%);
    border-radius: 3px 3px 0 0;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    min-height: 2px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.18);
}

.realtime-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.0), rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.0));
    background-size: 220% 100%;
    background-position: 0% 0%;
    opacity: 0.25;
    transition: opacity 0.18s ease;
    animation: realtimeBarShimmer 2.8s linear infinite;
    pointer-events: none;
}

.realtime-bar:hover::after {
    opacity: 0.85;
}

.realtime-bar.yesterday,
.realtime-bar.today {
    transform-origin: bottom;
}

.realtime-bar.yesterday {
    background: linear-gradient(180deg, rgba(67, 97, 238, 0.65) 0%, rgba(114, 9, 183, 0.62) 45%, rgba(6, 214, 160, 0.58) 80%, rgba(245, 158, 11, 0.54) 100%);
    box-shadow: 0 0 10px rgba(114, 9, 183, 0.18);
}

.realtime-bar.yesterday:hover {
    box-shadow: 0 0 22px rgba(114, 9, 183, 0.35);
    transform: scaleY(1.02);
}

.realtime-bar.today {
    background: linear-gradient(180deg, rgba(67, 97, 238, 0.95) 0%, rgba(114, 9, 183, 0.9) 45%, rgba(6, 214, 160, 0.86) 75%, rgba(245, 158, 11, 0.80) 100%);
    box-shadow: 0 0 14px rgba(0, 245, 212, 0.22);
}

.realtime-bar.today:hover {
    box-shadow: 0 0 26px rgba(0, 245, 212, 0.38);
    transform: scaleY(1.02);
}

@keyframes realtimeBarShimmer {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 220% 0%;
    }
}

.realtime-hour-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    height: 14px;
}

.realtime-x-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-left: 60px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 2;
}

.realtime-cursor-tooltip {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, calc(-100% - 14px));
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(0, 245, 212, 0.28);
    border-radius: 10px;
    padding: 8px 10px;
    opacity: 0;
    transition: opacity 0.12s ease;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 22px rgba(0, 245, 212, 0.12);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.realtime-cursor-tooltip.visible {
    opacity: 1;
}

.realtime-cursor-tooltip[data-dir="below"] {
    transform: translate(-50%, 14px);
}

.realtime-tooltip-kind {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 700;
    line-height: 1.2;
}

.realtime-tooltip-value {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 900;
    color: #e0f2fe;
    line-height: 1.2;
    letter-spacing: -0.1px;
}

/* Animation for bars appearing */
.realtime-bar-group {
    animation: fadeInBar 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInBar {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.realtime-bar-group:nth-child(1) {
    animation-delay: 0.02s;
}

.realtime-bar-group:nth-child(2) {
    animation-delay: 0.04s;
}

.realtime-bar-group:nth-child(3) {
    animation-delay: 0.06s;
}

.realtime-bar-group:nth-child(4) {
    animation-delay: 0.08s;
}

.realtime-bar-group:nth-child(5) {
    animation-delay: 0.10s;
}

.realtime-bar-group:nth-child(6) {
    animation-delay: 0.12s;
}

.realtime-bar-group:nth-child(7) {
    animation-delay: 0.14s;
}

.realtime-bar-group:nth-child(8) {
    animation-delay: 0.16s;
}

.realtime-bar-group:nth-child(9) {
    animation-delay: 0.18s;
}

.realtime-bar-group:nth-child(10) {
    animation-delay: 0.20s;
}

.realtime-bar-group:nth-child(11) {
    animation-delay: 0.22s;
}

.realtime-bar-group:nth-child(12) {
    animation-delay: 0.24s;
}

.realtime-bar-group:nth-child(13) {
    animation-delay: 0.26s;
}

.realtime-bar-group:nth-child(14) {
    animation-delay: 0.28s;
}

.realtime-bar-group:nth-child(15) {
    animation-delay: 0.30s;
}

.realtime-bar-group:nth-child(16) {
    animation-delay: 0.32s;
}

.realtime-bar-group:nth-child(17) {
    animation-delay: 0.34s;
}

.realtime-bar-group:nth-child(18) {
    animation-delay: 0.36s;
}

.realtime-bar-group:nth-child(19) {
    animation-delay: 0.38s;
}

.realtime-bar-group:nth-child(20) {
    animation-delay: 0.40s;
}

.realtime-bar-group:nth-child(21) {
    animation-delay: 0.42s;
}

.realtime-bar-group:nth-child(22) {
    animation-delay: 0.44s;
}

.realtime-bar-group:nth-child(23) {
    animation-delay: 0.46s;
}

.realtime-bar-group:nth-child(24) {
    animation-delay: 0.48s;
}



/* Smart Tooltip Positioning - Edge Detection */
.trend-value-card.pos-center {
    transform: translate(-50%, -130%);
}

.trend-value-card.pos-center.visible {
    transform: translate(-50%, -140%);
}

.trend-value-card.pos-left {
    transform: translate(-10%, -130%);
}

.trend-value-card.pos-left.visible {
    transform: translate(-10%, -140%);
}

.trend-value-card.pos-right {
    transform: translate(-90%, -130%);
}

.trend-value-card.pos-right.visible {
    transform: translate(-90%, -140%);
}

/* Vertical positioning - show below point if near top */
.trend-value-card.pos-below {
    transform: translate(-50%, 30%);
}

.trend-value-card.pos-below.visible {
    transform: translate(-50%, 40%);
}

.trend-value-card.pos-left.pos-below {
    transform: translate(-10%, 30%);
}

.trend-value-card.pos-left.pos-below.visible {
    transform: translate(-10%, 40%);
}

.trend-value-card.pos-right.pos-below {
    transform: translate(-90%, 30%);
}

.trend-value-card.pos-right.pos-below.visible {
    transform: translate(-90%, 40%);
}

/* Disable float animation for edge-positioned cards to prevent jitter */
.trend-value-card.pos-left.visible,
.trend-value-card.pos-right.visible,
.trend-value-card.pos-below.visible {
    animation: none;
}


/* ========================================
   Generic Components (Master Panel & Others)
   ======================================== */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.card-body {
    padding: 20px;
}

.card-body.p-0 {
    padding: 0;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    white-space: nowrap;
}

.table-hover tbody tr:hover {
    background: var(--bg-tertiary);
}

.table-responsive {
    overflow-x: auto;
}

/* Forms & Inputs */
.form-control,
.search-box input,
.filter-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s;
}

.form-control:focus,
.search-box input:focus,
.filter-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-tertiary);
}

.search-box input {
    padding-left: 36px;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 14px;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline-primary:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

.btn-outline-danger:hover {
    background: var(--color-error);
    color: white;
}/ *   T V   M o d e   H i d d e n   * /  
 
#tvView { display: none !important; }
#tvView.active-view { display: flex !important; }
# t v V i e w   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   v i s i b i l i t y :   h i d d e n   ! i m p o r t a n t ;   h e i g h t :   0   ! i m p o r t a n t ;   o v e r f l o w :   h i d d e n   ! i m p o r t a n t ;   }  
 