/* =========================================
   1. VARIABLES & RESET (DARK MODE DEFAULT)
   ========================================= */
:root {
    /* Backgrounds */
    --bg-body: #0d1117;
    --bg-card: #161b22;
    --sidebar-bg: #11141a;

    /* Brand Colors */
    --primary-green: #00d26a;
    --hero-green: #008f68;
    --chart-blue: #0047ff;
    --gold: #FFD700;
    --danger-red: #e63946;
    --btn-dark: #1f252e;

    /* Text Colors */
    --text-white: #ffffff;
    --text-gray: #8b949e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* NOTE: Transisi dihapus dari sini agar tidak kedip saat refresh */
body {
    background: var(--bg-body);
    color: var(--text-white);
    display: flex;
    min-height: 100vh;
}

/* =========================================
   2. SIDEBAR
   ========================================= */

.sidebar { 
    width: 260px;
    background: var(--sidebar-bg);
    padding: 25px;
    height: 100vh;
    position: fixed;
    border-right: 1px solid #1f252e;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

/* =========================================
   SIDEBAR LOGO
   ========================================= */

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 35px;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-green);
    letter-spacing: 0.5px;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-green);
}

/* =========================================
   MENU GROUP LABEL
   ========================================= */

.menu-label { 
    font-size: 11px;
    font-weight: 700;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 15px 0 10px 0;
}

/* =========================================
   NAV ITEM
   ========================================= */

.nav-item { 
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 5px;
    transition: 0.2s;
}

.nav-item svg { 
    width: 18px;
    height: 18px;
    fill: var(--text-gray);
    transition: 0.2s;
}

.nav-item:hover { 
    color: white;
    background: rgba(255,255,255,0.05);
}

.nav-item:hover svg { 
    fill: white;
}

/* =========================================
   NAV ITEM ACTIVE STATE
   ========================================= */

.nav-item.active { 
    background: var(--primary-green);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 210, 106, 0.3);
}

.nav-item.active svg { 
    fill: white;
}

/* =========================================
   SIDEBAR FOOTER
   ========================================= */

.sidebar-footer {
    margin-top: auto;
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #1f252e;
}

.btn-footer { 
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

.btn-dark-mode { 
    background: var(--btn-dark);
    color: white;
    border: 1px solid #30363d;
}

.btn-dark-mode:hover { 
    border-color: var(--text-gray);
}

.btn-logout { 
    background: var(--danger-red);
    color: white;
}

.btn-logout:hover { 
    filter: brightness(1.1);
}

/* =========================================
   3. CONTENT AREA (GENERAL)
   ========================================= */

.content {
    margin-left: 260px;
    padding: 30px;
    width: calc(100% - 260px);
}

/* =========================================
   TOP BAR & PAGE TITLE
   ========================================= */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.page-title h2 {
    font-size: 20px;
    font-weight: 700;
}

.page-title p {
    color: var(--text-gray);
    font-size: 14px;
}

/* =========================================
   ACTION BUTTONS
   ========================================= */

.btn-action-primary { 
    background: var(--primary-green);
    color: black;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.btn-action-primary:hover {
    transform: translateY(-2px);
}

.btn-action-outline { 
    background: transparent;
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.btn-action-outline:hover {
    background: var(--primary-green);
    color: black;
}

/* =========================================
   4. HERO CARD (NET WORTH) - MODERN
   ========================================= */

.hero-card { 
    background: linear-gradient(135deg, #00d26a 0%, #008f68 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 210, 106, 0.3);
    position: relative;
    overflow: hidden;
    border: none;
}

.hero-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
}

.hero-value {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 25px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Optional: Untuk efek lebih mewah */
.hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.hero-card > * {
    position: relative;
    z-index: 1;
}

/* =========================================
   HERO STAT PILL
   ========================================= */

.stats-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-pill {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 150px;
}

.pill-red {
    background: rgba(255, 0, 0, 0.25);
    color: #ffcccc;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
    display: block;
}

.stat-val {
    font-size: 16px;
    font-weight: 700;
}

/* =========================================
   5. CARDS & GRIDS
   ========================================= */

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-gray);
    margin-bottom: 15px;
}

/* =========================================
   GRID LAYOUT
   ========================================= */

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.grid-2-bottom {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
}

/* =========================================
   BASE CARD PANEL
   ========================================= */

.card-panel {
    background: var(--bg-card);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* =========================================
   BANK / ACCOUNT CARD
   ========================================= */

.bank-label {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.bank-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--text-white);
}

.bank-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
}

/* =========================================
   TOMBOL PANEN (GOLD BUTTON)
   ========================================= */

.btn-panen { 
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
    white-space: nowrap;
}

.btn-panen:hover {
    background: var(--gold);
    color: black;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* =========================================
   6. CHART & LEGEND
   ========================================= */

/* =========================================
   CHART CONTAINER
   ========================================= */

.chart-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    width: 100%; /* WAJIB: Agar container mengambil lebar penuh card */
}

/* AREA CHART: Diperbesar */
.donut-wrapper {
    position: relative;
    width: 160px;  /* Ukuran diperbesar dari 160px */
    height: 160px; /* Ukuran diperbesar dari 160px */
    flex-shrink: 0;
}

.donut-chart {
    width: 100%;
    height: 100%;
    border-radius: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Lingkaran dalam diperbesar agar proporsional */
.donut-inner {
    width: 80%; 
    height: 80%;
    background: var(--bg-card);
    border-radius: 50%;
}

.donut-inner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.inner-label {
    font-size: 10px;
    color: var(--text-gray);
}

.inner-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-white);
}

