/* =====================================================
   DEZOITO K — Obsidian & 18K Gold Design System
   Luxury jewelry dashboard — refined editorial aesthetic
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,300;1,9..144,400;1,9..144,500&family=Bricolage+Grotesque:opsz,wght@12..96,300;12..96,400;12..96,500;12..96,600;12..96,700&display=swap');

/* ── Design Tokens ── */
:root {
    /* Base Transitions */
    --theme-transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;

    /* ── Core Palette: Warm Obsidian ── */
    --bg-dark: #070605;
    --bg-card: #0d0c0a;
    --bg-card-hover: #131109;

    /* ── 18K Gold Spectrum ── */
    --primary-yellow: #c9a227;
    --primary-yellow-light: #e8c97e;
    --primary-yellow-pale: #f5e9c4;
    --primary-yellow-glow: rgba(201, 162, 39, 0.12);
    --primary-yellow-glow-strong: rgba(201, 162, 39, 0.25);
    --gradient-primary: linear-gradient(135deg, #c9a227 0%, #8b6914 100%);

    /* ── Status Colors (refined, not neon) ── */
    --accent-red: #c0392b;
    --accent-red-glow: rgba(192, 57, 43, 0.2);
    --accent-green: #27ae60;
    --accent-green-glow: rgba(39, 174, 96, 0.2);
    --accent-blue: #2980b9;
    --accent-blue-glow: rgba(41, 128, 185, 0.2);
    --accent-yellow: #c9a227;
    --accent-yellow-glow: rgba(201, 162, 39, 0.2);

    /* ── Typography ── */
    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body: 'Bricolage Grotesque', 'Helvetica Neue', sans-serif;

    --text-white: #f0ebe0;
    --text-yellow: #e8c97e;
    --text-gray: #8a847a;
    --text-muted: #514d48;

    /* ── Structure ── */
    --border-color: #1e1c17;
    --border-gold: rgba(201, 162, 39, 0.18);
    --border-gold-strong: rgba(201, 162, 39, 0.35);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Legacy aliases — keep HTML compatibility */
    --accent-white: #f0ebe0;
    --accent-gray: #8a847a;
    --panel-black: #070605;
    --panel-black-2: #0d0c0a;
    --grid-gray: rgba(255, 255, 255, 0.06);
    --text-white-opaque: rgba(240, 235, 224, 0.9);
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: var(--theme-transition);
}

/* ── Body — warm obsidian with subtle gold radiance ── */
body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
    background-image:
        radial-gradient(ellipse 90% 60% at 15% 30%, rgba(201, 162, 39, 0.025) 0%, transparent 55%),
        radial-gradient(ellipse 70% 90% at 85% 85%, rgba(201, 162, 39, 0.015) 0%, transparent 55%);
}

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

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.sidebar {
    width: 272px;
    background: #09080600;
    background-color: #09080699;
    background: linear-gradient(180deg, #0c0b09 0%, #090806 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    background-image: linear-gradient(180deg, rgba(201, 162, 39, 0.025) 0%, transparent 35%);
}

.sidebar.collapsed {
    width: 72px;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 88px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    height: 52px;
    width: auto;
    transition: all 0.3s ease;
    display: block;
    filter: brightness(1.05) contrast(1.02);
}

.sidebar.collapsed .sidebar-logo {
    opacity: 0;
    pointer-events: none;
}

.sidebar.collapsed .toggle-btn {
    right: 50%;
    transform: translateY(-50%) translateX(50%);
}

.toggle-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 16px;
    background: rgba(201, 162, 39, 0.07);
    border: 1px solid var(--border-gold);
    color: var(--text-yellow);
    cursor: pointer;
    font-size: 17px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    z-index: 10;
}

.toggle-btn:hover {
    background: rgba(201, 162, 39, 0.14);
    border-color: var(--primary-yellow);
    color: var(--primary-yellow);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    align-items: stretch;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 13.5px;
    font-family: var(--font-body);
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
    border: 1px solid transparent;
    letter-spacing: 0.1px;
}

