/* Hadithne Schools components.
   Structure mirrors the Namaabloom app (nav, hero, pill tabs, cards, section labels,
   fields, stat cards, plan card, tables). Logical properties make RTL Arabic mirror. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); background: var(--cream); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; line-height: 1.6; }
html[lang="ar"] body, html[lang="ar"] input, html[lang="ar"] textarea, html[lang="ar"] button, html[lang="ar"] select, html[lang="ar"] label { font-family: var(--font-ar); }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dk); }
img { max-width: 100%; height: auto; }
svg.icon { width: 1em; height: 1em; flex-shrink: 0; stroke-width: 2; vertical-align: -0.15em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { color: var(--text); line-height: 1.3; }
p { margin: 0; }
small, .muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .8rem; font-weight: 400; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: -100px; background: var(--white); padding: 10px 16px; border-radius: var(--radius-sm); z-index: 300; }
.skip:focus { top: 10px; }
bdi { unicode-bidi: isolate; }

/* ── NAV ── */
.nav { background: var(--brand); padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 16px rgba(0, 0, 0, .18); }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); }
.nav-logo:hover { color: var(--white); }
.nav-logo-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--white); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.nav-logo-icon img { width: 40px; height: 40px; object-fit: contain; }
.nav-logo-text { line-height: 1.2; }
.nav-logo-text strong { display: block; font-size: 1.05rem; font-weight: 800; color: var(--white); letter-spacing: .2px; }
.nav-logo-text strong span { color: var(--yellow); }
.nav-logo-text small { display: block; font-family: var(--font-ui); font-size: .66rem; color: rgba(255, 255, 255, .7); letter-spacing: .4px; margin-top: 1px; }
html[lang="ar"] .nav-logo-text small { font-family: var(--font-ar); }
.nav-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.nav-chip, .nav-right > a, .nav-right summary { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; min-height: 34px; border-radius: 20px; font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: var(--white); text-decoration: none; cursor: pointer; font-family: inherit; }
.nav-right > a:hover, .nav-right summary:hover, .nav-chip:hover { background: rgba(255, 255, 255, .2); color: var(--white); }
.nav-cta { background: var(--accent) !important; border-color: transparent !important; color: var(--text) !important; font-weight: 700 !important; }
.nav-cta:hover { background: var(--yellow) !important; box-shadow: 0 3px 12px rgba(239, 167, 12, .45); }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); flex-shrink: 0; }
.nav-dot.warn { background: var(--yellow); }
.nav-dot.danger { background: #ff8a73; }
.nav-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .78rem; }
.nav-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--text); font-size: .68rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.nav-menu { position: relative; }
.nav-menu summary { list-style: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { background: rgba(255, 255, 255, .22); }
.nav-menu-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 220px; background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 8px; z-index: 200; border: 1px solid var(--border); }
.nav-menu-panel a, .nav-menu-panel button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: .84rem; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: start; font-family: inherit; }
.nav-menu-panel a:hover, .nav-menu-panel button:hover { background: var(--cream); }
.nav-menu-panel a[aria-current="true"] { background: var(--accent-lt); color: var(--accent-dk); }
.nav-menu-panel .menu-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); padding: 6px 12px 4px; }
.nav-menu-panel hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.nav-menu-panel form { margin: 0; }

/* ── HERO ── */
.hero { background: var(--brand); position: relative; overflow: hidden; padding: 52px 40px 84px; text-align: center; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; opacity: .14; background: var(--accent); }
.hero::before { width: 400px; height: 400px; top: -130px; inset-inline-start: -90px; }
.hero::after { width: 280px; height: 280px; bottom: -90px; inset-inline-end: -60px; }
.hero > * { position: relative; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 218, 72, .16); border: 1px solid rgba(255, 218, 72, .4); color: var(--yellow); border-radius: 20px; padding: 5px 14px; font-size: .76rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--white); line-height: 1.2; max-width: 640px; margin: 0 auto 12px; }
html[lang="ar"] .hero h1 { font-family: var(--font-ar); font-weight: 800; line-height: 1.4; }
.hero h1 .accent-text { color: var(--yellow); }
.hero p { color: rgba(255, 255, 255, .78); font-size: .92rem; max-width: 520px; margin: 0 auto; line-height: 1.8; }
.hero-meta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: var(--white); border-radius: 20px; padding: 4px 12px; font-size: .78rem; font-weight: 600; }

