/* 
 * Kedai Nongki - Sistem Manajemen Kas
 * Stylesheet untuk aplikasi manajemen kas
 */

:root {
    /* Layout tokens - Slightly lighter background for better contrast */
    --bg: #121C2E;
    --surface: #0E1628;
    --card: #162238;
    --muted: #1A2A40;
    --bg-secondary: #162238;
    --glass: rgba(255, 255, 255, 0.05);

    /* Text - Improved contrast */
    --text-primary: #F0F5F7;
    --text-secondary: #C5D5D8;
    --text-muted: #8A9A9E;

    /* Accents (brand) - More consistent color scheme */
    --accent: #38E07B;
    /* Primary accent (green) */
    --accent-2: #FF6B6B;
    /* Secondary accent (red) for negative values */
    --accent-3: #F5F5F5;
    /* Neutral accent for backgrounds */

    /* Status colors - More vibrant and consistent */
    --success: #38E07B;
    /* Same as accent for consistency */
    --danger: #FF6B6B;
    /* Same as accent-2 for consistency */
    --warning: #FFBE0B;
    --info: #3A86FF;

    /* Borders & shadows */
    --border: rgba(255, 255, 255, 0.06);
    --shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
    --glass-blur: rgba(255, 255, 255, 0.025);

    /* Buttons */
    --btn-primary-bg: var(--accent);
    --btn-primary-text: #052318;
    --btn-ghost-bg: transparent;

    /* Card styles */
    --card-hover-transform: translateY(-3px);
    --card-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);

    /* Sizing */
    --sidebar-width: 250px;
    --header-height: 60px;
    --bottom-nav-height: 60px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    /* Shape consistency lock: cards 12px, icons 10px, interactive = pill */
    --radius-md: 12px;
    --radius-pill: 999px;

    /* Skeleton loading */
    --skeleton-base: #1A2A40;
    --skeleton-shine: rgba(255, 255, 255, 0.08);

    /* Login */
    --primary-color: #38e07b;
}

/* Light mode (optional) */
:root.light {
    --bg: #F8FAFC;
    --surface: #F1F5F9;
    --card: #FFFFFF;
    --muted: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --glass: rgba(0, 0, 0, 0.02);

    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-muted: #64748B;

    --border: rgba(0, 0, 0, 0.08);
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    --glass-blur: rgba(0, 0, 0, 0.015);

    /* Skeleton loading (light) */
    --skeleton-base: #E2E8F0;
    --skeleton-shine: rgba(255, 255, 255, 0.9);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Outfit', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* Typography - Improved hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

/* ===== Login Layout (Split + Branding) ===== */
#login-modal .login-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

#login-modal .login-brand-panel,
#login-modal .login-main {
    min-width: 0;
}

/* ---- Branding Panel (kiri) ---- */
.login-brand-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 4rem;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(1100px 520px at 12% -8%, rgba(56, 224, 123, 0.16), transparent 60%),
        radial-gradient(900px 480px at 108% 112%, rgba(58, 134, 255, 0.16), transparent 55%),
        linear-gradient(160deg, #0A1420 0%, #0E1B2E 52%, #0F2419 100%);
}

.login-brand-panel::before,
.login-brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -1;
    pointer-events: none;
}

.login-brand-panel::before {
    width: 340px;
    height: 340px;
    top: -90px;
    right: -70px;
    background: rgba(56, 224, 123, 0.18);
}

.login-brand-panel::after {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -50px;
    background: rgba(58, 134, 255, 0.14);
}

.login-brand-inner {
    width: 100%;
    max-width: 30rem;
    position: relative;
}

.login-brand-panel .login-brand {
    margin-bottom: 2.75rem;
}

.login-brand-panel .login-logo {
    display: block;
    width: min(100%, 13rem);
    height: auto;
    /* Rasio aspek viewBox logo (611.14 x 525.1): cegah ruang kosong & jaga proporsi */
    aspect-ratio: 611.14 / 525.1;
    filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.35));
}

.login-hero-title {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #F0F5F7;
    margin: 0 0 1rem;
}

.login-hero-subtitle {
    color: rgba(240, 245, 247, 0.82);
    font-size: 1.0625rem;
    line-height: 1.65;
    margin: 0 0 2.75rem;
}

.login-features {
    list-style: none;
    display: grid;
    gap: 1.1rem;
    padding: 0;
    margin: 0;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: #F0F5F7;
    font-weight: 500;
}

.login-features i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    flex-shrink: 0;
    font-size: 1.15rem;
    color: var(--accent);
    background: rgba(56, 224, 123, 0.12);
    border: 1px solid rgba(56, 224, 123, 0.28);
    border-radius: 10px;
}

/* ---- Form Panel (kanan) ---- */
#login-modal .login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--bg);
}

.login-panel {
    width: 100%;
    max-width: 26rem;
    text-align: center;
}

.login-panel-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.1rem;
    margin-bottom: 1.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(56, 224, 123, 0.1);
    border: 1px solid rgba(56, 224, 123, 0.28);
    border-radius: var(--radius-pill);
}

:root.light .login-panel-badge {
    color: #0E9F4F;
}

.login-text {
    margin-bottom: 1.75rem;
}

