/* ═══════════════════════════════════════════
   YUVENDA ARR Dashboard — Custom Styles
   ═══════════════════════════════════════════ */

/* ── Hamburger button ── */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;
    background: #1a1a2e;
    border: none;
    color: #fff;
    font-size: 24px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s ease;
}
.hamburger-btn:hover {
    background: #25254a;
}

/* ── Mobile responsive ── */
@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }
    #sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    #sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    }
    .main-content {
        margin-left: 0 !important;
        padding: 16px !important;
        padding-top: 56px !important;
    }
}

/* ── Sidebar nav links ── */
.nav-link-item {
    transition: background-color 0.2s ease, color 0.15s ease, border-left 0.15s ease;
    border-left: 3px solid transparent;
}
.nav-link-item:hover {
    background-color: rgba(255,255,255,0.06) !important;
    color: #fff !important;
}

/* ── Inline filter bar dropdowns ── */
.filter-bar .Select-control,
.filter-bar .dash-dropdown .Select-control {
    font-size: 12px !important;
    border-radius: 6px !important;
}

/* ── Card hover lift ── */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06) !important;
}

/* ── Dropdown focus accent ring ── */
.Select.is-focused > .Select-control {
    border-color: #1a5f3a !important;
    box-shadow: 0 0 0 2px rgba(26,95,58,0.15) !important;
}
.dash-dropdown .Select.is-open > .Select-control {
    border-color: #1a5f3a !important;
}

/* ── Tab content fade-in ── */
#tab-content > * {
    animation: fadeSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Table styling ── */

/* Zebra striping */
table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Row hover */
table tbody tr {
    transition: background-color 0.15s ease;
}
table tbody tr:hover {
    background-color: rgba(26,95,58,0.04) !important;
}

/* Sticky table header shadow on scroll */
table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #fff;
}

/* Dash DataTable overrides */
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td,
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner tr:hover td {
    background-color: rgba(26,95,58,0.04) !important;
}

/* ── Radio/toggle buttons ── */
.form-check-input:checked {
    background-color: #1a5f3a !important;
    border-color: #1a5f3a !important;
}
.form-check-input:focus {
    box-shadow: 0 0 0 2px rgba(26,95,58,0.2) !important;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Sidebar scrollbar (thinner, blends in) */
#sidebar::-webkit-scrollbar {
    width: 4px;
}
#sidebar::-webkit-scrollbar-track {
    background: transparent;
}
#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

/* ── KPI card accent borders (set dynamically via inline style) ── */
.kpi-positive {
    border-top: 4px solid #1a5f3a !important;
}
.kpi-negative {
    border-top: 4px solid #dc2626 !important;
}
.kpi-neutral {
    border-top: 4px solid #1a1a2e !important;
}

/* ── Chart container smooth resize ── */
.js-plotly-plot {
    transition: height 0.3s ease;
}

/* ── Checkbox styling ── */
.form-check-input[type="checkbox"]:checked {
    background-color: #1a5f3a !important;
    border-color: #1a5f3a !important;
}
