/* =====================================================================
   GULTIKING 2 — Soft Glass (glassmorphism) mengikuti warna logo
   Hijau merak + oranye. Dokumen cetak tetap memakai warna resmi #1A4D6E.
   ===================================================================== */
:root {
  --g-950: #072a1f;
  --g-900: #0e3a2b;
  --g-800: #12503a;
  --g-700: #17674a;
  --g-600: #1d8159;
  --g-500: #23a06b;
  --g-400: #45c287;
  --g-300: #7ad9a9;
  --g-100: #dff5ea;
  --o-600: #e0741a;
  --o-500: #f28b2c;
  --o-400: #ffa451;
  --o-100: #ffeedd;
  --ink: #12261e;
  --ink-2: #3d5249;
  --muted: #6b7f76;
  --line: rgba(18, 80, 58, .12);
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .82);
  --glass-border: rgba(255, 255, 255, .75);
  --shadow: 0 10px 30px -12px rgba(14, 58, 43, .25), 0 2px 6px -2px rgba(14, 58, 43, .08);
  --shadow-lg: 0 24px 60px -20px rgba(14, 58, 43, .35);
  --red: #e5484d; --red-bg: #fde8e8;
  --yellow: #c98a00; --yellow-bg: #fff4d1;
  --green: #148a55; --green-bg: #dcf5e8;
  --gray: #7a8580; --gray-bg: #eceeed;
  --blue: #1A4D6E; --blue-bg: #e2edf4;
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(160deg, #f4faf6 0%, #eaf4ef 45%, #fbf3ea 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; }
a { color: var(--g-700); }
button { font-family: inherit; }

/* latar blob blur seperti logo */
.bg-blobs { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.b1 { width: 420px; height: 420px; background: #ffb46b; top: -120px; left: -120px; }
.b2 { width: 520px; height: 520px; background: #8fe0b6; bottom: -200px; right: -160px; }
.b3 { width: 300px; height: 300px; background: #c9eedb; top: 40%; left: 55%; opacity: .45; }

#app { position: relative; z-index: 1; min-height: 100vh; }
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--muted); }
.boot img { border-radius: 20px; margin: 0 auto 10px; box-shadow: var(--shadow); }

/* ---------- glass primitives ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-strong); }
}
.card { background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 14px; }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 12px; padding: 10px 16px;
  font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease; white-space: nowrap;
  min-height: 42px; color: var(--ink); background: rgba(255,255,255,.7);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--g-500), var(--g-700)); box-shadow: 0 8px 18px -8px rgba(23,103,74,.7); }
.btn-orange  { color: #fff; background: linear-gradient(135deg, var(--o-400), var(--o-600)); box-shadow: 0 8px 18px -8px rgba(224,116,26,.7); }
.btn-dark    { color: #fff; background: linear-gradient(135deg, var(--g-800), var(--g-950)); }
.btn-outline { background: rgba(255,255,255,.55); border-color: rgba(23,103,74,.35); color: var(--g-700); }
.btn-ghost   { background: transparent; color: var(--ink-2); }
.btn-danger  { background: rgba(255,255,255,.6); border-color: rgba(229,72,77,.45); color: var(--red); }
.btn-blue    { color: #fff; background: linear-gradient(135deg, #2a6c95, var(--blue)); }
.btn-sm { padding: 6px 11px; min-height: 34px; font-size: 13px; border-radius: 10px; }
.btn-xs { padding: 4px 9px; min-height: 30px; font-size: 12px; border-radius: 9px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 10px; font-size: 16px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.b-green  { background: var(--green-bg); color: var(--green); }
.b-yellow { background: var(--yellow-bg); color: var(--yellow); }
.b-red    { background: var(--red-bg); color: var(--red); }
.b-gray   { background: var(--gray-bg); color: var(--gray); }
.b-blue   { background: var(--blue-bg); color: var(--blue); }
.b-orange { background: var(--o-100); color: var(--o-600); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span, .field > label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: rgba(255,255,255,.85); border: 1px solid rgba(18,80,58,.18);
  border-radius: 12px; padding: 11px 13px; outline: none; transition: border .15s, box-shadow .15s;
}
textarea.input { min-height: 84px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--g-500); box-shadow: 0 0 0 4px rgba(35,160,107,.15); }
.input::placeholder { color: #9aaba3; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.err { color: var(--red); font-size: 13px; font-weight: 600; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; padding: 8px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--g-600); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 26px 22px; }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-brand img { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow); }
.auth-brand h1 { font-size: 24px; margin: 12px 0 2px; letter-spacing: -.3px; }
.auth-brand h1 b { color: var(--o-500); }
.auth-brand p { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: rgba(18,80,58,.07); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.auth-tabs button { border: 0; background: transparent; padding: 10px; border-radius: 9px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.auth-tabs button.on { background: #fff; color: var(--g-700); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.notice { padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-bottom: 14px; line-height: 1.45; }
.notice.red { background: var(--red-bg); color: #b42318; }
.notice.yellow { background: var(--yellow-bg); color: #8a5a00; }
.notice.green { background: var(--green-bg); color: var(--green); }
.notice.blue { background: var(--blue-bg); color: var(--blue); }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex: 0 0 250px; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, var(--g-900), var(--g-950));
  color: #cfe9dc; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  border-radius: 0 24px 24px 0; box-shadow: var(--shadow-lg); z-index: 30; overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.side-brand img { width: 40px; height: 40px; border-radius: 12px; }
.side-brand b { font-size: 18px; color: #fff; display: block; line-height: 1.1; }
.side-brand b i { font-style: normal; color: var(--o-400); }
.side-brand small { font-size: 10px; letter-spacing: 2px; color: #8fc3aa; }
.nav-label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #77a892; margin: 12px 10px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 12px;
  color: #cfe9dc; text-decoration: none; font-weight: 600; font-size: 14px; transition: background .15s;
}
.nav-item .ic { width: 22px; text-align: center; font-size: 17px; }
.nav-item:hover { background: rgba(255,255,255,.07); }
.nav-item.on { background: linear-gradient(135deg, var(--g-500), var(--g-600)); color: #fff; box-shadow: 0 8px 18px -10px rgba(69,194,135,.9); }
.nav-item .count { margin-left: auto; background: var(--o-500); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; background: rgba(244, 250, 246, .72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.topbar h2 { font-size: 18px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .menu-btn { display: none; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--o-400), var(--g-600)); font-size: 14px; flex: 0 0 34px; }
.content { padding: 18px; max-width: 1180px; width: 100%; margin: 0 auto; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 16px; flex-wrap: wrap; }
.page-title h1 { font-size: 22px; margin: 0; letter-spacing: -.3px; }
.page-title p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

.sync-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.75); border: 1px solid var(--line); }
.sync-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); }
.sync-pill.online .dot { background: var(--g-500); box-shadow: 0 0 0 3px rgba(35,160,107,.2); }
.sync-pill.offline .dot { background: var(--o-500); box-shadow: 0 0 0 3px rgba(242,139,44,.2); }
.sync-pill.syncing .dot { background: var(--blue); animation: pulse 1s infinite; }
.sync-pill small { font-weight: 600; color: var(--muted); }
@keyframes pulse { 50% { opacity: .3; } }

/* bottom nav (guru, HP) */
.bottom-nav { display: none; }
.scrim { display: none; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform .25s ease; }
  .shell.drawer-open .sidebar { transform: none; }
  .shell.drawer-open .scrim { display: block; position: fixed; inset: 0; background: rgba(7,42,31,.35); z-index: 25; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 14px 12px calc(96px + var(--safe-b)); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b));
    z-index: 22; padding: 6px; border-radius: 20px;
    background: rgba(255,255,255,.78); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border-radius: 14px;
    text-decoration: none; color: var(--ink-2); font-size: 11px; font-weight: 700; }
  .bottom-nav a .ic { font-size: 19px; }
  .bottom-nav a.on { background: linear-gradient(135deg, var(--g-500), var(--g-700)); color: #fff; }
  .user-chip .nm { display: none; }
}

/* ---------- stat cards (gaya referensi) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { position: relative; overflow: hidden; border-radius: var(--radius); padding: 16px; color: #fff; min-height: 112px; box-shadow: var(--shadow); cursor: pointer; }
.stat::after { content: ""; position: absolute; width: 120px; height: 120px; right: -30px; bottom: -40px; border-radius: 30px; transform: rotate(25deg);
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); }
.stat .lbl { font-size: 13px; font-weight: 700; opacity: .92; }
.stat .val { font-size: 32px; font-weight: 800; margin-top: 6px; letter-spacing: -1px; }
.stat .sub { font-size: 12px; opacity: .85; }
.st-green  { background: linear-gradient(135deg, #2bb57a, #138154); }
.st-red    { background: linear-gradient(135deg, #f07a6a, #d6404a); }
.st-gray   { background: linear-gradient(135deg, #8a9b94, #5f716a); }
.st-orange { background: linear-gradient(135deg, #ffb25e, #ea7a1f); }
.st-teal   { background: linear-gradient(135deg, #3cc7b3, #168b8b); }
.st-blue   { background: linear-gradient(135deg, #4a8fbd, #1A4D6E); }

/* ---------- tabs & toolbar ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 1px solid transparent; background: rgba(255,255,255,.5); padding: 9px 14px; border-radius: 12px 12px 4px 4px;
  font-weight: 700; font-size: 13px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tab.on { background: #fff; color: var(--g-700); box-shadow: 0 -2px 10px rgba(0,0,0,.05); border-color: var(--glass-border); }
.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .field { margin: 0; min-width: 150px; flex: 1; }
.toolbar .grow { flex: 2; }

/* ---------- table → kartu di HP ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(255,255,255,.45); }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tbl .nm b { display: block; }
.tbl .nm small { color: var(--muted); }
@media (max-width: 760px) {
  table.tbl.cards thead { display: none; }
  table.tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tr { background: rgba(255,255,255,.66); border: 1px solid var(--glass-border); border-radius: 14px; padding: 8px 12px; margin-bottom: 10px; }
  .tbl.cards td { border: 0; padding: 5px 0; display: flex; gap: 10px; justify-content: space-between; align-items: center; text-align: right; }
  .tbl.cards td::before { content: attr(data-l); font-size: 12px; font-weight: 700; color: var(--muted); text-align: left; }
  .tbl.cards td.nm { display: block; text-align: left; font-size: 15px; }
  .tbl.cards td.nm::before { display: none; }
  .tbl.cards .actions { justify-content: flex-start; padding-top: 6px; }
  .tbl.cards td.actions-cell::before { display: none; }
}
.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 14px; }
.empty .big { font-size: 34px; display: block; margin-bottom: 6px; }

/* list items */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.6); border: 1px solid var(--glass-border); }
.item .ic-box { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; background: var(--g-100); }
.item .body { flex: 1; min-width: 0; }
.item .body b { display: block; font-size: 14.5px; }
.item .body small { color: var(--muted); font-size: 12.5px; }
.item.link { cursor: pointer; }