/* ── MAIN ── */
main { width: 100%; max-width: 900px; margin: -44px auto 64px; padding: 0 20px; position: relative; z-index: 2; flex: 1; }
main.wide { max-width: 1120px; }
body.plain main { margin-top: 36px; }
.stack > * + * { margin-top: 14px; }

/* ── CARDS ── */
.card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 28px 32px; margin-bottom: 20px; }
.card.compact { padding: 20px 24px; }
.card.soft { background: var(--cream); box-shadow: none; border: 1.5px solid var(--border); }
.card h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; }
.card h3 { font-size: 1rem; font-weight: 700; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.card-head p { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card, .grid-2 + .grid-2 { margin-top: 20px; }

/* ── TABS BAR ── */
.tabs-bar { display: flex; gap: 4px; padding: 6px; margin-bottom: 20px; border-radius: var(--radius-lg); overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--white); box-shadow: var(--shadow-md); }
.tabs-bar::-webkit-scrollbar { display: none; }
.tab { flex: 1; min-width: 96px; padding: 10px 12px; border-radius: 14px; font-size: .82rem; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .15s, color .15s; }
.tab:hover { background: var(--cream); color: var(--text); }
.tab[aria-current="page"] { background: var(--brand); color: var(--white); }
.tab svg.icon { width: 15px; height: 15px; }

/* ── SUBNAV (secondary pills) ── */
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.subnav a { padding: 7px 14px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--white); color: var(--muted); font-size: .8rem; font-weight: 600; text-decoration: none; }
.subnav a:hover { color: var(--text); border-color: var(--brand); }
.subnav a[aria-current="page"] { background: var(--accent-lt); border-color: var(--accent); color: var(--accent-dk); }

/* ── SECTION LABEL ── */
.section-label { display: flex; align-items: center; gap: 10px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-dk); margin-bottom: 18px; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
html[lang="ar"] .section-label { letter-spacing: 0; font-size: .8rem; }
.section-label .num { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; }

/* ── BUTTONS ── */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 10px 20px; border-radius: var(--radius-sm); border: 1.5px solid transparent; background: var(--brand); color: var(--white); font-family: var(--font-ui); font-size: .86rem; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, color .15s; }
html[lang="ar"] .btn, html[lang="ar"] button { font-family: var(--font-ar); font-weight: 700; }
.btn:hover, button:hover { background: var(--brand-lt); color: var(--white); }
.btn svg.icon, button svg.icon { width: 16px; height: 16px; }
.btn-accent, button.btn-accent { background: var(--accent); color: var(--text); }
.btn-accent:hover, button.btn-accent:hover { background: var(--yellow); color: var(--text); box-shadow: 0 3px 12px rgba(239, 167, 12, .35); }
.btn-ghost, button.btn-ghost, button.secondary, .btn.secondary { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover, button.btn-ghost:hover, button.secondary:hover, .btn.secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--white); }
.btn-danger, button.btn-danger, button.danger { background: transparent; border-color: var(--danger-line); color: var(--danger); }
.btn-danger:hover, button.btn-danger:hover, button.danger:hover { background: var(--danger-lt); color: var(--danger); }
.btn-link, button.btn-link, button.link { background: none; border: 0; padding: 0; min-height: auto; color: var(--brand); text-decoration: underline; font-weight: 600; }
.btn-link:hover, button.btn-link:hover, button.link:hover { background: none; color: var(--brand-dk); }
.btn-sm, button.btn-sm { min-height: 32px; padding: 5px 12px; font-size: .76rem; border-radius: 8px; }
.btn-block { width: 100%; }
button[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; }

/* ── FIELDS ── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, label.field-label, .field > span.label { font-size: .8rem; font-weight: 700; color: var(--brand-dk); }
.field .hint { margin-top: -2px; }
input, select, textarea { font: inherit; width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; color: var(--text); background: var(--cream); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(239, 167, 12, .18); background: var(--white); }
input[readonly] { background: #f4f4ef; color: var(--muted); cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); flex-shrink: 0; }
input[type="file"] { padding: 9px; background: var(--white); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; font-weight: 500; color: var(--text); line-height: 1.6; cursor: pointer; }
.check input { margin-top: 3px; }
fieldset { border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; margin: 0 0 16px; }
legend { font-size: .8rem; font-weight: 800; color: var(--brand-dk); padding: 0 6px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }

/* ── CHOICE TILES (Namaabloom level picker) ── */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.choice span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--cream); text-align: center; font-size: .86rem; font-weight: 700; color: var(--text); transition: all .15s; }
.choice span small { font-weight: 500; font-size: .74rem; color: var(--muted); }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-lt); color: var(--accent-dk); box-shadow: 0 0 0 2px rgba(239, 167, 12, .25); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice.word span { text-align: start; }

