
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ========================================
   VARIABEL WARNA
======================================== */
:root {
    --bg: #eef1f2;
    --ink: #292f35;
    --muted: #737c83;
    --navy: #2d5277;
    --gold: #b59a61;
    --line: #e2d9c8;
    --green: #397a50;
    --card: #fff;
    --shadow: 0 10px 26px rgba(28, 42, 51, .06);
}

/* ========================================
   DASAR
======================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

img,
canvas,
svg {
    max-width: 100%;
}

/* ========================================
   HEADER / NAVIGASI
======================================== */
.topbar {
    min-height: 76px;
    padding: 12px clamp(16px, 4vw, 54px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid #e8e9e8;
    gap: 12px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    min-width: 0;
}

.brand-lockup strong,
.brand-lockup small {
    display: block;
    line-height: 1.15;
    letter-spacing: .04em;
}

.brand-lockup strong {
    font-size: 16px;
}

.brand-lockup small {
    font-size: 12px;
    color: var(--gold);
    font-weight: 800;
    margin-top: 4px;
}

.brand-symbol {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #d8c28c, #a88743);
    color: white;
    font-size: 22px;
    font-weight: 800;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-actions form {
    margin: 0;
}

.user-chip {
    font-size: 12px;
    color: #627168;
    background: #edf5ef;
    border-radius: 30px;
    padding: 8px 12px;
}

.logout-button,
.back-link {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    padding: 9px 13px;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

/* ========================================
   HALAMAN
======================================== */
.page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 26px clamp(14px, 3vw, 30px) 18px;
    min-width: 0;
}

.welcome-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 20px;
}

.welcome-row h1 {
    font-size: clamp(25px, 3vw, 34px);
    margin: 0;
    letter-spacing: -.04em;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: .18em;
    color: var(--gold);
    font-weight: 800;
    margin: 0 0 4px;
}

.muted {
    color: var(--muted);
    margin: 5px 0 0;
    font-size: 13px;
}

.today-pill {
    background: #fff;
    border: 1px solid var(--line);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
}

/* ========================================
   KARTU DASHBOARD
======================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.metric-card,
.table-card {
    background: var(--card);
    border: 1px solid rgba(218, 207, 184, .8);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 22px;
    min-width: 0;
}

.metric-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    color: #4d555b;
}

.metric-icon {
    color: var(--gold);
    font-size: 19px;
}

.metric-value {
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: -.04em;
    margin: 8px 0 2px;
    overflow-wrap: anywhere;
}

.metric-value small {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
}

.metric-foot {
    color: var(--muted);
    font-size: 11px;
}

/* ========================================
   GRAFIK SALDO REKENING
======================================== */
.balance-card {
    min-width: 0;
}

.saldo-chart-container {
    position: relative;
    width: 100%;
    height: 170px;
    min-height: 170px;
    max-height: 170px;
    margin: 16px 0;
    min-width: 0;
}

.saldo-chart-container canvas {
    display: block;
    max-width: 100%;
}

/* ========================================
   TAUTAN / TOMBOL
======================================== */
.quick-links {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.outline-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    text-decoration: none;
    color: #343a3e;
    background: #fffdf8;
    border: 1px solid #d8c9a9;
    border-radius: 13px;
    padding: 11px 12px;
    min-height: 43px;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, transform .15s;
}

.outline-link:hover {
    background: #faf5e9;
    transform: translateY(-1px);
}

.back-link {
    font-size: 12px;
    white-space: nowrap;
}

/* ========================================
   GRAFIK AKTIVITAS
======================================== */
.activity-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bar-chart {
    height: 205px;
    display: flex;
    align-items: flex-end;
    gap: clamp(5px, 1vw, 13px);
    padding: 14px 0 0;
    margin-top: 8px;
    border-bottom: 1px solid #b9c0c5;
    min-width: 0;
}

.bar-column {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.bar {
    width: min(100%, 36px);
    min-height: 3px;
    background: var(--navy);
    border-radius: 6px 6px 0 0;
    transition: height .25s;
}

.bar-value {
    font-size: 10px;
    color: var(--muted);
    min-height: 14px;
}

.bar-column span {
    font-size: 10px;
    color: #687078;
    white-space: nowrap;
    padding-bottom: 5px;
}

.legend {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
    margin: 12px 0 16px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: var(--navy);
}

.activity-card > .outline-link {
    margin-top: auto;
}

/* ========================================
   KARTU PROFIT
======================================== */
.profit-card {
    grid-column: 1 / -1;
    padding: 22px 24px;
}

.profit-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profit-number {
    color: var(--green);
    font-size: clamp(27px, 3.5vw, 39px);
    margin-top: 7px;
}

.profit-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 11px;
}

.profit-bottom svg {
    width: min(36%, 220px);
    height: 48px;
    color: var(--navy);
}

/* ========================================
   JUDUL BAGIAN
======================================== */
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 12px;
}

