/* =============================================================
   JADWAL KEGIATAN — Stylesheet
   Full-width, responsif, aman untuk rotasi (portrait ⇄ landscape)
   ============================================================= */
:root {
  --navy: #0B1F3A;
  --navy-2: #13305A;
  --accent: #F5A524;
  --primary: #2563EB;
  --primary-ink: #fff;
  --ok: #059669;
  --warn: #D97706;
  --danger: #DC2626;
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --ink: #0F172A;
  --ink-2: #475569;
  --ink-3: #94A3B8;
  --line: #E2E8F0;
  --today: #FEF3C7;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .06);
  --radius: 14px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A1220; --surface: #111C2E; --surface-2: #16233A; --ink: #E5ECF6; --ink-2: #A3B2C8; --ink-3: #64748B;
    --line: #22324D; --today: #3A2E0E; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.25); --primary: #3B82F6;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); -webkit-tap-highlight-color: transparent; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
[hidden] { display: none !important; }

/* ---------- App shell grid ---------- */
.app {
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: auto 1fr auto auto;
  grid-template-areas: "top" "main" "foot" "nav";
  height: 100vh; height: 100dvh; width: 100%;
}
body.is-locked .app, body.is-locked .fab { visibility: hidden; }

.topbar {
  grid-area: top;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: calc(10px + var(--safe-t)) calc(14px + var(--safe-r)) 10px calc(14px + var(--safe-l));
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 15px; letter-spacing: .06em; }
.brand-text span { font-size: 12px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.period { display: flex; align-items: center; gap: 6px; order: 3; flex: 1 1 100%; }
.period .select { flex: 1 1 auto; min-width: 0; }
.top-actions { display: flex; align-items: center; gap: 4px; flex: none; min-width: 0; }
@media (max-width: 480px) { .sync-chip { max-width: 30vw; } .brand-text strong { font-size: 14px; } }

.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: inherit; }
.icon-btn:hover { background: rgba(127, 127, 127, .14); }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .12); }

.select, input, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); outline: none; min-height: 42px;
}
textarea { resize: vertical; line-height: 1.5; }
.select:focus, input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.topbar .select { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.18); font-weight: 600; }
.topbar .select option { color: #0F172A; }

.sync-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; padding: 6px 10px; border-radius: 999px; font-size: 12px; max-width: 46vw; }
.sync-chip span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.sync-chip[data-state="ok"] .sync-dot { background: #34D399; }
.sync-chip[data-state="syncing"] .sync-dot { background: var(--accent); animation: pulse 1s infinite; }
.sync-chip[data-state="offline"] .sync-dot, .sync-chip[data-state="local"] .sync-dot { background: #94A3B8; }
.sync-chip[data-state="auth"] .sync-dot, .sync-chip[data-state="error"] .sync-dot { background: #F87171; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Navigation ---------- */
.nav {
  grid-area: nav; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b); padding-left: var(--safe-l); padding-right: var(--safe-r);
}
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--nav-h); border: 0; background: none; color: var(--ink-2); font-size: 11px; font-weight: 600; position: relative; }
.nav-item.active { color: var(--primary); }
.nav-item.active::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }

.view { grid-area: main; overflow: auto; overscroll-behavior: contain; padding: 14px calc(14px + var(--safe-r)) 90px calc(14px + var(--safe-l)); outline: none; width: 100%; }
.appfoot { grid-area: foot; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 11px; color: var(--ink-3); padding: 6px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }

.fab {
  position: fixed; right: calc(18px + var(--safe-r)); bottom: calc(var(--nav-h) + 42px + var(--safe-b));
  width: 58px; height: 58px; border-radius: 18px; border: 0; background: var(--accent); color: var(--navy);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(245, 165, 36, .45); z-index: 20; transition: transform .15s;
}
.fab:active { transform: scale(.94); }
.fab svg { width: 28px; height: 28px; stroke-width: 2.6; }

