/* DigiDes — © Serenity Creativa 2026 */
:root {
  --bg: #f5f4ef; --surface: #ffffff; --surface-2: #f0efe9; --line: #e3e1d8;
  --ink: #1b2422; --ink-2: #4a5552; --muted: #7a8481;
  --primary: #0f766e; --primary-ink: #ffffff; --primary-soft: #e3f1ef; --primary-dark: #0b5952;
  --accent: #c98a16; --accent-soft: #fbf1dc;
  --wa: #128c4a; --wa-soft: #e5f6ec;
  --danger: #c0392b; --danger-soft: #fbe9e7;
  --ok: #18794e; --ok-soft: #e6f4ec;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 30, 28, .05), 0 6px 20px rgba(20, 30, 28, .06);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111615; --surface: #19201f; --surface-2: #212a28; --line: #2c3634;
    --ink: #e8eeec; --ink-2: #b9c4c1; --muted: #8a9693;
    --primary: #2bb3a5; --primary-ink: #04231f; --primary-soft: #16332f; --primary-dark: #4fd0c2;
    --accent: #e7b24c; --accent-soft: #3a2f17; --wa: #2fc46c; --wa-soft: #163323;
    --danger: #ef6b5b; --danger-soft: #3b1d1a; --ok: #3fcf85; --ok-soft: #173326;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55; }
body.no-scroll { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; } h3 { font-size: 1.05rem; font-weight: 700; } h4 { font-size: .98rem; }
p { margin: 0 0 .6em; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.muted { color: var(--muted); } .small { font-size: .84rem; } .center { text-align: center; }
.danger-text { color: var(--danger); } .err { color: var(--danger); font-size: .9rem; min-height: 1.2em; margin: .4em 0 0; }
.spacer { flex: 1; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; padding: .62em 1.05em; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; background: var(--surface-2); color: var(--ink); white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger.btn-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(.95); }
.btn-sm { padding: .42em .75em; font-size: .84rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 1.1rem; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.icon-btn.on { color: var(--accent); }
.icon-btn:disabled { opacity: .3; pointer-events: none; }
.link { font-weight: 600; font-size: .9rem; }

/* Forms */
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6em .75em; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
input[readonly] { background: var(--surface-2); }
.field { display: flex; flex-direction: column; gap: .35em; margin: 0; }
.field > span { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.field.invalid input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-stack { display: grid; gap: 12px; }
.input-group { display: flex; gap: 6px; align-items: stretch; }
.input-group > input { flex: 1; }
.input-group .btn { padding-inline: .75em; }
.addon { display: grid; place-items: center; padding: 0 .7em; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); }
.check { display: flex; align-items: center; gap: .55em; font-size: .92rem; cursor: pointer; margin: .35em 0; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.fieldset { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: visible; }
.fieldset > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.fieldset > summary::after { content: '▾'; color: var(--muted); transition: transform .2s; }
.fieldset:not([open]) > summary::after { transform: rotate(-90deg); }
.fieldset > .form-grid, .fieldset > ol { padding: 4px 18px 18px; }
.fieldset > .wa-preview { margin: 4px 18px 18px; }
.form-page { max-width: 1100px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 0; margin-top: 8px; background: linear-gradient(transparent, var(--bg) 30%); }

/* Autocomplete */
.ac-wrap { position: relative; width: 100%; }
.ac-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 280px; overflow-y: auto; display: none; padding: 4px; }
.ac-list.open { display: block; }
.ac-item { padding: .5em .65em; border-radius: 7px; cursor: pointer; display: flex; flex-direction: column; font-size: .92rem; }
.ac-item small { color: var(--muted); font-size: .78rem; }
.ac-item.active, .ac-item:hover { background: var(--primary-soft); }
.ac-item mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.ac-empty, .ac-more { padding: .55em .65em; color: var(--muted); font-size: .84rem; }

/* Badges & chips */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--primary-soft); color: var(--primary-dark); }
.badge .ic { width: .95em; height: .95em; }
.badge-warn { background: var(--accent-soft); color: var(--accent); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.chip { padding: .38em .85em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.chip.active, .chip:hover { background: var(--primary-soft); border-color: transparent; color: var(--primary-dark); }
.chip-check input { display: none; }
.chip-check span { display: inline-block; padding: .38em .85em; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; cursor: pointer; background: var(--surface); }
.chip-check input:checked + span { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

/* Panels, cards */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel h3 { display: flex; align-items: center; gap: .45em; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.panel-grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.panel-grid .panel { margin: 0; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); display: flex; gap: 10px; align-items: center; justify-content: center; }
.callout { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--accent-soft); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.callout > .ic { width: 26px; height: 26px; color: var(--accent); }
.callout > div { flex: 1; min-width: 200px; } .callout p { margin: 0; }
.callout.ok { background: var(--ok-soft); } .callout.ok > .ic { color: var(--ok); }
.small-callout { padding: 10px 14px; margin: 12px 0 0; font-size: .86rem; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.detail { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: 6px 14px; margin: 0 0 8px; font-size: .92rem; }
.detail dt { color: var(--muted); } .detail dd { margin: 0; font-weight: 500; word-break: break-word; }
.detail-h { margin: 18px 0 8px; color: var(--primary); font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.steps { padding-left: 1.2em; } .steps li { margin-bottom: .4em; }

/* Splash & spinner */
.splash { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 22px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.spinner.sm { width: 15px; height: 15px; border-width: 2px; border-color: rgba(255,255,255,.4); border-top-color: currentColor; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo-mark { width: 40px; height: 40px; border-radius: 11px; overflow: hidden; flex: none; background: var(--primary-soft); display: grid; place-items: center; }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.logo-mark.big { width: 76px; height: 76px; border-radius: 20px; margin: 0 auto 10px; }

/* Toast & modal */
#toasts { position: fixed; z-index: 200; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; justify-content: space-between; opacity: 0; transform: translateY(10px); transition: .25s; font-size: .92rem; }
.toast.show { opacity: 1; transform: none; }
.toast-success { border-left: 4px solid var(--ok); } .toast-error { border-left: 4px solid var(--danger); } .toast-info { border-left: 4px solid var(--primary); }
.toast-action { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 8px; padding: 4px 10px; font: inherit; font-weight: 700; cursor: pointer; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(10, 18, 16, .45); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .18s; }
.modal-backdrop.show { opacity: 1; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-sm { max-width: 420px; } .modal-md { max-width: 600px; } .modal-lg { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); }

/* ===== Public ===== */
.pub-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.pub-header-inner { max-width: 1180px; margin: auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text b { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-nav { display: flex; gap: 4px; align-items: center; }
.pub-nav > a:not(.btn) { padding: .5em .8em; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.pub-nav > a.active, .pub-nav > a:not(.btn):hover { background: var(--surface-2); color: var(--ink); }
.pub-main { max-width: 1180px; margin: auto; padding: 24px 20px 40px; }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; padding: 36px; border-radius: 24px; background: radial-gradient(1200px 400px at 0% 0%, color-mix(in srgb, var(--primary) 22%, transparent), transparent), var(--surface); border: 1px solid var(--line); margin-bottom: 32px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.hero p { color: var(--ink-2); max-width: 56ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hstat { background: var(--bg); border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line); }
.hstat:first-child { grid-column: 1 / -1; background: var(--primary); color: var(--primary-ink); border: 0; }
.hstat b { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.hstat span { font-size: .82rem; opacity: .8; }
.section { margin-bottom: 36px; }
.section.narrow { max-width: 760px; margin-inline: auto; }
.section-head { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin: 0; display: flex; gap: .45em; align-items: center; flex: 1; }
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ig-card { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); color: #fff; }
.ig-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ig-card:hover img { transform: scale(1.04); }
.ig-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.ig-cap { position: absolute; inset: auto 0 0; padding: 30px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-size: .8rem; opacity: 0; transition: opacity .25s; }
.ig-card:hover .ig-cap, .ig-card:focus .ig-cap { opacity: 1; }
.ig-cap p { margin: 0 0 2px; } .ig-cap small { opacity: .8; }
.ig-badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 999px; font-size: .72rem; }
@media (hover: none) { .ig-cap { opacity: 1; } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.info-img img { aspect-ratio: 16/9; width: 100%; object-fit: cover; }
.info-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.info-body h3 { margin: 8px 0 4px; } .info-body h3 a { color: var(--ink); }
.info-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.excerpt { color: var(--ink-2); font-size: .92rem; flex: 1; }
.info-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.agenda { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.agenda-item { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--ink); }
.agenda-item h4 { margin: 0; }
.agenda-date { width: 56px; height: 56px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; align-content: center; line-height: 1; }
.agenda-date b { font-size: 1.35rem; } .agenda-date span { font-size: .72rem; text-transform: uppercase; font-weight: 700; }
.article h1 { margin-top: 12px; }
.article-img { border-radius: var(--radius); margin: 16px 0; width: 100%; }
.article-body { font-size: 1.02rem; line-height: 1.75; margin: 16px 0 24px; }
.event-box { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); margin: 12px 0; font-weight: 600; }
.event-box span { display: flex; gap: 6px; align-items: center; }
.pub-footer { border-top: 1px solid var(--line); background: var(--surface); }
.pub-footer-inner { max-width: 1180px; margin: auto; padding: 24px 20px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pub-footer p { margin: .2em 0; }
.footer-right { text-align: right; }

/* ===== Login ===== */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 50% -10%, color-mix(in srgb, var(--primary) 25%, transparent), transparent), var(--bg); }
.login-card { width: min(400px, 100%); background: var(--surface); padding: 30px 28px; border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); text-align: center; display: grid; gap: 12px; }
.login-card h1 { font-size: 1.5rem; margin: 0; }
.login-card .field { text-align: left; }
.login-links { display: flex; justify-content: space-between; font-size: .88rem; }

/* ===== Admin ===== */
.admin { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px; gap: 10px; }
.sidebar .brand { padding: 6px 6px 12px; border-bottom: 1px solid var(--line); }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a, .side-foot a, .side-foot button { display: flex; align-items: center; gap: 11px; padding: .62em .8em; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .92rem; background: none; border: 0; font-family: inherit; cursor: pointer; text-align: left; width: 100%; }
.side-nav a:hover, .side-foot a:hover, .side-foot button:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a.active { background: var(--primary-soft); color: var(--primary-dark); }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; }
.side-foot p { padding: 6px .8em 0; margin: 0; }
.admin-body { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h2 { margin: 0; flex: 1; font-size: 1.15rem; }
.topbar-right { display: flex; gap: 10px; align-items: center; }
#nav-toggle { display: none; }
.admin-main { padding: 22px 24px 40px; flex: 1; }
.admin-footer { padding: 14px 24px; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); }
.nav-scrim { display: none; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow); }
.stat-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.stat-label { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; }
.stat-val { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: .86rem; }
.bar-row[data-link] { cursor: pointer; border-radius: 6px; } .bar-row[data-link]:hover .bar-label { color: var(--primary); }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.bar-val { font-weight: 700; min-width: 64px; text-align: right; } .bar-val small { color: var(--muted); font-weight: 500; margin-left: 5px; }
.mini-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar select { width: auto; min-width: 140px; }
.toolbar .w-value-wrap { min-width: 200px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search > .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 36px; }
.bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--primary-soft); padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface-2); padding: 10px 12px; white-space: nowrap; }
.table td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.table.small td, .table.small th { padding: 6px 9px; font-size: .8rem; white-space: nowrap; }
.table tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.table .chk { width: 36px; } .table .chk input { width: 16px; height: 16px; accent-color: var(--primary); }
.actions-col { white-space: nowrap; text-align: right; }
.name-cell { display: flex; flex-direction: column; color: var(--ink); } .name-cell small { color: var(--muted); font-size: .78rem; }
.wa-link { display: inline-flex; align-items: center; gap: 5px; color: var(--wa); font-weight: 600; white-space: nowrap; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 14px; font-size: .9rem; }
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.progress span { display: block; height: 100%; background: var(--primary); transition: width .3s; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; text-align: center; background: var(--bg); transition: .15s; }
.dropzone .ic { width: 34px; height: 34px; color: var(--primary); }
.dropzone.over, .dropzone:hover { border-color: var(--primary); background: var(--primary-soft); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin: 12px 0 18px; }
.map-item { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: .82rem; }
.map-item span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-item.ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: var(--ok-soft); }
.map-item select { padding: .4em .5em; font-size: .84rem; }
.dusun-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.dusun-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.dusun-head { display: flex; justify-content: space-between; align-items: center; }
.dusun-head h3 { margin: 0; }
.kadus { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.dusun-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; font-size: .78rem; color: var(--muted); }
.dusun-stats b { display: block; font-size: 1.15rem; color: var(--ink); }
.dusun-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.master { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start; }
.master-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow-y: auto; }
.ms-group { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.ms-group small { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .7rem; letter-spacing: .05em; padding: 0 8px 4px; }
.ms-group button[data-k] { display: flex; justify-content: space-between; gap: 8px; background: none; border: 0; padding: .45em .6em; border-radius: 8px; font: inherit; font-size: .88rem; color: var(--ink-2); cursor: pointer; text-align: left; }
.ms-group button[data-k] span { color: var(--muted); font-size: .78rem; }
.ms-group button[data-k]:hover { background: var(--surface-2); }
.ms-group button.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.master-main { margin: 0; }
.master-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
#ms-add { margin: 10px 0; }
.ms-items { list-style: none; margin: 12px 0 0; padding: 0; }
.ms-items li { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.ms-val { flex: 1; font-weight: 500; }
.col-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 10px 0 16px; max-height: 340px; overflow-y: auto; padding: 12px; background: var(--bg); border-radius: 10px; }
.col-picker b { display: block; font-size: .8rem; color: var(--primary); margin-bottom: 4px; }
.col-picker .check { font-size: .86rem; margin: .2em 0; }
.info-admin { display: grid; gap: 10px; }
.info-row { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.info-row img, .info-ph { width: 84px; height: 64px; border-radius: 9px; object-fit: cover; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.info-row-main { flex: 1; min-width: 0; } .info-row-main h4 { margin: 4px 0 0; }
.info-row-actions { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.img-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.img-pick img { width: 120px; height: 80px; object-fit: cover; border-radius: 9px; }
#logo-prev img { width: 64px; height: 64px; }
.wa-preview { background: #dcf8c6; color: #111; padding: 12px 14px; border-radius: 12px 12px 12px 3px; font-size: .9rem; max-width: 520px; box-shadow: 0 1px 1px rgba(0,0,0,.12); }
@media (prefers-color-scheme: dark) { .wa-preview { background: #005c4b; color: #e9edef; } }
.bc { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.bc .panel { margin: 0; }
.bc-list { list-style: none; padding: 0; margin: 10px 0 0; max-height: 520px; overflow-y: auto; }
.bc-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.bc-list li div { display: flex; flex-direction: column; min-width: 0; } .bc-list small { color: var(--muted); font-size: .78rem; }
.bc-list li.done { opacity: .6; }
.ig-grid.admin { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.ig-admin { position: relative; }
.ig-admin.is-hidden .ig-card { opacity: .35; filter: grayscale(1); }
.ig-tools { display: flex; justify-content: center; gap: 2px; margin-top: 4px; }

/* Responsive */
@media (max-width: 960px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.35); }
  #nav-toggle { display: inline-grid; }
  .master { grid-template-columns: 1fr; } .master-side { position: static; max-height: none; }
  .bc { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding: 24px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .admin-main, .pub-main { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .hide-sm { display: none; }
  .pub-header-inner { padding: 8px 16px; }
  .brand-text small { display: none; }
  .pub-nav > a:not(.btn) { padding: .45em .5em; font-size: .85rem; }
  .pub-nav .btn { padding: .42em .6em; }
  .toolbar select, .toolbar .w-value-wrap { flex: 1 1 45%; min-width: 0; }
  .info-row { flex-wrap: wrap; } .info-row-actions { width: 100%; justify-content: flex-start; }
  .detail { grid-template-columns: 1fr; gap: 0 0; } .detail dd { margin-bottom: 8px; }
  .footer-right { text-align: left; }
  .modal { border-radius: 16px; }
}
@media print { .sidebar, .topbar, .toolbar, .admin-footer { display: none; } .admin { display: block; } }

/* ===== v2.0 ===== */
.tiny { font-size: .74rem; } .nowrap { white-space: nowrap; }
.copyright { cursor: default; user-select: none; }
/* Dropdown menu publik */
.dropdown { position: relative; }
.dropdown-btn { display: inline-flex; align-items: center; gap: 4px; padding: .5em .8em; border-radius: 9px; border: 0; background: none; color: var(--ink-2); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; }
.dropdown-btn .ic { width: 1em; height: 1em; transition: transform .2s; }
.dropdown.open .dropdown-btn .ic { transform: rotate(180deg); }
.dropdown.active .dropdown-btn, .dropdown-btn:hover { background: var(--surface-2); color: var(--ink); }
.dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: none; z-index: 40; }
.dropdown.open .dropdown-menu { display: grid; }
@media (hover: hover) and (min-width: 861px) { .dropdown:hover .dropdown-menu { display: grid; } .dropdown:hover .dropdown-btn .ic { transform: rotate(180deg); } }
.dropdown-menu a { display: flex; gap: 10px; align-items: center; padding: .55em .7em; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.dropdown-menu a:hover, .dropdown-menu a.active { background: var(--primary-soft); color: var(--primary-dark); }
.pubnav-toggle { display: none; }
@media (max-width: 860px) {
  .pubnav-toggle { display: inline-grid; }
  .pub-nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; box-shadow: var(--shadow); display: none; }
  body.pubnav-open .pub-nav { display: flex; }
  .pub-nav > a:not(.btn), .dropdown-btn { padding: .7em .6em; width: 100%; justify-content: space-between; font-size: .95rem; }
  .dropdown-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 10px; min-width: 0; }
  .pub-header-inner { position: relative; }
}
/* Beranda 3 kolom */
.home-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.home-left, .home-right { position: sticky; top: 76px; }
.home-center .section:first-child { margin-top: 0; }
.home-center .cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.home-center .ig-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 1180px) { .home-grid { grid-template-columns: 250px minmax(0, 1fr); } .home-right { grid-column: 1 / -1; position: static; } }
@media (max-width: 760px) { .home-grid { grid-template-columns: 1fr; } .home-left { position: static; } }
.side-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 18px; }
.sp-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.sp-head > .ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.sp-head b { display: block; } .sp-head small { color: var(--muted); font-size: .78rem; }
.sp-date { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--line); }
.sp-date small { color: var(--accent); font-weight: 600; }
.sp-next { background: var(--primary); color: var(--primary-ink); border-radius: 12px; padding: 10px 14px; margin: 6px 0 10px; display: flex; flex-direction: column; }
.sp-next small { opacity: .85; font-size: .78rem; } .sp-next b { font-size: 1.25rem; }
.sp-times { list-style: none; margin: 0 0 8px; padding: 0; }
.sp-times li { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 9px; font-size: .92rem; }
.sp-times li b { font-variant-numeric: tabular-nums; }
.sp-times li:nth-child(odd) { background: var(--bg); }
.sp-times li.next { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.sp-times li.now span::after { content: ' • sekarang'; font-size: .72rem; color: var(--primary); }
.kg-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 6px; }
.kg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.kg-list li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: .88rem; }
.kg-list li.today { background: var(--primary-soft); border-left: 3px solid var(--primary); }
.kg-list b { display: block; line-height: 1.3; } .kg-list small { display: block; color: var(--muted); font-size: .76rem; }
.kg-time { font-weight: 700; color: var(--primary); font-size: .8rem; }
/* Insight & kualitas data */
.insight-list { display: grid; gap: 8px; }
.insight { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--primary-soft); font-size: .9rem; }
.insight .ic { color: var(--primary); margin-top: 2px; } .insight p { margin: 0; }
.insight.warn { background: var(--accent-soft); } .insight.warn .ic { color: var(--accent); }
.insight[data-link], .dq-row[data-link] { cursor: pointer; }
.home-center .insight-list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.dq { display: grid; gap: 6px; }
.dq-row { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 9px; background: var(--bg); font-size: .9rem; }
.dq-row b { min-width: 44px; text-align: right; color: var(--danger); font-size: 1.05rem; }
/* Halaman profil */
.page-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.page-nav { position: sticky; top: 76px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.page-nav a { display: flex; gap: 9px; align-items: center; padding: .55em .7em; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.page-nav a.active, .page-nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.page-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
@media (max-width: 860px) { .page-layout { grid-template-columns: 1fr; } .page-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } .page-body { padding: 18px; } }
.profile-dl { max-width: 620px; margin-top: 16px; }
.visi { background: var(--primary); color: var(--primary-ink); border-radius: var(--radius); padding: 20px 24px; margin: 12px 0 20px; }
.visi small { font-weight: 800; letter-spacing: .12em; opacity: .8; } .visi p { font-size: 1.15rem; font-weight: 600; margin: 6px 0 0; }
.misi { display: grid; gap: 8px; padding-left: 1.3em; } .misi li { padding-left: 4px; }
.motto { font-style: italic; color: var(--ink-2); margin-top: 18px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 10px; }
.person { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.person img, .avatar.lg { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; margin-bottom: 4px; }
.person small { color: var(--muted); font-size: .8rem; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-weight: 800; flex: none; }
.avatar.lg { font-size: 1.6rem; }
.layanan .fieldset { margin-bottom: 8px; } .pad { padding: 0 18px 14px; } .pad ul { margin: 6px 0 10px; padding-left: 1.2em; }
.map { width: 100%; height: 340px; border: 0; border-radius: var(--radius); margin-top: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; align-content: flex-start; max-width: 380px; font-size: .88rem; }
/* Piramida */
.pyramid { display: grid; gap: 3px; font-size: .78rem; }
.pyr-head, .pyr-row { display: grid; grid-template-columns: 1fr 54px 1fr; align-items: center; gap: 6px; }
.pyr-head { font-weight: 700; color: var(--muted); } .pyr-head span:first-child { text-align: right; }
.pyr-l, .pyr-p { position: relative; height: 16px; display: flex; align-items: center; }
.pyr-l { justify-content: flex-end; } .pyr-l i, .pyr-p i { display: block; height: 100%; border-radius: 4px; }
.pyr-l i { background: var(--primary); } .pyr-p i { background: var(--accent); }
.pyr-l b { margin-right: 4px; order: -1; font-weight: 600; color: var(--muted); } .pyr-p b { margin-left: 4px; font-weight: 600; color: var(--muted); }
.pyr-g { text-align: center; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* Admin */
.me { display: flex; gap: 10px; align-items: center; padding: 6px 8px 12px; border-bottom: 1px solid var(--line); }
.me b { display: block; font-size: .9rem; line-height: 1.2; } .me small { display: block; }
.nav-group { display: block; color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .7rem; letter-spacing: .05em; padding: 14px .8em 4px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { display: inline-flex; gap: 6px; align-items: center; padding: .5em .9em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-weight: 600; font-size: .86rem; cursor: pointer; color: var(--ink-2); }
.tab.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.list-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--bg); }
.li-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.img-prev img { width: 120px; height: 80px; object-fit: cover; border-radius: 9px; }
.fam { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.fam-item { text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: inherit; cursor: pointer; display: flex; flex-direction: column; color: var(--ink); }
.fam-item:hover { border-color: var(--primary); } .fam-item small { color: var(--muted); }
.table.audit td { vertical-align: top; } .table.audit tbody tr { cursor: pointer; }
.au-warn td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.diff-old { color: var(--danger); text-decoration: line-through; white-space: normal !important; }
.diff-new { color: var(--ok); font-weight: 600; white-space: normal !important; }
.toolbar input[type=date] { width: auto; flex: 0 1 170px; }
