/*
 * riad-pages.css — the v6 page components (SYN-363, docs/design/handoff/v6/syndic.css "Controls", "Content blocks",
 * "Menus"). Scoped under .v6, the wrapper of every page rebuilt to the v6 screens, so Classique pages and the
 * Classique classes of the same names (.btn, .panel, .pill) are untouched. Tokens: syndic-tokens.css (.riad-stage).
 * Fixed rem scale (15 px), logical properties only (RTL-safe). Money: .num (tabular, no wrap) and .right.
 */

.v6 {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-block: 28px 48px;
    max-width: 1240px;
    width: 100%;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.v6 :where(h1, h2, h3, h4, p) { margin: 0; }
.v6 :where(button, input, select, textarea) { font: inherit; color: inherit; }
.v6 a { color: var(--blue); text-underline-offset: 3px; }
.v6 a:hover { color: var(--blue-hover); }
.v6 :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.v6 .mono { font-family: var(--f-mono); font-size: .92em; }

/* An existing page that takes only the v6 head (the building wizard): no page padding of its own. */
.v6.v6-head { padding-block: 0 8px; gap: 14px; }
.v6 ol.steps { list-style: none; margin: 0; padding: 0; }

/* A building page's body, under the workspace head (RiadWorkspace): no second head, less space above. */
.v6.ws-body { padding-block: 20px 48px; }

/* ---------- Page head ---------- */
.v6 .page-head:has(> .actions:only-child) { justify-content: flex-end; }
.v6 .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.v6 .page-head :is(h1, h2.h1) { font-family: var(--f-serif); font-size: 34px; line-height: 1.05; font-weight: 400; letter-spacing: 0; }
[dir="rtl"] .v6 .page-head :is(h1, h2.h1) { font-family: var(--f-ar); font-weight: 600; font-size: 2rem; line-height: 1.25; }
.v6 .h2-page { font-size: 1.25rem; font-weight: 600; }
.v6 .page-head .lede { color: var(--ink-2); margin-top: 6px; max-width: 68ch; }
.v6 .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Controls ---------- */
.v6 .btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px;
    border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
    font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.v6 .btn:hover { background: var(--sunk); color: var(--ink); }
.v6 .btn.primary { background: var(--blue); border-color: var(--blue); color: var(--riad-blue-ink); }
.v6 .btn.primary:hover { background: var(--blue-hover); color: var(--riad-blue-ink); }
.v6 .btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.v6 .btn.ghost:hover { background: var(--sunk); color: var(--ink); }
.v6 .btn.sm { min-height: 34px; padding: 5px 10px; font-size: .9rem; }
/* The Classique button classes a page hands to the workspace head (PageHead actions) read as their v6 twins. */
.v6 .btn.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--riad-blue-ink); }
.v6 .btn.btn-primary:hover { background: var(--blue-hover); color: var(--riad-blue-ink); }
.v6 .btn.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.v6 .btn.btn-sm { min-height: 34px; padding: 5px 10px; font-size: .9rem; }
.v6 .btn[disabled] { opacity: .5; cursor: not-allowed; }
.v6 .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.v6 .tabs a, .v6 .tabs button {
    padding: 10px 12px; margin-bottom: -1px; color: var(--ink-2); text-decoration: none; font-weight: 500;
    border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer;
}
.v6 .tabs :is(a, button):hover { color: var(--ink); }
.v6 .tabs :is(a, button).on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.v6 .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.v6 .chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 12px; border-radius: var(--r-pill);
    border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: .9rem; font-weight: 500;
    cursor: pointer; text-decoration: none;
}
.v6 .chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
/* Status: the five pill tones only. */
.v6 .pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: var(--r-pill); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.v6 .pill.ok { background: var(--teal-tint); color: var(--teal); }
.v6 .pill.warn { background: var(--warn-tint); color: var(--warn); }
.v6 .pill.crit { background: var(--crit-tint); color: var(--crit); }
.v6 .pill.info { background: var(--blue-tint); color: var(--blue); }
.v6 .pill.mute { background: var(--sunk); color: var(--ink-2); }
.v6 a.pill { text-decoration: none; }
.v6 a.pill:hover { filter: brightness(.96); }
.v6 .field { display: flex; flex-direction: column; gap: 6px; }
.v6 .field label { font-weight: 600; font-size: .93rem; }
.v6 .field .hint { font-size: .87rem; color: var(--ink-3); }
.v6 .input { min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); width: 100%; }
.v6 .input:hover { border-color: var(--ink-4); }
.v6 textarea.input { min-height: 96px; resize: vertical; }
.v6 .input.fit { width: auto; max-width: 100%; }
.v6 .row > .actions { margin-inline-start: auto; }