.nav-link i {
    font-size: 17px;
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-link:hover {
    background: rgba(201, 162, 39, 0.04);
    color: var(--text-white);
    border-color: rgba(201, 162, 39, 0.08);
}

.nav-link:hover i {
    opacity: 1;
}

.nav-link.active {
    background: rgba(201, 162, 39, 0.09);
    color: var(--primary-yellow-light);
    border-color: var(--border-gold);
    font-weight: 600;
}

.nav-link.active i {
    opacity: 1;
    color: var(--primary-yellow);
}

/* Gold left accent on active link */
.nav-link.active::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 22%;
    height: 56%;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-yellow), rgba(201, 162, 39, 0.3));
    border-radius: 0 2px 2px 0;
}

.sidebar.collapsed .link-text {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar.collapsed .nav-link i {
    margin: 0;
}

.sidebar-footer {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.theme-btn {
    width: 100%;
    cursor: pointer;
    border: 1px solid transparent;
}

/* ══════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════ */
.main-content {
    flex: 1;
    min-width: 0;
    background-color: var(--bg-dark);
}

.app-container {
    padding: 36px var(--spacing-xl);
    max-width: 1440px;
    margin: 0 auto;
}

/* ── Header ── */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
}

.page-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.3px;
    color: var(--text-white);
    line-height: 1.1;
}

/* ══════════════════════════════════════
   CARDS
══════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

/* Subtle top-left gold gleam */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Inner glow on hover */
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.04) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
}

.card:hover {
    border-color: var(--border-gold);
    transform: translateY(-3px);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(201, 162, 39, 0.07);
}

.card:hover::before {
    opacity: 1;
}

.card:hover::after {
    opacity: 1;
}

/* ══════════════════════════════════════
   KPI CARDS
══════════════════════════════════════ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

/* Staggered entrance animation */
.kpi-grid .card {
    animation: kpiReveal 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.kpi-grid .card:nth-child(1) { animation-delay: 0.04s; }
.kpi-grid .card:nth-child(2) { animation-delay: 0.09s; }
.kpi-grid .card:nth-child(3) { animation-delay: 0.14s; }
.kpi-grid .card:nth-child(4) { animation-delay: 0.19s; }
.kpi-grid .card:nth-child(5) { animation-delay: 0.24s; }
.kpi-grid .card:nth-child(6) { animation-delay: 0.29s; }
.kpi-grid .card:nth-child(7) { animation-delay: 0.34s; }
.kpi-grid .card:nth-child(8) { animation-delay: 0.39s; }

@keyframes kpiReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi-card .card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.icon-box {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(201, 162, 39, 0.07);
    border: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--primary-yellow);
    flex-shrink: 0;
}

/* ── Badges ── */
.badge {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    font-family: var(--font-body);
}

.badge.positive {
    background: rgba(39, 174, 96, 0.09);
    color: #6ddfa2;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.badge.healthy {
    background: rgba(39, 174, 96, 0.09);
    color: #6ddfa2;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.badge.warning {
    background: rgba(201, 162, 39, 0.09);
    color: var(--primary-yellow-light);
    border: 1px solid var(--border-gold);
}

.badge.danger {
    background: rgba(192, 57, 43, 0.09);
    color: #f48771;
    border: 1px solid rgba(192, 57, 43, 0.2);
}

.kpi-card .label {
    display: block;
    color: var(--text-gray);
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    font-family: var(--font-body);
    /* Override duplicate rule below */
    text-shadow: none;
}

/* KPI monetary values use display serif */
.kpi-card .value {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.05;
    letter-spacing: -0.5px;
}

.kpi-card .value i {
    font-size: 20px;
    opacity: 0.75;
}

.kpi-card .subtext {
    font-size: 11.5px;
    color: var(--text-muted);
    letter-spacing: 0.1px;
}

/* ── Status text colours ── */
.text-success {
    color: #6ddfa2 !important;
    text-shadow: 0 0 16px rgba(109, 223, 162, 0.15);
}

