:root {
    --primary-blue: #3b82f6;
    --primary-blue-soft: rgba(59, 130, 246, 0.12);
    --primary-blue-glow: rgba(59, 130, 246, 0.25);
    --emerald: #10b981;
    --emerald-soft: rgba(16, 185, 129, 0.12);
    --emerald-glow: rgba(16, 185, 129, 0.25);
    --rose: #f43f5e;
    --rose-soft: rgba(244, 63, 94, 0.1);
    --bg-canvas: #eef2f7;
    --glass-bg: rgba(255, 255, 255, 0.33);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.07);
    --glass-shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --sidebar-width: 270px;
    --header-height: 72px;
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 22px;
}

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

html {
    font-family:
        "Plus Jakarta Sans",
        -apple-system,
        sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-canvas);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Canvas BG */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(
            ellipse 80% 50% at 20% 40%,
            rgba(59, 130, 246, 0.07),
            transparent
        ),
        radial-gradient(
            ellipse 60% 40% at 80% 60%,
            rgba(16, 185, 129, 0.05),
            transparent
        ),
        radial-gradient(
            ellipse 50% 30% at 50% 100%,
            rgba(59, 130, 246, 0.04),
            transparent
        );
    pointer-events: none;
    z-index: 0;
}

/* ─── LAYOUT ─── */
.app {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ─── SIDEBAR OVERLAY (mobile) ─── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    z-index: 98;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease-smooth);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.sidebar {
    position: fixed;
    left: 20px;
    top: 20px;
    bottom: 20px;
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow:
        var(--glass-shadow),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    z-index: 100;
    overflow: hidden;
    transition:
        transform 0.4s var(--ease-smooth),
        box-shadow 0.3s;
    scrollbar-width: none;
}
.sidebar-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.sidebar-body::-webkit-scrollbar {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.brand-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(
        135deg,
        var(--text-primary),
        var(--primary-blue)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.nav-section {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.nav-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    padding-left: 12px;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.25s var(--ease-smooth);
    position: relative;
    cursor: pointer;
    white-space: nowrap;
}

.nav-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 18px;
    background: linear-gradient(to bottom, var(--primary-blue), #60a5fa);
    border-radius: 0 4px 4px 0;
    transition: transform 0.3s var(--ease-bounce);
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.06);
    color: var(--text-primary);
    transform: translateX(3px);
}

.nav-item.active {
    background: var(--primary-blue-soft);
    color: var(--primary-blue);
}

.nav-item.active::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    opacity: 1;
}

/* ─── MAIN ─── */
.main {
    flex: 1;
    margin-left: calc(var(--sidebar-width) + 40px);
    padding: 20px 20px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    transition: margin-left 0.4s var(--ease-smooth);
}

/* ─── HEADER ─── */
.header {
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 20px;
    z-index: 50;
    gap: 12px;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.6);
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
}

.menu-toggle:hover {
    background: white;
    color: var(--primary-blue);
    box-shadow: 0 4px 12px var(--primary-blue-glow);
}

.search-global {
    position: relative;
    flex: 1;
    max-width: 300px;
    min-width: 0;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 40px;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-xl);
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.25s var(--ease-smooth);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-input:focus {
    outline: none;
    background: white;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 0 4px var(--primary-blue-soft);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
    position: relative;
}

.header-btn:hover {
    background: white;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 12px var(--primary-blue-glow);
    transform: translateY(-2px);
    color: var(--primary-blue);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--rose);
    border-radius: 999px;
    border: 2px solid white;
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.company-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 8px 14px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
    white-space: nowrap;
}

.company-dropdown:hover {
    background: white;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.company-arrow {
    color: var(--text-tertiary);
}

.avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--emerald), #34d399);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 4px 12px var(--emerald-glow);
}

/* ─── CONTENT ─── */
.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ─── HERO ─── */
.hero-section {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--glass-shadow);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    height: 380px;
    background: radial-gradient(
        circle,
        rgba(59, 130, 246, 0.08),
        transparent 70%
    );
    filter: blur(50px);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 22px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px; /* Default MD size */
    border-radius: var(--radius-xl);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
    border: 1px solid transparent; /* Untuk mencegah pergeseran layout saat ada border */
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
}

/* ─── BUTTON STATES ─── */
.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

/* ─── BUTTON VARIANTS ─── */

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), #60a5fa);
    color: white;
    box-shadow: 0 4px 16px var(--primary-blue-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-blue-glow);
    filter: brightness(1.05);
}