.login-heading {
    font-size: clamp(1.8rem, 3.2vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    margin: 0;
}

.login-btn-wrap {
    width: 100%;
    max-width: 24rem;
    margin: 0 auto;
}

.login-footnote {
    margin-top: 1.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.google-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--primary-color);
    color: #122118;
    border: 0;
    padding: 0.85rem 1.5rem;
    font-size: 1.0625rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: filter .15s ease, transform .05s ease, box-shadow .2s ease;
    box-shadow: 0 12px 32px rgba(56, 224, 123, 0.24);
}

.google-btn:hover {
    filter: saturate(0.95) brightness(0.98);
    box-shadow: 0 14px 38px rgba(56, 224, 123, 0.32);
    transform: translateY(-1px);
}

.google-btn:active {
    transform: translateY(1px);
}

.google-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.google-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Login di layar kecil: tumpuk (branding di atas, form di bawah) */
@media (max-width: 900px) {
    #login-modal .login-wrap {
        grid-template-columns: 1fr;
    }

    /* Minimalis di mobile: logo + judul saja (subtitle & daftar fitur disembunyikan) */
    .login-brand-panel {
        padding: 2.25rem 1.5rem 1.75rem;
        text-align: center;
    }

    .login-brand-inner {
        max-width: 100%;
    }

    .login-brand-panel .login-brand {
        display: flex;
        justify-content: center;
        margin-bottom: 1.25rem;
    }

    .login-brand-panel .login-logo {
        width: min(64vw, 10rem);
        aspect-ratio: 611.14 / 525.1;
        filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.32));
    }

    .login-hero-title {
        font-size: clamp(1.35rem, 5.5vw, 1.75rem);
        margin-bottom: 0;
    }

    .login-hero-subtitle,
    .login-features {
        display: none;
    }

    #login-modal .login-main {
        padding: 2rem 1.5rem 2.5rem;
    }
}

/* Ikon pada heading laporan sejajar dengan teks */
.report-section h4 i,
.report-section h5 i {
    margin-right: 0.5rem;
    vertical-align: -0.1em;
}

/* Focus ring konsisten di seluruh UI (a11y) */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Angka keuangan sejajar (tabular-nums) */
.metric-value,
.amount,
.report-card-value,
.transaction-amount {
    font-variant-numeric: tabular-nums;
}

/* Hormati preferensi reduced-motion pengguna */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== App Layout, Sidebar, Header, dsb ===== */
#app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header .login-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.sidebar-header .login-logo {
    /* Ikon lingkaran — viewBox sudah di-crop ke lingkaran, rasio 1:1 */
    width: 2.1rem;
    height: 2.1rem;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-header .login-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sidebar-header {
    padding: 1rem 0.9rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.175rem 1.5rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.sidebar .nav-item:hover,
.sidebar .nav-item.active {
    background: var(--glass);
    color: var(--text-primary);
}

.sidebar .nav-item.active {
    background: rgba(56, 224, 123, 0.12);
    color: var(--accent);
    border-left: 3px solid var(--accent);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: var(--glass);
    color: var(--text-primary);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: var(--bottom-nav-height);
}

.header {
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
}

.add-transaction-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--btn-primary-text);
    border-radius: 50%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.add-transaction-btn:hover {
    background: rgba(56, 224, 123, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(56, 224, 123, 0.3);
    border-color: rgba(56, 224, 123, 0.3);
}


.user-profile {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    /* background: var(--glass); */
    padding: 0;
    /* padding: 0.5rem 0.75rem; */
    /* border: 1px solid var(--border); */
    height: 100%;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    display: block !important;
}

#user-name {
    font-weight: 500;
    color: var(--text-primary);
}

/* Modern Theme Toggle Switch */
.theme-toggle {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    /* padding: 0.5rem 0.75rem; */
    padding: 0;
    height: 100%;
}

.theme-switch-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.theme-switch-label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.theme-switch-slider {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-switch-slider::before {
    content: "\f496";
    /* bi-moon-stars */
    font-family: 'bootstrap-icons';
    font-size: 11px;
    line-height: 1;
    color: #cbd5e1;
    transition: all 0.3s ease;
}

.theme-switch-checkbox:checked+.theme-switch-label {
    background: linear-gradient(135deg, var(--accent) 0%, rgba(56, 224, 123, 0.8) 100%);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(56, 224, 123, 0.3);
}

.theme-switch-checkbox:checked+.theme-switch-label .theme-switch-slider {
    transform: translateX(26px);
}

.theme-switch-checkbox:checked+.theme-switch-label .theme-switch-slider::before {
    content: "\f5a2";
    /* bi-sun */
    color: #052318;
}

:root.light .theme-switch-slider::before {
    color: #64748b;
}

.theme-switch-label:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Light mode adjustments */
:root.light .theme-switch-label {
    background-color: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

:root.light .theme-switch-slider {
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.95) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Chart.js text color improvements for light mode */
:root.light .chart-wrapper canvas {
    filter: brightness(0.9) contrast(1.1);
}

:root.light .chart-card h4 {
    color: var(--text-primary);
}

:root.light .chart-card {
    background: var(--glass);
    border: 1px solid var(--border);
}

/* Override Chart.js default text colors for light mode */
:root.light .chart-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.01);
    z-index: 1;
}

