/* Rega Auto Super-Admin — one hand-written stylesheet. Soft surfaces, 1px borders, light elevation.
   Brand palette: blue #6CCDEB, dark gray #4A4F55, light gray #A9AFB6, white. The brand blue is too
   light to carry white text, so filled controls and links use deeper shades of it (AA contrast). */

/* Latin and digits come from PlexLatin, Kurdish from PlexArabic (same superfamily). */
@font-face { font-family: "PlexLatin"; src: url("fonts/PlexLatin-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PlexLatin"; src: url("fonts/PlexLatin-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PlexLatin"; src: url("fonts/PlexLatin-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "PlexLatin"; src: url("fonts/PlexLatin-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "PlexArabic"; src: url("fonts/PlexArabic-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PlexArabic"; src: url("fonts/PlexArabic-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PlexArabic"; src: url("fonts/PlexArabic-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "PlexArabic"; src: url("fonts/PlexArabic-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
/* The number plates' own lettering, as in the app (SIL OFL 1.1, licences in fonts/plates/). */
@font-face { font-family: "PlateLatin"; src: url("fonts/plates/SofiaSansSemiCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "PlateNaskh"; src: url("fonts/plates/Amiri-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "PlateRuqaa"; src: url("fonts/plates/ArefRuqaa-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --accent: #137EA3;       /* deep brand blue: white text on it is 4.6:1 */
  --accent-dark: #0F6A8A;  /* links and active text: 6.1:1 on white */
  --accent-tint: #EDF8FC;
  --accent-line: #B5E4F3;
  --accent-soft: #6CCDEB;  /* brand blue itself: fills, highlights and focus halos only */
  --on-accent: #FFFFFF;    /* text on --accent fills */
  --pink: #D6006C;
  --pink-dark: #A80055;
  --pink-tint: #FFF3F8;
  --pink-line: #F7C6DD;
  --green: #12A46B;
  --green-dark: #0B7A4F;
  --green-tint: #EDFAF4;
  --green-line: #BFE8D5;
  --amber: #9A5B00;
  --amber-strong: #C27A00;
  --amber-ink: #5F3B00;
  --amber-tint: #FFF6E2;
  --amber-line: #F2D9A2;
  --violet: #6A4BD6;
  --violet-tint: #F3F0FF;
  --text: #4A4F55;
  --text-2: #6B7178;       /* muted text: 4.5:1 or more on every light surface */
  --text-3: #A9AFB6;       /* icons, separators and disabled states only, never body text */
  --border: #DFE3E7;
  --border-strong: #A9AFB6;
  --line: #EDF0F3;
  --bg: #F3F5F7;
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --hover: #F7F9FB;
  --switch-off: #C9D1D9;
  --veil: rgba(30, 37, 45, .45);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .16);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar: 252px;
  --topbar: 64px;
  --font: "PlexLatin", "PlexArabic", system-ui, "Segoe UI", Tahoma, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --accent: #6CCDEB;       /* brand blue on dark surfaces; filled controls carry dark text */
    --accent-dark: #9ADCF1;
    --accent-tint: rgba(108, 205, 235, .12);
    --accent-line: rgba(108, 205, 235, .35);
    --accent-soft: #6CCDEB;
    --on-accent: #0F1419;
    --pink: #F0478F;
    --pink-dark: #FF8AB8;
    --pink-tint: rgba(240, 71, 143, .12);
    --pink-line: rgba(240, 71, 143, .35);
    --green: #2CC486;
    --green-dark: #6EDDB0;
    --green-tint: rgba(44, 196, 134, .12);
    --green-line: rgba(44, 196, 134, .35);
    --amber: #F2B54A;
    --amber-strong: #F2B54A;
    --amber-ink: #F6D9A4;
    --amber-tint: rgba(242, 181, 74, .12);
    --amber-line: rgba(242, 181, 74, .35);
    --violet: #A592FF;
    --violet-tint: rgba(165, 146, 255, .13);
    --text: #E6EAEE;
    --text-2: #9AA5B1;
    --text-3: #5F6B77;
    --border: #2A333D;
    --border-strong: #3A4550;
    --line: #232B34;
    --bg: #0F1419;
    --surface: #161C23;
    --surface-2: #1A2129;
    --hover: #1C242D;
    --switch-off: #3A4550;
    --veil: rgba(0, 0, 0, .6);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14.5px/1.65 var(--font);
}
h1, h2, h3, p, dl, dd, figure { margin: 0; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon { flex: none; }
.muted { color: var(--text-2); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.yes { color: var(--green); display: inline-flex; vertical-align: middle; }

/* ---------- Frame ---------- */
.sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  padding: 16px 12px 20px;
  overflow-y: auto;
  z-index: 30;
  scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 16px; margin-bottom: 4px; color: var(--text); border-bottom: 1px solid var(--line); }
.brand:hover { text-decoration: none; }
.brand { flex-direction: column; align-items: flex-start; gap: 6px; }
.brand-logo { display: block; width: 168px; height: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}
.brand b { display: block; font-weight: 700; font-size: 17px; line-height: 1.2; letter-spacing: -.01em; }
.brand small { display: block; color: var(--text-2); font-size: 12px; line-height: 1.5; }
.nav { flex: 1 1 auto; }
.nav-group { margin: 18px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--text-2); }
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-block: 1px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  transition: background .12s, color .12s;
}
.nav-link .icon { color: var(--text-2); transition: color .12s; }
.nav-link:hover { background: var(--hover); text-decoration: none; }
.nav-link:hover .icon { color: var(--text); }
.nav-link.is-active { background: var(--accent-tint); color: var(--accent-dark); font-weight: 600; }
.nav-link.is-active .icon { color: var(--accent); }
.nav-link.is-active::before {
  content: "";
  position: absolute;
  inset-inline-start: -12px;
  inset-block: 8px;
  width: 4px;
  border-start-end-radius: 4px;
  border-end-end-radius: 4px;
  background: var(--accent);
}
.nav-badge {
  margin-inline-start: auto;
  min-width: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}
.sidebar-foot { margin-top: 16px; padding: 12px 12px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.sidebar-veil { display: none; }

.main { margin-inline-start: var(--sidebar); min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--topbar);
  padding: 10px 28px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 19px; font-weight: 600; line-height: 1.4; }
.topbar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.topbar-end form { margin: 0; }
.who { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text-2); }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-dark); font-weight: 700; font-size: 13px; text-transform: uppercase; }
.menu-btn { display: none; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); padding: 7px; cursor: pointer; line-height: 0; }
.content { padding: 24px 28px 56px; max-width: 1480px; }
.content > * + * { margin-top: 18px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- Messages ---------- */
.alert { padding: 11px 16px; border-radius: 12px; border: 1px solid; font-weight: 500; }
.alert-ok { background: var(--green-tint); border-color: var(--green-line); color: var(--green-dark); }
.alert-error { background: var(--pink-tint); border-color: var(--pink-line); color: var(--pink-dark); }
.alert-warn { background: var(--amber-tint); border-color: var(--amber-line); color: var(--amber); }
.banner { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--amber-line); background: var(--amber-tint); color: var(--amber-ink); }
.banner .icon { color: var(--amber-strong); margin-top: 2px; }
.banner b { display: block; font-weight: 600; }
.banner a { color: inherit; text-decoration: underline; font-weight: 500; white-space: nowrap; margin-inline-start: auto; align-self: center; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; box-shadow: var(--shadow); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; margin-inline-end: auto; }
.card-head h2 .icon { color: var(--accent); }
.card-head small { color: var(--text-2); font-size: 12.5px; font-weight: 400; }
.card-body { padding: 18px 20px; }
.card-body > * + * { margin-top: 14px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack > * + * { margin-top: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.empty { color: var(--text-2); text-align: center; padding: 28px 12px; }

/* An empty state: an icon in a soft circle above the sentence. */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 16px; color: var(--text-2); text-align: center; }
.empty-state .empty-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--bg); color: var(--text-3); }
.empty-state p { max-width: 360px; }
td.empty .empty-state { padding: 22px 8px; }

/* ---------- Figures ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.stat { display: block; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s, transform .12s; }
a.stat:hover { border-color: var(--accent); text-decoration: none; box-shadow: var(--shadow); }
.stat span { display: block; color: var(--text-2); font-size: 13px; }
.stat b { display: block; margin-top: 2px; font-size: 27px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 14px; font-weight: 500; color: var(--text-2); }
.stat b + b { font-size: 18px; margin-top: 0; }
.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-wide { grid-column: span 2; }

/* A KPI tile: a tinted icon, the label, the big number, an optional line under it. */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; }
.kpi { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--text); min-width: 0; }
a.kpi:hover { border-color: var(--accent); text-decoration: none; box-shadow: var(--shadow); }
.kpi-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); }
.kpi-body { min-width: 0; width: 100%; }
.kpi-body > span { display: block; color: var(--text-2); font-size: 13px; }
.kpi-body > b { display: block; font-size: 24px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi-body > b small { display: inline-block; font-size: 13px; font-weight: 500; color: var(--text-2); }
.kpi-body > em { display: block; font-style: normal; font-size: 12px; color: var(--text-2); }
.kpi.is-pink .kpi-mark { background: var(--pink-tint); color: var(--pink); }
.kpi.is-green .kpi-mark { background: var(--green-tint); color: var(--green); }
.kpi.is-amber .kpi-mark { background: var(--amber-tint); color: var(--amber-strong); }
.kpi.is-violet .kpi-mark { background: var(--violet-tint); color: var(--violet); }

.queues { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.queue { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.queue:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); }
.queue-mark { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--bg); color: var(--text-2); }
.queue b { display: block; font-size: 30px; font-weight: 600; line-height: 1.2; }
.queue span { color: var(--text-2); font-size: 13.5px; }
.queue > .icon { margin-inline-start: auto; color: var(--text-2); }
.queue.has-items { background: var(--accent-tint); border-color: var(--accent-line); }
.queue.has-items .queue-mark { background: var(--accent); color: var(--on-accent); }
.queue.has-items.is-pink { background: var(--pink-tint); border-color: var(--pink-line); }
.queue.has-items.is-pink .queue-mark { background: var(--pink); }

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; }
/* A long list scrolls inside its card and keeps its header in view. */
.table-wrap.is-tall { max-height: 560px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { position: sticky; top: 0; z-index: 1; padding: 10px 16px; text-align: start; font-size: 12.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.table td { padding: 11px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
/* On a narrow screen the table scrolls sideways rather than crushing its first column. */
.table td:first-child { min-width: 168px; }
.table tbody tr:hover td { background: var(--hover); }
.table td.empty:hover, .table tr:hover td.empty { background: none; }
.table .actions { text-align: end; white-space: nowrap; }
.table .actions form { display: inline-block; margin: 0; }
.table .actions > * + * { margin-inline-start: 6px; }
.table td.rank, .table th.rank { width: 44px; min-width: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.table td.rank + td { min-width: 168px; }
.table tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--border); }
.card > .table-wrap:first-child .table th:first-child { border-start-start-radius: var(--radius); }
.card > .table-wrap:first-child .table th:last-child { border-start-end-radius: var(--radius); }
.row-title { font-weight: 500; color: var(--text); }
.note-cell { min-width: 170px; }
.row-sub { display: block; color: var(--text-2); font-size: 12.5px; }
tr.is-late td { background: var(--pink-tint); }
tr.is-soon td { background: var(--amber-tint); }
tr.is-late:hover td { background: var(--pink-tint); }
tr.is-soon:hover td { background: var(--amber-tint); }
tr.is-off td { color: var(--text-2); }
/* An inbox message not yet read: a dot before its title. */
tr.is-unread .row-title::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 8px; border-radius: 50%; background: var(--accent); vertical-align: middle; }

/* ---------- Pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--bg); color: var(--text-2); border: 1px solid transparent; }
a.pill:hover { text-decoration: none; }
.pill-pending { background: var(--amber-tint); color: var(--amber); border-color: var(--amber-line); }
.pill-wa { background: #e7f8ee; color: #128c4b; border-color: #bfe9cf; }
.phone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.phone-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pill-approved { background: var(--green-tint); color: var(--green-dark); }
.pill-rejected { background: var(--pink-tint); color: var(--pink-dark); }
.pill-suspended, .pill-expired, .pill-basic { background: var(--bg); color: var(--text-2); }
.pill-pro { background: var(--pink); color: #fff; font-weight: 600; letter-spacing: .02em; }
.pill-accent { background: var(--accent-tint); color: var(--accent-dark); }
.pill-verified { background: var(--accent-tint); color: var(--accent-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 20px; background: var(--bg); color: var(--text-2); font-variant-numeric: tabular-nums; }
.badge-accent { background: var(--accent-tint); color: var(--accent-dark); }
.badge-pink { background: var(--pink-tint); color: var(--pink-dark); }
.badge-green { background: var(--green-tint); color: var(--green-dark); }

/* ---------- Licence plates: the real designs, real colours in both themes ---------- */
.plate {
  --pb: #FFFFFF; --pf: #111111; --ps: #FFFFFF; --pi: #111111;
  display: inline-flex;
  align-items: stretch;
  direction: ltr;
  unicode-bidi: isolate;
  vertical-align: middle;
  min-height: 28px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--pb);
  color: var(--pf);
  border: 1.5px solid var(--pf);
  /* The thin rim around the plate's border. */
  box-shadow: 0 0 0 1px var(--pb), 0 0 0 1.7px rgba(17, 17, 17, .6), var(--shadow-sm);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}