/* Secondary Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
    background: white;
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Success Button (Menggunakan variabel --emerald) */
.btn-success {
    background: linear-gradient(135deg, var(--emerald), #34d399);
    color: white;
    box-shadow: 0 4px 16px var(--emerald-glow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--emerald-glow);
    filter: brightness(1.05);
}

/* Danger Button (Menggunakan variabel --rose) */
.btn-danger {
    background: linear-gradient(135deg, var(--rose), #fb7185);
    color: white;
    box-shadow: 0 4px 16px rgba(244, 63, 94, 0.25);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(244, 63, 94, 0.35);
    filter: brightness(1.05);
}

/* Outline Button */
.btn-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue-soft);
    transform: translateY(-2px);
}

/* ─── BUTTON SIZES ─── */

/* Small (sm) */
.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: var(--radius-lg);
    gap: 5px;
}

/* Medium (md) - Merupakan default dari .btn */
.btn-md {
    padding: 10px 20px;
    font-size: 13.5px;
    border-radius: var(--radius-xl);
}

/* Large (lg) */
.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: var(--radius-2xl);
    gap: 10px;
}

/* Extra Large (xl) */
.btn-xl {
    padding: 18px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--radius-2xl);
    gap: 12px;
}

/* ─── BUTTON WITH ICON ONLY ─── */
.btn-icon {
    padding: 0;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

.btn-icon.btn-lg {
    width: 48px;
    height: 48px;
}

.btn-icon.btn-xl {
    width: 56px;
    height: 56px;
}

/* ─── OFFCANVAS ─── */

.offcanvas {
    position: fixed;
    bottom: 0;
    z-index: 1045;
    display: flex;
    max-height: 100vh;
    flex-direction: column;
    max-width: 100%;
    visibility: hidden;
    transition:
        transform 0.3s ease-in-out,
        visibility 0.3s ease-in-out;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--glass-shadow);
    padding: 24px;
    margin: 20px;
}

/* Posisi Offcanvas Kiri */
.offcanvas-start {
    top: 0;
    left: 0;
    width: 40vw;
    transform: translateX(-100%);
}

/* Posisi Offcanvas Kanan */
.offcanvas-end {
    top: 0;
    right: 0;
    width: 40vw;
    transform: translateX(100%);
}

/* State saat Offcanvas Terbuka */
.offcanvas.show {
    visibility: visible;
    transform: translateX(0);
}

/* Backdrop / Latar Belakang Gelap */
.offcanvas-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.3s var(--ease-smooth),
        visibility 0.3s var(--ease-smooth);
    padding: 20px;
}

.offcanvas-backdrop.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.offcanvas-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.offcanvas-body {
    flex-grow: 1;
    padding-top: 24px;
    overflow-y: auto;
    scrollbar-width: none;
}
.offcanvas-body::-webkit-scrollbar {
    display: none;
}

.offcanvas-md {
    width: 55vw;
}

.offcanvas-lg {
    width: 75vw;
}

@media (max-width: 960px) {
    .offcanvas-md,
    .offcanvas-lg {
        width: 80vw;
    }
}

@media (max-width: 600px) {
    .offcanvas-md,
    .offcanvas-lg {
        width: 90vw;
    }
}
/* Tombol Close */
.btn-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s ease;
}

.btn-close:hover {
    color: #dc3545;
}

/* ─── STAT CARDS ─── */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--glass-shadow);
    padding: 22px;
    transition: all 0.6s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card:nth-child(1) {
    transform: translateY(0);
}
.stat-card:nth-child(2) {
    transform: translateY(-8px);
}
.stat-card:nth-child(3) {
    transform: translateY(6px);
}
.stat-card:nth-child(4) {
    transform: translateY(-4px);
}