.section-heading h2 {
    font-size: 18px;
    margin: 0;
}

.text-link {
    color: var(--navy);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* ========================================
   TABEL UMUM DAN TABEL REKENING
======================================== */
.table-card {
    padding: 0;
    overflow: hidden;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
}

table:not(.transaksi-table) {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
}

table:not(.transaksi-table) th,
table:not(.transaksi-table) td {
    padding: 15px 20px;
    border-bottom: 1px solid #edf0f1;
}

table:not(.transaksi-table) th {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    background: #fbfcfc;
}

table:not(.transaksi-table) tbody tr:last-child td {
    border-bottom: 0;
}

table:not(.transaksi-table) td {
    font-size: 13px;
}

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

.money {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.account-mark {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #f6f1e5;
    color: var(--gold);
    margin-right: 10px;
}

.data-note {
    font-size: 10px;
    color: #8a9298;
    margin: 12px 2px;
}

.empty-state {
    padding: 25px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

/* ========================================
   LAPORAN
======================================== */
.report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.report-grid .metric-card {
    padding: 18px;
    border-radius: 18px;
}

.report-grid .metric-value {
    font-size: clamp(20px, 2.5vw, 28px);
}

/* ========================================
   LOGIN
======================================== */
.login-body {
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #fff 0, #eef1f2 58%);
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-shell {
    width: min(430px, 100%);
}

.login-shell > .brand-lockup {
    justify-content: center;
    margin-bottom: 22px;
}

.login-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(22px, 6vw, 36px);
    box-shadow: 0 18px 50px rgba(35, 50, 60, .09);
}

.login-card h1 {
    font-size: 28px;
    letter-spacing: -.04em;
    margin: 2px 0;
}

.login-card form {
    display: grid;
    gap: 9px;
    margin-top: 23px;
}

.login-card label {
    font-size: 12px;
    font-weight: 700;
    margin-top: 5px;
}

.login-card input {
    width: 100%;
    height: 46px;
    border: 1px solid #dce1e3;
    border-radius: 12px;
    padding: 0 13px;
    font: inherit;
    background: #fcfdfd;
    outline: none;
}

.login-card input:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(45, 82, 119, .12);
}

.primary-button {
    height: 48px;
    margin-top: 10px;
    border: 0;
    border-radius: 12px;
    background: var(--navy);
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.security-note,
.login-footer {
    text-align: center;
    color: var(--muted);
    font-size: 10px;
    margin: 20px 0 0;
}

.login-footer {
    margin-top: 18px;
}

/* ========================================
   NOTIFIKASI
======================================== */
.notice {
    padding: 13px 15px;
    border-radius: 13px;
    margin: 0 0 16px;
    font-size: 12px;
}

.notice-warn {
    background: #fff7e6;
    border: 1px solid #ead6a6;
    color: #6d5725;
}

.notice-error {
    background: #fff0ee;
    border: 1px solid #f0c7c1;
    color: #8b3329;
    margin: 14px 0;
}

.notice ul {
    margin: 6px 0;
    padding-left: 18px;
}

/* ========================================
   GAUGE / INDIKATOR
======================================== */
.gauge {
    margin: 18px auto 12px;
    max-width: 340px;
}

.gauge-arc {
    height: 78px;
    position: relative;
    overflow: hidden;
}

.gauge-arc::before {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    top: 7px;
    height: 130px;
    border-radius: 50%;
    border: 15px solid #e7ebed;
    border-bottom-color: transparent;
    transform: rotate(0deg);
}

.gauge-arc span {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 7px;
    height: 130px;
    border-radius: 50%;
    border: 15px solid var(--navy);
    border-bottom-color: transparent;
    border-right-color: var(--navy);
    transform: rotate(-5deg);
    clip-path: inset(0 0 43% 0);
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--muted);
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 18px clamp(16px, 4vw, 54px) 25px;
    color: #7f878c;
    font-size: 10px;
}

/* ========================================
   TABEL RINGKASAN TRANSAKSI
   Satu baris per sel, tanpa membungkus teks
======================================== */
.table-card.transaksi-card {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

/* Area scroll tabel */
.transaksi-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 600px;
    overflow: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Lebar tabel mengikuti panjang isi kolom */
table.transaksi-table {
    display: table;
    width: max-content;
    min-width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 12px;
    line-height: 18px;
    color: #303943;
}

/* Semua sel transaksi satu baris */
table.transaksi-table th,
table.transaksi-table td {
    display: table-cell;
    box-sizing: border-box;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    word-wrap: normal !important;
    vertical-align: middle;
    height: auto;
    padding: 10px 12px;
    line-height: 18px;
}

/* Header transaksi */
table.transaksi-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #2d5277;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    border-right: 1px solid #496a89;
    border-bottom: 2px solid #203f5e;
}

/* Isi transaksi */
table.transaksi-table tbody td {
    border-right: 1px solid #e7ebef;
    border-bottom: 1px solid #e1e6eb;
    background-clip: padding-box;
}

/* Baris selang-seling */
table.transaksi-table tbody tr:nth-child(odd) td {
    background-color: #fff;
}

table.transaksi-table tbody tr:nth-child(even) td {
    background-color: #f4f7fa;
}

/* Efek saat kursor diarahkan ke baris */
table.transaksi-table tbody tr:hover td {
    background-color: #e5eff9;
}

/* Kolom angka: rata kanan dan satu baris */
table.transaksi-table td.angka {
    text-align: right;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums;
}

/* Kolom ID */
table.transaksi-table td.kolom-id {
    min-width: 150px;
}

/* Kolom keterangan: tidak turun baris dan tidak dipotong */
table.transaksi-table td.kolom-keterangan {
    white-space: nowrap !important;
    overflow: visible;
    text-overflow: clip;
}

/* Scrollbar tabel */
.transaksi-table-wrap::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.transaksi-table-wrap::-webkit-scrollbar-thumb {
    background: #a5b2c0;
    border-radius: 10px;
}

.transaksi-table-wrap::-webkit-scrollbar-track {
    background: #edf1f5;
}

/* ========================================
   TAMPILAN DESKTOP
======================================== */
@media (min-width: 721px) {
    .balance-card,
    .activity-card {
        min-height: 530px;
    }

    .quick-links {
        margin-top: auto;
    }

    .gauge {
        margin-top: 30px;
    }
}

/* ========================================
   TAMPILAN HP / TABLET
======================================== */
@media (max-width: 720px) {
    .topbar {
        min-height: 66px;
        padding: 10px 14px;
    }

    .brand-symbol {
        flex-basis: 35px;
        width: 35px;
        height: 35px;
    }

    .brand-lockup strong {
        font-size: 13px;
    }

    .brand-lockup small {
        font-size: 10px;
    }

    .user-chip {
        display: none;
    }

    .page {
        padding: 19px 13px 12px;
    }

    .welcome-row {
        margin-bottom: 15px;
    }

    .welcome-row h1 {
        font-size: 26px;
    }

    .metrics-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 13px;
    }

    .metric-card {
        padding: 19px;
        border-radius: 19px;
    }

    .profit-card {
        grid-column: auto;
        padding: 19px;
    }

    .activity-card {
        min-height: 370px;
    }

    .bar-chart {
        height: 190px;
    }

    .quick-links {
        gap: 7px;
    }

    .outline-link {
        min-height: 45px;
    }

    .profit-bottom svg {
        width: 34%;
    }

    .section-heading {
        margin-top: 22px;
    }

    .section-heading h2 {
        font-size: 16px;
    }

    .report-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .report-grid .metric-card {
        padding: 15px;
    }

    .site-footer {
        padding: 15px;
        flex-direction: column;
        gap: 4px;
    }

    .today-pill {
        font-size: 10px;
        padding: 7px 9px;
    }

    .logout-button {
        padding: 8px 10px;
    }

    .gauge-arc {
        height: 72px;
    }

    .saldo-chart-container {
        height: 200px;
        min-height: 200px;
        max-height: 200px;
    }

    /* Tabel transaksi tetap satu baris di HP */
    .transaksi-table-wrap {
        max-width: 100%;
        overflow-x: auto;
    }

    table.transaksi-table {
        font-size: 11px;
        width: max-content;
        min-width: 100%;
    }

    table.transaksi-table th,
    table.transaksi-table td {
        white-space: nowrap !important;
        padding: 9px 10px;
    }
}

/* ========================================
   AKSESIBILITAS
======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* ========================================
   FIX GRAFIK DASHBOARD DESKTOP
======================================== */

@media (min-width: 721px) {

    /* Samakan tinggi dan susunan kedua kartu */
    .metrics-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 18px;
    }

    .metrics-grid > .activity-card,
    .metrics-grid > .balance-card {
        height: 530px;
        min-height: 530px;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    /* Judul dan nilai saldo tidak berubah posisi */
    .activity-card .metric-head,
    .balance-card .metric-head {
        flex-shrink: 0;
    }

    .activity-card .metric-value,
    .balance-card .metric-value {
        flex-shrink: 0;
    }

    /* Grafik aktivitas */
    .activity-card .bar-chart {
        height: 205px;
        min-height: 205px;
        flex-shrink: 0;
        margin-top: 8px;
    }

    /* Legenda aktivitas */
    .activity-card .legend {
        flex-shrink: 0;
        margin-bottom: 16px;
    }

    /* Area grafik saldo */
    .balance-card .metric-foot {
        flex-shrink: 0;
    }

    .balance-card .saldo-chart-container {
        position: relative;
        width: 100%;
        height: 200px;
        min-height: 200px;
        max-height: 200px;
        margin: 8px 0 16px;
        flex-shrink: 0;
    }

    .balance-card .saldo-chart-container canvas {
        display: block;
        width: 100% !important;
        height: 100% !important;
        max-width: 100%;
    }

    /* Tombol sejajar di bagian bawah kartu */
    .activity-card > .outline-link {
        margin-top: auto;
        flex-shrink: 0;
    }

    .balance-card > .quick-links {
        margin-top: auto;
        flex-shrink: 0;
        width: 100%;
    }

    .balance-card .quick-links .outline-link {
        width: 100%;
    }
}

/* ========================================
   TAMPILAN HP TETAP RESPONSIF
======================================== */

@media (max-width: 720px) {

    .metrics-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .metrics-grid > .activity-card,
    .metrics-grid > .balance-card {
        height: auto;
        min-height: 0;
    }

    .activity-card {
        min-height: 370px;
    }

    .activity-card .bar-chart {
        height: 190px;
        min-height: 0;
    }

    .balance-card .saldo-chart-container {
        height: 140px;
        min-height: 140px;
        max-height: 140px;
    }

    .balance-card .saldo-chart-container canvas {
        height: 100% !important;
    }
}
.btn-hapus-transaksi {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-hapus-transaksi:hover {
    background: #bb2d3b;
}

td form {
    margin: 0;
}

/* Tabel transaksi: satu baris per transaksi */
#transaksi .responsive-table {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

#transaksi .responsive-table table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

#transaksi .responsive-table th,
#transaksi .responsive-table td {
    padding: 14px 16px;
    white-space: nowrap;
    vertical-align: middle;
    line-height: 1.4;
}

/* Kolom jenis transaksi tidak boleh turun baris */
#transaksi .responsive-table th:nth-child(5),
#transaksi .responsive-table td:nth-child(5) {
    min-width: 130px;
}