.page-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 480px;
    height: var(--bottom-nav-height);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    display: none;
    justify-content: space-evenly;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.bottom-nav .nav-item {
    flex-direction: column;
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
    gap: 0.25rem;
    border-radius: 16px;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.bottom-nav .nav-item.active {
    color: var(--accent);
}



.bottom-nav .nav-item i {
    font-size: 1.25rem;
}

.bottom-nav .nav-item span {
    display: none;
}

/* Special styling for logout button in bottom-nav */
.bottom-nav #logout-btn-mobile.nav-item {
    flex-direction: column;
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
    gap: 0.25rem;
    border-radius: 16px;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav #logout-btn-mobile.nav-item:hover,
.bottom-nav #logout-btn-mobile.nav-item:active {
    background: rgba(255, 107, 107, 0.1);
    color: var(--accent-2);
    transform: translateY(-2px);
}

.bottom-nav #logout-btn-mobile.nav-item i {
    font-size: 1.25rem;
}

.bottom-nav #logout-btn-mobile.nav-item span {
    display: none;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    /* box-shadow: var(--shadow); */
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-all {
    color: var(--accent);
    font-size: 0.875rem;
}

.report-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.export-actions {
    display: flex;
    gap: 0.5rem;
}

#export-report,
#export-pdf,
#export-excel {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#export-report:hover,
#export-pdf:hover,
#export-excel:hover {
    color: var(--accent);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    /* box-shadow: var(--shadow); */
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-icon.income {
    background: rgba(76, 222, 128, 0.15);
    color: var(--success);
}

.metric-icon.expense {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
}

.metric-icon.profit {
    background: rgba(96, 165, 250, 0.15);
    color: var(--info);
}

.metric-icon.transaction {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

.metric-info h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.metric-info p {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Breakdown Section */
.breakdown-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.breakdown-section .card {
    position: relative;
    overflow: hidden;
}

.breakdown-section .card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.progress-container {
    margin-bottom: 1.25rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.progress-container:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.total-kas-container {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.progress-info span {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.progress-info span:last-child {
    font-weight: 600;
    color: var(--accent);
}

.total-amount {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--accent);
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--accent);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.total-kas-container {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin: 0.75rem 0;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    background-size: 30px 30px;
    background-image: linear-gradient(45deg,
            rgba(255, 255, 255, 0.15) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 255, 255, 0.15) 75%,
            transparent 75%,
            transparent);
    animation: progress-animation 1.5s linear infinite;
}

@keyframes progress-animation {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 30px 0;
    }
}

.progress-fill.cash {
    background-color: var(--success);
}

.progress-fill.non-cash {
    background-color: var(--info);
}

.progress-fill.profit-ratio {
    background-color: var(--success);
}

.progress-fill.expense-ratio {
    background-color: var(--danger);
}

.amount {
    margin-top: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: right;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    border-left: 3px solid;
    border: 1px solid var(--border);
}

#cash-amount {
    border-left-color: var(--success);
}

#non-cash-amount {
    border-left-color: var(--info);
}

/* Description Autocomplete Dropdown */
.description-autocomplete-dropdown {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--border-radius) !important;
    /* box-shadow: var(--shadow) !important; */
}

.description-autocomplete-item {
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border) !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.description-autocomplete-item:hover,
.description-autocomplete-item:focus {
    background: var(--glass) !important;
}

.description-autocomplete-item strong {
    color: var(--accent) !important;
    font-weight: 600;
}

/* Search and Autocomplete */
.search-container {
    margin-bottom: 1rem;
    padding: 0 1.5rem;
}

.search-input-wrapper {
    position: relative;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border-radius: var(--border-radius);
    background: var(--muted);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.reset-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.reset-search-btn:hover {
    background: var(--glass);
    color: var(--text-primary);
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 10;
    display: none;
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--glass);
}

.highlight {
    background-color: rgba(var(--accent-rgb), 0.2);
    font-weight: 500;
}

/* Tables - Modern Design */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border);
    background: var(--glass);
    margin-bottom: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--card);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: var(--glass);
}

.transaction-table td {
    vertical-align: middle;
}

.transaction-table .badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.transaction-table .badge.income {
    background: rgba(76, 222, 128, 0.15);
    color: var(--success);
}

.transaction-table .badge.expense {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
}

/* Responsive table for reports */
#report-table th,
#report-table td {
    white-space: nowrap;
}

#report-details .table-container {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.pagination-button {
    background: var(--muted);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-button:hover {
    background: var(--glass);
    color: var(--text-primary);
}

.pagination-button.active {
    background: var(--accent);
    color: var(--btn-primary-text);
    border-color: var(--accent);
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0.5rem;
}

/* Cards for mobile transactions - Modern Design */
.cards-container {
    display: none;
}

/* Modern Transaction Card */
.transaction-card {
    background: var(--glass);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    /* box-shadow: var(--shadow); */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.transaction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    z-index: 1;
}

.transaction-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.7);
}