.plate-lg { min-height: 38px; font-size: 19px; }
.plate em { font-style: normal; }

/* The new plate: IRQ (KR) down the band, the code, the hologram, the letter, the number. */
.plate-new { font-family: "PlateLatin", "PlexLatin", sans-serif; }
.plate-new i { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .08em; width: .8em; background: var(--ps); color: var(--pi); border-right: 1.5px solid var(--pf); font-style: normal; }
.plate-new i em { writing-mode: vertical-lr; text-orientation: upright; font-size: .34em; line-height: 1; letter-spacing: -.08em; }
.plate-new i em + em { font-size: .28em; }
.plate-new b { display: flex; align-items: center; padding: 0 .42em; font-size: 1.3em; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.plate-new b s { flex: none; width: .24em; height: .24em; margin: 0 .14em; border-radius: 1px; background: radial-gradient(circle, #7DB3AB 0 26%, #1E64AC 30% 50%, #A3B3B9 56%); }
.plate-new b span { margin-left: .28em; }

/* The old plates wear their kind's colour all over. */
.plate-old { font-family: "PlateNaskh", "PlexArabic", serif; }
.plate-old b { font-weight: 700; }

/* 2008: IRAQ down the left; the letter and the figures over the province and the class word. */
.plate-2008 { border-radius: 5px; }
.plate-2008 > i { flex: none; display: flex; align-items: center; justify-content: center; padding: 0 .16em; border-right: 1px solid var(--pf); font-family: "PlateLatin", sans-serif; font-style: normal; font-size: .4em; writing-mode: vertical-lr; text-orientation: upright; letter-spacing: -.12em; }
.plate-2008 > span { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 .55em; }
.plate-2008 b { display: flex; align-items: baseline; gap: .45em; padding: 0 .2em; border-bottom: 1px solid var(--pf); font-size: 1.12em; line-height: 1.12; letter-spacing: .1em; }
.plate-2008 small { display: flex; gap: .7em; direction: rtl; font-size: .6em; line-height: 1.3; }

/* 2001: العراق and the province small on the left, the figures large on the right. */
.plate-2001 { align-items: center; gap: .6em; padding: 0 .55em 0 .35em; border-radius: 2px; }
.plate-2001 small { display: flex; flex-direction: column; justify-content: center; direction: rtl; text-align: right; font-family: "PlexArabic", sans-serif; font-size: .48em; line-height: 1.3; }
.plate-2001 b { font-size: 1.42em; line-height: 1.15; letter-spacing: -.01em; }

/* 1988: the figures over two cells — the province, العراق — in Ruqaa, inside a double rim. */
.plate-1988 { flex-direction: column; align-items: stretch; border: 3.5px double var(--pf); border-radius: 5px; }
.plate-1988 b { padding: 0 .5em; border-bottom: 1px solid var(--pf); text-align: center; font-size: 1.08em; line-height: 1.12; letter-spacing: .14em; }
.plate-1988 small { display: flex; font-family: "PlateRuqaa", "PlateNaskh", serif; font-size: .64em; line-height: 1.35; }
.plate-1988 small span { flex: 1; padding: 0 .4em; text-align: center; direction: rtl; }
.plate-1988 small span + span { border-left: 1px solid var(--pf); }
.plate-swatch { display: inline-block; width: 22px; height: 14px; vertical-align: middle; border-radius: 3px; background: linear-gradient(to right, var(--ps) 0 28%, rgba(17, 17, 17, .6) 28% calc(28% + 1px), var(--pb) calc(28% + 1px)); border: 1px solid rgba(17, 17, 17, .28); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 6px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 500; cursor: pointer; white-space: nowrap; line-height: 1.4; box-shadow: var(--shadow-sm); transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--border-strong); background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-good { background: var(--green); border-color: var(--green); color: #fff; }
.btn-good:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-danger { color: var(--pink-dark); border-color: var(--pink-line); background: var(--surface); }
.btn-danger:hover { background: var(--pink-tint); border-color: var(--pink); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); border-color: transparent; color: var(--text); }
.btn-sm { min-height: 30px; padding: 3px 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn.is-disabled { color: var(--text-3); pointer-events: none; background: var(--bg); box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row form { margin: 0; }

/* ---------- Tabs, filters, search, pager ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.toolbar .search { margin-inline-start: auto; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px; border: 1px solid transparent; color: var(--text-2); font-weight: 500; transition: background .12s, color .12s; }
.tab:hover { text-decoration: none; color: var(--text); background: var(--hover); }
.tab em { font-style: normal; font-size: 12px; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--bg); color: var(--text-2); text-align: center; line-height: 20px; }
.tab.is-active { background: var(--accent); color: var(--on-accent); }
.tab.is-active em { background: color-mix(in srgb, var(--on-accent) 22%, transparent); color: var(--on-accent); }
.search { display: flex; gap: 8px; }
.search-box { position: relative; display: block; }
.search-box .icon { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search-box input { padding-inline-start: 36px; }
.search input { width: 260px; max-width: 100%; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
.pager-info { color: var(--text-2); font-variant-numeric: tabular-nums; }
.total { color: var(--text-2); font-size: 13px; }

/* A filter bar: labelled fields in one wrapping row, the buttons at the end. */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.filter-bar .field { flex: 0 1 auto; }
.filter-bar .field-grow { flex: 1 1 220px; }
.filter-bar .btn-row { margin-inline-start: auto; }
.date-range, .field > .date-range { display: flex; align-items: center; gap: 8px; margin: 0; }
.filter-bar .presets { flex-basis: 100%; order: -1; }
.date-range .sep { color: var(--text-3); }
.date-range input { width: 158px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; border: 1px solid var(--border); color: var(--text-2); background: var(--surface); }
.preset:hover { text-decoration: none; color: var(--text); border-color: var(--border-strong); }
.preset.is-active { background: var(--accent-tint); color: var(--accent-dark); border-color: var(--accent-line); }

/* ---------- Forms ---------- */
input[type="text"], input[type="search"], input[type="password"], input[type="number"], input[type="url"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  line-height: 1.5;
  transition: border-color .12s;
}
input[type="date"] { direction: ltr; text-align: left; }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
textarea { min-height: 84px; resize: vertical; }
input[type="file"] { width: 100%; font-size: 13px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent-soft) 40%, transparent); outline-offset: 0; }
input[readonly] { background: var(--bg); color: var(--text-2); }
input[dir="ltr"], textarea[dir="ltr"] { text-align: left; }
.field { display: block; }
.field > span { display: block; margin-bottom: 4px; font-size: 13px; color: var(--text-2); }
.field small { display: block; margin-top: 4px; font-size: 12px; color: var(--text-2); }
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin: 0; }

/* A switch is a submit button: turning it is a real POST. */
.switch { position: relative; width: 44px; height: 24px; padding: 0; border: 0; border-radius: 999px; background: var(--switch-off); cursor: pointer; vertical-align: middle; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: inset-inline-start .15s; }
.switch.is-on { background: var(--green); }
.switch.is-on::after { inset-inline-start: 23px; }
.switch.is-warn.is-on { background: #E09A1B; }

/* ---------- Dialogs ---------- */
dialog { width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text); overflow: auto; box-shadow: var(--shadow-lg); }
/* The page spaces its children apart; a dialog must keep the auto margins that centre it. */
.content > dialog { margin: auto; }
dialog::backdrop { background: var(--veil); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.dialog-head { display: flex; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 16px; font-weight: 600; margin-inline-end: auto; }
.dialog-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--text-2); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.dialog-x:hover { background: var(--bg); }
.dialog-body { padding: 18px 22px; }
.dialog-foot { display: flex; justify-content: flex-start; gap: 8px; padding: 14px 22px 18px; }

/* ---------- Detail lists ---------- */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 22px; }
.kv dt { color: var(--text-2); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.title-row h2 { font-size: 21px; font-weight: 600; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-weight: 500; }
.back .icon { transform: scaleX(-1); }
.shots { display: flex; flex-wrap: wrap; gap: 10px; }
.shots img { width: 132px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); display: block; }
.thumb { width: 84px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.logo-img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); }
.path { font-size: 12.5px; color: var(--text-2); }
.note { padding: 10px 14px; border-radius: 12px; background: var(--bg); color: var(--text-2); font-size: 13.5px; }
.note-pink { background: var(--pink-tint); color: var(--pink-dark); }
.sub-box { padding: 14px 16px; border-radius: 12px; background: var(--bg); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sub-box b { font-weight: 600; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; padding-top: 0; }
.people li > div { flex: 1 1 auto; min-width: 0; }
.people b { font-weight: 500; display: block; }

/* ---------- Charts ---------- */
.colchart { direction: ltr; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; }
.colchart-y { display: flex; flex-direction: column-reverse; justify-content: space-between; height: 150px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; }
.colchart-y span { height: 0; display: flex; align-items: center; justify-content: flex-end; }
.colchart-plot { position: relative; height: 150px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-bottom: 1px solid var(--border); }
.colchart-grid { position: absolute; inset-inline: 0; height: 0; border-top: 1px solid var(--line); }
.col { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; outline-offset: -2px; }
.col i { position: relative; display: block; width: min(20px, 62%); min-height: 0; background: var(--accent); border-radius: 4px 4px 0 0; }
.col:hover i, .col:focus-visible i { background: var(--accent-dark); }
.col i::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 3px 9px; border-radius: 8px; background: var(--text); color: var(--surface); font-size: 12px; font-style: normal; white-space: nowrap; opacity: 0; pointer-events: none; z-index: 2; }
.col:hover i::after, .col:focus-visible i::after { opacity: 1; }
.colchart-x { grid-column: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-top: 6px; font-size: 11.5px; color: var(--text-2); text-align: center; font-variant-numeric: tabular-nums; }

