/* =========================================================
   Sistem Notulen Rapat Terintegrasi Yayasan
   Desain: clean, formal, modern — untuk instansi pendidikan
   ========================================================= */

:root {
    --biru-tua: #0f3460;
    --biru-tua-dark: #0a2540;
    --biru-muda: #1a4a7a;
    --hijau-tua: #1b5e42;
    --hijau-tua-light: #e5f3ec;
    --abu: #6b7280;
    --abu-sedang: #9ca3af;
    --abu-terang: #f3f4f6;
    --abu-border: #e2e5ea;
    --kuning: #b7791f;
    --kuning-bg: #fdf3d9;
    --merah: #b91c1c;
    --merah-bg: #fde8e8;
    --putih: #ffffff;
    --teks: #1f2937;
    --teks-soft: #374151;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(15, 52, 96, 0.06), 0 1px 2px rgba(15, 52, 96, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 52, 96, 0.08), 0 2px 4px rgba(15, 52, 96, 0.04);
    --shadow-lg: 0 10px 30px rgba(15, 52, 96, 0.12);
    --transition: 0.18s ease;
    --sidebar-w: 250px;
    --sidebar-w-collapsed: 72px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--teks);
    background: #eef1f5;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--biru-tua); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--biru-muda); text-decoration: underline; }

h1, h2, h3, h4 {
    color: var(--biru-tua-dark);
    margin: 0 0 .5em;
    font-weight: 650;
    letter-spacing: -0.01em;
}
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

/* ---------- Layout shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--biru-tua-dark) 0%, #071a2e 100%);
    color: #dbe6f5;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 30;
    box-shadow: 2px 0 12px rgba(0,0,0,.12);
    transition: width .22s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    min-width: 0;
    overflow: hidden;
}

/* Logo sidebar: ukuran tetap, tidak merusak layout */
.brand-logo {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    object-fit: contain;
    object-position: center;
    border-radius: 7px;
    background: rgba(255,255,255,.95);
    flex: 0 0 32px;
    display: block;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
    padding: 2px;
    box-sizing: border-box;
}
.auth-logo {
    width: 64px;
    height: 64px;
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
    border-radius: 14px;
    margin: 0 auto .85rem;
    display: block;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15,52,96,.12);
    padding: 6px;
    box-sizing: border-box;
}
.brand-mark {
    background: linear-gradient(135deg, var(--hijau-tua), #2d8a5e);
    color: #fff;
    font-weight: 700;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: .75rem;
    letter-spacing: .5px;
    box-shadow: 0 2px 8px rgba(27, 94, 66, .35);
}
.sidebar-brand > div,
.sidebar-brand > .brand-copy {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}
.brand-text {
    font-weight: 650;
    font-size: .88rem;
    line-height: 1.25;
    color: #f0f5fb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.brand-sub {
    display: block;
    font-size: .65rem;
    font-weight: 400;
    color: #8fa3bc;
    margin-top: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: .85rem .65rem;
    gap: .15rem;
    flex: 1;
}
.nav-section-label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7f99;
    padding: .7rem .7rem .25rem;
    font-weight: 600;
}
.nav-link {
    color: #b8c9de;
    padding: .65rem .85rem;
    font-size: .875rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: .65rem;
    transition: background var(--transition), color var(--transition);
    border-left: none;
    font-weight: 500;
}
.nav-link .nav-ico {
    width: 1.15rem;
    text-align: center;
    opacity: .85;
    font-size: .95rem;
    flex-shrink: 0;
}
.nav-link:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
    text-decoration: none;
}
.nav-link.active {
    background: rgba(27, 94, 66, 0.35);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--hijau-tua);
}
.nav-link.active .nav-ico { opacity: 1; }

.sidebar-footer {
    padding: .9rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    font-size: .7rem;
    color: #6b7f99;
    text-align: center;
}

.main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    background: var(--putih);
    border-bottom: 1px solid var(--abu-border);
    padding: .7rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 15;
    box-shadow: 0 1px 0 rgba(15,52,96,.04);
}
.sidebar-toggle {
    display: flex;
    background: var(--abu-terang);
    border: 1px solid var(--abu-border);
    border-radius: 8px;
    width: 38px; height: 38px;
    font-size: 1.15rem;
    cursor: pointer;
    color: var(--biru-tua);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition);
}
.sidebar-toggle:hover { background: #e5e8ed; }
.topbar-title {
    font-weight: 650;
    color: var(--biru-tua-dark);
    flex: 1;
    font-size: .95rem;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: .85rem;
}
.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--biru-tua), var(--hijau-tua));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-name { font-weight: 650; color: var(--teks); }
.user-role {
    color: var(--abu);
    background: var(--abu-terang);
    padding: .12rem .45rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 500;
    width: fit-content;
}
.btn-logout {
    background: var(--merah-bg);
    color: var(--merah);
    padding: .4rem .75rem;
    border-radius: 7px;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition);
}
.btn-logout:hover {
    text-decoration: none;
    background: #f8d7d7;
    border-color: #f0c0c0;
    color: var(--merah);
}