/* =========================================
   CHART LEGEND
   ========================================= */
.chart-legend {
    flex: 1; /* WAJIB: Mengambil semua sisa ruang di kanan chart */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Mendorong nominal ke pojok kanan */
    padding-bottom: 8px;
    border-bottom: 1px solid #30363d;
    width: 100%; /* Memastikan baris selebar area legend */
}

.legend-row:last-child {
    border-bottom: none;
}

/* INFO: Area Nama & Persentase */
.legend-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.l-green {
    background: var(--primary-green);
}

.l-blue {
    background: var(--chart-blue);
}

.legend-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
}

.legend-percent {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-white);
}

/* Tambahan CSS untuk Persentase */
.cat-percent {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-gray);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
}

.cat-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    text-align: right;
    margin-left: auto; /* DORONGAN: Memastikan dia tetap di paling kanan */
    white-space: nowrap;
}

/* =========================================
   PORTFOLIO LIST
   ========================================= */

.port-list {
    margin-top: 10px;
}

.port-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #30363d;
}

.port-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-white);
}

.port-type {
    display: block;
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 4px;
}

.port-val {
    color: var(--primary-green);
    font-weight: 700;
}

.port-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    font-size: 16px;
}

/* =========================================
   7. TABLES
   ========================================= */

/* Kontainer tabel agar mendukung scroll horizontal */
.table-card {
    padding-bottom: 8px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-radius: 8px;
    background: var(--card-bg);
}

/* Tabel dasar */
.table-card table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.table-card th,
.table-card td {
    white-space: nowrap;
    padding: 12px 15px;
}

/* Struktur tabel global */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-body);
    border-bottom: 1px solid #30363d;
}

th {
    padding: 15px;
    text-align: left;
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

tbody tr {
    border-bottom: 1px solid #21262d;
}

tbody tr:last-child {
    border-bottom: none;
}

td {
    padding: 15px;
    font-size: 14px;
    vertical-align: middle;
    color: var(--text-white);
}

/* =========================================
   ACTION LINK (EDIT / DELETE)
   ========================================= */

.action-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin-right: 10px;
    color: var(--text-gray);
    transition: 0.2s;
}