/* dashboard guru */
.hero { padding: 20px; color: #fff; border-radius: 22px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 20%, rgba(255,164,81,.75), transparent 45%), linear-gradient(135deg, var(--g-600), var(--g-900)); box-shadow: var(--shadow-lg); }
.hero h1 { margin: 0; font-size: 22px; }
.hero p { margin: 6px 0 0; opacity: .9; font-size: 14px; }
.hero .hero-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.hero .btn { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn.btn-orange { background: linear-gradient(135deg, var(--o-400), var(--o-600)); border-color: transparent; }
.wisdom { border-left: 4px solid var(--o-500); }
.wisdom q { font-size: 15.5px; font-weight: 600; line-height: 1.55; display: block; }
.wisdom small { display: block; margin-top: 8px; color: var(--muted); font-weight: 700; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 560px) { .quick { grid-template-columns: repeat(2, 1fr); } }
.quick a { text-decoration: none; color: var(--ink); padding: 14px 10px; border-radius: 16px; background: rgba(255,255,255,.65); border: 1px solid var(--glass-border); text-align: center; font-weight: 700; font-size: 13px; }
.quick a .ic { font-size: 24px; display: block; margin-bottom: 4px; }

/* ---------- laporan editor ---------- */
.lap-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 12px; }
.progress { margin-bottom: 14px; }
.progress .row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.bar { height: 9px; border-radius: 99px; background: rgba(18,80,58,.1); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--g-400), var(--o-400)); border-radius: 99px; transition: width .3s; }