.text-danger {
    color: #f48771 !important;
    text-shadow: 0 0 16px rgba(244, 135, 113, 0.15);
}

.text-warning {
    color: var(--primary-yellow-light) !important;
    text-shadow: 0 0 16px var(--primary-yellow-glow);
}

.text-info {
    color: #70b0e0 !important;
    text-shadow: 0 0 16px rgba(112, 176, 224, 0.15);
}

.text-primary {
    color: var(--primary-yellow-light) !important;
    text-shadow: 0 0 16px var(--primary-yellow-glow);
}

.text-purple {
    color: var(--primary-yellow-light) !important;
    text-shadow: 0 0 16px var(--primary-yellow-glow);
}

/* ══════════════════════════════════════
   PERIOD SELECTOR / FILTERS
══════════════════════════════════════ */
.period-selector {
    display: flex;
    gap: var(--spacing-md);
}

.filter-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3px;
    display: flex;
    gap: 2px;
}

.period-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    padding: 7px 15px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.1px;
}

.period-btn:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.04);
}

.period-btn.active {
    background: var(--primary-yellow) !important;
    color: #07060400 !important;
    color: #0a0907 !important;
    font-weight: 700;
    box-shadow: 0 2px 14px var(--primary-yellow-glow-strong);
}

/* Light theme stubs (kept for compatibility) */
[data-theme="light"] .nav-link.active {
    color: #0a0907;
    background: var(--primary-yellow);
}

[data-theme="light"] .period-btn.active {
    background: var(--primary-yellow);
    color: #0a0907;
}

/* ── Date inputs ── */
.date-input {
    background: #0a0907 !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-white) !important;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s ease;
}

.date-input:focus {
    border-color: var(--border-gold) !important;
}

.apply-btn {
    background: var(--primary-yellow);
    color: #0a0907;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    height: 34px;
    display: flex;
    align-items: center;
    letter-spacing: 0.2px;
}

.apply-btn:hover {
    background: var(--primary-yellow-light);
    box-shadow: 0 4px 18px var(--primary-yellow-glow-strong);
}

.header-center {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    gap: 6px;
}

/* ══════════════════════════════════════
   USER AREA
══════════════════════════════════════ */
.user-area {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--text-white);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-info {
    text-align: right;
}

.user-info .name {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-white);
}

.user-info .role {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border-gold);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ══════════════════════════════════════
   DASHBOARD GRID & SECTIONS
══════════════════════════════════════ */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 500;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-white);
    line-height: 1.1;
}

.section-header h2 i {
    color: var(--primary-yellow);
    font-style: normal;
    font-size: 17px;
    opacity: 0.85;
}

/* Gold rule under sections */
.gold-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.35), transparent 70%);
    margin-bottom: var(--spacing-xl);
}

/* ══════════════════════════════════════
   CHARTS
══════════════════════════════════════ */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.charts-row-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: var(--spacing-lg);
}

.chart-card {
    padding: var(--spacing-lg);
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.chart-container {
    flex-grow: 1;
    position: relative;
    min-height: 260px;
}

.card-header {
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
}

.card-header h3 i {
    font-size: 16px;
    color: var(--primary-yellow);
    opacity: 0.75;
}

.chart-filters-container {
    background: rgba(255, 255, 255, 0.025);
    padding: 4px 10px;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.chart-filter-label {
    transition: all 0.2s ease;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 11.5px;
    color: var(--text-gray);
    cursor: pointer;
    font-family: var(--font-body);
}

.chart-filter-label:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white) !important;
}

.revenue-filter-checkbox {
    cursor: pointer;
    width: 13px;
    height: 13px;
    accent-color: var(--primary-yellow);
}

/* ══════════════════════════════════════
   TABLES
══════════════════════════════════════ */
.table-container {
    overflow-x: auto;
    margin-top: 10px;
}

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

.custom-table th {
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-body);
    white-space: nowrap;
}

.custom-table td {
    padding: 14px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-white);
    font-family: var(--font-body);
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.custom-table tbody tr:hover td {
    background: rgba(201, 162, 39, 0.025);
}

