/* Almotakamel design system.
   Fonts are self-hosted (the CSP is default-src 'self'). Logical properties throughout, so one sheet serves RTL and LTR.
   Sections: fonts, tokens, base, shell, components, legacy classes (existing views), responsive. */

/* ---------- fonts ---------- */
/* Tajawal: Arabic and Latin subsets per weight. Latin includes the Western digits 0-9. */
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/tajawal-400-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/tajawal-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/tajawal-500-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/tajawal-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/tajawal-700-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/tajawal-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/tajawal-800-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/tajawal-800-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Readex Pro: one variable file (400-600), Latin and digits only, so Arabic text always uses Tajawal. */
@font-face { font-family: "Readex Pro"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/readex-pro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- tokens (light theme) ---------- */
:root {
  --navy: #0E1A55;          /* sidebar, derived from logo deep blue #1A2F8F */
  --navy-2: #16246B;
  --navy-ink: #DCE6F5;
  --navy-muted: #8F9FCB;
  --brand: #1F5BD8;         /* logo flat blue */
  --brand-deep: #1A2F8F;
  --brand-sky: #2D8AE0;
  --brand-soft: #E7EEFC;
  --hub: #FF7A1A;           /* logo hub orange: only for "now / today" and the mark itself */
  --bg: #F3F5FA;
  --surface: #FFFFFF;
  --surface-2: #F7F9FD;
  --line: #E1E6F0;
  --line-input: #C3CBDB;     /* form-field borders: darker than --line so the edge reads on the light fill */
  --line-input-hover: #A9B3C8;
  --ink: #0E1733;
  --muted: #5B6787;
  --ok: #11845B;  --ok-soft: #E3F4EC;
  --warn: #A86400; --warn-soft: #FDF1DC;
  --bad: #C2362B;  --bad-soft: #FBE7E5;
  --info: #1F5BD8; --info-soft: #E7EEFC;
  --violet: #6B4FD8; --violet-soft: #EEEAFD;
  --shadow: 0 1px 2px rgba(14,23,51,.06), 0 4px 16px rgba(14,23,51,.05);
  --radius: 12px;
  /* spacing scale: use these instead of raw pixel values */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --page-px: 28px;          /* page side padding */
  --page-gap: 24px;         /* between top-level blocks of a page */
  --card-px: 20px;          /* card side padding; table first/last cells line up with it */
  --card-py: 16px;
  --cell-px: 12px;          /* table cell side padding between columns */
  --field-gap: 16px;        /* between form fields, both directions */
  --font-ar: "Tajawal", "Readex Pro", Tahoma, sans-serif;
  --font-en: "Readex Pro", "Tajawal", "Segoe UI", Arial, sans-serif;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
/* author display rules (.field, grids...) must not defeat the hidden attribute */
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Tajawal", "Readex Pro", Tahoma, sans-serif; font-size: 15px; line-height: 1.55; }
body:lang(en) { font-family: "Readex Pro", "Tajawal", "Segoe UI", Arial, sans-serif; font-size: 14px; }
.num, .ltr, td.num, th.num { font-family: var(--font-en); direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-sky); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
a { color: var(--brand); text-decoration: none; }
.ic { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- scrollbars ----------
   Slim rounded thumb on a clear track. The transparent border insets the thumb so it floats off the edge.
   Chromium/Edge/Safari use ::-webkit-scrollbar; Firefox gets scrollbar-color/width only (setting those in Chromium
   would switch off the ::-webkit rules, hence the @supports guard). */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: #C3CBDB; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; min-height: 32px; }
::-webkit-scrollbar-thumb:hover { background-color: #8F9BB5; }
::-webkit-scrollbar-thumb:active { background-color: var(--brand); }
::-webkit-scrollbar-corner { background: transparent; }
.side::-webkit-scrollbar { width: 8px; }
.side::-webkit-scrollbar-track { background: var(--navy-2); }
.side::-webkit-scrollbar-thumb { background-color: #5468B0; border-color: var(--navy-2); background-clip: padding-box; }
.side::-webkit-scrollbar-thumb:hover { background-color: var(--navy-muted); }
.side::-webkit-scrollbar-thumb:active { background-color: var(--navy-ink); }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: #C3CBDB transparent; }
  .side { scrollbar-color: #5468B0 var(--navy-2); }
}

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--navy); color: var(--navy-ink); display: flex; flex-direction: column; gap: 4px;
  padding-block: 18px; padding-inline: 14px; position: sticky; inset-block-start: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding-inline: 6px; padding-block-end: 18px; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand b { display: block; font-family: var(--font-en); font-weight: 600; letter-spacing: .12em; font-size: 13px; color: #fff; }
.brand span { display: block; font-family: var(--font-ar); font-weight: 500; font-size: 15px; color: #9FC2F0; line-height: 1.2; }
.navgroup { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-muted); padding-block: 14px 4px; padding-inline: 10px; }
.nav a { display: flex; align-items: center; gap: 12px; padding-block: 9px; padding-inline: 10px; border-radius: 9px; color: var(--navy-ink); font-weight: 500; position: relative; }
.nav a svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a.on { background: var(--navy-2); color: #fff; }
.nav a.on::before { content: ""; position: absolute; inset-inline-start: -14px; inset-block: 8px; width: 3px; border-radius: 3px; background: var(--brand-sky); }
.nav a .count { margin-inline-start: auto; font-size: 11px; background: rgba(255,255,255,.12); padding-block: 1px; padding-inline: 7px; border-radius: 99px; }
.side-foot { margin-block-start: auto; border-block-start: 1px solid rgba(255,255,255,.08); padding-block: 12px 6px; display: flex; align-items: center; gap: 10px;
  position: sticky; inset-block-end: -18px; background: var(--navy); margin-inline: -14px; padding-inline: 14px; }
.side-foot small { display: block; color: var(--navy-muted); font-size: 12px; }
.side-foot button { margin-inline-start: auto; background: rgba(255,255,255,.06); border: 0; color: var(--navy-ink); cursor: pointer; padding: 7px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.side-foot button svg { width: 18px; height: 18px; }
.side-foot button:hover { background: rgba(255,255,255,.12); color: #fff; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #2D8AE0, #1A2F8F); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: none; }

.top { display: flex; align-items: center; gap: var(--sp-3); padding-block: var(--sp-3); padding-inline: var(--page-px); background: var(--surface); border-block-end: 1px solid var(--line);
  position: sticky; inset-block-start: env(safe-area-inset-top, 0px); z-index: 5; flex-wrap: wrap; }
.prop { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 8px; padding-block: 4px; padding-inline: 8px; background: none; cursor: pointer; line-height: 1.2; max-inline-size: 100%; min-width: 0; }
.prop:hover { background: var(--surface-2); }
span.prop { cursor: default; }
span.prop:hover { background: none; }
.prop .pi { width: 28px; height: 28px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.prop .pi svg { width: 15px; height: 15px; }
.prop .pn { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body:lang(en) .prop .pn { font-weight: 600; font-size: 13.5px; }
.prop .pc { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.prop > svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.prop-ico { width: 28px; height: 28px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.prop-ico svg { width: 15px; height: 15px; }
.prop-sel { position: relative; display: inline-flex; min-width: 0; max-inline-size: 100%; }
.prop select { appearance: none; -webkit-appearance: none; border: 1px solid transparent; border-radius: 8px; background-color: transparent; padding-block: 4px; padding-inline: 4px 24px; min-width: 0; max-inline-size: 100%; font-weight: 700; font-size: 14px; cursor: pointer; }
.prop-sel::after { content: ""; position: absolute; inset-inline-end: 6px; inset-block-start: 50%; translate: 0 -50%; width: 12px; height: 12px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%236B7A90' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px 12px no-repeat; }
.prop select:hover { border-color: var(--line); background-color: var(--surface-2); }
.prop select:focus-visible { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.bizdate { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.bizdate b { color: var(--ink); font-weight: 600; }
.bizdate .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hub); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hub) 25%, transparent); }
.search { flex: 1; min-width: 160px; max-inline-size: 420px; margin-inline-start: auto; position: relative; }
.search input { width: 100%; border: 1px solid var(--line-input); background: var(--surface-2); border-radius: 10px; padding-block: 8px; padding-inline: 36px 12px; }
.search svg { position: absolute; inset-inline-start: 11px; inset-block-start: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--muted); }
.kbd { position: absolute; inset-inline-end: 10px; inset-block-start: 50%; translate: 0 -50%; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding-inline: 5px; font-family: var(--font-en); }
.iconbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; height: 36px; min-width: 36px; padding-inline: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-weight: 600; font-size: 13px; }
.iconbtn:hover { border-color: var(--brand); color: var(--brand); }
.iconbtn svg { width: 17px; height: 17px; }
.iconbtn.menu-btn { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.page { padding-block: var(--sp-6) 48px; padding-inline: var(--page-px); display: flex; flex-direction: column; gap: var(--page-gap); min-width: 0; }
.pagehead { display: flex; align-items: flex-end; gap: var(--sp-4); flex-wrap: wrap; }
.pagehead h1 { font-size: 26px; font-weight: 800; }
body:lang(en) .pagehead h1 { font-weight: 600; font-size: 24px; }
.pagehead p { margin-block: var(--sp-1) 0; margin-inline: 0; color: var(--muted); }
.pagehead .actions { margin-inline-start: auto; display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ---------- components ---------- */
.btn { border: 1px solid transparent; border-radius: 10px; padding-block: 8px; padding-inline: 14px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; background: none; }
body:lang(en) .btn { font-weight: 500; font-size: 13.5px; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-deep); }
.btn.ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--surface); border-color: var(--brand); color: var(--brand); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 85%, #000); }
.btn.sm { padding-block: 5px; padding-inline: 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding-block: 11px; padding-inline: 20px; font-size: 15px; border-radius: 11px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card > header { display: flex; align-items: center; gap: var(--sp-3); padding-block: 14px; padding-inline: var(--card-px); border-block-end: 1px solid var(--line); min-block-size: 56px; flex-wrap: wrap; }
.card > header h2 { font-size: 16px; font-weight: 700; }
body:lang(en) .card > header h2 { font-weight: 600; font-size: 15px; }
.card > header .more { margin-inline-start: auto; font-size: 13px; font-weight: 600; }
.card .body { padding-block: var(--card-py); padding-inline: var(--card-px); }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding-block: 2px; padding-inline: 9px; border-radius: 99px; white-space: nowrap; }
body:lang(en) .chip { font-weight: 500; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pm-table .chip::before { content: none; }   /* item status «متوفر / غير متوفر»: text only, no dot (owner, 01/12/2026) */
.chip.ok { color: var(--ok); background: var(--ok-soft); }
.chip.warn { color: var(--warn); background: var(--warn-soft); }
.chip.bad { color: var(--bad); background: var(--bad-soft); }
.chip.info { color: var(--info); background: var(--info-soft); }
.chip.violet { color: var(--violet); background: var(--violet-soft); }
.chip.mute { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); padding: 3px; border-radius: 10px; }
.tabs button, .tabs a { border: 0; background: none; padding-block: 5px; padding-inline: 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.tabs button.on, .tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.tbl-wrap { overflow-x: auto; }
.tbl-wrap table, table.tbl { width: 100%; border-collapse: collapse; }
.tbl-wrap th, .tbl-wrap td, table.tbl th, table.tbl td { text-align: start; padding-block: 11px; padding-inline: var(--cell-px); border-block-end: 1px solid var(--line); white-space: nowrap; font-size: 14px; }
/* first and last columns line up with the card's own side padding */
:is(.tbl-wrap, .table-wrap, table.tbl, table.folio) :is(th, td):first-child { padding-inline-start: var(--card-px); }
:is(.tbl-wrap, .table-wrap, table.tbl, table.folio) :is(th, td):last-child { padding-inline-end: var(--card-px); }
body:lang(en) .tbl-wrap th, body:lang(en) .tbl-wrap td, body:lang(en) table.tbl th, body:lang(en) table.tbl td { font-size: 13.5px; }
.tbl-wrap th, table.tbl th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
body:lang(en) .tbl-wrap th, body:lang(en) table.tbl th { font-size: 12px; }
.tbl-wrap tr:last-child td, table.tbl tr:last-child td { border-block-end: 0; }
.tbl-wrap tbody tr:hover td, table.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl-wrap td.n, .tbl-wrap th.n, table.tbl td.n, table.tbl th.n { text-align: end; font-variant-numeric: tabular-nums; }

.roomtag { font-family: var(--font-en); font-weight: 600; background: var(--brand-soft); color: var(--brand-deep); padding-block: 2px; padding-inline: 8px; border-radius: 6px; font-size: 13px; }
.money { font-family: var(--font-en); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.cur { font-size: .78em; color: var(--muted); margin-inline-start: 3px; }

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { border: 1px solid var(--line-input); border-radius: 10px; padding-block: 10px; padding-inline: 12px; background: var(--surface-2); width: 100%; }
.field input:hover, .field select:hover, .field textarea:hover, .search input:hover, .rp-row select:hover, .select-filter:hover { border-color: var(--line-input-hover); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.field input:disabled { opacity: .6; }

.scrim { display: none; position: fixed; inset: 0; background: rgba(8, 14, 40, .38); z-index: 30; }

/* toast: centred with logical insets, so it needs no RTL override */
.toast { position: fixed; inset-block-end: calc(20px + env(safe-area-inset-bottom, 0px)); inset-inline: 0; margin-inline: auto; inline-size: fit-content; max-inline-size: calc(100% - 32px);
  background: var(--ink); color: var(--bg); padding-block: 10px; padding-inline: 16px; border-radius: 10px; font-size: 14px; z-index: 50; box-shadow: var(--shadow); }
.toast.ok { background: var(--ok); color: #fff; }
.toast.error { background: var(--bad); color: #fff; }
.toast.warn { background: var(--warn); color: #fff; }
.toast { display: flex; align-items: center; gap: 12px; }
.toast .toast-x { border: 0; background: none; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; padding-block: 0; padding-inline: 4px; flex: none; }
.toast.hide { opacity: 0; transition: opacity .3s; pointer-events: none; }
/* Two or three toasts at once (for example "created" + a credit warning) stack upwards instead of sitting on top of each other. */
.toast ~ .toast { inset-block-end: calc(76px + env(safe-area-inset-bottom, 0px)); }
.toast ~ .toast ~ .toast { inset-block-end: calc(132px + env(safe-area-inset-bottom, 0px)); }

/* ---------- legacy classes (existing views, styled with the tokens above; markup unchanged) ---------- */
/* page header: first h1 of a page, plus the muted line that follows it */
.page > h1:first-child { font-size: 26px; font-weight: 800; line-height: 1.3; }
body:lang(en) .page > h1:first-child { font-weight: 600; font-size: 24px; }
/* the page gap separates blocks; the subtitle and a section heading pull back towards what they belong to */
.page > h1:first-child:has(+ p) { margin-block-end: calc(var(--sp-1) - var(--page-gap)); }
.page > h1 + p { margin: 0; }
.page h1 .badge { vertical-align: middle; margin-inline-start: 6px; }
.page h2 { font-size: 16px; font-weight: 700; margin-block: var(--sp-1) var(--sp-3); }
.page h3 { font-size: 14.5px; font-weight: 700; margin-block: var(--sp-2) var(--sp-2); }
:is(.page, .stay-page) > :is(h2, h3) { margin-block: var(--sp-2) calc(var(--sp-3) - var(--page-gap)); }
:is(.page, .stay-page) > :is(h2, h3) + p { margin-block: calc(var(--sp-1) - var(--sp-3)) 0; }
.stay-page > p { margin-block: 0; }
.page :is(.card, .body, form) > :is(h2, h3):first-child { margin-block-start: 0; }
body:lang(en) .page h2, body:lang(en) .page h3 { font-weight: 600; }
.card > header h2 { margin: 0; }
.page > p, .page > form > p { margin-block: 0; }
.page > .grid > .stat a { font-size: 13px; font-weight: 600; }

.card:not(:has(> header, > .body)) { padding-block: var(--card-py) 20px; padding-inline: var(--card-px); }
/* a full-width table inside a padded card reaches the card edges, so its columns line up with the header */
.card:not(:has(> header, > .body)) > .table-wrap { margin-inline: calc(-1 * var(--card-px)); border-radius: 0; border-inline: 0; max-inline-size: none; }
.card:not(:has(> header, > .body)) > .table-wrap:last-child { margin-block-end: -20px; border-block-end: 0; border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }
.card.narrow { max-inline-size: 440px; margin-block: 3rem; margin-inline: auto; inline-size: 100%; }
.card.narrow h1 { font-size: 22px; font-weight: 800; margin-block-end: 14px; }
.card.narrow.center { padding-block: 28px; }
.card.narrow.center h1 { font-size: 44px; color: var(--brand); margin-block-end: 6px; }
.card.narrow.center .ic { inline-size: 44px; block-size: 44px; color: var(--bad); margin-block-end: 8px; }
.card .card { box-shadow: none; background: var(--surface-2); }
.center { text-align: center; }
.muted { color: var(--muted); }
.page label, .bare-box label, .report label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-block-end: 6px; }
.page label:has(> input[type=checkbox]), .page label:has(> input[type=radio]) { display: inline-flex; align-items: center; gap: 6px; }

.grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.windows { display: grid; gap: var(--page-gap); grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); align-items: start; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding-block: var(--card-py); padding-inline: var(--card-px); min-width: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.stat .n { font-family: var(--font-en); font-size: 32px; font-weight: 600; line-height: 1.2; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
/* «التقارير» cards: a line icon in a square tinted by the report's group (--c) */
.rp-grid { margin-block-start: var(--sp-5); }
.stat.rp { gap: var(--sp-3); color: var(--ink); font-weight: 600; text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
/* hover / keyboard focus: the whole card takes the group colour and lifts */
.stat.rp:hover, .stat.rp:focus-visible { transform: translateY(-3px); text-decoration: none;
  background: color-mix(in srgb, var(--c) 5%, var(--surface)); border-color: color-mix(in srgb, var(--c) 40%, var(--line));
  box-shadow: 0 2px 4px rgba(14,23,51,.05), 0 12px 28px color-mix(in srgb, var(--c) 16%, transparent); }
.stat.rp:focus-visible { outline: 2px solid var(--brand-sky); outline-offset: 2px; }
.stat.rp:active { transform: translateY(-1px); }
.rp-ic { display: grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 11%, var(--surface)); }
.rp-ic .ic { font-size: 23px; stroke-width: 1.7; }
@media (prefers-reduced-motion: reduce) { .stat.rp { transition: none; } .stat.rp:hover, .stat.rp:focus-visible, .stat.rp:active { transform: none; } }

/* forms */
:is(.page, .bare-box, .report) :is(input:not([type=checkbox], [type=radio], [type=hidden], [type=file], [type=submit]), select, textarea) {
  inline-size: 100%; min-width: 0; min-block-size: 42px; border: 1px solid var(--line-input); border-radius: 10px; padding-block: 9px; padding-inline: 12px; background: var(--surface-2); }
:is(.page, .bare-box, .report) textarea { min-block-size: 84px; }
:is(.page, .bare-box, .report) :is(input, select, textarea):hover:not(:focus) { border-color: var(--line-input-hover); }
:is(.page, .bare-box, .report) :is(input, select, textarea):focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); }
:is(.page, .bare-box, .report) :is(input, select, textarea):disabled { opacity: .6; }
:is(.page, .bare-box, .report) :is(input[type=number], input[type=date], input[type=time], input[dir=ltr]) { direction: ltr; text-align: end; }
:is(.page, .bare-box, .report) :is(input[type=checkbox], input[type=radio]) { accent-color: var(--brand); inline-size: 16px; block-size: 16px; }
.form-row { display: grid; gap: var(--field-gap); grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); align-items: end; margin-block-end: var(--field-gap); }
/* a form directly in a card: its last row of buttons gets air above it */
.card form > .actions:last-child, .card form > p:last-child:has(> button) { margin-block-start: var(--sp-2); }
.form-row > * { min-width: 0; }
.form-row:last-child { margin-block-end: 0; }
.field-error, .validation-summary-errors { color: var(--bad); font-size: 13px; }
.validation-summary-errors ul { margin: 0; padding-inline-start: 18px; }
.validation-summary-valid { display: none; }
.input-validation-error { border-color: var(--bad) !important; }
form.inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; vertical-align: middle; margin: 0; }
form.inline:not(:has(.prop)) :is(input:not([type=checkbox], [type=radio], [type=hidden]), select) { inline-size: auto; max-inline-size: 11rem; min-block-size: 34px; padding-block: 5px; padding-inline: 8px; border-radius: 8px; }

/* buttons: .btn alone is primary; .secondary is the quiet one; plain <button> in page content matches */
.btn, :is(.page, .bare-box, .no-print) button:not(.iconbtn, .link, .btn, .tabs *, .pos-tb, .pos-it) {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; padding-block: 8px; padding-inline: 14px;
  font-weight: 700; font-size: 14px; cursor: pointer; background: var(--brand); color: #fff; text-decoration: none; line-height: 1.4; }
body:lang(en) :is(.btn, .page button) { font-weight: 500; }
.btn:hover, :is(.page, .bare-box, .no-print) button:not(.iconbtn, .link, .btn, .tabs *, .pos-tb, .pos-it):hover { background: var(--brand-deep); text-decoration: none; }
.btn.secondary, :is(.page, .bare-box, .no-print) button.secondary:not(.btn) { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover, :is(.page, .bare-box, .no-print) button.secondary:not(.btn):hover { background: var(--surface); border-color: var(--brand); color: var(--brand); }
.btn.danger, :is(.page, .bare-box, .no-print) button.danger:not(.btn) { background: var(--bad); color: #fff; border-color: transparent; }
.btn.danger:hover, :is(.page, .bare-box, .no-print) button.danger:not(.btn):hover { background: color-mix(in srgb, var(--bad) 85%, #000); color: #fff; }
.btn.small, :is(.page, .bare-box, .no-print) button.small:not(.btn) { padding-block: 4px; padding-inline: 10px; font-size: 13px; border-radius: 8px; }
:is(.page, .bare-box, .no-print) button:not(.iconbtn, .link, .tabs *):disabled { opacity: .55; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font-weight: 600; text-decoration: underline; }

/* two-step confirm (site.js adds .armed and a .confirm-note) */
form.armed { outline: 2px solid var(--warn); outline-offset: 3px; border-radius: 8px; }
form.armed button[type=submit] { background: var(--warn); border-color: transparent; color: #fff; }
.confirm-note { display: block; flex-basis: 100%; margin: 0; padding-block: 6px; padding-inline: 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 600; white-space: normal; }

/* alerts and badges */
.alert { padding-block: 10px; padding-inline: 14px; border-radius: 10px; border: 1px solid var(--line); border-inline-start-width: 4px; background: var(--surface); }
.alert.error { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding-block: 2px; padding-inline: 9px; border-radius: 99px; white-space: nowrap; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); vertical-align: middle; }
body:lang(en) .badge { font-weight: 500; }
.badge::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge.bad { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.debit { color: var(--bad); }
.credit { color: var(--ok); }

/* legacy tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-inline-size: 100%; }
.table-wrap > table { inline-size: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { text-align: start; padding-block: 11px; padding-inline: var(--cell-px); border-block-end: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
body:lang(en) .table-wrap th, body:lang(en) .table-wrap td { font-size: 13.5px; }
.table-wrap th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
.table-wrap td { min-inline-size: 8ch; white-space: normal; overflow-wrap: break-word; }
.table-wrap td.num, .table-wrap td:has(> .money, > .roomtag, > time, > .badge) { white-space: nowrap; }
.table-wrap td input:not([type=checkbox], [type=radio], [type=hidden]), .table-wrap td select { min-inline-size: 110px; }
.table-wrap tbody tr:last-child td, .table-wrap tfoot tr:last-child td { border-block-end: 0; }
.table-wrap tbody tr:hover td { background: var(--surface-2); }
.table-wrap td.num, .table-wrap th.num { text-align: end; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap tr.total td { font-weight: 700; background: var(--surface-2); }
.table-wrap td > form.inline { white-space: normal; }
.card > .table-wrap, .card > form > .table-wrap { box-shadow: none; }

@media print { .table-wrap { overflow: visible; box-shadow: none; } .table-wrap td, .table-wrap th { white-space: normal; max-inline-size: none; overflow: visible; } }

/* ---------- dashboard (front desk) ---------- */
/* pages whose content sits in one wrapper div (for their script) keep the page's own gap */
.page > :is([data-desk], [data-cal], #queue) { display: flex; flex-direction: column; gap: var(--page-gap); min-inline-size: 0; }
/* count tiles: each tone sets --tone / --tone-soft; with JS a tile switches the list below */
.tiles { display: grid; gap: var(--sp-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { --tone: var(--brand); --tone-soft: var(--brand-soft); position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ico lbl" "val val" "sub sub" "prog prog";
  align-items: center; column-gap: var(--sp-3); row-gap: var(--sp-1); padding-block: 18px; padding-inline: var(--card-px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); min-inline-size: 0; text-align: start; transition: border-color .15s, box-shadow .15s; }
.tile.t-dep { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.tile.t-inh { --tone: var(--ok); --tone-soft: var(--ok-soft); }
.tile.t-free { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.t-ico { grid-area: ico; inline-size: 36px; block-size: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); }
.t-ico svg { inline-size: 18px; block-size: 18px; }
.t-lbl { grid-area: lbl; font-weight: 700; font-size: 14px; color: var(--ink); }
body:lang(en) .t-lbl { font-weight: 600; }
.t-val { grid-area: val; font-family: var(--font-en); font-size: 34px; font-weight: 600; line-height: 1.15; margin-block-start: var(--sp-2); font-variant-numeric: tabular-nums; }
.t-sub { grid-area: sub; font-size: 12.5px; color: var(--muted); }
.tile .prog { grid-area: prog; margin-block-start: var(--sp-2); }
.tile .prog i { background: var(--tone); }
[data-desk].js .tile[data-tab] { cursor: pointer; }
[data-desk].js .tile[data-tab]:hover { border-color: color-mix(in srgb, var(--tone) 55%, var(--line)); }
.tile.sel { border-color: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 16%, transparent), var(--shadow); }
.prog { block-size: 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.prog i { display: block; block-size: 100%; background: var(--brand); border-radius: 6px; }

/* desk tasks: one slim strip of pills under the tiles */
.taskstrip { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.task { --tone: var(--warn); display: flex; align-items: center; gap: var(--sp-3); padding-block: 10px; padding-inline: 14px; background: var(--surface); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--tone); border-radius: 10px; flex: 1 1 260px; min-inline-size: 0; }
.task.tone-bad { --tone: var(--bad); }
.task.tone-info { --tone: var(--info); }
.task .dot { display: none; }
.task > div { display: grid; min-inline-size: 0; }
.task b { font-size: 14px; }
.task small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task .btn { margin-inline-start: auto; flex: none; }

/* the one list below the tiles: its headers sit inside .desk-panel, so undo the padding .card gets when it has no direct header,
   letting the header divider and the table's shaded head row run edge to edge like every other card */
.card.board { padding: 0; overflow: hidden; }
.board .desk-panel > header .chip { font-family: var(--font-en); font-variant-numeric: tabular-nums; }
.board .desk-panel > header .chip::before { content: none; }   /* a count, not a status */
.board .desk-panel > header { display: flex; align-items: center; gap: var(--sp-3); padding-block: 14px; padding-inline: var(--card-px); border-block-end: 1px solid var(--line); min-block-size: 56px; flex-wrap: wrap; }
.board .desk-panel > header h2 { font-size: 16px; font-weight: 700; margin: 0; }
.board .desk-panel > header .more { margin-inline-start: auto; font-size: 13px; font-weight: 600; }
.board .desk-panel > header .btn.more { color: #fff; }
.board .desk-panel + .desk-panel { border-block-start: 1px solid var(--line); }
[data-desk].js .board .desk-panel + .desk-panel { border-block-start: 0; }
.desk-panel[hidden] { display: none; }
.desk-panel .tbl-wrap td.n form { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
td.empty { text-align: center; padding-block: 28px; }
.late { color: var(--bad); font-weight: 600; }
.guest { display: flex; align-items: center; gap: 10px; }
.guest .avatar { inline-size: 32px; block-size: 32px; font-size: 13px; }
.guest small { display: block; color: var(--muted); font-size: 12px; }
.avail { display: grid; gap: 14px; }
.av { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 2fr) auto; align-items: center; gap: var(--sp-4); }
.av b { font-weight: 700; } .av small { display: block; color: var(--muted); font-size: 12px; }
.avbar { block-size: 8px; border-radius: 8px; background: var(--ok-soft); overflow: hidden; }
.avbar i { display: block; block-size: 100%; background: var(--brand); }
.av .free { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.av .free b { font-family: var(--font-en); font-size: 16px; color: var(--ok); }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .tiles { gap: var(--sp-3); }
  .tile { padding-inline: 14px; }
  .t-val { font-size: 28px; }
  .task { flex-wrap: wrap; }
}

/* ---------- calendar (room tape chart + finder) ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-block: 12px; padding-inline: 18px; border-block-end: 1px solid var(--line); }
.toolbar .range { font-weight: 700; }
.toolbar .legend2 { display: flex; gap: 12px; margin-inline-start: auto; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.toolbar .legend2 span { display: inline-flex; align-items: center; gap: 5px; }
.toolbar .legend2 i { inline-size: 12px; block-size: 8px; border-radius: 3px; }
.lg-free { background: var(--ok-soft); border: 1px solid var(--ok); }
.cal-prev svg { transform: rotate(-90deg); }
.cal-next svg { transform: rotate(90deg); }
html[dir="ltr"] .cal-prev svg { transform: rotate(90deg); }
html[dir="ltr"] .cal-next svg { transform: rotate(-90deg); }
/* the grid scrolls inside its own container: the page never scrolls sideways */
.tape-wrap { overflow-x: auto; max-inline-size: 100%; }
.tape { --days: 14; display: grid; grid-template-columns: 150px repeat(var(--days), minmax(64px, 1fr)); min-inline-size: calc(150px + var(--days) * 64px); position: relative; }
.tape .h { background: var(--surface-2); border-block-end: 1px solid var(--line); padding-block: 8px; padding-inline: 4px; text-align: center; font-size: 12px; color: var(--muted); z-index: 2; }
.tape .h b { display: block; color: var(--ink); font-size: 15px; font-family: var(--font-en); font-weight: 600; }
.tape .h.wk { background: color-mix(in srgb, var(--surface-2) 70%, var(--brand-soft)); }
.tape .h.today, .tape .h.today b { color: var(--hub); }
.tape .h.q { box-shadow: inset 0 -3px 0 var(--ok); }
.tape .corner { position: sticky; inset-inline-start: 0; z-index: 4; text-align: start; padding-inline: 14px; }
.tape .rl { position: sticky; inset-inline-start: 0; background: var(--surface); border-block-end: 1px solid var(--line); border-inline-end: 1px solid var(--line); padding-inline: 14px; display: flex; align-items: center; gap: 8px; block-size: 46px; z-index: 3; }
.tape .rl b { font-family: var(--font-en); font-weight: 600; }
.tape .rl small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tape .rl .hk { inline-size: 8px; block-size: 8px; border-radius: 50%; margin-inline-start: auto; flex: none; }
.tape .rl.fit b { color: var(--ok); }
.tape .rl.fit { box-shadow: inset 3px 0 0 var(--ok); }
html[dir="rtl"] .tape .rl.fit { box-shadow: inset -3px 0 0 var(--ok); }
.tape .type { position: sticky; inset-inline-start: 0; background: var(--surface-2); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; line-height: 1.25; padding-block: 6px; padding-inline: 14px; z-index: 3; border-block-end: 1px solid var(--line); border-inline-end: 1px solid var(--line); }
.tape .type b { color: var(--ink); font-size: 13px; }
.tape .type small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.tape .type .chip { font-size: 11px; padding-inline: 7px; }
.tape .tcount { background: var(--surface-2); border-block-end: 1px solid var(--line); display: grid; place-items: center; }
.tape .tcount.wk { background: color-mix(in srgb, var(--surface-2) 70%, var(--brand-soft)); }
.fc { font-family: var(--font-en); font-weight: 600; font-size: 12px; min-inline-size: 24px; text-align: center; border-radius: 99px; padding-block: 1px; padding-inline: 6px; }
.fc.ok { background: var(--ok-soft); color: var(--ok); }
.fc.low { background: var(--warn-soft); color: var(--warn); }
.fc.none { background: var(--bad-soft); color: var(--bad); }
.tape .cell { border-block-end: 1px solid var(--line); border-inline-end: 1px solid color-mix(in srgb, var(--line) 60%, transparent); block-size: 46px; }
.tape .cell.wk { background: color-mix(in srgb, var(--brand-soft) 35%, transparent); }
.tape .cell.fit { background: color-mix(in srgb, var(--ok-soft) 85%, transparent); }
.tape .cell.sel { background: color-mix(in srgb, var(--brand) 22%, var(--surface)); }
.tape .cell.past { background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--line) 50%, transparent) 6px 7px); }
.tape .cell.free:not(.past) { cursor: cell; position: relative; user-select: none; }
.tape .cell.free:not(.past):hover::after { content: "+"; position: absolute; inset: 6px 3px; border-radius: 8px; border: 1.5px dashed color-mix(in srgb, var(--brand) 55%, transparent); color: var(--brand); display: grid; place-items: center; font-weight: 700; }
.tape .cell[role="button"]:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
/* bars are scoped to .tape because .bar is also the stripe of the dashboard alerts */
.tape .bar { z-index: 1; margin-block: 7px; margin-inline: 3px; border-radius: 8px; padding-inline: 10px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; cursor: pointer; border-inline-start: 3px solid; text-decoration: none; min-inline-size: 0; }
.tape span.bar { cursor: default; }
.tape .bar small { opacity: .75; font-weight: 500; }
.tape .bar.inhouse { background: var(--ok-soft); color: var(--ok); }
.tape .bar.confirmed { background: var(--info-soft); color: var(--info); }
.tape .bar.group { background: var(--violet-soft); color: var(--violet); }
.tape .bar.ooo { background: repeating-linear-gradient(135deg, var(--bad-soft) 0 6px, var(--surface) 6px 12px); color: var(--bad); }
.tape .bar.out { background: var(--surface-2); color: var(--muted); }
.tape a.bar:hover { filter: brightness(.97); outline: 2px solid currentColor; outline-offset: -1px; }
/* the business date: the only orange on the page */
.todayline { inline-size: 2px; justify-self: center; background: var(--hub); z-index: 2; pointer-events: none; }
/* finder: header, one search row, then the free rooms as a grid of small cards */
.finder > header .staychip { margin-inline-start: auto; }
.f-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: var(--sp-4); align-items: end; padding-block: var(--card-py); padding-inline: var(--card-px); border-block-end: 1px solid var(--line); background: var(--surface-2); }
.f-bar select { background: var(--surface); }
.f-bar .f-go .btn { min-block-size: 42px; padding-inline: 22px; }
.f-results { padding-block: var(--card-py) 20px; padding-inline: var(--card-px); display: grid; gap: var(--sp-3); min-inline-size: 0; }
.res-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.res-head > div { display: flex; align-items: center; gap: 8px; }
.res-head b { font-size: 14.5px; }
.res-head .cnt { font-family: var(--font-en); font-weight: 600; font-size: 12px; background: var(--ok-soft); color: var(--ok); border-radius: 99px; padding-block: 1px; padding-inline: 9px; }
.res-head .cnt.zero { background: var(--bad-soft); color: var(--bad); }
.staychip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--brand-deep); background: var(--brand-soft); border-radius: 8px; padding-block: 4px; padding-inline: 10px; font-weight: 600; }
.staychip svg { inline-size: 14px; block-size: 14px; }
/* two rows of cards are visible; more rooms scroll inside the list */
.res-list { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); max-block-size: 236px; overflow-y: auto; padding: 2px; }
.pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; align-content: start; border: 1px solid var(--line); border-radius: var(--radius); padding-block: 12px; padding-inline: 14px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.pick:hover { border-color: color-mix(in srgb, var(--ok) 60%, var(--line)); }
.pick.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 50%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.p-top { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--sp-3); min-inline-size: 0; }
.pno { font-family: var(--font-en); font-weight: 600; font-size: 20px; color: var(--brand-deep); background: var(--brand-soft); border-radius: 8px; min-inline-size: 58px; text-align: center; padding-block: 4px; padding-inline: 8px; }
.pinfo { display: grid; gap: 2px; min-inline-size: 0; }
.pinfo b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinfo small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pinfo .chip { font-size: 11px; padding-inline: 7px; }
.pprice { display: grid; line-height: 1.35; }
.pprice small { color: var(--muted); font-size: 12px; }
.pprice b { font-size: 16px; }
.pick > .btn { justify-content: center; padding-inline: 16px; }
.pick details { grid-column: 1 / -1; grid-row: 2; font-size: 12px; }
.pick:has(details) .pprice, .pick:has(details) > .btn { grid-row: 3; }
.res-none { color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding-block: 10px; padding-inline: 12px; font-size: 14px; }
/* booking bar */
.selbar { position: sticky; inset-block-end: env(safe-area-inset-bottom, 0px); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-block: 12px; padding-inline: 18px; border-block-start: 1px solid var(--line); background: var(--surface); border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); z-index: 4; }
.selbar.hint { color: var(--muted); font-size: 13px; }
.selbar.hint svg { inline-size: 16px; block-size: 16px; flex: none; }
.sb-main { display: grid; line-height: 1.3; }
.sb-main small, .sb-total small { color: var(--muted); font-size: 12px; }
.sb-total { display: grid; line-height: 1.3; margin-inline-start: auto; text-align: end; }
.sb-total b { font-size: 18px; }
@media (max-width: 860px) { .f-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .f-bar .f-go { grid-column: 1 / -1; } .f-bar .f-go .btn { inline-size: 100%; justify-content: center; } }
@media (max-width: 520px) { .f-bar { grid-template-columns: minmax(0, 1fr); } .res-list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset-block: 0; inset-inline-start: -280px; width: 260px; z-index: 40; transition: inset-inline-start .2s, visibility 0s linear .2s; height: 100%; visibility: hidden; }
  body.nav-open .side { inset-inline-start: 0; visibility: visible; transition: inset-inline-start .2s, visibility 0s; }
  body.nav-open .scrim { display: block; }
  .iconbtn.menu-btn { display: inline-flex; }
  .search { order: 5; flex-basis: 100%; max-inline-size: none; margin-inline-start: 0; }
  /* safe-area insets are physical (a notch sits on the screen's left/right), so these are deliberately physical, not logical, properties */
  .top, .page { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .bizdate span.l { display: none; }
  .page > h1:first-child { font-size: 22px; }
  .card:not(:has(> header, > .body)) { padding-inline: 14px; }
  .card.narrow { margin-block: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* logged-out pages: no shell, centred content */
body.bare { min-block-size: 100vh; display: grid; place-items: center; padding: 16px; }
.bare-box { inline-size: 100%; max-inline-size: 440px; min-width: 0; }

/* ---------- auth (sign-in) ---------- */
body.auth { margin: 0; }
.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-block-size: 100vh; }
.login .art { background: var(--navy); color: var(--navy-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; position: relative; overflow: hidden; }
.login .art .brand { display: flex; align-items: center; gap: 12px; padding: 0; }
.login .art .brand svg { inline-size: 40px; block-size: 40px; flex: none; }
.login .art-copy { display: grid; gap: 18px; position: relative; z-index: 1; }
.login .art .big { font-size: 44px; font-weight: 800; line-height: 1.25; color: #fff; }
.login .art .big mark { background: var(--brand); color: #fff; padding-inline: 10px; }
.login .art p { color: var(--navy-muted); max-inline-size: 42ch; margin: 0; }
.login .art-foot { color: var(--navy-muted); }
.login .art .net { position: absolute; inset-inline-end: -120px; inset-block-end: -120px; inline-size: 460px; opacity: .1; pointer-events: none; }
.login .formside { display: grid; place-items: center; padding-block: 40px; padding-inline: 24px; background: var(--surface); }
.login form { inline-size: min(380px, 100%); display: grid; gap: 16px; }
.login h1 { font-size: 26px; font-weight: 800; margin: 0; }
.login .field input { font-size: 15px; }
.login .field input:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.login .btn.primary { justify-content: center; padding: 12px; font-size: 15px; inline-size: 100%; }
.login label.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); font-weight: 500; }
.login label.check input { accent-color: var(--brand); inline-size: 16px; block-size: 16px; }
.hotelbadge { display: flex; align-items: center; gap: 12px; padding-block: 12px; padding-inline: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.hotelbadge b { display: block; font-size: 15px; }
.hotelbadge small { color: var(--muted); font-size: 12.5px; }
.hotelbadge .linkbtn { margin-inline-start: auto; }
.hb-ico { inline-size: 38px; block-size: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.hb-ico svg { inline-size: 19px; block-size: 19px; }
.linkbtn { background: none; border: 0; color: var(--brand); font-weight: 700; cursor: pointer; padding-block: 4px; padding-inline: 6px; border-radius: 6px; font-size: 13.5px; }
.linkbtn:hover { background: var(--brand-soft); }
.pw-wrap { position: relative; }
/* The password is always Latin / LTR, so the eye sits on the physical right in both languages: physical properties on purpose. */
.pw-wrap input { inline-size: 100%; padding-right: 44px; }
.pw-eye { position: absolute; right: 6px; inset-block-start: 50%; translate: 0 -50%; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; display: grid; place-items: center; }
.pw-eye svg { inline-size: 19px; block-size: 19px; display: block; }
.pw-eye span { display: grid; }
.pw-eye:hover { color: var(--brand); background: var(--brand-soft); }
.caps { color: var(--warn); font-size: 12.5px; font-weight: 600; }
.login .forgot { margin: 0; font-size: 13px; text-align: center; color: var(--muted); }
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login .art { padding-block: 32px; padding-inline: 16px; min-block-size: 260px; }
  .login .art .big { font-size: 32px; }
  .login .formside { padding-inline: 16px; }
}

/* ---------- hotel picker (after sign-in, more than one hotel) ---------- */
.pickhotel { inline-size: min(440px, 100%); display: grid; gap: 18px; }
.pickhotel h2 { margin: 0; }
.pickhotel p.muted { margin-block: 4px 0; margin-inline: 0; }
.ph-list { display: grid; gap: 10px; }
.ph-list form { margin: 0; }
.ph { display: flex; align-items: center; gap: 12px; padding-block: 12px; padding-inline: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: start; inline-size: 100%; font: inherit; color: inherit; }
.ph:hover { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.ph-main { flex: 1; min-inline-size: 0; display: grid; }
.ph-main b { font-size: 15px; }
.ph-main small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ph-stats { display: flex; gap: 14px; }
.ph-stats > span { display: grid; text-align: center; line-height: 1.2; }
.ph-stats b { font-size: 15px; }
.ph-stats small { color: var(--muted); font-size: 11px; }
.pickhotel > form.inline { justify-self: start; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- side panel (<panel> tag helper, panel.js) ---------- */
dialog.drawer { position: fixed; inset-block: 0; inset-inline: auto 0; margin: 0; padding: 0; border: 0; inline-size: min(420px, 100%); max-inline-size: 100%; block-size: 100dvh; max-block-size: none; background: var(--surface); color: var(--ink); box-shadow: 0 0 40px rgba(8, 14, 40, .25); }
dialog.drawer[open] { display: flex; flex-direction: column; }
dialog.drawer.wide { inline-size: min(720px, 100%); }
dialog.drawer::backdrop { background: rgba(8, 14, 40, .38); }
.drawer > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; padding-inline: 20px; border-block-end: 1px solid var(--line); }
.drawer > header h2 { font-size: 18px; font-weight: 700; margin: 0; }
.drawer form { display: flex; flex-direction: column; flex: 1; min-block-size: 0; }
.drawer .dbody { padding-block: 18px; padding-inline: 20px; display: grid; gap: 16px; overflow-y: auto; flex: 1; align-content: start; }
.drawer footer { display: flex; gap: 10px; justify-content: flex-end; padding-block: 14px; padding-inline: 20px; border-block-start: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- stay page: money bar, window chips, quick-add chips ---------- */
.stay-page { display: grid; gap: var(--page-gap); }
.moneybar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; padding-block: 18px; padding-inline: 22px; align-items: center; }
.mb-due small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.mb-due > b { display: flex; align-items: baseline; gap: 10px; font-size: 32px; font-weight: 700; line-height: 1.2; }
.mb-due > b.neg .money { color: var(--bad); }
.mb-due > b.zero .money { color: var(--ok); }
.mb-due > b.credit .money { color: var(--info); }
.mb-wins { display: flex; gap: 6px; margin-block-start: 8px; flex-wrap: wrap; }
.mb-wins a { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding-block: 4px; padding-inline: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mb-wins a .money { color: var(--ink); margin-inline-start: 4px; }
.mb-wins a.on, .mb-wins a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.mb-act { display: grid; gap: 12px; justify-items: end; padding-inline-start: 24px; border-inline-start: 1px solid var(--line); align-content: center; }
.mb-quick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mb-quick > span { font-size: 12.5px; color: var(--muted); margin-inline-end: 2px; }
.qchip { border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--surface); color: var(--ink); border-radius: 99px; padding-block: 3px; padding-inline: 11px; font-size: 13px; cursor: pointer; font-family: inherit; }
.qchip .money { color: var(--muted); font-size: 12px; margin-inline-start: 3px; }
.qchip:hover { background: var(--brand-soft); border-style: solid; }
@media (max-width: 860px) { .moneybar { grid-template-columns: minmax(0, 1fr); } .mb-act { padding-inline-start: 0; border-inline-start: 0; justify-items: start; } .mb-quick { justify-content: flex-start; } }

/* ---------- stay pass (design A: blue gradient, nights as dots, dashed tear line) ---------- */
.stay-top { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 960px) { .stay-top { grid-template-columns: minmax(0, 1fr); } }
.pass { border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); position: relative; box-shadow: 0 8px 24px -12px rgba(26, 47, 143, .45); }
.pass-top { position: relative; overflow: hidden; border-start-start-radius: 15px; border-start-end-radius: 15px; padding-block: 14px 18px; padding-inline: 16px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #2D8AE0 0%, transparent 55%), linear-gradient(135deg, #14246F 0%, #1A2F8F 45%, #1F5BD8 100%); }
.pass-head { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: #BFD3F5; }
.pass-head > span:first-child { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.pass-head svg { width: 15px; height: 15px; }
.pass-route { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-block-start: 12px; }
.pass-route .sd { display: grid; }
.pass-route .sd small { color: #BFD3F5; font-size: 11px; }
.pass-route .sd b { color: #fff; font-size: 40px; line-height: 1; margin-block: 4px 2px; font-family: var(--font-en); }
.pass-route .sd span { color: #fff; font-size: 12.5px; }
.pass-route .sd em { color: #BFD3F5; font-size: 11.5px; font-style: normal; }
.pm { display: grid; gap: 8px; justify-items: center; min-inline-size: 0; }
.moons { display: flex; align-items: center; justify-content: space-between; inline-size: 100%; position: relative; gap: 2px; min-block-size: 16px; }
.moons::before { content: ""; position: absolute; inset-inline: 4px; inset-block-start: 50%; border-block-start: 1.5px dashed rgba(220, 230, 245, .45); }
.moons i { position: relative; inline-size: 6px; block-size: 6px; min-inline-size: 0; border-radius: 50%; background: #1A2F8F; border: 2px solid rgba(220, 230, 245, .6); flex: 0 1 auto; }
.moons i.past { background: #DCE6F5; border-color: #DCE6F5; }
.moons i.now { inline-size: 10px; block-size: 10px; border: 0; background: linear-gradient(135deg, #FFA040, #F0561A); box-shadow: 0 0 0 3px rgba(255, 122, 26, .28), 0 0 10px rgba(255, 122, 26, .55); }
.moons.dense i { inline-size: 4px; block-size: 4px; border-width: 1.5px; }
.moons.dense i.now { inline-size: 8px; block-size: 8px; }
.pn { font-size: 11.5px; font-weight: 700; color: #FFB673; background: rgba(255, 122, 26, .14); border: 1px solid rgba(255, 160, 64, .35); padding-block: 1px; padding-inline: 9px; border-radius: 99px; white-space: nowrap; }
.pass-cut { block-size: 0; border-block-start: 2px dashed var(--line); margin-inline: 14px; }
.pass-stub { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px; padding-block: 12px 14px; padding-inline: 16px; }
.pass-stub small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.pass-stub b { font-size: 16px; font-weight: 700; }
.pass-stub b.money { font-size: 19px; font-weight: 600; color: var(--brand-deep); }
.pass-actions { display: flex; gap: 8px; margin-block-start: 12px; }

/* ---------- guests card ---------- */
/* scoped to .guests-card: the dashboard's .guest (avatar + name in a table cell) is a different thing */
.guests-card .body { display: grid; gap: 14px; }
.guests-card .guest { display: grid; gap: 8px; padding-block-end: 14px; border-block-end: 1px solid var(--line); }
.guests-card .guest:last-child { border-block-end: 0; padding-block-end: 0; }
.guest-name { display: flex; align-items: center; gap: 8px; }
.guest-name b { font-size: 15px; }
.guest-name .btn { margin-inline-start: auto; }
.guest .fact { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2); }
.guest .fact span { color: var(--muted); }
.guest .fact form { display: inline; }
.moons { min-inline-size: 0; overflow: hidden; }
.moons.dense i { flex: 0 1 4px; }
.moons.dense i.now { flex: 0 1 8px; }
.pbar { inline-size: 100%; block-size: 6px; border-radius: 99px; background: rgba(220, 230, 245, .25); overflow: hidden; }
.pbar i { display: block; block-size: 100%; border-radius: 99px; background: #DCE6F5; }
.pn.late { color: #fff; background: var(--bad); border-color: transparent; }

/* ---------- folio cards (one per window; chips in the money bar switch them when JS is on) ---------- */
.windows.js { grid-template-columns: minmax(0, 1fr); }
.windows.js .folio:not(.on) { display: none; }
.fhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 14px; padding-inline: 18px; border-block-end: 1px solid var(--line); }
.fhead h2 { font-size: 16px; font-weight: 700; margin: 0; }
.fhead small { color: var(--muted); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.fbtns { display: flex; gap: 8px; flex-wrap: wrap; }
table.folio { inline-size: 100%; border-collapse: collapse; }
table.folio th, table.folio td { text-align: start; padding-block: 11px; padding-inline: var(--cell-px); border-block-end: 1px solid var(--line); font-size: 14px; vertical-align: top; }
table.folio th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
table.folio td.n, table.folio th.n { text-align: end; font-variant-numeric: tabular-nums; font-family: var(--font-en); white-space: nowrap; }
table.folio td.credit { color: var(--ok); }
table.folio .ldesc { font-weight: 600; margin-inline-end: 6px; }
table.folio .mini { display: block; color: var(--muted); font-size: 12px; }
table.folio .chip { font-size: 11px; padding-inline: 7px; }
table.folio tr.is-reversed .ldesc { color: var(--muted); }
table.folio .struck { text-decoration: line-through; color: var(--muted); }
table.folio td.lact { white-space: nowrap; text-align: end; }
table.folio td.lact .btn { margin-inline-start: 4px; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.totals { display: grid; gap: 6px; padding-block: 12px; padding-inline: 18px; background: var(--surface-2); border-block-start: 1px solid var(--line); }
.totals > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.totals > div span { color: var(--muted); }
.totals .bal { font-size: 16px; font-weight: 700; padding-block-start: 6px; border-block-start: 1px dashed var(--line); }
.totals .bal span { color: var(--ink); }
.totals .bal .neg { color: var(--bad); }
.totals .bal .zero { color: var(--ok); }
.totals .bal .credit { color: var(--info); }
.wactions { display: flex; gap: 8px; flex-wrap: wrap; padding-block: 12px; padding-inline: 18px; }
.wactions:empty { display: none; }
.wactions form { display: inline; }

/* ---------- money panels ---------- */
.amt-in { font-size: 22px; font-weight: 600; text-align: center; }
.amt-hints { display: flex; gap: 6px; flex-wrap: wrap; margin-block-start: 8px; }
.seg-pm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg-pm label { position: relative; }
.seg-pm input { position: absolute; opacity: 0; inset: 0; inline-size: 100%; block-size: 100%; cursor: pointer; margin: 0; }
.seg-pm span { display: block; text-align: center; padding-block: 9px; padding-inline: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-weight: 600; font-size: 14px; }
.seg-pm input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.seg-pm input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.preview { margin: 0; padding-block: 10px; padding-inline: 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; font-size: 13.5px; }
.amt-hint { border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--surface); color: var(--ink); border-radius: 99px; padding-block: 3px; padding-inline: 11px; font-size: 13px; cursor: pointer; font-family: inherit; }
.amt-hint:hover { background: var(--brand-soft); border-style: solid; }

/* Check-in registration (one card per guest) */
.guest-card { margin-block-end: 14px; }
.guest-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 8px; }
.guest-card-head h2 { margin: 0; }
.req { color: var(--bad); }

/* Phase 7: the claim e-mail list sits under its send button with air */
[data-claim-mail] .table-wrap { margin-block-start: 1rem; }

/* Month-end statements «كشوف نهاية الشهر» */
.stm-bar { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; padding-block: 12px; padding-inline: var(--card-px); margin-block-end: 12px; }
.stm-prog { flex: 1; min-inline-size: 220px; display: grid; gap: 4px; }
.stm-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-block-end: 8px; }
.stm-warn { padding: 10px var(--card-px); margin-block-end: 12px; color: var(--warn); background: var(--warn-soft); }
.stm-live { display: block; }
.stm-sheet { padding: var(--card-px); }
.stm-paper { break-inside: auto; }
.stm-paper + .stm-paper { break-before: page; page-break-before: always; margin-block-start: 2rem; }
.stm-paper .stm-open td { font-weight: 700; }
.stm-carried { color: var(--warn); font-weight: 600; }

/* Reservations/Create: two cards (guest, stay), labels above fields, hints under them */
.res-form { display: grid; gap: 16px; }
.res-form .card > h2 { font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.res-form .form-row { align-items: start; }
.res-form .field > small { line-height: 1.5; }
.res-form .res-update { margin-block-start: 4px; }
.res-form .res-update label.check { font-weight: 600; color: var(--ink); margin: 0; }
.res-room { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-block-end: 14px; }
.res-actions { padding-block-end: 8px; }
/* Reservations list: page actions sit beside the title, the filter card keeps only the search button */
.pagehead.res-head { margin-block-end: 0; align-items: center; justify-content: flex-start; }

/* Guest fields (_GuestFields): four groups, each a grid with a fixed column count that follows the card's own width */
.gf { container-type: inline-size; display: grid; gap: 18px; }
.gf-note { margin: 0; font-size: 13px; }
.gf-group { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.gf-group > legend { padding: 0; margin-block-end: 8px; font-size: 13px; font-weight: 700; color: var(--brand); }
.gf-group > legend .muted { font-weight: 500; }
.gf-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.gf-grid > .field > small { line-height: 1.5; }
@container (min-width: 460px) { .gf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 820px) { .gf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- rooms board (Rooms/Index): tiles by floor, filter chips, one side panel per room ---------- */
.rfilters { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.rfilters button.rfilter { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding-block: 6px; padding-inline: 14px; font-weight: 600; font-size: 13.5px; gap: var(--sp-2); }
.rfilters button.rfilter b { font-family: var(--font-en); font-weight: 600; font-size: 12px; min-inline-size: 22px; padding-inline: 6px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.rfilters button.rfilter:hover { background: var(--surface); border-color: var(--brand); color: var(--brand); }
.rfilters button.rfilter.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.rfilters button.rfilter.on b { background: rgba(255,255,255,.2); color: #fff; }
.rfilters button.rfilter:disabled { opacity: .45; }
.floors { display: grid; gap: var(--page-gap); }
.floor > h2 { display: flex; align-items: baseline; gap: var(--sp-2); }
.floor > h2 small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.rtiles { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
/* each tile: a coloured band at the top for occupancy; amber background when the room is not ready */
.rtile { --tone: var(--ok); position: relative; display: grid; gap: 6px; align-content: start; padding-block: 14px 12px; padding-inline: 14px; background: var(--surface);
  border: 1px solid var(--line); border-block-start: 4px solid var(--tone); border-radius: var(--radius); box-shadow: var(--shadow); min-inline-size: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.rtile.s-occ { --tone: var(--brand); }
.rtile.s-ooo { --tone: var(--bad); background: repeating-linear-gradient(135deg, var(--surface) 0 10px, var(--bad-soft) 10px 12px); }
.rtile.is-notready { background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
.rtile:has(.rt-open):hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 18%, transparent), var(--shadow); transform: translateY(-1px); }
.rtile button.rt-open { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; padding: 0; margin: 0; border: 0; border-radius: inherit; background: transparent; cursor: pointer; z-index: 1; }
.rtile button.rt-open:hover { background: transparent; }
.rt-top { display: flex; align-items: center; gap: var(--sp-2); min-inline-size: 0; }
.rt-no { font-family: var(--font-en); font-size: 22px; font-weight: 600; line-height: 1.1; color: var(--ink); }
.rt-flags { display: flex; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; justify-content: flex-end; }
.rt-flag { font-size: 11px; font-weight: 700; padding-block: 1px; padding-inline: 6px; border-radius: 6px; }
.rt-flag.bad { background: var(--bad-soft); color: var(--bad); }
.rt-flag.warn { background: var(--warn-soft); color: var(--warn); }
.rt-type { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-state { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-block-start: 2px; }
.rt-occ { font-size: 13px; font-weight: 700; color: var(--tone); }
.rt-state .chip { font-size: 11px; padding-inline: 7px; }
.rt-none { text-align: center; padding-block: 24px; }
/* the room's side panel: three small forms one under the other */
.drawer .rpanel { gap: 0; }
.drawer form.rp-sec { flex: none; display: grid; gap: var(--sp-3); padding-block: 18px; border-block-start: 1px solid var(--line); }
.rp-state { display: flex; gap: 6px; flex-wrap: wrap; padding-block-end: 18px; }
.rp-sec h3 { margin: 0; font-size: 14px; font-weight: 700; }
.rp-sec p { margin: 0; }
.rp-row { display: flex; gap: var(--sp-2); }
.rp-row select { flex: 1; min-inline-size: 0; border: 1px solid var(--line-input); border-radius: 10px; padding-block: 9px; padding-inline: 12px; background: var(--surface-2); }
.rp-checks { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.rp-checks label { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 600; color: var(--ink); }
.rp-checks input { accent-color: var(--brand); inline-size: 16px; block-size: 16px; }
@media (max-width: 520px) { .rtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .rt-no { font-size: 20px; } }

/* ---------- dd/mm/yyyy date fields (site.js wraps every input[type=date]) ---------- */
.date-field { position: relative; display: block; min-inline-size: 0; }
form.inline .date-field { display: inline-block; }
/* the text box is always LTR, so the calendar button sits on the physical right */
.date-field > input.date-text { padding-right: 40px; text-align: left; font-family: var(--font-en); }
.date-field > input[type=date] { position: absolute; right: 0; bottom: 0; inline-size: 1px !important; block-size: 1px; min-block-size: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.date-field > button.date-pick { position: absolute; right: 5px; top: 50%; translate: 0 -50%; inline-size: 30px; block-size: 30px; min-block-size: 0; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.date-field > button.date-pick:hover { background: var(--brand-soft); color: var(--brand); }
.date-field > button.date-pick svg { inline-size: 17px; block-size: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ---------- type-to-filter dropdown (site.js, input[data-combo]): looks like the app's other selects ---------- */
.combo { position: relative; display: block; min-inline-size: 0; }
.combo > input { padding-inline-end: 34px; }
.combo > button.combo-btn { position: absolute; inset-inline-end: 6px; top: 50%; translate: 0 -50%; inline-size: 24px; block-size: 24px; min-block-size: 0; padding: 0; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.combo > button.combo-btn:hover { background: transparent; color: var(--brand); }
.combo > button.combo-btn svg { inline-size: 12px; block-size: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: rotate .15s; }
.combo.open > button.combo-btn svg { rotate: 180deg; }
.combo-list { position: absolute; inset-inline: 0; inset-block-start: calc(100% + 4px); z-index: 20; margin: 0; padding: 4px; list-style: none; max-block-size: 260px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(14,23,51,.14); }
.combo-list li { padding-block: 8px; padding-inline: 10px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.combo-list li:hover, .combo-list li.active { background: var(--brand-soft); color: var(--brand-deep); }
.combo-list li[aria-selected=true] { font-weight: 700; }
.combo-list li.combo-none { color: var(--muted); cursor: default; background: none; }

/* ---------- POS order page: the menu is the main column, the order sits beside it ---------- */
.pos-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-block-start: var(--sp-2) !important; color: var(--muted); font-size: 13.5px; }
.pos-meta b { color: var(--ink); font-weight: 600; }
.pos-take { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: var(--page-gap); align-items: start; }
.pos-order { position: sticky; inset-block-start: 80px; }
.pos-menu > header .pos-cats { margin-inline-start: auto; }
.pos-menu .body { display: grid; gap: var(--sp-5); }
.pos-cat > h3 { margin-block: 0 var(--sp-3) !important; color: var(--muted); font-size: 13px !important; }
.pos-items { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.pos-send { display: grid; gap: 6px; padding-block: 14px; padding-inline: var(--card-px); border-block-start: 1px solid var(--line); }
.pos-send .btn { justify-content: center; }
.pos-send small { font-size: 12px; }
.pay-row + .actions { margin-block-start: var(--sp-2); }
@media (max-width: 1100px) { .pos-take { grid-template-columns: minmax(0, 1fr); } .pos-order { position: static; } }

/* ---------- maintenance board (Maintenance/Index), after the mock-up ---------- */
.mt-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.mtt { display: flex; align-items: center; gap: 12px; padding-block: 14px; padding-inline: 18px; border-inline-start: 4px solid var(--c) !important; }
.mtt b { font-size: 28px; font-weight: 600; line-height: 1.1; }
.mtt span { color: var(--muted); font-size: 13px; font-weight: 600; }
.mt-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--page-gap); align-items: start; }
.techs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--sp-3); }
.page button.tchip { display: flex; align-items: center; justify-content: flex-start; gap: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding-block: 10px; padding-inline: 12px; font-weight: 400; text-align: start; }
.page button.tchip:hover { background: var(--surface); border-color: var(--brand); }
.page button.tchip.on { border-color: var(--brand); background: var(--brand-soft); }
.tchip .avatar { inline-size: 34px; block-size: 34px; font-size: 12px; }
.tchip b { display: block; font-size: 13.5px; font-weight: 600; }
.tchip small { display: block; font-size: 12px; color: var(--muted); }
.unas-av { background: var(--surface-2) !important; color: var(--muted) !important; border: 1px dashed var(--line); }
.ooo-h { display: flex; align-items: center; gap: 8px; color: var(--bad); }
.ooo-h svg { inline-size: 16px; block-size: 16px; }
.ooo-list { display: grid; gap: 10px; }
.ooo-r { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding-block: 8px; padding-inline: 12px; font-size: 13.5px; color: var(--ink); }
.ooo-r:hover { border-color: var(--bad); }
.board-bar { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.board-bar .hint { font-size: 12.5px; }
.board-bar .more-btn { margin-inline-start: auto; font-size: 13px; font-weight: 600; }
/* all four columns fit the width: no sideways scroll; 2 x 2, then 1, on narrower screens */
.mt-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; }
.mt-col { min-inline-size: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); min-block-size: 220px; display: flex; flex-direction: column; }
.mt-col > header { display: flex; align-items: center; gap: 8px; padding-block: 14px; padding-inline: 16px; }
.mt-col > header h2 { font-size: 14px !important; font-weight: 700; margin: 0 !important; }
.mt-col > header .cnt { margin-inline-start: auto; font-size: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding-inline: 8px; }
.mt-col .dot { inline-size: 9px; block-size: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.mt-col.st-open .dot { background: var(--warn); }
.mt-col.st-assigned .dot { background: var(--info); }
.mt-col.st-inprogress .dot { background: var(--violet); }
.mt-col.st-resolved .dot { background: var(--ok); }
.col-body { display: grid; gap: 14px; padding-block: 0 14px; padding-inline: 12px; }
.col-empty { margin: 0; text-align: center; color: var(--muted); font-size: 12.5px; border: 1.5px dashed var(--line); border-radius: 10px; padding-block: 18px; padding-inline: 8px; }
.mo { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding-block: 14px 12px; padding-inline: 14px; display: grid; gap: 10px; border-inline-start: 4px solid var(--line); box-shadow: var(--shadow); }
.mo:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.mo.pr-bad { border-inline-start-color: var(--bad); }
.mo.pr-warn { border-inline-start-color: var(--warn); }
.mo.pr-info { border-inline-start-color: var(--info); }
.mo-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.mo-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mo-assign { position: relative; z-index: 2; }
.mo-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mo-top .chip { margin-inline-start: auto; }
.mo-cat { inline-size: 26px; block-size: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.mo-cat svg { inline-size: 15px; block-size: 15px; }
.mo-no { font-size: 12px; color: var(--muted); }
.mo-where { font-size: 14.5px; line-height: 1.4; }
.mo p { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.45; }
.mo-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; border-block-start: 1px dashed var(--line); padding-block-start: 10px; }
.mo-tech { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.mo-tech .avatar { inline-size: 22px; block-size: 22px; font-size: 9px; }
.mt-none { text-align: center; }
@media (max-width: 1280px) { .mt-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .mt-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .mt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mt-board { grid-template-columns: minmax(0, 1fr); } }
/* drag and drop on the maintenance board */
.mo[draggable="true"] { cursor: grab; }
.mo.dragging { opacity: .45; cursor: grabbing; }
.mo.saving { opacity: .6; pointer-events: none; }
.mt-board.dragging .mt-col { transition: background .15s, border-color .15s, opacity .15s; }
.mt-col.can-drop { border-style: dashed; border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.mt-col.over { background: var(--brand-soft); border-color: var(--brand); }
.mt-col.no-drop { opacity: .5; }
.drawer textarea { min-block-size: 96px; }
/* maintenance side panels (request and new request) */
.mt-req-body { display: flex; flex-direction: column; flex: 1; min-block-size: 0; }
.drawer .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--field-gap); }
.drawer .seg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.drawer .ooo-box { display: grid; gap: var(--sp-3); padding-block: 14px; padding-inline: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.drawer .ooo-box label.check { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); margin: 0; }
.rp { gap: 14px !important; }
.mo-head { display: flex; gap: 12px; align-items: center; }
.mo-head b { display: block; font-size: 17px; }
.mo-head small { color: var(--muted); font-size: 12.5px; }
.mo-cat.lg { inline-size: 42px; block-size: 42px; border-radius: 11px; }
.mo-cat.lg svg { inline-size: 20px; block-size: 20px; }
.rp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mo-desc { margin: 0; padding-block: 12px; padding-inline: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; line-height: 1.6; }
.rp-ooo { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--bad); background: var(--bad-soft); border-radius: 8px; padding-block: 8px; padding-inline: 12px; }
.rp-ooo svg { inline-size: 15px; block-size: 15px; }
.mo-note { font-size: 13px; color: var(--ok); background: var(--ok-soft); border-radius: 8px; padding-block: 8px; padding-inline: 12px; }
.rp-sec { display: grid; gap: 6px; margin: 0; padding-block-start: 14px; border-block-start: 1px solid var(--line); }
.rp-sec > label { margin: 0 !important; }
.rp-sec .rp-row { display: flex; gap: var(--sp-2); }
.rp-sec .rp-row > :first-child { flex: 1; min-inline-size: 0; }
.rp-danger > summary { cursor: pointer; color: var(--bad); font-weight: 600; font-size: 13.5px; }
.rp-danger[open] > form { display: grid; gap: 6px; margin-block-start: 10px; }
.hist { display: grid; gap: 0; padding-block-start: 14px; border-block-start: 1px solid var(--line); }
.hist h3 { margin: 0 0 10px !important; font-size: 14px; }
.hist > div { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding-block: 8px; position: relative; }
.hist > div > i { inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--line); margin-block-start: 5px; }
.hist > div:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 4px; inset-block: 22px -4px; inline-size: 2px; background: var(--line); }
.hist i.t-warn { background: var(--warn); } .hist i.t-info { background: var(--info); } .hist i.t-violet { background: var(--violet); } .hist i.t-ok { background: var(--ok); } .hist i.t-bad { background: var(--bad); }
.hist span { font-size: 13.5px; }
.hist span em { display: block; font-style: normal; color: var(--muted); font-size: 12.5px; }
.hist small { color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 520px) { .drawer .two, .drawer .seg-4 { grid-template-columns: minmax(0, 1fr); } }
/* panels with several small forms (room actions, maintenance request): each keeps its full height inside the scrolling body */
.drawer .rp > *, .drawer .rpanel > * { min-block-size: auto; flex: none; }

/* ---------- review before saving (site.js, form[data-confirm-review]) ---------- */
dialog.review-dlg { border: 0; border-radius: var(--radius); padding-block: 22px; padding-inline: 24px; inline-size: min(460px, calc(100% - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(8, 14, 40, .3); }
dialog.review-dlg::backdrop { background: rgba(8, 14, 40, .38); }
.review-dlg h2 { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.review-dlg p { margin: 0 0 14px; }
.review-dlg dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0 0 18px; padding-block: 12px; padding-inline: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; max-block-size: 50vh; overflow-y: auto; }
.review-dlg dl:empty { display: none; }
.review-dlg dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.review-dlg dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.review-dlg dd b { color: var(--ink); }
.review-dlg dd s { color: var(--muted); }
.review-dlg .actions { justify-content: flex-start; }

/* select[data-filterable] search box (site.js) */
.select-filter { display: block; width: 100%; border: 1px solid var(--line-input); border-radius: 10px; padding-block: 8px; padding-inline: 12px; background: var(--surface); margin-block-end: 6px; font-size: 14px; }
.select-filter:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); }
select.filtering { height: auto; }

/* POS tables screen (Pos/Index): one card per outlet, tables as tiles grouped by section (after the mock-up's tables tab). */
.pos-outlets { display: grid; gap: var(--page-gap); }
.pos-sec > header .pos-count { font-size: 13px; }
.pos-hact { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
.page .pos-ol { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.page .pos-ol input { inline-size: 9rem; min-block-size: 38px; padding-block: 6px; }
.pos-hact .btn { min-block-size: 38px; }
.pos-sec > .body { display: grid; gap: var(--sp-5); }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: 12px; }
.pos-tb-form { display: contents; }
.pos-tb { all: unset; box-sizing: border-box; display: grid; align-content: start; gap: 10px; min-block-size: 96px; padding-block: 12px; padding-inline: 14px;
  border: 1px solid var(--line); border-inline-start-width: 5px; border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none;
  transition: border-color .15s, box-shadow .15s; }
.pos-tb.empty { border-inline-start-color: var(--ok); background: var(--surface-2); }
.pos-tb.occ { border-inline-start-color: var(--warn); }
.pos-tb:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent); }
.pos-tb.empty:hover { border-inline-start-color: var(--ok); } .pos-tb.occ:hover { border-inline-start-color: var(--warn); }
.pos-tb:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 2px; }
.pos-tb-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pos-tb-h b { font-size: 17px; font-weight: 800; }
.pos-tb-m { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.pos-tb-m > span { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-tb-m svg, .pos-tb-free svg { inline-size: 15px; block-size: 15px; flex: none; }
.pos-tb-f { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; margin-block-start: auto; }
.pos-tb-t { font-weight: 800; font-size: 16px; }
.pos-tb-free { display: flex; align-items: center; gap: 6px; margin-block-start: auto; color: var(--muted); font-weight: 700; font-size: 13px; }
.pos-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block-start: var(--sp-3); border-block-start: 1px dashed var(--line); }
.pos-legend small { margin-inline-start: 4px; }
.pos-open { border: 0; border-block-start: 1px solid var(--line); border-radius: 0; box-shadow: none; }
@media (max-width: 640px) { .pos-hact { inline-size: 100%; margin-inline-start: 0; } .pos-hact .btn { flex: 1; justify-content: center; } }

/* POS order page (Pos/Check): one-tap menu tiles, order lines with -/+ and a note, settlement cards in a grid. */
.pos-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.pos-meta svg { inline-size: 15px; block-size: 15px; }
.pos-it-f { display: contents; }
.pos-it { all: unset; box-sizing: border-box; display: grid; grid-template-rows: 1fr auto; gap: 10px; min-block-size: 92px; padding-block: 12px; padding-inline: 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pos-it:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent); }
.pos-it:active { transform: translateY(1px); }
.pos-it:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 2px; }
.pos-it-n { display: grid; gap: 2px; min-inline-size: 0; align-content: start; }
.pos-it-n b { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.pos-it-n small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-it-f2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pos-it-p { font-weight: 700; color: var(--brand-deep, var(--brand)); }
.pos-it-add { display: inline-grid; place-items: center; inline-size: 30px; block-size: 30px; border-radius: 9px; background: var(--info-soft); color: var(--brand); flex: none; }
.pos-it-add svg { inline-size: 16px; block-size: 16px; }
.pos-it:hover .pos-it-add { background: var(--brand); color: #fff; }

.pos-none { margin: 0; padding-block: 22px; padding-inline: var(--card-px); text-align: center; }
.pos-lines { list-style: none; margin: 0; padding: 0; }
.pos-ln { display: grid; gap: 6px; padding-block: 12px; padding-inline: var(--card-px); border-block-end: 1px solid var(--line); }
.pos-ln:last-child { border-block-end: 0; }
.pos-ln.dead { opacity: .65; }
.pos-ln-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pos-ln-n { font-size: 14.5px; font-weight: 700; min-inline-size: 0; }
.pos-ln-p { font-weight: 700; white-space: nowrap; }
.pos-ln-note { color: var(--muted); font-size: 12.5px; }
.pos-ln-note::before { content: "✎ "; }
.pos-ln-c { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pos-ln-u { font-size: 13px; }
.pos-step { display: inline-flex; align-items: center; gap: 6px; }
.pos-step-f { display: contents; }
.pos-step .iconbtn { block-size: 30px; min-inline-size: 30px; padding-inline: 6px; border-radius: 8px; }
.pos-step .iconbtn svg { inline-size: 15px; block-size: 15px; }
.pos-step .iconbtn:disabled { opacity: .4; cursor: default; }
.pos-step b { min-inline-size: 20px; text-align: center; font-size: 15px; }
.pos-ln-more { margin-inline-start: auto; }
.pos-ln-more > summary { list-style: none; } .pos-ln-more > summary::-webkit-details-marker { display: none; }
.pos-ln-more > summary svg { inline-size: 14px; block-size: 14px; }
.pos-ln-more[open] { flex-basis: 100%; margin-inline-start: 0; }
.pos-ln-form { display: flex; gap: 6px; margin-block-start: 8px; }
.page .pos-ln-form input { flex: 1; min-block-size: 34px; padding-block: 5px; font-size: 13px; }

.pos-h2 { margin-block: var(--page-gap) var(--sp-3) !important; }
.pos-after { display: grid; gap: var(--page-gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; margin-block-start: var(--sp-3); }
.pos-pay { margin: 0; }
.pos-due { margin-inline-start: auto; font-size: 14px; color: var(--muted); }
.pos-due b { color: var(--ink); font-size: 17px; }
.pos-hint { margin-block: 0 var(--sp-3); font-size: 13px; }
.pos-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: var(--sp-2); }
.pos-stays { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: grid; gap: 6px; }
.pos-stays li { display: flex; align-items: center; gap: 10px; padding-block: 8px; padding-inline: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.pos-stays form { margin-inline-start: auto; }
.pos-stay-r { font-weight: 800; min-inline-size: 3rem; }
.pos-stay-g { color: var(--muted); }
.pos-pkg { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-block-start: var(--sp-3); }
form.body.pos-pkg { margin: 0; }
.page .pos-pkg .pos-ol input { inline-size: 5rem; }
.pos-ol-grow { flex: 1; } .page .pos-ol-grow select { min-inline-size: 12rem; }
.pos-act { display: flex; gap: 8px; align-items: center; }
.page .pos-act input { flex: 1; }
.pos-pay .pay-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(5.5rem, .6fr); align-items: end; }
.pos-pay .pay-row [data-ref-field] { grid-column: 1 / -1; }
@media (max-width: 520px) { .pos-pay .pay-row { grid-template-columns: minmax(0, 1fr); } }
.pos-search { position: relative; display: flex; }
.pos-search svg { position: absolute; inset-inline-start: 12px; inset-block-start: 50%; transform: translateY(-50%); inline-size: 16px; block-size: 16px; color: var(--muted); pointer-events: none; }
.page .pos-search input { flex: 1; padding-inline-start: 36px; }
.pos-stays { max-block-size: 320px; overflow-y: auto; }
.pos-stays-none { padding-block: 8px; border: 0 !important; background: none !important; }
.pos-pkgs { display: grid; gap: 6px; max-block-size: 360px; overflow-y: auto; margin-block-start: var(--sp-3); }
.pos-pkgs .pos-pkg { margin: 0; padding-block: 8px; padding-inline: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); align-items: center; }

/* Room calendar at the bottom of «حجز جديد» (Calendar/Tape) */
.res-cal { margin-block-start: var(--page-gap); }
.res-cal > h2 { margin-block: 0 var(--sp-3) !important; }
[data-res-cal][aria-busy] .tape-wrap { opacity: .55; transition: opacity .15s; }

/* Top bar: hotel (two-line block) at the start, business date as a pill at the end, a soft shadow instead of a hard line. */
.top { min-block-size: 64px; border-block-end-color: transparent; box-shadow: 0 1px 0 var(--line), 0 6px 16px -12px rgba(14, 23, 51, .18); }
.top .prop { gap: 10px; padding: 0; cursor: default; }
.top .prop:hover { background: none; }
.top .prop-ico { inline-size: 38px; block-size: 38px; border-radius: 11px; }
.top .prop-ico svg { inline-size: 19px; block-size: 19px; }
.prop-txt { display: grid; gap: 1px; min-inline-size: 0; line-height: 1.25; }
.prop-txt small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.prop-txt b { font-size: 15.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .prop select { padding-block: 0; padding-inline-start: 0; font-size: 15.5px; font-weight: 800; cursor: pointer; }
.top .bizdate { margin-inline-start: auto; gap: 8px; padding-block: 7px; padding-inline: 12px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); font-size: 12.5px; white-space: nowrap; }
.top .bizdate .l { font-weight: 600; }
.top .bizdate .l::after { content: ""; display: inline-block; inline-size: 1px; block-size: 12px; margin-inline-start: 8px; background: var(--line-input); vertical-align: -1px; }
.top .bizdate b { font-size: 13.5px; font-weight: 700; }
@media (max-width: 640px) { .prop-txt small { display: none; } .top .bizdate .l { display: none; } }
.top .bizdate svg { inline-size: 16px; block-size: 16px; color: var(--brand); flex: none; }

/* Housekeeping supervisor board (Housekeeping/Board) */
.btn.danger-t { color: var(--bad); }
.btn.danger-t:hover { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.hk-head { margin-block-end: var(--sp-4); }
.hk-date { display: flex; gap: 6px; align-items: center; }
.page .hk-date input { inline-size: 11rem; min-block-size: 38px; padding-block: 6px; }
.hk-head .btn { min-block-size: 38px; }
.hk-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); margin-block-end: var(--page-gap); }
.hk-stat { display: grid; gap: 2px; padding-block: 14px; padding-inline: 16px; background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--line-input);
  border-radius: 12px; box-shadow: var(--shadow); }
.hk-stat b { font-size: 26px; font-weight: 800; line-height: 1.15; color: var(--ink); }
.hk-stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.hk-stat.warn { border-inline-start-color: var(--warn); } .hk-stat.ok { border-inline-start-color: var(--ok); } .hk-stat.info { border-inline-start-color: var(--info); }
.hk-stat.bad { border-inline-start-color: var(--bad); } .hk-stat.mute { border-inline-start-color: var(--line-input); }
.hk-card { margin-block-end: var(--page-gap); }
.hk-card .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
.hk-no { font-size: 15px; }
.hk-occ { color: var(--info); font-weight: 700; }
.hk-task { display: grid; line-height: 1.3; } .hk-task small { font-size: 12px; }
.hk-act { white-space: nowrap; text-align: end; } .hk-act-h { text-align: end; }
.hk-act form + form { margin-inline-start: 4px; }
.hk-none { margin: 0; padding-block: 20px; padding-inline: var(--card-px); }
.hk-prog-h { inline-size: 30%; }
.hk-prog { display: inline-block; vertical-align: middle; inline-size: calc(100% - 3.5rem); max-inline-size: 220px; block-size: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.hk-prog i { display: block; block-size: 100%; background: var(--ok); border-radius: 99px; }
.hk-pct { margin-inline-start: 8px; color: var(--muted); }
.hk-credits { margin-inline-start: auto; font-size: 13px; }
.hk-bulk-go { min-block-size: 36px; }
.hk-chk { inline-size: 36px; text-align: center; }
.hk-chk input { inline-size: 17px; block-size: 17px; accent-color: var(--brand); cursor: pointer; }
tr.hk-done td { color: var(--muted); }
.page .hk-date select { inline-size: auto; min-block-size: 38px; padding-block: 6px; }
/* Housekeeping setup: inline edit of a section */
.hk-edit > summary { list-style: none; display: inline-flex; } .hk-edit > summary::-webkit-details-marker { display: none; }
.hk-edit > summary svg { inline-size: 14px; block-size: 14px; }
.hk-edit[open] > summary { background: var(--surface-2); }
.hk-edit-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-block-start: 8px; white-space: normal; }
.page .hk-edit-f input[type=text] { inline-size: 9rem; min-block-size: 34px; padding-block: 5px; }
.page .hk-edit-f input[name=NameAr] { inline-size: 12rem; }
.page .hk-chk-l { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.hk-sec td:nth-child(2) { white-space: nowrap; }

/* POS menu admin (PosAdmin/Menu): categories beside the items list */
.pm-intro { margin-block: var(--sp-3) var(--sp-4); max-inline-size: 75ch; }
.pm-layout { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: var(--page-gap); align-items: start; }
@media (max-width: 1000px) { .pm-layout { grid-template-columns: minmax(0, 1fr); } }
.pm-none { margin: 0; padding-block: 16px; padding-inline: var(--card-px); }
.pm-catlist { list-style: none; margin: 0; padding: 0; }
.pm-catlist > li { padding-block: 10px; padding-inline: var(--card-px); border-block-end: 1px solid var(--line); display: grid; gap: 6px; }
.pm-catlist > li.off .pm-cat-n { opacity: .6; }
.pm-cat-h { display: flex; align-items: center; gap: 8px; }
.pm-cat-n { display: grid; min-inline-size: 0; margin-inline-end: auto; line-height: 1.3; }
.pm-cat-n small { color: var(--muted); font-size: 12px; }
.pm-edit > summary { list-style: none; display: inline-flex; } .pm-edit > summary::-webkit-details-marker { display: none; }
.pm-edit > summary svg, .pm-items .btn svg { inline-size: 14px; block-size: 14px; }
.pm-cat-f { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block-start: 8px; }
.pm-cat-f .pm-f:first-of-type { grid-column: 1 / -1; }
.pm-toggle { margin-block-start: 6px; }
.pm-add-cat { display: flex; gap: 8px; padding-block: 12px; padding-inline: var(--card-px); background: var(--surface-2); border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }
.page .pm-add-cat input { flex: 1; min-block-size: 36px; padding-block: 6px; }
.pm-items > header .pm-search { margin-inline-start: auto; inline-size: min(280px, 100%); }
.page .pm-search input { min-block-size: 36px; padding-block: 6px; }
.pm-new { padding-block: 12px; padding-inline: var(--card-px); border-block-end: 1px solid var(--line); }
.pm-new > summary { list-style: none; display: inline-flex; } .pm-new > summary::-webkit-details-marker { display: none; }
.pm-new[open] > summary { margin-block-end: 12px; }
.pm-item-f { display: grid; gap: 10px 12px; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); align-items: end; }
.page .pm-f { display: grid; gap: 4px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.page .pm-f input, .page .pm-f select { min-block-size: 38px; padding-block: 6px; }
.pm-f-act { display: flex; gap: 8px; justify-content: flex-end; grid-column: 1 / -1; }
.pm-table .pm-group td { background: var(--surface-2); font-weight: 700; font-size: 13px; padding-block: 8px; }
.pm-name { display: grid; line-height: 1.3; } .pm-name small { color: var(--muted); font-size: 12px; }
.pm-table tr.pm-off td { color: var(--muted); }
.pm-table tr.pm-edit-row > td { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); padding-block: 14px; }
.pm-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.pm-acts form { display: contents; }
.pm-acts .btn { min-block-size: 32px; min-inline-size: 64px; margin: 0; }

/* Hotel settings: the logo card */
.logo-card { margin-block-end: var(--page-gap); }
.logo-card > header .muted { font-size: 13px; }
.logo-body { display: flex; flex-wrap: wrap; gap: var(--sp-5); align-items: center; }
.logo-preview { display: grid; place-items: center; inline-size: 220px; min-block-size: 96px; padding: 12px; border: 1px dashed var(--line-input); border-radius: 12px; background: var(--surface-2); text-align: center; font-size: 13px; }
.logo-preview img { max-inline-size: 196px; max-block-size: 80px; object-fit: contain; }
.logo-actions { display: grid; gap: 8px; flex: 1; min-inline-size: 260px; }
.logo-up { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.page .logo-up input[type=file] { flex: 1; min-inline-size: 200px; min-block-size: 38px; padding-block: 6px; background: var(--surface); }

/* «الطوابق والغرف» (RoomAdmin/Rooms): one card per floor with its rooms */
.ra-tabs { margin-block: var(--sp-3) var(--sp-5); }
.ra-floors { display: grid; gap: var(--page-gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); align-items: start; }
.ra-floor.off > header h2 { opacity: .6; }
.ra-floor > header h2 small { color: var(--muted); font-size: 12.5px; font-weight: 500; margin-inline-start: 6px; }
.ra-level { display: inline-grid; place-items: center; min-inline-size: 30px; block-size: 30px; padding-inline: 6px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 14px; }
.ra-head-act { margin-inline-start: auto; position: relative; }
.ra-edit > summary, .ra-new-floor > summary { list-style: none; display: inline-flex; } .ra-edit > summary::-webkit-details-marker, .ra-new-floor > summary::-webkit-details-marker { display: none; }
.ra-edit > summary svg, .ra-room-act .btn svg { inline-size: 14px; block-size: 14px; }
.ra-new-floor { position: relative; }
.ra-pop { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 6px); z-index: 6; inline-size: min(340px, 90vw); padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px -12px rgba(14, 23, 51, .3); display: grid; gap: 10px; }
.ra-pop-foot { display: flex; gap: 6px; justify-content: space-between; padding-block-start: 10px; border-block-start: 1px solid var(--line); }
.ra-form { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-items: end; }
.ra-form .ra-f:first-of-type { grid-column: 1 / -1; }
.page .ra-f { display: grid; gap: 4px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.page .ra-f input, .page .ra-f select { min-block-size: 36px; padding-block: 6px; }
.ra-f-act { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.ra-none { margin: 0; padding-block: 16px; padding-inline: var(--card-px); }
.ra-rooms { list-style: none; margin: 0; padding: 0; }
.ra-rooms > li { border-block-end: 1px solid var(--line); }
.ra-rooms > li.off .ra-no, .ra-rooms > li.off .ra-type { opacity: .55; }
.ra-room { display: flex; align-items: center; gap: 10px; padding-block: 9px; padding-inline: var(--card-px); }
.ra-no { font-size: 16px; font-weight: 800; min-inline-size: 3.2rem; }
.ra-type { color: var(--muted); font-size: 13.5px; }
.ra-room-act { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }
.ra-room-act form { display: contents; }
.ra-room-act .btn { min-block-size: 30px; }
.ra-room-edit { padding-block: 0 12px; padding-inline: var(--card-px); grid-template-columns: 6rem 1fr 1fr; }
.ra-room-edit .ra-f:first-of-type { grid-column: auto; }
.ra-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 10px; padding-inline: var(--card-px); background: var(--surface-2); border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }
.ra-add-l { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ra-add-l svg { inline-size: 15px; block-size: 15px; }
.page .ra-add input { inline-size: 6.5rem; min-block-size: 34px; padding-block: 5px; }
.page .ra-add select { inline-size: auto; flex: 1; min-inline-size: 8rem; min-block-size: 34px; padding-block: 5px; }

/* «أنواع الغرف» (RoomAdmin/Types): a card per room type */
.rt-grid { display: grid; gap: var(--page-gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: start; }
.rt-card { overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.rt-card:hover { border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); box-shadow: 0 6px 18px rgb(14 23 51 / .06); }
.rt-card.off { background: var(--surface-2); }
.rt-card.off > header h2, .rt-card.off .rt-stats, .rt-card.off .rt-beds { opacity: .6; }
.rt-card > header { border-block-end: 0; padding-block-end: 4px; }
.rt-card > header h2 { min-inline-size: 0; font-size: 17px; }
.rt-card > header h2 small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; margin-block-start: 2px; }
.rt-card > header .chip { margin-inline-start: auto; }
.rt-code { display: inline-grid; place-items: center; min-inline-size: 46px; block-size: 40px; padding-inline: 8px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 13px; letter-spacing: .4px; }
.rt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding-block: 12px 4px; padding-inline: var(--card-px); }
/* number on top, label under it: a label that wraps never moves the numbers out of line */
.rt-stats > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; min-inline-size: 0; }
.rt-stats dd { order: -1; margin: 0; font-size: 24px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.rt-stats dt { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--muted); }
.rt-stats dt svg { inline-size: 14px; block-size: 14px; flex: none; }

.rt-beds { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-block-size: 28px; padding-block: 8px 14px; padding-inline: var(--card-px); font-size: 13px; }
.rt-bed { display: inline-block; padding-block: 3px; padding-inline: 9px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.rt-bed b { color: var(--brand); font-weight: 800; }
.rt-foot { display: flex; gap: 6px; justify-content: space-between; padding-block: 10px; padding-inline: var(--card-px); border-block-start: 1px solid var(--line); background: var(--surface-2); }
.rt-foot form { display: contents; }
.rt-foot .btn svg { inline-size: 14px; block-size: 14px; }
.rt-foot .btn:disabled { opacity: .45; cursor: not-allowed; }
.rt-form .ra-f:first-of-type { grid-column: auto; }
.rt-form .rt-wide { grid-column: 1 / -1; }
.rt-edit { padding-block: 0 14px; padding-inline: var(--card-px); }

/* «إدارة نقاط البيع» (PosAdmin/*): cards like the room types (rt-*), new / edit forms like the rooms admin (ra-*) */
.pa-empty { padding: 18px var(--card-px); margin-block-end: var(--page-gap); }
.pa-empty p { margin: 0; }
.pa-facts { display: grid; gap: 8px; margin: 0; padding-block: 12px 16px; padding-inline: var(--card-px); }
.pa-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.pa-facts dt { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.pa-facts dt svg { inline-size: 15px; block-size: 15px; flex: none; }
.pa-facts dd { margin: 0; font-weight: 600; text-align: end; min-inline-size: 0; overflow-wrap: anywhere; }
.pa-warn { color: var(--warn); font-weight: 600; }
.rt-card.off .pa-facts, .rt-card.off .pa-plans { opacity: .6; }
.rt-stats.pa-prices { grid-template-columns: repeat(2, 1fr); }
.pa-prices dd { font-size: 20px; }
.pa-same { font-size: 14px; font-weight: 600; color: var(--muted); }
.pa-plans { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-block: 10px 14px; padding-inline: var(--card-px); font-size: 13px; }
.pa-plans-l { color: var(--muted); font-weight: 600; }
.pa-edit { display: grid; gap: 14px; }
.pa-plan-f { display: grid; gap: 8px; padding-block-start: 12px; border-block-start: 1px dashed var(--line); }
.pa-plan-f fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.pa-plan-f legend { font-size: 13px; font-weight: 700; margin-block-end: 2px; }
.pa-plan-f p { margin: 0 0 4px; font-size: 12.5px; }
.pa-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.pa-check small { color: var(--muted); }
/* tables: one card per outlet, a tile per table (the tile opens its edit box) */
.pa-stack { display: grid; gap: var(--page-gap); }
.pa-outlet.off > header h2 { opacity: .6; }
.pa-none { margin: 0; padding: 16px var(--card-px); }
.pa-tables { list-style: none; margin: 0; padding: 14px var(--card-px) 16px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.pa-tbl { position: relative; }
.pa-tbl > summary { list-style: none; display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; text-align: center; transition: border-color .15s, box-shadow .15s; }
.pa-tbl > summary::-webkit-details-marker { display: none; }
.pa-tbl > summary:hover, .pa-tbl[open] > summary { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pa-tbl > summary b { font-size: 20px; font-weight: 800; line-height: 1.1; }
.pa-tbl > summary small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.pa-tbl > summary small svg { inline-size: 14px; block-size: 14px; }
.pa-tbl.off > summary { background: var(--surface); border-style: dashed; }
.pa-tbl.off > summary b, .pa-tbl.off > summary small { opacity: .55; }
.pa-tbl .chip { font-size: 11px; padding-inline: 7px; }
.pa-tbl-pop { inline-size: min(280px, 85vw); display: grid; gap: 10px; }
.pa-tbl-pop .ra-form .ra-f:first-of-type { grid-column: auto; }
/* settings */
.pa-settings { display: grid; max-inline-size: 760px; }
.pa-set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; padding-inline: var(--card-px); border-block-end: 1px solid var(--line); flex-wrap: wrap; }
.pa-set-t { display: grid; gap: 3px; min-inline-size: min(100%, 260px); flex: 1; }
.pa-set-t b { font-size: 15px; }
.pa-set-t .muted { font-size: 13px; }
.pa-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.pa-switch input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; }
.pa-switch > span { position: relative; inline-size: 44px; block-size: 24px; border-radius: 99px; background: var(--line); transition: background .15s; flex: none; }
.pa-switch > span::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 18px; block-size: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(14 23 51 / .2); transition: inset-inline-start .15s; }
.pa-switch input:checked + span { background: var(--ok); }
.pa-switch input:checked + span::after { inset-inline-start: 23px; }
.pa-switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.pa-switch b { min-inline-size: 3.5rem; font-size: 13.5px; }
.pa-switch input:checked ~ .pa-off, .pa-switch input:not(:checked) ~ .pa-on { display: none; }
.pa-fee { display: inline-flex; align-items: center; gap: 6px; }
.page .pa-fee input { inline-size: 7rem; text-align: center; }
.pa-fee span { font-weight: 700; color: var(--muted); }
.pa-set-foot { display: flex; justify-content: flex-end; padding-block: 12px; padding-inline: var(--card-px); background: var(--surface-2); border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }

/* «المجموعات» (Groups/*) */
.gr-empty { display: grid; justify-items: start; gap: 10px; padding: 20px var(--card-px); }
.gr-empty p { margin: 0; }
.gr-list tr.off .gr-name b, .gr-list tr.off .gr-dates { opacity: .6; }
.gr-name { display: grid; gap: 2px; color: inherit; text-decoration: none; min-inline-size: 12rem; }
.gr-name b { font-weight: 700; color: var(--ink); }
.gr-name:hover b { color: var(--brand); }
.gr-name small { color: var(--muted); font-size: 12.5px; }
.gr-dates { display: block; white-space: nowrap; font-weight: 600; }
.gr-list td small.muted { display: block; font-size: 12px; }
.gr-rooms { display: block; white-space: nowrap; }
.gr-rooms b { font-size: 15px; }
.gr-bar { display: block; inline-size: 90px; block-size: 5px; margin-block-start: 5px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.gr-bar i { display: block; block-size: 100%; background: var(--ok); border-radius: inherit; }
.gr-list td .chip + .chip { margin-inline-start: 4px; }
.gr-open { text-align: end; }
/* create */
.gr-form { display: grid; gap: var(--page-gap); margin-block-start: var(--page-gap); }
.gr-step { display: inline-grid; place-items: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 13px; flex: none; }
.gr-fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); padding: 16px var(--card-px) 18px; }
.gr-f { display: grid; gap: 5px; align-content: start; min-inline-size: 0; }
.gr-f > label { font-size: 13px; font-weight: 600; }
.gr-f small { font-size: 12.5px; }
.gr-wide { grid-column: 1 / -1; }
.gr-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.gr-cats { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-block: 4px; }
.gr-lines { border: 0; border-radius: 0; box-shadow: none; }
.page .gr-lines td input, .page .gr-lines td select { min-inline-size: 5rem; }
.page .gr-lines td:first-child select { min-inline-size: 10rem; }
.gr-lines-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px var(--card-px) 16px; border-block-start: 1px solid var(--line); }
.gr-submit { display: flex; justify-content: flex-end; gap: 8px; position: sticky; inset-block-end: 0; padding-block: 12px; background: linear-gradient(to top, var(--bg, #f4f6fb) 70%, transparent); z-index: 2; }
/* details */
.gr-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gr-no { font-weight: 700; color: var(--ink); }
.gr-sum { margin-block-start: var(--page-gap); }
.gr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 0; padding: 16px var(--card-px) 12px; }
.gr-stats > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-inline-size: 0; }
.gr-stats dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.gr-stats dd { margin: 4px 0 0; font-size: 22px; font-weight: 800; line-height: 1.2; }
.gr-stats dd small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.gr-stats dd.gr-stat-dates { font-size: 15px; display: grid; gap: 2px; }
.gr-stats dd.gr-stat-text { font-size: 14px; font-weight: 700; }
.gr-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 var(--card-px) 14px; font-size: 13.5px; }
.gr-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.gr-meta svg { inline-size: 15px; block-size: 15px; color: var(--muted); }
.gr-rooming, .gr-master, .gr-settings { margin-block-start: var(--page-gap); }
.gr-head-acts { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gr-head-acts form { display: contents; }
.gr-rooming > header .chip + .gr-head-acts, .gr-master > header .chip + .gr-head-acts { margin-inline-start: auto; }
.gr-table { border: 0; border-radius: 0; box-shadow: none; }
.gr-table tr.off td { opacity: .55; }
.gr-sel { inline-size: 36px; }
.gr-res { display: grid; gap: 2px; text-decoration: none; }
.gr-res span { font-weight: 700; }
.gr-res small { color: var(--muted); font-size: 12px; }
.page .gr-table td input[type=text], .page .gr-table td select { min-inline-size: 9rem; }
.gr-save { display: flex; justify-content: flex-end; padding: 12px var(--card-px); border-block-start: 1px solid var(--line); }
.gr-batch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px var(--card-px); background: var(--surface-2); border-block-start: 1px solid var(--line); border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }
.gr-batch-t { font-size: 13px; }
.page .gr-batch input[type=text] { inline-size: 14rem; min-block-size: 32px; padding-block: 4px; }
.gr-batch-note { flex-basis: 100%; font-size: 12.5px; }
.gr-pad { padding: 14px var(--card-px); margin: 0; }
.gr-master-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; padding: 14px var(--card-px); border-block-start: 1px solid var(--line); }
.gr-mf { display: grid; gap: 8px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.gr-mf > b { font-size: 14px; }
.gr-mf > .btn { justify-self: start; }
.gr-master-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--card-px) 14px; }
.gr-master-acts form { display: contents; }
.gr-set-f { display: grid; gap: 8px; border-block-end: 1px solid var(--line); }
.gr-close { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px var(--card-px); }
/* rooming progress: names → rooms → checked in */
.gr-steps { list-style: none; margin: 0; padding: 12px var(--card-px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-block-end: 1px solid var(--line); }
.gr-steps li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-inline-size: 0; }
.gr-steps li > div { display: grid; min-inline-size: 0; }
.gr-steps b { font-size: 15px; white-space: nowrap; }
.gr-steps small { color: var(--muted); font-size: 12px; }
.gr-steps li.done { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: var(--ok-soft); }
.gr-steps li.done .gr-step { background: var(--ok); color: #fff; }
@media (max-width: 560px) { .gr-steps { grid-template-columns: 1fr; } }
/* master folio: balance in the header, forms open on demand */
.gr-bal { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.gr-bal b { font-size: 16px; color: var(--ink); }
.gr-bal.due b { color: var(--bad); }
.gr-master > header .gr-bal { margin-inline-start: auto; }
.gr-master > header .gr-bal + .gr-head-acts { margin-inline-start: 0; }
.gr-master-acts { padding-block-start: 14px; border-block-start: 1px solid var(--line); }
.gr-master-acts .btn svg { inline-size: 15px; block-size: 15px; }
.gr-master-forms:not(:has(> form:not([hidden]))) { display: none; }
.gr-master-forms { border-block-start: 0; padding-block-start: 0; }
/* settings: folded by default */
.gr-settings > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px var(--card-px); cursor: pointer; }
.gr-settings > summary::-webkit-details-marker { display: none; }
.gr-settings > summary h2 { margin: 0; font-size: 16px; }
.gr-settings > summary .muted { font-size: 13px; }
.gr-settings > summary svg { margin-inline-start: auto; inline-size: 18px; block-size: 18px; color: var(--muted); transition: transform .15s; }
.gr-settings[open] > summary { border-block-end: 1px solid var(--line); }
.gr-settings[open] > summary svg { transform: rotate(180deg); }

/* «المستخدمون» (AdminUsers/Index): search + status filter over the users table */
.us-card { margin-block-start: var(--page-gap); overflow: hidden; }
.us-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 12px; padding-inline: var(--card-px); border-block-end: 1px solid var(--line); }
.us-search { position: relative; flex: 1; min-inline-size: min(100%, 240px); max-inline-size: 420px; }
.us-search svg { position: absolute; inset-inline-start: 11px; inset-block-start: 50%; translate: 0 -50%; inline-size: 16px; block-size: 16px; color: var(--muted); pointer-events: none; }
.page .us-search input { inline-size: 100%; min-block-size: 38px; padding-inline-start: 34px; }
.us-seg { display: inline-flex; gap: 2px; padding: 3px; margin-inline-start: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.us-seg[hidden] { display: none; }
.page .us-seg button { display: inline-flex; align-items: center; gap: 6px; min-block-size: 30px; padding-block: 4px; padding-inline: 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.page .us-seg button b { font-weight: 800; font-size: 12px; }
.page .us-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(14 23 51 / .08); }
.us-table { border: 0; border-radius: 0; box-shadow: none; }
.us-table tbody tr:last-child td { border-block-end: 0; }
.us-table tbody tr:hover td { background: var(--surface-2); }
.us-table tr.off .us-who, .us-table tr.off td:nth-child(2) { opacity: .55; }
.us-who { display: flex; align-items: center; gap: 10px; min-inline-size: 12rem; }
.us-who b { display: block; font-weight: 700; }
.us-who small { display: block; color: var(--muted); font-size: 12px; text-align: end; }
.us-av { display: inline-grid; place-items: center; inline-size: 36px; block-size: 36px; flex: none; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 15px; }
.us-table tr.off .us-av { background: var(--surface-2); color: var(--muted); }
.us-table td .chip + .chip { margin-inline-start: 4px; }
.us-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.us-act form { display: contents; }
.us-act .btn { white-space: nowrap; }
.us-act .btn svg { inline-size: 14px; block-size: 14px; }
.us-act .btn.us-ic { inline-size: 32px; padding-inline: 0; justify-content: center; }
.us-act .btn.us-ic svg { inline-size: 15px; block-size: 15px; }
.us-none { margin: 0; padding-block: 24px; text-align: center; }

/* «الأدوار والصلاحيات» (Roles/Index): a card per role */
.rl-grid { display: grid; gap: var(--page-gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin-block-start: var(--page-gap); }
.rl-card { display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.rl-card:hover { border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); box-shadow: 0 6px 18px rgb(14 23 51 / .06); }
.rl-card > header { border-block-end: 0; padding-block-end: 4px; flex-wrap: nowrap; align-items: flex-start; }
.rl-card > header h2 { min-inline-size: 0; font-size: 16px; overflow-wrap: anywhere; }
.rl-card > header h2 small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; margin-block-start: 2px; }
.rl-card > header .chip { margin-inline-start: auto; flex: none; }
.rl-ic { display: inline-grid; place-items: center; inline-size: 38px; block-size: 38px; flex: none; border-radius: 10px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.rl-ic svg { inline-size: 18px; block-size: 18px; }
.rl-card.admin .rl-ic { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.rl-body { display: grid; gap: 12px; padding-block: 10px 16px; padding-inline: var(--card-px); flex: 1; }
.rl-perm-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-block-end: 6px; }
.rl-perm-h b { font-size: 18px; font-weight: 800; color: var(--ink); }
.rl-perm-h b small { font-size: 12px; font-weight: 600; color: var(--muted); }
.rl-bar { block-size: 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.rl-bar i { display: block; block-size: 100%; border-radius: inherit; background: var(--brand); }
.rl-mem { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.rl-mem svg { inline-size: 16px; block-size: 16px; color: var(--muted); flex: none; }
.rl-mem.none { color: var(--muted); font-weight: 500; }
.rl-foot { display: flex; justify-content: flex-end; padding-block: 10px; padding-inline: var(--card-px); border-block-start: 1px solid var(--line); background: var(--surface-2); border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }
.rl-foot .btn svg { inline-size: 14px; block-size: 14px; }
/* Room type beds editor */
.bed-ed { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; display: grid; gap: 8px; min-inline-size: 0; }
.bed-ed legend { font-size: 12.5px; font-weight: 600; color: var(--muted); padding-inline: 4px; }
.bed-rows { display: grid; gap: 6px; }
.bed-row { display: flex; align-items: center; gap: 6px; }
.page .bed-row input { inline-size: 4.5rem; flex: none; min-block-size: 36px; padding-block: 6px; text-align: center; }
.page .bed-row select { flex: 1; min-inline-size: 0; min-block-size: 36px; padding-block: 6px; }
.bed-x { color: var(--muted); font-weight: 700; }
.bed-del { block-size: 34px; min-inline-size: 34px; padding-inline: 6px; }
.bed-del svg { inline-size: 15px; block-size: 15px; }
.bed-add { justify-self: start; }
.bed-add svg { inline-size: 14px; block-size: 14px; }

/* ---------- go-live setup «تهيئة التشغيل» ---------- */
.gl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-block-end: var(--page-gap); }
.gl-head h1 { margin-block-end: var(--sp-1); }
.gl-head p { margin: 0; }
.gl-progress { display: grid; gap: 6px; min-inline-size: min(280px, 100%); font-size: 13px; color: var(--muted); }
.gl-progress b { color: var(--ink); font-size: 15px; }
.gl-bar { display: block; block-size: 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.gl-bar i { display: block; block-size: 100%; background: var(--ok); border-radius: 99px; }
.gl-head + .alert { margin-block-end: var(--page-gap); }
.gl-groups { display: grid; gap: var(--page-gap); margin-block-end: var(--page-gap); }
.gl-note { font-size: 13px; }
.gl-steps { list-style: none; margin: 0; padding: 0; }
.gl-step { display: grid; grid-template-columns: 32px 36px minmax(0, 1fr) 5.5rem 7.5rem; align-items: center; gap: var(--sp-3); padding-block: 12px; padding-inline: var(--card-px); border-block-end: 1px solid var(--line); }
.gl-step:last-child { border-block-end: 0; }
.gl-num { display: grid; place-items: center; inline-size: 32px; block-size: 32px; border-radius: 50%; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1.5px dashed var(--line-input); }
.gl-num svg { display: block; }
.gl-step.done .gl-num { color: var(--ok); background: var(--ok-soft); border: 1.5px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.gl-step.todo .gl-num { color: var(--warn); background: var(--warn-soft); border: 1.5px solid color-mix(in srgb, var(--warn) 45%, transparent); }
.gl-step .chip { justify-self: center; }
.gl-step .chip::before { content: none; }
.gl-dlg .alert { margin-block-end: 12px; font-size: 14px; }
.gl-dlg p { margin-block-end: 18px; }
.gl-ico { display: grid; place-items: center; inline-size: 36px; block-size: 36px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); }
.gl-ico svg { inline-size: 18px; block-size: 18px; }
.gl-text { display: grid; gap: 2px; min-inline-size: 0; }
.gl-text b { font-weight: 700; }
.gl-text .muted { font-size: 13px; }
.gl-act { justify-self: end; }
.gl-finish { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.gl-finish h2 { font-size: 16px; font-weight: 700; margin-block-end: var(--sp-1); }
.gl-finish p { margin: 0; }
.gl-warn { color: var(--warn); font-weight: 600; margin-block-end: var(--sp-1) !important; }
@media (max-width: 640px) {
  .gl-step { grid-template-columns: 32px minmax(0, 1fr) 5rem; }
  .gl-ico { display: none; }
  .gl-act { grid-column: 2 / -1; justify-self: start; }
  .gl-act:empty { display: none; }
}

/* blacklist «قائمة الممنوعين»: the search box filters the table as one types */
form.inline input.bl-search.bl-search[type=search] { inline-size: min(340px, 100%); max-inline-size: none; }

/* ---------- hotel settings «إعدادات الفندق» (PropertySettings/Index, property-settings.js) ---------- */
.ps-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-block-end: var(--page-gap); }
.ps-head h1 { margin-block-end: var(--sp-1); }
.ps-head p { margin: 0; }
.ps-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--page-gap); align-items: start; }
.ps-nav { position: sticky; inset-block-start: 84px; display: grid; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.ps-nav a { display: flex; align-items: center; gap: 10px; padding-block: 9px; padding-inline: 12px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.ps-nav a svg { inline-size: 17px; block-size: 17px; flex: none; }
.ps-nav a:hover { background: var(--surface-2); color: var(--ink); }
.ps-nav a.on { background: var(--brand-soft); color: var(--brand); }
.ps-main { display: flex; flex-direction: column; gap: var(--page-gap); min-inline-size: 0; }
.ps-cards { display: contents; }
[data-ps-show][hidden] { display: none !important; }
.ps-cards > .field-error { order: -3; }
.ps-cards > #ps-info { order: -2; }
.ps-main > .ps-logo { order: -1; }
.ps-main .card { scroll-margin-block-start: 84px; }
.ps-sub { font-size: 13px; flex-basis: 100%; line-height: 1.5; }
.card > header:has(.ps-sub) { row-gap: 2px; padding-block: 12px; }
.ps-note { margin: var(--sp-2) 0 0; padding-block: 10px; padding-inline: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; }
input.ps-upper { text-transform: uppercase; }
input.ps-time { font-variant-numeric: tabular-nums; }
.card .body label.ps-switch { display: flex; }
.ps-switch { display: flex; align-items: flex-start; gap: 12px; margin-block-start: var(--sp-4); padding-block: 12px; padding-inline: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.ps-switch:first-child { margin-block-start: 0; }
.ps-switch input { inline-size: 18px; block-size: 18px; margin-block-start: 2px; flex: none; accent-color: var(--brand); }
.ps-switch > span { display: grid; gap: 2px; }
.ps-switch b { font-weight: 700; font-size: 14px; }
.ps-switch small { font-size: 13px; line-height: 1.6; }
.ps-switch + .form-row { margin-block-start: var(--sp-4); }
.ps-help { margin-block-start: var(--sp-4); border: 1px solid var(--line); border-radius: 10px; }
.ps-help summary { cursor: pointer; padding-block: 10px; padding-inline: 14px; font-size: 13px; font-weight: 700; color: var(--brand); }
.ps-help ul { margin: 0; padding-block: 0 12px; padding-inline: 34px 14px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.ps-pen + .ps-pen { margin-block-start: var(--sp-4); padding-block-start: var(--sp-4); border-block-start: 1px solid var(--line); }
.ps-pen-h { font-size: 13px; font-weight: 700; color: var(--ink); margin-block-end: var(--sp-2); }
.ps-savebar { order: 99; position: sticky; inset-block-end: 0; z-index: 3; display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-4); padding-block: 12px; padding-inline: var(--card-px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -4px 20px rgba(14,23,51,.08); }
.ps-savebar [data-ps-dirty] { color: var(--warn); font-weight: 600; font-size: 13px; }
input.ps-file { font-size: 13px; color: var(--muted); max-inline-size: 100%; }
input.ps-file::file-selector-button { font: inherit; font-weight: 700; color: var(--ink); background: var(--surface); border: 1px solid var(--line-input); border-radius: 8px; padding-block: 6px; padding-inline: 12px; margin-inline-end: 10px; cursor: pointer; }
input.ps-file::file-selector-button:hover { background: var(--surface-2); }
@media (max-width: 1000px) {
  .ps-layout { grid-template-columns: minmax(0, 1fr); }
  .ps-nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .ps-nav a { white-space: nowrap; }
}

/* ---------- services «الخدمات» (ServicesAdmin/Index) ---------- */
.sv-card { margin-block-start: var(--page-gap); }
.sv-card > header .sv-search { margin-inline-start: auto; inline-size: min(300px, 100%); border: 1px solid var(--line-input); border-radius: 10px; padding-block: 7px; padding-inline: 12px; background: var(--surface-2); font-size: 14px; }
.sv-card > header .sv-search:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.sv-card > .table-wrap { border: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: none; margin: 0; }
.sv-table td { vertical-align: middle; }
.sv-code { display: inline-grid; place-items: center; inline-size: 84px; box-sizing: border-box; padding-block: 5px; padding-inline: 9px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 12.5px; letter-spacing: .4px; }
.sv-name { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sv-name b { font-weight: 700; }
.sv-name small { font-size: 12px; }
.sv-table th, .sv-table td { vertical-align: middle; }
.sv-table tbody tr[data-filter-item] > td { block-size: 56px; padding-block: 8px; }
.sv-amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.sv-table .chip::before { content: none; }
.sv-table .chip svg { inline-size: 12px; block-size: 12px; }
.sv-table tr.off td:not(.sv-acts) { opacity: .55; }
.sv-acts { inline-size: 1%; }
.sv-actw { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
tr[data-filter-item][hidden] + .sv-editrow { display: none; }
.sv-actw form { display: block; margin: 0; }
.sv-acts .btn svg { inline-size: 14px; block-size: 14px; }
.sv-editrow > td { background: var(--surface-2); }
.sv-form { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: 6px; }
.sv-form .ra-f:first-of-type { grid-column: auto; }
input.sv-upper { text-transform: uppercase; }
.sv-notes { margin-block: var(--sp-4) 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: 13px; }
@media (max-width: 860px) { .sv-form { grid-template-columns: 1fr 1fr; } }

/* ---------- rates grid «جدول الأسعار» (Rates/Index, rates-grid.js) ---------- */
.rg-filter-f { display: grid; gap: 6px; flex: 0 1 190px; min-inline-size: 0; }
.rg-filter-f label { font-size: 13px; font-weight: 600; color: var(--muted); }
.rg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--page-gap); align-items: start; }
.rg-cal-card > header { row-gap: 4px; }
.rg-period { font-size: 13px; }
.rg-stats { margin-inline-start: auto; display: flex; gap: var(--sp-4); align-items: center; font-size: 13px; color: var(--muted); }
.rg-stats b { color: var(--ink); font-variant-numeric: tabular-nums; margin-inline-start: 4px; }
.rg-hint { font-size: 13px; margin: 0 0 var(--sp-4); }
.rg-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: var(--sp-4); }
.rg-month { border: 1px solid var(--line); border-radius: 12px; padding-block: 12px 14px; padding-inline: 12px; background: var(--surface); }
.rg-month-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); margin-block-end: var(--sp-2); }
.rg-month-h h3 { font-size: 15px; font-weight: 800; margin: 0; }
.rg-month-r { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding-block: 1px; padding-inline: 8px; font-variant-numeric: tabular-nums; }
.rg-grid7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.rg-dow { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding-block: 2px 4px; }
.rg-dow.we { color: var(--warn); }
.rg-day { position: relative; display: grid; place-items: center; min-block-size: 50px; padding-block: 14px 4px; padding-inline: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; color: var(--ink); min-inline-size: 0; transition: border-color .12s, transform .12s; }
.rg-day:hover { border-color: var(--brand); transform: translateY(-1px); }
.rg-day:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 1px; }
.rg-dn { position: absolute; inset-block-start: 3px; inset-inline-start: 6px; font-size: 10.5px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.rg-amt { font-size: 13.5px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-inline-size: 100%; }
.rg-day.lv0, .rg-legend i.lv0 { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.rg-day.lv1, .rg-legend i.lv1 { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.rg-day.lv2, .rg-legend i.lv2 { background: color-mix(in srgb, var(--brand) 15%, var(--surface)); }
.rg-day.lv3, .rg-legend i.lv3 { background: color-mix(in srgb, var(--brand) 22%, var(--surface)); }
.rg-day.lv4, .rg-legend i.lv4 { background: color-mix(in srgb, var(--brand) 30%, var(--surface)); }
.rg-day.lv3, .rg-day.lv4 { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.rg-day.lv3 .rg-amt, .rg-day.lv4 .rg-amt { color: var(--brand-deep); }
.rg-day.none, .rg-legend i.none { background: var(--warn-soft); border-style: dashed; border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.rg-day.none .rg-amt { color: var(--warn); font-weight: 700; }
.rg-day.today { box-shadow: inset 0 0 0 2px var(--hub); }
.rg-day.today .rg-dn { color: var(--hub); font-weight: 800; }
.rg-day.sel { box-shadow: inset 0 0 0 2px var(--brand); }
.rg-day.edge { background: var(--brand); border-color: var(--brand); box-shadow: none; }
.rg-day.edge .rg-amt, .rg-day.edge .rg-dn { color: #fff; }
.rg-legend { display: flex; align-items: center; gap: 6px var(--sp-4); flex-wrap: wrap; margin-block-start: var(--sp-4); font-size: 12.5px; color: var(--muted); }
.rg-key { display: inline-flex; align-items: center; gap: 6px; }
.rg-key b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rg-legend i { display: inline-block; inline-size: 18px; block-size: 18px; border-radius: 5px; border: 1px solid var(--line); }
.rg-pager { display: flex; justify-content: space-between; gap: var(--sp-2); margin-block-start: var(--sp-3); }
.rg-pager a:only-child { margin-inline-start: auto; }
.rg-pager span { font-weight: 800; }
.rg-table { margin-block-start: var(--sp-4); border: 1px solid var(--line); border-radius: 10px; }
.rg-table summary { cursor: pointer; padding-block: 10px; padding-inline: 14px; font-size: 13px; font-weight: 700; color: var(--brand); }
.rg-table .table-wrap { border: 0; border-block-start: 1px solid var(--line); border-radius: 0 0 10px 10px; box-shadow: none; margin: 0; }
.rg-set { position: sticky; inset-block-start: 84px; }
.rg-set-f { display: grid; gap: var(--sp-4); }
.rg-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.rg-two .field { min-inline-size: 0; }
.rg-days { border: 0; margin: 0; padding: 0; min-inline-size: 0; display: grid; gap: 8px; }
.rg-days legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; margin-block-end: 8px; }
.rg-days-q { display: flex; gap: 6px; flex-wrap: wrap; }
.rg-days-l { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.page label.rg-dchip { position: relative; display: flex; margin: 0; cursor: pointer; }
.rg-dchip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rg-dchip span { flex: 1; text-align: center; padding-block: 7px; border: 1px solid var(--line-input); border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface); }
.rg-dchip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.rg-dchip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.rg-apply { justify-content: center; }
@media (max-width: 1100px) { .rg-layout { grid-template-columns: minmax(0, 1fr); } .rg-set { position: static; } }
/* rates page: plans (tabs + open plan bar), room-type tabs, plan-wide price list */
.rg-plans { display: flex; gap: 8px; flex-wrap: wrap; margin-block: var(--sp-4); }
.rg-plan { display: inline-flex; align-items: center; gap: 8px; padding-block: 9px; padding-inline: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: var(--shadow); }
.rg-plan:hover { border-color: var(--brand); text-decoration: none; }
.rg-plan.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.rg-plan.off span { opacity: .6; }
.rg-plan small.chip::before, .rg-planbar .chip::before { content: none; }
.rg-empty { margin: 0; }
.rg-planbar { margin-block-end: var(--page-gap); padding-block: 14px; padding-inline: var(--card-px); }
.rg-planbar-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rg-planbar-h h2 { font-size: 18px; font-weight: 800; margin: 0; }
.rg-code { display: inline-grid; place-items: center; padding-block: 3px; padding-inline: 9px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 12px; letter-spacing: .4px; }
.rg-planbar-a { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }
.rg-planbar-a form { margin: 0; }
.rg-planbar-a .btn svg { inline-size: 14px; block-size: 14px; }
.rg-plan-edit { margin-block-start: 12px; padding-block-start: 12px; border-block-start: 1px solid var(--line); max-inline-size: 560px; }
.rg-plan-edit .ra-f:first-of-type { grid-column: auto; }
input.rg-upper { text-transform: uppercase; }
.rg-types { display: flex; gap: 4px; flex-wrap: wrap; margin-inline-start: auto; background: var(--surface-2); border: 1px solid var(--line); padding: 3px; border-radius: 10px; }
.rg-types a { padding-block: 5px; padding-inline: 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); text-decoration: none; }
.rg-types a:hover { color: var(--ink); text-decoration: none; }
.rg-types a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.rg-period-f { display: flex; align-items: end; gap: var(--sp-3); flex-wrap: wrap; margin-block-end: var(--sp-3); }
.rg-period-f .rg-stats { margin-inline-start: auto; align-self: center; }
.rg-set > header { row-gap: 0; }
.rg-set-sub { font-size: 13px; flex-basis: 100%; }
.rg-types-f { display: grid; gap: 6px; }
.rg-types-h, .rg-type-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 110px; gap: 8px; align-items: center; }
.rg-types-h { font-size: 12px; font-weight: 700; color: var(--muted); padding-block-end: 2px; border-block-end: 1px solid var(--line); }
.rg-types-h span:nth-child(2), .rg-cur { text-align: center; }
.rg-type-row label { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-cur { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rg-type-row input { inline-size: 100%; border: 1px solid var(--line-input); border-radius: 9px; padding-block: 7px; padding-inline: 10px; background: var(--surface-2); font-weight: 700; }
.rg-type-row input:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.rg-types-n { font-size: 12px; margin: 2px 0 0; }

/* ---------- payment methods and currencies «طرق السداد والعملات» (PaymentMethods/Index, Currencies/History, payment-settings.js) ---------- */
.py-card { margin-block-end: var(--page-gap); scroll-margin-block-start: 84px; }
.py-card > header { row-gap: 2px; }
.py-sub { font-size: 13px; flex-basis: 100%; order: 2; }
.py-head-acts { margin-inline-start: auto; display: flex; gap: 6px; }
.py-card > .table-wrap { border: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: none; margin: 0; }
.py-methods { list-style: none; margin: 0; padding: 0; }
.py-methods > li { border-block-end: 1px solid var(--line); }
.py-methods > li.off .py-name b, .py-methods > li.off .py-ico { opacity: .55; }
.py-method { display: grid; grid-template-columns: 36px minmax(0, 1fr) 100px 190px 70px; align-items: center; gap: var(--sp-4); padding-block: 12px; padding-inline: var(--card-px); margin: 0; }
.py-ico { display: grid; place-items: center; inline-size: 36px; block-size: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.py-ico svg { inline-size: 18px; block-size: 18px; }
.py-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-inline-size: 0; }
.py-name b { font-size: 15px; font-weight: 700; }
.py-card .chip::before { content: none; }
.page label.py-sw { display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.py-sw input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; }
.py-sw i { position: relative; inline-size: 36px; block-size: 20px; border-radius: 99px; background: var(--line-input); transition: background .15s; flex: none; }
.py-sw i::after { content: ""; position: absolute; inset-block-start: 2px; inset-inline-start: 2px; inline-size: 16px; block-size: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(14,23,51,.25); transition: inset-inline-start .15s; }
.py-sw input:checked + i { background: var(--ok); }
.py-sw input:checked + i::after { inset-inline-start: 18px; }
.py-sw input:focus-visible + i { outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); outline-offset: 2px; }
.py-sw input:checked ~ span { color: var(--ink); }
.py-save:disabled { visibility: hidden; }
.py-foot { margin: 0; padding-block: 12px; padding-inline: var(--card-px); font-size: 12.5px; }
.py-table td { vertical-align: middle; }
.py-table tr.off td:not(.py-acts) { opacity: .55; }
.py-cur { display: inline-flex; align-items: center; gap: 10px; }
.py-cur b { font-weight: 700; }
.py-code { display: inline-grid; place-items: center; inline-size: 52px; padding-block: 4px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 12.5px; letter-spacing: .5px; }
.py-rate { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.py-rate b { color: var(--ink); font-size: 15px; }
.py-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.py-acts { inline-size: 1%; }
.py-actw { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.py-actw form { margin: 0; }
.py-actw .btn svg { inline-size: 14px; block-size: 14px; }
.py-editrow > td { background: var(--surface-2); }
.py-form { grid-template-columns: repeat(3, minmax(0, 220px)); padding-block: 6px; }
.py-form .ra-f:first-of-type { grid-column: auto; }
.py-form .ra-f-act { grid-column: auto; align-self: end; justify-content: flex-start; }
input.py-upper { text-transform: uppercase; }
@media (max-width: 760px) {
  .py-method { grid-template-columns: 36px minmax(0, 1fr) auto; row-gap: 10px; }
  .py-method .py-sw { grid-column: 2 / -1; }
  .py-save:disabled { display: none; }
  .py-form { grid-template-columns: 1fr 1fr; }
}

/* ---------- manager dashboard «لوحة المدير» (spec 8.7) ----------
   A navy opening band with one written sentence, then the pending amounts as tabs fused to their detail table (main column),
   the decisions and the debt ages beside them, yesterday's figures under the amounts. */
.mg { display: grid; gap: var(--page-gap); }
.amt { font-weight: 600; white-space: nowrap; }
.amt.tone-bad { color: var(--bad); } .amt.tone-warn { color: var(--warn); } .amt.tone-violet { color: var(--violet); } .amt.tone-info { color: var(--info); }

/* opening band */
.mg-brief { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-6); flex-wrap: wrap;
  background: var(--navy); color: var(--navy-ink); border-radius: 16px; padding-block: 26px 24px; padding-inline: 30px; }
.mg-brief::after { content: ""; position: absolute; inset-block-start: -60px; inset-inline-end: -40px; inline-size: 220px; block-size: 220px; border-radius: 50%;
  border: 28px solid rgba(45, 138, 224, .14); pointer-events: none; }
.mg-brief-text { position: relative; z-index: 1; max-inline-size: 62ch; }
.mg-brief h1 { color: #fff; font-size: 26px; font-weight: 800; line-height: 1.3; }
.mg-sentence { margin: 8px 0 0; font-size: 18px; line-height: 1.75; color: var(--navy-ink); }
.mg-sentence b { color: #fff; font-weight: 700; }
.mg-sentence .hot { color: #fff; font-weight: 700; box-shadow: inset 0 -0.42em 0 rgba(255, 122, 26, .55); padding-inline: 2px; }
.mg-brief-actions { position: relative; z-index: 1; display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.mg-brief .btn { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(220, 230, 245, .22); }
.mg-brief .btn:hover { background: rgba(255, 255, 255, .16); }

/* columns */
.mg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: var(--sp-5); align-items: start; }
.mg-main, .mg-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); align-content: start; min-inline-size: 0; }
.mg-pending { min-inline-size: 0; }
.mg-grid .chip.count { font-family: var(--font-en); font-variant-numeric: tabular-nums; }
.mg-grid .chip.count::before { content: none; }
.chip.now { color: #fff; background: var(--hub); }

/* pending amounts: heading, distribution bar, tabs fused to the detail card */
.mg-pend-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: var(--sp-3); margin-block-end: var(--sp-3); }
.mg-pend-head h2 { font-size: 16px; font-weight: 700; }
.mg-pend-total { font-size: 22px; font-weight: 700; color: var(--brand-deep); }
.mg-bar { display: flex; gap: 3px; block-size: 8px; border-radius: 8px; overflow: hidden; background: var(--line); }
.mg-bar i { display: block; min-inline-size: 6px; }
.mg-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; position: relative; z-index: 1; }
.mg-tabs .rt { display: grid; gap: 2px; align-content: start; min-inline-size: 0; padding-block: 10px 12px; padding-inline: 12px; color: inherit; text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--line); border-block-end: 0; border-start-start-radius: 12px; border-start-end-radius: 12px;
  border-block-start: 3px solid color-mix(in srgb, var(--c) 35%, var(--line)); }
.mg-tabs .rt:hover { background: var(--surface); text-decoration: none; }
.mg-tabs .rt:focus-visible { outline: 2px solid var(--brand-sky); outline-offset: -2px; }
.mg-tabs .rt.on { background: var(--surface); border-block-start-color: var(--c); margin-block-end: -1px; padding-block-end: 13px; }
.mg-tabs .rt-l { font-size: 12.5px; font-weight: 700; color: var(--muted); line-height: 1.35; min-block-size: 2.7em; text-wrap: balance; }   /* two lines kept for every tab, so the amounts line up */
.mg-tabs .rt.on .rt-l { color: var(--ink); }
.mg-tabs .rt b { font-size: 17px; }
.mg-tabs .rt small { font-size: 11.5px; color: var(--muted); }
.mg-tabs .rt.zero b { color: var(--muted); font-weight: 600; }
.mg-detail { border-start-start-radius: 0; border-start-end-radius: 0; }
.mg-detail > header { border-block-end-color: var(--line); }
.mg-clear { display: flex; align-items: center; gap: 8px; margin: 0; padding-block: 28px; padding-inline: var(--card-px); color: var(--muted); font-size: 14px; }
.mg-clear .ic, .dec-empty .ic { color: var(--ok); font-size: 18px; stroke-width: 2.2; }

/* yesterday */
.perf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.perf > div { padding-block: 16px 14px; padding-inline: 18px; display: grid; gap: 12px; grid-template-rows: auto 1fr; min-inline-size: 0; }
.pc-txt { display: grid; gap: 4px; align-content: start; }
.pc-viz { align-self: end; min-block-size: 76px; display: grid; align-content: end; }
/* occupancy: value beside the ring */
.perf > .pc-occ { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto; align-items: center; }
.pc-occ .pc-viz { min-block-size: 0; align-self: center; }
.pc-ring { inline-size: 76px; block-size: 76px; display: block; }
.pc-ring text { font-family: var(--font-en); font-size: 15px; font-weight: 600; fill: var(--brand-deep); }
/* ADR: yesterday vs last week */
.pc-pair { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; row-gap: 8px; font-size: 12px; color: var(--muted); }
.pc-pair i { display: block; block-size: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.pc-pair b { display: block; block-size: 100%; border-radius: 10px; background: var(--c); }
.pc-pair i.lw b { background: color-mix(in srgb, var(--c) 40%, var(--surface)); }
/* RevPAR line and room-revenue columns share the day labels */
.pc-line { display: block; inline-size: 100%; block-size: 54px; direction: ltr; }
.pc-cols { direction: ltr; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; align-items: end; block-size: 54px; }
.pc-cols i { display: block; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--c) 35%, var(--surface)); }
.pc-cols i.last { background: var(--c); }
.pc-cols i.nil { background: var(--line); }
.pc-days { direction: ltr; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-block-start: 4px; font-family: var(--font-en); font-size: 10.5px; color: var(--muted); text-align: center; }
.pc-line + .pc-days { display: flex; justify-content: space-between; }
.perf > div + div { border-inline-start: 1px solid var(--line); }
.perf .lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.perf b { font-size: 22px; font-weight: 700; }
.perf .delta { font-size: 12px; font-weight: 600; color: var(--muted); }
.perf .delta.up { color: var(--ok); }
.perf .delta.down { color: var(--muted); }   /* calm: a lower figure is shown plainly, not in red */

/* decisions */
.decisions.waiting { border-block-start: 3px solid var(--hub); }
.decisions .body { display: grid; gap: var(--sp-4); }
.decisions .dec-empty { display: flex; align-items: center; gap: 8px; margin: 0; }
.decisions .dec-group { display: grid; gap: 8px; }
.decisions .dec-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.decisions .dec-head .more-link { margin-inline-start: auto; font-size: 13px; font-weight: 600; white-space: nowrap; }
.decisions .dec-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 10px; padding-inline: 12px;
  border: 1px solid var(--line); border-inline-start: 3px solid var(--c); border-radius: 10px; background: var(--surface); }
.decisions .dec-info { display: grid; gap: 1px; min-inline-size: 0; }
.decisions .dec-row small { display: block; color: var(--muted); font-size: 12.5px; }
.decisions .dec-at { margin-block-start: 3px; }
.decisions .dec-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-end; }
.decisions .dec-actions form { margin: 0; }

/* debt ages */
.mg-aging .body { display: grid; gap: 12px; }
.mg-aging .ag-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "t p"; column-gap: 10px; row-gap: 5px; align-items: center; font-size: 13.5px; }
.mg-aging .ag-l { grid-area: l; }
.mg-aging .ag-row b { grid-area: v; }
.mg-aging .ag-track { grid-area: t; display: block; block-size: 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.mg-aging .ag-track i { display: block; block-size: 100%; background: var(--c); border-radius: 6px; }
.mg-aging .ag-row small { grid-area: p; color: var(--muted); font-size: 12px; text-align: end; min-inline-size: 3ch; }
.mg-aging .more-link { font-size: 13px; font-weight: 600; justify-self: start; }

@media (max-width: 1200px) {
  .mg-grid { grid-template-columns: minmax(0, 1fr); }
  .mg-side { grid-template-columns: repeat(2, minmax(0, 1fr)); order: -1; }   /* stacked: what waits for a decision comes first */
}
@media (max-width: 1100px) { .perf { grid-template-columns: repeat(2, minmax(0, 1fr)); } .perf > div:nth-child(3) { border-inline-start: 0; } .perf > div:nth-child(n+3) { border-block-start: 1px solid var(--line); } }
@media (max-width: 900px) {
  .mg-tabs { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; scrollbar-width: none; }
  .mg-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .mg-brief { padding-inline: 20px; }
  .mg-brief h1 { font-size: 22px; } .mg-sentence { font-size: 16px; }
  .mg-pend-head { grid-template-columns: auto 1fr; } .mg-bar { grid-column: 1 / -1; }
  .perf { grid-template-columns: minmax(0, 1fr); } .perf > div + div { border-inline-start: 0; border-block-start: 1px solid var(--line); }
}
