:root {
  /* الصبح: أبيض + دهبي */
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f3f0e8;
  --ink: #141210;
  --ink-2: #4a463e;
  --ink-3: #8a857a;
  --line: #e7e1d3;
  --gold: #c99a2e;          /* الدهبي الأساسي */
  --gold-ink: #8a6512;      /* دهبي غامق للنص على أبيض */
  --gold-soft: #f8efd8;
  --accent: var(--gold);
  --on-accent: #1b1406;
  --in: #16794a;
  --in-soft: #e3f3ea;
  --out: #1f2a44;
  --late: #b45309;
  --late-soft: #fdf0dc;
  --bad: #c0352b;
  --bad-soft: #fbe5e2;
  --info-soft: #e8edf7;
  --head-bg: #141210;
  --head-ink: #f3d78b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(60,45,10,.05), 0 8px 24px rgba(60,45,10,.07);
  --font: "Cairo", "Noto Sans Arabic", system-ui, sans-serif;
  color-scheme: light;
}

/* بعد 2 الضهر: أسود + دهبي (التطبيق بيحط data-theme حسب ساعة السيرفر) */
:root[data-theme="dark"] {
  --bg: #0b0b0a;
  --surface: #161513;
  --surface-2: #201e1a;
  --ink: #f4efe3;
  --ink-2: #cfc6b2;
  --ink-3: #8f8778;
  --line: #2d2a24;
  --gold: #e0b44c;
  --gold-ink: #f0c95f;
  --gold-soft: #2b2312;
  --accent: var(--gold);
  --on-accent: #120d02;
  --in: #3fbf7f;
  --in-soft: #12301f;
  --out: #9fb3e0;
  --late: #f0a64a;
  --late-soft: #33260f;
  --bad: #f07a6f;
  --bad-soft: #3a1714;
  --info-soft: #1b2233;
  --head-bg: #201a0c;
  --head-ink: #f0c95f;
  --shadow: 0 1px 2px rgba(0,0,0,.5);
  color-scheme: dark;
}
:root[data-theme="dark"] .logo { content: url("../img/logo-light.png"); }
body { transition: background-color .4s ease, color .4s ease; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }
td.num { display: table-cell; direction: rtl; }
b.num, td.num > b { unicode-bidi: isolate; }