.transaction-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.transaction-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.transaction-type {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.transaction-type.income {
    background: rgba(76, 222, 128, 0.15);
    color: var(--success);
}

.transaction-type.expense {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
}

.transaction-card.income::before {
    background: var(--success);
}

.transaction-card.expense::before {
    background: var(--danger);
}

.transaction-description {
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
}

.transaction-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.transaction-amount {
    font-weight: 700;
    font-size: 1.1rem;
}

.transaction-amount.income {
    color: var(--success);
}

.transaction-amount.expense {
    color: var(--danger);
}

.transaction-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-container {
    width: 100%;
    padding: 0.5rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 0.1rem;
    gap: 0.1rem;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-group label {
    color: var(--text-primary);
}

.option-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Light mode form adjustments */
:root.light .form-group label {
    color: var(--text-primary);
}

:root.light .option-btn {
    background: linear-gradient(135deg, var(--card) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 2px solid var(--border);
    color: var(--text-secondary);
}

:root.light .option-btn:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(56, 224, 123, 0.1) 0%, rgba(56, 224, 123, 0.05) 100%);
    color: var(--accent);
}

:root.light .option-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, rgba(56, 224, 123, 0.9) 100%);
    border-color: var(--accent);
    color: var(--btn-primary-text);
}

.option-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border);
    background: linear-gradient(135deg, var(--card) 0%, rgba(255, 255, 255, 0.02) 100%);
    color: var(--text-secondary);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60px;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.option-btn:hover::before {
    left: 100%;
}

.option-btn i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    transition: transform 0.3s ease;
}

.option-btn:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(56, 224, 123, 0.1) 0%, rgba(56, 224, 123, 0.05) 100%);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 224, 123, 0.15);
}

.option-btn:hover i {
    transform: scale(1.1);
}

.option-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, rgba(56, 224, 123, 0.9) 100%);
    border-color: var(--accent);
    color: var(--btn-primary-text);
    box-shadow: 0 8px 25px rgba(56, 224, 123, 0.4);
    transform: translateY(-2px);
}

.option-btn.active::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.option-btn.active:hover {
    background: linear-gradient(135deg, var(--accent) 0%, rgba(56, 224, 123, 0.9) 100%);
    color: var(--btn-primary-text);
    transform: translateY(-2px);
}

.option-btn.active i {
    transform: scale(1.1);
    color: var(--btn-primary-text);
}

/* Responsive option buttons for mobile */
@media (max-width: 480px) {
    .option-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
        min-height: 50px;
    }

    .option-btn i {
        font-size: 1rem;
        margin-bottom: 0.15rem;
    }

    .option-btn span {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .option-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
        min-height: 45px;
    }

    .option-btn i {
        font-size: 0.9rem;
    }

    .option-btn span {
        font-size: 0.75rem;
    }
}

.form-actions {
    display: flex;
    align-items: flex-end;
}

label {
    /* margin-bottom: 0.75rem; */
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

label i {
    color: var(--accent);
    font-size: 1rem;
}

input,
select,
textarea {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    border-radius: var(--border-radius-lg);
    font-family: inherit;
    font-size: inherit;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(56, 224, 123, 0.05) 0%, rgba(56, 224, 123, 0.02) 100%);
    box-shadow: 0 0 0 3px rgba(56, 224, 123, 0.1), 0 4px 12px rgba(56, 224, 123, 0.15);
    transform: translateY(-1px);
}

input[type="date"] {
    min-width: 100%;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

select option {
    background-color: var(--surface);
    color: var(--text-primary);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(156, 175, 170, 0.12);
}

/* Buttons */
.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(56, 224, 123, 0.3);
}

.btn-primary:hover {
    filter: brightness(0.98);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 224, 123, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(56, 224, 123, 0.3);
}

.btn-primary:disabled {
    opacity: 0.45;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--muted);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--glass);
    transform: translateY(-1px);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: var(--text-primary);
    background: var(--glass);
}

/* Report Styles - Modern Cards */
.report-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-card {
    background: var(--glass);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    /* box-shadow: var(--shadow); */
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    height: 100%;
    min-height: 120px;
    /* Memastikan tinggi minimum yang sama */
}

.report-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.report-card:hover::before {
    opacity: 1;
}

.report-card:hover {
    /* transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.75);
    border-color: rgba(255, 255, 255, 0.25);
    background: var(--glass-blur); */
}

.report-card.income {
    border-left-color: var(--success);
}

.report-card.expense {
    border-left-color: var(--danger);
}

.report-card.profit {
    border-left-color: var(--info);
}

.report-card.percentage {
    border-left-color: var(--warning);
}

.report-card.modal {
    border-left-color: var(--accent);
}


.report-card.top-expense {
    border-left-color: var(--danger);
}

.report-card.top-income {
    border-left-color: var(--success);
}

.report-card.report-card {
    border-left-color: var(--info);
}