.stat-card:hover {
    transform: translateY(-12px);
    box-shadow:
        var(--glass-shadow-lg),
        0 0 40px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.stat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-icon-wrap {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrap.blue {
    background: linear-gradient(135deg, var(--primary-blue), #60a5fa);
    box-shadow: 0 8px 20px var(--primary-blue-glow);
}
.stat-icon-wrap.emerald {
    background: linear-gradient(135deg, var(--emerald), #34d399);
    box-shadow: 0 8px 20px var(--emerald-glow);
}
.stat-icon-wrap.rose {
    background: linear-gradient(135deg, var(--rose), #fb7185);
    box-shadow: 0 8px 20px rgba(244, 63, 94, 0.2);
}
.stat-icon-wrap.amber {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}
.stat-icon-wrap svg {
    color: white;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 20px;
}

.trend-up {
    background: var(--emerald-soft);
    color: var(--emerald);
}
.trend-down {
    background: var(--rose-soft);
    color: var(--rose);
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

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

/* ─── DASHBOARD GRID ─── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    align-items: start;
}

/* ─── CHART CARD ─── */
.chart-card,
.transactions-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--glass-shadow);
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-legend {
    display: flex;
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot.income {
    background: var(--emerald);
    box-shadow: 0 0 6px var(--emerald-glow);
}
.legend-dot.expense {
    background: var(--rose);
}

/* ─── CHART ─── (THE FIX) ─── */
.chart-wrapper {
    position: relative;
    width: 100%;
}

.chart-y-labels {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.y-label {
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1;
}

.chart-area {
    padding-left: 40px;
}

.chart-container {
    height: 240px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding-top: 12px;
    position: relative;
}

/* Grid lines */
.chart-container::before {
    content: "";
    position: absolute;
    inset: 12px 0 0 0;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 100% 25%;
    pointer-events: none;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
}

.chart-bars {
    width: 100%;
    height: calc(100% - 20px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
}

.bar {
    flex: 1;
    max-width: 20px;
    border-radius: 5px 5px 0 0;
    transition: all 0.4s var(--ease-bounce);
    cursor: pointer;
    min-height: 4px;
}

.bar:hover {
    filter: brightness(1.12);
    transform: scaleY(1.04) scaleX(1.08);
    transform-origin: bottom;
}

.bar-income {
    background: linear-gradient(to top, var(--emerald), #6ee7b7);
    box-shadow: 0 -4px 10px var(--emerald-glow);
}
.bar-expense {
    background: linear-gradient(to top, var(--rose), #fda4af);
}

.bar-label {
    font-size: 11.5px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-paid {
    background: var(--emerald-soft);
    color: var(--emerald);
}
.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}
.status-overdue {
    background: var(--rose-soft);
    color: var(--rose);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section {
    animation: fadeInUp 0.55s var(--ease-smooth) 0.08s both;
}
.stat-card:nth-child(1) {
    animation: fadeInUp 0.55s var(--ease-smooth) 0.14s both;
}
.stat-card:nth-child(2) {
    animation: fadeInUp 0.55s var(--ease-smooth) 0.19s both;
}
.stat-card:nth-child(3) {
    animation: fadeInUp 0.55s var(--ease-smooth) 0.24s both;
}
.stat-card:nth-child(4) {
    animation: fadeInUp 0.55s var(--ease-smooth) 0.29s both;
}
.chart-card {
    animation: fadeInUp 0.55s var(--ease-smooth) 0.34s both;
}
.transactions-panel {
    animation: fadeInUp 0.55s var(--ease-smooth) 0.39s both;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--glass-shadow);
    padding: 24px;
}

.card-header-wrap {
    margin-bottom: 4px;
    padding-bottom: 4px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.card-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
/* ─── FILE INPUT STYLING ─── */
.form-control-file {
    padding: 0 14px;
    line-height: 40px;
    cursor: pointer;
    color: var(--text-secondary);
}

.form-control-file:hover {
    color: var(--text-primary);
}

.form-control-file::-webkit-file-upload-button,
.form-control-file::file-selector-button {
    vertical-align: middle;
    margin-left: -8px;
    margin-right: 12px;
    margin-top: -2px;

    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.form-control-file::-webkit-file-upload-button:hover,
.form-control-file::file-selector-button:hover {
    background: linear-gradient(135deg, var(--primary-blue), #60a5fa);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--primary-blue-glow);
    transform: translateY(-1px);
}
/* Form Elements */
.form-group {
    margin-bottom: 18px;
}

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

.form-control {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    background: rgba(241, 245, 249, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.25s var(--ease-smooth);
}

.form-control:focus {
    outline: none;
    background: white;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 0 4px var(--primary-blue-soft);
}

textarea.form-control {
    height: auto;
    padding: 12px 14px;
    resize: vertical;
}

.input-amount {
    font-size: 1.3em;
    font-weight: 800;
    text-align: center;
    color: #0f172a;
    border: 2px solid #e8e9bb;
}

input[type="date"].form-control {
    position: relative;
    padding-right: 14px;
    color: var(--text-secondary);
}

input[type="date"].form-control:focus,
input[type="date"].form-control:valid {
    color: var(--text-primary);
}

input[type="date"].form-control::-webkit-calendar-picker-indicator {
    background-color: transparent;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s var(--ease-smooth);
}

input[type="date"].form-control::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    filter: invert(44%) sepia(97%) saturate(3023%) hue-rotate(204deg)
        brightness(98%) contrast(92%);
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23475569%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    cursor: pointer;
    padding-right: 40px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-smooth);
    padding: 20px;
}

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

.modal-container {
    width: 100%;
    max-width: 500px;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s var(--ease-smooth);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
}

.modal-close:hover {
    background: rgba(244, 63, 94, 0.1);
    color: var(--rose);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.custom-dropdown {
    position: relative;
    display: inline-block;
}

.custom-dropdown .dropdown-trigger {
    cursor: pointer;
    user-select: none;
}

.dropdown-menu {
    display: none;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid #eaeaea;
    border-radius: 8px;
    z-index: 999999;
    overflow: hidden;
}

.dropdown-item {
    color: #333333;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f9fafb;
}

@media (max-width: 1280px) {
    :root {
        --sidebar-width: 250px;
    }
}

/* 1100px – collapse stats to 2 col */
@media (max-width: 1100px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-card:nth-child(1),
    .stat-card:nth-child(2),
    .stat-card:nth-child(3),
    .stat-card:nth-child(4) {
        transform: none;
    }
    .stat-card:hover {
        transform: translateY(-8px);
    }
}

/* 960px – stack dashboard grid */
@media (max-width: 960px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .offcanvas-start,
    .offcanvas-end {
        width: 75vw;
    }
}

/* 860px – mobile sidebar */
@media (max-width: 860px) {
    .sidebar {
        transform: translateX(calc(-100% - 30px));
        left: 20px;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow:
            var(--glass-shadow-lg),
            0 0 0 1px rgba(0, 0, 0, 0.02);
    }

    .sidebar-overlay {
        display: block;
    }

    .menu-toggle {
        display: flex;
    }

    .main {
        margin-left: 0;
        padding: 16px;
    }

    .company-name {
        display: none;
    }

    .company-dropdown {
        padding: 8px;
    }

    .nav-item {
        padding: 14px 16px;
        font-size: 15px;
        gap: 14px;
        margin-bottom: 4px;
    }

    .nav-icon {
        width: 20px;
        height: 20px;
        min-width: 20px;
    }

    .nav-label {
        margin-top: 10px;
        font-size: 11.5px;
    }
    .offcanvas-start,
    .offcanvas-end {
        width: 75vw;
    }
}

/* 600px – single stat column, hide company label */
@media (max-width: 600px) {
    .stats-container {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .hero-section {
        padding: 22px;
    }
    .hero-title {
        font-size: 21px;
    }

    .stat-value {
        font-size: 20px;
    }
    .stat-card {
        padding: 16px;
    }

    .chart-card,
    .transactions-panel {
        padding: 18px;
    }

    .offcanvas-start,
    .offcanvas-end {
        width: 85vw;
    }
}

@media (max-width: 420px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    .header-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}
.affiliator-main {
    padding-top: 70px;
    padding-bottom: 70px;
}
body.role-admin .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
}

body.role-affiliator .sidebar {
    display: none;
}

body.role-affiliator .main.affiliator-main {
    max-width: 804px;
    margin: 0 auto;
    margin-bottom: 70px;
    padding: 15px;
    width: 100%;
}

body.role-affiliator .stats-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

body.role-affiliator .header {
    padding: 0 15px;
}

body.role-affiliator .search-global {
    display: none;
}

@media (min-width: 576px) {
    body.role-affiliator .stats-container {
        grid-template-columns: 1fr 1fr;
    }
    body.role-affiliator .main.affiliator-main {
        padding: 20px;
    }
}

@media (min-width: 992px) {
    body.role-affiliator .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    body.role-affiliator .main.affiliator-main {
        padding: 30px 10%;
    }
}

.bottom-nav {
    position: fixed;
    bottom: 20px;
    max-width: 560px;
    left: 0;
    right: 0;
    margin: 0 auto;
    height: 70px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--glass-shadow-lg);
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
    transition: transform 0.4s var(--ease-smooth);
    justify-content: space-between;
    flex-shrink: 0;
}

.nav-item-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-tertiary);
    flex: 1;
    height: 100%;
    transition: all 0.25s var(--ease-smooth);
}

.nav-item-bottom span {
    font-size: 10px;
    font-weight: 600;
}

.nav-item-bottom .nav-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.3s var(--ease-bounce);
}

.nav-item-bottom.active {
    color: var(--primary-blue);
}

.nav-item-bottom.active .nav-icon {
    transform: translateY(-4px);
}

@media (max-width: 860px) {
    body.role-affiliator .main {
        padding-bottom: 100px;
    }
}
.back-btn {
    border: none;
    background: transparent;
    box-shadow: none;
    color: var(--text-primary);
}

.back-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateX(-3px);
}

.subpage-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
    margin: 0;
}

@media (max-width: 860px) {
    body.role-affiliator:not(.is-subpage) .main {
        padding-bottom: 100px;
    }
    body.role-affiliator.is-subpage .main {
        padding-bottom: 20px;
    }
    .bottom-nav {
        left: 15px;
        right: 15px;
    }
}

.alert-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;

    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    padding: 24px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    min-width: 280px;
    text-align: center;
    animation: popInAlertFixed 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
        forwards;
}
.alert-title {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-blue);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.alert-text {
    margin: 0 0 24px 0;
    font-size: 15px;
    color: #000000;
    line-height: 1.5;
}

.alert-button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s;
}

.alert-button:active {
    opacity: 0.8;
}

.alert-btn-success {
    background-color: #28a745;
}
.alert-btn-error {
    background-color: #dc3545;
}
.alert-btn-warning {
    background-color: #ffc107;
    color: #333;
}
.alert-btn-info {
    background-color: #0dcaf0;
    color: #fff;
}

@keyframes popInAlertFixed {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes popOutAlertFixed {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}
@media (max-width: 400px) {
    .alert-box {
        padding: 20px;
    }
    .alert-title {
        font-size: 20px;
    }
    .alert-text {
        font-size: 14px;
    }
}

.dropzone-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dropzone {
    border: 2px dashed var(--text-tertiary);
    border-radius: var(--radius-2xl);
    padding: 60px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s var(--ease-bounce);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary-blue);
    background: var(--primary-blue-soft);
}

.dropzone.dragover {
    transform: scale(1.02);
}

.dropzone-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px auto;
    color: var(--primary-blue);
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glass-shadow);
}

.dropzone-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dropzone-subtext {
    font-size: 13.5px;
    color: var(--text-secondary);
}

.file-requirements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.3s var(--ease-smooth);
}

.file-item.ready {
    border-color: var(--emerald);
    background: var(--emerald-soft);
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    width: 32px;
    height: 32px;
    background: rgba(15, 23, 42, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.file-item.ready .file-icon {
    background: var(--emerald);
    color: white;
}

.file-name-req {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.file-status {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
}

.file-status.success {
    color: var(--emerald);
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 20px;
}

/* ─── GLASSMORPHISM DATATABLES WRAPPER ─── */
.glass-datatable-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--glass-shadow);
    padding: 24px;
    transition: all 0.4s var(--ease-smooth);
}

/* ─── TABLE STYLING ─── */
table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
    border: none !important;
    margin-top: 16px !important;
    margin-bottom: 16px !important;
}

table.dataTable thead th {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 14px 16px;
    border-top: none !important;
}

table.dataTable tbody td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    padding: 14px 16px;
    vertical-align: middle;
    background: transparent !important;
}

table.dataTable.no-footer {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* Hover Effect pada Baris */
table.dataTable tbody tr {
    background-color: transparent !important;
    transition: background-color 0.25s var(--ease-smooth);
}
table.dataTable tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.5) !important;
}
.glass-datatable-wrapper,
.dataTables_scrollBody {
    overflow: visible !important;
}
/* ─── CONTROLS (SEARCH & LENGTH) ─── */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: rgba(241, 245, 249, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-xl);
    padding: 8px 14px;
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: all 0.25s var(--ease-smooth);
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    background: white;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 0 4px var(--primary-blue-soft);
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