/* ---------- الهيكل ---------- */
.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 96px);
}
.shell.wide { max-width: 1040px; }
.shell > * { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.topbar .logo { height: 22px; width: auto; }
.topbar .who { text-align: end; font-size: 13px; color: var(--ink-3); line-height: 1.3; }
.topbar .who b { display: block; color: var(--ink); font-size: 15px; }
.demo-banner {
  background: var(--late-soft); color: var(--late); border-radius: 10px;
  padding: 6px 12px; font-size: 13px; margin-bottom: 12px; text-align: center;
}
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 800; }
h2 { font-size: 17px; margin: 0 0 10px; font-weight: 700; }
.muted { color: var(--ink-3); font-size: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.grow { flex: 1; min-width: 0; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card + .card, .card + .section, .section + .card, .section + .section { margin-top: 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 4px 10px; }
.section-title h2 { margin: 0; }

/* ---------- الساعة وزرار التسجيل ---------- */
.clock { text-align: center; padding: 22px 16px 18px; }
.clock .time { font-size: 54px; font-weight: 800; letter-spacing: 1px; line-height: 1.1; }
.clock .date { color: var(--ink-3); margin-top: 4px; }
.status-line { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: 999px; background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.in { background: var(--in); box-shadow: 0 0 0 4px var(--in-soft); }

.punch-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 0 4px; }
.punch-btn {
  width: 190px; height: 190px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 21px; font-weight: 800; color: #fff; background: var(--in);
  box-shadow: 0 0 0 10px var(--in-soft), 0 14px 30px rgba(22,121,74,.28);
  transition: transform .12s ease;
}
.punch-btn.out { background: var(--out); box-shadow: 0 0 0 10px var(--info-soft), 0 14px 30px rgba(31,42,68,.28); }
.punch-btn:active { transform: scale(.97); }
.punch-btn svg { width: 38px; height: 38px; }
.punch-btn small { font-size: 13px; font-weight: 600; opacity: .85; }

.site-pick { width: 100%; }
label.field { display: block; }
label.field > span { display: block; font-size: 13px; color: var(--ink-3); margin: 0 4px 4px; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 11px 12px; outline: none; min-height: 46px;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent); }
.input.code { font-size: 22px; letter-spacing: 6px; text-align: center; direction: ltr; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid2 > *, .grid3 > * { min-width: 0; }
input[type="time"].input, input[type="date"].input { padding-inline: 6px; }

.btn {
  border: 0; border-radius: 12px; padding: 11px 16px; min-height: 46px; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.block { width: 100%; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; padding: 4px; }

/* ---------- القوائم ---------- */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item.tap { cursor: pointer; }
.item.tap:active { background: var(--surface-2); }
.item .title { font-weight: 700; }
.item .sub { font-size: 13px; color: var(--ink-3); }
.avatar {
  width: 46px; height: 46px; border-radius: 12px; flex: none; object-fit: cover; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--ink-3);
  cursor: pointer; border: 0; padding: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.times { text-align: end; font-size: 14px; line-height: 1.4; }

.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip.present { background: var(--in-soft); color: var(--in); }
.chip.late, .chip.half_day_deduct { background: var(--late-soft); color: var(--late); }
.chip.absent, .chip.unpaid_leave, .chip.full_day_deduct { background: var(--bad-soft); color: var(--bad); }
.chip.paid_leave, .chip.permission_day, .chip.holiday { background: var(--info-soft); color: var(--out); }
.chip.warn { background: var(--late-soft); color: var(--late); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 10px; text-align: center; min-width: 0; }
.stats.four { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .stats.four { grid-template-columns: repeat(4, 1fr); } }
.stat b { display: block; font-size: 20px; font-weight: 800; }
.stat span { font-size: 12px; color: var(--ink-3); }
.stat.good b { color: var(--in); }
.stat.warn b { color: var(--late); }
.stat.bad b { color: var(--bad); }

.kv { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px dashed var(--line); }
.kv:first-child { border-top: 0; }
.kv.total { font-weight: 800; font-size: 18px; border-top: 2px solid var(--gold); margin-top: 6px; padding-top: 10px; }
.minus { color: var(--bad); }
.plus { color: var(--in); }

/* ---------- جدول المرتبات ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 14px; white-space: nowrap; }
.tbl th { background: var(--head-bg); color: var(--head-ink); font-weight: 700; padding: 10px 8px; position: sticky; top: 0; }
.tbl td { padding: 9px 8px; border-top: 1px solid var(--line); text-align: center; }
.tbl td:first-child, .tbl th:first-child { text-align: start; }
.tbl tr.tap { cursor: pointer; }
.tbl tr.tap:hover td { background: var(--surface-2); }
.tbl tfoot td { font-weight: 800; border-top: 2px solid var(--gold); }

/* ---------- التبويبات تحت ---------- */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--surface);
  border-top: 1px solid var(--line); display: flex; justify-content: center;
  padding: 6px 6px calc(env(safe-area-inset-bottom) + 6px);
}
.tabbar .tabs { display: flex; width: 100%; max-width: 560px; }
.tab { flex: 1; border: 0; background: none; padding: 6px 2px; border-radius: 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--ink-3); }
.tab svg { width: 22px; height: 22px; }
.tab.on { color: var(--gold-ink); font-weight: 700; }
.tab.on svg { stroke-width: 2.4; }

/* ---------- النوافذ (Sheet) ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; display: flex;
  align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { position: relative; background: var(--surface); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  border-radius: 20px 20px 0 0; padding: 18px 16px calc(env(safe-area-inset-bottom) + 18px);
  animation: up .2s ease; }
.sheet > h2 { margin-bottom: 14px; padding-inline-end: 44px; }
.sheet .close { position: absolute; top: 14px; inset-inline-end: 14px; border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 20px; } }
/* الحركة للزينة بس: النافذة ظاهرة من أول لحظة حتى لو المتصفح وقّف الأنيميشن */
@keyframes up { from { transform: translateY(24px); } to { transform: none; } }
@keyframes fade { from { background-color: rgba(0,0,0,0); } to { background-color: rgba(0,0,0,.45); } }

