/* Minara web portal & landing page — identity taken from the approved app screens. RTL first.
   Colors and fonts come from brand.css (generated from minara.config.json). */
:root {
  --brown: var(--brand-primary);
  --brown-dark: var(--brand-primary-dark);
  --brown-deep: var(--brand-primary-deep);
  --ink: var(--brand-ink);
  --muted: var(--brand-muted);
  --cream: var(--brand-background);
  --sand: var(--brand-surface-alt);
  --border: var(--brand-border);
  --white: var(--brand-surface);
  --emerald: var(--brand-success);
  --green: var(--brand-excellent);
  --gold: var(--brand-gold);
  --red: var(--brand-danger);
  --gray: var(--brand-neutral);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(94, 68, 38, .08);
  --shadow-lg: 0 24px 60px rgba(94, 68, 38, .14);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%238C6A43' stroke-opacity='.13' stroke-width='1.2'%3E%3Crect x='22' y='22' width='28' height='28'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='6'/%3E%3Cpath d='M0 36h8M64 36h8M36 0v8M36 64v8'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--brand-font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .kufi { font-family: var(--brand-font-heading); line-height: 1.5; margin: 0 0 .4em; }
a { color: var(--brown); text-decoration: none; }
a:hover { color: var(--brown-dark); }
img { max-width: 100%; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; color: var(--brown-deep); }
.brand-mark { width: 44px; height: 44px; flex: none; color: var(--brown-dark); }
.brand-name { font-family: var(--brand-font-heading); font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.brand-sub { font-size: .78rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px; padding: 11px 22px;
  font: 700 .95rem "Noto Sans Arabic", sans-serif; cursor: pointer; transition: .18s ease;
  text-align: center; white-space: nowrap;
}
.btn-primary { background: var(--brown); color: #fff; box-shadow: 0 8px 20px rgba(140, 106, 67, .25); }
.btn-primary:hover { background: var(--brown-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { border-color: var(--brown); color: var(--brown); background: transparent; }
.btn-outline:hover { background: var(--brown); color: #fff; }
.btn-ghost { background: var(--sand); color: var(--brown-dark); }
.btn-ghost:hover { background: var(--border); }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-sm { padding: 6px 14px; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Landing ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(247, 242, 234, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.topnav { display: flex; align-items: center; gap: 22px; }
.topnav a:not(.btn) { color: var(--ink); font-weight: 600; font-size: .95rem; }
.topnav a:not(.btn):hover { color: var(--brown); }

.hero { position: relative; overflow: hidden; padding: 72px 0 96px; background: var(--pattern), radial-gradient(ellipse at 15% 20%, #fff 0, var(--cream) 55%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 120px; background: linear-gradient(to bottom, transparent, var(--cream)); pointer-events: none; }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--brown-dark); font-weight: 700; font-size: .85rem; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); color: var(--brown-deep); margin: 18px 0 14px; }
.hero h1 .accent { color: var(--brown); }
.hero p.lead { font-size: 1.15rem; color: #5b4d3d; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.ayah { margin-top: 30px; padding: 14px 18px; border-inline-start: 4px solid var(--gold); background: rgba(255, 255, 255, .7); border-radius: 12px; font-family: "Amiri", "Noto Naskh Arabic", serif; font-size: 1.25rem; color: var(--brown-deep); max-width: 560px; }
.ayah small { display: block; font-family: var(--brand-font-body); font-size: .8rem; color: var(--muted); }

.phone-mock { background: #1f1a14; border-radius: 38px; padding: 12px; box-shadow: var(--shadow-lg); max-width: 330px; margin-inline: auto; transform: rotate(-3deg); }
.phone-screen { background: var(--cream); border-radius: 28px; padding: 22px 16px; min-height: 520px; }
.mock-title { text-align: center; font-weight: 800; font-family: var(--brand-font-heading); margin-bottom: 12px; }
.mock-chips { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.mock-chip { padding: 5px 12px; border-radius: 999px; font-size: .75rem; background: #fff; border: 1px solid var(--border); }
.mock-chip.on { background: var(--brown); color: #fff; border-color: var(--brown); }
.mock-card { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.mock-big { text-align: center; font-size: 2rem; font-weight: 800; color: var(--brown); line-height: 1.1; }

.stats-strip { margin-top: -48px; position: relative; z-index: 2; }
.stats-strip .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-tile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); text-align: center; }
.stat-tile .num { font: 800 2rem "Noto Kufi Arabic"; color: var(--brown); line-height: 1.2; }
.stat-tile .lbl { color: var(--muted); font-size: .9rem; }

.section { padding: 84px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 42px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--brown-deep); }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-alt { background: #fff; border-block: 1px solid var(--border); }

.role-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.role-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 28px 22px 24px; display: flex; flex-direction: column; gap: 10px; transition: .2s ease; overflow: hidden; }
.role-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--c, var(--brown)); }
.role-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.role-icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--brown)) 12%, white); color: var(--c, var(--brown)); }
.role-icon svg { width: 30px; height: 30px; }
.role-card h3 { font-size: 1.15rem; margin: 6px 0 0; }
.role-card p { color: var(--muted); font-size: .92rem; margin: 0 0 8px; flex: 1; }
.role-card .btn { margin-top: auto; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 26px; border-radius: 18px; background: var(--cream); border: 1px solid var(--border); }
.feature .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--brown); margin-bottom: 12px; box-shadow: var(--shadow); }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--muted); margin: 0; font-size: .93rem; }

.cta-band { background: linear-gradient(120deg, var(--brown-dark), var(--brown)); color: #fff; border-radius: 26px; padding: 44px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 24px; align-items: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset: 0; background: var(--pattern); opacity: .35; filter: invert(1); pointer-events: none; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .85); margin: 0; }
.store-badges { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.store-item { display: flex; align-items: center; gap: 10px; }
.store-badge.is-live { text-decoration: none; position: relative; overflow: hidden; }
.store-badge.is-live::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%);
  transform: translateX(110%); transition: transform .9s cubic-bezier(.16, 1, .3, 1);
}
.store-badge.is-live:hover::after { transform: translateX(-110%); }
.store-badge.is-live:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.store-qr { width: 84px; height: 84px; padding: 5px; border-radius: 12px; background: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .22); image-rendering: pixelated; }
@media (max-width: 1023.98px) { .store-qr { display: none; } }
@media (min-width: 1024px) { .cta-band { grid-template-columns: minmax(0, 1fr) auto; } .store-badges { flex-wrap: nowrap; } }
@media (max-width: 520px) { .topbar .brand-sub { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  min-width: 178px; padding: 10px 18px 10px 16px;
  border-radius: 14px; text-decoration: none; cursor: default;
}
.store-badge-dark { background: #0d0d0d; color: #fff; border: 1px solid rgba(255, 255, 255, .28); box-shadow: 0 10px 24px rgba(0, 0, 0, .28); }
.store-badge-light { background: #fff; color: var(--brown-deep); border: 1px solid #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); cursor: pointer; }
.store-badge-light .store-logo { color: var(--brown); }
.store-logo { width: 30px; height: 30px; flex: none; }
.store-text { display: flex; flex-direction: column; line-height: 1.2; text-align: start; }
.store-text small { font-size: .7rem; font-weight: 500; opacity: .75; }
.store-text b { font-size: 1.12rem; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.store-badge-dark .store-text b { font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif; }

.footer { background: var(--brown-deep); color: rgba(255, 255, 255, .78); padding: 44px 0 26px; margin-top: 84px; }
.footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer h4 { color: #fff; font-size: 1rem; }
.footer a { color: rgba(255, 255, 255, .78); }
.footer a:hover { color: #fff; }
.footer .brand, .footer .brand-sub { color: #fff; }
.footer .brand-mark { color: var(--gold); }
.copyright { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 28px; padding-top: 18px; text-align: center; font-size: .85rem; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, var(--brown-dark), var(--brown)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; inset: 0; background: var(--pattern); opacity: .4; filter: invert(1); }
.auth-side > * { position: relative; z-index: 1; }
.auth-side .brand, .auth-side .brand-sub { color: #fff; }
.auth-side .brand-mark { color: var(--gold); }
.auth-side h2 { color: #fff; font-size: 2rem; }
.auth-main { display: grid; place-items: center; padding: 40px 20px; background: var(--pattern), var(--cream); }
.auth-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 34px 30px; box-shadow: var(--shadow-lg); }
.role-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.role-switch a { flex: 1; text-align: center; padding: 8px 6px; border-radius: 10px; background: var(--sand); color: var(--brown-dark); font-weight: 700; font-size: .82rem; min-width: 80px; }
.role-switch a.on { background: var(--brown); color: #fff; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--border); background: var(--sand); border-radius: 12px; padding: 11px 14px;
  font: inherit; color: var(--ink); transition: .15s;
}
.input:focus { outline: none; border-color: var(--brown); background: #fff; box-shadow: 0 0 0 4px rgba(140, 106, 67, .14); }
.input-icon { position: relative; }
.input-icon svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.input-icon .input { padding-inline-start: 42px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.error-text { color: var(--red); font-size: .85rem; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

/* ---------- Portal shell ---------- */
.app-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.app-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.app-nav { display: flex; gap: 4px; overflow-x: auto; }
.app-nav a { padding: 8px 14px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.app-nav a.on, .app-nav a:hover { background: var(--sand); color: var(--brown-dark); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--sand); color: var(--brown); display: grid; place-items: center; font-weight: 800; }
.page { padding: 28px 0 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 1.55rem; margin: 0; color: var(--brown-deep); }
.badge-dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; margin-inline-start: 4px; }

/* ---------- Cards & data ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title h2, .card-title h3 { margin: 0; font-size: 1.1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }
.tile .num { font: 800 1.7rem "Noto Kufi Arabic"; color: var(--brown-dark); line-height: 1.3; }
.tile .lbl { color: var(--muted); font-size: .85rem; }
.link-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; color: var(--ink); transition: .18s; }
.link-card:hover { border-color: var(--brown); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.link-card h3 { font-size: 1.05rem; margin: 0 0 4px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 8px; font-size: .78rem; font-weight: 800; background: color-mix(in srgb, var(--c, var(--gray)) 13%, white); color: var(--c, var(--gray)); white-space: nowrap; }
.badge.excellent { --c: var(--green); } .badge.good { --c: var(--emerald); } .badge.ok { --c: var(--gold); } .badge.low { --c: var(--red); }
.badge.EARLY { --c: var(--emerald); } .badge.LATE { --c: var(--gold); } .badge.ABSENT_UNEXCUSED { --c: var(--red); } .badge.ABSENT_EXCUSED { --c: var(--gray); }

.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.alert-success { background: rgba(23, 105, 93, .1); color: var(--emerald); }
.alert-error { background: rgba(179, 38, 30, .08); color: var(--red); }
.alert-warning { background: rgba(179, 38, 30, .08); color: var(--red); border-inline-start: 4px solid var(--red); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: start; background: var(--sand); color: var(--brown-dark); font-weight: 800; padding: 10px 12px; white-space: nowrap; }
.table td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: #fffdf9; }

.timeline { position: relative; padding-inline-end: 24px; }
.timeline::before { content: ""; position: absolute; inset-inline-end: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.tl-item { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.tl-item::after { content: ""; position: absolute; inset-inline-end: -24px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--dot, var(--gold)); box-shadow: 0 0 0 4px var(--cream); }
.tl-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; }
.note { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--sand); border-inline-start: 3px solid var(--gold); font-size: .9rem; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabs a { padding: 10px 18px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--brown-dark); border-color: var(--brown); }

details.row-form { border: 1px solid var(--border); border-radius: 14px; background: #fff; margin-bottom: 10px; }
details.row-form > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.row-form > summary::-webkit-details-marker { display: none; }
details.row-form[open] > summary { border-bottom: 1px solid var(--border); background: var(--cream); border-radius: 14px 14px 0 0; }
details.row-form .body { padding: 16px; }

.status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: #fff; margin-bottom: 10px; }
.status-row.warn { border-color: rgba(179, 38, 30, .4); }
.status-buttons { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.status-buttons button { border: 1px solid var(--c); color: var(--c); background: #fff; border-radius: 10px; padding: 6px 12px; font: 700 .85rem inherit; cursor: pointer; font-family: inherit; }
.status-buttons button.on, .status-buttons button:hover { background: var(--c); color: #fff; }
.status-buttons .input { width: 170px; padding: 6px 10px; font-size: .85rem; }

.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; }
.bubble.mine { align-self: flex-start; background: rgba(140, 106, 67, .1); }
.bubble.theirs { align-self: flex-end; background: rgba(23, 105, 93, .08); }
.bubble small { display: block; color: var(--muted); font-size: .75rem; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.qr-box { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px; text-align: center; }
.qr-box img { width: 150px; height: 150px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .role-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .hero .container { grid-template-columns: 1fr; }
  .phone-mock { display: none; }
  .stats-strip .grid { grid-template-columns: repeat(2, 1fr); }
  .cta-band { grid-template-columns: 1fr; padding: 30px; }
  .store-badges { justify-content: flex-start; }
  .store-badge { flex: 1 1 160px; min-width: 0; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .footer .container { grid-template-columns: 1fr; }
  .topnav a:not(.btn) { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .app-header .container { flex-wrap: wrap; padding-block: 8px; }
  .app-nav { order: 3; width: 100%; }
}
@media (max-width: 520px) {
  /* The header keeps only the enrollment button on phones (the panel link is in the footer). */
  .topnav .btn-ghost { display: none; }
  .topbar .container { gap: 10px; }
  .topbar .brand { min-width: 0; }
  .topbar .brand-sub { max-width: 120px; }
  .topnav .btn-sm { padding-inline: 12px; white-space: nowrap; }
  .role-grid, .feature-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 60px 0; }
  .brand-sub { display: none; }
}

/* ---------- Logo ---------- */
.brand-logo { object-fit: contain; filter: drop-shadow(0 2px 4px rgba(59, 42, 23, .18)); }
.hero-logo { display: block; width: 112px; height: 112px; object-fit: contain; margin-bottom: 14px; border-radius: 50%;
  box-shadow: 0 14px 34px rgba(14, 79, 134, .18), 0 0 0 6px rgba(255, 255, 255, .7); background: #fff; }
.auth-logo { display: block; width: 150px; height: 150px; object-fit: contain; border-radius: 50%; background: #fff; padding: 6px;
  margin-bottom: 22px; box-shadow: 0 18px 40px rgba(0, 0, 0, .25), 0 0 0 5px rgba(188, 146, 80, .55); }
@media (max-width: 820px) { .auth-logo { width: 110px; height: 110px; } }

/* ---------- Enrollment request («طلب التحاق») ---------- */
.enroll-card { width: min(560px, 100%); }
.enroll-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.enroll-head h1 { font-size: 1.35rem; margin: 0; }
.enroll-head p { margin: 2px 0 0; font-size: .9rem; }
.enroll-group { border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px 4px; margin: 0 0 14px; background: linear-gradient(180deg, var(--cream), #fff 60%); }
.enroll-group legend { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; background: #fff; border: 1px solid var(--border); font-weight: 800; color: var(--brown-dark); font-size: .9rem; }
.enroll-group legend svg { width: 18px; height: 18px; color: var(--gold); }
.req { color: var(--red); }
.enroll-note { display: flex; gap: 6px; align-items: flex-start; font-size: .8rem; margin: 0 0 14px; }
.enroll-note svg { flex: none; width: 16px; height: 16px; margin-top: 4px; color: var(--emerald); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.enroll-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.enroll-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); position: relative; }
.enroll-steps li::before { counter-increment: step; content: counter(step); position: absolute; inset-inline-end: 12px; top: 8px; font-weight: 800; color: rgba(255, 255, 255, .25); font-size: 1.4rem; }
.enroll-step-ic { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), #a07a3c); }
.enroll-step-ic svg { width: 22px; height: 22px; color: #fff; }
.enroll-steps b { display: block; }
.enroll-steps small { color: rgba(255, 255, 255, .75); font-size: .82rem; }
.enroll-done { text-align: center; }
.enroll-done h1 { font-size: 1.35rem; margin: 12px 0 4px; }
.enroll-done-ic { width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(23, 105, 93, .12); color: var(--emerald); box-shadow: 0 0 0 8px rgba(23, 105, 93, .06); animation: badge-pop .7s var(--ease-spring, ease) both; }
.enroll-done-ic svg { width: 38px; height: 38px; }
.enroll-receipt { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 18px 0; }
.enroll-receipt > div { border: 1px dashed var(--gold); border-radius: 14px; padding: 10px; background: var(--cream); }
.enroll-receipt small { display: block; color: var(--muted); font-size: .78rem; }
.enroll-receipt b { font-size: 1.15rem; color: var(--brown-dark); }
.enroll-cta { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding: 14px 18px; border-radius: 18px; background: #fff; border: 1px dashed var(--gold); }

/* «حفّاظ المنارة»: the count tile and the years (newest open) with the published names. */
a.stat-tile { display: block; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
a.stat-tile:hover { transform: translateY(-3px); }
.stat-huffaz { background: linear-gradient(160deg, #fff 40%, rgba(201, 162, 39, .12)); border-color: rgba(201, 162, 39, .45); }
.stat-huffaz .num { color: var(--gold); }
.huffaz { background: linear-gradient(180deg, transparent, rgba(201, 162, 39, .06)); }
.huffaz-crown { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(201, 162, 39, .14); color: var(--gold); margin-bottom: 10px; }
.huffaz-crown svg { width: 28px; height: 28px; }
.huffaz-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.huffaz-year { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 4px 18px; box-shadow: var(--shadow); }
.huffaz-year[open] { border-color: rgba(201, 162, 39, .5); }
.huffaz-year summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; }
.huffaz-year summary::-webkit-details-marker { display: none; }
.huffaz-year .y { font: 800 1.15rem "Noto Kufi Arabic"; color: var(--brown-deep); }
.huffaz-year .y small { font-weight: 600; font-size: .85rem; color: var(--muted); }
.huffaz-year .c { padding: 3px 12px; border-radius: 999px; background: rgba(201, 162, 39, .15); color: var(--brown); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.huffaz-year ul { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px dashed var(--border); }
.huffaz-year li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.huffaz-year li:last-child { border-bottom: 0; }
.huffaz-year li small { color: var(--muted); white-space: nowrap; }
.huffaz-year .small { font-size: .85rem; margin: 0 0 12px; }