/* ─── INFO & PAGINATION ─── */
.dataTables_wrapper .dataTables_info {
    color: var(--text-tertiary) !important;
    font-size: 12.5px;
    padding-top: 12px !important;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 12px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-secondary) !important;
    padding: 6px 14px !important;
    margin-left: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s var(--ease-smooth);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled) {
    background: white !important;
    color: var(--primary-blue) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 4px 12px var(--primary-blue-glow) !important;
    transform: translateY(-2px);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(
        135deg,
        var(--primary-blue),
        #60a5fa
    ) !important;
    color: white !important;
    border: 1px solid transparent !important;
    box-shadow: 0 4px 16px var(--primary-blue-glow) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.task-action-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-decoration: none;
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    margin-bottom: 12px;
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.task-action-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

.task-action-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    margin-right: 16px;
    flex-shrink: 0;
}

.task-action-content {
    flex-grow: 1;
}

.task-action-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.task-action-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.task-action-chevron {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: transform 0.2s ease;
}

.task-action-item:hover .task-action-chevron {
    transform: translateX(4px);
    color: var(--primary-blue);
}
.shipping-info-box {
    background-color: #f4f8ff;
    border: 1px solid #dce8ff;
    border-radius: 8px;
    padding: 16px;
    position: relative;
}

.tracking-timeline {
    position: relative;
    padding-left: 24px;
    margin-top: 16px;
}
.tracking-timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 0;
    width: 2px;
    background-color: #e2e8f0;
}
.timeline-item {
    position: relative;
    margin-bottom: 20px;
}
.timeline-item:last-child {
    margin-bottom: 0;
}
.timeline-item::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cbd5e1;
    border: 2px solid white;
    z-index: 1;
}
.timeline-item.completed::before {
    background-color: #16a34a;
}
.timeline-item.current::before {
    background-color: #3b82f6;
    box-shadow: 0 0 0 3px #dbeafe;
}
.timeline-item.pending::before {
    background-color: #f1f5f9;
    border: 2px solid #cbd5e1;
}