/* ---------- Wide screen & landscape: nav jadi rail kiri ---------- */
@media (min-width: 900px), (orientation: landscape) and (min-width: 600px) {
  .app {
    grid-template-columns: 84px 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "top top" "nav main" "nav foot";
  }
  .nav { grid-template-columns: 1fr; grid-auto-rows: 72px; align-content: start; border-top: 0; border-right: 1px solid var(--line); padding: 10px 0 var(--safe-b) var(--safe-l); }
  .nav-item { height: 72px; }
  .nav-item.active::before { top: 18%; bottom: 18%; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .topbar { flex-wrap: nowrap; }
  .brand { flex: 0 1 auto; }
  .period { order: 0; flex: 1 1 auto; max-width: 560px; margin-left: auto; }
  .sync-chip { max-width: 22vw; }
  .fab { bottom: calc(46px + var(--safe-b)); }
  .view { padding-bottom: 40px; }
}
/* HP landscape (tinggi kecil): ringkas */
@media (orientation: landscape) and (max-height: 520px) {
  .topbar { padding-top: calc(6px + var(--safe-t)); padding-bottom: 6px; }
  .brand-text span { display: none; }
  .app { grid-template-columns: 72px 1fr; }
  .nav { grid-auto-rows: 58px; padding-top: 4px; }
  .nav-item { height: 58px; font-size: 10px; }
  .appfoot { padding: 3px 12px; }
  .brand-text strong { font-size: 13px; }
  .brand img { width: 28px; height: 28px; }
  .period .select { min-height: 36px; padding: 6px 10px; }
  .icon-btn { width: 36px; height: 36px; }
  .btn-ghost-light { min-height: 34px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)) ; gap: 8px; margin-bottom: 10px; }
  .stat { padding: 6px 12px; display: flex; align-items: baseline; gap: 8px; }
  .stat b { display: inline; font-size: 18px; }
  .view { padding-top: 10px; }
  .fab { width: 50px; height: 50px; bottom: calc(30px + var(--safe-b)); }
}

/* ---------- Cards & common ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.section-title h2 { font-size: 17px; margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; background: var(--surface-2); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); white-space: nowrap; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
a.btn { text-decoration: none; color: inherit; }
a.btn-ghost { color: var(--ink); }
.link { background: none; border: 0; color: inherit; text-decoration: underline; opacity: .8; padding: 8px; }
.empty { text-align: center; color: var(--ink-2); padding: 40px 16px; }
.empty svg { width: 46px; height: 46px; opacity: .35; display: block; margin: 0 auto 10px; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
@media (prefers-color-scheme: dark) { .chip.active { background: var(--primary); border-color: var(--primary); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { padding: 12px 14px; }
.stat b { display: block; font-size: 24px; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--ink-2); }
.stat.s-total b { color: var(--primary); } .stat.s-ok b { color: var(--ok); } .stat.s-plan b { color: var(--warn); } .stat.s-off b { color: var(--ink-3); }
.progress { grid-column: 1 / -1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #34D399); border-radius: 99px; transition: width .4s; }
@media (max-width: 420px) { .stats { gap: 6px; } .stat { padding: 10px; } .stat b { font-size: 20px; } .stat span { font-size: 11px; } }

/* ---------- Jadwal: kalender + agenda ---------- */
.jadwal { display: grid; gap: 14px; grid-template-columns: 100%; }
@media (min-width: 900px), (orientation: landscape) and (min-width: 600px) {
  .jadwal { grid-template-columns: minmax(300px, 40%) 1fr; align-items: start; }
  .jadwal .cal { position: sticky; top: 0; }
}
.cal { padding: 12px; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head span { text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-3); padding: 4px 0; text-transform: uppercase; }
.cal-head span:first-child { color: var(--danger); }
.cal-day {
  aspect-ratio: 1 / .9; border-radius: 10px; border: 1px solid transparent; background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 5px 2px; gap: 3px; font-weight: 600; font-size: 14px; min-height: 40px;
}
@media (orientation: landscape) and (max-height: 520px) { .cal-day { aspect-ratio: auto; min-height: 34px; } }
.cal-day.out { opacity: .35; }
.cal-day.sun .n { color: var(--danger); }
.cal-day.today { background: var(--today); border-color: var(--accent); }
.cal-day.sel { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal-dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 11px; color: var(--ink-2); }
.cal-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }

.agenda-tools { display: grid; gap: 8px; margin-bottom: 10px; grid-template-columns: 1fr auto; }
.agenda-tools .chips { grid-column: 1 / -1; }
.day-group { margin-bottom: 14px; }
.day-label { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 2px 6px; text-transform: uppercase; letter-spacing: .03em; }
.day-label.is-today { color: var(--accent); }
.day-label small { font-weight: 600; color: var(--ink-3); text-transform: none; letter-spacing: 0; }

.item { display: grid; grid-template-columns: auto 4px 1fr auto; gap: 10px; align-items: center; padding: 12px; margin-bottom: 8px; }
.item .time { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; text-align: right; min-width: 46px; line-height: 1.25; }
.item .time small { display: block; font-weight: 500; color: var(--ink-3); }
.item .bar { align-self: stretch; border-radius: 4px; }
.item .body { min-width: 0; cursor: pointer; }
.item .title { font-weight: 700; overflow-wrap: anywhere; }
.item .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.item.done .title { text-decoration: line-through; color: var(--ink-3); }
.item.cancel { opacity: .6; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); }
.badge.p-Tinggi { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.badge.st-Ditunda { color: var(--warn); } .badge.st-Batal { color: var(--ink-3); } .badge.st-Selesai { color: var(--ok); }
.check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: transparent; display: grid; place-items: center; color: transparent; }
.check svg { width: 16px; height: 16px; stroke-width: 3; }
.item.done .check { background: var(--ok); border-color: var(--ok); color: #fff; }
.cal-flag { font-size: 11px; }

/* ---------- Catatan ---------- */
.notes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.note { padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 140px; }
.note-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.note h3 { margin: 0; font-size: 16px; }
.note p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.note .link-keg { font-size: 12px; color: var(--primary); font-weight: 600; }
.mood-pick { border: 0; padding: 0; margin: 0; }
.mood-pick legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.mood-pick div { display: flex; gap: 6px; }
.mood-pick button { font-size: 22px; width: 44px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.mood-pick button.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent); }