.report-card-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-blur);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.report-card:hover .report-card-icon {
    transform: scale(1.15);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.income .report-card-icon {
    color: var(--success);
}

.expense .report-card-icon {
    color: var(--danger);
}

.profit .report-card-icon {
    color: var(--info);
}

.percentage .report-card-icon {
    color: var(--warning);
}

.cash .report-card-icon {
    color: var(--success);
}

.non-cash .report-card-icon {
    color: var(--info);
}

.cash-income .report-card-icon {
    color: var(--success);
}

.non-cash-income .report-card-icon {
    color: var(--info);
}

.cash-expense .report-card-icon {
    color: var(--danger);
}

.non-cash-expense .report-card-icon {
    color: var(--danger);
}

.total-amount .report-card-icon {
    color: var(--accent);
}

.transaction-count .report-card-icon {
    color: var(--warning);
}

.modal .report-card-icon {
    color: var(--accent);
}



.top-expense .report-card-icon {
    color: var(--danger);
}

.top-income .report-card-icon {
    color: var(--success);
}

.report-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.report-card-content h4 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

.report-card-value {
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
    position: relative;
    z-index: 1;
    letter-spacing: 0.4px;
    transition: all 0.3s ease;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.report-card-detail {
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
    position: relative;
    z-index: 1;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    letter-spacing: 0.3px;
    line-height: 1.3;
    opacity: 0.9;
}

.report-card:hover .report-card-value {
    transform: scale(1.05);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Additional Report Styles */
.report-section {
    margin-bottom: 3rem;
    position: relative;
    padding: 0.5rem;
}

.report-section h3 {
    margin-top: 1.25rem;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.report-card.clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.report-card.clickable:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

/* Forecast Styles */
.forecast-info {
    background: var(--glass-blur);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.forecast-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.forecast-card {
    background: var(--glass);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid transparent;
}

.forecast-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.7);
}

.forecast-card.income {
    border-left-color: var(--success);
}

.forecast-card.expense {
    border-left-color: var(--danger);
}

.forecast-card.profit {
    border-left-color: var(--info);
}

/* Styling untuk headings pada visualisasi */
.report-section h5 {
    font-size: 1rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-primary);
    font-weight: 600;
    padding-left: 0.5rem;
    border-left: 3px solid var(--accent);
}

/* Styling untuk chart forecast */
#forecast-chart-container {
    width: 100%;
    height: 300px;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

#forecast-chart {
    width: 100%;
    height: 100%;
}

.forecast-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-blur);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
}

.forecast-card-content {
    flex: 1;
}

.forecast-card-content h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.forecast-value {
    font-size: 1.25rem;
    font-weight: 600;
    display: block;
}

.forecast-trend {
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
}

.forecast-trend.positive {
    background-color: rgba(74, 222, 128, 0.2);
    color: var(--success);
}

.forecast-trend.negative {
    background-color: rgba(248, 113, 113, 0.2);
    color: var(--danger);
}

.report-card.clickable i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.report-card.clickable h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.report-card.clickable p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* Charts Styles */
.charts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
    width: 100%;
}

.chart-card {
    background: var(--glass);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    /* box-shadow: var(--shadow); */
    width: 100%;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
    height: 100%;
}

.chart-card:hover {
    /* transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.5); */
}

.chart-card h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    text-align: center;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Progress Bar Styles */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border);
    border-radius: 4px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.profit-ratio {
    background-color: var(--success);
}

.expense-ratio {
    background-color: var(--danger);
}

.chart-wrapper {
    height: 280px;
    position: relative;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--glass-blur);
    border-radius: var(--border-radius);
}

.table-title {
    margin: 1rem 0;
    padding-left: 0.5rem;
    border-left: 4px solid var(--accent);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Category Breakdown Styles */
.category-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1rem 0 2rem;
}

.breakdown-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.category-item {
    background: var(--glass);
    border-radius: var(--border-radius);
    padding: 1rem;
    border: 1px solid var(--border);
}

.category-header.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    position: relative;
}

.category-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.category-amount {
    font-weight: 600;
}

.category-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.category-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
}

.category-percent {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}

/* Payment Method Analysis */
.payment-method-analysis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 1.5rem 0 2rem;
    width: 100%;
}

.payment-method-item {
    background: var(--glass);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--border);
    /* box-shadow: var(--shadow); */
    transition: transform 0.2s, box-shadow 0.2s;
}

.payment-method-item:hover {
    /* transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.5); */
}


.total-payment-method .payment-method-icon {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    font-weight: bold;
}

.total-payment-method .progress-fill.total {
    background: linear-gradient(90deg, var(--success) 0%, var(--info) 100%);
}

.payment-method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.payment-method-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.payment-method-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-blur);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--info);
    margin-right: 0.5rem;
}

.payment-method-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.payment-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.85rem;
    background: var(--glass);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border);
    transition: background-color 0.2s, transform 0.2s;
}

.payment-stat:hover {
    background: var(--glass-blur);
    transform: translateX(3px);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(3px);
    z-index: 999;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

/* Modal */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: modalFadeIn 0.3s ease-out;
    padding: 1rem;
}

/* Light mode modal adjustments */
:root.light .modal-container {
    background: rgba(255, 255, 255, 0.8);
}

:root.light .modal-header {
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
}

:root.light .modal-header h3 {
    color: var(--text-primary);
}

:root.light .modal-body {
    background: var(--glass);
}

:root.light .modal-footer {
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}