/* The SVG column chart drawn by svg_columns(): colours come from the theme. */
.svgchart { direction: ltr; width: 100%; }
.svgchart svg { display: block; width: 100%; height: auto; overflow: visible; }
.svgchart .grid { stroke: var(--line); stroke-width: 1; }
.svgchart .axis { stroke: var(--border); stroke-width: 1; }
.svgchart .tick { fill: var(--text-2); font: 500 11px var(--font); font-variant-numeric: tabular-nums; }
.svgchart .bar { fill: var(--accent); transition: fill .1s; }
.svgchart .bar.is-zero { fill: var(--line); }
.svgchart g.col-g:hover .bar { fill: var(--accent-dark); }
.svgchart .hit { fill: transparent; }
.svgchart g.col-g:hover .hit { fill: color-mix(in srgb, var(--accent) 7%, transparent); }

.bars { display: grid; gap: 11px; }
/* Fixed side columns: every track is the same length, so bars compare honestly. */
.bar-row { display: grid; grid-template-columns: minmax(84px, 160px) minmax(0, 1fr) 110px; align-items: center; gap: 12px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bar-track { display: block; height: 10px; border-radius: 5px; background: var(--bg); overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--accent); border-start-end-radius: 4px; border-end-end-radius: 4px; }
.bar-value { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: end; }
.hero { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .stat, .hero .kpi { flex: 1 1 220px; }

/* One bar split by share, e.g. plates by category. */
.stackbar { display: flex; height: 18px; border-radius: 6px; overflow: hidden; background: var(--bg); direction: ltr; border: 1px solid var(--border-strong); }
.stackbar span { display: block; height: 100%; background: var(--ps, var(--accent)); border-inline-end: 1px solid rgba(17, 17, 17, .18); }
.stackbar span:last-child { border-inline-end: 0; }

/* ---------- Sign-in ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); padding: 30px 28px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; text-align: center; }
.login-brand .brand-logo { width: 220px; }
.login-brand b { font-size: 22px; font-weight: 700; line-height: 1.2; }
.login-brand span { color: var(--text-2); }
.login-card .alert { margin-bottom: 14px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 1180px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sidebar { inset-inline-start: calc(-1 * var(--sidebar) - 8px); transition: inset-inline-start .18s; box-shadow: var(--shadow-lg); }
  .menu-open .sidebar { inset-inline-start: 0; }
  .menu-open .sidebar-veil { display: block; position: fixed; inset: 0; background: var(--veil); z-index: 25; }
  .main { margin-inline-start: 0; }
  .menu-btn { display: inline-block; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 48px; }
  .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .stats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .queues { grid-template-columns: minmax(0, 1fr); }
  .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .who span:not(.avatar) { display: none; }
  .form-row, .form-row-3 { grid-template-columns: minmax(0, 1fr); }
  .toolbar .search { margin-inline-start: 0; width: 100%; }
  .search input { width: 100%; }
  .search-box { flex: 1 1 auto; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; gap: 8px; }
  .kpi-body > b { font-size: 19px; }
  .filter-bar .btn-row { margin-inline-start: 0; }
  .date-range { width: 100%; }
  .date-range input { width: auto; flex: 1 1 0; min-width: 0; }
  .bar-row { grid-template-columns: minmax(70px, 110px) minmax(0, 1fr) 84px; gap: 8px; }
  .tabs { border-radius: 14px; }
}

/* ---------- Settings rows ---------- */
.setting { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); margin: 0; }
.card-body > .setting { margin-top: 0; }
.card-body > .setting:first-child { border-top: 0; padding-top: 0; }
.card-body > .setting:last-child { padding-bottom: 0; }
.setting > div, .setting > label { flex: 1 1 auto; min-width: 0; }
.setting b { display: block; font-weight: 500; }
.setting small { display: block; color: var(--text-2); font-size: 12.5px; }
.setting-input { display: flex; gap: 8px; flex: none; }
.setting-input input { width: 150px; }
@media (max-width: 640px) {
  .setting { flex-wrap: wrap; }
  .setting-input { width: 100%; }
  .setting-input input { flex: 1; width: auto; }
}

