/* ==========================================================
   RentyCloud — site layer on top of the house kit (assets/kit/pl.css + admin.css / auth.css).
   Brand (RentyCloud identity): navy #0B2B44 side menu, sky blue for actions, orange for highlights,
   light sky and sand for secondary fills; Inter for Latin, Tajawal for Arabic. Warnings stay light violet (house rule).
   Parts below "from TrainyGate" are the tested form, table, wizard and alert styles.
   ========================================================== */
[data-site="ijar"] {
  --brand: #0A8FC7; --brand-rgb: 10, 143, 199; --brand-ink: #0477A8;
  --accent: #F6B233; --accent-rgb: 246, 178, 51; --cta: #0A8FC7; --cta-ink: #0477A8;
  --deep: #0B2B44; --deep-2: #123A5A;
  --sky: #A7D4E3; --sand: #EAD8A6;
  --ink: #10263A; --muted: #4F6476; --page: #F3F8FB; --surface: #ffffff; --surface-2: #EAF3F8; --line: #DCE7EF;
  --side: #0B2B44; --side-ink: #BFD6E6;
  --warn: #5f4aa6; --warn-bg: #f7f5fd;
  --radius: 18px;
}
[data-site="ijar"][data-bs-theme="dark"] {
  --brand: #2AA3DB; --brand-rgb: 42, 163, 219; --brand-ink: #8FD3F2;
  --accent: #F8C15A; --accent-rgb: 248, 193, 90; --cta: #1E8FC4; --cta-ink: #8FD3F2;
  --deep: #061A2B; --deep-2: #0B2B44;
  --sky: #A7D4E3; --sand: #EAD8A6;
  --ink: #E6F0F7; --muted: #9DB3C6; --page: #07131F; --surface: #0D1D2C; --surface-2: #112436; --line: #1D3549;
  --side: #061626; --side-ink: #A9C3D6;
  --warn: #b9a6ff; --warn-bg: rgba(167,139,250,.09);
}
/* Bootstrap's own colours follow the brand, so its helpers (form-check, links) match the kit */
[data-site="ijar"] { --bs-body-font-family: var(--font); --bs-body-bg: var(--page); --bs-body-color: var(--ink); --bs-link-color: var(--brand-ink); --bs-link-color-rgb: var(--brand-rgb); --bs-border-color: var(--line); --bs-secondary-color: var(--muted); --bs-primary: var(--brand); --bs-primary-rgb: var(--brand-rgb); }

small, .small { font-size: 15px; }
body { font-size: 17px; }
.muted, .text-muted { color: var(--muted) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--ok) !important; }
a { color: var(--brand-ink); }
.th-main { min-height: 50vh; }
.min-w-0 { min-width: 0; }
::selection { background: rgba(var(--brand-rgb), .2); }

/* ===== from TrainyGate ===== */
/* ---------- buttons on top of ButtonLab ---------- */
.btx-cta { background: var(--cta); }
.btx-cta:hover { color: #fff; }
.btx-danger { background: var(--danger); }
.btx-danger:hover { color: #fff; }
.btx-danger-soft { background: var(--danger-bg); color: var(--danger); }
.btx-danger-soft:hover { color: var(--danger); filter: brightness(.97); }
.btx-text { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .4rem; border: 0; background: none; color: var(--brand-ink); font: 700 16px var(--font); text-decoration: none; cursor: pointer; }
.btx-text:hover { text-decoration: underline; text-underline-offset: 4px; color: var(--brand-ink); }
.btx-text.text-danger { color: var(--danger); }
.btx-sm.btx-text { min-height: 40px; font-size: 15px; }
.btx-ghost.text-danger { color: var(--danger) !important; }
.btx.w-100 { width: 100%; }
form.d-inline, form.d-inline-block { display: inline-block; }

/* ---------- page head, sections, boxes ---------- */
.th-page-head { padding: clamp(24px, 3vw, 40px) 0 clamp(12px, 1.5vw, 18px); }
.th-page-head h1 { font-size: clamp(26px, 2.8vw, 36px); margin: 0; }
.th-page-head p { color: var(--muted); margin: .3rem 0 0; }
.th-page-head .btx-text:first-child { padding-inline: 0; margin-bottom: .2rem; }
.th-section { padding-block: clamp(48px, 6vw, 88px) 0; }
.th-section h2 { font-size: clamp(26px, 3vw, 40px); margin-bottom: .3rem; }
.th-section-lead { color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); margin-bottom: clamp(22px, 3vw, 36px); }
.box { margin-top: clamp(16px, 1.6vw, 22px); }                         /* cards never touch: unconditional margin … */
:is(.grid-2, .grid-3, .grid-4, .grid-parties, .kpis, .th-kpi-grid, .ac-two, .ad-content, .tg-cols) > .box { margin-top: 0; } /* … zeroed inside grids, which use gap */
.ad-content > * { margin-top: 0; }
.box-t { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 20px; font-weight: 800; margin: 0 0 1rem; }
.box-t > i { color: var(--brand-ink); }
.box > :last-child { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(16px, 2vw, 24px); }
.th-grid-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); }
.box.h-100, .grid-3 > .box, .grid-2 > .box { height: 100%; }
.th-form-section { font-size: 18px; font-weight: 800; padding-bottom: .5rem; margin: 1.6rem 0 1rem; border-bottom: 1px solid var(--line); }
.th-form-section:first-child { margin-top: .2rem; }