.content {
    padding: 1.5rem 1.75rem 2.5rem;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Page header ---------- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-header h2 { margin: 0; }
.page-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------- Alerts ---------- */
.alert {
    padding: .8rem 1.05rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .88rem;
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    line-height: 1.45;
}
.alert-success {
    background: var(--hijau-tua-light);
    color: var(--hijau-tua);
    border: 1px solid #b7e0cb;
}
.alert-error {
    background: var(--merah-bg);
    color: var(--merah);
    border: 1px solid #f3b8b8;
}
.alert-dismissible {
    justify-content: space-between;
    align-items: center;
}
.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: .65;
    padding: 0 .2rem;
    margin-left: .5rem;
}
.alert-close:hover { opacity: 1; }

/* ---------- Cards / panels ---------- */
.card {
    background: var(--putih);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.2rem;
    border: 1px solid var(--abu-border);
    transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-title {
    font-size: .98rem;
    font-weight: 650;
    color: var(--biru-tua-dark);
    margin-bottom: 1rem;
    padding-bottom: .55rem;
    border-bottom: 1px solid var(--abu-border);
    display: flex;
    align-items: center;
    gap: .45rem;
}
.card-title .card-ico { opacity: .7; font-size: .95rem; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.stat-card {
    background: var(--putih);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem 1.25rem;
    border: 1px solid var(--abu-border);
    border-left: 4px solid var(--biru-tua);
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stat-card .stat-value {
    font-size: 1.85rem;
    font-weight: 750;
    color: var(--biru-tua-dark);
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.stat-card .stat-label {
    color: var(--abu);
    font-size: .8rem;
    margin-top: .25rem;
    font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .55rem 1.15rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform .1s ease;
    line-height: 1.3;
    font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: var(--biru-tua);
    color: #fff;
    box-shadow: 0 1px 3px rgba(15,52,96,.2);
}
.btn-primary:hover {
    background: var(--biru-tua-dark);
    color: #fff;
    box-shadow: 0 2px 6px rgba(15,52,96,.25);
}
.btn-success {
    background: var(--hijau-tua);
    color: #fff;
    box-shadow: 0 1px 3px rgba(27,94,66,.2);
}
.btn-success:hover {
    background: #144a34;
    color: #fff;
}
.btn-outline {
    background: #fff;
    color: var(--biru-tua);
    border-color: var(--abu-border);
}
.btn-outline:hover {
    background: #f7f9fc;
    border-color: var(--biru-tua);
    color: var(--biru-tua);
}
.btn-danger {
    background: var(--merah-bg);
    color: var(--merah);
    border-color: #f3b8b8;
}
.btn-danger:hover {
    background: #f8d0d0;
    color: var(--merah);
}
.btn-sm { padding: .38rem .75rem; font-size: .78rem; border-radius: 6px; }
.btn-group { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1.05rem; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: .35rem;
    font-size: .84rem;
    color: var(--biru-tua-dark);
}
.form-control {
    width: 100%;
    padding: .58rem .8rem;
    border: 1px solid var(--abu-border);
    border-radius: 8px;
    font-size: .88rem;
    font-family: inherit;
    background: #fff;
    color: var(--teks);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:hover { border-color: #c5cad3; }
.form-control:focus {
    outline: none;
    border-color: var(--biru-tua);
    box-shadow: 0 0 0 3px rgba(15,52,96,.12);
}
.form-control:disabled,
fieldset:disabled .form-control {
    background: #f5f6f8;
    color: var(--abu);
    cursor: not-allowed;
}
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.form-hint { color: var(--abu); font-size: .78rem; margin-top: .3rem; }

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--abu-border);
}
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
table.data-table th,
table.data-table td {
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--abu-border);
    text-align: left;
    vertical-align: middle;
}
table.data-table th {
    background: #f7f8fa;
    color: var(--biru-tua-dark);
    font-weight: 650;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table tbody tr {
    transition: background var(--transition);
}
table.data-table tbody tr:hover td { background: #f8fafc; }
table.data-table td .btn { white-space: nowrap; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--abu);
}
.empty-state .empty-ico {
    font-size: 2.2rem;
    margin-bottom: .6rem;
    opacity: .45;
}
.empty-state p { margin: 0 0 .8rem; font-size: .9rem; }

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: .22rem .6rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 650;
    letter-spacing: .01em;
    line-height: 1.3;
}
.badge-abu { background: #eceff2; color: var(--abu); }
.badge-kuning { background: var(--kuning-bg); color: var(--kuning); }
.badge-hijau { background: var(--hijau-tua-light); color: var(--hijau-tua); }
.badge-merah { background: var(--merah-bg); color: var(--merah); }

/* ---------- Login page ---------- */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(27,94,66,.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(15,52,96,.35) 0%, transparent 50%),
        linear-gradient(145deg, var(--biru-tua-dark) 0%, #0d3a2a 100%);
    padding: 1.5rem;
}
.auth-wrapper { width: 100%; max-width: 400px; }
.auth-card {
    background: #fff;
    padding: 2.25rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.08);
}
.auth-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}
.auth-brand .brand-mark {
    width: 52px; height: 52px;
    font-size: 1.1rem;
    margin: 0 auto .85rem;
    border-radius: 14px;
}
.auth-card h1 {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: .25rem;
}
.auth-card p.subtitle {
    text-align: center;
    color: var(--abu);
    font-size: .84rem;
    margin-bottom: 1.6rem;
    line-height: 1.45;
}
.auth-card .btn-primary {
    width: 100%;
    padding: .7rem;
    font-size: .92rem;
    border-radius: 9px;
    margin-top: .3rem;
}

/* ---------- Signature pad ---------- */
.signature-pad-wrap {
    border: 1.5px dashed var(--abu-border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.signature-pad-wrap canvas {
    width: 100%;
    height: 130px;
    touch-action: none;
    cursor: crosshair;
    display: block;
}
.signature-actions {
    margin-top: .5rem;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
}
.sig-mode-toggle { display: flex; gap: .4rem; margin-bottom: .55rem; }
.sig-mode-btn {
    padding: .4rem .85rem;
    border: 1px solid var(--abu-border);
    background: #fff;
    border-radius: 7px;
    cursor: pointer;
    font-size: .84rem;
    color: var(--biru-tua-dark);
    font-weight: 500;
    transition: all var(--transition);
    font-family: inherit;
}
.sig-mode-btn:hover { border-color: var(--biru-tua); }
.sig-mode-btn.active {
    background: var(--biru-tua);
    color: #fff;
    border-color: var(--biru-tua);
}
.sig-mode-panel.hidden { display: none; }
.sig-upload-preview { margin-top: .5rem; }
.sig-upload-preview img {
    height: 64px;
    border: 1px solid var(--abu-border);
    border-radius: 6px;
}

/* ---------- Dynamic point rows ---------- */
.point-row, .action-row {
    border: 1px solid var(--abu-border);
    border-radius: 8px;
    padding: 1rem 1.1rem;
    margin-bottom: .85rem;
    background: #fafbfc;
    position: relative;
    transition: border-color var(--transition);
}
.point-row:hover, .action-row:hover { border-color: #c5cad3; }
.point-row .remove-row, .action-row .remove-row {
    position: absolute;
    top: .65rem;
    right: .65rem;
}

/* ---------- Galeri foto lampiran ---------- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.photo-card {
    border: 1px solid var(--abu-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
}
.photo-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.photo-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    cursor: zoom-in;
    display: block;
    background: var(--abu-terang);
}
.photo-card-actions {
    display: flex;
    gap: .35rem;
    padding: .45rem;
    border-top: 1px solid var(--abu-border);
}
.photo-card-actions .btn { flex: 1; text-align: center; padding: .3rem .4rem; }
.photo-caption {
    font-size: .74rem;
    color: var(--abu);
    padding: 0 .55rem .5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Daftar dokumen pendukung ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.doc-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .8rem;
    border: 1px solid var(--abu-border);
    border-radius: 8px;
    background: #fafbfc;
    transition: background var(--transition);
}
.doc-item:hover { background: #f3f5f8; }
.doc-icon { font-size: 1.15rem; }
.doc-name { flex: 1; font-weight: 600; font-size: .88rem; }

/* ---------- Lightbox ---------- */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 16, 28, .88);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(4px);
}
.lightbox-overlay.open { display: flex; }
.lightbox-content {
    background: #fff;
    border-radius: 12px;
    padding: 1.15rem;
    max-width: min(90vw, 720px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.lightbox-content img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 6px;
    align-self: center;
}
.lightbox-close {
    position: absolute;
    top: .4rem; right: .55rem;
    background: var(--abu-terang);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    color: var(--abu);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}
.lightbox-close:hover { background: var(--merah-bg); color: var(--merah); }
.lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: .85rem;
    color: var(--abu);
}

/* ---------- Print view (dokumen notulen resmi) ---------- */
.print-body {
    background: #e8ecf1;
    margin: 0;
    min-height: 100vh;
}

.print-page {
    max-width: 820px;
    margin: 1.25rem auto 2.5rem;
    padding: 2.5rem 2.75rem 2.25rem;
    background: #fff;
    box-shadow: 0 4px 24px rgba(15, 52, 96, 0.1), 0 1px 3px rgba(0,0,0,.06);
    font-family: 'Times New Roman', Times, Georgia, serif;
    color: #111;
    font-size: 11pt;
    line-height: 1.6;
    position: relative;
}

.print-page--draft::before {
    content: 'DRAF';
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-28deg);
    font-size: 6rem;
    font-weight: 700;
    color: rgba(180, 40, 40, 0.07);
    pointer-events: none;
    z-index: 0;
    letter-spacing: 0.3em;
    font-family: system-ui, sans-serif;
    white-space: nowrap;
}

.print-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--abu-border);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
.print-toolbar-left { display: flex; gap: .5rem; flex-wrap: wrap; }
.print-toolbar-right { display: flex; align-items: center; }

.print-draft-banner {
    background: var(--kuning-bg);
    color: var(--kuning);
    border: 1px solid #e8d5a0;
    border-radius: 8px;
    padding: .55rem 1rem;
    font-size: .85rem;
    margin-bottom: 1.15rem;
    font-family: system-ui, sans-serif;
    font-weight: 500;
}

/* ----- Kop surat ----- */
.print-kop {
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
    border-bottom: 3.5px double #000;
    padding-bottom: .65rem;
    margin-bottom: .15rem;
    position: relative;
    z-index: 1;
}
.print-kop .kop-logo {
    height: 92px;
    width: 92px;
    object-fit: contain;
    flex-shrink: 0;
}
.kop-logo-placeholder {
    height: 92px;
    width: 92px;
    border: 1.5px dashed #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: #999;
    font-family: system-ui, sans-serif;
    flex-shrink: 0;
}
.print-kop .kop-text {
    text-align: center;
    flex: 1;
    min-width: 0;
}
.kop-yayasan {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.2;
    text-transform: uppercase;
}
.kop-unit {
    margin: .15rem 0 0;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.25;
}
.print-kop p {
    margin: .1rem 0 0;
    font-size: .78rem;
    line-height: 1.35;
}
.print-kop .kop-status { font-weight: 700; font-size: .82rem; margin-top: .2rem; }
.print-kop .kop-sk { font-weight: 400; }
.print-kop .kop-alamat { font-weight: 400; }
.print-kop .kop-label { text-decoration: underline; font-weight: 700; }
.print-kop .kop-identitas { font-size: .74rem; font-weight: 600; }
.print-kop .kop-kontak { font-size: .74rem; margin-top: .15rem; }
.print-kop .kop-kontak a { color: #1a0dab; text-decoration: underline; }

/* ----- Judul dokumen ----- */
.print-title-block {
    text-align: center;
    margin: 1.35rem 0 1.15rem;
    position: relative;
    z-index: 1;
}
.print-title {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: .12em;
    line-height: 1.3;
    text-transform: uppercase;
}
.print-title-sub {
    font-weight: 700;
    font-size: 1.02rem;
    margin-top: .35rem;
    line-height: 1.35;
    letter-spacing: .02em;
}
.print-nomor {
    font-size: .9rem;
    margin-top: .45rem;
}
.print-nomor-status {
    font-style: italic;
    color: #444;
}

/* ----- Section titles ----- */
.print-page h3.print-section-title {
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1.5px solid #000;
    padding-bottom: .28rem;
    margin: 1.55rem 0 .7rem;
    position: relative;
    z-index: 1;
    break-after: avoid;
    page-break-after: avoid;
}

.print-subheading {
    font-weight: 700;
    font-size: .9rem;
    margin: .35rem 0 .55rem;
}

/* ----- Meta table (data rapat) ----- */
.print-meta-table {
    width: 100%;
    font-size: .92rem;
    margin-bottom: .2rem;
    border-collapse: collapse;
    position: relative;
    z-index: 1;
}
.print-meta-table td {
    padding: .22rem 0;
    vertical-align: top;
}
.print-meta-table .meta-label { width: 155px; white-space: nowrap; }
.print-meta-table .meta-colon { width: 14px; padding-right: .35rem; }
.print-meta-table .meta-value { font-weight: 400; }

/* ----- Body text ----- */
.print-justify {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}
.print-body-text {
    margin: .35rem 0;
    position: relative;
    z-index: 1;
}
.print-empty-msg {
    margin: .35rem 0;
    font-style: italic;
    color: #444;
}
.print-empty {
    text-align: center;
    font-style: italic;
    color: #555;
    padding: .6rem !important;
}

/* ----- Data tables in print ----- */
.print-data-table {
    width: 100%;
    font-size: .84rem;
    border-collapse: collapse;
    margin-bottom: .35rem;
    position: relative;
    z-index: 1;
}
.print-data-table th,
.print-data-table td {
    border: 1px solid #000;
    padding: .42rem .55rem;
    vertical-align: top;
}
.print-data-table th {
    background: #f0f0f0;
    font-weight: 700;
    text-align: center;
}
.print-data-table .col-no { width: 36px; text-align: center; }
.print-data-table .col-status { width: 90px; text-align: center; }
.print-data-table .col-jam { width: 78px; text-align: center; }
.print-data-table .col-deadline { width: 110px; text-align: center; white-space: nowrap; }

/* Compatibility: old class on print page */
.print-page table.data-table {
    width: 100%;
    font-size: .84rem;
    border-collapse: collapse;
    margin-bottom: .4rem;
}
.print-page table.data-table th,
.print-page table.data-table td {
    border: 1px solid #000;
    padding: .5rem .6rem;
}
.print-page table.data-table th { background: #f0f0f0; font-weight: 700; }
.print-page table.data-table td { text-align: left; }

/* ----- Numbered points ----- */
.print-numbered {
    padding-left: 1.45rem;
    margin: 0;
    position: relative;
    z-index: 1;
}
.print-numbered > li {
    margin-bottom: 1.05rem;
    padding-left: .25rem;
}
.print-point-topic {
    font-weight: 700;
    margin-bottom: .25rem;
}
.print-point-body {
    margin: .25rem 0 .4rem;
}
.print-point-keputusan {
    margin: 0;
}
.print-label-keputusan {
    font-style: italic;
    font-weight: 600;
}

/* ----- Photos & docs in print ----- */
.print-photo-grid,
.print-page .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: .7rem;
    margin-bottom: .5rem;
    position: relative;
    z-index: 1;
}
.print-page .photo-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
}
.print-page .photo-thumb {
    aspect-ratio: 4 / 3;
    cursor: default;
}
.print-page .photo-caption {
    font-size: .68rem;
    padding: .25rem .4rem .35rem;
    text-align: center;
}
.print-page .doc-item {
    break-inside: avoid;
    page-break-inside: avoid;
    background: #fff;
    border-color: #999;
}
.print-page .doc-item .doc-name {
    color: #111;
    text-decoration: none;
    font-weight: 600;
}

/* ----- Closing signatures ----- */
.print-place-date {
    text-align: right;
    margin: 1.25rem 0 .5rem;
    position: relative;
    z-index: 1;
}
.print-closing {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2.5rem;
    margin: 1.5rem 0 1.25rem;
    text-align: center;
    break-inside: avoid;
    page-break-inside: avoid;
    position: relative;
    z-index: 1;
}
.print-closing .sign-col {
    flex: 1 1 0;
    font-size: .9rem;
    max-width: 42%;
}
.print-closing .sign-role {
    line-height: 1.4;
    min-height: 2.6em;
}
.print-closing .sign-space {
    height: 78px;
}
.print-closing .sign-name {
    font-weight: 700;
    text-decoration: underline;
    margin-top: .15rem;
    font-size: .92rem;
}

/* ----- Signature grid (peserta) ----- */
.signature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem .55rem;
    margin-top: .55rem;
    position: relative;
    z-index: 1;
}
.signature-block {
    border: 1px solid #333;
    border-radius: 4px;
    padding: .55rem .45rem .5rem;
    text-align: center;
    break-inside: avoid;
    page-break-inside: avoid;
    background: #fff;
}
.signature-block .sig-img-wrap {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .25rem;
}
.signature-block img {
    max-height: 55px;
    max-width: 100%;
}
.signature-block .sig-line {
    border-top: 1px solid #000;
    margin: .15rem .5rem 0;
}
.signature-block .sig-name {
    font-size: .8rem;
    font-weight: 700;
    margin-top: .3rem;
    line-height: 1.25;
}
.signature-block .sig-status {
    font-size: .7rem;
    color: #444;
    margin-top: .15rem;
}

