:root {
  --brand: #d88b40;
  --brand-ink: #a9611f;
  --brand-soft: #fbeedf;
  --brand-softer: #fdf6ee;
  --bg: #f7f3ee;
  --surface: #ffffff;
  --surface-2: #faf7f3;
  --ink: #2a2119;
  --ink-2: #5d5247;
  --ink-3: #8f8478;
  --line: #ece5dc;
  --line-2: #e2d9ce;
  --ok: #2f8a5b;
  --ok-soft: #e4f4ea;
  --warn: #b7791f;
  --warn-soft: #fcf1dc;
  --bad: #c2453b;
  --bad-soft: #fbe6e3;
  --info: #3d6fb6;
  --info-soft: #e5eef9;
  --muted-soft: #efebe6;
  --shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 4px 16px rgba(60, 40, 20, .05);
  --shadow-lg: 0 12px 40px rgba(40, 25, 10, .18);
  --r: 16px;
  --r-sm: 11px;
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #e09a55;
    --brand-ink: #f0b47a;
    --brand-soft: #3a2a1b;
    --brand-softer: #2a2018;
    --bg: #17130f;
    --surface: #211b16;
    --surface-2: #1c1713;
    --ink: #f3ece4;
    --ink-2: #c9bdb0;
    --ink-3: #8f8376;
    --line: #322a22;
    --line-2: #3d342b;
    --ok: #5cc28c; --ok-soft: #1c3226;
    --warn: #e2a64a; --warn-soft: #3a2d17;
    --bad: #ec7a6f; --bad-soft: #3b201d;
    --info: #79a6e6; --info-soft: #1c2a3d;
    --muted-soft: #2b241e;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #e09a55; --brand-ink: #f0b47a; --brand-soft: #3a2a1b; --brand-softer: #2a2018;
  --bg: #17130f; --surface: #211b16; --surface-2: #1c1713; --ink: #f3ece4; --ink-2: #c9bdb0; --ink-3: #8f8376;
  --line: #322a22; --line-2: #3d342b; --ok: #5cc28c; --ok-soft: #1c3226; --warn: #e2a64a; --warn-soft: #3a2d17;
  --bad: #ec7a6f; --bad-soft: #3b201d; --info: #79a6e6; --info-soft: #1c2a3d; --muted-soft: #2b241e;
  --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-ink); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(var(--safe-t) + 10px) 16px 10px;
  display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .back { margin-inline-start: -8px; }
.topbar h1 { font-size: 19px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 12px; color: var(--ink-3); font-weight: 500; display: block; }
.brandmark { width: 34px; height: 34px; border-radius: 10px; flex: none; display: block; }
main.view { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 6px 16px calc(var(--nav-h) + var(--safe-b) + 28px); }
.wide main.view, main.view.wide { max-width: 1200px; }

