/* ==========================================================================
   PPID RSUD Abdoel Wahab Sjahranie â€” design tokens & komponen
   Palet diturunkan dari identitas PPID (crimson) + biru institusional.
   ========================================================================== */

:root {
    --crimson: #b3122f;
    --crimson-dark: #8c0d24;
    --crimson-soft: #fbeaee;
    --blue: #0b6fa4;
    --blue-dark: #084f75;
    --blue-soft: #e9f2f8;

    --ink: #13212e;
    --text: #42505e;
    --muted: #5d6a76;

    --surface: #ffffff;
    --canvas: #f5f7f9;
    --canvas-deep: #eceff3;
    --line: #e1e6eb;
    --line-strong: #cfd7df;

    --ok: #0f7b5f;
    --warn: #a86500;
    --danger: #b3261e;

    /* Skala radius resmi (lihat DESIGN.md) */
    --radius-xs: 3px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --pill: 999px;

    /* Alias lama dipetakan ke skala resmi agar tidak ada radius ad-hoc. */
    --radius-s: var(--radius-lg);
    --radius: var(--radius-lg);
    --radius-l: var(--radius-lg);

    --shadow-sm: 0 1px 2px rgba(19, 33, 46, .06);
    --shadow: 0 12px 32px -16px rgba(19, 33, 46, .28);

    --container: 1180px;
    /* Satu sudut irisan untuk semua blok: hero, section, page-head, CTA, footer. */
    --cut: clamp(26px, 3.4vw, 48px);

    /* Skala spasi resmi: 4-64 px */
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
    --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

    /* Skala tipe resmi */
    --text-xs: .75rem; --text-sm: .8125rem; --text-base: 1rem;
    --text-lg: 1.125rem; --text-xl: 1.5rem; --text-2xl: 2rem;

    /* Gerak resmi */
    --motion-fast: 150ms; --motion-base: 250ms; --motion-slow: 450ms;
    --ease-standard: cubic-bezier(.22, .61, .36, 1);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.011em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.1vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 650; }
h4 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--blue-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--crimson); }
img { max-width: 100%; height: auto; }
small { font-size: .8125rem; }

.container { width: min(calc(100% - 2.5rem), var(--container)); margin-inline: auto; }
.container--narrow { width: min(calc(100% - 2.5rem), 760px); margin-inline: auto; }

/* Lewati navigasi: tersembunyi sampai difokus keyboard. */
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 100;
    padding: .75rem 1.1rem; background: var(--surface); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: 0 0 var(--radius-s) 0;
    font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

.topbar__note { margin: 0; }
.mb-3 { margin-bottom: 1rem; }
.pagination__numbers { display: flex; gap: .35rem; align-items: center; }
.section { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.section--tight { padding-block: clamp(1.75rem, 1rem + 2vw, 2.75rem); }
.section--surface { background: var(--surface); border-block: 1px solid var(--line); }

.stack > * + * { margin-top: 1rem; }
.muted { color: var(--muted); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .78rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Top strip & header --------------------------------------------------- */
.topbar {
    background: var(--ink);
    color: #cdd6df;
    font-size: .78rem;
    letter-spacing: .01em;
}
.topbar__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; min-height: 38px; flex-wrap: wrap;
}
.topbar a { color: #e7edf3; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__links { display: flex; gap: 1.1rem; align-items: center; }

.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex; align-items: center; gap: 1.5rem;
    min-height: 74px;
}
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; flex-shrink: 0; }
.brand__mark {
    width: 44px; height: 44px; border-radius: 10px;
    display: grid; place-items: center;
    background: var(--crimson); color: #fff;
    font-weight: 800; font-size: .82rem; letter-spacing: .02em;
    box-shadow: 0 4px 12px -6px rgba(179, 18, 47, .8);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__logo { height: 44px; width: auto; max-width: 150px; object-fit: contain; }
.brand-preview, .favicon-preview {
    display: block; max-height: 64px; width: auto; max-width: 180px;
    padding: .4rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff;
}
.favicon-preview { max-height: 40px; max-width: 40px; }
input[type="file"] { font-size: .85rem; color: var(--text); }
input[type="file"]::file-selector-button {
    margin-right: .6rem; padding: .45rem .8rem; border: 1px solid var(--line-strong);
    border-radius: var(--radius-s); background: #fff; color: var(--ink);
    font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--crimson-soft); border-color: var(--crimson); }
.brand__name { font-weight: 700; color: var(--ink); font-size: .98rem; }
.brand__sub { font-size: .72rem; color: var(--muted); letter-spacing: .02em; }

.nav { margin-left: auto; display: flex; align-items: center; gap: .15rem; }
.nav > a, .nav-dd > summary {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .55rem .75rem; border-radius: var(--radius-s);
    font-size: .875rem; font-weight: 550; color: var(--ink);
    text-decoration: none; cursor: pointer; list-style: none;
    border: 0; background: none; font-family: inherit;
}
.nav-dd > summary::-webkit-details-marker { display: none; }
.nav-dd > summary::after {
    content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-1px);
    opacity: .6;
}
.nav > a:hover, .nav-dd > summary:hover, .nav-dd[open] > summary { background: var(--canvas-deep); color: var(--crimson); }
.nav .is-active { color: var(--crimson); }
.nav .is-active::before {
    content: ""; position: absolute;
}