/* Notifications and code delivery */
.form-narrow { max-width: 720px; }
.is-removed td { color: var(--text-2); opacity: .6; }
.is-removed .row-title { text-decoration: line-through; }
.stat b.is-good { color: var(--green-dark); }
.stat b.is-warn { color: var(--amber); }
.stat b.is-bad { color: var(--pink-dark); }
.steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; line-height: 1.7; }
.log-error { color: var(--pink-dark); }
.log-error bdi { margin-inline-start: 4px; }
.alert a { color: inherit; text-decoration: underline; margin-inline-start: 8px; }

@media print {
  @page { size: A4; margin: 12mm; }
  .sidebar, .sidebar-veil, .topbar, .filter-bar, .page-actions, .btn, .pager, .tabs, .alert { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; max-width: none; }
  .content > * + * { margin-top: 10px; }
  .card, .kpi, .stat { box-shadow: none; break-inside: avoid; }
  .card { border-color: #bbb; }
  .table-wrap, .table-wrap.is-tall { max-height: none; overflow: visible; }
  .table th { position: static; }
  .table td, .table th { padding: 6px 10px; font-size: 11.5px; }
  .kpis, .cols-2 { gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi-body > b { font-size: 18px; }
  .print-head { display: block; }
  a { color: inherit; }
}
.table .bar-track { margin-top: 6px; height: 6px; max-width: 240px; }
.card-body + .card-head { border-top: 1px solid var(--line); }

/* ---------- Reports: the "update the database" notice and phones ---------- */
.notice-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--amber-line); border-radius: var(--radius); background: var(--amber-tint); color: var(--amber-ink); }
.notice-card .notice-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--amber-strong); }
.notice-card > div { min-width: 0; }
.notice-card b { display: block; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.notice-card p { margin: 6px 0 0; font-size: 13px; color: var(--amber); line-height: 1.7; }
.notice-card .pill { margin-inline-end: 4px; }
.card-body > .notice-card + .stats { margin-top: 14px; }
.report-kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr)); }
.report-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.report-scroll .table td.num, .report-scroll .table th { white-space: nowrap; }
.table tr.is-current td { background: var(--accent-tint); }
.report-filter .field { min-width: 0; }
.report-card .stat { min-width: 0; }
.report-card .stat b { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .report-filter { padding: 12px; }
  .report-filter .field, .report-filter .field-grow { flex: 1 1 100%; }
  .report-filter select { width: 100%; }
  .report-filter .btn-row, .report-filter .btn-row .btn { width: 100%; justify-content: center; }
  .report-filter .presets { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .report-filter .preset { flex: none; }
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-card .card-head .btn { margin-inline-start: auto; }
  .report-card .stat { padding: 12px; }
  .report-card .stat b { font-size: 20px; }
  .notice-card { padding: 12px; gap: 10px; }
  .notice-card .notice-mark { width: 34px; height: 34px; }
}
@media (max-width: 380px) {
  .report-kpis, .report-card .stats-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Income: the two readings, the grain, the print header ---------- */
.print-head { display: none; padding: 0 0 10px; border-bottom: 2px solid var(--text); }
.print-head h2 { font-size: 18px; font-weight: 700; }
.print-head small { display: block; color: var(--text-2); font-size: 12px; margin-top: 2px; }
.income-filter .tabs { flex: none; }
.income-filter .field-tabs > span { display: block; margin-bottom: 4px; font-size: 13px; color: var(--text-2); }
.income-kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 156px), 1fr)); }
.kpi-body > b.is-neg { color: var(--pink-dark); }
.table td.is-neg, .table tfoot td.is-neg { color: var(--pink-dark); }
.table td.is-pos { color: var(--green-dark); }
.table th.sortable a { color: inherit; }
.table th.sortable a:hover { color: var(--text); text-decoration: none; }
.table th.is-sorted { color: var(--accent-dark); }
.table th.is-sorted a::after { content: " ↓"; }
.table tr.is-total td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--border); }
.period-link { font-variant-numeric: tabular-nums; }
.money-pair { display: grid; gap: 2px; }
.money-pair small { color: var(--text-2); font-size: 12px; }
@media (max-width: 640px) {
  .income-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- A shop's week (workshop page) ---------- */
.hours-table .is-today td { background: var(--accent-tint); font-weight: 600; }
.hours-table td:first-child { min-width: 120px; }

/* ---------- Packages: Essential / PRO / Premium, activation states, the matrix ---------- */
.pill-essential { background: var(--bg); color: var(--text-2); }
.pill-premium { background: var(--violet); color: #fff; font-weight: 600; letter-spacing: .02em; }
.pill-grace { background: var(--amber-tint); color: var(--amber); border-color: var(--amber-line); }
tr.is-grace td, tr.is-grace:hover td { background: var(--amber-tint); }
tr.is-expired td, tr.is-expired:hover td { background: var(--pink-tint); }
.switch-lg { width: 64px; height: 34px; }
.switch-lg::after { width: 28px; height: 28px; }
.switch-lg.is-on::after { inset-inline-start: 33px; }
.enforce { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.enforce > div { flex: 1 1 auto; min-width: 0; }
.enforce b { display: block; font-size: 16px; font-weight: 600; }
.enforce small { display: block; color: var(--text-2); margin-top: 4px; }
.enforce.is-on { border-color: var(--green-line); background: var(--green-tint); }
.enforce.is-off { border-color: var(--amber-line); background: var(--amber-tint); color: var(--amber-ink); }
.enforce.is-off small { color: inherit; }
.matrix th:not(:first-child), .matrix td:not(:first-child) { text-align: center; width: 150px; }
.matrix td:first-child small { display: block; color: var(--text-2); font-size: 12px; direction: ltr; text-align: start; }
.matrix input[type="number"] { width: 92px; text-align: center; }
.matrix input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.matrix tr.is-group td { background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.matrix th .pill { font-size: 13px; }
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.prices .field input { direction: ltr; }
.activation-cell { display: grid; gap: 3px; }
.activation-cell small { color: var(--text-2); font-size: 12px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.row-actions select { padding: 4px 8px; font-size: 13px; }
.queue.is-amber .queue-mark { background: var(--amber-tint); color: var(--amber-strong); }
.queue.is-amber.has-items { border-color: var(--amber-line); }
.plan-box { display: grid; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--bg); }
.plan-box .pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.plan-box small { color: var(--text-2); }
.preview { padding: 10px 12px; border-radius: 10px; background: var(--accent-tint); color: var(--accent-dark); font-size: 13px; }
.preview b { font-weight: 600; }

/* ---------- Online payments (payment_gateways.php, payments.php) ---------- */
.copy-field { width: 100%; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; background: var(--bg); }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 12px; }
.form fieldset[disabled] { opacity: .75; }
.event-payload { max-width: 520px; max-height: 160px; overflow: auto; margin: 0; padding: 8px 10px; background: var(--bg); border-radius: 6px; font-size: 12px; direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