/* Kolom ID */
#transaksi .responsive-table th:nth-child(3),
#transaksi .responsive-table td:nth-child(3) {
    min-width: 230px;
}

/* Kolom nominal dan saldo */
#transaksi .responsive-table td.money,
#transaksi .responsive-table th.align-right,
#transaksi .responsive-table td.align-right {
    text-align: right;
}

/* Tanggal */
#transaksi .responsive-table th:first-child,
#transaksi .responsive-table td:first-child {
    min-width: 90px;
}

/* Tombol aksi tidak turun baris */
#transaksi .responsive-table td form {
    margin: 0;
    white-space: nowrap;
}

.btn-tambah-transaksi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 9px;
    background: #2d5277;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: background .2s ease;
}

.btn-tambah-transaksi:hover {
    background: #234361;
    color: #fff;
}

@media (max-width: 600px) {
    .btn-tambah-transaksi {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Samakan posisi tombol pada kedua card */
.metric-card,
.action-card {
    box-sizing: border-box;
}

/* Area tombol dibuat dengan jarak dan ukuran seragam */
.metric-card .card-actions,
.action-card .card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

/* Samakan ukuran semua tombol */
.metric-card .card-actions a,
.action-card .card-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 14px;
    line-height: 1.4;
}

.date-filter-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.date-filter-form .today-pill {
    box-sizing: border-box;
    width: 125px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #e5d8c4;
    border-radius: 13px;
    background: #fff;
    color: #292f35;
    font: inherit;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    outline: none;
}

.date-filter-form .today-pill:focus {
    border-color: #b59a69;
    box-shadow: 0 0 0 3px rgba(181, 154, 105, 0.15);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 600px) {
    .date-filter-form .today-pill {
        width: 120px;
    }
}

/* PEMBUNGKUS GRAFIK SALDO */
.saldo-chart-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 0;
}