.timeline-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
}
.timeline-item.pending .timeline-title {
    color: var(--text-secondary, #94a3b8);
}
.timeline-date {
    font-size: 11px;
    color: var(--text-secondary, #64748b);
    margin-top: 2px;
}
.rejection-info-box {
    background-color: var(--rose-soft, #fff1f2);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 8px;
    padding: 16px;
}

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth);
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.95);
    transition: transform 0.3s var(--ease-smooth);
}

.lightbox-overlay.active .lightbox-container {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.lightbox-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: calc(90vh - 40px);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow-lg);
    object-fit: contain;
    background: var(--glass-bg);
}

.glass-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
    font-size: 14px;
}
.glass-table th {
    padding: 12px 8px;
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
}
.glass-table td {
    padding: 16px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}
.glass-table tbody tr:hover td {
    background-color: rgba(0, 0, 0, 0.02);
}

.glass-grid-layout {
    display: grid;
    grid-template-columns: var(--grid-cols);
    gap: var(--grid-gap);
    margin-bottom: var(--grid-mb);
}
@media (max-width: 1024px) {
    .glass-grid-layout {
        grid-template-columns: 1fr;
    }
}

.glass-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.glass-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.glass-card-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    cursor: pointer;
}
.glass-card-link {
    font-size: 13px;
    color: var(--primary-blue, #3b82f6);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}
.glass-card-link:hover {
    text-decoration: underline;
}

.funnel-step-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.funnel-bar {
    background: rgba(42, 87, 210, 0.4);
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.15));
    border-radius: 4px;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}