.custom-table tbody tr td:last-child {
    cursor: default;
}

/* ══════════════════════════════════════
   PAGINATION
══════════════════════════════════════ */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
    font-family: var(--font-body);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-arrow {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.pagination-arrow:hover {
    border-color: var(--border-gold);
    color: var(--primary-yellow-light);
}

.pagination-arrow:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 3px;
}

.pagination-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-gray);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.pagination-btn:hover {
    background: var(--bg-card);
    color: var(--text-white);
    border-color: var(--border-color);
}

.pagination-btn.active {
    background: var(--primary-yellow);
    color: #0a0907;
    font-weight: 700;
    box-shadow: 0 2px 12px var(--primary-yellow-glow-strong);
    border-color: transparent;
}

/* ══════════════════════════════════════
   PROFITABILITY / METRICS ROWS
══════════════════════════════════════ */
.bottom-row,
.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-lg);
}

.margin-cards,
.cash-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.margin-card,
.cash-card {
    padding: var(--spacing-md);
}

.margin-value h3,
.cash-card h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    margin: 8px 0;
    letter-spacing: -0.3px;
}

.warning-text {
    color: var(--primary-yellow-light);
    font-size: 11px;
}

/* ── Donut Chart ── */
.cost-breakdown {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.donut-chart-container {
    width: 150px;
    height: 150px;
}

/* ── Funnel ── */
.funnel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.funnel-step {
    width: 100%;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease;
}

.funnel-step:hover {
    border-color: var(--border-gold);
}

.funnel-connector {
    width: 1px;
    height: 10px;
    background: var(--border-color);
}

/* ══════════════════════════════════════
   MODAL
══════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 3, 2, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #0d0c0a;
    width: 90%;
    max-width: 780px;
    max-height: 90vh;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px var(--border-gold);
    transform: translateY(14px) scale(0.99);
    transition: all 0.38s cubic-bezier(0.23, 1, 0.32, 1);
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.04) 0%, transparent 60%);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 500;
    font-style: italic;
    color: var(--text-white);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 4px;
}

.close-modal:hover {
    color: var(--text-white);
}

.modal-content {
    padding: 28px;
    overflow-y: auto;
    max-height: calc(90vh - 76px);
}

.order-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.detail-item label {
    display: block;
    font-size: 9.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
    font-family: var(--font-body);
    font-weight: 600;
}

.detail-item span {
    font-size: 14.5px;
    color: var(--text-white);
    font-weight: 500;
}

.products-section {
    border-top: 1px solid var(--border-color);
    padding-top: 22px;
}

.products-section h4 {
    margin-bottom: 14px;
    font-size: 9.5px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-family: var(--font-body);
    font-weight: 700;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    transition: border-color 0.2s ease;
}

.product-item:hover {
    border-color: var(--border-gold);
}

.product-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.product-name {
    font-weight: 600;
    color: var(--text-white);
    font-size: 13.5px;
}

.product-price {
    color: var(--text-gray);
    font-weight: 500;
    font-size: 13.5px;
}

.order-total-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.total-display {
    text-align: right;
}

.total-label {
    font-size: 9.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-body);
    font-weight: 600;
}

.total-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 500;
    color: var(--primary-yellow-light);
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-top: 4px;
}

/* ══════════════════════════════════════
   PREMIUM CARD VARIANT
══════════════════════════════════════ */
.card.card-gold {
    background: linear-gradient(160deg, #0f0e0b, #09080600);
    background: linear-gradient(160deg, #0f0e0b 0%, #09080680 100%);
    border: 1px solid var(--border-gold);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(201, 162, 39, 0.04);
}

.gold-pill {
    background: rgba(201, 162, 39, 0.09);
    color: var(--primary-yellow-light);
    border: 1px solid var(--border-gold);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: 0.2px;
}

.card.card-gold .label,
.card.card-gold .subtext {
    color: var(--text-gray);
}

.card.card-gold .value {
    color: var(--text-white);
}

/* ══════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════ */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #1e1c17;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 162, 39, 0.28);
}