/* ---------- Content blocks ---------- */
.v6 .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.v6 .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.v6 .panel-head h2 { font-size: 1.07rem; font-weight: 600; }
.v6 .panel-head .meta { color: var(--ink-3); font-size: .9rem; }
.v6 .panel-body { padding: 16px 18px; }
.v6 .split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.v6 .split.lead { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
.v6 .cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.v6 .cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.v6 .stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.v6 .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.v6 .muted { color: var(--ink-3); }
.v6 .small { font-size: .9rem; }
.v6 .strong { font-weight: 600; }
.v6 .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.v6 .right { text-align: end; }
/* Summary strip: one panel divided by lines (not tiles). */
.v6 .strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.v6 .strip > div { padding: 14px 18px; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v6 .strip > div:first-child { border-inline-start: 0; }
.v6 .strip.flat { border: 0; border-block: 1px solid var(--line); border-radius: 0; }
.v6 .strip .k { font-size: .9rem; color: var(--ink-2); }
.v6 .strip .v { overflow-wrap: anywhere; min-width: 0; }
/* SYN-409: the big figures in Instrument Serif (riad-navy dashboard .kpi b); Cairo in Arabic. */
.v6 .strip .v { font-family: var(--f-serif); font-size: 2rem; line-height: 1.1; font-weight: 400; letter-spacing: 0; }
[dir="rtl"] .v6 .strip .v { font-family: var(--f-ar); font-size: 1.35rem; font-weight: 600; }
.v6 .strip .d { font-size: .87rem; color: var(--ink-3); }
/* Lists */
.v6 .list { display: flex; flex-direction: column; }
.v6 .item { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; text-align: start; width: 100%; background: none; border-inline: 0; border-bottom: 0; }
.v6 .item:first-child { border-top: 0; }
.v6 :is(a, button).item { cursor: pointer; }
.v6 .item:hover { background: var(--sunk); color: inherit; }
.v6 .item.on { background: var(--blue-tint); }
.v6 .item.block { display: block; }
.v6 .item.block:hover { background: none; }
.v6 .item .body { flex: 1; min-width: 0; }
.v6 .item .t { display: block; font-weight: 600; }
.v6 .item .s { display: block; font-size: .9rem; color: var(--ink-3); overflow-wrap: anywhere; }
.v6 .lead-icon { width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; flex: none; background: var(--sunk); color: var(--ink-2); }
.v6 .lead-icon.warn { background: var(--warn-tint); color: var(--warn); }
.v6 .lead-icon.crit { background: var(--crit-tint); color: var(--crit); }
.v6 .lead-icon.ok { background: var(--teal-tint); color: var(--teal); }
.v6 .lead-icon.info { background: var(--blue-tint); color: var(--blue); }
.v6 .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--teal-tint); color: var(--teal); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.v6 .group-title { display: flex; align-items: center; gap: 8px; padding: 14px 18px 6px; font-weight: 600; font-size: .95rem; color: var(--ink-2); }
/* Tables: a table keeps its columns and scrolls inside its box; the page never scrolls sideways. */
.v6 .tablebox { overflow-x: auto; max-width: 100%; position: relative; } /* relative: an absolutely placed child (an .sr-only header) is clipped too */
.v6 table.t { width: 100%; border-collapse: collapse; font-size: .95rem; }
.v6 table.t th { text-align: start; font-weight: 600; color: var(--ink-2); font-size: .9rem; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--sunk); white-space: nowrap; }
.v6 table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.v6 table.t tr:last-child td { border-bottom: 0; }
.v6 table.t tbody tr:hover td { background: var(--sunk); }
.v6 table.t .right { text-align: end; }
.v6 table.t tr.on td { background: var(--blue-tint); }
.v6 button.link { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; text-align: start; }
.v6 button.link:hover { text-decoration: underline; }
/* Meter (data, not decoration) */
.v6 .meter { height: 8px; background: var(--sunk); border-radius: var(--r-pill); overflow: hidden; }
/* SYN-409: progress bars are navy; teal means "paid / OK" only (the pills). */
.v6 .meter > span { display: block; height: 100%; background: var(--blue); border-radius: var(--r-pill); }
.v6 .meter.grow { flex: 1 1 5em; min-width: 4em; }
.v6 .meter.warn > span { background: var(--warn); }
.v6 .meter.crit > span { background: var(--crit); }
/* Notice */
.v6 .notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-lg); background: var(--blue-tint); color: var(--ink); }
.v6 .notice.warn { background: var(--warn-tint); }
.v6 .notice.crit { background: var(--crit-tint); }
.v6 .notice .t { font-weight: 600; }
.v6 .err { color: var(--crit); }
.v6 .item .support { display: flex; flex-direction: column; align-items: center; min-width: 4.5em; }
.v6 .asset-img { width: 100%; max-height: 14rem; object-fit: cover; border-radius: var(--r-md); }
/* Documents.html: the folders beside the table; above it on a phone. */
.v6 .docs-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 24px; align-items: start; }
.v6 .docs-folders { display: flex; flex-direction: column; gap: 2px; padding: 6px; }
.v6 .docs-folders :is(button, a) { text-decoration: none;  display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 10px; border: 0; border-radius: var(--r-md); background: none; color: var(--ink-2); font-weight: 500; text-align: start; cursor: pointer; }
.v6 .docs-folders :is(button, a):hover { background: var(--sunk); color: var(--ink); }
.v6 .docs-folders button.on { background: var(--blue-tint); color: var(--blue); font-weight: 600; }
.v6 .docs-folders .count { margin-inline-start: auto; font-size: .85rem; color: var(--ink-3); }
.v6 .empty { padding: 28px 18px; color: var(--ink-3); text-align: center; }