.action-link:hover {
    color: var(--primary-green);
    text-decoration: underline;
}

.action-delete:hover {
    color: var(--danger-red);
}

/* =========================================
   AKSI COLUMN & PADDING AMAN
   ========================================= */

.aksi-column {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.table-card td:last-child,
.table-card th:last-child {
    padding-right: 20px;
}

/* =========================================
   8. MODALS & FORMS
   ========================================= */

/* =========================================
   MODAL OVERLAY & BOX
   ========================================= */

.modal-overlay { 
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-box { 
    background: var(--bg-card);
    padding: 25px;
    border-radius: 20px;
    width: 480px;
    border: 1px solid #30363d;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation: modalIn 0.3s ease;
    
    max-height: 85vh; 
    overflow-y: auto; 
    position: relative;
}

.modal-box::-webkit-scrollbar {
    width: 5px;
}

.modal-box::-webkit-scrollbar-track {
    background: transparent;
}

.modal-box::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

/* Animasi modal */
@keyframes modalIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================================
   MODAL TITLE
   ========================================= */

.modal-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--text-white);
}

/* =========================================
   FORM ELEMENTS
   ========================================= */

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 600;
}

.form-input { 
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: var(--bg-body);
    color: var(--text-white);
    border: 1px solid #30363d;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.2s;
}

.form-input:focus {
    border-color: var(--primary-green);
    outline: none;
}

/* =========================================
   MODAL FOOTER BUTTONS
   ========================================= */

.modal-footer {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-modal { 
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.btn-cancel {
    background: #30363d;
    color: white;
}

.btn-save {
    background: var(--primary-green);
    color: black;
}

.btn-save:hover {
    filter: brightness(1.1);
}

.btn-danger {
    background: var(--danger-red);
    color: white;
}

/* =========================================
   9. AUTHENTICATION PAGES (LOGIN/REGISTER)
   ========================================= */

.auth-body {
    background: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* =========================================
   AUTH CARD
   ========================================= */

.auth-card {
    background: var(--bg-card);
    border: 1px solid #30363d;
    border-radius: 16px;
    padding: 40px;
    width: 400px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.4s ease;
}

/* Logo & Header */
.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.auth-logo svg {
    width: 32px;
    height: 32px;
    fill: var(--primary-green);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-green);
    letter-spacing: 0.5px;
}

.auth-desc {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 30px;
}

/* =========================================
   AUTH FORM HEADER
   ========================================= */

.auth-header {
    text-align: left;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #30363d;
}

.auth-header h3 {
    color: var(--primary-green);
    font-size: 18px;
    font-weight: 700;
}

/* =========================================
   AUTH INPUT
   ========================================= */

.auth-input {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    background: var(--bg-body);
    border: 1px solid #30363d;
    border-radius: 8px;
    color: var(--text-white);
    font-size: 14px;
    transition: 0.2s;
}

.auth-input:focus {
    border-color: var(--primary-green);
    outline: none;
}

/* =========================================
   AUTH BUTTONS
   ========================================= */

.btn-auth-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-green);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 15px;
    transition: 0.2s;
}

.btn-auth-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-auth-secondary {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--text-white);
    border: 1px solid #30363d;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-auth-secondary:hover {
    border-color: var(--text-gray);
    background: #21262d;
}

/* =========================================
   FORGOT PASSWORD LINK
   ========================================= */

.forgot-link {
    display: block;
    text-align: right;
    color: var(--primary-green);
    font-size: 12px;
    text-decoration: none;
    margin-top: -5px;
    margin-bottom: 20px;
    cursor: pointer;
}

/* =========================================
   10. PROFILE PAGE & HEADER
   ========================================= */

/* =========================================
   PROFILE HEADER (TOP BAR)
   ========================================= */

.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-img-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-green);
    background: #21262d;
}

.profile-info h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.2;
}

.profile-info p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.2;
}