@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal:hover {
    color: var(--text-primary);
    background: var(--glass);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    background: var(--glass);
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal form {
    padding: 0;
    background: transparent;
}

/* Loading and Error States */
/* ===== Skeleton Loading (pengganti spinner) ===== */
/* Saat body.loading aktif: konten asli disembunyikan, skeleton ditampilkan */
body.loading {
    pointer-events: none;
}

body.loading .metric-info {
    display: none;
}

body.loading .metric-skeleton {
    display: flex;
}

/* Scope ke tabel/kartu yang benar-benar punya skeleton (:has) agar
   tabel laporan (tanpa skeleton) tidak ikut hilang */
body.loading .table-container:has(.table-skeleton) table {
    display: none;
}

body.loading .table-skeleton {
    display: block;
}

/* Skeleton kontainer (default tersembunyi) */
.metric-skeleton {
    display: none;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.table-skeleton {
    display: none;
    padding: 0.5rem 1rem;
}

.cards-skeleton {
    display: none;
    gap: 0.75rem;
}

/* Kartu skeleton hanya untuk mobile (sama seperti cards-container) */
@media (max-width: 768px) {
    body.loading .cards-container:has(+ .cards-skeleton) {
        display: none;
    }

    body.loading .cards-skeleton {
        display: grid;
    }
}

/* Baris & sel skeleton */
.skeleton-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
}

.skeleton-row:last-child {
    border-bottom: 0;
}

.skeleton-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
}

/* Batang skeleton dengan shimmer */
.skeleton-line,
.skeleton-cell {
    display: block;
    position: relative;
    overflow: hidden;
    height: 1rem;
    border-radius: 6px;
    background: var(--skeleton-base);
}

.skeleton-line::after,
.skeleton-cell::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--skeleton-shine), transparent);
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Ukuran skeleton sesuai konten */
.skeleton-value {
    height: 1.4rem;
    width: 55%;
}

.skeleton-label {
    height: 0.85rem;
    width: 40%;
}

/* Lebar sel tabel (meniru proporsi kolom) */
.w-8 { width: 8%; }
.w-12 { width: 12%; }
.w-15 { width: 15%; }
.w-16 { width: 16%; }
.w-20 { width: 20%; }
.w-30 { width: 30%; }
.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-60 { width: 60%; }
.w-90 { width: 90%; }

.error-message {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--danger);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 2000;
    max-width: 400px;
    box-shadow: var(--shadow);
}

.error-message button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
}