/* Conversation (Messages.html) */
.v6 .bubble { max-width: 72ch; padding: 10px 14px; border-radius: var(--r-lg); background: var(--sunk); overflow-wrap: anywhere; }
.v6 .bubble.mine { margin-inline-start: auto; background: var(--blue-tint); }
.v6 .reply { display: flex; align-items: flex-end; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.v6 .reply .field { flex: 1 1 16em; }

@container (max-width: 959px) {
    .v6 .split, .v6 .split.lead { grid-template-columns: minmax(0, 1fr); }
    /* SYN-364: once stacked, what the page is about comes before the form beside it (the events on a phone). */
    .v6 .split > .first-narrow { order: -1; }
    .v6 .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (max-width: 767px) {
    .v6 { padding-block: 18px 32px; gap: 18px; }
    .v6 .page-head :is(h1, h2.h1) { font-size: 1.45rem; }
    .v6 .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .v6 .strip > div:nth-child(odd) { border-inline-start: 0; }
    .v6 .strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
    .v6 .cols-3, .v6 .cols-2 { grid-template-columns: minmax(0, 1fr); }
    .v6 .docs-layout { grid-template-columns: minmax(0, 1fr); }
    .v6 .docs-folders { flex-direction: row; flex-wrap: wrap; }
    .v6 .item { padding-inline: 14px; }
    .v6 .btn { min-height: 44px; white-space: normal; text-align: center; }
    .v6 .chips, .v6 .row > * { min-width: 0; max-width: 100%; }
    .v6 .btn.sm { min-height: 40px; }
}


/* ---------- Access pages (SYN-364: Login, Activate, ForgotPassword, Mfa, LinkExpired, Privacy) ----------
   Outside the shell: the stage (.riad-stage) carries the tokens, .v6 the components. Login is a form column beside
   an illustration; the others are one panel under the brand, centred. Viewport media queries: no shell container. */
.v6.riad-auth { max-width: none; padding: 0; gap: 0; min-height: calc(100vh / var(--page-zoom, 1)); background: var(--bg); }
/* AccessDenied: the same panel, inside the shell (signed in). */
.v6.riad-auth-in { max-width: none; padding: 0; }
.v6 .auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.07rem; }
.v6 .auth-brand .riad-mark { width: 30px; height: 30px; }
.v6 .auth-center { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 64px 24px; }
.v6 .auth-center > .panel, .v6 .auth-center > .notice { width: 100%; max-width: 480px; }
.v6 .auth-center.wide > .panel, .v6 .auth-center.wide > .notice { max-width: 560px; }
.v6 .auth-center .panel-body { padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; }
.v6 .auth-title { font-size: 1.6rem; font-weight: 600; letter-spacing: -.015em; }
.v6 .auth-title-row { display: flex; align-items: center; gap: 12px; }
.v6 .auth-title-row .lead-icon { width: 40px; height: 40px; }
.v6 .auth-submit { justify-content: center; min-height: 46px; width: 100%; }
.v6 .auth-split { display: flex; flex-wrap: wrap; min-height: calc(100vh / var(--page-zoom, 1)); }
.v6 .auth-split > main { flex: 1 1 520px; display: flex; flex-direction: column; justify-content: center; padding: 48px 24px; }
.v6 .auth-split > main > div { width: 100%; max-width: 400px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.v6 .auth-split > main h1 { font-size: 1.75rem; font-weight: 600; letter-spacing: -.015em; }
.v6 .auth-split > aside { flex: 1 1 520px; background: var(--blue-tint); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 32px; gap: 20px; }
.v6 .auth-split > aside svg { width: 100%; max-width: 520px; height: auto; }
.v6 .auth-split > aside p { max-width: 420px; text-align: center; color: var(--ink-2); }
.v6 .auth-form { display: flex; flex-direction: column; gap: 16px; }
.v6 .auth-form .validation-message { color: var(--crit); font-size: .87rem; }
.v6 .auth-check { display: flex; align-items: center; gap: 8px; font-size: .93rem; }
.v6 .auth-foot { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font-size: .93rem; color: var(--ink-2); }
.v6 .auth-qr { width: 148px; height: 148px; border-radius: var(--r-md); background: var(--sunk); flex: none; }
.v6 .auth-code { font-family: var(--f-mono); font-size: 1.2rem; letter-spacing: .12em; }
.v6 .auth-doc { max-width: 760px; margin: 0 auto; padding: 48px 24px 64px; display: flex; flex-direction: column; gap: 28px; }
.v6 .auth-doc section { display: flex; flex-direction: column; gap: 8px; }
.v6 .auth-doc :is(p, li) { color: var(--ink-2); max-width: 60ch; }
.v6 .auth-doc h2 { font-size: 1.2rem; font-weight: 600; }
.v6 .auth-top { display: flex; align-items: center; gap: 8px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.v6 .auth-top .actions { margin-inline-start: auto; }
@media (max-width: 767px) {
    .v6 .auth-split > aside { display: none; }
    .v6 .auth-center { padding: 32px 16px; }
    .v6 .auth-center .panel-body { padding: 22px 18px; }
    .v6 .auth-top { padding-inline: 16px; }
}


/* ---------- /display: the television (SYN-364; Hall.html, AssemblyScreen.html, Lodge.html, AgencyWall.html) ----------
   Full screen, dark, sized on the viewport so a 1920 × 1080 television and a smaller browser keep the proportions.
   Not under .v6: the kiosk has its own scale. Tokens: syndic-tokens.css (--kiosk*). */
.kiosk-stage { min-height: 100vh; background: var(--kiosk); }
.kiosk { min-height: 100vh; height: 100vh; overflow: hidden; display: flex; flex-direction: column; gap: 1.6vw; padding: 2.2vw 2.6vw; box-sizing: border-box;
    background: var(--kiosk); color: var(--kiosk-ink); font-family: var(--f-sans); font-size: clamp(16px, 1.15vw, 26px); line-height: 1.4; }
.kiosk .kdim { color: var(--kiosk-dim); }
.kiosk h1, .kiosk h2 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.kiosk h2 { font-size: 1.5em; }
.kiosk .num { font-variant-numeric: tabular-nums; }
.kpanel { background: var(--kiosk-2); border: 1px solid var(--kiosk-line); border-radius: 18px; }
.kiosk .k-pad { padding: 1.4vw 1.6vw; display: flex; flex-direction: column; gap: .8vw; }
.kiosk .k-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6vw; text-align: center; }
.kiosk .k-brand { display: flex; align-items: center; gap: .6em; font-weight: 700; font-size: 1.4em; }
.kiosk .k-title { font-size: 2.6em; line-height: 1.15; }
.kiosk .k-lede { max-width: 40ch; }
.kiosk .k-code { font-family: var(--f-mono); font-size: 6em; letter-spacing: .12em; font-weight: 600; }
.kiosk .k-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2vw; }
.kiosk .k-name { font-size: 2em; font-weight: 600; }
.kiosk .k-clock { text-align: end; }
.kiosk .k-clock .num { font-size: 2.4em; font-weight: 600; }
.kiosk .k-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.6vw; }
.kiosk .k-grid { flex: 1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.6vw; }
.kiosk .k-stack { display: flex; flex-direction: column; gap: 1.6vw; }
.kiosk .k-list { display: flex; flex-direction: column; gap: .8vw; }
.kiosk .k-row { display: flex; gap: 1em; align-items: baseline; }
.kiosk .k-t { font-weight: 600; }
.kiosk .k-date { min-width: 5em; font-weight: 600; }
.kiosk .k-big { font-size: 2.4em; font-weight: 600; }
.kiosk .k-tally { gap: 1.4vw; }
.kiosk .k-bar { display: grid; grid-template-columns: 9em 1fr 6em; align-items: center; gap: 1em; font-size: 1.4em; }
.kiosk .k-bar .num { text-align: end; font-weight: 600; }
.kiosk .k-track { height: .7em; border-radius: 999px; background: var(--kiosk-line); overflow: hidden; }
.kiosk .k-track > span { display: block; height: 100%; background: var(--kiosk-dim); }
.kiosk .k-track > span.ok { background: var(--teal); }
.kiosk .k-track > span.warn { background: var(--warn); }
.kiosk .k-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(22vw, 1fr)); gap: 1.6vw; }
.kiosk .k-foot { text-align: center; }
.kiosk svg { max-width: 100%; height: auto; }
/* The building drawing on the dark kiosk: its legend and lot list take the kiosk inks (they use --ink-2 for light pages). */
.kiosk :is(.bm-legend, .bm-list, .bm-list summary) { color: var(--kiosk-dim); }
.kiosk .bm-svg { max-width: none; max-height: 42vh; }
/* SYN-381: a page's « Présentation », the kiosk over the page, full screen; Esc or « Fermer » closes it. */
.kiosk.presentation { position: fixed; inset: 0; z-index: 2000; height: auto; overflow: auto; outline: none; }
.kiosk .k-head-end { display: flex; align-items: flex-end; gap: 2vw; }
.kiosk .k-close { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; padding: .4em .9em; border-radius: 999px;
    border: 1px solid var(--kiosk-line); background: var(--kiosk-2); color: var(--kiosk-ink); font: inherit; cursor: pointer; }