/* ---------- الكاميرا ---------- */
.camera { position: fixed; inset: 0; z-index: 50; background: #000; color: #fff; display: flex; flex-direction: column; }
.camera .view { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.camera video, .camera .shot { width: 100%; height: 100%; object-fit: contain; background: #000; }
.camera video { transform: scaleX(-1); }
.camera .oval { position: absolute; width: 62%; aspect-ratio: 3 / 4; border: 3px solid rgba(255,255,255,.75);
  border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.camera .hint { position: absolute; top: calc(env(safe-area-inset-top) + 16px); inset-inline: 0; text-align: center; font-weight: 700; }
.camera .bar { padding: 18px 20px calc(env(safe-area-inset-bottom) + 22px); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #000; }
.shutter { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; }
.camera .btn.ghost { background: rgba(255,255,255,.14); color: #fff; }
.camera .btn { min-width: 96px; }

.done { text-align: center; padding: 26px 8px; }
.done .check { width: 84px; height: 84px; border-radius: 50%; background: var(--in-soft); color: var(--in);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.done .check svg { width: 46px; height: 46px; }
.done .big { font-size: 40px; font-weight: 800; }

/* ---------- متنوع ---------- */
#toast { position: fixed; z-index: 60; inset-inline: 16px; bottom: calc(env(safe-area-inset-bottom) + 88px);
  max-width: 520px; margin: 0 auto; background: var(--ink); color: var(--bg); border-radius: 12px;
  padding: 12px 16px; font-weight: 600; text-align: center; transform: translateY(20px); opacity: 0;
  transition: .2s ease; pointer-events: none; }
#toast.show { transform: none; opacity: 1; }
#toast.err { background: var(--bad); color: #fff; }

.splash { min-height: 100dvh; display: flex; align-items: center; justify-content: center; }
.splash-logo { width: 160px; opacity: .9; }
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; max-width: 420px; margin: 0 auto; padding: 24px 16px; }
.auth .logo { width: 150px; margin: 0 auto 26px; display: block; }
.empty { text-align: center; color: var(--ink-3); padding: 26px 10px; }
.code-big { font-size: 40px; font-weight: 800; letter-spacing: 8px; text-align: center; direction: ltr; padding: 10px 0; }
.photo-viewer { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.photo-viewer img { max-width: 100%; max-height: 100%; border-radius: 14px; }
.photo-full { width: 100%; border-radius: 14px; display: block; }
.toolbar { display: flex; min-width: 0; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .input { width: auto; min-height: 40px; padding: 7px 10px; }
.check-row { display: flex; flex-wrap: wrap; gap: 6px; }
.check-row label { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-size: 14px; cursor: pointer; }
.spin { width: 22px; height: 22px; border: 3px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media print {
  .tabbar, .topbar .who, .no-print, #toast { display: none !important; }
  body { background: #fff; }
  .card, .list, .table-wrap { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- زرار اللغة ---------- */
.lang-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px;
  min-width: 40px; height: 34px; padding: 0 10px; font-weight: 800; font-size: 14px; cursor: pointer; flex: none; }
.auth-top { display: flex; justify-content: flex-end; margin-bottom: 8px; }

.server-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.server-note svg { width: 13px; height: 13px; }
.clock .status-line { display: flex; width: fit-content; margin: 12px auto 0; }

/* ---------- زرار البصمة ---------- */
.finger-btn { position: relative; width: 118px; height: 118px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #1fa463, var(--in) 70%); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 7px var(--in-soft), 0 10px 22px rgba(22,121,74,.28); transition: transform .12s ease; }
.finger-btn.out { background: radial-gradient(circle at 50% 35%, #33456e, var(--out) 70%);
  box-shadow: 0 0 0 7px var(--info-soft), 0 10px 22px rgba(31,42,68,.28); }
.finger-btn svg { width: 62px; height: 62px; position: relative; z-index: 1; }
.finger-btn:active { transform: scale(.95); }
.finger-btn .ring { position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--in); opacity: .5;
  animation: pulse 2.2s ease-out infinite; }
.finger-btn.out .ring { border-color: var(--out); }
@keyframes pulse { 0% { transform: scale(.95); opacity: .55; } 80%, 100% { transform: scale(1.22); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .finger-btn .ring { animation: none; } }
.finger-label { text-align: center; line-height: 1.4; }
.finger-label b { display: block; font-size: 18px; font-weight: 800; }
.finger-label span { font-size: 13px; color: var(--ink-3); }

/* ---------- الكاميرا (كادر واسع) ---------- */
.camera .frame { position: absolute; inset: 14px; border: 2px solid rgba(255,255,255,.55); border-radius: 18px; pointer-events: none; }
.camera .hint { position: absolute; top: calc(env(safe-area-inset-top) + 18px); inset-inline: 16px; text-align: center; font-weight: 800;
  text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.camera .hint small { display: block; font-weight: 600; font-size: 13px; opacity: .9; margin-top: 2px; }
.cam-clock { position: absolute; bottom: 24px; inset-inline-start: 26px; font-size: 22px; font-weight: 800;
  background: rgba(0,0,0,.45); padding: 2px 10px; border-radius: 8px; }
.camera .bar { flex-direction: column; align-items: stretch; }
.bar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.camera .btn.confirm { background: #fff; color: #111; flex: 1; }
.camera .btn.confirm:disabled { opacity: .35; }
.site-choose { margin-bottom: 14px; }
.site-q { font-weight: 800; margin-bottom: 8px; }
.site-chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 30vh; overflow-y: auto; }
.site-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08);
  color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.site-chip svg { width: 16px; height: 16px; }
.site-chip.on { background: #fff; color: #111; border-color: #fff; }

/* ---------- تعديل الوقت (المدير) ---------- */
.punch-row { align-items: flex-start; }
.col-btns { display: flex; flex-direction: column; gap: 6px; }
.edit-time { display: grid; grid-template-columns: 110px 1fr auto; gap: 6px; margin-top: 8px; }
.edit-time[hidden] { display: none; }
.edit-time .input { min-height: 38px; padding: 6px 8px; }

/* ---------- المرتب المحقّق ---------- */
.card.earn { background: linear-gradient(135deg, var(--gold-soft), var(--surface) 65%); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.earn-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.earn-title svg { width: 24px; height: 24px; }
.earn-amount { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 10px; direction: ltr; justify-content: flex-end; }
:root[dir="ltr"] .earn-amount { justify-content: flex-start; }
.earn-amount b { font-size: 40px; font-weight: 800; color: var(--gold-ink); line-height: 1; transition: transform .2s ease; }
.earn-amount b.pop { transform: scale(1.12); }
.earn-amount span { font-size: 18px; color: var(--ink-3); font-weight: 700; }
.earn-bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.earn-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f3d27a, var(--gold)); transition: width .3s ease; }
.earn-foot { font-size: 12px; margin-top: 6px; }
.earn-done { position: relative; margin-top: 18px; padding: 16px; border-radius: 16px; text-align: start;
  background: linear-gradient(135deg, var(--gold-soft), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.earn-plus { margin-top: 8px; font-weight: 800; color: var(--in); font-size: 18px; animation: rise .6s ease both .3s; }
.earn-plus small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
@keyframes rise { from { transform: translateY(8px); } to { transform: none; } }
.coin-fly { position: absolute; left: 50%; top: 40%; width: 28px; height: 28px; pointer-events: none; z-index: 2;
  animation: coin var(--d, 1.2s) cubic-bezier(.2,.7,.3,1) both; }
.coin-fly svg { width: 100%; height: 100%; }
@keyframes coin {
  0% { transform: translate(-50%, 30px) scale(.4) rotateY(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--x)), -140px) scale(1) rotateY(720deg); opacity: 0; }
}


/* ---------- الإضافي ---------- */
.ot-line { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px;
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--ink-2); }
.ot-line b { color: var(--ink); }
.ot-line.on { background: var(--in-soft); }
.ot-line.warn { background: var(--late-soft); }
.ot-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px;
  border-radius: 14px; background: var(--surface-2); margin-bottom: 14px; }
.ot-toggle .muted { font-size: 12px; }
.switch { flex: none; width: 52px; height: 30px; border-radius: 999px; border: 0; background: var(--line); position: relative; cursor: pointer; padding: 0; }
.switch span { position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s ease; }
.switch.on { background: var(--in); }
.switch.on span { inset-inline-start: 25px; }

/* لمسة دهبي */
.topbar { padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.clock .time { color: var(--ink); }
.clock .date { color: var(--gold-ink); font-weight: 600; }
.lang-btn { border-color: color-mix(in srgb, var(--gold) 45%, transparent); color: var(--gold-ink); }
.dot.in { background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.section-title h2 { position: relative; padding-inline-start: 10px; }
.section-title h2::before { content: ""; position: absolute; inset-inline-start: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 2px; background: var(--gold); }
.switch.on { background: var(--gold); }
.chip.present { background: var(--in-soft); color: var(--in); }
.demo-banner { background: var(--gold-soft); color: var(--gold-ink); }

/* كروت الخصومات والسلف في التفاصيل */
.money-card { margin-bottom: 12px; border-inline-start: 4px solid var(--bad); }
.money-card.adv { border-inline-start-color: var(--gold); }
.money-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 16px; }
.money-card .kv { font-size: 14px; }
.card.earn { position: relative; }
.month-btn { margin-top: 14px; justify-content: space-between; }
.month-btn::after { content: "‹"; font-size: 20px; line-height: 1; }
:root[dir="ltr"] .month-btn::after { content: "›"; }
.home-cards { margin-top: 14px; }
.home-cards .money-card:last-child { margin-bottom: 0; }

/* مربعات الشهر في الشاشة الرئيسية: 3 في الصف، والخصومات والسلف كل واحد نص الصف */
.home-stats { margin-top: 14px; }
.stats.tiles { grid-template-columns: repeat(6, 1fr); }
.stats.tiles .stat { grid-column: span 2; }
.stats.tiles .stat.wide { grid-column: span 3; border: 0; font: inherit; color: inherit; cursor: pointer; }
.stats.tiles .stat.wide:active { transform: scale(.98); }
.stat.gold b { color: var(--gold-ink); }