/* ----- Footer & QR ----- */
.print-doc-footer {
    margin-top: 1.75rem;
    position: relative;
    z-index: 1;
}
.print-footer-note {
    margin: 0 0 .9rem;
    font-size: .7rem;
    color: #555;
    text-align: center;
    font-family: system-ui, sans-serif;
}

.print-verify-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .9rem;
    margin-top: .5rem;
    padding-top: .9rem;
    border-top: 1px solid #ccc;
    break-inside: avoid;
    page-break-inside: avoid;
}
.print-verify-footer .qr-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    image-rendering: pixelated;
}
.print-verify-footer .verify-footer-text { text-align: left; }
.print-verify-footer .qr-caption {
    font-size: .68rem;
    color: #333;
    line-height: 1.35;
    margin: 0;
    font-family: system-ui, sans-serif;
}
.print-verify-footer .qr-code-text {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .04em;
    margin-top: .2rem;
}
.print-verify-footer .qr-url {
    font-size: .65rem;
    color: #555;
    margin-top: .12rem;
    word-break: break-all;
    font-family: system-ui, sans-serif;
}

.no-print { }

@media print {
    .no-print { display: none !important; }
    .print-body { background: #fff; }
    body { background: #fff; }
    .print-page {
        box-shadow: none;
        margin: 0;
        max-width: 100%;
        padding: 0;
    }
    .print-page--draft::before {
        color: rgba(180, 40, 40, 0.06);
        font-size: 5.5rem;
    }
    .lightbox-overlay { display: none !important; }
    .print-page h3.print-section-title {
        break-after: avoid;
        page-break-after: avoid;
    }
    .print-closing,
    .signature-block,
    .print-page .photo-card,
    .print-page .doc-item,
    .print-verify-footer {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .print-kop { break-inside: avoid; page-break-inside: avoid; }
    a { color: #000; text-decoration: none; }
    .print-kop .kop-kontak a { text-decoration: underline; }
}

@page {
    size: A4;
    margin: 16mm 15mm 18mm 15mm;
}

/* ---------- Halaman publik verifikasi ---------- */
.verify-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 2.5rem auto;
    padding: 1rem;
}
.verify-card {
    background: #fff;
    padding: 2.1rem 1.9rem;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.verify-icon {
    width: 58px;
    height: 58px;
    line-height: 58px;
    border-radius: 50%;
    margin: 0 auto .9rem;
    font-size: 1.55rem;
    font-weight: 700;
}
.verify-icon-ok { background: var(--hijau-tua-light); color: var(--hijau-tua); }
.verify-icon-fail { background: var(--merah-bg); color: var(--merah); }
.verify-card h1 { font-size: 1.15rem; margin-bottom: .3rem; }
.verify-card .subtitle {
    color: var(--abu);
    font-size: .85rem;
    margin-bottom: 1.3rem;
    line-height: 1.5;
}
.verify-table {
    width: 100%;
    text-align: left;
    font-size: .85rem;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.verify-table td {
    padding: .4rem 0;
    vertical-align: top;
    border-bottom: 1px solid var(--abu-border);
}
.verify-table td:first-child { width: 130px; color: var(--abu); }
.verify-table td:nth-child(2) { width: 12px; }
.verify-note { font-size: .76rem; color: var(--abu); line-height: 1.5; }


/* ---------- Notification bell ---------- */
.notif-bell-wrap { position: relative; margin-right: .15rem; }
.notif-bell-btn {
    position: relative;
    background: var(--abu-terang);
    border: 1px solid var(--abu-border);
    border-radius: 8px;
    width: 38px; height: 38px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    transition: background var(--transition);
}
.notif-bell-btn:hover { background: #e5e8ed; }
.notif-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--merah);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff;
}
.notif-dropdown {
    position: absolute;
    right: 0; top: calc(100% + 8px);
    width: min(360px, 92vw);
    background: #fff;
    border: 1px solid var(--abu-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 40;
    overflow: hidden;
}
.notif-dropdown-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--abu-border);
    font-size: .9rem;
}
.notif-dropdown-body { max-height: 320px; overflow-y: auto; }
.notif-empty { padding: 1.5rem; text-align: center; color: var(--abu); font-size: .85rem; }
.notif-dd-item {
    display: flex; gap: .65rem; align-items: flex-start;
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--abu-border);
    text-decoration: none; color: inherit;
    transition: background var(--transition);
    font-size: .82rem;
}
.notif-dd-item:hover { background: #f7f9fc; text-decoration: none; }
.notif-dd-item.is-unread { background: #f0f7ff; }
.notif-dd-msg { display: block; line-height: 1.4; color: var(--teks); }
.notif-dd-time { display: block; margin-top: .2rem; font-size: .72rem; color: var(--abu); }
.notif-dropdown-foot {
    padding: .65rem 1rem;
    text-align: center;
    border-top: 1px solid var(--abu-border);
    font-size: .84rem;
}
.notif-jenis-badge {
    width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; flex-shrink: 0;
    background: var(--abu-terang);
}
.notif-jenis-approval, .notif-jenis-ok { background: var(--hijau-tua-light); }
.notif-jenis-wait { background: var(--kuning-bg); }
.notif-jenis-revisi, .notif-jenis-cancel { background: var(--merah-bg); }
.notif-jenis-rapat { background: #e8eef6; }
.notif-jenis-tindak { background: #ede9fe; }

.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list-item { border-bottom: 1px solid var(--abu-border); }
.notif-list-item:last-child { border-bottom: none; }
.notif-list-item.is-unread { background: #f5f9ff; }
.notif-list-link {
    display: flex; gap: .75rem; align-items: flex-start;
    padding: .9rem 1.15rem;
    text-decoration: none; color: inherit;
}
.notif-list-link:hover { background: #f7f9fc; text-decoration: none; }
.notif-list-msg { display: block; font-size: .9rem; line-height: 1.45; }
.notif-list-meta { display: block; margin-top: .35rem; font-size: .78rem; color: var(--abu); }
.notif-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--biru-tua); flex-shrink: 0; margin-top: .45rem;
}

@media (max-width: 900px) {
    .notif-dropdown { right: -40px; }
}

/* ---------- Notification list ---------- */
.notif-item {
    padding: .65rem 0;
    border-bottom: 1px solid var(--abu-border);
    font-size: .86rem;
    line-height: 1.4;
}
.notif-item:last-child { border-bottom: none; }
.notif-item .form-hint { margin-top: .2rem; }


/* ---------- Sidebar collapsed (desktop) ---------- */
.sidebar.is-collapsed {
    width: var(--sidebar-w-collapsed);
}
.sidebar.is-collapsed .sidebar-brand {
    justify-content: center;
    padding: 1rem .5rem;
}
.sidebar.is-collapsed .brand-copy,
.sidebar.is-collapsed .sidebar-brand > div,
.sidebar.is-collapsed .brand-text,
.sidebar.is-collapsed .brand-sub,
.sidebar.is-collapsed .nav-section-label,
.sidebar.is-collapsed .nav-label,
.sidebar.is-collapsed .sidebar-footer {
    display: none !important;
}
.sidebar.is-collapsed .sidebar-nav {
    padding: .65rem .4rem;
    align-items: stretch;
}
.sidebar.is-collapsed .nav-link {
    justify-content: center;
    padding: .7rem .4rem;
    gap: 0;
}
.sidebar.is-collapsed .nav-link .nav-ico {
    width: auto;
    font-size: 1.1rem;
    opacity: 1;
}
.sidebar.is-collapsed .nav-link.active {
    box-shadow: none;
    border-radius: 8px;
}
/* Tooltip saat collapsed */
.sidebar.is-collapsed .nav-link {
    position: relative;
}
.sidebar.is-collapsed .nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #0a2540;
    color: #fff;
    font-size: .75rem;
    font-weight: 500;
    padding: .35rem .6rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.sidebar.is-collapsed .nav-link:hover::after {
    opacity: 1;
}

.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: auto;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    color: #b8c9de;
    cursor: pointer;
    font-size: .85rem;
    flex-shrink: 0;
    transition: background .15s ease;
}
.sidebar-collapse-btn:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}
.sidebar.is-collapsed .sidebar-collapse-btn {
    margin: 0 auto;
}
.sidebar.is-collapsed .sidebar-brand {
    flex-direction: column;
    gap: .5rem;
}

/* ---------- Overlay for mobile sidebar ---------- */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 16, 28, .45);
    z-index: 25;
    backdrop-filter: blur(2px);
}
.sidebar-backdrop.show { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: calc(-1 * var(--sidebar-w) - 10px);
        z-index: 30;
        transition: left .25s cubic-bezier(.4,0,.2,1);
        box-shadow: none;
    }
    .sidebar.open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0,0,0,.25);
    }
    .sidebar-toggle { display: flex; }
    .topbar-user .user-meta { display: none; }
    .content { padding: 1.15rem 1rem 2rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
    .stat-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
    .stat-card { padding: 1rem; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .auth-card { padding: 1.75rem 1.35rem; }
    .signature-grid { grid-template-columns: 1fr 1fr; }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--biru-tua);
    outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) { outline: none; }