.funnel-bar:hover {
    background: rgba(255, 255, 255, 0.7);
}
.funnel-title {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}
.funnel-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}
.funnel-connector {
    height: 40px;
    border-left: 1px dashed var(--glass-border, rgba(0, 0, 0, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
}
.funnel-percentage {
    background: var(--glass-bg, rgba(43, 70, 228, 0.8));
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transform: translateX(-50%);
}

.glass-metric-card {
    background: var(--glass-bg, rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    border-radius: var(--radius-lg, 12px);
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.metric-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary, #64748b);
    font-weight: 600;
}
.metric-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.metric-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    margin-bottom: 4px;
}
.metric-subtext {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
}
.glass-tab-item {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    padding-bottom: 10px;
    position: relative;
    transition: color 0.2s ease;
}
.glass-tab-item:hover {
    color: var(--text-primary, #0f172a);
}
.glass-tab-item.active {
    color: var(--text-primary, #0f172a);
    font-weight: 700;
}
.glass-tab-item.active::after {
    content: "";
    position: absolute;
    bottom: -9px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary, #0f172a);
    border-radius: 3px 3px 0 0;
}

.glass-tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    margin-bottom: 24px;
    padding-bottom: 8px;
}
.glass-tabs-actions {
    display: flex;
    gap: 20px;
}
.glass-tabs {
    display: flex;
    gap: 24px;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #0f172a);
    cursor: pointer;
    user-select: none;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.toggle-input:checked + .toggle-slider {
    background-color: var(--primary-blue, #3b82f6);
}
.toggle-input:checked + .toggle-slider:before {
    transform: translateX(20px);
}
.toggle-input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}
.toggle-wrapper:has(.toggle-input:disabled) .toggle-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.bar-with-tooltip {
    position: relative;
    cursor: pointer;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.bar-with-tooltip:hover {
    opacity: 0.8;
    z-index: 99;
}

.bar-with-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.carousel-wrapper {
    margin-bottom: 24px;
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--glass-shadow-lg);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s var(--ease-bounce);
}

.carousel-slide {
    flex: 0 0 100%;
    display: block;
    text-decoration: none;
}

.carousel-btn-prev,
.carousel-btn-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    z-index: 10;
}

.carousel-btn-prev {
    left: 16px;
}

.carousel-btn-next {
    right: 16px;
}

.carousel-btn-prev:hover,
.carousel-btn-next:hover {
    background: rgba(0, 0, 0, 0.4);
}

.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    width: 24px;
    background: white;
}

.challenge-banner {
    background: linear-gradient(135deg, var(--primary-blue), #60a5fa);
    padding: 32px 40px;
    color: white;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.challenge-banner-glow {
    position: absolute;
    right: -40px;
    top: -40px;
    width: 250px;
    height: 250px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}

.challenge-banner-icon {
    position: absolute;
    right: 10%;
    bottom: -20px;
    font-size: 120px;
    opacity: 0.1;
    line-height: 1;
    transform: rotate(-15deg);
    pointer-events: none;
}

.challenge-banner-content {
    position: relative;
    z-index: 2;
    max-width: 70%;
}

.challenge-banner-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 12px;
    display: inline-block;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.challenge-banner-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.challenge-banner-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 18px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.challenge-banner-btn {
    font-size: 13.5px;
    font-weight: 700;
    background: white;
    color: var(--primary-blue);
    padding: 8px 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.challenge-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .challenge-banner-content {
        max-width: 100%;
    }
    .challenge-banner {
        padding: 24px;
    }
    .challenge-banner-title {
        font-size: 22px;
    }
}

.banner-inner {
    padding: 32px 40px;
    color: white;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.banner-ornament-circle {
    position: absolute;
    right: -40px;
    top: -40px;
    width: 250px;
    height: 250px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 70%
    );
    border-radius: 50%;
}

.banner-ornament-icon {
    position: absolute;
    right: 8%;
    bottom: -30px;
    opacity: 0.12;
    transform: rotate(-15deg);
    pointer-events: none;
}

.banner-ornament-icon svg {
    width: 180px;
    height: 180px;
    color: white;
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 70%;
}

.banner-tag {
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 12px;
    display: inline-block;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.banner-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.banner-description {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 18px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.banner-btn {
    font-size: 13.5px;
    font-weight: 700;
    background: white;
    color: var(--primary-blue);
    padding: 8px 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s var(--ease-smooth);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Menambahkan efek interaktif kecil saat banner di-hover */
.carousel-slide:hover .banner-btn {
    transform: translateX(4px);
}

/* Responsivitas untuk layar HP */
@media (max-width: 600px) {
    .banner-inner {
        padding: 24px;
        min-height: 180px;
    }
    .banner-content {
        max-width: 90%;
    }
    .banner-title {
        font-size: 20px;
    }
    .banner-ornament-icon svg {
        width: 120px;
        height: 120px;
    }
}

.header-section-mobile {
    margin-bottom: 24px;
}

.page-title-mobile {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.page-subtitle-mobile {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.search-container-mobile {
    margin-bottom: 30px;
}

.search-box-mobile {
    width: 100%;
    background-color: rgba(241, 245, 249, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.25s var(--ease-smooth);
}

.search-box-mobile:focus {
    outline: none;
    background: white;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 0 4px var(--primary-blue-soft);
}

.product-grid-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sentinel-mobile {
    padding: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.spinner-mobile {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--text-primary);
    border-radius: 50%;
    animation: spin-mobile 1s linear infinite;
    display: none;
}

@keyframes spin-mobile {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner-mobile.active {
    display: block;
}

@media (max-width: 600px) {
    .product-grid-mobile {
        grid-template-columns: 1fr;
    }
}
.card-img-container {
    aspect-ratio: 1/1;
    background: #eee;
    position: relative;
    overflow: hidden;
}

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

.card-info {
    padding: 12px;
}

.category-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    display: block;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
    line-height: 1.2;
}

.stock-info {
    font-size: 13px;
    color: #444;
}

.stock-out {
    color: #999;
}

.profile-header-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 32px;
    padding-top: 10px;
}

.profile-avatar-mobile {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background-color: rgba(241, 245, 249, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-tertiary);
}

.profile-avatar-mobile svg {
    width: 46px;
    height: 46px;
}

.profile-name-mobile {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-contact-mobile {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.profile-badge-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    background-color: rgba(241, 245, 249, 0.8);
    color: var(--text-primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.menu-list-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.menu-item-mobile {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.25s var(--ease-smooth);
}

.menu-item-mobile:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.menu-icon-box-mobile {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.menu-icon-box-mobile svg {
    width: 22px;
    height: 22px;
}

.menu-content-mobile {
    flex-grow: 1;
}

.menu-title-mobile {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.menu-subtitle-mobile {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.menu-chevron-mobile {
    color: var(--text-tertiary);
    margin-left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-chevron-mobile svg {
    width: 18px;
    height: 18px;
}

.logout-btn-mobile {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.25s var(--ease-smooth);
    cursor: pointer;
    font-family: inherit;
}
/* ─── CART SECTION (KERANJANG SAMPEL) ─── */
.cart-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cart-item-img {
    width: 68px;
    height: 68px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
    color: #cbd5e1;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 4px;
    line-height: 1.2;
}

.cart-item-meta {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 2px;
}

.cart-item-remove {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-item-remove:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.cart-divider {
    border-top: 1px dashed rgba(0, 0, 0, 0.2);
    margin: 24px 0;
}

.cart-summary-title {
    font-size: 16px;
    font-weight: 800;
    color: #000000;
    margin-bottom: 6px;
}

.cart-summary-subtitle {
    font-size: 15px;
    color: #64748b;
}

/* ─── CART BOTTOM BAR STICKY ─── */
.cart-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    z-index: 100;
}

body.role-affiliator .cart-bottom-bar {
    max-width: 804px;
    margin: 0 auto;
}

.btn-dark {
    background-color: #000000;
    color: #ffffff;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 2px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-dark:hover {
    background-color: #222222;
}
/* public/css/style.css */

.agreement-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.agreement-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
}

.agreement-checkbox {
    width: 22px;
    height: 22px;
    margin-top: 3px;
    accent-color: #000;
    cursor: pointer;
}

.agreement-content {
    flex: 1;
}

.agreement-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

.agreement-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.agreement-instruction {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 20px;
    border-left: 4px solid #e2e8f0;
}

.modal-footer .btn {
    flex: 1;
    border-radius: 4px;
    padding: 14px;
    font-weight: 700;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
}
.detail-timeline {
    position: relative;
    padding-left: 4px;
    margin-top: 10px;
}

.detail-timeline-item {
    position: relative;
    padding-left: 32px;
    padding-bottom: 24px;
}

.detail-timeline-item::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background-color: #cbd5e1;
}

.detail-timeline-item:last-child::before {
    display: none;
}

.detail-timeline-badge {
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: #ffffff;
    transition: all 0.2s ease;
}

.detail-timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cbd5e1;
}

.detail-timeline-item.completed .detail-timeline-badge {
    background-color: var(--primary-blue, #3b82f6);
    border-color: var(--primary-blue, #3b82f6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.detail-timeline-item.completed::before {
    background-color: var(--primary-blue, #3b82f6);
}

.detail-timeline-item.danger .detail-timeline-badge {
    background-color: var(--rose, #f43f5e);
    border-color: var(--rose, #f43f5e);
    box-shadow: 0 0 0 4px var(--rose-soft);
}

.detail-timeline-item.danger::before {
    background-color: #cbd5e1;
}

.detail-timeline-time {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
    white-space: nowrap;
}
.task-all-wrapper,
.task-completed-wrapper {
    will-change: transform, opacity;
}

#task-infinite-container {
    display: flex;
    flex-direction: column;
}

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

.help-trigger {
    font-size: 12px;
    color: var(--primary-blue, #3b82f6);
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
}
.help-trigger:hover {
    text-decoration: underline;
}
.form-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

@media print {
    .app {
        display: flex !important;
        flex-direction: column !important;
    }

    .sidebar {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: var(--radius-2xl) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
        margin-bottom: 20px !important;
        overflow: visible !important;
        display: flex !important;
    }

    .sidebar-overlay {
        display: none !important;
    }

    .main {
        margin-left: 0 !important;
        padding: 16px !important;
        width: 100% !important;
    }

    .bottom-nav {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 20px auto !important;
        max-width: 560px !important;
        display: flex !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--glass-bg) !important;
        border: 1px solid var(--glass-border) !important;
        border-radius: var(--radius-2xl) !important;
        box-shadow: none !important;
    }
}