/* ---------- Riwayat ---------- */
.log-list { display: grid; gap: 0; padding: 4px 0; }
.log { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.log:last-child { border-bottom: 0; }
.log .aksi { grid-row: span 2; align-self: start; font-size: 10px; font-weight: 800; padding: 4px 7px; border-radius: 6px; letter-spacing: .04em; min-width: 72px; text-align: center; background: var(--surface-2); border: 1px solid var(--line); }
.aksi-TAMBAH { color: var(--ok); } .aksi-UBAH { color: var(--primary); } .aksi-HAPUS, .aksi-HAPUS-EVENT, .aksi-GAGAL { color: var(--danger); }
.aksi-BUAT-EVENT, .aksi-BUAT-ULANG-EVENT { color: #7C3AED; }
.log .t { font-weight: 700; overflow-wrap: anywhere; }
.log .d { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- Pengaturan ---------- */
.settings { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); align-items: start; }
.set-card { padding: 16px; }
.set-card h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.set-card p { margin: 0 0 12px; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.set-row { display: flex; flex-wrap: wrap; gap: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; margin-bottom: 12px; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.about { text-align: center; }
.about img { width: 84px; height: 84px; }
.about .ver { font-size: 13px; color: var(--ink-2); }
.warn-box { border: 1px dashed var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(2, 6, 23, .55); display: none; align-items: flex-end; justify-content: center; z-index: 50; padding: 0; }
.modal-backdrop.open { display: flex; animation: fade .15s; }
.modal { background: var(--surface); width: 100%; max-height: 92dvh; display: flex; flex-direction: column; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25); padding-bottom: var(--safe-b); animation: up .2s ease-out; }
@media (min-width: 700px), (orientation: landscape) {
  .modal-backdrop { align-items: center; padding: 16px; }
  .modal { width: min(640px, 100%); border-radius: 18px; padding-bottom: 0; }
  .modal-lg { width: min(860px, 100%); }
}
.modal-sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 8px 16px 12px; overflow: auto; }
.modal-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.spacer { flex: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.form-grid label > * { color: var(--ink); font-weight: 400; }
.span-2 { grid-column: 1 / -1; }
.hint { margin: 0; font-size: 12px; color: var(--ink-3); }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: .6; } }

/* ---------- Lock screen ---------- */
.lock { position: fixed; inset: 0; z-index: 100; display: none; background: radial-gradient(120% 80% at 50% 0%, #1E3A8A 0%, var(--navy) 55%, #050D1C 100%); color: #fff; overflow: auto; }
.lock.open { display: grid; place-items: center; }
.lock-inner { width: min(360px, 100%); padding: calc(24px + var(--safe-t)) 24px calc(24px + var(--safe-b)); text-align: center; display: flex; flex-direction: column; align-items: center; }
.lock-logo { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.lock-app { font-size: 13px; letter-spacing: .25em; margin: 14px 0 18px; opacity: .8; font-weight: 700; }
.lock h2 { margin: 0; font-size: 22px; }
.lock .muted { color: rgba(255,255,255,.65); font-size: 13px; margin: 6px 0 18px; min-height: 1.2em; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin-bottom: 8px; }
.pin-dots .dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); transition: background .12s, transform .12s; }
.pin-dots .dot.filled { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-msg { min-height: 20px; font-size: 13px; margin: 6px 0 12px; color: #FCD34D; }
.pin-msg.error { color: #FCA5A5; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 22px; justify-content: center; }
.key { width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(255,255,255,.09); color: #fff; font-size: 28px; font-weight: 500; display: grid; place-items: center; transition: background .1s; }
.key:active { background: rgba(255,255,255,.25); }
.key-del { background: transparent; }
.lock.cooldown .key { opacity: .35; pointer-events: none; }
.lock-links { display: flex; gap: 12px; margin-top: 14px; font-size: 13px; }
.lock-version { margin-top: 10px; opacity: .45; font-size: 11px; }
/* Lock screen di HP landscape: dua kolom */
@media (orientation: landscape) and (max-height: 520px) {
  .lock-inner { width: min(760px, 100%); display: grid; grid-template-columns: 1fr auto; grid-template-areas: "logo pad" "app pad" "title pad" "sub pad" "dots pad" "msg pad" "links pad" "ver pad"; column-gap: 40px; align-items: center; padding-top: calc(10px + var(--safe-t)); }
  .lock-logo { grid-area: logo; width: 48px; height: 48px; justify-self: center; }
  .lock-app { grid-area: app; margin: 6px 0; } .lock h2 { grid-area: title; font-size: 18px; } .lock .muted { grid-area: sub; margin: 4px 0 10px; }
  .pin-dots { grid-area: dots; } .pin-msg { grid-area: msg; } .lock-links { grid-area: links; justify-content: center; margin-top: 4px; } .lock-version { grid-area: ver; }
  .pin-pad { grid-area: pad; grid-template-columns: repeat(3, 58px); gap: 8px 16px; }
  .key { width: 58px; height: 58px; font-size: 22px; }
}

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 110px + var(--safe-b)); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 480px); }
.toast { background: #0F172A; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; transform: translateY(10px); transition: .25s; text-align: center; }
.toast.show { opacity: 1; transform: none; }
.toast-error { background: var(--danger); } .toast-ok { background: var(--ok); }
@media (min-width: 900px), (orientation: landscape) { .toasts { bottom: 40px; } }