.nav-dd { position: relative; }
.nav-dd__panel {
    position: absolute; top: calc(100% + .4rem); left: 0; min-width: 270px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: .45rem; z-index: 50;
}
.nav-dd__panel a {
    display: block; padding: .5rem .65rem; border-radius: var(--radius-s);
    font-size: .865rem; color: var(--text); text-decoration: none;
}
.nav-dd__panel a:hover { background: var(--canvas); color: var(--crimson); }
.nav-dd__panel .nav-dd__label {
    padding: .35rem .65rem; font-size: .7rem; letter-spacing: .08em;
    text-transform: uppercase; color: var(--muted); font-weight: 650;
}

.header-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink);
    cursor: pointer; text-decoration: none;
}
.icon-btn:hover { border-color: var(--crimson); color: var(--crimson); }

.nav-mobile { display: none; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem 1.15rem; border-radius: var(--radius-s);
    font-weight: 600; font-size: .9rem; line-height: 1.2;
    text-decoration: none; border: 1px solid transparent; cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    font-family: inherit;
}
.btn--primary { background: var(--crimson); color: #fff; }
.btn--primary:hover { background: var(--crimson-dark); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--crimson); color: var(--crimson); }
.btn--quiet { background: var(--canvas-deep); color: var(--ink); }
.btn--quiet:hover { background: #e2e7ec; color: var(--ink); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #8f1d17; color: #fff; }
.btn--sm { padding: .42rem .7rem; font-size: .8rem; }
.btn--block { width: 100%; }

/* --- Hero & slider -------------------------------------------------------- */
.hero {
    position: relative;
    isolation: isolate;
    color: #e8eef4;
    background:
        radial-gradient(880px 420px at 8% -18%, rgba(179, 18, 47, .38), transparent 62%),
        radial-gradient(760px 420px at 94% 4%, rgba(11, 111, 164, .32), transparent 66%),
        linear-gradient(158deg, #0a1725 0%, #0d1e2e 52%, #07131d 100%);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%);
    padding-bottom: clamp(4.5rem, 3rem + 4vw, 6.5rem);
    overflow: hidden;
}

/* Tekstur blueprint: garis tipis + sorotan diagonal. */
.hero__texture {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(120% 92% at 50% 0%, #000 30%, transparent 76%);
    mask-image: radial-gradient(120% 92% at 50% 0%, #000 30%, transparent 76%);
}
.hero::before {
    content: ""; position: absolute; top: -40%; right: -14%; width: 44%; height: 200%;
    background: linear-gradient(90deg, rgba(255, 255, 255, .08), transparent 72%);
    transform: rotate(19deg); z-index: -1; pointer-events: none;
}
/* Irisan miring crimson di tepi bawah hero. */
.hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 76px;
    background: linear-gradient(90deg, rgba(179, 18, 47, .85), rgba(179, 18, 47, 0) 52%);
    clip-path: polygon(0 100%, 100% 100%, 100% 82%, 0 0);
    opacity: .45; pointer-events: none;
}

.hero__grid {
    display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(2rem, 1rem + 3vw, 4rem);
    align-items: center; padding-block: clamp(2.75rem, 1.5rem + 4vw, 5rem) 0;
}

.hero__slides { display: grid; }
.hero__slide {
    grid-area: 1 / 1;
    opacity: 0; visibility: hidden; transform: translateY(14px);
    transition: opacity .45s ease, transform .45s ease;
}
.hero__slide.is-active { opacity: 1; visibility: visible; transform: none; }

.hero h1 {
    color: #fff; max-width: 19ch;
    letter-spacing: -.02em;
    text-wrap: balance;
}
.hero .eyebrow {
    color: #ffd9e0;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .16);
    font-family: var(--mono);
    letter-spacing: .13em;
}
.hero__lead { font-size: 1.04rem; color: #b9c8d6; max-width: 52ch; margin-bottom: 1.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.hero .btn--ghost {
    background: rgba(255, 255, 255, .06); color: #fff;
    border-color: rgba(255, 255, 255, .28);
}
.hero .btn--ghost:hover {
    background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .5);
}
.hero__trust {
    margin: 1.5rem 0 0; font-size: .82rem; color: #9fb1c1;
    display: flex; gap: .5rem; align-items: center;
}
.hero__trust::before {
    content: ""; width: 7px; height: 7px; border-radius: 50%; background: #35c08c;
    box-shadow: 0 0 0 4px rgba(53, 192, 140, .16);
}

/* Kontrol slider: hanya muncul bila JS aktif (progressive enhancement). */
.hero__foot {
    display: none; align-items: center; justify-content: space-between; gap: 1rem;
    margin-top: clamp(1.5rem, 1rem + 2vw, 2.25rem);
}
.hero.is-ready .hero__foot { display: flex; }
.hero__controls { display: flex; align-items: center; gap: .45rem; }
.hero__arrow {
    width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .2); color: #fff;
    transition: background-color .15s ease, border-color .15s ease;
}
.hero__arrow:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .42); }
.hero__arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hero__dots { display: flex; gap: .35rem; margin-inline: .25rem; }
.hero__dot {
    width: 30px; height: 4px; padding: 0; border: 0; border-radius: 999px;
    background: rgba(255, 255, 255, .24); cursor: pointer;
    transition: background-color .2s ease, width .2s ease;
}
.hero__dot > span { display: none; }
.hero__dot:hover { background: rgba(255, 255, 255, .5); }
.hero__dot.is-active { background: var(--crimson); width: 44px; }
.hero__dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hero__counter {
    margin: 0; font-family: var(--mono); font-size: .76rem; letter-spacing: .1em; color: #8ea3b5;
    display: flex; align-items: center; gap: .35rem;
}
.hero__counter [data-slide-index] { color: #fff; }

/* Kartu ringkasan di dalam hero: panel kaca dengan sudut terpotong. */
.stat-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03));
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .9);
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}
.stat-card::before {
    content: ""; position: absolute; left: 0; top: 0; width: 46px; height: 2px;
    background: var(--crimson);
}
.stat-card__title {
    font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
    color: #94a8ba; font-weight: 600; margin-bottom: 1.1rem;
}
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.stat__value { font-size: 1.8rem; font-weight: 700; color: #fff; line-height: 1; }
.stat__label { font-size: .76rem; color: #9fb1c1; margin-top: .35rem; }
.stat-card__foot {
    border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 1.25rem; padding-top: 1rem;
    display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: #9fb1c1;
}

/* --- Section heading ------------------------------------------------------ */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section-head__eyebrow { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--crimson); font-weight: 700; margin-bottom: .35rem; }
.section-head p { margin: .35rem 0 0; color: var(--muted); max-width: 60ch; }

/* --- Cards ---------------------------------------------------------------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }

.card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.35rem;
    box-shadow: var(--shadow-sm);
}
.card--link { display: block; text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease; }
.card--link:hover { border-color: var(--line-strong); transform: translateY(-2px); color: inherit; }
.card__icon {
    width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
    background: var(--crimson-soft); color: var(--crimson); margin-bottom: 1rem;
}
.card__icon svg { width: 20px; height: 20px; }
.card__title { font-size: 1rem; font-weight: 650; color: var(--ink); margin-bottom: .35rem; }
.card__text { font-size: .865rem; color: var(--muted); margin: 0; }
.card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }

.classification { position: relative; overflow: hidden; }
.classification::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: var(--crimson); opacity: .85;
}
.classification:nth-child(2)::before { background: var(--blue); }
.classification:nth-child(3)::before { background: #8a6d1f; }
.classification:nth-child(4)::before { background: #5b6470; }

/* --- Tabel ---------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .885rem; }
table.data th, table.data td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { background: var(--canvas); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fafbfc; }
table.data td a { font-weight: 550; }

.doc-link { display: inline-flex; align-items: flex-start; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 550; }
.doc-link:hover { color: var(--crimson); }
.doc-link svg { flex-shrink: 0; margin-top: .2rem; color: var(--crimson); }

/* --- Badges / pills ------------------------------------------------------- */
.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .55rem; border-radius: 999px;
    font-size: .72rem; font-weight: 650; letter-spacing: .02em;
    background: var(--canvas-deep); color: var(--text); white-space: nowrap;
}
.badge--ok { background: #e6f4ef; color: #0b5c47; }
.badge--warn { background: #fdf1de; color: #7d4c00; }
.badge--info { background: var(--blue-soft); color: var(--blue-dark); }
.badge--danger { background: #fbeae9; color: var(--danger); }
.badge--muted { background: var(--canvas-deep); color: var(--muted); }

/* --- Alert ---------------------------------------------------------------- */
.alert {
    display: flex; gap: .7rem; align-items: flex-start;
    padding: .85rem 1rem; border-radius: var(--radius-s);
    border: 1px solid var(--line); background: var(--surface);
    font-size: .88rem; margin-bottom: 1rem;
}
.alert--success { border-color: #bfe3d7; background: #f0faf6; color: #0b5c47; }
.alert--error { border-color: #f0c9c6; background: #fdf4f3; color: #8f1d17; }
.alert--warning { border-color: #f0dcb6; background: #fdf8ee; color: #7d4c00; }
.alert--info { border-color: #c9e0ee; background: #f2f8fc; color: var(--blue-dark); }

/* --- Form ----------------------------------------------------------------- */
.field { margin-bottom: 1.05rem; }
.field label, .label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink); margin-bottom: .35rem; }
.field .hint { font-size: .76rem; color: var(--muted); margin-top: .3rem; }
.field .error { font-size: .78rem; color: var(--danger); margin-top: .3rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="date"], input[type="number"], input[type="search"], select, textarea {
    width: 100%; padding: .62rem .75rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius-s);
    background: var(--surface); color: var(--ink); font-family: inherit; font-size: .9rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(11, 111, 164, .14);
}
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .84rem; color: var(--text); }
.checkbox input { margin-top: .28rem; width: 16px; height: 16px; accent-color: var(--crimson); flex-shrink: 0; }
.perm-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: .45rem .9rem; padding: .7rem .85rem;
    border: 1px solid var(--line); border-radius: var(--radius-s); background: #fafbfc;
}
.brand-preview {
    max-height: 64px; width: auto; max-width: 100%; object-fit: contain;
    border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; padding: .35rem;
}
.favicon-preview {
    width: 40px; height: 40px; object-fit: contain;
    border: 1px solid var(--line); border-radius: var(--radius-xs); background: #fff; padding: .2rem;
}
.media-preview {
    width: 100%; max-width: 420px; display: block;
    border: 1px solid var(--line); border-radius: var(--radius-s); background: #000;
}
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* --- Pagination ----------------------------------------------------------- */
.pagination { display: flex; gap: .35rem; align-items: center; justify-content: center; margin-top: 1.75rem; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 36px; height: 36px; padding: 0 .6rem;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: var(--radius-s);
    background: var(--surface); font-size: .85rem; color: var(--text); text-decoration: none;
}
.pagination .is-current { background: var(--crimson); border-color: var(--crimson); color: #fff; font-weight: 650; }
.pagination a:hover { border-color: var(--crimson); color: var(--crimson); }
.pagination .is-disabled { opacity: .45; pointer-events: none; }

/* --- Page header ---------------------------------------------------------- */
.page-head {
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding-block: clamp(1.75rem, 1rem + 2vw, 2.75rem);
}
.page-head h1 { margin-bottom: .35rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .8rem; color: var(--muted); margin-bottom: .9rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--crimson); }
.breadcrumb span::after { content: "/"; margin-left: .45rem; opacity: .5; }
.breadcrumb span:last-child::after { content: ""; }

/* --- Prose (konten halaman) ----------------------------------------------- */
.prose { font-size: 1rem; color: var(--text); }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2rem; font-size: 1.35rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: .4rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .6rem .75rem; text-align: left; }
.prose th { background: var(--canvas); }
.prose img { border-radius: var(--radius); }
.prose blockquote {
    margin: 1.5rem 0; padding: .9rem 1.25rem;
    border-left: 3px solid var(--crimson); background: var(--crimson-soft);
    border-radius: 0 var(--radius-s) var(--radius-s) 0;
}

.layout-side { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: start; }
.side-nav { position: sticky; top: 96px; }
.side-nav__title { font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: .6rem; }
.side-nav a {
    display: block; padding: .55rem .8rem; border-radius: var(--radius-s);
    font-size: .875rem; color: var(--text); text-decoration: none; border-left: 2px solid transparent;
}
.side-nav a:hover { background: var(--surface); color: var(--crimson); }
.side-nav a.is-active { background: var(--surface); color: var(--crimson); font-weight: 600; border-left-color: var(--crimson); }

/* --- Alur / steps --------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 1rem; }
.step { position: relative; padding-left: 3.1rem; }
.step::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 0; top: 0;
    width: 2.1rem; height: 2.1rem; border-radius: 50%;
    display: grid; place-items: center; font-size: .85rem; font-weight: 700;
    background: var(--crimson-soft); color: var(--crimson);
}
.step h4 { margin-bottom: .2rem; }
.step p { margin: 0; font-size: .875rem; color: var(--muted); }

/* --- CTA ------------------------------------------------------------------ */
.cta {
    background: var(--ink); color: #e8eef4; border-radius: var(--radius-l);
    padding: clamp(1.75rem, 1rem + 3vw, 3rem);
    display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.cta h2 { color: #fff; margin-bottom: .4rem; }
.cta p { color: #b9c6d2; margin: 0; max-width: 58ch; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #b9c6d2; margin-top: auto; }
.site-footer a { color: #d8e2ea; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding-block: 3rem 2rem; }
.footer-grid h4 { color: #fff; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; font-size: .865rem; }
.footer-grid li + li { margin-top: .5rem; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-block: 1.1rem; font-size: .8rem;
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* --- Util ----------------------------------------------------------------- */
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0 !important; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.empty-state {
    text-align: center; padding: 3rem 1.5rem;
    border: 1px dashed var(--line-strong); border-radius: var(--radius);
    color: var(--muted); background: var(--surface);
}

/* --- Responsif ------------------------------------------------------------ */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .layout-side { grid-template-columns: 1fr; }
    .side-nav { position: static; }
}

@media (max-width: 860px) {
    .nav { display: none; }
    .header-actions .btn--header { display: none; }
    .nav-mobile { display: block; margin-left: auto; }
    .nav-mobile__panel {
        position: absolute; left: 0; right: 0; top: 100%;
        background: var(--surface); border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow); padding: 1rem 1.25rem 1.5rem; max-height: 75vh; overflow: auto;
    }
    .nav-mobile__panel a { display: block; padding: .6rem .25rem; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
    .nav-mobile__panel .nav-mobile__group { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 1rem 0 .25rem; }
    .hero__grid { grid-template-columns: 1fr; }
    .stat-card { order: -1; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 560px) {
    .grid-4 { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .brand__name { font-size: .9rem; }
    .brand__sub { display: none; }
    table.data th, table.data td { padding: .65rem .7rem; }
}

/* --- Pencarian header ----------------------------------------------------- */
.search-mini { position: relative; display: flex; align-items: center; }
.search-mini input {
    width: 210px; padding: .5rem 2.2rem .5rem .8rem; font-size: .82rem;
    border-radius: 999px; background: var(--canvas);
    border: 1px solid var(--line);
}
.search-mini input:focus { background: var(--surface); width: 240px; }
.search-mini button {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px; border-radius: 50%; border: 0;
    background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.search-mini button:hover { color: var(--crimson); }

/* --- Menu seluler --------------------------------------------------------- */
.nav-mobile > summary {
    display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
    padding: .5rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-s);
    font-size: .82rem; font-weight: 600; color: var(--ink); list-style: none;
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile__bars,
.nav-mobile__bars::before,
.nav-mobile__bars::after {
    display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px;
}
.nav-mobile__bars { position: relative; }
.nav-mobile__bars::before, .nav-mobile__bars::after { content: ""; position: absolute; left: 0; }
.nav-mobile__bars::before { top: -5px; }
.nav-mobile__bars::after { top: 5px; }

/* --- Dropdown tambahan ---------------------------------------------------- */
.nav-dd__panel--wide { min-width: 320px; }
.nav-dd__count {
    float: right; margin-left: .75rem; font-size: .72rem; font-weight: 700;
    color: var(--muted); background: var(--canvas-deep);
    padding: .05rem .45rem; border-radius: 999px;
}
.nav-dd__empty { display: block; padding: .5rem .65rem; font-size: .82rem; color: var(--muted); }

/* --- Footer detail -------------------------------------------------------- */
.footer-org { color: #fff; font-weight: 600; margin: 0 0 .5rem; }
.footer-desc { font-size: .855rem; line-height: 1.65; color: #a9b8c5; margin: 0; max-width: 34ch; }
.footer-address { font-style: normal; font-size: .865rem; line-height: 1.8; color: #c2ced9; }

/* --- Flash stack ---------------------------------------------------------- */
.flash-stack { padding-top: 1.1rem; }

.flash-stack .alert:last-child { margin-bottom: 0; }
.alert p { margin: 0; }
.alert__dot {
    width: 8px; height: 8px; border-radius: 50%; background: currentColor;
    margin-top: .45rem; flex-shrink: 0;
}

/* ==========================================================================
   Panel admin
   ========================================================================== */
.admin-body { background: var(--canvas); }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

.admin-side {
    background: var(--ink); color: #c3cfda;
    display: flex; flex-direction: column; gap: 1.5rem;
    padding: 1.4rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; }
.admin-brand__mark {
    width: 38px; height: 38px; border-radius: 10px; background: var(--crimson);
    display: grid; place-items: center; font-weight: 800; font-size: .8rem;
}
.admin-brand__logo { height: 38px; width: auto; max-width: 110px; object-fit: contain; border-radius: 8px; background: #fff; }
.admin-brand__name { font-weight: 700; font-size: .92rem; line-height: 1.2; }
.admin-brand__sub { font-size: .7rem; color: #93a3b3; }

.admin-nav { display: flex; flex-direction: column; gap: .15rem; }
.admin-nav__group {
    font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
    color: #7d8fa1; font-weight: 700; margin: 1.1rem 0 .35rem; padding-left: .75rem;
}
.admin-nav a {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .55rem .75rem; border-radius: var(--radius-s);
    font-size: .875rem; color: #c7d3de; text-decoration: none;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-nav i { width: 1.1rem; text-align: center; font-size: .82rem; opacity: .85; }
.admin-nav a:hover i, .admin-nav a.is-active i { opacity: 1; }
.admin-nav a.is-active { background: var(--crimson); color: #fff; font-weight: 600; }
.admin-nav__count {
    font-size: .7rem; background: rgba(255, 255, 255, .14);
    padding: .05rem .4rem; border-radius: 999px;
}

.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: .85rem 1.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    position: sticky; top: 0; z-index: 20;
}
.admin-topbar h1 { font-size: 1.05rem; margin: 0; }
.admin-topbar__meta { font-size: .78rem; color: var(--muted); }
.admin-content { padding: 1.75rem; max-width: 1320px; width: 100%; }

.admin-user { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; border-radius: var(--radius-s); padding: .2rem .35rem; }
.admin-user:hover { background: var(--canvas); }
.admin-user__avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--blue-soft);
    color: var(--blue-dark); display: grid; place-items: center; font-weight: 700; font-size: .78rem;
    overflow: hidden; flex-shrink: 0;
}
.admin-user__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-photo { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.profile-photo__frame {
    width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: var(--blue-soft); color: var(--blue-dark);
    display: grid; place-items: center; font-weight: 700; font-size: 1.15rem;
}
.profile-photo__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-photo__fields { flex: 1; min-width: 0; }
.profile-photo__fields > label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink); margin-bottom: .35rem; }
.admin-user__name { font-size: .82rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.admin-user__role { font-size: .7rem; color: var(--muted); }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.stat-box__label { font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.stat-box__value { font-size: 1.65rem; font-weight: 700; color: var(--ink); line-height: 1.2; margin-top: .35rem; }
.stat-box__hint { font-size: .76rem; color: var(--muted); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel__head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.panel__head h2 { font-size: .98rem; margin: 0; }
.panel__body { padding: 1.25rem; }
.panel__body--flush { padding: 0; }
.table-wrap--flush { border: 0; border-radius: 0; }
.panel__head--toggle { cursor: pointer; list-style: none; }
.panel__head--toggle::-webkit-details-marker { display: none; }
.input--slug { max-width: 180px; }
.input--order { max-width: 90px; }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.toolbar form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.toolbar input[type="search"], .toolbar select { width: auto; min-width: 170px; padding: .45rem .65rem; font-size: .84rem; }

.table-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.table-actions form { display: inline; }
.btn-icon {
    display: inline-grid; place-items: center; width: 30px; height: 30px;
    border-radius: var(--radius-s); border: 1px solid var(--line);
    background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; font-size: .78rem;
}
.btn-icon:hover { border-color: var(--crimson); color: var(--crimson); }
.btn-icon--danger:hover { border-color: var(--danger); color: var(--danger); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.form-actions { display: flex; gap: .6rem; align-items: center; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; align-items: start; }
.help-text { font-size: .78rem; color: var(--muted); margin-top: .3rem; }

.detail-list { display: grid; grid-template-columns: 170px 1fr; gap: .6rem 1rem; font-size: .885rem; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; color: var(--ink); }
.message-box {
    background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-s);
    padding: 1rem; font-size: .9rem; white-space: pre-wrap; word-break: break-word;
}

/* --- Halaman login -------------------------------------------------------- */
.auth-body {
    min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
    background:
        radial-gradient(900px 420px at 12% 0%, rgba(179, 18, 47, .12), transparent 60%),
        radial-gradient(700px 380px at 92% 100%, rgba(11, 111, 164, .14), transparent 62%),
        var(--canvas);
}
.auth-card {
    width: min(100%, 410px); background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius-l);
    box-shadow: var(--shadow); padding: 2rem;
}
.auth-head { text-align: center; margin-bottom: 1.75rem; }
.auth-head__mark {
    width: 48px; height: 48px; border-radius: 12px; background: var(--crimson); color: #fff;
    display: grid; place-items: center; margin: 0 auto .9rem; font-weight: 800; letter-spacing: .02em;
}
.auth-head h1 { font-size: 1.2rem; margin-bottom: .3rem; }
.auth-head p { font-size: .82rem; color: var(--muted); margin: 0; }
.auth-foot { text-align: center; margin-top: 1.25rem; font-size: .78rem; color: var(--muted); }

@media (max-width: 1024px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; gap: 1rem; }
    .admin-nav { flex-direction: row; gap: .25rem; }
    .admin-nav__group { display: none; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .detail-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .search-mini { display: none; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .admin-content { padding: 1rem; }
}

/* ==========================================================================
   Template modern: irisan miring, garis teknis, sudut terpotong
   ========================================================================== */

/* Label kecil bergaya teknis. */
.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--mono); font-size: .71rem; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--crimson); background: var(--crimson-soft);
    border: 1px solid rgba(179, 18, 47, .16);
    padding: .34rem .7rem; border-radius: 3px; margin-bottom: 1.1rem;
}
.eyebrow::before {
    content: ""; width: 6px; height: 6px; background: currentColor;
    transform: rotate(45deg); flex-shrink: 0;
}

h1, h2 { text-wrap: balance; }

.section-head__eyebrow {
    font-family: var(--mono); letter-spacing: .14em;
    display: flex; align-items: center; gap: .55rem;
}
.section-head__eyebrow::before {
    content: ""; width: 24px; height: 2px; background: var(--crimson);
    clip-path: polygon(0 100%, 30% 0, 100% 0, 70% 100%);
    flex-shrink: 0;
}

/* Semua section mengikuti irisan tajam yang sama, arahnya berselang-seling
   agar membentuk zig-zag. Padding atas ditambah setebal irisan supaya konten
   tidak pernah terpotong di sudut. */
.section {
    position: relative;
    clip-path: polygon(0 var(--cut), 100% 0, 100% 100%, 0 100%);
    padding-top: calc(clamp(2.5rem, 1.5rem + 3vw, 4.5rem) + var(--cut));
}
main > .section:nth-of-type(even) {
    clip-path: polygon(0 0, 100% var(--cut), 100% 100%, 0 100%);
}
.section--surface { border-block: 0; }

/* Kartu: sudut kanan-atas terpotong miring. */
.card {
    position: relative;
    border-radius: 4px;
    box-shadow: none;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}
.card--link:hover { background: #fcfdfe; }

/* Kepala halaman dengan tepi bawah miring. */
.page-head {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
    border-bottom: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%);
    padding-bottom: calc(clamp(1.25rem, .9rem + .8vw, 1.75rem) + var(--cut));
}

/* Section pertama di bawah judul halaman tidak perlu irisan kedua dan jarak
   besar: tanpa aturan ini judul dan isi terpisah ±190px di layar lebar karena
   padding section + potongan diagonal bertumpuk. */
main > .page-head + .section,
main > .page-head + .section--tight {
    clip-path: none;
    padding-top: clamp(1.25rem, 1rem + 1vw, 1.9rem);
}

/* Halaman konten: pita judul rata (tanpa irisan) dan jarak rapat ke isi. */
main > .page-head {
    clip-path: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: clamp(.9rem, .7rem + .6vw, 1.25rem);
}
main > .page-head + .section,
main > .page-head + .section--tight {
    clip-path: none;
    padding-top: clamp(.85rem, .7rem + .6vw, 1.25rem);
}

/* --- Bagikan halaman ------------------------------------------------------- */
.share { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.share__title {
    margin: 0 0 .65rem; font-size: .72rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.share__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.share__btn {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 4px;
    background: var(--surface); color: var(--text);
    font-size: .82rem; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.share__btn:hover, .share__btn:focus-visible { border-color: var(--line-strong); color: var(--ink); }
.share__btn i { font-size: .9rem; color: var(--muted); }
.share__btn:hover i { color: var(--ink); }
.share__status { font-size: .78rem; color: var(--ok); }

/* Panel ajakan dengan irisan di tepi bawah saja agar teks tidak terpotong. */
.cta {
    position: relative; overflow: hidden; border-radius: 4px;
    background: linear-gradient(140deg, #0c1b29 0%, #102736 58%, #0a1725 100%);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%);
    padding-bottom: calc(clamp(1.75rem, 1rem + 3vw, 3rem) + var(--cut) * .5);
}
.cta::before {
    content: ""; position: absolute; right: 0; top: 0; width: 46%; height: 100%;
    background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 16px);
    pointer-events: none;
}
.cta > * { position: relative; }

/* Footer dengan irisan atas yang mengikuti sudut yang sama. */
.site-footer {
    position: relative;
    margin-top: 3.5rem;
    clip-path: polygon(0 var(--cut), 100% 0, 100% 100%, 0 100%);
    padding-top: calc(var(--cut) + .5rem);
}

/* Navigasi & tombol: sudut lebih tegas. */
.brand__mark { border-radius: 4px; }
.nav > a, .nav-dd > summary { border-radius: 4px; }
.nav .is-active { position: relative; }
.nav .is-active::before {
    content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .3rem;
    height: 2px; background: var(--crimson);
    clip-path: polygon(0 100%, 7% 0, 100% 0, 93% 100%);
}
.btn { border-radius: 4px; }
.table-wrap, .form-card, .panel { border-radius: 4px; }
.pagination a, .pagination span { border-radius: 3px; }

/* --- Slider hero: penyesuaian layar kecil --------------------------------- */
@media (max-width: 860px) {
    .hero {
        padding-bottom: 3.5rem;
    }
    .hero__grid { grid-template-columns: 1fr; gap: 1.75rem; padding-block: 2.25rem 0; }
    .stat-card { order: 0; }
    .hero__foot { margin-top: 1.25rem; }
}

@media (max-width: 560px) {
    .hero__dot { width: 22px; }
    .hero__dot.is-active { width: 32px; }
    .hero__counter { font-size: .72rem; }
}

/* --- Animasi: sapuan diagonal slider & muncul saat scroll ------------------ */

/* Slide masuk menyapu dari sisi kanan dengan tepi miring, mengikuti sudut
   irisan yang sama dengan blok lain. */
.hero__slide.is-active {
    animation: hero-sweep .58s cubic-bezier(.22, .61, .36, 1) both;
}

@keyframes hero-sweep {
    from { clip-path: polygon(100% -14%, 134% 0, 114% 100%, 80% 114%); }
    to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}

/* Muncul perlahan saat elemen masuk viewport. Kelas dipasang oleh JS hanya
   untuk elemen yang belum terlihat, jadi tidak ada konten yang berkedip.
   Transisi baru diaktifkan pada frame berikutnya (is-ready) agar elemen
   tersembunyi seketika, bukan berkedip lalu memudar. */
.reveal {
    opacity: 0;
    transform: translateY(22px);
}

.reveal.is-ready {
    transition:
        opacity .5s ease,
        transform .65s cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .hero__slide.is-active { animation: none; }
    .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .card--link:hover { transform: none; }
    .hero__slide { transition: none; }
}

/* ==========================================================================
   Editor teks kaya (panel pengelola)
   ========================================================================== */
.editor {
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface); overflow: hidden;
}
.editor__bar {
    display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem;
    border-bottom: 1px solid var(--line); background: var(--canvas);
}
.editor__btn {
    width: 32px; height: 30px; display: grid; place-items: center;
    border: 1px solid transparent; border-radius: var(--radius-xs);
    background: transparent; color: var(--text); cursor: pointer; font-size: .85rem;
}
.editor__btn:hover { background: var(--surface); border-color: var(--line); color: var(--crimson); }
.editor__btn:focus-visible { outline: 2px solid var(--crimson); outline-offset: 1px; }
.editor__area {
    min-height: 320px; max-height: 60vh; overflow: auto;
    padding: 1rem 1.1rem; outline: none;
}
.editor__area:focus { box-shadow: inset 0 0 0 2px rgba(11, 111, 164, .18); }
.editor__area > *:first-child { margin-top: 0; }
.editor__input { display: none; }
.editor__select {
    height: 30px; padding: 0 .4rem; border: 1px solid var(--line);
    border-radius: var(--radius-xs); background: var(--surface);
    color: var(--text); font-family: inherit; font-size: .78rem; cursor: pointer;
}
.editor__color {
    width: 30px; height: 30px; padding: 0; border: 1px solid var(--line);
    border-radius: var(--radius-xs); background: var(--surface); cursor: pointer;
}
.editor__source {
    display: block; width: 100%; min-height: 320px; padding: 1rem 1.1rem;
    border: 0; border-top: 1px solid var(--line); background: var(--canvas);
    color: var(--ink); font-family: var(--mono); font-size: .8rem;
    line-height: 1.55; resize: vertical;
}

/* Galeri di panel */
.admin-gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem;
}
.admin-gallery__item {
    margin: 0; display: flex; flex-direction: column;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--canvas); overflow: hidden;
}
.admin-gallery__item img {
    width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block;
}
.admin-gallery__item figcaption {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .55rem .7rem; font-size: .82rem; color: var(--ink);
}
.admin-gallery__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-gallery__actions { display: flex; gap: .35rem; padding: 0 .7rem .7rem; margin-top: auto; }
.admin-gallery__actions form { flex: 1; }
.admin-gallery__actions .btn { width: 100%; }

/* --- Halaman Operasional --------------------------------------------------- */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.check-item { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; font-size: .875rem; }
.check-item__detail { display: block; color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.ops-num { text-align: right; font-variant-numeric: tabular-nums; }
.log-tail {
    margin: .75rem 0 0; padding: .7rem .85rem; max-height: 9rem; overflow: auto;
    background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-s);
    font-size: .72rem; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-all;
}

/* --- Filter log aktivitas -------------------------------------------------- */
.filter-bar {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .75rem; align-items: end;
}
.filter-bar .field { margin: 0; }
.filter-bar__actions { display: flex; gap: .5rem; }

/* --- Grafik statistik publik ---------------------------------------------- */
.charts-grid { align-items: stretch; }
.chart-card {
    display: flex; flex-direction: column; gap: 1.1rem; margin: 0; padding: 1.4rem 1.5rem;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.chart-card__head h3 { margin: 0; font-size: 1.02rem; letter-spacing: -.01em; }
.chart-card__meta { margin: .25rem 0 0; font-size: .8rem; color: var(--muted); }
.chart-empty { margin: 0; font-size: .86rem; color: var(--muted); }

.donut-wrap { display: grid; grid-template-columns: minmax(130px, 168px) 1fr; gap: 1.4rem; align-items: center; }
.donut { width: 100%; height: auto; display: block; }
.donut-track, .donut-slice { fill: none; stroke-width: 14; }
.donut-track { stroke: var(--line); }
.donut-slice { transform: rotate(-90deg); transform-origin: 60px 60px; }
.donut-slice--1 { stroke: var(--crimson); }
.donut-slice--2 { stroke: var(--blue); }
.donut-slice--3 { stroke: var(--ok); }
.donut-slice--4 { stroke: var(--warn); }
.donut-slice--5 { stroke: #5d6a76; }
.donut-total { font-size: 13px; font-weight: 700; fill: var(--ink); }
.donut-total-label { font-size: 4.6px; letter-spacing: .14em; fill: var(--muted); font-weight: 650; }

.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.donut-legend li { display: grid; grid-template-columns: auto 1fr auto auto; gap: .55rem; align-items: center; font-size: .85rem; }
.legend-dot { width: .55rem; height: .55rem; border-radius: 2px; display: inline-block; }
.legend-dot--1 { background: var(--crimson); }
.legend-dot--2 { background: var(--blue); }
.legend-dot--3 { background: var(--ok); }
.legend-dot--4 { background: var(--warn); }
.legend-dot--5 { background: #5d6a76; }
.donut-legend__name { color: var(--text); }
.donut-legend__value { font-weight: 650; color: var(--ink); }
.donut-legend__pct { font-size: .76rem; color: var(--muted); min-width: 2.4rem; text-align: right; }

.bars-chart { width: 100%; height: auto; display: block; }
.bars-baseline { stroke: var(--line); stroke-width: 1; }
.bars-bar { fill: var(--crimson); }
.bars-bar--empty { fill: var(--line-strong); }
.bars-value { font-size: 9px; font-weight: 600; fill: var(--ink); text-anchor: middle; }
.bars-label { font-size: 9px; fill: var(--muted); text-anchor: middle; }

@media (max-width: 640px) {
    .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
    .donut { max-width: 190px; }
    .donut-legend { width: 100%; }
}

/* --- Grafik dashboard ---------------------------------------------------- */
/* Tinggi/lebar batang dikirim lewat <style nonce> dari view; aturan di sini
   hanya mengatur bentuk, warna, dan jarak. */
.chart { display: flex; align-items: flex-end; gap: .5rem; height: 190px; }
.chart__col {
    flex: 1; height: 100%; display: flex; flex-direction: column;
    justify-content: flex-end; align-items: center; gap: .35rem; min-width: 0;
}
.chart__bar {
    width: 100%; max-width: 34px; min-height: 2px;
    border-radius: 4px 4px 0 0; background: var(--crimson);
}
.chart__bar-wrap { flex: 1; width: 100%; min-height: 0; display: flex; align-items: flex-end; justify-content: center; }
.chart__value { font-size: .72rem; font-weight: 600; color: var(--ink); }
.chart__label {
    font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}

.chart-h { display: grid; gap: .7rem; }
.chart-h__row {
    display: grid; grid-template-columns: minmax(84px, 34%) 1fr auto;
    align-items: center; gap: .65rem; font-size: .82rem;
}
.chart-h__label { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-h__track { display: block; background: var(--line); border-radius: 999px; height: 10px; overflow: hidden; }
.chart-h__fill { display: block; height: 100%; border-radius: 999px; background: var(--crimson); }
.chart-h__value { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .78rem; }

@media (max-width: 640px) {
    .chart { height: 150px; gap: .3rem; }
    .chart-h__row { grid-template-columns: minmax(70px, 45%) 1fr auto; }
}

/* --- Aksesibilitas & suara sambutan --------------------------------------- */
/* Cincin fokus konsisten untuk semua elemen interaktif. */
:focus-visible {
    outline: 2px solid var(--crimson);
    outline-offset: 2px;
}

/* Kontrol jeda slider (WCAG 2.2.2 — konten bergerak harus bisa dihentikan). */
.hero__pause {
    width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
    display: grid; place-items: center; font-size: .7rem;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .2); color: #fff;
}
.hero__pause:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .42); }
.hero__pause:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Tombol suara sambutan: play/jeda, tidak autoplay. */
.hero__voice { display: flex; align-items: center; gap: .5rem; }
.hero__voice-btn {
    display: inline-flex; align-items: center; gap: .45rem;
    min-height: 34px; padding: .3rem .75rem;
    border-radius: 999px; cursor: pointer;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22);
    color: #fff; font-size: .78rem;
}
.hero__voice-btn:hover { background: rgba(255, 255, 255, .16); }
.hero__voice-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Penghitung digeser ke kanan agar kontrol tetap berkumpul di kiri. */
.hero__foot .hero__counter { margin-left: auto; }

/* Target sentuh minimal 40px untuk tombol berbagi. */
.share__btn { min-height: 40px; }

@media (max-width: 720px) {
    .hero__foot { flex-wrap: wrap; }
    .hero__foot .hero__counter { margin-left: 0; }
    .hero__voice { width: 100%; }
}

/* Hormati preferensi pengurangan gerak. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