/* ── STATS ── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 20px 22px; display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--accent-lt); color: var(--accent-dk); }
.stat-icon.green { background: var(--ok-lt); color: var(--ok); }
.stat-icon svg.icon { width: 22px; height: 22px; }
.stat-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--brand-dk); line-height: 1.1; }
html[lang="ar"] .stat-value { font-family: var(--font-ar); font-weight: 800; }
.stat-value small { font-family: var(--font-body); font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat-label { font-size: .76rem; color: var(--muted); margin-top: 3px; }
.progress { height: 8px; border-radius: 6px; background: var(--border); overflow: hidden; margin-top: 8px; }
progress { width: 100%; height: 8px; border-radius: 6px; overflow: hidden; appearance: none; -webkit-appearance: none; border: 0; background: var(--border); }
progress::-webkit-progress-bar { background: var(--border); border-radius: 6px; }
progress::-webkit-progress-value { background: var(--brand); border-radius: 6px; }
progress::-moz-progress-bar { background: var(--brand); border-radius: 6px; }
progress.accent::-webkit-progress-value { background: var(--accent); }
progress.accent::-moz-progress-bar { background: var(--accent); }
meter { width: 100%; height: 10px; }

/* ── COVERAGE TILES ── */
.coverage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.coverage-item { background: var(--cream); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; }
.coverage-item.warn { border-color: rgba(239, 167, 12, .45); background: var(--accent-lt); }
.coverage-item.ok { border-color: rgba(59, 109, 17, .25); background: var(--ok-lt); }
.coverage-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--brand-dk); line-height: 1; }
html[lang="ar"] .coverage-num { font-family: var(--font-ar); font-weight: 800; }
.coverage-item.warn .coverage-num { color: var(--accent-dk); }
.coverage-item.ok .coverage-num { color: var(--ok); }
.coverage-lbl { font-size: .76rem; color: var(--muted); margin-top: 5px; line-height: 1.5; }

/* ── PLAN HERO ── */
.plan-hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--brand-dk), var(--brand)); color: var(--white); padding: 24px 28px; margin-bottom: 20px; box-shadow: var(--shadow-md); }
.plan-hero::before, .plan-hero::after { content: ""; position: absolute; border-radius: 50%; background: var(--accent); opacity: .16; }
.plan-hero::before { width: 220px; height: 220px; top: -90px; inset-inline-end: -50px; }
.plan-hero::after { width: 140px; height: 140px; bottom: -70px; inset-inline-start: 30%; opacity: .1; }
.plan-hero > * { position: relative; z-index: 1; }
.plan-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.plan-hero-identity { display: flex; align-items: center; gap: 14px; }
.plan-hero-icon { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center; color: var(--yellow); }
.plan-hero-icon svg.icon { width: 22px; height: 22px; }
.plan-hero-eyebrow { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255, 255, 255, .7); }
.plan-hero h2 { color: var(--white); font-size: 1.35rem; font-weight: 800; margin: 0; }
.plan-meta-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 18px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; background: rgba(255, 255, 255, .06); }
.plan-meta-row > div { padding: 10px 14px; font-size: .8rem; color: rgba(255, 255, 255, .78); }
.plan-meta-row > div + div { border-inline-start: 1px solid rgba(255, 255, 255, .16); }
.plan-meta-row strong { display: block; color: var(--white); font-size: .95rem; }
.plan-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 16px; }
.plan-hero .btn-ghost, .plan-hero button.btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, .35); }
.plan-hero .btn-ghost:hover, .plan-hero button.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: var(--white); }

/* ── PILLS / BADGES ── */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 20px; font-size: .74rem; font-weight: 700; background: var(--cream); color: var(--ink); border: 1px solid var(--border); white-space: nowrap; }
.pill.ok, .pill.done { background: var(--ok-lt); color: var(--ok); border-color: rgba(59, 109, 17, .25); }
.pill.warn { background: var(--accent-lt); color: var(--accent-dk); border-color: rgba(239, 167, 12, .4); }
.pill.danger { background: var(--danger-lt); color: var(--danger); border-color: var(--danger-line); }
.pill.brand { background: var(--brand); color: var(--white); border-color: var(--brand); }
.pill .nav-dot { width: 6px; height: 6px; }

