/* هوية بوابة الدراية: ورق عاجي، حبر كحلي، ذهب قليل، خط ثمانية نحيف. فاتح دائمًا بلا وضع داكن. */
@font-face { font-family: "Thmanyah Sans"; src: url("fonts/thmanyahsans-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("fonts/thmanyahsans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("fonts/thmanyahsans-Medium.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Thmanyah Serif"; src: url("fonts/thmanyahserifdisplay-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }

:root {
  color-scheme: light only;
  --navy: #202649; --navy-2: #343c6b; --gold: #d8b078; --gold-ink: #8a5f28; --gold-soft: #f4ebd8;
  --paper: #f7f3ea; --sheet: #fffefb; --line: #e7dfcc; --line-soft: #efe9dc; --line-strong: #d8ccb2;
  --ink: #23284a; --ink-2: #555a76; --muted: #6b6c7c; --bad: #b4443b; --bad-bg: #f8e9e6; --soft: #eeedf2;
  --ring: rgba(52, 60, 107, .14);
}
* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Thmanyah Sans", "Segoe UI", Tahoma, Arial, sans-serif;
  font-weight: 300; line-height: 1.75; -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: "Thmanyah Serif", "Thmanyah Sans", Georgia, serif; font-weight: 300; color: var(--navy); margin: 0; }
b, strong { font-weight: 500; }
.wrap { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; display: flex; justify-content: center; padding: 32px 16px 40px; }
.col { width: 100%; max-width: 560px; }
.logo { display: block; margin: 0 auto 24px; height: 112px; width: auto; }
.sheet { background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; box-shadow: 0 1px 2px rgba(32,38,73,.04); }
.sheet h1 { font-size: 26px; line-height: 1.3; }
.lead { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.sec { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
.sec h2 { font-size: 17px; margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { margin-bottom: 12px; }
.grid2 .field { margin-bottom: 0; }
label, .label { display: block; margin-bottom: 4px; font-size: 14px; color: var(--ink-2); }
.input, select.input { width: 100%; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--sheet); padding: 8px 12px;
  min-height: 44px; font-size: 16px; font-family: inherit; font-weight: 300; color: var(--ink); outline: none; transition: border-color .18s, box-shadow .18s; }
.input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px var(--ring); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.ltr { direction: ltr; text-align: right; }
.phone { display: grid; grid-template-columns: 170px 1fr; gap: 8px; }
.cc { direction: ltr; text-align: left; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { margin: 0; flex: 1; min-width: 96px; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--sheet); cursor: pointer; color: var(--ink); font-size: 15px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { border-color: var(--navy); background: var(--soft); color: var(--navy); font-weight: 400; }
.seg label:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--ring); }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--sheet); color: var(--ink); font: inherit; font-size: 15px; font-weight: 400; cursor: pointer; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-block { width: 100%; margin-top: 22px; font-size: 16px; }
.err { display: none; margin-top: 14px; background: var(--bad-bg); color: var(--bad); border-radius: 9px; padding: 10px 14px; font-size: 14px; }
.err.on { display: block; }
.done { text-align: center; padding: 12px 0; }
.done .mark { width: 56px; height: 56px; border-radius: 50%; background: var(--soft); color: var(--navy); display: grid; place-items: center; margin: 0 auto 14px; font-size: 26px; }
.attention { background: #f1e3c4; border-inline-start: 3px solid var(--gold); padding: 10px 14px; border-radius: 0 6px 6px 0; font-size: 14px; margin-top: 16px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 18px 16px 24px; }
.hp { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid rgba(52, 60, 107, .45); outline-offset: 2px; }
@media (max-width: 480px) {
  .sheet { padding: 22px 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .phone { grid-template-columns: 1fr 1fr; }
  .logo { height: 92px; margin-bottom: 18px; }
}
/* الإدارة */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: start; color: var(--muted); font-weight: 300; font-size: 13px; padding: 8px; border-bottom: 1px solid var(--navy); white-space: nowrap; }
td { border-top: 1px solid var(--line-soft); padding: 9px 8px; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin: 6px 0 18px; }
.stats div { min-width: 70px; }
.stats b { display: block; font-family: "Thmanyah Serif", serif; font-weight: 300; font-size: 34px; line-height: 1.1; color: var(--navy); }
.stats span { font-size: 13px; color: var(--muted); }
.bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.bar .input { width: auto; flex: 1; min-width: 180px; }
.seg.stack { flex-direction: column; }
.seg.stack label { justify-content: flex-start; padding: 0 14px; }
[hidden] { display: none !important; }