.kiosk .k-close:hover, .kiosk .k-close:focus-visible { border-color: var(--kiosk-dim); }
.kiosk .p-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14em, 1fr)); gap: 1.6vw; }
.kiosk .p-tiles-lg { flex: 1; align-content: center; }
.kiosk .p-tile { display: flex; flex-direction: column; gap: .3em; }
@media (max-width: 767px) {
    .kiosk.presentation { padding: 20px 16px; gap: 16px; font-size: 16px; }
    .kiosk .k-head { flex-wrap: wrap; }
    .kiosk .p-tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
}


/* ---------- Resident pages on a phone (SYN-364 iteration 2; v6 ResidentPhone.html and the Res* screens) ----------
   The shell's top bar already names the page, so up to 600 px a resident page drops its own title block (its actions
   stay), and Home shows the design's compact head (the building, then lot · name) with no band above the content. */
.v6 .res-phone-head, .v6 .res-phone-only { display: none; }
@media (max-width: 600px) {
    .riad-resident .v6 { padding-block-start: 12px; gap: 14px; }
    .riad-resident .v6 > .page-head > div:not(.actions) { display: none; }
    .riad-resident .v6 > .page-head:not(:has(.actions > *)) { display: none; }
    .v6 .res-phone-head { display: block; }
    .v6 .res-wide-head { display: none; }
    .v6 .res-phone-only { display: inline-flex; justify-content: center; width: 100%; }
    .v6 [data-testid="resident-home-lede"] { font-size: .9rem; }
}

