/* ============================================================
   dashboard.css — tampilan Dashboard Penulis
   Dipakai bersama style.css (variabel warna diambil dari sana).
   ============================================================ */

.badan-dash { background: var(--krem-tua); }

.dash { display: grid; grid-template-columns: 262px 1fr; min-height: 100vh; align-items: start; transition: grid-template-columns .25s ease; }
.dash.sisi-dilipat { grid-template-columns: 0 1fr; }
.dash.sisi-dilipat .dash-sisi { transform: translateX(-100%); }
.dash-sisi { transition: transform .25s ease; }

/* ---------- Sisi kiri ---------- */
.dash-sisi {
    position: sticky; top: 0; align-self: start;
    height: 100vh; overflow-y: auto;
    background: linear-gradient(170deg, var(--navy-tua) 0%, #061426 100%);
    color: rgba(255, 255, 255, .75);
    padding: 24px 16px; display: flex; flex-direction: column; gap: 8px;
}
.dash-logo { margin-bottom: 22px; padding: 0 8px; }
.dash-logo .logo-teks { font-size: 1.08rem; }
.dash-logo .logo-teks small { color: rgba(255, 255, 255, .55); }

.dash-menu { display: grid; gap: 4px; }
.dash-menu a, .dash-sisi-bawah a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: var(--radius-kecil);
    color: rgba(255, 255, 255, .76); font-size: .92rem; font-weight: 500;
}
.dash-menu a:hover, .dash-sisi-bawah a:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.dash-menu a.aktif { background: rgba(200, 162, 74, .18); color: #fff; font-weight: 600; }
.dash-menu a.aktif .ikon { color: var(--emas); }
.dash-menu .ikon, .dash-sisi-bawah .ikon { width: 19px; height: 19px; flex: 0 0 19px; }

.dash-sisi-bawah {
    margin-top: auto; padding-top: 16px; display: grid; gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

/* ---------- Bagian utama ---------- */
/* min-width:0 wajib ada, agar tabel lebar tidak melebarkan seluruh halaman */
.dash-utama { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }

.dash-atas {
    display: flex; align-items: center; gap: 18px;
    background: var(--putih); border-bottom: 1px solid var(--garis);
    padding: 18px 30px; position: sticky; top: 0; z-index: 20;
}
.dash-atas h1 { font-size: 1.4rem; margin: 0; }
.dash-atas p { margin: 0; font-size: .84rem; color: var(--tinta-lembut); }
.dash-tombol-sisi { display: flex; }

.dash-pengguna { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.dash-avatar {
    width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(140deg, var(--navy) 0%, var(--navy-tua) 100%);
    color: var(--emas-muda); font-family: var(--serif); font-size: 1.25rem; font-weight: 700;
}
.dash-pengguna-teks { display: flex; flex-direction: column; line-height: 1.35; }
.dash-pengguna-teks strong { font-size: .89rem; color: var(--navy-tua); }
.dash-pengguna-teks span { font-size: .78rem; color: var(--tinta-lembut); }

.dash-isi { padding: 30px; flex: 1; min-width: 0; }

.dash-bawah {
    display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    padding: 20px 30px; border-top: 1px solid var(--garis);
    font-size: .82rem; color: var(--tinta-lembut);
}
.dash-bawah p { margin: 0; }

/* ---------- Kartu ringkasan ---------- */
.dash-angka {
    display: grid; gap: 18px; margin-bottom: 26px;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.dash-kartu {
    background: var(--putih); border: 1px solid var(--garis); border-radius: var(--radius);
    padding: 22px 24px;
}
.dash-kartu-kepala { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dash-kartu-kepala h3 { margin: 0; font-size: 1.05rem; }
.dash-kartu .label {
    font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
    color: var(--tinta-lembut); font-weight: 600;
}
.dash-kartu .nilai { font-family: var(--serif); font-size: 2rem; color: var(--navy); line-height: 1.1; margin: 8px 0 2px; }
.dash-kartu .ket { font-size: .82rem; color: var(--tinta-lembut); }
.dash-kartu .kotak-ikon {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: rgba(23, 64, 110, .09); color: var(--navy);
}
.dash-kartu .kotak-ikon .ikon { width: 20px; height: 20px; }

.dash-dua { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }

/* ---------- Tabel ---------- */
.tabel-bungkus { overflow-x: auto; max-width: 100%; }
.tabel {
    width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px;
}
.tabel th {
    text-align: left; padding: 12px 14px; background: var(--krem);
    font-size: .76rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--tinta-lembut); font-weight: 700; border-bottom: 1px solid var(--garis);
    white-space: nowrap;
}
.tabel td { padding: 14px; border-bottom: 1px solid var(--garis); vertical-align: middle; }
.tabel tr:last-child td { border-bottom: none; }
.tabel tbody tr:hover { background: var(--krem); }
.tabel .angka { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabel .judul-sel { font-weight: 600; color: var(--navy-tua); }
.tabel .kode { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .84rem; color: var(--tinta-lembut); }

/* ---------- Pelacak status naskah ---------- */
.pelacak { display: flex; gap: 4px; margin: 18px 0 6px; }
.pelacak-tahap { flex: 1; text-align: center; position: relative; }
.pelacak-titik {
    width: 26px; height: 26px; margin: 0 auto 8px; border-radius: 50%;
    display: grid; place-items: center; font-size: .72rem; font-weight: 700;
    background: var(--krem-tua); color: var(--tinta-lembut); border: 2px solid var(--garis);
    position: relative; z-index: 1;
}
.pelacak-tahap::before {
    content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px;
    background: var(--garis);
}
.pelacak-tahap:first-child::before { display: none; }
.pelacak-tahap.selesai .pelacak-titik { background: var(--navy); border-color: var(--navy); color: #fff; }
.pelacak-tahap.selesai::before { background: var(--navy); }
.pelacak-tahap.sekarang .pelacak-titik {
    background: var(--emas); border-color: var(--emas); color: #33280a;
    box-shadow: 0 0 0 4px rgba(200, 162, 74, .22);
}
.pelacak-tahap.sekarang::before { background: var(--navy); }
.pelacak-label { font-size: .72rem; color: var(--tinta-lembut); line-height: 1.3; }
.pelacak-tahap.sekarang .pelacak-label { color: var(--navy-tua); font-weight: 600; }

/* ---------- Riwayat ---------- */
.riwayat { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 2px solid var(--garis); display: grid; gap: 22px; }
.riwayat li { position: relative; }
.riwayat li::before {
    content: ""; position: absolute; left: -31px; top: 6px; width: 12px; height: 12px;
    border-radius: 50%; background: var(--emas); border: 3px solid var(--putih);
}
.riwayat .tgl { font-size: .8rem; color: var(--tinta-lembut); }
.riwayat .keg { display: block; font-weight: 600; color: var(--navy-tua); font-size: .94rem; margin: 2px 0; }
.riwayat .oleh { font-size: .8rem; color: var(--tinta-lembut); }

/* ---------- Notifikasi ---------- */
.notif { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.notif li {
    display: flex; gap: 13px; padding: 14px 16px; border-radius: var(--radius-kecil);
    background: var(--krem); border-left: 3px solid var(--garis);
}
.notif li.aksi { border-left-color: var(--emas); background: rgba(200, 162, 74, .09); }
.notif .ikon { color: var(--navy); margin-top: 3px; }
.notif li.aksi .ikon { color: #9a7716; }
.notif p { margin: 0; font-size: .9rem; }
.notif .tgl { font-size: .78rem; color: var(--tinta-lembut); }

/* ---------- Batang grafik sederhana ---------- */
.grafik { display: grid; gap: 14px; margin-top: 18px; }
.grafik-baris { display: grid; grid-template-columns: 130px 1fr 110px; gap: 14px; align-items: center; font-size: .86rem; }
.grafik-batang { height: 10px; border-radius: 100px; background: var(--krem-tua); overflow: hidden; }
.grafik-batang span { display: block; height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--navy), var(--emas)); }
.grafik-nilai { text-align: right; font-variant-numeric: tabular-nums; color: var(--navy-tua); font-weight: 600; }

/* ---------- Halaman login ---------- */
.masuk-halaman {
    min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
    background: var(--krem);
}
.masuk-sisi {
    background: linear-gradient(150deg, var(--navy-tua) 0%, #061426 100%);
    color: #fff; padding: 60px 54px; display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden;
}
.masuk-sisi::after {
    content: ""; position: absolute; right: -110px; top: -110px; width: 380px; height: 380px;
    border-radius: 50%; background: radial-gradient(circle, rgba(200, 162, 74, .22), transparent 68%);
}
.masuk-sisi > * { position: relative; z-index: 1; }
.masuk-sisi h2 { color: #fff; font-size: 2rem; }
.masuk-sisi p { color: rgba(255, 255, 255, .78); }
.masuk-fitur { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.masuk-fitur li { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; color: rgba(255, 255, 255, .85); }
.masuk-fitur .ikon { color: var(--emas); margin-top: 4px; }

.masuk-kotak { display: flex; align-items: center; justify-content: center; padding: 50px 30px; }
.masuk-kartu { width: 100%; max-width: 400px; }
.masuk-kartu h1 { font-size: 1.7rem; margin-bottom: 6px; }
.masuk-kartu > p { color: var(--tinta-lembut); font-size: .93rem; }

/* ---------- Utilitas ---------- */
.sembunyi { display: none !important; }

/* ---------- Responsif ---------- */
@media (max-width: 1100px) {
    .dash-dua { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .dash { grid-template-columns: 1fr; }
    .dash-sisi {
        position: fixed; left: 0; top: 0; bottom: 0; width: 262px; z-index: 60;
        transform: translateX(-100%); transition: transform .25s;
    }
    .dash-sisi.tampil { transform: translateX(0); }
    .dash-tombol-sisi { display: flex; }
    .dash-atas { padding: 16px 20px; }
    .dash-atas h1 { font-size: 1.15rem; }
    .dash-pengguna-teks { display: none; }
    .dash-isi { padding: 20px; }
    .masuk-halaman { grid-template-columns: 1fr; }
    .masuk-sisi { display: none; }
    
    .tombol-tutup-sisi { display: block !important; }
}

@media (max-width: 620px) {
    .pelacak { flex-wrap: wrap; gap: 12px; }
    .pelacak-tahap { flex: 1 1 22%; }
    .pelacak-tahap::before { display: none; }
    .grafik-baris { grid-template-columns: 1fr; gap: 6px; }
    .grafik-nilai { text-align: left; }
}