.acc { margin-bottom: 12px; padding: 0; overflow: hidden; }
.acc-h { display: flex; align-items: center; gap: 10px; padding: 14px; cursor: pointer; user-select: none; }
.acc-h .letter { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--g-500), var(--g-800)); }
.acc.saved .acc-h .letter { background: linear-gradient(135deg, var(--g-400), var(--g-600)); }
.acc.editing .acc-h .letter { background: linear-gradient(135deg, var(--o-400), var(--o-600)); }
.acc-h .ttl { flex: 1; min-width: 0; }
.acc-h .ttl b { display: block; font-size: 14.5px; line-height: 1.25; }
.acc-h .ttl .badge { margin-top: 4px; }
.acc-h .chev { transition: transform .2s; color: var(--muted); font-size: 18px; }
.acc.open .acc-h .chev { transform: rotate(180deg); }
.acc-tools { display: flex; gap: 6px; padding: 0 14px 10px; justify-content: flex-end; flex-wrap: wrap; }
.acc-b { display: none; padding: 4px 14px 16px; border-top: 1px dashed var(--line); }
.acc.open .acc-b { display: block; }
.acc-b .sec-desc { font-size: 13px; color: var(--muted); margin: 10px 0 12px; }

.view-kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 14px; padding: 6px 0; }
.view-kv dt { color: var(--muted); font-weight: 700; font-size: 13px; }
.view-kv dd { margin: 0; white-space: pre-wrap; font-weight: 600; }
@media (max-width: 560px) { .view-kv { grid-template-columns: 1fr; gap: 0; } .view-kv dd { margin-bottom: 8px; } }
.dots { color: #a3b3ab; font-weight: 500; }

.row-card { border: 1px solid var(--line); background: rgba(255,255,255,.7); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.row-card.editing { border-color: var(--o-400); box-shadow: 0 0 0 3px rgba(242,139,44,.15); background: #fff; }
.row-card .rc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.row-card .no { width: 26px; height: 26px; border-radius: 8px; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.row-card .rc-top .sp { flex: 1; }
.row-card .rc-view { font-size: 14px; display: grid; gap: 3px; }
.row-card .rc-view div span { color: var(--muted); font-size: 12px; font-weight: 700; margin-right: 4px; }
.row-card .rc-view div { white-space: pre-wrap; }

.foto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .foto-grid { grid-template-columns: 1fr; } }
.foto-slot { border-radius: 16px; background: rgba(255,255,255,.7); border: 1px solid var(--line); padding: 10px; }
.foto-slot.active { border-color: var(--g-500); box-shadow: 0 0 0 3px rgba(35,160,107,.15); }
.foto-box { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; display: grid; place-items: center; text-align: center;
  border: 2px dashed rgba(18,80,58,.25); background: rgba(223,245,234,.5); cursor: pointer; color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 8px; }
.foto-box.drag { border-color: var(--o-500); background: var(--o-100); }
.foto-box.has { border-style: solid; padding: 0; }
.foto-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-box .ph-ic { font-size: 30px; display: block; }
.foto-box .tag { position: absolute; left: 8px; top: 8px; background: rgba(7,42,31,.7); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 99px; }
.foto-box .tag.local { background: var(--o-500); }
.foto-actions { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.foto-slot .field { margin-bottom: 8px; }

.paper-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.global-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
@media (min-width: 700px) { .global-actions { grid-template-columns: repeat(4, 1fr); } }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(7,42,31,.45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; padding: 0;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .15s; }
@media (min-width: 640px) { .modal-bg { align-items: center; padding: 20px; } }
.modal { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: rgba(255,255,255,.96); border-radius: 22px 22px 0 0; padding: 20px 18px calc(18px + var(--safe-b));
  box-shadow: var(--shadow-lg); animation: up .2s ease; }
@media (min-width: 640px) { .modal { border-radius: 22px; } }
.modal.wide { max-width: 860px; }
.modal h3 { margin: 0 0 6px; font-size: 18px; }
.modal .sub { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
#toast-root { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + var(--safe-b)); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 24px); max-width: 420px; pointer-events: none; }
.toast { background: var(--g-950); color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: up .2s; pointer-events: auto; }
.toast.err { background: #b42318; }
.toast.ok { background: var(--g-700); }

/* ---------- preview dokumen ---------- */
.preview-bg { position: fixed; inset: 0; z-index: 90; background: #e9eeec; display: flex; flex-direction: column; }
.preview-bar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: var(--g-900); color: #fff; flex-wrap: wrap; }
.preview-bar b { flex: 1; min-width: 140px; font-size: 14px; }
.preview-bar select { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: 8px; font: inherit; font-size: 13px; }
.preview-bar select option { color: #000; }
.preview-scroll { flex: 1; overflow: auto; padding: 14px 8px 40px; -webkit-overflow-scrolling: touch; }
.preview-pages { margin: 0 auto; transform-origin: top left; }
.preview-pages .pg { margin-bottom: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.pdf-stage { position: fixed; left: 0; top: 0; z-index: 9990; background: #fff; }
.pdf-cover { position: fixed; inset: 0; z-index: 9995; background: rgba(7,42,31,.92); color: #fff; display: grid; place-content: center; text-align: center; gap: 10px; font-weight: 700; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(255,255,255,.25); border-top-color: var(--o-400); animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

#measure-host { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; z-index: -1; width: 0; height: 0; overflow: hidden; }
#print-root { display: none; }

/* =====================================================================
   DOKUMEN RESMI (sama dengan PDF Yayasan Al-Basyir) — jangan ubah warna
   ===================================================================== */
.pg { position: relative; background: #fff; color: #000; overflow: hidden;
  font-family: "Times New Roman", Times, "Liberation Serif", "Nimbus Roman", serif; font-size: 12pt; line-height: 1.25; }
.pg-body { position: absolute; overflow: hidden; }
.pg-foot { position: absolute; left: 20mm; right: 20mm; bottom: 9mm; display: flex; justify-content: space-between;
  border-top: 0.6pt solid #c9d2d8; padding-top: 2.2mm; font-family: Arial, Helvetica, "Liberation Sans", sans-serif; font-size: 7.5pt; color: #6b6b6b; }
.doc-kop { text-align: center; margin-bottom: 4mm; }
.doc-kop .k1 { color: #1A4D6E; font-weight: bold; font-size: 12.5pt; line-height: 1.3; }
.doc-kop .k2 { font-size: 12pt; line-height: 1.25; }
.doc-kop .k2.b { font-weight: bold; }
.doc-title { text-align: center; color: #1A4D6E; font-weight: bold; font-size: 12.5pt; line-height: 1.45; margin: 5mm 0 6mm; }
.doc-minggu { font-size: 12pt; margin-bottom: 5mm; }
.doc-sec { color: #1A4D6E; font-weight: bold; font-size: 12.5pt; margin: 3mm 0 2.5mm; }
.doc-sec .lt { font-family: Arial, Helvetica, "Liberation Sans", sans-serif; font-size: 10pt; }
.doc-desc { font-size: 12pt; margin: 0 0 1mm; line-height: 1.3; }
.doc-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 1mm; }
.doc-tbl th { background: #1A4D6E; color: #fff; font-weight: bold; text-align: left; padding: 2.6mm 2mm; border: 0.6pt solid #1A4D6E; font-size: 12pt; vertical-align: middle; }
.doc-tbl td { border: 0.6pt solid #9fb4c4; padding: 1.8mm 2mm; vertical-align: top; font-size: 12pt; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.doc-tbl tr.alt td { background: #f1f5f7; }
.doc-tbl td.lbl { font-weight: bold; white-space: normal; }
.doc-tbl tr.empty-row td { height: 14mm; }
.doc-tbl tr.empty-row.tall td { height: 19mm; }
.doc-tbl tr.ev td { height: 17mm; }
.doc-tbl.ident td { padding: 1.2mm 2mm; }
.doc-tbl .dotline { color: #333; letter-spacing: 0; overflow: hidden; white-space: nowrap; }
.doc-dst { font-weight: bold; margin: 3mm 0 0 6mm; }
.doc-contoh { margin-top: 5mm; }
.doc-contoh b { display: block; margin-bottom: 2mm; }
.doc-contoh p { margin: 0; font-weight: bold; font-style: italic; text-align: justify; line-height: 1.3; }
.doc-foto { width: 100%; border-collapse: collapse; table-layout: fixed; background: #f1f5f7; border: 0.6pt solid #9fb4c4; }
.doc-foto td { vertical-align: top; padding: 4mm 3mm 3mm; border-left: 0.6pt solid #9fb4c4; white-space: normal; }
.doc-foto td:first-child { border-left: 0; }
.doc-foto .ft { font-weight: bold; margin-bottom: 2mm; }
.doc-foto .img { background: #e3eaee; display: block; margin: 0 auto 2mm; overflow: hidden; }
.doc-foto .img img { width: 100%; height: 100%; display: block; }
.doc-foto .noimg { display: block; }
.doc-foto .cap { font-size: 11.5pt; line-height: 1.3; }
.doc-video { font-size: 11pt; margin: 2mm 0 0; word-break: break-all; }
.doc-ttd { display: grid; grid-template-columns: 1fr 1fr; margin-top: 5mm; font-size: 12pt; }
.doc-ttd .c { line-height: 1.4; }
.doc-ttd .c2 { padding-left: 8mm; }
.doc-ttd .space { height: 20mm; }
.doc-endnote { text-align: center; color: #6b7a86; margin-top: 5mm; font-size: 12pt; }

/* sertifikat */
.cert { position: absolute; inset: 9mm; border: 2.4mm solid #17674a; outline: 0.8mm solid #f28b2c; outline-offset: -5mm; padding: 15mm 22mm; text-align: center;
  font-family: Georgia, "Times New Roman", serif; color: #12261e; background:
  radial-gradient(circle at 0 0, rgba(242,139,44,.14), transparent 35%), radial-gradient(circle at 100% 100%, rgba(35,160,107,.16), transparent 40%), #fff; }
.cert img.lg { width: 22mm; height: 22mm; border-radius: 5mm; }
.cert .org { font-family: Arial, sans-serif; letter-spacing: 1.2mm; font-size: 10pt; color: #17674a; font-weight: bold; margin-top: 2mm; }
.cert h1 { font-size: 34pt; letter-spacing: 2mm; margin: 5mm 0 0; color: #0e3a2b; }
.cert .no { font-family: Arial, sans-serif; font-size: 10pt; color: #555; margin-top: 1mm; }
.cert .given { margin-top: 7mm; font-size: 13pt; }
.cert .name { font-size: 28pt; font-weight: bold; color: #e0741a; margin: 3mm 0 2mm; border-bottom: 0.5mm solid #ccd; display: inline-block; padding: 0 10mm 1mm; }
.cert .ttl { font-size: 15pt; font-weight: bold; margin-top: 4mm; }
.cert .desc { font-size: 12.5pt; margin: 3mm auto 0; max-width: 200mm; line-height: 1.45; }
.cert .sign { position: absolute; right: 30mm; bottom: 18mm; text-align: center; font-size: 12pt; }
.cert .sign .sp { height: 18mm; }
.cert .date { position: absolute; left: 30mm; bottom: 18mm; text-align: left; font-size: 11pt; font-family: Arial, sans-serif; color: #444; }

/* =====================================================================
   CETAK — hanya dokumen yang tercetak
   ===================================================================== */
@media print {
  html, body { background: #fff !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  #print-root .pg { box-shadow: none !important; margin: 0 !important; page-break-after: always; break-after: page; }
  #print-root .pg:last-child { page-break-after: auto; break-after: auto; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}