/* SYN-381: « Démarrer », the new syndic's five steps (no v6 screen; DESIGN.md: one panel, one primary action). */
.v6.start { display: flex; flex-direction: column; gap: 20px; max-width: 60rem; }
.v6 .notice.ok { background: var(--teal-tint); color: var(--ink); }
.v6 .notice.ok svg { color: var(--teal); flex: none; }
.v6 .start-pick { min-width: 14rem; }
.v6 .start-steps { list-style: none; margin: 16px 0 0; padding: 0; }
.v6 .start-step { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.v6 .start-step:first-child { border-top: 0; }
.v6 .start-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--sunk); color: var(--ink-3); }
.v6 .start-step.now .start-num { background: var(--blue); color: var(--riad-blue-ink); }
.v6 .start-step.done .start-num { background: var(--teal-tint); color: var(--teal); }
.v6 .start-txt { flex: 1 1 16rem; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v6 .start-step.done .start-txt b { color: var(--ink-2); font-weight: 500; }
.v6 .start-missing { color: var(--warn); }
.v6 .start-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.v6 .start-next { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.v6 .start-next .start-txt { flex: 1 1 14rem; }

/* SYN-409 (docs/design/screens/riad-navy/login.html): the brand, the form and the footer on white; the navy panel on the
   other side (the tagline, the big logo beside the four-language slogan, the badges, the zellige fading in from its far
   edge). On a phone the panel gives way to a navy band above the form. Mirrors in Arabic (flex follows the direction). */
.v6 .auth-navy { flex-wrap: nowrap; }
/* The form pane is the approved white in both themes: it pins the light palette (the navy panel is dark anyway). */
.v6 .auth-navy > main.auth-navy-left {
    flex: 1 1 50%; justify-content: space-between; gap: 32px; padding: 44px 56px 28px;
    --surface: #ffffff; --ink: #121826; --ink-2: #3d4759; --ink-3: #566175; --ink-4: #8a93a4; --line: #dde3eb; --line-2: #c6cfdb;
    --sunk: #eaeef3; --blue: #0A2246; --blue-hover: #12305c; --blue-tint: #e3e9f3; --focus: #0A2246; --riad-blue-ink: #ffffff;
    --crit: #b42318; --crit-tint: #fbe6e3;
    color-scheme: light; background: #ffffff; color: var(--ink);
}
.v6 .auth-navy > main > .auth-navy-brand { display: block; max-width: none; margin: 0; }
.v6 .auth-navy > main > .auth-v5-form { max-width: 356px; gap: 0; }
.v6 .auth-navy > main h1 { font-family: var(--f-serif); font-weight: 400; font-size: 34px; line-height: 1.1; letter-spacing: 0; }
[dir="rtl"] .v6 .auth-navy > main h1 { font-family: var(--f-ar); font-weight: 600; font-size: 1.75rem; }
.v6 .auth-navy-lede { margin: 6px 0 28px; font-size: 13px; }
.v6 .auth-navy .auth-form { display: flex; flex-direction: column; gap: 12px; }
.v6 .auth-navy .auth-form .input { min-height: 40px; border-radius: 10px; padding: 0 16px; border-color: #d9dee6; }
.v6 .auth-navy-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 10px; font-size: 14px; color: var(--ink-2); }
.v6 .auth-navy-row a { color: var(--navy, #0A2246); font-weight: 500; text-decoration: none; }
.v6 .auth-navy .auth-check input { accent-color: var(--navy, #0A2246); }
.v6 .auth-navy-submit { min-height: 40px; border-radius: 10px; font-size: 13px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; box-shadow: 0 2px 6px rgba(10, 34, 70, .25); }
[dir="rtl"] .v6 .auth-navy-submit { letter-spacing: 0; }
.v6 .auth-navy-lang { margin-top: 22px; text-align: center; font-size: 13px; color: var(--ink-3); }
.v6 .auth-navy-lang b { color: var(--navy, #0A2246); }
.v6 .auth-navy-lang [lang="ar"] { font-family: 'Noto Naskh Arabic', serif; font-size: 15px; }
.v6 .auth-navy-first { margin-top: 10px; text-align: center; }
.v6 .auth-navy > main > .auth-v5-foot { display: flex; flex-direction: row; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; max-width: none; margin: 0; font-size: 12px; color: var(--ink-3); }
.v6 .auth-v5-foot a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.v6 .auth-navy-panel { position: relative; overflow: hidden; flex: 1 1 50%; display: flex; flex-direction: column; padding: 56px 56px 28px; background: #0A2246; color: #ffffff; }
.v6 .auth-navy-panel > * { position: relative; }
.v6 .auth-navy-zellige {
    position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background: url('/brand/zenata-zellige-tile.png') repeat; background-size: 228px auto;
    -webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, .35) 30%, transparent 55%);
    mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, .35) 30%, transparent 55%);
}
[dir="rtl"] .v6 .auth-navy-zellige {
    -webkit-mask-image: linear-gradient(to right, #000 0%, rgba(0, 0, 0, .35) 30%, transparent 55%);
    mask-image: linear-gradient(to right, #000 0%, rgba(0, 0, 0, .35) 30%, transparent 55%);
}
.v6 .auth-navy-tag { margin: 0; max-width: 470px; font-family: var(--f-serif); font-size: 34px; line-height: 1.18; }
[dir="rtl"] .v6 .auth-navy-tag { font-family: var(--f-ar); font-size: 1.6rem; line-height: 1.5; }
.v6 .auth-navy-hero { margin: auto 0; display: flex; align-items: center; gap: 34px; }
.v6 .auth-navy-logo { height: 230px; width: auto; flex: none; }
.v6 .auth-slogan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
[dir="rtl"] .v6 .auth-slogan { text-align: right; }
/* Every line aligns with the page, whatever its own script's direction (as on the banner). */
.v6 .auth-slogan li { text-align: inherit; }
.v6 .auth-slogan li:lang(ar) { font-family: 'Noto Naskh Arabic', serif; font-size: 30px; line-height: 1.4; }
.v6 .auth-slogan li:lang(zgh) { font-family: 'Noto Sans Tifinagh', sans-serif; font-size: 19px; color: #cfe9e5; }
.v6 .auth-slogan li:lang(en) { font-size: 16px; color: #c9d5ea; }
.v6 .auth-slogan li:lang(fr) { font-family: var(--f-serif); font-size: 24px; color: #ffffff; }
.v6 .auth-slogan li.auth-navy-rule { width: 44px; height: 0; border-top: 2px solid #1E9C8C; margin: 6px 0; }
.v6 .auth-navy-badges { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; font-size: 12px; font-weight: 600; color: #c9d5ea; }
.v6 .auth-navy-badges svg { color: #e0a64a; vertical-align: -2px; margin-inline-end: 6px; }

/* The phone band: the logo and the slogan above the form. */
.v6 .auth-navy-band { display: none; }
@media (max-width: 767px) {
    .v6 .auth-navy { flex-direction: column; }
    .v6 .auth-navy > main.auth-navy-left { padding: 24px 20px; gap: 24px; }
    .v6 .auth-navy-panel { display: none; }
    .v6 .auth-navy-band { display: flex; align-items: center; gap: 16px; margin: 0 -20px; padding: 20px; background: #0A2246; color: #ffffff; }
    .v6 .auth-navy-band-logo { height: 84px; width: auto; flex: none; }
    .v6 .auth-navy-band .auth-slogan { gap: 2px; }
    .v6 .auth-navy-band .auth-slogan li:lang(ar) { font-size: 20px; }
    .v6 .auth-navy-band .auth-slogan li:lang(zgh) { font-size: 13px; }
    .v6 .auth-navy-band .auth-slogan li:lang(en) { font-size: 12px; }
    .v6 .auth-navy-band .auth-slogan li:lang(fr) { font-size: 16px; }
}
}

/* SYN-389: an owner's invitation that did not go out, with « Renvoyer » (Registre, Démarrer step 4). */
.invite-state { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.start-undelivered { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.start-undelivered li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }

/* SYN-382: the register import dialog. */
.register-steps { margin: 0 0 12px; padding-inline-start: 20px; display: grid; gap: 10px; }
.register-steps li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.register-counts { margin: 8px 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.register-problems { max-height: 320px; overflow: auto; }

/* ---------- AG Live (SYN-423; docs/design/screens/ag-live, panels 4 and 5) ----------------------------------------
   The owner's live view (phone and web) and the manager's control. Navy head like the mockup's phone, then the v6
   panels. One column on a phone, two from 900 px (the resolution and vote on the start side, the quorum, the floor
   and the actions on the end side). Logical properties only, so Arabic mirrors. */
.v6.ag-live { max-width: 1100px; }
.v6 .ag-live-head { background: var(--navy); color: #ffffff; border-radius: var(--r-lg); padding: 16px 18px; }
.v6 .ag-live-head h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--f-serif); font-weight: 400; font-size: 26px; color: #ffffff; }
[dir="rtl"] .v6 .ag-live-head h1 { font-family: var(--f-ar); font-weight: 600; font-size: 1.4rem; }
.v6 .ag-live-head p { margin: 4px 0 0; color: #d3dcea; font-size: .93rem; }
.v6 .ag-live-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) { .v6 .ag-live-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }
:is(.v6.ag-live, .v6.ag-control) .k { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--ink-3); margin: 0 0 6px; }
.v6 .ag-live-title { font-family: var(--f-serif); font-weight: 400; font-size: 1.5rem; line-height: 1.15; margin: 0 0 4px; }
[dir="rtl"] .v6 .ag-live-title { font-family: var(--f-ar); font-weight: 600; font-size: 1.25rem; }
.v6 .ag-live-bar { height: 8px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.v6 .ag-live-bar i { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.v6 .ag-live-votes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.v6 .ag-live-votes .btn { justify-content: center; min-height: 48px; }
:is(.v6.ag-live, .v6.ag-control) .stack > .btn { width: 100%; justify-content: center; min-height: 44px; }
.v6 .ag-live-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.v6 .ag-live-res > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.v6 .ag-live-res .v { font-family: var(--f-serif); font-size: 1.6rem; line-height: 1; color: var(--ink); }
[dir="rtl"] .v6 .ag-live-res .v { font-family: var(--f-ar); font-weight: 600; font-size: 1.3rem; }
.v6 .ag-live-result { display: flex; flex-direction: column; gap: 6px; }
:is(.v6.ag-live, .v6.ag-control) .pill { display: inline-flex; align-items: center; gap: 4px; }
.v6.ag-control { max-width: none; }
/* Icon and text in the headings and labels, with a gap (the panel heads and the aside's title). */
:is(.v6.ag-live, .v6.ag-control) :is(.panel-head h2, h2.k, .page-head h2) { display: flex; align-items: center; gap: 8px; }
.v6 .ag-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.v6 .ag-q:last-child { border-bottom: 0; }
.v6 .ag-q-sub { padding-inline-start: 14px; }
.v6 .ag-control-present .row { flex-wrap: wrap; }
.v6 .ag-control-present select { min-width: 12em; flex: 1; }
.v6 .ag-page { width: 6em; }
:is(.v6.ag-live, .v6.ag-control) .field-label { display: flex; align-items: center; justify-content: flex-start; gap: 6px; font-weight: 600; font-size: .9rem; }
@media (max-width: 767px) {
    .v6 .ag-live-votes .btn { min-height: 48px; padding-inline: 6px; }
    .v6 .ag-live-res .v { font-size: 1.3rem; }
}
/* SYN-423: a destructive confirmation (adjourning the meeting). */
.v6 .btn.danger { background: var(--crit); border-color: var(--crit); color: #ffffff; }
.v6 .btn.danger:hover { filter: brightness(1.08); color: #ffffff; }

/* SYN-426 (docs/design/icons.md): colour is never the only signal. Every status pill, banner, empty state and key field
   label carries an AppIcon, drawn as a mask (--ico-<name>, riad-page-icons.css) in the element's own colour. The tone
   or the input's kind gives the default; data-icon="<name>" names the meaning and wins. An element that already holds
   an <svg> (an <AppIcon> in its markup) is left as it is. */
:is(.v6, .riad-stage) :is(
    .pill:is(.ok, .warn, .crit, .info, .mute, .neutral, [data-icon]),
    .notice,
    .empty:not(:has(.empty-mark)),
    .field:has(> input:is([type="tel"], [type="email"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="file"], [type="search"], [inputmode="decimal"])) > label,
    label[data-icon],
    .field-label[data-icon],
    .t-ico[data-icon]
):not(:has(svg))::before {
    content: ""; flex: none; display: inline-block; background: currentColor;
    -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}

/* Pills: ✓ done, ⏱ waiting or late, ! needs action, i information, – inactive. */
:is(.v6, .riad-stage) .pill { gap: 5px; }
:is(.v6, .riad-stage) .pill::before { width: 12px; height: 12px; }
:is(.v6, .riad-stage) .pill.ok:not([data-icon]) { --ico: var(--ico-check); }
:is(.v6, .riad-stage) .pill.warn:not([data-icon]) { --ico: var(--ico-clock); }
:is(.v6, .riad-stage) .pill.crit:not([data-icon]) { --ico: var(--ico-warning); }
:is(.v6, .riad-stage) .pill.info:not([data-icon]) { --ico: var(--ico-info); }
:is(.v6, .riad-stage) .pill:is(.mute, .neutral):not([data-icon]) { --ico: var(--ico-minus); }

/* Banners: i information, ! warning, ⊗ error, ✓ done; the icon in the banner's tone. */
:is(.v6, .riad-stage) .notice::before { width: 18px; height: 18px; margin-top: 2px; color: var(--blue); }
:is(.v6, .riad-stage) .notice:not([data-icon]) { --ico: var(--ico-info); }
:is(.v6, .riad-stage) .notice.warn::before { color: var(--warn); }
:is(.v6, .riad-stage) .notice.warn:not([data-icon]) { --ico: var(--ico-warning); }
:is(.v6, .riad-stage) .notice.crit::before { color: var(--crit); }
:is(.v6, .riad-stage) .notice.crit:not([data-icon]) { --ico: var(--ico-error); }
:is(.v6, .riad-stage) .notice.ok::before { color: var(--teal); }
:is(.v6, .riad-stage) .notice.ok:not([data-icon]) { --ico: var(--ico-check-circle); }

/* Empty states: an icon above the sentence, an empty tray unless the list names what it holds. */
:is(.v6, .riad-stage) .empty::before { display: block; width: 28px; height: 28px; margin: 0 auto 8px; opacity: .8; }
:is(.v6, .riad-stage) .empty:not([data-icon]) { --ico: var(--ico-inbox); }

/* Key form fields: the input's kind names the label's icon (phone, e-mail, date, file, search, an amount);
   a lot, a person or an upload area says so with data-icon on its label. */
:is(.v6, .riad-stage) :is(.field > label, label[data-icon], .field-label[data-icon])::before { width: 15px; height: 15px; margin-inline-end: 6px; vertical-align: -2px; color: var(--ink-2); }
:is(.v6, .riad-stage) .field:has(> input[type="tel"]) > label:not([data-icon]) { --ico: var(--ico-phone); }
:is(.v6, .riad-stage) .field:has(> input[type="email"]) > label:not([data-icon]) { --ico: var(--ico-mail); }
:is(.v6, .riad-stage) .field:has(> input:is([type="date"], [type="datetime-local"], [type="month"], [type="time"])) > label:not([data-icon]) { --ico: var(--ico-calendar); }
:is(.v6, .riad-stage) .field:has(> input[type="file"]) > label:not([data-icon]) { --ico: var(--ico-paperclip); }
:is(.v6, .riad-stage) .field:has(> input[type="search"]) > label:not([data-icon]) { --ico: var(--ico-search); }
:is(.v6, .riad-stage) .field:has(> input[inputmode="decimal"]) > label:not([data-icon]) { --ico: var(--ico-money); }

/* A table cell or list row that names its item type (data-icon on .t-ico): a document, a payment method, a request. */
:is(.v6, .riad-stage) .t-ico[data-icon] { display: inline-flex; align-items: center; gap: 8px; }
:is(.v6, .riad-stage) .t-ico[data-icon]::before { width: 16px; height: 16px; color: var(--ink-2); }

/* SYN-426: a button's icon (AppIcon Class="bi", or .dir.bi around a directional one) shows in the Riad look only; the
   Classique look keeps its plain buttons. In a button the icon sits before the label, in the label's colour. */
.bi { display: none; }
:is(.riad-stage, .v6, body:has(.riad-stage) .mud-dialog) .bi { display: inline-block; flex: none; vertical-align: -2px; }
:is(.riad-stage, .v6, body:has(.riad-stage) .mud-dialog) :is(button, .btn, .mud-button-label) > .bi { margin-inline-end: 6px; }
:is(.riad-stage, .v6, body:has(.riad-stage) .mud-dialog) .nbi { display: none; }
:is(.riad-stage, .v6, body:has(.riad-stage) .mud-dialog) :is(.icon-btn, .riad-iconbtn) > .bi { margin: 0; }
:is(.v6, .riad-stage) .pill:is(.ok, .warn, .crit, .info, .mute, .neutral, [data-icon]) > .dot { display: none; }
.riad-crumbs :is(a, .riad-here) > svg { vertical-align: -2px; margin-inline-end: 4px; }
.riad-seg button > svg { vertical-align: -2px; }
/* SYN-426: the same field icons on MudBlazor fields (the dialogs), by the input's kind; a date picker shows the calendar. */
:is(.riad-stage, body:has(.riad-stage) .mud-dialog) :is(
    .mud-input-control:has(input:is([type="tel"], [type="email"], [type="date"], [type="datetime-local"], [type="search"], [type="file"])),
    .mud-picker
) .mud-input-label::before {
    content: ""; display: inline-block; width: 14px; height: 14px; margin-inline-end: 5px; vertical-align: -2px; background: currentColor;
    -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
:is(.riad-stage, body:has(.riad-stage) .mud-dialog) .mud-input-control:has(input[type="tel"]) { --ico: var(--ico-phone); }
:is(.riad-stage, body:has(.riad-stage) .mud-dialog) .mud-input-control:has(input[type="email"]) { --ico: var(--ico-mail); }
:is(.riad-stage, body:has(.riad-stage) .mud-dialog) :is(.mud-input-control:has(input:is([type="date"], [type="datetime-local"])), .mud-picker) { --ico: var(--ico-calendar); }
:is(.riad-stage, body:has(.riad-stage) .mud-dialog) .mud-input-control:has(input[type="search"]) { --ico: var(--ico-search); }
:is(.riad-stage, body:has(.riad-stage) .mud-dialog) .mud-input-control:has(input[type="file"]) { --ico: var(--ico-paperclip); }
:is(.v6, .riad-stage) .s .t-ico[data-icon]::before { width: 13px; height: 13px; }
:is(.riad-stage, .v6, body:has(.riad-stage) .mud-dialog) .nbi { display: none; }
:is(.riad-stage, .v6, body:has(.riad-stage) .mud-dialog) :is(.icon-btn, .riad-iconbtn) > .bi { margin: 0; }
/* A flex field label (the dialogs' .field-label, space-between) keeps its icon beside the text; the hint goes to the end. */
:is(.riad-stage, .v6) .field-label[data-icon] { justify-content: flex-start; align-items: center; }
:is(.riad-stage, .v6) .field-label[data-icon] > .field-hint { margin-inline-start: auto; }