/* ── BANNERS ── */
.flash, .notice-banner { display: flex; gap: 10px; align-items: flex-start; background: var(--ok-lt); border: 1px solid rgba(59, 109, 17, .25); color: #2c510c; padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 16px; font-size: .88rem; font-weight: 600; }
.error { display: flex; gap: 10px; align-items: flex-start; background: var(--danger-lt); border: 1px solid var(--danger-line); color: var(--danger); padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 16px; font-size: .88rem; font-weight: 600; }
.warn-banner { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-lt); border: 1px solid rgba(239, 167, 12, .45); color: #6a4700; padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 16px; font-size: .88rem; font-weight: 600; }
.flash svg.icon, .error svg.icon, .warn-banner svg.icon { width: 18px; height: 18px; margin-top: 2px; }
main > .flash { box-shadow: var(--shadow-sm); }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: start; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 10px 14px; border-bottom: 1.5px solid var(--border); white-space: nowrap; }
html[lang="ar"] th { letter-spacing: 0; font-size: .76rem; }
td { padding: 13px 14px; border-bottom: 1px solid var(--border); font-size: .88rem; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.cell-person { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-lt); color: var(--accent-dk); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.avatar.brand { background: var(--brand); color: var(--white); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ── LIST ROWS ── */
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row p { color: var(--muted); font-size: .8rem; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty-state .empty-art { width: 84px; margin: 0 auto 12px; }
.empty-state svg.icon { width: 44px; height: 44px; stroke-width: 1.5; margin-bottom: 10px; }
.empty-state h2, .empty-state h3 { color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: .9rem; line-height: 1.7; max-width: 440px; margin: 0 auto 16px; }

/* ── WORKFLOW STEPS (Namaabloom setup) ── */
.steps { list-style: none; display: grid; gap: 10px; }
.step { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-md); border: 1.5px solid var(--border); background: var(--cream); }
.step.is-current { border-color: var(--accent); background: var(--accent-lt); }
.step.is-done { background: var(--ok-lt); border-color: rgba(59, 109, 17, .25); }
.step-num { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: var(--white); border: 1.5px solid var(--border); flex-shrink: 0; }
.step.is-current .step-num { background: var(--accent); border-color: var(--accent); color: var(--text); }
.step.is-done .step-num { background: var(--ok); border-color: var(--ok); color: var(--white); }
.step-copy { flex: 1; }
.step-copy h3 { font-size: .95rem; }
.step-copy p { color: var(--muted); font-size: .82rem; }

/* ── STORY CARDS ── */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.story-card { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; }
.story-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--cream); }
.story-card .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.story-card h3 { font-size: .98rem; }
.story-card h3 a { color: var(--text); text-decoration: none; }
.story-card .body > .btn { margin-top: auto; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: .78rem; }
.meta-grid div { background: var(--cream); border-radius: 10px; padding: 8px 10px; }
.meta-grid dt { font-weight: 700; color: var(--brand-dk); }
.meta-grid dd { margin: 0; color: var(--muted); }
.word-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.word-chips li { background: var(--yellow-lt); border: 1px solid rgba(239, 167, 12, .35); color: #6a4700; border-radius: 20px; padding: 2px 10px; font-size: .8rem; font-weight: 600; }

/* ── CLASS CARDS ── */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.class-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.class-card h3 { font-size: 1.05rem; }
.class-card h3 a { color: var(--text); text-decoration: none; }
.class-card .class-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.class-card .btn { margin-top: auto; }

/* ── KEY / VALUE ── */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kv > div { background: var(--cream); border-radius: 12px; padding: 10px 14px; }
.kv dt { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
html[lang="ar"] .kv dt { letter-spacing: 0; text-transform: none; }
.kv dd { margin: 2px 0 0; font-weight: 700; color: var(--text); }

/* ── DETAILS DISCLOSURE ── */
details.disclosure { border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--cream); padding: 0 16px; }
details.disclosure + details.disclosure { margin-top: 10px; }
details.disclosure summary { cursor: pointer; font-weight: 700; padding: 12px 0; color: var(--brand-dk); }
details.disclosure[open] { padding-bottom: 14px; background: var(--white); }

/* ── CODE SHEET ── */
.code-sheet { text-align: center; }
.code-sheet .code { font-family: var(--font-ui); font-size: 2.2rem; letter-spacing: .25em; font-weight: 700; direction: ltr; color: var(--brand-dk); background: var(--accent-lt); border-radius: var(--radius-md); padding: 10px 18px; display: inline-block; }
.code-sheet img { width: 240px; margin: 12px auto; }

/* ── AUTH SHELL ── */
body.auth .hero { padding-bottom: 96px; }
.auth-card { max-width: 480px; margin: 0 auto 20px; }
.auth-card .auth-logo { display: flex; justify-content: center; margin: -62px auto 10px; }
.auth-card .auth-logo span { width: 76px; height: 76px; border-radius: 22px; background: var(--white); box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; }
.auth-card .auth-logo img { width: 62px; height: 62px; object-fit: contain; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border-radius: 14px; background: var(--cream); border: 1px solid var(--border); margin-bottom: 18px; }
.auth-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.auth-switch label { text-align: center; padding: 9px; border-radius: 10px; font-size: .84rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .78rem; margin: 16px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; font-size: .84rem; }
.auth-panel-signin, .auth-panel-register { display: none; }
#auth-tab-signin:checked ~ .auth-switch label[for="auth-tab-signin"], #auth-tab-register:checked ~ .auth-switch label[for="auth-tab-register"] { background: var(--brand); color: var(--white); }
#auth-tab-signin:checked ~ .auth-panel-signin, #auth-tab-register:checked ~ .auth-panel-register { display: block; }
#auth-tab-signin:focus-visible ~ .auth-switch label[for="auth-tab-signin"], #auth-tab-register:focus-visible ~ .auth-switch label[for="auth-tab-register"] { outline: 3px solid var(--focus); }

/* ── FOOTER ── */
.footer { padding: 26px 20px 30px; text-align: center; color: var(--muted); font-size: .8rem; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; }
.footer a { color: var(--muted); }

/* ── HOME (public) ── */
.home-hero { padding-bottom: 110px; }
.home-hero .hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.home-hero .btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, .4); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* ── PLATFORM ADMIN shared pieces (shell lives in admin.css) ── */
.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; justify-content: space-between; }
.toolbar form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.toolbar label { font-size: .8rem; font-weight: 700; color: var(--brand-dk); display: flex; flex-direction: column; gap: 6px; }
.segmented { display: inline-flex; padding: 5px; gap: 4px; border-radius: 14px; background: var(--white); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.segmented a { padding: 7px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: .8rem; color: var(--muted); }
.segmented a[aria-current="page"] { background: var(--brand); color: var(--white); }
.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.kpi { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 18px 20px; border-inline-start: 5px solid var(--brand); }
.kpi.yellow { border-inline-start-color: var(--accent); }
.kpi.ink { border-inline-start-color: var(--ink); }
.kpi.brown { border-inline-start-color: #743d2e; }
.kpi span { display: block; font-size: .74rem; color: var(--muted); font-weight: 700; }
.kpi strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--brand-dk); line-height: 1.3; }
html[lang="ar"] .kpi strong { font-family: var(--font-ar); font-weight: 800; }
.kpi small { color: var(--muted); font-size: .76rem; }
.table-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.table-head h2 { margin: 0; }
.count { background: var(--accent-lt); color: var(--accent-dk); border-radius: 20px; padding: 1px 10px; font-weight: 800; font-size: .76rem; }
.chart svg { width: 100%; height: auto; }
.chart .bar-started { fill: var(--lime); }
.chart .bar-completed { fill: var(--brand); }
.chart .axis { fill: var(--muted); font-size: 13px; }
.chart .grid-line { stroke: var(--border); }
.legend { display: flex; gap: 16px; font-size: .8rem; margin-top: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 6px; vertical-align: middle; }
.legend .started { background: var(--lime); }
.legend .completed { background: var(--brand); }
.hbar { display: grid; grid-template-columns: 150px 1fr 44px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .82rem; }
.steps-mini { display: inline-flex; gap: 4px; vertical-align: middle; }
.steps-mini span { width: 18px; height: 8px; border-radius: 4px; background: var(--border); }
.steps-mini span.done { background: var(--brand); }
.admin-main td, .admin-main th { white-space: nowrap; }
.admin-main td:first-child { white-space: normal; min-width: 140px; }