.bottomnav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: 11.5px; font-weight: 600; position: relative;
}
.bottomnav a svg { width: 24px; height: 24px; }
.bottomnav a.active { color: var(--brand-ink); }
.bottomnav a.active .ico-wrap { background: var(--brand-soft); }
.ico-wrap { width: 54px; height: 30px; border-radius: 99px; display: grid; place-items: center; transition: background .2s; }
.bottomnav .dot { position: absolute; top: 6px; inset-inline-end: calc(50% - 26px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; display: grid; place-items: center; line-height: 1; }

@media (min-width: 900px) {
  .bottomnav { inset-inline-end: auto; inset-inline-start: 0; top: 0; bottom: 0; width: 96px; height: auto; flex-direction: column; justify-content: flex-start; padding: 84px 0 0; border-top: 0; border-inline-end: 1px solid var(--line); gap: 6px; }
  .bottomnav a { flex: none; height: 68px; }
  .app { padding-inline-start: 96px; }
  main.view { padding-bottom: 48px; }
}

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card.pad { padding: 16px; }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 10px; }
.section-head h2 { font-size: 16px; font-weight: 700; }
.section-head .link { font-size: 13.5px; font-weight: 600; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.bold { font-weight: 700; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 13px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer;
  transition: transform .08s, background .2s, opacity .2s; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn svg { width: 20px; height: 20px; }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 13px; font-size: 13.5px; border-radius: 10px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn.ok { background: var(--ok); }
.btn.bad { background: var(--bad-soft); color: var(--bad); }
.btn.plain { background: transparent; color: var(--brand-ink); padding: 0 8px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: transparent; border: 0; color: var(--ink-2); cursor: pointer; flex: none; }
.icon-btn:active { background: var(--muted-soft); }
.icon-btn svg { width: 23px; height: 23px; }

.fab {
  position: fixed; inset-inline-start: 18px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 25;
  height: 54px; padding: 0 20px 0 18px; border-radius: 18px; border: 0; background: var(--brand); color: #fff;
  font-weight: 700; display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(216, 139, 64, .42); cursor: pointer;
}
.fab svg { width: 22px; height: 22px; }
@media (min-width: 900px) { .fab { bottom: 28px; inset-inline-start: auto; inset-inline-end: 28px; } }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--muted-soft); color: var(--ink-2); white-space: nowrap; }
.chip.brand { background: var(--brand-soft); color: var(--brand-ink); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip svg { width: 14px; height: 14px; }

.seg { display: flex; background: var(--muted-soft); border-radius: 12px; padding: 3px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; border: 0; background: transparent; height: 36px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); cursor: pointer; padding: 0 12px; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -16px; padding-inline: 16px; }
.pills::-webkit-scrollbar { display: none; }
.pills button { flex: none; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.pills button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; font-size: 16px;
}
textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.7; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.input[type="time"], .input[type="date"], .input[type="month"] { direction: ltr; text-align: right; }
.hint { font-size: 12.5px; color: var(--ink-3); }
.switch { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--surface); margin-bottom: 10px; }
.switch .t { flex: 1; }
.switch .t b { display: block; font-size: 14.5px; }
.switch .t span { font-size: 12.5px; color: var(--ink-3); }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(-18px); }
.search { position: relative; }
.search svg { position: absolute; top: 50%; inset-inline-start: 13px; transform: translateY(-50%); width: 19px; height: 19px; color: var(--ink-3); }
.search .input { padding-inline-start: 40px; height: 44px; background: var(--surface); }

