:root {
  --blue: #1a3a6b;
  --blue-2: #244f87;
  --blue-3: #0d2140;
  --yellow: #ffca1a;
  --yellow-2: #ffe78a;
  --ink: #0f172a;
  --muted: #60718b;
  --card: rgba(255, 255, 255, .94);
  --card-dark: rgba(10, 26, 49, .72);
  --line: rgba(255, 202, 26, .24);
  --line-soft: rgba(26, 58, 107, .14);
  --danger: #c64133;
  --success: #207a55;
  --warning: #a4620c;
  --shadow: 0 24px 80px rgba(6, 18, 38, .24);
  --radius: 22px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html { background: var(--blue-3); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 202, 26, .34), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .18), transparent 28%),
    linear-gradient(135deg, #071831 0%, #1a3a6b 46%, #244f87 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.ambient { position: fixed; z-index: -1; width: 440px; height: 440px; border-radius: 999px; filter: blur(28px); opacity: .34; pointer-events: none; }
.ambient-1 { top: 12%; left: -160px; background: rgba(255, 202, 26, .62); }
.ambient-2 { right: -180px; bottom: 8%; background: rgba(255, 255, 255, .28); }

button, input, select, textarea { font: inherit; }
button { border: 0; min-height: 44px; padding: 12px 16px; border-radius: 999px; font-weight: 900; cursor: pointer; }
button:disabled { cursor: wait; opacity: .72; }
input, select, textarea { width: 100%; margin-top: 7px; border: 1px solid var(--line-soft); border-radius: 16px; padding: 14px 15px; color: var(--ink); background: rgba(255,255,255,.92); outline: none; font-weight: 400; }
input:focus, select:focus, textarea:focus { border-color: rgba(255, 202, 26, .9); box-shadow: 0 0 0 4px rgba(255, 202, 26, .22); }
label { color: #34445d; font-size: 13px; font-weight: 850; }
.login-form label, .task-form label { display: grid; gap: .35rem; font-weight: 800; color: #1f2937; }

h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { max-width: 760px; margin: 0; color: #fff; font-size: clamp(44px, 8vw, 88px); line-height: .92; text-shadow: 0 18px 42px rgba(2, 8, 20, .28); }
h2 { margin: 0 0 16px; color: var(--blue-3); font-size: 24px; }
h3 { margin: 0; color: var(--blue-3); }
.subtitle { max-width: 690px; margin: 18px 0 24px; color: rgba(255,255,255,.82); font-size: 1.04rem; line-height: 1.65; }
.login-utility { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 20px; }
.login-card-head h2 { font-size: 23px; }
.utility-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 10px 14px; color: #fff; background: rgba(8, 25, 50, .34); border: 1px solid rgba(255, 202, 26, .28); border-radius: 16px; box-shadow: 0 14px 28px rgba(8, 25, 50, .18); font-weight: 500; }
.utility-btn:hover, .utility-btn:focus-visible { background: rgba(8, 25, 50, .5); }
.utility-btn[hidden] { display: none !important; }
.install-btn.install-ready { background: rgba(255, 202, 26, .96); color: var(--blue); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: clamp(18px, 4vw, 56px); }
.login-shell { width: min(100%, 1120px); display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, .72fr); gap: clamp(18px, 4vw, 34px); align-items: center; }
.login-copy { position: relative; color: #fff; min-width: 0; }
.brand-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(24px, 5vw, 54px); }
.brand-mark { display: grid; place-items: center; flex: 0 0 auto; width: 58px; height: 58px; color: var(--blue); background: var(--yellow); border-radius: 22px; box-shadow: 0 18px 44px rgba(255, 202, 26, .32); font-weight: 950; }
.brand-lockup strong { display: block; color: #fff; font-size: 1.02rem; }
.brand-lockup small { display: block; margin-top: 2px; color: rgba(255,255,255,.72); font-weight: 700; }
.eyebrow { display: inline-flex; margin: 0 0 12px; padding: 7px 11px; color: var(--blue); background: var(--yellow); border-radius: 999px; font-size: 12px; font-weight: 950; line-height: 1; text-transform: uppercase; letter-spacing: .08em; }

.login-card, .hero, .panel, .tabs, .sync-status { background: var(--card); border: 1px solid rgba(255, 202, 26, .26); border-radius: var(--radius); box-shadow: var(--shadow); }
.login-card { padding: clamp(16px, 2.6vw, 24px); border-radius: 18px; }
.login-card-head { display: block; margin-bottom: 14px; }
.login-card-head h2 { margin: 0; }
.auth-card .login-card-head p, .form-hint { margin: .25rem 0 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.login-form, .task-form { display: grid; gap: 14px; }
button[type="submit"], .primary { width: 100%; color: var(--blue-3); background: var(--yellow); box-shadow: 0 14px 34px rgba(255, 202, 26, .35); }
.secondary { width: 100%; color: var(--blue); background: #edf3fb; }
.error { margin: 0; color: var(--danger); font-weight: 800; }

.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .75rem 0; padding: .3rem; border-radius: 999px; background: rgba(15, 23, 42, .06); }
.auth-tabs button { border-radius: 999px; padding: .58rem .55rem; background: transparent; color: #334155; font-weight: 800; min-height: 38px; }
.auth-tabs button.active { background: #fff; color: #12366d; box-shadow: 0 10px 24px rgba(15, 23, 42, .12); }
.captcha-row { display: grid; grid-template-columns: 1fr minmax(100px, 140px); gap: .6rem; align-items: center; border: 1px solid rgba(15, 23, 42, .12); border-radius: 16px; padding: .55rem .7rem; background: rgba(255, 255, 255, .72); }
.captcha-row span { font-weight: 900; color: #12366d; }

.login-prayer-widget { position: relative; max-width: 860px; padding: 13px; border: 1px solid rgba(255, 202, 26, .22); border-radius: 20px; background: rgba(8, 25, 50, .28); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.prayer-widget-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.prayer-widget-copy { min-width: 0; }
.prayer-caption { margin-bottom: 8px; color: rgba(255,255,255,.9); font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; text-align: left; }
.prayer-helper-text { margin: 0; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.5; text-align: left; }
.prayer-location-btn { flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 15px; font-size: 18px; }
.prayer-strip { display: grid; grid-template-columns: repeat(7, minmax(62px, 1fr)); gap: 6px; }
.prayer-time-item { display: grid; gap: 2px; min-height: 50px; padding: 7px 6px; border: 1px solid rgba(255,255,255,.11); border-radius: 14px; background: rgba(7, 24, 49, .48); text-align: center; }
.prayer-time-item span { color: rgba(255,255,255,.66); font-size: 10px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.prayer-time-item strong { color: #fff; font-size: 17px; line-height: 1; }
.prayer-time-item.next { border-color: rgba(255, 202, 26, .75); background: linear-gradient(160deg, rgba(255, 202, 26, .96), rgba(255, 231, 138, .92)); box-shadow: 0 10px 28px rgba(255, 202, 26, .24); }
.prayer-time-item.next span, .prayer-time-item.next strong { color: var(--blue); }
.prayer-time-item.is-loading { grid-column: 1 / -1; }
.quick-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.guide-card { padding: 9px 11px; border: 1px solid rgba(255, 202, 26, .26); border-radius: 12px; background: rgba(8, 25, 50, .22); }
.guide-card h3 { margin: 0 0 4px; color: rgba(255,255,255,.95); font-size: 12px; font-weight: 800; }
.guide-card p { margin: 0; color: rgba(255,255,255,.74); font-size: 11px; line-height: 1.45; }

.app { width: min(100%, 1120px); margin: 0 auto; padding: clamp(14px, 3vw, 32px); }
.hero { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: clamp(18px, 4vw, 28px); margin-bottom: 14px; background: rgba(255,255,255,.95); }
.hero-topline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.hero .eyebrow { margin: 0; }
.hero-date { margin: 0; color: var(--muted); font-size: 14px; font-weight: 850; }
.hero h1 { color: var(--blue-3); font-size: clamp(30px, 4.6vw, 54px); text-shadow: none; }
.hero-motivation { max-width: 680px; margin: 8px 0 0; color: var(--muted); font-size: clamp(14px, 2vw, 17px); line-height: 1.45; }
.hero-motivation.quote-text { font-style: italic; font-weight: 400; }
.icon-btn, .small-btn { color: var(--blue); background: var(--yellow); white-space: nowrap; }
.icon-btn.danger, .danger, button.danger { background: #fee2e2; color: #991b1b; }

.tabs { position: sticky; top: 10px; z-index: 3; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; padding: 10px; margin-bottom: 12px; background: rgba(8, 25, 50, .58); backdrop-filter: blur(14px); }
.tabs button { flex: 0 1 auto; min-width: 112px; min-height: 42px; padding: 10px 16px; color: rgba(255,255,255,.78); background: transparent; border-radius: 999px; font-size: 13px; }
.tabs button.active { color: var(--blue); background: var(--yellow); box-shadow: 0 10px 24px rgba(255, 202, 26, .18); }

.sync-status { margin: 12px 0 14px; padding: 12px 14px; color: rgba(255,255,255,.82); background: rgba(8, 25, 50, .42); font-size: 13px; }
.panel { display: none; padding: clamp(16px, 3vw, 24px); }
.panel.active { display: block; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card, .child-card, .task-card, .mini-card, .score-card { border: 1px solid var(--line-soft); border-radius: 18px; background: rgba(255,255,255,.72); }
.stat-card { min-height: 112px; padding: 18px; text-align: left; }
.stat-card span { display: block; color: var(--blue); font-size: 40px; font-weight: 950; line-height: 1; }
.stat-card small { display: block; margin-top: 8px; color: var(--muted); font-weight: 850; }
.stat-filter { width: 100%; font: inherit; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.stat-filter:hover, .stat-filter:focus-visible, .stat-filter.active { border-color: rgba(255, 202, 26, .95); box-shadow: 0 12px 30px rgba(20, 39, 84, .12); transform: translateY(-1px); }
.stat-filter.active { background: rgba(255, 202, 26, .13); }

.children-summary, .task-list, .mini-list { display: grid; gap: 12px; }
.child-card, .task-card, .mini-card { padding: 16px; }
.child-card h3, .task-card h3 { margin: 0 0 6px; }
.child-card p, .task-card p { margin: 0 0 10px; color: var(--muted); line-height: 1.5; }
.child-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.child-point-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.points-badge, .task-points { display: inline-flex; align-items: center; min-height: 26px; padding: 6px 10px; border-radius: 999px; color: var(--blue); background: var(--yellow); font-size: 13px; line-height: 1; white-space: nowrap; box-shadow: 0 8px 18px rgba(255, 202, 26, .24); }
.redeem-btn { min-height: 32px; padding: 6px 12px; background: #f59e0b; color: #fff; font-size: 12px; box-shadow: none; }
.children-heading { display: grid; gap: 4px; margin: 0 0 14px; }
.children-heading h2 { margin: 0; }
.children-heading p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 400; }
.children-encouragement { margin: 16px 0 0; padding: 14px 16px; color: rgba(255,255,255,.9); background: rgba(8, 25, 50, .36); border: 1px solid rgba(255, 202, 26, .22); border-radius: 18px; font-size: 12px; line-height: 1.55; }
.child-card-button { cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.child-card-button:hover, .child-card-button:focus { border-color: rgba(255, 202, 26, .88); box-shadow: 0 12px 30px rgba(6, 18, 38, .12); transform: translateY(-1px); outline: none; }
.progress { height: 9px; overflow: hidden; border-radius: 999px; background: #dce8f6; }
.progress span { display: block; height: 100%; background: var(--yellow); }

.alert-box { margin: 0 0 20px; padding: 16px; border: 1px solid rgba(255, 202, 26, .38); border-radius: 18px; background: #fff8df; color: var(--blue-3); }
.alert-box h3 { margin: 0 0 8px; }
.alert-box p { margin: 6px 0; color: #40516b; }
#taskProposalAlertBox { cursor: pointer; }
#taskProposalAlertBox:hover { box-shadow: 0 10px 24px rgba(20, 39, 84, .12); }
.scoreboard { margin-top: 18px; padding: 16px; border: 1px solid var(--line-soft); border-radius: 18px; background: rgba(255,255,255,.64); }
.scoreboard h2 { margin-bottom: 6px; }
.scoreboard > p { margin: 0 0 12px; color: var(--muted); }
.scoreboard-list { display: grid; gap: 10px; }
.score-card { display: grid; gap: 6px; padding: 12px 14px; }
.score-card.self { border-color: rgba(255, 202, 26, .8); background: rgba(255, 202, 26, .1); }
.score-card .rank { width: fit-content; padding: 4px 9px; border-radius: 999px; background: #edf3fb; color: var(--blue); font-size: 12px; font-weight: 900; }
.score-card small { color: var(--muted); font-weight: 700; }
.compact-scoreboard-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.compact-score-card { align-content: start; min-height: 110px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(165deg, rgba(237, 243, 251, .9), rgba(255, 255, 255, .95)); }
.compact-score-card strong { margin-top: 2px; font-size: 17px; line-height: 1.25; color: var(--blue-3); }
.compact-score-card .score-points { font-size: 15px; font-weight: 900; color: var(--blue); }

.form-row, .filters { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.filter-item { min-width: 0; }
.filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bill-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
.bill-stats { grid-template-columns: repeat(3, 1fr); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.form-stack { display: grid; gap: 22px; }
.form-section { display: grid; gap: 12px; }
.form-section + .form-section { padding-top: 20px; border-top: 1px solid var(--line-soft); }
.form-section h2 { margin: 0; }
.redemptions-panel { display: grid; gap: 18px; }
.redemptions-panel .form-section { gap: 14px; }
.redemptions-panel .section-head { margin: 4px 0 0; }
.redemptions-panel .section-head h2 { margin: 0; line-height: 1.1; }
.redemptions-panel .redeem-action { margin: 0; gap: 10px; }
.redemptions-panel .redeem-action p { margin: 0; }
.redemptions-panel .task-list { margin-top: 0; }
.account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.account-grid .form-section + .form-section { padding-top: 0; border-top: 0; }
.danger-zone { border-color: #fee2e2; }

.choice-fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 10px; border: 1px solid var(--line-soft); border-radius: 18px; }
.choice-fieldset legend { padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 900; }
.radio-card, .check-row { display: flex !important; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 15px; background: rgba(255,255,255,.72); }
.radio-card input, .check-row input { width: auto; margin: 0; }

.meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.pill { border-radius: 999px; padding: 6px 10px; background: #edf3fb; color: #455873; font-size: 12px; font-weight: 850; }
.status-Selesai, .status-Sudah-Dibayar, .status-APPROVED { background: #dff1e6; color: var(--success); }
.status-Belum, .status-Belum-Dibayar, .status-PENDING, .due-soon { background: #fff0cc; color: var(--warning); }
.status-REJECTED, .due-overdue { background: #f8dfd9; color: var(--danger); }
.due-today { background: #fff0cc; color: var(--blue); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.actions button, .mini-card button { min-height: 38px; padding: 8px 12px; color: var(--blue); background: #edf3fb; font-size: 12px; }
.actions button.danger { color: var(--danger); background: #f6e2de; }

.task-description { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.task-child-meta { display: grid; gap: 10px; margin-top: 10px; }
.task-inline-text { margin: 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.child-task-actions { margin-top: 0; justify-content: flex-start; }
.child-compact-card { padding: 14px 16px; }
.child-compact-card h3 { margin-bottom: 8px; }
.compact-child-meta { gap: 8px; }
.task-compact-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.task-compact-row-date .task-inline-text { font-weight: 800; }
.task-compact-row-action { justify-content: space-between; gap: 12px; }
.task-compact-row-action .task-inline-text { display: inline-flex; align-items: center; gap: 8px; }
.child-compact-card .task-points { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(255, 202, 26, .95); color: var(--blue); box-shadow: 0 10px 24px rgba(255, 202, 26, .22); }
.child-compact-card .actions button { min-height: 40px; padding: 10px 18px; }
.chore-card { display: grid; gap: 6px; padding: 13px 14px; }
.chore-card .meta { margin: 0; align-items: center; }
.chore-actions { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; justify-content: flex-end; margin: 0 0 0 auto; }
.chore-actions button { min-height: 34px; border-radius: 16px; }
.chore-actions .icon-btn, .bill-actions .icon-btn { display: inline-grid; place-items: center; flex: 0 0 38px; width: 38px; min-height: 38px; padding: 0; border-radius: 13px; font-size: 16px; line-height: 1; }

.bill-card { display: grid; gap: 9px; padding: 12px 14px; }
.bill-main { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.bill-main small { color: var(--muted); font-size: 14px; line-height: 1.3; }
.bill-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bill-meta { margin: 0; min-width: 0; }
.bill-actions { display: flex; gap: 8px; flex: 0 0 auto; margin-top: 0; }
.bill-check { display: flex; align-items: center; gap: 10px; width: fit-content; margin-bottom: 0; color: var(--blue-3); cursor: pointer; }
.bill-check input { position: absolute; opacity: 0; pointer-events: none; }
.bill-check span { display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid #cfd8e8; border-radius: 7px; background: #fff; }
.bill-check input:checked + span { border-color: var(--yellow); background: var(--yellow); }
.bill-check input:checked + span::after { content: ""; width: 10px; height: 6px; border: solid var(--blue); border-width: 0 0 3px 3px; transform: rotate(-45deg) translateY(-1px); }
.bill-check input:focus-visible + span { outline: 3px solid rgba(255, 202, 26, .32); outline-offset: 2px; }
.due-card-overdue { border-color: rgba(198, 65, 51, .35); }
.due-card-today, .due-card-soon { border-color: rgba(255, 202, 26, .7); }

.redeem-action { display: grid; gap: .75rem; margin: 1rem 0; }
.mini-card { display: grid; gap: .35rem; background: rgba(255, 255, 255, .86); box-shadow: 0 12px 28px rgba(15, 23, 42, .08); }
.mini-card span { color: #64748b; }

.app-dialog { border: 0; padding: 0; border-radius: 24px; background: transparent; }
.app-dialog::backdrop { background: rgba(2, 8, 23, .58); backdrop-filter: blur(6px); }
.dialog-card { width: min(92vw, 440px); display: grid; gap: 14px; padding: 24px; border: 1px solid rgba(255, 202, 26, .26); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.dialog-card h2 { margin-bottom: 0; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.install-guide-list { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.55; font-size: 14px; }
.install-guide-list li + li { margin-top: 8px; }

.floating-chat { position: fixed; left: 14px; bottom: 14px; z-index: 50; display: grid; gap: 8px; }
.floating-chat-toggle { width: 46px; min-height: 46px; height: 46px; padding: 0; border-radius: 999px; display: inline-grid; place-items: center; background: rgba(255, 202, 26, .95); color: var(--blue-3); font-size: 20px; line-height: 1; box-shadow: 0 10px 28px rgba(6, 18, 38, .26); }
.floating-chat-panel { width: min(92vw, 320px); display: grid; gap: 8px; padding: 10px; border: 1px solid rgba(255, 202, 26, .26); border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.floating-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.floating-chat-head button { min-height: 30px; padding: 6px 10px; border-radius: 10px; font-size: 12px; }
.chat-presence { color: #39506f; font-size: 11px; }
.floating-chat-messages { max-height: 260px; overflow: auto; display: grid; gap: 6px; padding-right: 2px; }
.chat-item { padding: 7px 9px; border-radius: 10px; background: #edf3fb; font-size: 12px; line-height: 1.4; }
.chat-item.mine { background: rgba(255, 202, 26, .24); }
.chat-item small { display: block; color: #5a6b86; font-size: 10px; }
.floating-chat-form { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.floating-chat-form input { margin-top: 0; padding: 10px 12px; border-radius: 10px; }
.floating-chat-form button { min-height: 38px; padding: 8px 12px; border-radius: 10px; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  h1 { font-size: clamp(40px, 12vw, 68px); }
  .login-copy { order: 1; }
  .login-card { order: 2; }
  .prayer-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-grid { grid-template-columns: 1fr; }
  .account-grid .form-section + .form-section { padding-top: 20px; border-top: 1px solid var(--line-soft); }
}

@media (max-width: 640px) {
  .login-page { padding: 14px; align-items: start; }
  .login-utility { justify-content: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
  .utility-btn { min-height: 38px; padding: 9px 12px; font-size: 12px; }
  .brand-lockup { margin-bottom: 24px; }
  .login-card { padding: 20px; border-radius: 24px; }
  .auth-card.compact-auth .auth-panel { display: none !important; }
  .auth-card.compact-auth .auth-tabs { margin-bottom: 0; }
  .auth-tabs { grid-template-columns: 1fr; border-radius: 20px; }
  .captcha-row { grid-template-columns: 1fr; }
  .prayer-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-guide { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; }
  .tabs { top: 0; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 8px; border-radius: 18px; scroll-snap-type: x mandatory; }
  .tabs button { min-width: max-content; padding-inline: 14px; font-size: 12px; scroll-snap-align: start; }
  .form-row, .filters, .choice-fieldset { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 76px; padding: 10px; border-radius: 14px; }
  .stat-card span { font-size: 30px; }
  .stat-card small { margin-top: 5px; font-size: 10px; line-height: 1.15; }
  .child-card-head { align-items: flex-start; }
  .child-point-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 54%; }
  .points-badge, .redeem-btn { font-size: 11px; }
  .bill-row { align-items: flex-start; }
  .bill-actions .icon-btn { width: 32px; min-height: 32px; }
  .dialog-actions { grid-template-columns: 1fr; }
  .compact-scoreboard-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .compact-scoreboard-list { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .prayer-widget-head { align-items: flex-start; }
  .prayer-location-btn { flex-basis: 40px; width: 40px; min-height: 40px; }
  .prayer-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
