/* ==========================================================================
   SIPTQ Melawi - LPTQ Kabupaten Melawi
   Tema: hijau zamrud (identitas Al-Qur'an) + aksen emas, bersih & profesional
   ========================================================================== */

:root {
    --emerald-950: #04271E;
    --emerald-900: #064E3B;
    --emerald-800: #065F46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10B981;
    --emerald-100: #D7F0E6;
    --emerald-50: #EFF8F4;
    --gold-600: #A67C0F;
    --gold-500: #C9A227;
    --gold-200: #F1E3B5;
    --gold-50: #FBF5E2;
    --ink: #0F2E24;
    --muted: #5C7A70;
    --muted-light: #9DB7AE;
    --bg: #F3F7F5;
    --card: #FFFFFF;
    --border: #E2EBE6;
    --red: #B42318;
    --red-bg: #FEF3F2;
    --amber: #B54708;
    --amber-bg: #FFFAEB;
    --sky: #0369A1;
    --sky-bg: #F0F9FF;
    --grey: #475467;
    --grey-bg: #F2F4F7;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(6, 78, 59, .06), 0 1px 3px rgba(6, 78, 59, .05);
    --shadow: 0 6px 20px rgba(6, 78, 59, .08);
    --shadow-lg: 0 18px 45px rgba(6, 78, 59, .14);
    --sidebar-w: 264px;
    --topbar-h: 68px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body.app {
    background-image:
        radial-gradient(900px 480px at 12% -10%, rgba(16, 185, 129, .16), transparent 60%),
        radial-gradient(800px 420px at 100% 0%, rgba(201, 162, 39, .12), transparent 55%);
    background-repeat: no-repeat;
}

h1, h2, h3, h4 { margin: 0 0 .35em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
a { color: var(--emerald-700); text-decoration: none; }
a:hover { color: var(--emerald-800); }
small { font-size: .8rem; }
.muted { color: var(--muted); }
.muted-light { color: var(--muted-light); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; }
.hidden { display: none !important; }
.ic { width: 18px; height: 18px; flex: 0 0 auto; }

.skip-link {
    position: absolute; left: -9999px; top: 0; background: var(--emerald-800); color: #fff;
    padding: 10px 16px; z-index: 200; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ------------------------------------------------------------------ layout - */

.layout { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 60;
    background: linear-gradient(178deg, var(--emerald-900) 0%, var(--emerald-950) 100%);
    color: #E8F5EF; display: flex; flex-direction: column;
    transform: translateX(-102%); transition: transform .26s ease;
    box-shadow: var(--shadow-lg);
}
.sidebar.is-open { transform: translateX(0); }

.sidebar__brand {
    display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.sidebar__close { margin-left: auto; background: none; border: 0; color: #C9E6DA; padding: 6px; cursor: pointer; }
.brand__mark {
    width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
    background: linear-gradient(140deg, var(--gold-500), #E4CB70);
    color: var(--emerald-900); display: grid; place-items: center;
    font-weight: 800; font-size: 1.3rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand__text strong { font-size: .98rem; letter-spacing: -.01em; }
.brand__text span { font-size: .7rem; color: #9CC9B8; letter-spacing: .02em; }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 14px 10px 22px; }
.sidebar__group {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
    color: #7FB7A1; padding: 16px 12px 7px; font-weight: 700;
}
.sidebar__link {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
    color: #D5EDE3; font-size: .9rem; margin-bottom: 2px; transition: background .15s, color .15s;
}
.sidebar__link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar__link.is-active {
    background: linear-gradient(90deg, rgba(16, 185, 129, .28), rgba(16, 185, 129, .06));
    color: #fff; box-shadow: inset 3px 0 0 var(--gold-500);
}
.sidebar__link span:nth-child(2) { flex: 1; }
.sidebar__footer { padding: 12px 16px 18px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sidebar__footer a { color: #9CC9B8; font-size: .82rem; display: flex; align-items: center; gap: 8px; }
.sidebar__footer a:hover { color: #fff; }

.sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(4, 39, 30, .5); z-index: 55;
    backdrop-filter: blur(2px);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
    position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--border);
}
.topbar__title { min-width: 0; }
.topbar__title h1 { font-size: 1.05rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__title p { margin: 0; font-size: .76rem; color: var(--muted); }
.topbar__search {
    display: none; align-items: center; gap: 8px; flex: 1; max-width: 340px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px;
}
.topbar__search .ic { color: var(--muted); }
.topbar__search input { border: 0; background: none; outline: none; width: 100%; font: inherit; font-size: .88rem; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
    border: 1px solid var(--border); background: #fff; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--emerald-50); }
.icon-btn--badge { position: relative; }
.badge-dot {
    position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px;
    border-radius: 999px; background: #D92D20; color: #fff; font-size: .68rem; font-weight: 700;
    display: grid; place-items: center; border: 2px solid #fff;
}

.user-menu { position: relative; }
.user-menu__trigger {
    display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--border);
    border-radius: 12px; padding: 5px 10px 5px 5px; cursor: pointer; font: inherit; color: inherit;
}
.user-menu__meta { display: none; text-align: left; line-height: 1.15; }
.user-menu__meta strong { display: block; font-size: .85rem; }
.user-menu__meta small { color: var(--muted); font-size: .7rem; }
.avatar {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(140deg, var(--emerald-700), var(--emerald-500)); color: #fff;
    font-weight: 700; font-size: .82rem; flex: 0 0 auto;
}
.dropdown {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 218px; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 6px; z-index: 70;
}
.dropdown a, .dropdown button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0;
    background: none; font: inherit; color: var(--ink); border-radius: 9px; cursor: pointer; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--emerald-50); }
.dropdown__danger { color: var(--red) !important; }

.content { flex: 1; padding: 20px 16px 34px; max-width: 1420px; width: 100%; margin: 0 auto; }

.footer {
    padding: 16px; border-top: 1px solid var(--border); background: rgba(255, 255, 255, .7);
    display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
    font-size: .78rem; color: var(--muted);
}
.footer__tag { color: var(--gold-600); font-weight: 600; }

@media (min-width: 1024px) {
    .sidebar { transform: translateX(0); }
    .sidebar__close, .sidebar-backdrop { display: none !important; }
    .main { margin-left: var(--sidebar-w); }
    .topbar { padding: 12px 26px; }
    .content { padding: 26px 26px 44px; }
    .topbar__search { display: flex; }
    .user-menu__meta { display: block; }
    [data-sidebar-toggle] { display: none; }
}

/* ----------------------------------------------------------------- cards -- */

.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card--pad { padding: 20px; }
.card__head {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card__head h2, .card__head h3 { margin: 0; }
.card__head .spacer { flex: 1; }
.card__body { padding: 20px; }
.card__foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--emerald-50); border-radius: 0 0 var(--radius) var(--radius); }

.section { margin-bottom: 32px; }
.section__head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.section__head .spacer { flex: 1; }
.section__head h2 { margin: 0; }
.section__head p { margin: 0; color: var(--muted); font-size: .85rem; }

.grid { display: grid; gap: 18px; }
.grid > *, .split > * { min-width: 0; } /* cegah grid item melar mengikuti lebar tabel */
.grid--stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--charts { grid-template-columns: 1fr; gap: 20px; }
.grid--detail { grid-template-columns: 1fr; gap: 20px; }

@media (min-width: 640px) {
    .grid--stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
    .grid--stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid--charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--detail { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
}

/* -------------------------------------------------------------- stat card -- */

.stat {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; box-shadow: var(--shadow-sm); display: flex; gap: 12px; align-items: flex-start;
    position: relative; overflow: hidden;
}
.stat::after {
    content: ''; position: absolute; right: -30px; top: -30px; width: 82px; height: 82px;
    border-radius: 50%; background: var(--emerald-50);
}
.stat__icon {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto;
    background: var(--emerald-50); color: var(--emerald-700); position: relative; z-index: 1;
}
.stat__meta { position: relative; z-index: 1; min-width: 0; }
.stat__label { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat__value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.stat__hint { font-size: .74rem; color: var(--muted); }
.stat--gold .stat__icon { background: var(--gold-50); color: var(--gold-600); }
.stat--gold::after { background: var(--gold-50); }
.stat--amber .stat__icon { background: var(--amber-bg); color: var(--amber); }
.stat--sky .stat__icon { background: var(--sky-bg); color: var(--sky); }

/* ---------------------------------------------------------------- buttons -- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; min-height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: .88rem;
    cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s; white-space: nowrap;
    text-decoration: none;
}
.btn:hover { background: var(--emerald-50); color: var(--emerald-800); }
.btn:active { transform: translateY(1px); }
.btn--primary {
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-500));
    border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(4, 120, 87, .24);
}
.btn--primary:hover { background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600)); color: #fff; }
.btn--gold { background: linear-gradient(135deg, var(--gold-600), var(--gold-500)); border-color: transparent; color: #fff; }
.btn--gold:hover { color: #fff; filter: brightness(.96); }
.btn--danger { background: var(--red-bg); border-color: #FDA29B; color: var(--red); }
.btn--danger:hover { background: #FEE4E2; color: var(--red); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--emerald-50); }
.btn--sm { padding: 7px 12px; min-height: 36px; font-size: .82rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ----------------------------------------------------------------- forms -- */

.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) {
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid .full { grid-column: 1 / -1; }
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: .82rem; font-weight: 600; color: #24483D; }
.field .req { color: var(--red); }
.field .hint { font-size: .74rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=search], input[type=tel], input[type=file], select, textarea {
    width: 100%; padding: 10px 12px; min-height: 42px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font: inherit; font-size: .9rem; color: var(--ink);
    background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--emerald-500); box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }
input[type=file] { padding: 8px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235C7A70' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.field-error { color: var(--red); font-size: .76rem; }
.input-invalid { border-color: #F97066 !important; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0 0 18px; }
legend { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--emerald-700); padding: 0 8px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-size: .88rem; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--emerald-600); }
.filter-bar { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .filter-bar { grid-template-columns: repeat(6, minmax(0, 1fr)); } .filter-bar .span2 { grid-column: span 2; } }
.filter-actions { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }

/* ----------------------------------------------------------------- table -- */

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .875rem; min-width: 620px; }
table.tbl th, table.tbl td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl thead th {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
    background: var(--emerald-50); font-weight: 700; white-space: nowrap; position: sticky; top: 0;
}
table.tbl tbody tr:hover { background: #FAFCFB; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl td.actions { white-space: nowrap; text-align: right; }
table.tbl .row-actions { display: inline-flex; gap: 6px; }
.tbl--compact th, .tbl--compact td { padding: 8px 12px; }
.cell-main { font-weight: 600; }
.cell-sub { display: block; font-size: .76rem; color: var(--muted); }

.pagination { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--border); }
.pagination__info { font-size: .78rem; color: var(--muted); }
.pagination__links { display: flex; gap: 6px; flex-wrap: wrap; }
.page-btn {
    min-width: 38px; height: 38px; padding: 0 10px; display: inline-grid; place-items: center;
    border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--ink);
    font-size: .84rem; font-weight: 600;
}
.page-btn:hover { background: var(--emerald-50); }
.page-btn.is-active { background: var(--emerald-700); border-color: var(--emerald-700); color: #fff; }
.page-btn.is-disabled { opacity: .45; }

@media (max-width: 780px) {
    table.tbl--stack { min-width: 0; }
    table.tbl--stack thead { display: none; }
    table.tbl--stack tbody tr {
        display: block; border: 1px solid var(--border); border-radius: var(--radius);
        margin-bottom: 12px; padding: 6px 4px; background: #fff; box-shadow: var(--shadow-sm);
    }
    table.tbl--stack tbody tr:hover { background: #fff; }
    table.tbl--stack td {
        display: flex; gap: 10px; justify-content: space-between; align-items: center;
        border: 0; padding: 7px 12px; text-align: right;
    }
    table.tbl--stack td::before {
        content: attr(data-label); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
        color: var(--muted); font-weight: 700; text-align: left; flex: 0 0 42%;
    }
    table.tbl--stack td.actions { justify-content: flex-end; }
    table.tbl--stack td.actions::before { content: ''; }
}

/* ---------------------------------------------------------------- badges -- */

.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
    font-size: .74rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent;
}
.badge--green { background: var(--emerald-50); color: var(--emerald-700); border-color: #A6E3CB; }
.badge--gold { background: var(--gold-50); color: var(--gold-600); border-color: var(--gold-200); }
.badge--amber { background: var(--amber-bg); color: var(--amber); border-color: #FEDF89; }
.badge--red { background: var(--red-bg); color: var(--red); border-color: #FDA29B; }
.badge--sky { background: var(--sky-bg); color: var(--sky); border-color: #B9E6FE; }
.badge--grey { background: var(--grey-bg); color: var(--grey); border-color: #E4E7EC; }
.pill {
    font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 999px;
    background: rgba(255, 255, 255, .16); color: #fff;
}
.pill--amber { background: var(--gold-500); color: var(--emerald-950); }
.pill--ghost { background: rgba(255, 255, 255, .09); color: #9CC9B8; }

/* ----------------------------------------------------------------- modal -- */

.modal[hidden] { display: none; }
.modal {
    position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center;
    background: rgba(4, 39, 30, .48); padding: 0; backdrop-filter: blur(2px);
}
.modal__panel {
    background: #fff; width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-lg);
    animation: slideUp .22s ease;
}
@keyframes slideUp { from { transform: translateY(18px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal__head h2 { margin: 0; font-size: 1.05rem; }
.modal__head .spacer { flex: 1; }
.modal__body { padding: 20px; }
.modal__foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: #fff; }
@media (min-width: 720px) {
    .modal { align-items: center; padding: 24px; }
    .modal__panel { border-radius: var(--radius-lg); }
}

/* ---------------------------------------------------------------- toasts -- */

.toast-stack { position: fixed; top: 12px; right: 12px; left: 12px; z-index: 100; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
@media (min-width: 720px) { .toast-stack { left: auto; width: 360px; } }
.toast {
    display: flex; align-items: flex-start; gap: 10px; background: #fff; border: 1px solid var(--border);
    border-left: 4px solid var(--emerald-600); border-radius: var(--radius-sm); padding: 12px 14px;
    box-shadow: var(--shadow-lg); font-size: .86rem; pointer-events: auto; animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast__icon { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald-600); margin-top: 7px; flex: 0 0 auto; }
.toast__body { flex: 1; }
.toast__close { border: 0; background: none; font-size: 1.15rem; line-height: 1; color: var(--muted); cursor: pointer; }
.toast--error { border-left-color: var(--red); } .toast--error .toast__icon { background: var(--red); }
.toast--warning { border-left-color: var(--gold-500); } .toast--warning .toast__icon { background: var(--gold-500); }
.toast--info { border-left-color: var(--sky); } .toast--info .toast__icon { background: var(--sky); }

/* ------------------------------------------------------------------ tabs -- */

.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--border); padding: 0 4px; }
.tabs__item {
    padding: 11px 14px; font-size: .86rem; font-weight: 600; color: var(--muted); white-space: nowrap;
    border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0;
}
.tabs__item.is-active { color: var(--emerald-700); border-bottom-color: var(--emerald-600); }
.tab-panel[hidden] { display: none; }

/* ------------------------------------------------------------ misc blocks -- */

.empty-state { text-align: center; padding: 46px 22px; }
.empty-state__icon { font-size: 2rem; margin-bottom: 10px; }
.empty-state h2 { margin-bottom: 6px; }
.empty-state .btn { margin-top: 14px; }

.chart-box { position: relative; height: 292px; }
.chart-box--tall { height: 340px; }

.dl { display: grid; grid-template-columns: 1fr; gap: 2px 16px; margin: 0; }
@media (min-width: 560px) { .dl { grid-template-columns: 172px 1fr; } }
.dl dt { font-size: .78rem; color: var(--muted); font-weight: 600; padding: 8px 0 0; }
.dl dd { margin: 0; padding: 8px 0 0; font-size: .9rem; border-bottom: 1px dotted var(--border); }
@media (min-width: 560px) { .dl dd { border-bottom: 1px dotted var(--border); } }
.dl dd:last-of-type, .dl dd { min-width: 0; overflow-wrap: anywhere; }

.progress { height: 8px; border-radius: 999px; background: var(--grey-bg); overflow: hidden; }
.progress__bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--emerald-600), var(--emerald-500)); }
.progress__bar--gold { background: linear-gradient(90deg, var(--gold-600), var(--gold-500)); }

.kader-photo {
    width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius); object-fit: cover;
    background: var(--emerald-50); border: 1px solid var(--border);
}
.kader-photo--placeholder { display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; color: var(--emerald-700); }
.identity-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.identity-list .item { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; }
.identity-list .item .ic { color: var(--emerald-600); margin-top: 2px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--emerald-100); }
.timeline li { position: relative; padding: 0 0 20px 8px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
    content: ''; position: absolute; left: -27px; top: 5px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--emerald-600); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--emerald-100);
}
.timeline .tl-title { font-weight: 700; font-size: .9rem; }
.timeline .tl-meta { font-size: .76rem; color: var(--muted); }

.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--emerald-50); border: 1px solid #CDE9DC; font-size: .86rem; }
.callout--warn { background: var(--amber-bg); border-color: #FEDF89; }
.callout--danger { background: var(--red-bg); border-color: #FDA29B; }
.callout .ic { margin-top: 2px; color: var(--emerald-700); }

.list-rank { display: flex; flex-direction: column; gap: 12px; }
.list-rank__item { display: flex; align-items: center; gap: 12px; }
.list-rank__no {
    width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
    background: var(--emerald-50); color: var(--emerald-700); font-weight: 700; font-size: .8rem;
}
.list-rank__no--top { background: var(--gold-50); color: var(--gold-600); }
.list-rank__meta { flex: 1; min-width: 0; }
.list-rank__meta strong { display: block; font-size: .88rem; }

.filter-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--emerald-50); border: 1px solid #CDE9DC; color: var(--emerald-700); padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; }

.split { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

/* ---------------------------------------------------------- halaman publik - */

body.public { background: #F7FAF8; }

.pub-nav {
    position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.pub-nav__inner { max-width: 1180px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; gap: 14px; }
.pub-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.pub-brand .brand__mark { background: linear-gradient(140deg, var(--emerald-800), var(--emerald-600)); color: var(--gold-200); }
.pub-brand .brand__text strong { font-size: .98rem; color: var(--ink); }
.pub-brand .brand__text span { font-size: .7rem; color: var(--muted); }
.pub-nav__toggle { margin-left: auto; }
.pub-nav__menu {
    display: none; flex-direction: column; gap: 4px; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--border); padding: 12px 18px 18px; box-shadow: var(--shadow);
}
.pub-nav__menu.is-open { display: flex; }
.pub-nav__menu a { padding: 10px 12px; border-radius: 9px; color: var(--ink); font-size: .9rem; }
.pub-nav__menu a:hover { background: var(--emerald-50); }
.pub-nav__menu a.is-active { color: var(--emerald-700); font-weight: 700; }
@media (min-width: 900px) {
    .pub-nav__inner { padding: 12px 26px; }
    .pub-nav__toggle { display: none; }
    .pub-nav__menu {
        display: flex; flex-direction: row; align-items: center; gap: 4px; position: static;
        background: none; border: 0; box-shadow: none; padding: 0; margin-left: auto;
    }
    .pub-nav__menu a { font-size: .87rem; }
    .pub-nav__menu .btn { margin-left: 8px; }
}

.hero {
    position: relative; overflow: hidden; color: #fff;
    background: linear-gradient(150deg, var(--emerald-900) 0%, var(--emerald-800) 55%, #0B6B4F 100%);
}
.hero::before {
    content: ''; position: absolute; inset: 0; opacity: .5;
    background-image:
        radial-gradient(circle at 78% 18%, rgba(201, 162, 39, .35), transparent 42%),
        radial-gradient(circle at 12% 82%, rgba(16, 185, 129, .38), transparent 46%);
}
.hero__inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 56px 18px 60px; }
.hero__badge {
    display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(245, 231, 184, .45);
    color: var(--gold-200); padding: 6px 14px; border-radius: 999px; font-size: .76rem; letter-spacing: .06em;
    text-transform: uppercase; font-weight: 700; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.05rem, 7vw, 3.3rem); letter-spacing: -.03em; margin-bottom: 10px; text-transform: uppercase; }
.hero__tagline { font-size: clamp(1rem, 3.4vw, 1.28rem); color: var(--gold-200); font-weight: 600; margin-bottom: 12px; }
.hero p.lead { max-width: 620px; color: #CDE9DC; font-size: .98rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero .btn--ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.hero .btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.pub-section { max-width: 1180px; margin: 0 auto; padding: 46px 18px; }
.pub-section--tight { padding: 34px 18px; }
.pub-head { margin-bottom: 26px; }
.pub-head h2 { font-size: clamp(1.3rem, 4vw, 1.75rem); }
.pub-head p { color: var(--muted); max-width: 680px; }
.pub-head--center { text-align: center; }
.pub-head--center p { margin-left: auto; margin-right: auto; }
.eyebrow { color: var(--gold-600); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .74rem; }

.hero-stats { margin-top: 34px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 780px) { .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hero-stat {
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius); padding: 16px; backdrop-filter: blur(6px);
}
.hero-stat strong { display: block; font-size: 1.7rem; letter-spacing: -.02em; }
.hero-stat span { font-size: .78rem; color: #C6E4D8; }

.pub-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.pub-card h3 { font-size: 1rem; }
.icon-circle { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--emerald-50); color: var(--emerald-700); margin-bottom: 12px; }

.pub-footer { background: var(--emerald-950); color: #C6E4D8; margin-top: 30px; }
.pub-footer__grid { max-width: 1180px; margin: 0 auto; padding: 42px 18px 22px; display: grid; gap: 26px; }
@media (min-width: 820px) { .pub-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.pub-footer h4 { color: #fff; font-size: .92rem; }
.pub-footer a { color: var(--gold-200); }
.pub-brand--footer .brand__text strong { color: #fff; }
.pub-brand--footer .brand__text span { color: #9CC9B8; }
.pub-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 16px 18px; text-align: center; font-size: .78rem; }

/* ------------------------------------------------------------ halaman auth - */

body.auth { display: grid; min-height: 100vh; background: linear-gradient(160deg, var(--emerald-950), var(--emerald-800) 70%, #0A7A59); }
.auth-wrap { display: grid; place-items: center; padding: 24px 16px; width: 100%; }
.auth-card { width: 100%; max-width: 430px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-card__head { padding: 26px 26px 18px; background: linear-gradient(150deg, var(--emerald-900), var(--emerald-700)); color: #fff; }
.auth-card__head h1 { font-size: 1.3rem; margin: 12px 0 4px; }
.auth-card__head p { margin: 0; color: #C6E4D8; font-size: .84rem; }
.auth-card__body { padding: 24px 26px 26px; }
.auth-card__foot { padding: 16px 26px 22px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); background: var(--emerald-50); }
.demo-account { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.demo-account:last-child { border-bottom: 0; }

/* ---------------------------------------------------- dokumen & cetak ----- */

body.print-doc { background: #fff; }

.doc { max-width: 1040px; margin: 0 auto; padding: 22px 18px 46px; }
.doc__toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 22px; background: var(--emerald-50); border: 1px solid #CDE9DC; border-radius: var(--radius-sm); }
.doc__toolbar .btn { min-height: 36px; }
.doc__kop { text-align: center; border-bottom: 3px double var(--emerald-800); padding-bottom: 12px; margin-bottom: 20px; }
.doc__kop h1 { font-size: 1.22rem; margin: 0; text-transform: uppercase; letter-spacing: .02em; }
.doc__kop p { margin: 2px 0 0; font-size: .84rem; color: #444; }
.doc h2 { font-size: 1.02rem; margin: 0; }
.doc h3 { font-size: .92rem; margin: 22px 0 8px; padding-left: 8px; border-left: 4px solid var(--emerald-600); }
.doc table.tbl { min-width: 0; font-size: .82rem; }
.doc table.tbl th, .doc table.tbl td { border: 1px solid #8FA69C; }
.doc table.tbl thead th { position: static; background: #EDF5F1; color: var(--ink); }
.doc table.tbl tbody tr:hover { background: transparent; }
.doc__sign { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px 30px; margin-top: 34px; font-size: .86rem; }
.doc__sign > div { flex: 1 1 210px; min-width: 0; text-align: center; }
.doc__sign .space { height: 66px; }
.doc__foot { margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--border); font-size: .74rem; color: var(--muted); text-align: center; }

@media print {
    body.print-doc { background: #fff; }
    .doc { max-width: none; padding: 0; }
    .doc .table-wrap { overflow: visible !important; }
    .doc table.tbl { page-break-inside: auto; }
    .doc table.tbl tr { page-break-inside: avoid; }
    .doc h3 { page-break-after: avoid; }
    .doc__sign { page-break-inside: avoid; }
    .doc__foot { border-top: 0; }
    @page { margin: 14mm; }
}

@media print {
    .sidebar, .topbar, .footer, .no-print, .pagination { display: none !important; }
    .main { margin-left: 0; }
    body { background: #fff; }
    .card { box-shadow: none; border-color: #ddd; }
}

/* ==========================================================================
   Modul Pendaftaran Peserta MTQ (wizard bertahap, kartu dokumen, linimasa)
   ========================================================================== */

.pill--red { background: var(--red); color: #fff; }

/* --- stepper wizard ------------------------------------------------------ */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; padding: 0; list-style: none; }
.steps__item {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--border); font-size: .82rem; color: var(--muted);
    cursor: pointer; transition: border-color .15s, box-shadow .15s, color .15s;
}
.steps__item.is-active { color: var(--ink); border-color: #A7D8C5; box-shadow: var(--shadow-sm); background: var(--emerald-50); }
.steps__item.is-done { color: var(--emerald-800); border-color: var(--emerald-100); }
.steps__item.is-done .steps__no { background: var(--emerald-600); color: #fff; }
.steps__no {
    width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
    font-size: .72rem; font-weight: 700; background: var(--grey-bg); color: var(--grey);
}
.steps__item.is-active .steps__no { background: var(--emerald-800); color: #fff; }

.wizard-step { display: none; }
.wizard-step.is-active { display: block; }
.wizard-step > h3 { margin-top: 0; }
.wizard-nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-top: 20px; }
.wizard-nav .spacer { flex: 1; }

/* --- kartu dokumen ------------------------------------------------------ */
.doc-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.doc-card {
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff;
    padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.doc-card.is-valid { border-color: #A6E3CB; background: var(--emerald-50); }
.doc-card.is-masalah { border-color: #FDA29B; background: var(--red-bg); }
.doc-card.is-perbaikan { border-color: var(--gold-200); background: var(--gold-50); }
.doc-card__head { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.doc-card__head strong { font-size: .88rem; }
.doc-card__meta { font-size: .74rem; color: var(--muted); word-break: break-word; }
.doc-card input[type=file] { font-size: .8rem; padding: 8px; min-height: 0; }

/* --- linimasa riwayat --------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 18px 14px; }
.timeline li::before {
    content: ''; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
    background: #fff; border: 2px solid var(--emerald-500);
}
.timeline li.is-bad::before { border-color: #F97066; }
.timeline li.is-warn::before { border-color: var(--gold-500); }
.timeline__time { font-size: .74rem; color: var(--muted); }
.timeline__title { font-weight: 600; font-size: .88rem; }
.timeline__note { font-size: .84rem; color: var(--muted); }

/* --- hasil pencarian kader (AJAX) --------------------------------------- */
.kader-hasil { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.kader-hasil li { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: #fff; }
.kader-hasil button {
    border: 0; background: none; text-align: left; width: 100%; cursor: pointer; font: inherit; color: inherit; padding: 0;
}
.kader-hasil strong { display: block; font-size: .9rem; }
.kader-hasil span { font-size: .76rem; color: var(--muted); }

/* --- kartu statistik ringkas ------------------------------------------- */
.stat-mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none; }
.stat-mini .stat__value { font-size: 1.35rem; }

/* --- kafilah & pelaksanaan MTQ (Fase 1) --------------------------------- */
.kafilah-logo {
    display: inline-block; height: 24px; width: auto; max-width: 60px; object-fit: contain;
    vertical-align: middle; margin: 2px 6px 0 0; border-radius: 4px; background: #fff;
}
.kafilah-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sidebar__link.is-soon { opacity: .68; }
.sidebar__link.is-soon:hover { opacity: .9; }
.sidebar__link.is-soon .pill { font-size: .6rem; letter-spacing: .04em; }

/* --- FASE 3: kartu peserta & undian nomor ------------------------------- */
.kartu-grid { display: grid; gap: 8mm; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kartu-grid--satu { grid-template-columns: minmax(0, 96mm); }
.kartu {
    border: 1px solid #8FA69C; border-radius: 10px; background: #fff; padding: 8px 10px;
    display: flex; flex-direction: column; gap: 6px; break-inside: avoid; page-break-inside: avoid;
    box-shadow: 0 1px 2px rgba(15, 46, 36, .08);
}
.kartu__head { display: flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--emerald-700); padding-bottom: 6px; }
.kartu__logo { height: 30px; width: auto; max-width: 46px; object-fit: contain; }
.kartu__logo--teks {
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .78rem;
    color: #fff; background: var(--emerald-700); border-radius: 6px; padding: 6px 8px; height: auto;
}
.kartu__event { flex: 1; min-width: 0; text-align: center; }
.kartu__event strong { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .02em; }
.kartu__event span { display: block; font-size: .66rem; color: #4A5B54; }
.kartu__judul { text-align: center; font-weight: 700; letter-spacing: .14em; font-size: .72rem; color: var(--emerald-800); }
.kartu__body { display: flex; gap: 8px; align-items: flex-start; }
.kartu__foto {
    width: 58px; height: 78px; flex: none; border: 1px solid var(--border); border-radius: 4px; overflow: hidden;
    background: var(--emerald-50); display: flex; align-items: center; justify-content: center;
}
.kartu__foto img { width: 100%; height: 100%; object-fit: cover; }
.kartu__foto-kosong { font-size: .6rem; color: var(--muted); }
.kartu__data { flex: 1; min-width: 0; }
.kartu__nomor span { display: block; font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kartu__nomor strong { font-size: .98rem; color: var(--emerald-800); }
.kartu__nama { font-weight: 700; font-size: .84rem; margin: 2px 0 4px; }
.kartu__dl { display: grid; grid-template-columns: auto 1fr; gap: 1px 6px; margin: 0; font-size: .66rem; }
.kartu__dl dt { color: var(--muted); }
.kartu__dl dd { margin: 0; }
.kartu__qr { width: 66px; flex: none; text-align: center; }
.kartu__qr-gambar { width: 64px; height: 64px; margin: 0 auto; }
.kartu__qr-gambar svg { width: 64px; height: 64px; display: block; }
.kartu__qr span { display: block; font-size: .54rem; color: var(--muted); line-height: 1.2; margin-top: 2px; }
.kartu__foot {
    display: flex; justify-content: space-between; gap: 8px; font-size: .56rem; color: var(--muted);
    border-top: 1px solid var(--border); padding-top: 4px;
}
.kartu-info { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; margin: 4px 0 14px; font-size: .82rem; }
.kartu-verifikasi { max-width: 660px; margin: 22px auto 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--emerald-50); }

.undian-hasil { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: 10px; }
.undian-hasil__item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: #fff; }
.undian-hasil__nomor { font-weight: 700; color: var(--emerald-800); background: var(--emerald-50); border-radius: 8px; padding: 4px 8px; white-space: nowrap; }
.undian-hasil__nama { font-size: .84rem; min-width: 0; }

/* --- halaman verifikasi publik (QR kartu) ------------------------------- */
.verif-body { background: linear-gradient(180deg, #E8F5F0, #F7FBF9 45%, #fff); min-height: 100vh; padding: 26px 16px; }
.verif-wrap { max-width: 720px; margin: 0 auto; }
.verif-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.verif-card { text-align: center; }
.verif-card--valid { border-top: 4px solid var(--emerald-600); }
.verif-card--warn { border-top: 4px solid var(--gold-500); }
.verif-card--invalid { border-top: 4px solid #F97066; }
.verif-icon { font-size: 2rem; line-height: 1; }
.verif-nomor {
    margin: 12px auto; display: inline-flex; flex-direction: column; gap: 2px; background: var(--emerald-50);
    border: 1px dashed var(--emerald-600); border-radius: 12px; padding: 10px 22px;
}
.verif-nomor strong { font-size: 1.5rem; }
.verif-dl { text-align: left; margin-top: 14px; }
.verif-foot { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 18px; }

@media print {
    .kartu-grid { gap: 6mm; }
    .kartu { box-shadow: none; }
    .kartu-grid--satu { grid-template-columns: minmax(0, 100%); }
}

/* --- FASE 4/5: daftar centang penugasan, form penilaian ----------------- */
.ceklis-grid {
    display: grid; gap: 8px 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: #fff;
    max-height: 260px; overflow-y: auto;
}
.ceklis-grid .checkbox { margin: 0; font-size: .84rem; }

.nilai-peserta { display: flex; flex-direction: column; gap: 10px; }
.nilai-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: .86rem; }
.nilai-komponen {
    border: 1px solid var(--border); border-left: 4px solid var(--emerald-500); border-radius: var(--radius-sm);
    padding: 10px 12px; background: #fff;
}
.nilai-komponen.is-terisi { border-left-color: var(--emerald-700); background: var(--emerald-50); }
.nilai-komponen.is-draft { border-left-color: var(--gold-500); background: var(--gold-50); }
.nilai-komponen__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; justify-content: space-between; }
.nilai-komponen__head strong { font-size: .92rem; }
.nilai-komponen__bobot { font-size: .74rem; color: var(--muted); }
.nilai-input-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 8px; }
.nilai-input-row .field { margin: 0; flex: 1 1 160px; }
.nilai-besar { font-size: 1.1rem; font-weight: 700; color: var(--emerald-800); }
.nilai-aksi { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
@media (min-width: 900px) {
    .nilai-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}

/* --- FASE 7: dokumen resmi (kop, tanda tangan, stempel) ------------------ */
.kop { display: flex; align-items: center; gap: 12px; border-bottom: 3px double #0B3D2E; padding-bottom: 10px; margin-bottom: 16px; }
.kop__logo { height: 62px; width: auto; max-width: 86px; object-fit: contain; flex: none; }
.kop__gambar { display: block; max-width: 100%; max-height: 120px; }
.kop__isi { flex: 1; min-width: 0; text-align: center; }
.kop__baris1 { font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.kop__baris2 { font-size: .95rem; font-weight: 700; text-transform: uppercase; }
.kop__baris3, .kop__baris4 { font-size: .78rem; color: #333; }
.kop__kecil { font-size: .72rem; color: #555; }

.tandatangan { margin-top: 30px; }
.tandatangan__tempat { text-align: right; font-size: .86rem; margin-bottom: 6px; }
.tandatangan__baris { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 26px; }
.tandatangan__blok { flex: 1 1 200px; min-width: 0; text-align: center; font-size: .84rem; }
.tandatangan__label { min-height: 18px; }
.tandatangan__ruang { position: relative; height: 74px; display: flex; align-items: center; justify-content: center; }
.tandatangan__ttd { max-height: 68px; max-width: 150px; object-fit: contain; }
.tandatangan__stempel { position: absolute; left: 50%; top: 6px; transform: translateX(-30%); max-height: 86px; max-width: 86px; opacity: .85; }
.tandatangan__nama { font-weight: 700; border-bottom: 1px solid #444; display: inline-block; padding: 0 6px; }
.tandatangan__jabatan { font-size: .78rem; color: #444; }
.tandatangan__nip { font-size: .74rem; color: #444; }

.pratinjau-dokumen { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: #fff; }
.pratinjau-dokumen__judul { text-align: center; font-weight: 700; text-transform: uppercase; margin: 10px 0; }

/* --- FASE 8: sertifikat juara ------------------------------------------- */
.sertifikat { border: 6px double #0B3D2E; border-radius: 6px; padding: 16px; background: #fff; page-break-inside: avoid; }
.sertifikat--tanpa-bingkai { border: 0; }
.sertifikat__judul { text-align: center; font-size: 1.3rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 12px 0 2px; }
.sertifikat__sub { text-align: center; font-size: .9rem; color: #444; }
.sertifikat__nomor { text-align: center; font-size: .8rem; color: #444; margin-bottom: 10px; }
.sertifikat__nama { text-align: center; font-size: 1.5rem; font-weight: 700; margin: 12px 0 2px; }
.sertifikat__juara { text-align: center; font-size: 1.05rem; font-weight: 700; color: #0B3D2E; margin-bottom: 10px; }
.sertifikat__isi { font-size: .88rem; text-align: justify; margin: 0 auto 10px; max-width: 92%; }
.sertifikat__meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: .82rem; max-width: 460px; margin: 10px auto; }
.sertifikat__meta dt { color: var(--muted); }
.sertifikat__meta dd { margin: 0; }
.sertifikat__qr { text-align: center; margin-top: 8px; }
.sertifikat__qr svg { width: 84px; height: 84px; }
.sertifikat__qr span { display: block; font-size: .62rem; color: var(--muted); }
@media print { .sertifikat { border-color: #0B3D2E; } }

/* --- FASE 10: panel keamanan -------------------------------------------- */
.stat-mini--aman .stat__value { color: var(--emerald-700); }
.stat-mini--risiko .stat__value { color: var(--gold-600); }

/* --- Panduan/Import Excel (FASE 11) ------------------------------------ */
.card--ok { border-color: #A6E3CB; }
.tbl tr.is-bad td { background: var(--red-bg); }
.tbl tr.is-bad td:first-child { box-shadow: inset 3px 0 0 #F97066; }
details summary { color: var(--emerald-700); }

@media print {
    .steps, .wizard-nav, .no-print { display: none !important; }
    .wizard-step { display: block !important; }
}