.saldo-chart-inner {
    position: relative;
    height: 390px;
    min-width: 100%;
}

/* CANVAS GRAFIK */
.saldo-chart-inner canvas {
    display: block;
}

/* Samakan tinggi panel dashboard */
.metrics-grid {
    align-items: stretch;
}

.metrics-grid > .metric-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

/* Dorong semua tombol ke bagian bawah panel */
.metrics-grid > .metric-card .quick-links:first-of-type {
    margin-top: auto;
}

/* Jarak antartombol konsisten */
.metrics-grid > .metric-card .quick-links {
    width: 100%;
    margin-bottom: 0;
}

.metrics-grid > .metric-card .quick-links + .quick-links {
    margin-top: 6px;
}

/* Tombol memenuhi lebar panel */
.metrics-grid > .metric-card .outline-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
}

.date-filter-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.date-filter-form input,
.date-filter-form select {
    width: 100%;
    min-width: 140px;
    height: 40px;
    box-sizing: border-box;
}

.date-filter-form select {
    cursor: pointer;
}

/* Profit tertinggi pada grafik Aktivitas Harian */
.bar.bar-profit-tertinggi {
    background: #22c55e !important;
    background-color: #22c55e !important;
}


/* =========================================================
   TEMA GELAP GLOBAL BUKULINK V3 PRO
   Berlaku pada semua halaman yang memuat assets/style.css.
========================================================= */
html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1220;
    --ink: #e5e7eb;
    --muted: #a8b4c7;
    --line: #334155;
    --card: #151f30;
    --shadow: 0 10px 26px rgba(0, 0, 0, .22);
}
html[data-theme="dark"],
html[data-theme="dark"] body {
    background: #0b1220 !important;
    color: #e5e7eb !important;
}
html[data-theme="dark"] body,
html[data-theme="dark"] body main,
html[data-theme="dark"] body section,
html[data-theme="dark"] body .page,
html[data-theme="dark"] body .container,
html[data-theme="dark"] body .content,
html[data-theme="dark"] body .main-content,
html[data-theme="dark"] body .app-content {
    color: #e5e7eb;
}
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] nav,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .side-menu,
html[data-theme="dark"] .menu-panel {
    background: #111b2b !important;
    color: #e5e7eb !important;
    border-color: #2b394d !important;
}
html[data-theme="dark"] .brand-lockup,
html[data-theme="dark"] .brand-lockup strong,
html[data-theme="dark"] nav a,
html[data-theme="dark"] .navbar a,
html[data-theme="dark"] .sidebar a,
html[data-theme="dark"] .side-menu a {
    color: #e5e7eb !important;
}
html[data-theme="dark"] .user-chip {
    background: #203149 !important;
    color: #dbeafe !important;
}
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .section-heading,
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-dialog,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .popup,
html[data-theme="dark"] .dialog,
html[data-theme="dark"] fieldset {
    background: #151f30 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
    box-shadow: 0 5px 18px rgba(0,0,0,.18);
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] p,
html[data-theme="dark"] label,
html[data-theme="dark"] legend,
html[data-theme="dark"] th,
html[data-theme="dark"] td,
html[data-theme="dark"] li,
html[data-theme="dark"] small,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .form-text,
html[data-theme="dark"] .help-text {
    color: #e5e7eb;
}
html[data-theme="dark"] .muted,
html[data-theme="dark"] small,
html[data-theme="dark"] .form-text,
html[data-theme="dark"] .help-text,
html[data-theme="dark"] .data-note {
    color: #a8b4c7 !important;
}
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .today-pill {
    background: #0f1929 !important;
    color: #e5e7eb !important;
    border-color: #40516a !important;
    color-scheme: dark;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}