/* ---------- alerts (OverlayLab inline alert look) ---------- */
/* base block from CourseLab (kit/course.css); it was missing here, so every notice showed as plain text */
.note-b { display: flex; gap: .7rem; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--info-bg); color: var(--ink); font-size: 16px; }
.note-b > i { color: var(--info); font-size: 1.2rem; line-height: 1.6; }
.note-b.warn { background: var(--warn-bg); } .note-b.warn > i { color: var(--warn); }
.note-b.ok { background: var(--ok-bg); } .note-b.ok > i { color: var(--ok); }
.note-b { margin-block: 14px; border-radius: 16px; line-height: 1.75; }
.note-b.bad { background: var(--danger-bg); color: var(--danger); }
.note-b.bad > i, .note-b.bad b { color: var(--danger); }
.note-b.ok { color: var(--ink); }
.note-b > ul { margin: 0; padding-inline-start: 1.2rem; }
.note-b .th-note { margin-top: .5rem; }
.tg-flash { padding-top: 14px; }
.tg-flash .note-b { margin: 0; box-shadow: var(--shadow); }

/* ---------- pills / counts ---------- */
.pill.mute, .pill.gray { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.th-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 .45rem; border-radius: 999px; background: var(--cta); color: #fff; font-size: 15px; font-weight: 800; line-height: 1; }
.th-count-soft { display: inline-grid; place-items: center; min-width: 26px; padding: 0 .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 15px; font-weight: 800; }

/* ---------- KPI tiles (AdminLab .kpi for every area) ---------- */
.kpis, .th-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: clamp(12px, 1.4vw, 18px); }
.kpi { display: grid; align-content: start; gap: .15rem; }
.kpi .lbl { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-weight: 700; font-size: 15px; }
.kpi .lbl i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); }
.kpi .val { order: -1; font-size: clamp(24px, 2.2vw, 32px); font-weight: 800; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.kpi .kpi-note { color: var(--muted); font-size: 15px; }
a.th-stat-link { display: block; text-decoration: none; color: inherit; height: 100%; }
a.th-stat-link .box { height: 100%; transition: border-color var(--ease), transform var(--ease); }
a.th-stat-link:hover .box { border-color: rgba(var(--brand-rgb), .4); transform: translateY(-2px); }

/* ---------- tables (AdminLab .tbl, inner scroll on phones) ---------- */
.tbl-frame { min-width: 0; margin-top: clamp(16px, 1.6vw, 22px); border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.tbl th, .tbl td { padding: 12px 16px; text-align: start; vertical-align: middle; border-top: 1px solid var(--line); }
.tbl thead th { background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: 15px; white-space: nowrap; border-top: 0; }
.tbl tbody tr { transition: background var(--ease); }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.tbl-frame > .tbl { min-width: 640px; }
.tbl-frame > .tbl.th-table-fit { min-width: 0; }
.tbl .th-sub { color: var(--muted); font-size: 15px; }
.th-table-empty { text-align: center !important; color: var(--muted); padding: 40px 16px !important; }
[dir="rtl"] .tbl [dir="ltr"] { text-align: right; }
.th-row-won td { background: var(--ok-bg); }
.th-row-out td { opacity: .6; }
.th-row-error td { background: var(--danger-bg); }
.th-tree-child td:first-child { padding-inline-start: 40px; }
.th-tree-child td:first-child::before { content: '\21B3'; color: var(--muted); margin-inline-end: 8px; display: inline-block; }
[dir="rtl"] .th-tree-child td:first-child::before { transform: scaleX(-1); }
.th-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.th-actions form { margin: 0; }
.th-compare td { vertical-align: top; }
.th-plan-table { min-width: 1100px; }
.th-plan-table td { padding: 8px 10px; }
.th-plan-table td:nth-child(2) { min-width: 220px; }
.th-plan-table td:nth-child(3) { min-width: 190px; }
.th-plan-table td:nth-child(4), .th-plan-table td:nth-child(5) { width: 96px; }
.th-plan-table td:nth-child(8) { min-width: 200px; }

/* ---------- forms (FormLab parts) ---------- */
.fm-label { display: block; margin-bottom: .35rem; }
.fm-label.th-required::after, .th-required::after { content: ' *'; color: var(--danger); }
.fm-input.fm-sm { min-height: 44px; padding: .35rem .8rem; font-size: 15px; }
textarea.fm-input.fm-sm { min-height: 88px; }
select.fm-input { appearance: none; -webkit-appearance: none; padding-inline-end: 2.6rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2356636B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 14px; background-position: left 1rem center; cursor: pointer; }
[dir="ltr"] select.fm-input { background-position: right 1rem center; }
select.fm-input[multiple] { background-image: none; padding-inline-end: 1rem; min-height: 140px; }
.fm-input.is-invalid, .is-invalid > .fm-input { border-color: var(--danger) !important; }
.fm-input[readonly], .fm-input:disabled { background: var(--surface-2); color: var(--muted); }
.hint { display: block; margin-top: .3rem; color: var(--muted); font-size: 15px; line-height: 1.7; }
.th-field-error { display: block; margin-top: .3rem; color: var(--danger); font-size: 15px; font-weight: 600; }
.input-group { flex-wrap: nowrap; }
.input-group > .fm-input { flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group-text { display: inline-flex; align-items: center; padding: 0 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 15px; white-space: nowrap; }
.input-group > :not(:first-child) { margin-inline-start: -1.5px; }
[dir="rtl"] .input-group > .fm-input:not(:last-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
[dir="rtl"] .input-group > :not(:first-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
[dir="ltr"] .input-group > .fm-input:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
[dir="ltr"] .input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.form-check { display: flex; align-items: flex-start; gap: .6rem; min-height: 44px; padding: .5rem 0 0; margin: 0; }
.form-check .form-check-input { float: none; width: 22px; height: 22px; margin: .2rem 0 0; flex: 0 0 auto; border: 1.5px solid var(--line); background-color: var(--surface); cursor: pointer; }
.form-check .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check .form-check-input:focus { box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .14); border-color: var(--brand); }
.form-switch .form-check-input { width: 46px; height: 26px; border-radius: 26px; }
.form-check-label { cursor: pointer; }
.th-pair-label { margin-bottom: .2rem; }
.th-pair-lang { display: block; color: var(--muted); font-size: 15px; font-weight: 600; margin-bottom: .2rem; }

/* custom select (FormLab .fm-select) built by tg.js over a native <select>; the native one stays in the form */
.tg-sel { position: relative; }
.tg-sel > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.tg-sel-b { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 52px; padding: 0 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 500 16px var(--font); text-align: start; cursor: pointer; }
.tg-sel-b > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-sel-b > i { color: var(--muted); transition: transform var(--ease); flex: 0 0 auto; }
.tg-sel.is-open .tg-sel-b { border-color: rgba(var(--brand-rgb), .7); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .14); }
.tg-sel.is-open .tg-sel-b > i { transform: rotate(180deg); }
.tg-sel.fm-sm .tg-sel-b { min-height: 44px; font-size: 15px; }
.tg-sel.is-bad .tg-sel-b { border-color: var(--danger); }
.tg-sel-l { position: absolute; z-index: 40; top: calc(100% + 6px); inset-inline: 0; display: none; max-height: 300px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.tg-sel.is-open .tg-sel-l { display: grid; gap: 2px; }
.tg-sel-l [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 44px; padding: .45rem .8rem; border-radius: 10px; cursor: pointer; line-height: 1.5; }
.tg-sel-l [role="option"][aria-selected="true"] { color: var(--brand-ink); font-weight: 800; }
.tg-sel-l [role="option"][aria-selected="true"]::after { content: "\F26E"; font-family: "bootstrap-icons"; }
.tg-sel-l [role="option"].is-active { background: rgba(var(--brand-rgb), .08); }
.tg-sel-l [role="option"][aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.tg-sel-l .tg-grp { padding: .5rem .8rem .2rem; color: var(--muted); font-size: 15px; font-weight: 800; }

/* chips for fields and services (FormLab .fm-chips look) */
.th-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.th-chip { position: relative; display: inline-flex; margin: 0; }
.th-chip > input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.th-chip > input + span { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; cursor: pointer; transition: all var(--ease); }
.th-chip > input:checked + span { border-color: var(--brand); background: rgba(var(--brand-rgb), .08); color: var(--brand-ink); }
.th-chip > input:checked + span::before { content: '\F26E'; font-family: 'bootstrap-icons'; }
.th-chip > input:focus-visible + span { outline: 3px solid rgba(var(--brand-rgb), .55); outline-offset: 2px; }
.th-chip-sm > input + span { min-height: 40px; padding: 0 .8rem; }
.th-chips-group { margin-bottom: 1rem; }
.th-chips-group-title { font-weight: 800; font-size: 15px; margin-bottom: .5rem; }
.th-chips.is-invalid-group > .th-chip > span { border-color: var(--danger); }

/* file field in the page's own language */
.th-file { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 52px; padding: 5px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.th-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.th-file-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 1rem; margin: 0; border-radius: 10px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-weight: 700; cursor: pointer; }
.th-file-btn:hover { background: rgba(var(--brand-rgb), .16); }
.th-file-input:focus-visible + .th-file-btn { outline: 3px solid rgba(var(--brand-rgb), .55); outline-offset: 2px; }
.th-file-name { min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.th-file.has-file { border-style: solid; border-color: rgba(var(--brand-rgb), .4); }
.th-file.has-file .th-file-name { color: var(--ink); font-weight: 700; }

/* repeating price / cost rows */
.th-prices { display: grid; gap: .6rem; }
.th-price-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 170px 150px 110px 44px; gap: .5rem; align-items: center; }
.th-cost-row { grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) 140px 160px 44px; }
.th-price-row .th-chip { white-space: nowrap; }
@media (max-width: 991.98px) {
  .th-price-row, .th-cost-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
  .th-price-remove { justify-self: end; }
}

/* photos */
.th-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.th-thumb-sm { width: 64px; height: 48px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--muted); }
.th-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.th-photo { display: grid; gap: .4rem; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.th-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.th-photo-remove { display: inline-flex; align-items: center; gap: .3rem; min-height: 40px; color: var(--danger); font-size: 15px; font-weight: 700; cursor: pointer; }

/* ---------- key/value, documents, notes ---------- */
.th-sub { color: var(--muted); font-size: 15px; }
.th-dl { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: .6rem 1.4rem; margin: 0; }
.th-dl dt { color: var(--muted); font-weight: 700; }
.th-dl dd { margin: 0; overflow-wrap: anywhere; }
.th-dl-compact { grid-template-columns: minmax(90px, 140px) minmax(0, 1fr); }
[dir="rtl"] .th-dl dd[dir="ltr"] { text-align: right; }
@media (max-width: 575.98px) { .th-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .th-dl dd { margin-bottom: .7rem; } }
.th-docs { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.th-doc { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.th-doc > i { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-size: 1.15rem; }
.th-doc a { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.th-doc-meta { color: var(--muted); font-size: 15px; }
.th-note { padding: .8rem 1rem; border-radius: 14px; background: var(--surface-2); white-space: pre-line; }
.th-prose { white-space: normal; overflow-wrap: anywhere; }
.th-bullets, .th-steps-list { margin: 0; padding-inline-start: 1.3rem; }
.th-bullets li, .th-steps-list li { margin-bottom: .3rem; }
.th-link { color: var(--brand-ink); cursor: pointer; font-weight: 700; }
.th-file-link { display: inline-flex; gap: .4rem; align-items: center; min-height: 40px; text-decoration: none; font-size: 15px; font-weight: 700; }
.th-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--muted); }
.th-facts li { display: inline-flex; align-items: center; gap: .4rem; }
.th-facts i { color: var(--brand-ink); }
.th-breakdown, .th-settlement { width: 100%; margin-top: .4rem; font-size: 16px; }
.th-breakdown td, .th-settlement td { padding: .3rem 0; border: 0; }
.th-breakdown td:last-child, .th-settlement td:last-child { text-align: end; white-space: nowrap; }
.th-breakdown tr.th-total td, .th-settlement tr.th-total td { border-top: 1px dashed var(--line); font-weight: 800; padding-top: .6rem; }
.th-bar { height: 8px; min-width: 80px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.th-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.th-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.th-stats-grid > div { display: grid; padding: .7rem 1rem; border-radius: 14px; background: var(--surface-2); }
.th-stats-grid > div > strong { font-size: 22px; font-weight: 800; }
.th-preflight { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.th-preflight li { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.th-preflight code { color: var(--muted); }

/* links that look like a list row (account shortcuts) */
.th-presence { display: flex; align-items: center; gap: .9rem; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color var(--ease), transform var(--ease); }
.th-presence:hover { border-color: rgba(var(--brand-rgb), .4); color: var(--ink); transform: translateY(-1px); }
.th-presence + .th-presence { margin-top: .6rem; }
.th-party-icon { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 16px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-size: 1.45rem; }

/* status panel on account page */
.th-status { display: flex; gap: 1rem; align-items: flex-start; }
.th-status-icon { width: 56px; height: 56px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 18px; font-size: 1.5rem; }
.th-status-pending .th-status-icon { background: var(--warn-bg); color: var(--warn); }
.th-status-approved .th-status-icon { background: var(--ok-bg); color: var(--ok); }
.th-status-rejected .th-status-icon, .th-status-suspended .th-status-icon { background: var(--danger-bg); color: var(--danger); }
.th-status-unverified .th-status-icon { background: var(--surface-2); color: var(--muted); }

/* tabs and filters */
.th-tabs { display: flex; gap: 4px; margin-bottom: 1.2rem; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.th-tabs a { display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; padding: 0 1rem; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 800; text-decoration: none; white-space: nowrap; }
.th-tabs a:hover { color: var(--ink); }
.th-tabs a.active, .th-tabs a[aria-current="page"] { color: var(--ink); border-color: var(--brand); }
.th-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-bottom: 1.2rem; }
.th-filters > div { flex: 0 1 220px; min-width: 0; }
.th-filters .th-filter-search { flex: 1 1 280px; }
.th-pager { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin-top: 1.4rem; }
.th-pager a, .th-pager span { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .6rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; }
.th-pager span.current { background: var(--ink); border-color: var(--ink); color: var(--surface); }

/* two-column page: side + main */
.th-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(16px, 2vw, 24px); align-items: start; }
.th-split-public { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(16px, 2vw, 28px); align-items: start; }
.th-split > .box, .th-split > .tbl-frame, .th-split-public > .box, .th-split-public > div > .box:first-child { margin-top: 0; }
@media (max-width: 991.98px) { .th-split, .th-split-public { grid-template-columns: minmax(0, 1fr); } }
/* ---------- confirm dialog (native <dialog>, OverlayLab) ---------- */
.tg-confirm .dl-body { display: grid; gap: .7rem; padding: 24px; }
.tg-confirm .ic { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--warn-bg); color: var(--warn); font-size: 1.4rem; }
.tg-confirm p { margin: 0; font-size: 18px; font-weight: 700; }
.tg-confirm .acts { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin-top: .5rem; }
.tg-note-dlg .dl-body { display: grid; gap: .8rem; }
.tg-note-dlg h3 { font-size: 19px; margin: 0; }

/* ---------- account area (AuthLab account shell) ---------- */
.ac-layout { padding-block: clamp(20px, 2.4vw, 36px) 0; }
.ac-nav .who .av { width: 52px; height: 52px; font-size: 20px; }
.ac-nav .grp { margin: 12px 1rem 2px; color: var(--muted); font-size: 15px; font-weight: 800; }
.ac-nav a .th-count { margin-inline-start: auto; }
.ac-main > .th-page-head { padding-top: 0; }
.ac-main > .box:first-of-type, .ac-main > .note-b:first-child { margin-top: 0; }
@media (max-width: 991.98px) { .ac-nav .grp { display: none; } .ac-nav { top: calc(var(--head-h) - 4px); } }

/* ---------- auth pages (AuthLab split) ---------- */
.au-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100dvh; }
.au-form-side { display: flex; flex-direction: column; padding: 0 clamp(16px, 4vw, 64px) 32px; }
.au-form-side .au-top { min-height: 84px; }
.au-form-side .au-body { flex: 1; display: grid; align-items: center; justify-items: center; padding-block: 20px; }
.au-form-side .au-card { box-shadow: none; border: 0; padding: 0; background: none; max-width: 520px; }
.au-art { position: relative; margin: 14px; margin-inline-start: 0; border-radius: 30px; overflow: hidden; color: #fff; background: radial-gradient(110% 90% at 80% 0%, var(--deep-2) 0%, var(--deep) 60%); display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 4vw, 56px); }
.au-art h2 { color: #fff; font-size: clamp(26px, 2.6vw, 38px); margin: 0 0 .5rem; }
.au-art p { color: #C8DCE0; margin: 0; }
.au-art .tg-gate { max-width: 420px; margin-block: 1.5rem; }
.au-art ul { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.au-art li { display: flex; gap: .7rem; align-items: flex-start; color: #E6F1F3; }
.au-art li > i { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.08); color: var(--accent); }
.au-wide .au-card { max-width: 980px; }
.au-wide { grid-template-columns: minmax(0, 1fr); }
.au-wide .au-form-side .au-body { align-items: start; }
.au-card .fm-field + .fm-field { margin-top: 0; }
.au-stack > .note-b { margin: 0; }
@media (max-width: 991.98px) { .au-split { grid-template-columns: minmax(0, 1fr); } .au-art { display: none; } }

/* ---------- admin shell on the brand ---------- */
.ad-side .tg-logo { color: #fff; }
.ad-side .tg-logo .tg-name small { color: var(--side-ink); }
.ad-side .tg-logo .tg-name b span { color: var(--accent); }
.ad-side .tg-mark rect { fill: rgba(255,255,255,.08); }
.side-mini .ad-side .tg-name { display: none; }
.sd-nav .cnt { background: var(--cta); }
.ad-content > .th-page-head { padding: 0; }
.ad-content .tbl-frame, .ad-content .box { margin-top: 0; }
.ad-content form > .box, .ad-content form > .btx { margin-top: clamp(16px, 1.6vw, 22px); }
.ad-content form > .box:first-of-type { margin-top: 0; }
.ad-tabs-row { display: flex; flex-wrap: wrap; gap: .4rem; }

@media print {
  .ph, .tg-pilot, .tg-foot, .ac-nav, .ad-side, .ad-top, .d-print-none { display: none !important; }
  .ac-layout, .ad-app { display: block; }
  body { background: #fff; }
}

/* a page's own .wrap inside a shell that already has the page width */
.ac-main .wrap, .ad-content .wrap, .au-card .wrap { max-width: none; padding-inline: 0; }

/* course card media without a photo: a date tile on the brand colour */
.tg-cc-art { display: grid; place-items: center; background: radial-gradient(120% 120% at 85% 0%, var(--deep-2), var(--deep) 70%); }
.tg-cc-art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; }
.tg-cc-date { position: relative; z-index: 1; display: grid; justify-items: center; color: #fff; line-height: 1.1; }
.tg-cc-date b { font-size: clamp(44px, 5vw, 60px); font-weight: 800; }
.tg-cc-date span { font-size: 18px; font-weight: 700; color: #C8DCE0; }
.tg-cc-art .cc-fmt, .tg-cc-art .cc-hot { z-index: 1; }
.cc-hot { color: #0B3A46; }
fieldset.fm-field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.fm-field > legend { float: none; width: auto; padding: 0; }
.sum .seats { margin: 0; }
.sum .fm-chips label { flex: 1 1 auto; }
.sum .fm-chips input + span { width: 100%; justify-content: center; }

.ico.ico-ok { background: var(--ok-bg); color: var(--ok); }
.ico.ico-bad { background: var(--danger-bg); color: var(--danger); }
.au-card .ico { width: 60px; height: 60px; font-size: 1.6rem; border-radius: 18px; }

/* registration: account types as big rows, the form on a full-width card */
.tg-types { display: grid; gap: 10px; }
.tg-type { display: flex; align-items: center; gap: .9rem; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease); }
.tg-type:hover { color: var(--ink); border-color: rgba(var(--brand-rgb), .5); transform: translateY(-1px); box-shadow: var(--shadow); }
.tg-type .tx { flex: 1; display: grid; line-height: 1.5; }
.tg-type .tx b { font-size: 18px; }
.tg-type .tx > span { color: var(--muted); font-size: 15px; }
.tg-type > i { color: var(--muted); }
.tg-reg { margin-top: 1rem; padding: clamp(18px, 3vw, 36px); border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tg-reg-end { display: grid; gap: 1rem; justify-items: start; margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.au-wide .au-card > .steps-b { max-width: 640px; }

/* members' dashboard: "what needs you today" tiles (AdminLab overview task tiles) */
.tg-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.tg-task { display: flex; align-items: center; gap: .8rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color var(--ease), transform var(--ease); }
.tg-task:hover { color: var(--ink); border-color: rgba(var(--brand-rgb), .4); transform: translateY(-1px); }
.tg-task .ico { width: 44px; height: 44px; font-size: 1.2rem; border-radius: 14px; background: var(--surface-2); color: var(--muted); }
.tg-task.is-on .ico { background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); }
.tg-task.is-late .ico { background: var(--danger-bg); color: var(--danger); }
.tg-task .tx { flex: 1; display: grid; line-height: 1.4; min-width: 0; }
.tg-task .tx > b { font-size: 22px; font-weight: 800; justify-self: start; }
.tg-task .tx > span { color: var(--muted); font-size: 15px; }
.tg-task > i { color: var(--muted); }
.tg-cta.tg-cta-sm { margin-top: clamp(16px, 1.6vw, 22px); padding: clamp(18px, 2.4vw, 28px); border-radius: 24px; }
.tg-cta.tg-cta-sm h2 { font-size: 22px; }

/* admin shell extras */
.ad-content .box-h h2 { display: flex; align-items: center; gap: .5rem; }
.ad-content .box-h h2 > i { color: var(--brand-ink); }
a.box.kpi { color: var(--ink); text-decoration: none; transition: border-color var(--ease), transform var(--ease); }
a.box.kpi:hover { border-color: rgba(var(--brand-rgb), .4); transform: translateY(-2px); }
.kpi .val { order: 0; }
.kpi svg { display: block; width: 100%; height: 40px; margin-top: 6px; overflow: visible; }
.nt-list li.muted { padding: 12px; }

/* state pages (StateLab): the status code spelled with the brand arch as its middle digit */
.tg-nf { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.tg-digits { display: flex; align-items: center; justify-content: center; gap: clamp(4px, 1vw, 14px); direction: ltr; font-size: clamp(110px, 15vw, 220px); font-weight: 800; line-height: 1; color: var(--ink); user-select: none; }
.tg-digits .o { display: grid; width: .8em; height: .8em; }
.tg-digits .o .tg-mark { width: 100%; height: 100%; filter: drop-shadow(0 26px 40px rgba(11, 58, 70, .3)); }
.tried { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; color: var(--muted); font-size: 15px; }
.tried code { padding: .1rem .6rem; border-radius: 8px; background: var(--surface-2); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-search.tg-search-line { box-shadow: none; border: 1.5px solid var(--line); max-width: 560px; }
@media (max-width: 991.98px) { .tg-nf { grid-template-columns: minmax(0, 1fr); } .tg-digits { order: -1; } }

/* empty states (tables and lists): a soft icon tile above one plain sentence */
.th-table-empty, .th-box-empty { text-align: center !important; color: var(--muted); padding: 44px 16px !important; }
.th-table-empty > .bi-inbox, .th-box-empty > .bi-inbox { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: var(--surface-2); color: var(--brand); font-size: 26px; }

/* contact / feedback (PageLab contact): form beside a deep panel */
.tg-contact { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.tg-contact .box { margin-top: 0; }
.tg-contact-side { border-radius: var(--radius-lg, 22px); padding: clamp(22px, 3vw, 36px); color: #fff; background: radial-gradient(120% 90% at 100% 0%, var(--deep-2) 0%, var(--deep) 60%); position: sticky; top: 96px; }
.tg-contact-side h2 { font-size: 22px; margin: 0 0 1rem; color: #fff; }
.tg-mini-steps { list-style: none; margin: 0; padding: 0; counter-reset: ms; display: grid; gap: 16px; }
.tg-mini-steps > li { counter-increment: ms; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 12px; }
.tg-mini-steps > li::before { content: counter(ms); grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .12); color: var(--accent); font-weight: 800; }
.tg-mini-steps > li > b { font-size: 17px; }
.tg-mini-steps > li > span { color: rgba(255, 255, 255, .78); font-size: 15px; }
/* a finished action (feedback sent) */
.tg-done { text-align: center; padding: clamp(32px, 5vw, 64px) 20px; }
.tg-done > .ico { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; background: var(--ok-bg, #E6F4EA); color: var(--ok, #157F3B); font-size: 34px; }
.tg-done h2 { font-size: 24px; margin: 0 0 .4rem; }
.tg-done .btx { margin-top: 1rem; }
.th-box-empty .h4 { margin-bottom: .2rem; }
.tg-tips .th-bullets { margin: 0; }
.tg-pay { max-width: 560px; margin: clamp(30px, 8vh, 90px) auto; }
@media (max-width: 991.98px) { .tg-contact { grid-template-columns: minmax(0, 1fr); } .tg-contact-side { position: static; } }

/* switches: the off state must be visible (Bootstrap's default track is almost white) */
.form-switch .form-check-input { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2356636B'/%3e%3c/svg%3e"); }
.form-switch .form-check-input:not(:checked) { border-color: #A9B6BD; background-color: var(--surface-2); }
[data-bs-theme="dark"] .form-switch .form-check-input:not(:checked) { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%239DB0B6'/%3e%3c/svg%3e"); border-color: #4A6168; }
/* KPI rows: a short last row stretches to the full width instead of leaving one narrow tile */
.kpis { display: flex; flex-wrap: wrap; }
.kpis > * { flex: 1 1 220px; min-width: 0; }
.th-sec-h { font-size: 20px; margin: 30px 0 14px; }
.th-sec-h:first-child { margin-top: 0; }
.tbl .th-actions { flex-wrap: nowrap; white-space: nowrap; }

/* phones: the header row must fit 375px (menu, logo, one action); the theme switch moves into the menu */
.ph-panel .tg-panel-theme { display: none; }
@media (max-width: 575.98px) {
  .tg-head .ph-in { gap: 10px; }
  .tg-head .ph-act [data-theme-toggle] { display: none; }
  .ph-panel .tg-panel-theme { display: inline-flex; }
  .tg-head .tg-logo .tg-mark { width: 38px; height: 38px; }
  .tg-head .ph-act .btx-cta { padding-inline: .8rem; }
}
/* sign-in / sign-up column: the card may never grow past the phone width */
.au-form-side .au-body { grid-template-columns: minmax(0, 1fr); }
.au-form-side .au-card { min-width: 0; }
/* step bars on phones: the other steps shrink to their number so every step fits */
@media (max-width: 575.98px) {
  .steps-b li:not([aria-current="step"]) { flex: 0 0 auto; gap: 0; padding-inline: 8px; font-size: 0; }
  .steps-b li::before { font-size: 15px; }
}
/* admin content: wide tables scroll inside their frame instead of widening the page */
.ad-content { grid-template-columns: minmax(0, 1fr); }
.ad-content > * { min-width: 0; }
/* hero numbers fill their row (on phones two per row, edge to edge) */
.tg-facts > div { flex: 1 1 130px; }

/* ===== sign-up wizard: one question per screen ===== */
.wz-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wz-type { color: var(--muted); font-weight: 700; }
.wz-bar { height: 6px; margin: 14px 0 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.wz-bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .35s ease; }
[dir="rtl"] .wz-bar > i { margin-inline-start: 0; }
.tg-wz .wz-step { padding-top: 18px; }
.tg-wz .wz-step + .wz-step { margin-top: 28px; padding-top: 28px; border-top: 1px dashed var(--line); }
.tg-wz.wz-on .wz-step { display: none; margin: 0; border: 0; }
.tg-wz.wz-on .wz-step.is-cur { display: block; }
.tg-wz.wz-on .wz-step.is-cur.wz-anim { animation: wzIn .3s ease; }
@keyframes wzIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tg-wz.wz-on .wz-step.is-cur { animation: none; } .wz-bar > i { transition: none; } }
.wz-count { display: inline-block; padding: .1rem .75rem; border-radius: 999px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-size: 15px; font-weight: 800; }
.tg-wz h1 { margin: .6rem 0 .2rem; font-size: clamp(26px, 3vw, 36px); outline: none; }
.tg-wz .sub { margin-bottom: 1.2rem; }
.wz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.wz-card { position: relative; cursor: pointer; }
.wz-card > input { position: absolute; opacity: 0; inset: 0; }
.wz-card-in { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; height: 100%; min-height: 112px; padding: 14px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color var(--ease), background var(--ease), transform var(--ease), box-shadow var(--ease); }
.wz-card-in .ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(var(--brand-rgb), .1); color: var(--brand); font-size: 20px; transition: background var(--ease), color var(--ease); }
.wz-card-in b { font-size: 16px; line-height: 1.5; }
.wz-card-in .tick { position: absolute; top: 12px; inset-inline-end: 12px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); color: transparent; font-size: 15px; }
.wz-card:hover .wz-card-in { border-color: rgba(var(--brand-rgb), .45); transform: translateY(-2px); }
.wz-card > input:checked + .wz-card-in { border-color: transparent; background: linear-gradient(160deg, var(--deep-2), var(--deep)); color: #fff; box-shadow: 0 12px 26px rgba(11, 58, 70, .22); }
.wz-card > input:checked + .wz-card-in .ic { background: var(--accent); color: #fff; }
.wz-card > input:checked + .wz-card-in .tick { border-color: transparent; background: #fff; color: var(--deep); }
.wz-card > input:focus-visible + .wz-card-in { outline: 3px solid rgba(var(--brand-rgb), .45); outline-offset: 2px; }
.wz-cards.is-invalid .wz-card-in { border-color: rgba(220, 38, 38, .45); }
.wz-picked { min-height: 1.6em; margin: .7rem 0 0; color: var(--brand-ink); font-weight: 800; }
.wz-big .fm-input { min-height: 64px; font-size: 22px; font-weight: 700; border-radius: 18px; }
.wz-fields { display: grid; gap: 14px; }
.wz-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.tg-next { margin: 0 0 1.2rem; padding: 0; list-style: none; counter-reset: nx; display: grid; gap: 8px; text-align: start; }
.tg-next li { counter-increment: nx; display: flex; gap: .7rem; align-items: flex-start; }
.tg-next li::before { content: counter(nx); flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); font-weight: 800; font-size: 15px; }
/* wizard on phones: two compact cards per row; Back / Next stay at the bottom of the screen */
@media (max-width: 575.98px) {
  .wz-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wz-card-in { min-height: 96px; padding: 12px; gap: 8px; border-radius: 16px; }
  .wz-card-in .ic { width: 38px; height: 38px; font-size: 18px; border-radius: 12px; }
  .wz-card-in b { font-size: 15px; }
  .wz-card-in .tick { width: 22px; height: 22px; top: 10px; inset-inline-end: 10px; }
  .tg-wz.wz-on .wz-nav { position: sticky; bottom: 0; z-index: 5; margin-inline: -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--page); box-shadow: 0 -8px 20px rgba(11, 58, 70, .08); }
  .tg-wz.wz-on .wz-nav .btx { flex: 1; justify-content: center; }
}
/* a left-to-right password field inside an Arabic page: the eye button follows the page (left),
   so the field keeps its free space on the left too (its own "start"), not on its "end" */
[dir="rtl"] .pw .fm-input[dir="ltr"] { padding-inline-start: 52px; padding-inline-end: 14px; }

/* ===== step-by-step forms everywhere (wz_begin / wz_step / wz_end) ===== */
.wz-q { margin: .55rem 0 .2rem; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.4; outline: none; }
.wz-hint { margin: 0 0 1.2rem; color: var(--muted); }
form[data-wizard] .wz-bar { margin-top: 0; }
.wz-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; padding: 0; }
.wz-chips[hidden] { display: none; }
.wz-chips button { min-height: 40px; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 700 15px var(--font); cursor: pointer; }
.wz-chips button[aria-current="step"] { background: var(--deep); border-color: var(--deep); color: #fff; }
form[data-wizard]:not(.wz-on) .wz-step + .wz-step { margin-top: 28px; padding-top: 28px; border-top: 1px dashed var(--line); }
form[data-wizard].wz-on .wz-step { display: none; }
form[data-wizard].wz-on .wz-step.is-cur { display: block; }
form[data-wizard].wz-on .wz-step.is-cur.wz-anim { animation: wzIn .3s ease; }
form[data-wizard]:not(.wz-on) .wz-review .wz-summary, form[data-wizard]:not(.wz-on) .wz-review > .wz-hint, form[data-wizard]:not(.wz-on) .wz-review > .wz-q, form[data-wizard]:not(.wz-on) [data-wz-next], form[data-wizard]:not(.wz-on) [data-wz-back] { display: none; }
.wz-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.wz-summary { display: grid; gap: 12px; }
.wz-sum { padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); }
.wz-sum-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: .4rem; }
.wz-sum-h b { font-size: 17px; }
.wz-sum dl { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); gap: .35rem 1rem; margin: 0; }
.wz-sum dt { color: var(--muted); font-weight: 600; }
.wz-sum dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
  .wz-sum dl { grid-template-columns: minmax(0, 1fr); }
  .wz-sum dd { margin-bottom: .4rem; }
  form[data-wizard].wz-on .wz-nav { position: sticky; bottom: 0; z-index: 5; margin-inline: -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -8px 20px rgba(11, 58, 70, .08); }
  form[data-wizard].wz-on .wz-nav > .btx, form[data-wizard].wz-on .wz-acts { flex: 1; }
  form[data-wizard].wz-on .wz-acts .btx { flex: 1; justify-content: center; }
}



/* English (left to right): arrows and chevrons were picked for Arabic, so they mirror. The glyph flips,
   not the element, so hover movements on the icon still work. */
[dir="ltr"] :is(.bi-arrow-left, .bi-arrow-right, .bi-chevron-left, .bi-chevron-right, .bi-arrow-up-left, .bi-arrow-up-right, .bi-caret-left-fill, .bi-caret-right-fill):not(.flip-rtl)::before { display: inline-block; transform: scaleX(-1); }
.rc-lang { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.rc-lang:hover { color: var(--ink); background: var(--surface-2); }

/* English interface: a field holding Arabic (a name, an address) takes its direction from what is typed in it. */
[dir="ltr"] :is(input, textarea):not([dir]) { unicode-bidi: plaintext; }