/* Desktop-specific styles */
@media (min-width: 769px) {
    .add-transaction-btn {
        display: flex !important;
        background: rgba(56, 224, 123, 0.1);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(56, 224, 123, 0.3);
        color: var(--accent);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .breakdown-section {
        grid-template-columns: 1fr;
    }

    /* Improve report responsiveness on tablets */
    .report-cards-container {
        gap: 0.75rem;
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100%;
        z-index: 1000;
        box-shadow: var(--shadow);
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-toggle {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding-bottom: var(--bottom-nav-height);
        width: 100%;
    }

    .bottom-nav {
        display: flex;
    }

    .add-transaction-btn {
        display: none;
    }

    /* Improve Dashboard responsiveness */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .metric-card {
        padding: 0.75rem;
    }

    /* Smaller font for report cards on mobile */
    .report-card-value {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    .report-card-detail {
        font-size: 0.7rem;
        line-height: 1.1;
    }

    .report-card-content h4 {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
    }

    /* Payment method analysis on mobile */
    .payment-method-analysis {
        grid-template-columns: 1fr;
    }

    .metric-info h3 {
        font-size: 0.8rem;
    }

    .metric-info p {
        font-size: 1rem;
    }

    .breakdown-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .table-container {
        display: none;
    }

    .cards-container {
        display: block;
    }

    /* Modern Transaction Card for Mobile */
    .transaction-card {
        background: var(--glass);
        border-radius: var(--border-radius-lg);
        padding: 1.25rem;
        margin-bottom: 1rem;
        border: 1px solid var(--border);
        /* box-shadow: var(--shadow); */
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .transaction-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        z-index: 1;
    }

    .transaction-card.income::before {
        background: var(--success);
    }

    .transaction-card.expense::before {
        background: var(--danger);
    }

    .transaction-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(2, 6, 23, 0.7);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    /* Responsive Report Cards */
    .report-cards-container {
        grid-template-columns: 1fr;
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }

    .report-card {
        padding: 0.75rem;
        margin-bottom: 0.4rem;
        border-left-width: 4px;
    }

    .report-card-content h4 {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
        letter-spacing: 0.3px;
    }

    .report-card-value {
        font-size: 1rem;
        line-height: 1.3;
        font-weight: 600;
    }

    /* Responsive Charts */
    .charts-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        overflow-x: hidden;
        margin: 1.5rem 0;
    }

    /* Responsive Forecast Metrics */
    .forecast-metrics {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Improve report card spacing */
    .report-card {
        margin-bottom: 0.75rem;
    }

    /* Special handling for report tables */
    .transaction-table {
        font-size: 0.8rem;
    }

    .transaction-table th,
    .transaction-table td {}
}

/* Extra small devices (phones) */
@media (max-width: 480px) {

    /* Fix date input on mobile */
    input[type="date"] {
        min-width: 100%;
        width: 100%;
        box-sizing: border-box;
        -webkit-appearance: none;
        appearance: none;
        padding: 0.75rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .metric-card {
        padding: 0.5rem;
        display: flex;
        align-items: center;
    }

    .metric-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .page-content {
        padding: 0.75rem;
    }

    /* Hide tables on mobile and show cards instead */
    .table-container {
        display: none;
    }

    .cards-container {
        display: block;
        margin-top: 1rem;
    }

    /* Hide less important columns on mobile */
    .transaction-table .hide-on-mobile {
        display: none;
    }

    /* Report pagination styling */
    .pagination {
        margin-top: 1.5rem;
    }

    /* Modern Transaction Card for Mobile */
    .transaction-card {
        background: var(--glass);
        border-radius: var(--border-radius-lg);
        padding: 1.25rem;
        margin-bottom: 1rem;
        border: 1px solid var(--border);
        /* box-shadow: var(--shadow); */
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .transaction-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        z-index: 1;
    }

    .transaction-card.income::before {
        background: var(--success);
    }

    .transaction-card.expense::before {
        background: var(--danger);
    }

    .transaction-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(2, 6, 23, 0.7);
    }

    .transaction-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border);
    }

    #report-cards-container .transaction-date {
        font-size: 0.9rem;
        color: var(--text-secondary);
    }

    #report-cards-container .transaction-type {
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 500;
        color: white;
    }

    #report-cards-container .transaction-type.income {
        background-color: var(--success);
    }

    #report-cards-container .transaction-type.expense {
        background-color: var(--danger);
    }

    #report-cards-container .transaction-description {
        font-weight: 500;
        margin-bottom: 0.75rem;
        color: var(--text-primary);
    }

    #report-cards-container .transaction-details {
        display: flex;
        justify-content: space-between;
        font-size: 0.9rem;
    }

    #report-cards-container .text-success {
        color: var(--success);
        font-weight: 600;
    }

    #report-cards-container .text-danger {
        color: var(--danger);
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 1rem;
    }

    /* Improve report cards for very small screens */
    .report-cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .page-content {
        padding: 1rem;
    }

    .login-panel {
        padding: 0 1.5rem;
    }

    .card {
        padding: 1rem;
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    h3 {
        font-size: 1rem;
    }

    .report-section {
        margin-bottom: 1.5rem;
    }

    .report-section h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
        margin-top: 1.25rem;
        color: var(--text-primary);
        font-weight: 600;
        padding-bottom: 0.4rem;
        border-bottom: 1px solid var(--border);
    }

    /* Make report cards container single column on mobile */
    .report-cards-container {
        grid-template-columns: 1fr;
    }

    .forecast-card {
        padding: 0.75rem;
        flex-direction: row;
        align-items: center;
    }

    .forecast-card-icon {
        margin-right: 0.75rem;
    }

    .forecast-card-content h4 {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }

    .forecast-value {
        font-size: 1rem;
    }

    .forecast-trend {
        font-size: 0.75rem;
    }

    /* Improve report card layout */
    .report-card {
        padding: 0.75rem;
        flex-direction: row;
        align-items: center;
    }

    .report-card-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-right: 0.5rem;
    }

    .report-card-content h4 {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }

    .report-card-value {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .report-card-detail {
        font-size: 0.7rem;
        line-height: 1.1;
    }

    /* Improve chart responsiveness */
    .charts-container {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        margin: 1.25rem 0 2rem;
        overflow-x: hidden;
    }

    .chart-card {
        padding: 1.25rem;
        border-radius: var(--border-radius-lg);
    }

    .chart-card h4 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        font-weight: 600;
    }

    .chart-wrapper {
        height: 300px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        padding: 0.75rem;
        margin-top: 0.75rem;
        position: relative;
    }

    .chart-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        width: 100%;
        box-sizing: border-box;
        background: var(--glass);
        border-radius: var(--border-radius-lg);
        /* box-shadow: var(--shadow); */
        transition: all 0.3s ease;
    }

    .chart-card:hover {
        /* transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(2, 6, 23, 0.6); */
    }

    .chart-card h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
        text-align: center;
        color: var(--text-primary);
        font-weight: 600;
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.75rem;
    }

    /* Improve table title */
    .table-title {
        font-size: 0.9rem;
        margin: 0.75rem 0;
    }

    /* Improve form layout in reports */
    #report-form .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    #report-form .form-group {
        width: 100%;
    }

    /* Improve report range display */
    #report-range {
        font-size: 0.8rem;
    }
}/* Print Styles */
/* ===== Dokumen Cetak (Print & PDF) ===== */
/* Tersembunyi dari layar; hanya tampil saat window.print atau di-clone ke PDF */
.print-document {
    display: none;
}

/* Saat mode cetak aktif: hanya dokumen yang tampil, seluruh aplikasi disembunyikan */
.print-mode #app,
.print-mode .sidebar,
.print-mode .header,
.print-mode .bottom-nav,
.print-mode .modal-container,
.print-mode .toast-message,
.print-mode .error-message {
    display: none !important;
}

.print-mode .print-document {
    display: block !important;
}

/* Layout dokumen — kertas putih formal */
.print-doc {
    max-width: 210mm;
    margin: 0 auto;
    padding: 12mm;
    background: #fff;
    color: #1E293B;
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 10pt;
    line-height: 1.55;
}

/* Header dokumen */
.print-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 4mm;
    border-bottom: 3px solid #0E9F4F;
    margin-bottom: 5mm;
}

.print-doc-brand {
    display: flex;
    align-items: center;
    gap: 3mm;
}

.print-doc-logo {
    width: auto;
    height: 13mm;
    /* kedai-02-04.svg sudah di-crop 1:1 (lingkaran penuh) */
    aspect-ratio: 1 / 1;
}

.print-doc-brand-text h1 {
    font-size: 15pt;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    color: #0F2419;
}

.print-doc-brand-text p {
    margin: 0;
    font-size: 9pt;
    color: #64748B;
}