html[data-theme="dark"] table,
html[data-theme="dark"] .table,
html[data-theme="dark"] .responsive-table table {
    color: #e5e7eb !important;
    border-color: #334155 !important;
}
html[data-theme="dark"] thead,
html[data-theme="dark"] th,
html[data-theme="dark"] .table thead th {
    background: #1d2a3d !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}
html[data-theme="dark"] tbody tr,
html[data-theme="dark"] .table tbody tr {
    background: #151f30 !important;
    color: #e5e7eb !important;
}
html[data-theme="dark"] tbody tr:nth-child(even),
html[data-theme="dark"] .table tbody tr:nth-child(even) {
    background: #192538 !important;
}
html[data-theme="dark"] td,
html[data-theme="dark"] th {
    border-color: #334155 !important;
}
html[data-theme="dark"] a:not(.logout-button):not(.pengeluaran-dashboard-btn),
html[data-theme="dark"] .back-link {
    color: #93c5fd;
}
html[data-theme="dark"] button,
html[data-theme="dark"] .btn,
html[data-theme="dark"] .logout-button,
html[data-theme="dark"] .back-link {
    border-color: #40516a;
}
html[data-theme="dark"] .outline-link,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .back-link {
    background: #1a2638 !important;
    color: #dbeafe !important;
}
html[data-theme="dark"] .notice,
html[data-theme="dark"] .alert,
html[data-theme="dark"] .empty-state {
    background: #172438 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}
html[data-theme="dark"] .notice-warn,
html[data-theme="dark"] .alert-warning {
    background: #3b2c16 !important;
    color: #fde68a !important;
}
html[data-theme="dark"] hr,
html[data-theme="dark"] .divider {
    border-color: #334155 !important;
}
html[data-theme="dark"] ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #0b1220;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #40516a;
    border: 2px solid #0b1220;
    border-radius: 10px;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