/* ── COMPONENT SWATCHES ── */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches span { padding: 12px 14px; border-radius: 12px; min-width: 130px; font-weight: 700; font-size: .8rem; border: 1px solid var(--border); }
.sw-brand { background: var(--brand); color: var(--white); }
.sw-accent { background: var(--accent); color: var(--text); }
.sw-yellow { background: var(--yellow); color: var(--text); }
.sw-cream { background: var(--cream); color: var(--ink); }
.sw-ink { background: var(--ink); color: var(--white); }
.sw-danger { background: var(--danger); color: var(--white); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
      }
@media (max-width: 720px) {
  .nav { padding: 10px 16px; flex-wrap: wrap; }
  .nav-user-name, .nav-label { display: none; }
  .hero { padding: 36px 20px 72px; }
  .card { padding: 22px 18px; }
  main { padding: 0 14px; }
  .tab { min-width: auto; }
  .hbar { grid-template-columns: 110px 1fr 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .nav, .footer, .tabs-bar, .no-print, .skip, .hero::before, .hero::after { display: none !important; }
  body { background: #fff; }
  .hero { background: #fff; padding: 10px; }
  .hero h1, .hero p { color: var(--text); }
  main { margin-top: 0; }
  .card { box-shadow: none; }
}

/* ── UTILITIES ── */
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.coverage-link { text-decoration: none; color: inherit; display: block; }
.coverage-link:hover { box-shadow: var(--shadow-sm); color: inherit; }
.coverage-name { font-weight: 800; color: var(--accent-dk); font-size: 1rem; }
.row-meter { min-width: 40%; text-align: end; }
.hero-slim { padding: 30px 20px 72px; }
.text-center { text-align: center; }
.danger-zone { border: 1.5px solid var(--danger-line); }
.danger-zone .section-label { color: var(--danger); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.qr-wrap img { width: 220px; height: 220px; }

/* ── Legal centre (Namaabloom legal layout) ── */
.legal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.legal-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 22px 20px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.legal-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.legal-card.active { border-color: var(--accent); background: var(--accent-lt); }
.legal-card h3 { font-size: .95rem; font-weight: 700; color: var(--brand-dk); margin: 0; }
.legal-card p { font-size: .8rem; color: var(--muted); line-height: 1.6; margin: 0; }
.legal-card-arrow { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; font-size: .8rem; font-weight: 600; color: var(--accent-dk); }
.legal-card-arrow svg.icon { width: 14px; height: 14px; }
.legal-doc { padding: 36px clamp(20px, 5vw, 44px); }
.legal-section { margin-bottom: 32px; }
.legal-section h2 { display: inline-block; font-size: 1.05rem; font-weight: 700; color: var(--brand-dk); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.legal-section p, .legal-section li { font-size: .92rem; line-height: 1.85; color: var(--ink); margin: 0 0 10px; }
.legal-section ul { padding-inline-start: 22px; margin: 0 0 10px; }
.legal-section li { margin-bottom: 4px; }
.legal-section a, .legal-footer a, .price-notes a { color: var(--accent-dk); font-weight: 600; }
.legal-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); }

/* ── Pricing (Namaabloom plans page) ── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow-sm); }
.price-card.featured { border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
.price-tier { font-family: var(--font-ui); font-size: .72rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent-dk); margin: 0 0 10px; }
.price-amount { display: flex; align-items: flex-start; gap: 2px; color: var(--brand-dk); }
[dir="rtl"] .price-amount[dir="ltr"] { justify-content: flex-end; }
.price-currency { font-size: 1.2rem; font-weight: 700; margin-top: 6px; }
.price-num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1.1; }
.price-per { font-size: .8rem; color: var(--muted); margin: 4px 0 12px; }
.price-desc { font-size: .9rem; color: var(--ink); margin: 0; }
.price-divider { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.price-features { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; flex: 1; }
.price-features li { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: var(--text); }
.price-features svg.icon { flex: none; width: 18px; height: 18px; color: var(--brand); margin-top: 2px; }
.price-notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.price-notes li { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--ink); }
.price-notes svg.icon { flex: none; width: 18px; height: 18px; color: var(--accent-dk); margin-top: 3px; }