.print-doc-meta {
    text-align: right;
}

.print-doc-meta h2 {
    font-size: 12pt;
    font-weight: 700;
    margin: 0 0 2mm;
    color: #0E9F4F;
}

.print-doc-meta p {
    margin: 0;
    font-size: 9pt;
    color: #475569;
}

/* Ringkasan */
.print-doc-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3mm;
    margin-bottom: 6mm;
}

.summary-item {
    border: 1px solid #E2E8F0;
    border-radius: 2mm;
    padding: 3mm;
    break-inside: avoid;
}

.summary-label {
    display: block;
    font-size: 8pt;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748B;
    margin-bottom: 1mm;
}

.summary-value {
    display: block;
    font-size: 12pt;
    font-weight: 700;
    color: #0F2419;
    font-variant-numeric: tabular-nums;
}

.amount-income {
    color: #0d6832 !important;
}

.amount-expense {
    color: #c81e1e !important;
}

/* Tabel detail */
.print-doc-detail h3 {
    font-size: 11pt;
    font-weight: 700;
    color: #0F2419;
    margin: 0 0 3mm;
    padding-bottom: 2mm;
    border-bottom: 1px solid #E2E8F0;
}

.print-doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
}

.print-doc-table th {
    background: #F1F5F9;
    color: #334155;
    font-weight: 600;
    text-align: left;
    padding: 2.5mm 2mm;
    border: 1px solid #E2E8F0;
}

.print-doc-table td {
    padding: 2.5mm 2mm;
    border: 1px solid #E2E8F0;
    color: #1E293B;
}

.print-doc-table tr {
    break-inside: avoid;
}

.print-doc-table tr:nth-child(even) td {
    background: #F8FAFC;
}

.print-doc-table .col-no {
    width: 6%;
    text-align: center;
}

.print-doc-table .col-date {
    width: 13%;
    white-space: nowrap;
}

.print-doc-table .col-amount {
    width: 18%;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.print-doc-table .col-method,
.print-doc-table .col-desc {
    white-space: nowrap;
}

.print-doc-table .tag {
    display: inline-block;
    padding: 0.5mm 2mm;
    border-radius: 1.5mm;
    font-size: 8pt;
    font-weight: 600;
}

.print-doc-table .tag-income {
    background: #e6f7ee;
    color: #0d6832;
}

.print-doc-table .tag-expense {
    background: #fde8e8;
    color: #c81e1e;
}

.print-doc-table .empty-row {
    text-align: center;
    color: #64748B;
    padding: 8mm 0;
}

/* Footer dokumen */
.print-doc-footer {
    margin-top: 6mm;
    padding-top: 3mm;
    border-top: 1px solid #E2E8F0;
    text-align: center;
    font-size: 8pt;
    color: #94A3B8;
}

/* @media print — hanya dokumen yang dicetak (unconditional: aman untuk Ctrl+P langsung) */
@media print {
    body,
    html {
        background: white !important;
        color: black !important;
    }

    #app,
    .sidebar,
    .header,
    .bottom-nav,
    .modal-container,
    .toast-message {
        display: none !important;
    }

    .print-document {
        display: block !important;
    }

    .print-doc {
        max-width: none;
        padding: 0;
    }
}

/* PDF Container Styling (dipakai html2pdf — clone) */
/* PDF Container Styling — clone dokumen bersih (#print-document) */
.pdf-container {
    width: 210mm;
    background: white;
}

.pdf-container .print-doc {
    padding: 10mm;
    max-width: none;
}


/* Extra small devices */
@media (max-width: 360px) {
    .report-card {
        padding: 0.75rem;
    }

    .report-card-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-right: 0.5rem;
    }

    .report-card-content h4 {
        font-size: 0.75rem;
    }

    .report-card-value {
        font-size: 1rem;
    }

    .report-card-detail {
        font-size: 0.7rem;
        margin-top: 0.15rem;
    }

    .chart-wrapper {
        height: 180px;
    }

    .breakdown-container {
        grid-template-columns: 1fr;
    }

    .category-breakdown {
        gap: 1rem;
    }

    .payment-method-analysis {
        grid-template-columns: 1fr;
        overflow-x: visible;
        margin: 0.75rem 0 1.5rem;
    }

    .payment-method-item {
        padding: 0.75rem;
    }

    .payment-method-stats {
        grid-template-columns: 1fr;
    }
}

.description-autocomplete-dropdown {
    position: absolute;
    background: var(--bg-secondary, #fff);
    /* 💪 warna solid putih */
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.12);
    color: #222;
    z-index: 999999 !important;
    /* pastikan di atas semua */
    opacity: 1 !important;
    /* pastikan tidak ikut transparan */
    backdrop-filter: none !important;
    /* hilangkan efek blur/transparan */
    -webkit-backdrop-filter: none !important;
    transform: translateZ(0);
    /* paksa layer rendering sendiri */
    max-height: 220px;
    overflow-y: auto;
    padding: 6px 4px;
    min-width: 240px;
}


.description-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 6px;
}

.description-autocomplete-item+.description-autocomplete-item {
    margin-top: 2px;
}

.description-autocomplete-item:hover,
.description-autocomplete-item.active {
    background: rgba(0, 0, 0, 0.04);
}

.description-autocomplete-item strong {
    font-weight: 700;
}