/* ---------- lists ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); color: inherit; cursor: pointer; background: transparent; width: 100%; text-align: start; border-inline: 0; border-top: 0; }
.item:last-child { border-bottom: 0; }
.item:active { background: var(--surface-2); }
.item .main { flex: 1; min-width: 0; }
.item .title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.item .chev { color: var(--ink-3); width: 18px; height: 18px; flex: none; }
.avatar { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; background: var(--brand-soft); color: var(--brand-ink); }
.avatar.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 24px; }
.datebox { min-width: 50px; padding: 0 5px; height: 52px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1.1; }
.datebox b { font-size: 18px; }
.datebox span { white-space: nowrap; font-size: 10px; color: var(--ink-3); font-weight: 600; }
.datebox.today { background: var(--brand); border-color: var(--brand); color: #fff; }
.datebox.today span { color: #fff; opacity: .85; }

.empty { text-align: center; padding: 36px 20px; color: var(--ink-3); }
.empty svg { width: 44px; height: 44px; opacity: .5; margin-bottom: 8px; }
.empty b { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }

/* ---------- home ---------- */
.hello { margin: 4px 2px 14px; }
.hello h2 { font-size: 22px; font-weight: 700; }
.hero {
  border-radius: 22px; padding: 18px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(140deg, #dd914a 0%, #c9772f 100%);
  box-shadow: 0 10px 30px rgba(201, 119, 47, .28);
}
.hero::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero .k { font-size: 13px; opacity: .9; font-weight: 600; }
.hero h3 { font-size: 20px; margin-top: 4px; }
.hero .row { margin-top: 12px; position: relative; z-index: 1; }
.hero .btn { background: #fff; color: #b0631f; }
.hero .btn.ghost { background: rgba(255,255,255,.16); color: #fff; border-color: transparent; }
.stat { padding: 14px; }
.stat .v { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat .l { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.ring { --p: 0; --c: var(--brand); width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--muted-soft) 0); }
.ring > div { width: 74px; height: 74px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring b { font-size: 21px; }
.ring span { font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.bar { height: 8px; border-radius: 99px; background: var(--muted-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 90px; padding-top: 8px; }
.spark .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.spark .col i { width: 100%; max-width: 30px; border-radius: 7px 7px 3px 3px; background: var(--brand); opacity: .85; min-height: 3px; }
.spark .col span { font-size: 10.5px; color: var(--ink-3); }

/* ---------- lecture ---------- */
.lec-head { padding: 18px; }
.lec-head .series { font-size: 13px; font-weight: 700; color: var(--brand-ink); }
.lec-head h2 { font-size: 21px; margin: 2px 0 8px; }
.kv { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--ink-2); }
.kv span { display: inline-flex; align-items: center; gap: 5px; }
.kv svg { width: 16px; height: 16px; color: var(--ink-3); }
.status-box { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; }
.status-box .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.status-box .ic svg { width: 22px; height: 22px; }
.status-box.ok { background: var(--ok-soft); } .status-box.ok .ic { background: var(--ok); color: #fff; }
.status-box.warn { background: var(--warn-soft); } .status-box.warn .ic { background: var(--warn); color: #fff; }
.status-box.bad { background: var(--bad-soft); } .status-box.bad .ic { background: var(--bad); color: #fff; }
.status-box.info { background: var(--info-soft); } .status-box.info .ic { background: var(--info); color: #fff; }
.status-box.brand { background: var(--brand-soft); } .status-box.brand .ic { background: var(--brand); color: #fff; }
.status-box.muted { background: var(--muted-soft); } .status-box.muted .ic { background: var(--ink-3); color: #fff; }

.contrib { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.contrib:last-child { border-bottom: 0; }
.contrib .who { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.contrib .who .avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.contrib .body { white-space: pre-wrap; font-size: 15px; line-height: 1.85; }
.contrib.quote .body { font-family: "Amiri", "IBM Plex Sans Arabic", serif; font-size: 18px; line-height: 1.9; padding-inline-start: 14px; border-inline-start: 3px solid var(--brand); color: var(--ink); }
.contrib.featured { background: var(--brand-softer); }
.contrib .tools { display: flex; gap: 4px; margin-top: 6px; }

/* ---------- attendance roster ---------- */
.roster .item { cursor: default; }
.mark {
  height: 40px; min-width: 92px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: transparent;
  font-weight: 700; font-size: 13.5px; color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px;
}
.mark svg { width: 18px; height: 18px; }
.mark.present { border: 0; background: var(--ok); color: #fff; }
.mark.late { border: 0; background: var(--warn); color: #fff; }
.mark.excused { border-style: solid; border-color: var(--info); color: var(--info); background: var(--info-soft); }
.summary-bar { position: sticky; top: calc(var(--safe-t) + 62px); z-index: 10; margin: 0 -16px 10px; padding: 8px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }

/* ---------- table ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); max-height: 70vh; }
table.t { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.t th, table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
table.t th { position: sticky; top: 0; background: var(--surface-2); font-weight: 700; color: var(--ink-2); z-index: 2; font-size: 12px; }
table.t td:first-child, table.t th:first-child { position: sticky; right: 0; background: var(--surface); text-align: start; z-index: 1; font-weight: 600; border-inline-end: 1px solid var(--line); }
table.t th:first-child { z-index: 3; background: var(--surface-2); }
.c-present { color: var(--ok); font-weight: 600; }
.c-late { color: var(--warn); font-weight: 700; }
.c-absent { color: var(--bad); font-weight: 700; }
.c-excused { color: var(--info); font-weight: 700; }
.c-na, .c-skipped, .c-upcoming { color: var(--ink-3); }

/* ---------- sheet / modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 12, 5, .42); z-index: 60; opacity: 0; transition: opacity .22s; }
.scrim.show { opacity: 1; }
.sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 61; max-height: 92dvh; overflow: auto;
  background: var(--surface); border-radius: 24px 24px 0 0; padding: 8px 18px calc(18px + var(--safe-b));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.9,.3,1); box-shadow: var(--shadow-lg);
}
.sheet.show { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 4px auto 12px; }
.sheet h3 { font-size: 18px; margin-bottom: 14px; }
@media (min-width: 700px) {
  .sheet { inset-inline: 50%; left: 50%; right: auto; bottom: auto; top: 50%; width: 520px; border-radius: 22px; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .22s, opacity .22s; padding-bottom: 20px; }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; }
  .sheet .grab { display: none; }
}
.sheet-actions { display: flex; gap: 10px; margin-top: 6px; position: sticky; bottom: calc(-18px - var(--safe-b)); background: var(--surface); padding: 10px 0 0; }
.sheet-actions .btn { flex: 1; }

.toast { position: fixed; z-index: 90; inset-inline: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); margin: auto; max-width: 420px; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--surface); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); transform: translateY(20px); opacity: 0; transition: .25s; pointer-events: none; text-align: center; }
.toast.show { transform: none; opacity: 1; }
.toast.err { background: var(--bad); color: #fff; }

/* ---------- auth & install ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 20px) 20px calc(var(--safe-b) + 20px); max-width: 440px; margin: 0 auto; }
.auth .logo { width: 100%; max-width: 280px; border-radius: 18px; margin: 18px auto 6px; display: block; }
.auth .tag { text-align: center; color: var(--ink-2); margin-bottom: 22px; font-size: 14.5px; }
.install-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--brand-soft); margin-bottom: 18px; }
.install-card img { width: 46px; height: 46px; border-radius: 12px; }
.install-card .t { flex: 1; font-size: 13px; color: var(--ink-2); }
.install-card .t b { display: block; color: var(--ink); font-size: 14.5px; }

.splash-install {
  position: fixed; inset: 0; z-index: 80; background: var(--brand); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--safe-t) + 30px) 28px calc(var(--safe-b) + 30px); text-align: center; animation: fade .3s;
}
.splash-install img { width: 132px; height: 132px; border-radius: 32px; box-shadow: 0 20px 50px rgba(90, 45, 5, .35); }
.splash-install h2 { font-size: 30px; margin: 24px 0 6px; font-family: "Amiri", serif; }
.splash-install p { opacity: .92; max-width: 320px; margin: 0 0 28px; }
.splash-install .btn { background: #fff; color: #b0631f; height: 56px; font-size: 17px; width: 100%; max-width: 320px; border-radius: 16px; }
.splash-install .skip { background: none; border: 0; color: #fff; opacity: .85; margin-top: 14px; font-weight: 600; cursor: pointer; padding: 10px; }
.ios-steps { text-align: start; background: rgba(255,255,255,.14); border-radius: 16px; padding: 14px 16px; max-width: 320px; font-size: 14px; margin-bottom: 18px; }
.ios-steps ol { margin: 0; padding-inline-start: 18px; }
@keyframes fade { from { opacity: 0; } }

.pw-box { direction: ltr; font-family: ui-monospace, Menlo, monospace; font-size: 20px; font-weight: 700; letter-spacing: 2px; text-align: center; padding: 14px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 12px; user-select: all; }

.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav .lbl { flex: 1; text-align: center; font-weight: 700; font-size: 16px; }

.skeleton { background: linear-gradient(90deg, var(--muted-soft), var(--surface-2), var(--muted-soft)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--ink-3); }
.legend b { font-weight: 700; }

/* ---------- print ---------- */
#print-area { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; color: #000; font-size: 9.5pt; }
  #print-area h1 { font-size: 15pt; margin-bottom: 2mm; }
  #print-area .meta { color: #555; margin-bottom: 4mm; font-size: 9pt; }
  #print-area table { border-collapse: collapse; width: 100%; }
  #print-area th, #print-area td { border: 1px solid #bbb; padding: 3px 4px; text-align: center; white-space: nowrap; font-size: 8.5pt; }
  #print-area th { background: #f6e7d6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-area td.n { text-align: right; font-weight: 600; }
  #print-area .a { color: #c2453b; font-weight: 700; }
  #print-area .e { color: #3d6fb6; font-weight: 700; }
  #print-area .l { color: #b7791f; font-weight: 700; }
  #print-area tr { break-inside: avoid; }
}

.xs-ic { width: 13px; height: 13px; vertical-align: -2px; margin-inline-end: 2px; }
.inline-ic { width: 18px; height: 18px; vertical-align: -4px; }
a.card { color: inherit; display: block; }

/* ---------- guide ---------- */
.g-hero { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; padding: 16px; border-radius: 20px; color: #fff; background: linear-gradient(140deg, #dd914a, #c9772f); }
.g-hero p { margin: 4px 0 0; line-height: 1.8; font-size: 14.5px; }
.g-hero-ic { width: 44px; height: 44px; border-radius: 13px; background: rgba(255,255,255,.18); display: grid; place-items: center; flex: none; }
.g-hero-ic svg { width: 24px; height: 24px; }
.g-flow { display: flex; flex-direction: column; gap: 0; padding: 6px 16px; }
.g-flow-i { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-weight: 600; font-size: 14.5px; position: relative; }
.g-flow-i span { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; z-index: 1; }
.g-flow-i:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 13px; top: 38px; height: calc(100% - 28px); width: 2px; background: var(--brand-soft); }
.g-sec { overflow: hidden; }
.g-sec summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; font-size: 15px; }
.g-sec summary::-webkit-details-marker { display: none; }
.g-sec summary b { flex: 1; }
.g-chev { width: 18px; height: 18px; color: var(--ink-3); transition: transform .2s; transform: rotate(-90deg); }
.g-sec[open] .g-chev { transform: rotate(90deg); }
.g-content { padding: 2px 16px 14px; border-top: 1px solid var(--line); }
.g-step { display: flex; gap: 12px; padding: 12px 0 0; }
.g-num { width: 24px; height: 24px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 12.5px; display: grid; place-items: center; flex: none; margin-top: 2px; }
.g-step b { font-size: 14.5px; }
.g-body { color: var(--ink-2); font-size: 14px; line-height: 1.8; }
.g-body ul { margin: 4px 0 0; padding-inline-start: 18px; }
.g-body .chip { height: 22px; font-size: 12px; }
.g-path { display: inline-flex; align-items: center; gap: 4px; background: var(--muted-soft); border-radius: 8px; padding: 0 8px; font-weight: 600; color: var(--ink); font-size: 13px; }
.g-path span { color: var(--ink-3); }
.g-tip { display: flex; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.g-tip svg { width: 18px; height: 18px; color: var(--warn); flex: none; margin-top: 3px; }

.phone-in { display: flex; gap: 8px; }
.phone-in .cc { width: 86px; flex: none; text-align: center; font-weight: 600; }
.phone-in .input:not(.cc) { flex: 1; min-width: 0; letter-spacing: .5px; }
.btn.wa { background: #25d366; color: #fff; }
.btn.wa.sent { background: var(--ok-soft); color: var(--ok); }
.wa-ic { width: 20px; height: 20px; }
a.card.row { display: flex; }
.chev { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.avatar svg { width: 21px; height: 21px; }
.avatar.lg svg { width: 30px; height: 30px; }
.big-ic { width: 40px; height: 40px; color: var(--ink-3); }
.toast { bottom: auto; top: calc(var(--safe-t) + 12px); transform: translateY(-20px); }
.toast.show { transform: none; }
.grid2 > *, .grid3 > * { min-width: 0; }
.input { min-width: 0; }
.credit { text-align: center; font-size: 12.5px; color: var(--ink-3); margin: 22px 0 6px; }
.credit b { color: var(--brand-ink); font-weight: 600; }