/* =========================================
   PROFILE CONTAINER
   ========================================= */

.profile-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

/* =========================================
   PROFILE CARD LEFT
   ========================================= */

.profile-card-left {
    flex: 1;
    min-width: 300px;
    background: var(--bg-card);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: fit-content;
}

/* =========================================
   PROFILE CARD RIGHT
   ========================================= */

.profile-card-right {
    flex: 2;
    min-width: 300px;
    background: var(--bg-card);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 30px;
}

/* =========================================
   PROFILE IMAGE & UPLOAD
   ========================================= */

.profile-pic-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-green);
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 210, 106, 0.2);
}

.btn-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn-upload-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* =========================================
   DIVIDER
   ========================================= */

.divider {
    height: 1px;
    background: #30363d;
    margin: 25px 0;
    width: 100%;
}

/* =========================================
   11. CUSTOM DATEPICKER (FLATPICKR OVERRIDE)
   ========================================= */

.flatpickr-calendar.dark {
    background: var(--bg-card) !important;
    border: 1px solid #30363d !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}

.flatpickr-months .flatpickr-month {
    background: var(--bg-card) !important;
    color: white !important;
    fill: white !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: var(--bg-card) !important;
}

span.flatpickr-weekday {
    color: var(--text-gray) !important;
}

.flatpickr-day.selected {
    background: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
    color: #000 !important;
    font-weight: 800 !important;
}

.flatpickr-day:hover {
    background: #30363d !important;
    border-color: #30363d !important;
}

/* =========================================
   12. LIGHT MODE THEME (OVERRIDE)
   ========================================= */

body.light-mode {
    /* Backgrounds Menjadi Terang */
    --bg-body: #f6f8fa;
    --bg-card: #ffffff;
    --sidebar-bg: #ffffff;
    
    /* Text Menjadi Gelap */
    --text-white: #24292f;
    --text-gray: #57606a;
    
    /* Komponen Lain */
    --btn-dark: #f6f8fa;
    
    /* Shadow lebih soft */
    --shadow-soft: 0 4px 15px rgba(0,0,0,0.05);
}

/* Penyesuaian Border di Light Mode */
body.light-mode .sidebar,
body.light-mode .card-panel,
body.light-mode .table-card,
body.light-mode .top-bar,
body.light-mode .modal-box,
body.light-mode .form-input,
body.light-mode .auth-card,
body.light-mode .profile-card-left,
body.light-mode .profile-card-right,
body.light-mode th,
body.light-mode td,
body.light-mode tbody tr {
    border-color: #d0d7de;
}

/* Input di Light Mode */
body.light-mode .form-input,
body.light-mode .auth-input {
    background: #ffffff;
    color: var(--text-white);
}

/* Card Shadow di Light Mode */
body.light-mode .card-panel,
body.light-mode .hero-card,
body.light-mode .auth-card {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Icon Sidebar */
body.light-mode .nav-item svg {
    fill: var(--text-gray);
}

body.light-mode .nav-item.active svg {
    fill: white;
}

/* Pastikan teks putih terbaca */
body.light-mode .legend-percent[style*="color: white"],
body.light-mode .legend-percent[style*="color:white"] {
    color: var(--text-white) !important;
}

/* =========================================
   13. ANTI-FLASH & ANIMATION CONTROL
   ========================================= */

/* Transisi hanya aktif saat class ini ditambahkan via JS */
body.pindah-tema,
body.pindah-tema .sidebar,
body.pindah-tema .card-panel,
body.pindah-tema .table-card,
body.pindah-tema .donut-inner,
body.pindah-tema .form-input {
    transition: background 0.3s ease,
                border-color 0.3s ease,
                color 0.3s ease;
}

/* =========================================
   SECTION HEADER & HIDE BUTTON
   ========================================= */

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-hide {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    transition: 0.2s;
}

.btn-hide:hover {
    color: white;
}

/* =========================================
   BLUR SENSITIVE DATA
   ========================================= */

.blurred {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

/* =========================================
   14. MOBILE RESPONSIVE FINAL (FIXED)
   ========================================= */

@media screen and (max-width: 768px) {

    /* Paksa sidebar hilang total */
    .sidebar { 
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
    }

    /* Konten full width */
    .content { 
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px !important;
        padding-bottom: 100px !important;
    }

    /* Hero card */
    .hero-card {
        padding: 20px !important;
    }

    .hero-value {
        font-size: 32px !important;
    }

    .stats-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .stat-pill {
        width: 100% !important;
        min-width: unset !important;
    }

    /* Grid dashboard */
    .grid-4,
    .grid-2-bottom {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Mobile navigation */
    .mobile-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: var(--sidebar-bg) !important;
        border-top: 1px solid #1f252e !important;
        justify-content: space-around !important;
        padding: 10px 5px !important;
        z-index: 9999 !important;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.5) !important;
    }

    .mobile-nav .nav-item {
        flex: 1 !important;
        flex-direction: column !important;
        gap: 4px !important;
        font-size: 9px !important;
        padding: 5px 0 !important;
        background: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        color: var(--text-gray) !important;
    }

    .mobile-nav .nav-item.active {
        color: var(--primary-green) !important;
    }

    .mobile-nav .nav-item svg {
        width: 20px !important;
        height: 20px !important;
    }
}

/* =========================================
   HIDE MOBILE NAV ON DESKTOP
   ========================================= */

@media screen and (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
}

/* =========================================
   LOGIN PAGE RESPONSIVE
   ========================================= */

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    margin: 0 auto;
}

@media screen and (max-width: 480px) {
    .login-box {
        width: 90% !important;
        padding: 30px 20px !important;
        margin: 0 auto;
    }

    .login-box input {
        height: 50px !important;
        font-size: 16px !important;
    }

    .login-box button {
        height: 50px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
    }

    .login-logo {
        font-size: 24px !important;
        margin-bottom: 20px !important;
    }
}

/* =========================================
   PROFILE DROPDOWN MENU
   ========================================= */

.profile-dropdown-container {
    position: relative;
    display: inline-block;
}

/* Hanya untuk Mobile */
@media screen and (max-width: 768px) {
    .profile-dropdown-content {
        display: none;
        position: absolute;
        top: 55px;
        left: 0;
        background-color: var(--sidebar-bg);
        min-width: 160px;
        box-shadow: 0px 8px 16px rgba(0,0,0,0.5);
        border-radius: 10px;
        border: 1px solid #30363d;
        z-index: 10000;
        overflow: hidden;
    }
    .profile-dropdown-content.show {
        display: block !important;
    }
}

/* Mematikan fitur di Desktop */
@media screen and (min-width: 769px) {
    .profile-dropdown-content {
        display: none !important;
    }
}

.profile-dropdown-content a {
    color: var(--text-gray);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: 0.2s;
}

.profile-dropdown-content a:hover {
    background-color: #1c2128;
    color: var(--primary-green);
}

.profile-dropdown-content a.logout-link:hover {
    color: var(--danger-red);
}

.profile-dropdown-content a svg {
    fill: currentColor;
}

.profile-dropdown-content.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* =========================================
   CUSTOM SCROLLBAR (TABLE & GLOBAL)
   ========================================= */

/* Scrollbar khusus tabel */
.table-card::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.table-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.table-card::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

.table-card::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

/* Firefox */
.table-card {
    scrollbar-width: thin;
    scrollbar-color: #00d26a rgba(255,255,255,0.05);
}

/* Global scrollbar */
::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-green) !important;
    border-radius: 10px !important;
}

::-webkit-scrollbar-track {
    background: transparent !important;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green) !important;
}

/* Android / Chrome Mobile */
.table-card {
    scrollbar-width: thin;
    scrollbar-color: #00d26a transparent;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px !important;
}
