/*
 * AB Care — one design system (proposal, 8 Nov 2026).
 * Replaces five competing systems (v4, app.css, styles.css, care-public, abcare-brand) with one set of tokens:
 * the brand navy and blue, one Arabic face, seven text sizes, four radii. Gold and emoji icons are gone.
 * Character: a maintenance record you can trust — calm navy surfaces, one blue for action, a «service seal»
 * for the state of a contract. Everything else stays quiet.
 */
:root {
  --navy: #071A33;      /* structure, headings, dark surfaces */
  --navy-2: #0D2647;
  --ink: #10223A;       /* body text */
  --ink-2: #4A5A6E;     /* secondary text */
  --muted: #5E6E82;     /* lightest text allowed (5.2:1) */
  --blue: #0A85FD;      /* accents, icons, large fills */
  --blue-ink: #0070E0;  /* links and buttons with white text (4.8:1) */
  --sky: #5FB2FF;       /* highlights on navy */
  --tint: #EAF4FF;
  --canvas: #F5F8FC;
  --surface: #FFFFFF;
  --line: #E3E9F1;
  --ok: #0E7C5A;  --ok-bg: #E6F5EF;
  --warn: #B45309; --warn-bg: #FDF1E3;
  --bad: #C8331F;  --bad-bg: #FCEBE8;
  --r-s: 6px; --r-m: 10px; --r-l: 16px; --r-pill: 999px;
  --t-xs: 12px; --t-s: 14px; --t-m: 16px; --t-l: 18px; --t-xl: 22px; --t-2xl: 28px; --t-3xl: 36px;
  --shadow: 0 1px 2px #0718330d, 0 8px 24px #0718330f;
  --font: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--t-m); line-height: 1.7; color: var(--ink); background: var(--canvas); font-variant-numeric: lining-nums; }
h1, h2, h3 { color: var(--navy); line-height: 1.35; margin: 0; }
h1 { font-size: var(--t-2xl); font-weight: 800; }
h2 { font-size: var(--t-xl); font-weight: 800; }
h3 { font-size: var(--t-l); font-weight: 700; }
p { margin: 0; }
a { color: var(--blue-ink); }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ic { width: 20px; height: 20px; flex: none; }

/* buttons: one component, four kinds */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: var(--r-m); border: 1.5px solid transparent; font: 700 var(--t-m)/1 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--blue-ink); color: #fff; }
.btn-primary:hover { background: #005FC2; }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--line); }
.btn-secondary:hover { border-color: #B9CBE0; }
.btn-ghost { background: transparent; color: var(--blue-ink); padding-inline: 8px; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-block { width: 100%; }
.btn:focus-visible, .field input:focus-visible, .otp input:focus-visible, .act:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* fields */
.field { display: grid; gap: 6px; }
.field label { font-size: var(--t-s); font-weight: 700; color: var(--navy); }
.field input { height: 50px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-m); font: 500 var(--t-m) var(--font); color: var(--ink); background: var(--surface); }
.field input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px #0a85fd1f; }
.field .hint { font-size: var(--t-xs); color: var(--muted); }
.phone { display: flex; direction: ltr; border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--surface); overflow: hidden; }
.phone span { display: grid; place-items: center; padding: 0 12px; background: var(--canvas); color: var(--ink-2); font-weight: 700; border-inline-end: 1.5px solid var(--line); }
.phone input { border: 0; flex: 1; height: 50px; padding: 0 14px; font: 600 var(--t-l) var(--font); letter-spacing: .04em; direction: ltr; text-align: left; }
.phone:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px #0a85fd1f; }
.otp { display: flex; gap: 8px; direction: ltr; justify-content: center; }
.otp input { width: 48px; height: 56px; text-align: center; font: 800 var(--t-xl) var(--font); border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--navy); }
.otp input.on { border-color: var(--blue); background: var(--tint); }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 700; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-info { background: var(--tint); color: var(--blue-ink); }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* the service seal: a contract's state at a glance (days left as a ring) */
.seal { --p: .6; position: relative; width: 112px; height: 112px; flex: none; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: conic-gradient(var(--sky) calc(var(--p) * 360deg), #ffffff1f 0); }
.seal::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--navy-2); }
.seal > * { position: relative; }
.seal b { display: block; font-size: var(--t-2xl); font-weight: 800; color: #fff; line-height: 1; }
.seal span { font-size: var(--t-xs); color: #A9C3E0; }

/* app header */
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--navy); color: #fff; }
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.topbar .brand img { height: 30px; }
.topbar .who { margin-inline-start: auto; font-size: var(--t-s); color: #C9D8EA; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