/* Calendar */
.cal-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .8rem; }
.cal-table th { background: #f7f8fa; padding: .5rem; border: 1px solid var(--abu-border); text-align: center; font-weight: 650; color: var(--biru-tua-dark); }
.cal-cell { vertical-align: top; height: 88px; border: 1px solid var(--abu-border); padding: .25rem; }
.cal-day { font-weight: 650; font-size: .75rem; margin-bottom: .2rem; color: var(--abu); }
.cal-day.is-today { color: var(--biru-tua); background: #e8eef6; border-radius: 4px; display: inline-block; padding: 0 .35rem; }
.cal-event {
    display: block;
    font-size: .68rem;
    line-height: 1.25;
    padding: .15rem .3rem;
    margin-bottom: .15rem;
    border-radius: 4px;
    background: #e8eef6;
    color: var(--biru-tua-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}
.cal-event:hover { text-decoration: none; background: #d5e3f5; }
.cal-event.status-disahkan { background: var(--hijau-tua-light); color: var(--hijau-tua); }
.cal-event.status-menunggu_pengesahan { background: var(--kuning-bg); color: var(--kuning); }
.cal-event.status-draft { background: #eceff2; color: var(--abu); }

@media (max-width: 900px) {
    .sidebar.is-collapsed {
        width: var(--sidebar-w);
    }
    .sidebar.is-collapsed .brand-copy,
.sidebar.is-collapsed .sidebar-brand > div,
    .sidebar.is-collapsed .brand-text,
    .sidebar.is-collapsed .brand-sub,
    .sidebar.is-collapsed .nav-section-label,
    .sidebar.is-collapsed .nav-label,
    .sidebar.is-collapsed .sidebar-footer {
        display: block !important;
    }
    .sidebar.is-collapsed .nav-label {
        display: inline !important;
    }
    .sidebar.is-collapsed .nav-link {
        justify-content: flex-start;
        padding: .65rem .85rem;
        gap: .65rem;
    }
    .sidebar.is-collapsed .nav-link::after { display: none; }
    .sidebar-collapse-btn { display: none; }
}

/* ============================================================
   Mobile app shell (PWA / HP)
   ============================================================ */
.mobile-bottom-nav {
    display: none;
}
.pwa-install-bar {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    background: #0a2540;
    color: #fff;
    border-radius: 14px;
    padding: .85rem 1rem;
    box-shadow: 0 8px 28px rgba(0,0,0,.28);
    align-items: center;
    gap: .75rem;
    font-size: .85rem;
}
.pwa-install-bar.show { display: flex; }
.pwa-install-bar p { margin: 0; flex: 1; line-height: 1.35; }
.pwa-install-bar .btn { white-space: nowrap; }
.pwa-install-bar .pwa-dismiss {
    background: transparent;
    border: none;
    color: #9fb4cc;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 .25rem;
}

@media (max-width: 900px) {
    html {
        -webkit-text-size-adjust: 100%;
    }
    body {
        overscroll-behavior-y: contain;
        background: var(--abu-terang);
    }
    .app-shell {
        min-height: 100dvh;
    }
    .topbar {
        padding: .55rem .85rem;
        padding-top: calc(.55rem + env(safe-area-inset-top, 0px));
        gap: .5rem;
    }
    .topbar-title {
        font-size: .95rem;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .topbar-user .btn,
    .topbar-user .btn-logout {
        display: none;
    }
    .content {
        padding: 1rem .85rem;
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 1rem);
    }
    .page-header {
        margin-bottom: 1rem;
        gap: .65rem;
    }
    .page-header h2 {
        font-size: 1.2rem;
    }
    .page-header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: .4rem;
    }
    .page-header-actions .btn {
        flex: 1 1 auto;
        min-height: 42px;
        justify-content: center;
    }
    .card {
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: .85rem;
    }
    .form-row {
        grid-template-columns: 1fr !important;
        gap: .75rem;
    }
    .form-control,
    select.form-control,
    textarea.form-control {
        font-size: 16px; /* cegah zoom iOS */
        min-height: 44px;
        border-radius: 10px;
    }
    textarea.form-control {
        min-height: 100px;
    }
    .btn {
        min-height: 44px;
        border-radius: 10px;
        padding: .65rem 1rem;
    }
    .btn-sm {
        min-height: 36px;
    }
    .table-wrap {
        margin: 0 -.25rem;
        border-radius: 10px;
        -webkit-overflow-scrolling: touch;
    }
    .data-table th,
    .data-table td {
        padding: .65rem .55rem;
        font-size: .82rem;
    }
    .stat-grid {
        gap: .65rem;
    }
    .cal-cell {
        height: 64px;
        font-size: .7rem;
    }
    .cal-event {
        font-size: .6rem;
        padding: .1rem .2rem;
    }
    .notif-dropdown {
        position: fixed;
        left: 8px;
        right: 8px;
        top: auto;
        width: auto;
        max-width: none;
    }

    /* Bottom navigation ala aplikasi HP */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 35;
        background: #fff;
        border-top: 1px solid var(--abu-border);
        padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 20px rgba(15, 52, 96, .08);
        justify-content: space-around;
        align-items: stretch;
    }
    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .15rem;
        padding: .35rem .2rem;
        border: none;
        background: none;
        color: #6b7f99;
        font-size: .65rem;
        font-weight: 600;
        text-decoration: none;
        min-height: 52px;
        cursor: pointer;
        font-family: inherit;
        border-radius: 10px;
        transition: color .15s ease, background .15s ease;
    }
    .mobile-bottom-nav a:hover,
    .mobile-bottom-nav button:hover {
        text-decoration: none;
        color: var(--biru-tua);
    }
    .mobile-bottom-nav a.active {
        color: var(--hijau-tua);
    }
    .mobile-bottom-nav .mbn-ico {
        font-size: 1.2rem;
        line-height: 1;
    }
    .mobile-bottom-nav a.active .mbn-ico {
        transform: scale(1.08);
    }

    /* Install bar di atas bottom nav */
    .pwa-install-bar {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 520px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }
    .signature-grid {
        grid-template-columns: 1fr;
    }
    .photo-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Standalone PWA (setelah di-install) — hilangkan “browser chrome” feel */
@media (display-mode: standalone), (display-mode: fullscreen) {
    .topbar {
        padding-top: calc(.65rem + env(safe-area-inset-top, 0px));
    }
}
