/* Darna Suites — design tokens */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f9fafb; --ink: #0f1720; --ink-2: #344054; --muted: #667085; --faint: #98a2b3;
  --line: #e4e7ec; --line-2: #eef0f3;
  --brand: #0d5c53; --brand-600: #0a4b44; --brand-50: #ecf6f4; --brand-100: #d3ebe6;
  --gold: #b7862c;
  --ok: #067647; --ok-bg: #ecfdf3; --ok-line: #abefc6;
  --warn: #b54708; --warn-bg: #fffaeb; --warn-line: #fedf89;
  --bad: #b42318; --bad-bg: #fef3f2; --bad-line: #fecdca;
  --info: #175cd3; --info-bg: #eff8ff; --info-line: #b2ddff;
  --r: 10px; --r-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --shadow-lg: 0 12px 32px -8px rgba(16,24,40,.18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html[lang="ar"] { --font: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; font-weight: 650; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; }
.ico { flex: none; vertical-align: -3px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.start { align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-sm); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; }
.card h2, .card h3 { margin-top: 0; }
.stack > * + * { margin-top: 16px; }
.mt { margin-top: 16px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-weight: 600; font-size: .9rem;
  text-decoration: none !important; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn.ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); border-color: #d0d5dd; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.danger-ghost { background: var(--surface); color: var(--bad); border-color: var(--bad-line); }
.btn.sm { height: 32px; padding: 0 10px; font-size: .82rem; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 1rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }

/* forms */
label { display: block; font-weight: 550; font-size: .84rem; color: var(--ink-2); margin-bottom: 6px; }
label .hint { font-weight: 400; color: var(--faint); }
input, select, textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #d0d5dd; border-radius: var(--r-sm); font: inherit; font-size: .92rem;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s; }
textarea { min-height: 88px; padding: 10px 12px; height: auto; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; box-shadow: none; accent-color: var(--brand); padding: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,92,83,.14); }
input[readonly] { background: var(--surface-2); }
.field { margin-bottom: 16px; }
.fields { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 450; color: var(--ink); }
fieldset { border: 0; border-top: 1px solid var(--line); padding: 18px 0 2px; margin: 0 0 8px; }
fieldset:first-of-type { border-top: 0; padding-top: 0; }
legend { font-weight: 650; font-size: .95rem; padding: 0 0 10px; float: inline-start; width: 100%; }
legend + * { clear: both; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); text-align: start; vertical-align: middle; }
th { font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--surface-2); border-bottom-color: var(--line); white-space: nowrap; }
html[lang="ar"] th { letter-spacing: 0; text-transform: none; font-size: .8rem; }
tbody tr:hover td, table.hover tr:hover td { background: #fafbfc; }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 700; border-top: 1px solid var(--ink); background: var(--surface-2); }
tr.dim td { color: var(--faint); }
tr.hl td { background: #fffcf2; }
table.plain td { padding: 8px 0; }
table.plain td.num { padding-inline-start: 12px; }
table.plain tr:last-child td { border-bottom: 0; }

/* badges and alerts */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: .76rem; font-weight: 550;
  background: #f2f4f7; color: var(--ink-2); border: 1px solid #e4e7ec; white-space: nowrap; line-height: 1.5; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.nodot::before { display: none; }
.b-pending { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.b-confirmed { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.b-checked_in, .b-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.b-checked_out { background: #f2f4f7; color: #475467; }
.b-cancelled, .b-no_show, .b-bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); margin: 0 0 16px; border: 1px solid; font-size: .92rem; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.alert.err { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.alert.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.pos { color: var(--ok); } .neg { color: var(--bad); }

/* ---------- public site ---------- */
.site-header { background: rgba(255,255,255,.9); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; text-decoration: none !important; }
.logo-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.logo small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a:not(.btn) { color: var(--ink-2); font-weight: 500; font-size: .92rem; }
.lang-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2) !important; font-weight: 550; }
.hero { position: relative; color: #fff; padding: 88px 0 104px; overflow: hidden;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(255,255,255,.12), transparent 60%), linear-gradient(160deg, #0b4a43 0%, #0d5c53 55%, #127064 100%); }
.hero::after { content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,1) 1px, transparent 1px); background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); margin-bottom: 16px; }
html[lang="ar"] .eyebrow { letter-spacing: 0; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.08; max-width: 720px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 18px; }
html[lang="ar"] .hero h1 { line-height: 1.3; letter-spacing: 0; }
.hero p { font-size: 1.08rem; color: rgba(255,255,255,.82); max-width: 580px; margin: 0; }
.search { background: #fff; color: var(--ink); border-radius: 14px; padding: 10px; margin-top: 36px; box-shadow: var(--shadow-lg);
  display: grid; gap: 4px; grid-template-columns: 1fr 1fr 120px auto; align-items: end; max-width: 860px; }
.search .field { margin: 0; padding: 6px 10px; border-inline-end: 1px solid var(--line-2); }
.search .field:nth-child(3) { border: 0; }
.search label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 2px; }
html[lang="ar"] .search label { text-transform: none; letter-spacing: 0; font-size: .8rem; }
.search input, .search select { border: 0; box-shadow: none; padding: 0; height: 30px; font-weight: 550; background: transparent; }
.search input:focus, .search select:focus { box-shadow: none; }
.search .btn { height: 52px; border-radius: 10px; padding: 0 24px; }
.section { padding: 72px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.7rem; margin: 0; letter-spacing: -.02em; }
.suite-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.suite-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.suite-card .img { position: relative; }
.suite-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--brand-50); display: block; }
.suite-card .chip { position: absolute; top: 12px; inset-inline-start: 12px; }
.suite-card .body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.suite-card h3 { margin: 0; font-size: 1.1rem; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.95); color: var(--ink); border-radius: 99px; padding: 4px 10px; font-size: .75rem; font-weight: 600; box-shadow: var(--shadow); }
.chip .ico { color: var(--gold); }
.meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.price { font-size: 1.35rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.price small { font-size: .82rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: .76rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.feature { display: flex; gap: 14px; }
.feature .ico-box { width: 42px; height: 42px; flex: none; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.feature strong { display: block; margin-bottom: 2px; }
.site-footer { background: #0b1f1d; color: #b7c7c4; padding: 48px 0 32px; margin-top: 0; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer .logo { color: #fff; }
.site-footer .logo-mark { background: #fff; color: var(--brand); }
.site-footer strong { color: #fff; display: block; margin-bottom: 8px; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
html[lang="ar"] .site-footer strong { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.footer-line { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; }
.summary-table td { padding: 10px 0; }
.summary-table td:last-child { text-align: end; }
.big-ref { font-size: 2rem; font-weight: 750; letter-spacing: .08em; color: var(--brand); font-variant-numeric: tabular-nums; direction: ltr; }

/* ---------- staff area ---------- */
body.admin { background: var(--bg); }
.admin-top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.admin-top .bar { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 12px; padding: 0 20px; }
.admin-top .who { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .88rem; font-weight: 550; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.admin-shell { display: flex; }
.sidenav { width: 236px; flex: none; padding: 14px 12px 24px; position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto; background: var(--surface); border-inline-end: 1px solid var(--line); }
.sidenav a { position: relative; display: flex; gap: 11px; align-items: center; padding: 8px 10px; margin: 1px 0; border-radius: 7px; color: var(--ink-2); font-weight: 520; font-size: .9rem; text-decoration: none; }
.sidenav a .ico { color: var(--faint); }
.sidenav a:hover { background: var(--surface-2); color: var(--ink); }
.sidenav a:hover .ico { color: var(--ink-2); }
.sidenav a.on { background: var(--brand-50); color: var(--brand); font-weight: 620; }
.sidenav a.on .ico { color: var(--brand); }
.sidenav a.on::before { content: ""; position: absolute; inset-inline-start: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.sidenav .grp { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 18px 10px 6px; font-weight: 600; }
html[lang="ar"] .sidenav .grp { text-transform: none; letter-spacing: 0; font-size: .78rem; }
.main { flex: 1; min-width: 0; padding: 28px 32px 96px; max-width: 1320px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 1.55rem; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: .9rem; }
.kpi { padding: 18px 20px; }
.kpi .l { color: var(--muted); font-size: .82rem; font-weight: 550; display: flex; align-items: center; gap: 7px; }
.kpi .v { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.025em; margin: 6px 0 4px; line-height: 1.15; }
.kpi .v small { font-size: .9rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.kpi .s { font-size: .8rem; color: var(--muted); }
.bottomnav { display: none; }
.menu-btn { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 18px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.filters .field { margin: 0; min-width: 140px; flex: 1 1 140px; max-width: 230px; }
.filters label { font-size: .76rem; }
.filters input, .filters select { height: 36px; }
.filters .btn { height: 36px; }
.bar-track { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.bar-track > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row .t { font-weight: 600; color: var(--ink); }
.list-row .d { font-size: .82rem; color: var(--muted); }
.empty { color: var(--faint); padding: 8px 0; font-size: .9rem; }
.code { font-variant-numeric: tabular-nums; font-weight: 650; }

/* suite tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.tile { position: relative; border-radius: 9px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 74px; text-decoration: none !important; transition: border-color .12s, box-shadow .12s; }
.tile:hover { border-color: #c7ccd4; box-shadow: var(--shadow); }
.tile .c { font-weight: 700; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 5px; }
.tile .c .ico { color: var(--gold); }
.tile .w { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile::after { content: ""; position: absolute; top: 12px; inset-inline-end: 12px; width: 8px; height: 8px; border-radius: 50%; background: #d0d5dd; }
.tile.busy { background: #f3faf7; border-color: #cfe9de; } .tile.busy::after { background: #12b76a; }
.tile.res { background: #fffcf2; border-color: #f5e3b3; } .tile.res::after { background: #f79009; }
.floor-label { font-size: .74rem; color: var(--muted); margin: 16px 0 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
html[lang="ar"] .floor-label { text-transform: none; letter-spacing: 0; font-size: .82rem; }
.floor-label:first-of-type { margin-top: 4px; }
label.tile { cursor: pointer; display: flex; gap: 8px; align-items: flex-start; margin: 0; font-weight: 500; }
label.tile:has(input:checked) { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand); }
label.tile::after { display: none; }

/* occupancy grid */
.occ { border-collapse: separate; border-spacing: 0; font-size: .78rem; }
.occ th, .occ td { padding: 0; border-bottom: 1px solid var(--line-2); border-inline-end: 1px solid var(--line-2); height: 36px; min-width: 40px; text-align: center; background: var(--surface); }
.occ th { background: var(--surface-2); padding: 6px 2px; text-transform: none; letter-spacing: 0; font-weight: 550; line-height: 1.25; }
.occ th.today { background: var(--brand-50); color: var(--brand); }
.occ .unit { position: sticky; inset-inline-start: 0; z-index: 2; min-width: 70px; font-weight: 650; padding: 0 10px; text-align: start; background: var(--surface); }
.occ td a { display: block; height: 100%; line-height: 36px; text-decoration: none; color: #fff; overflow: hidden; white-space: nowrap; font-size: .7rem; padding: 0 3px; font-weight: 550; }
.occ td.s-confirmed a { background: #2e90fa; } .occ td.s-checked_in a { background: #12b76a; }
.occ td.s-checked_out a { background: #98a2b3; } .occ td.s-pending a { background: #f79009; }
.occ td.free a { color: transparent; } .occ td.free a:hover { background: var(--brand-50); color: var(--brand); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin: 0 0 12px; align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-inline-end: 6px; }

/* charts */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; border-bottom: 1px solid var(--line); }
.chart .col { flex: 1; display: flex; gap: 3px; align-items: flex-end; height: 100%; }
.chart .col span { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .in { background: var(--brand); } .chart .out { background: #f0a08a; } .chart .fc { opacity: .38; }
.chart-labels { display: flex; gap: 8px; font-size: .7rem; color: var(--muted); margin-top: 6px; }
.chart-labels span { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; }

.alloc-row { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr 120px 38px; gap: 10px; align-items: end; padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.alloc-row .field { margin: 0; }
.alloc-row label { font-size: .76rem; }
details summary { cursor: pointer; color: var(--brand); font-weight: 550; }
pre.json { white-space: pre-wrap; word-break: break-word; font-size: .74rem; background: var(--surface-2); border: 1px solid var(--line); padding: 10px; border-radius: 6px; max-height: 300px; overflow: auto; direction: ltr; text-align: left; }
.ltr { direction: ltr; unicode-bidi: isolate; }

@media (max-width: 960px) {
  .sidenav { position: fixed; inset-inline-start: 0; top: 58px; bottom: 0; z-index: 40; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow-lg); width: 264px; height: auto; }
  html[dir="rtl"] .sidenav { transform: translateX(105%); }
  body.nav-open .sidenav { transform: none !important; }
  body.nav-open::after { content: ""; position: fixed; inset: 58px 0 0; background: rgba(16,24,40,.35); z-index: 35; }
  .menu-btn { display: inline-grid; }
  .main { padding: 20px 16px 96px; }
  .bottomnav { display: flex; position: fixed; inset-inline: 0; bottom: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); z-index: 25; padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a, .bottomnav button { flex: 1; border: 0; background: none; font-family: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 7px; font-size: .68rem; color: var(--muted); text-decoration: none; font-weight: 550; }
  .bottomnav a.on { color: var(--brand); }
  .bottomnav .cta .ico { background: var(--brand); color: #fff; border-radius: 50%; padding: 4px; width: 28px; height: 28px; margin-top: -4px; }
  .alloc-row { grid-template-columns: 1fr 1fr; }
  .alloc-row .wide { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  h1, .page-head h1 { font-size: 1.3rem; }
  .hero { padding: 48px 0 56px; }
  .search { grid-template-columns: 1fr 1fr; padding: 8px; }
  .search .field:nth-child(2) { border: 0; }
  .search .field:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line-2); }
  .search .btn { grid-column: 1 / -1; }
  .section { padding: 48px 0; }
  .hide-sm { display: none !important; }
  .kpi { padding: 14px 16px; } .kpi .v { font-size: 1.35rem; }
  .card { padding: 16px; }
  .card-head { padding: 12px 16px; }
  .filters { padding: 12px; }
  .filters .field { max-width: none; flex-basis: 40%; }
  table.cards thead { display: none; }
  table.cards tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 6px; }
  table.cards tbody tr:hover td { background: transparent; }
  table.cards td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 8px; text-align: end; }
  table.cards td::before { content: attr(data-l); color: var(--muted); font-size: .8rem; text-align: start; }
  table.cards td:not([data-l])::before { content: none; }
  .admin-top .who span.name { display: none; }
}
@media print { .sidenav, .admin-top, .bottomnav, .filters, .btn { display: none !important; } .main { padding: 0; } }
.ico.gold { color: var(--gold); }
@media (max-width: 680px) { .grid.g4 { grid-template-columns: 1fr 1fr; gap: 10px; } .grid.g3 .kpi { } }

/* ---------- Date range picker ---------- */
.date-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border: 1px solid #d0d5dd; border-radius: var(--r-sm);
  background: #fff; font: inherit; font-size: .92rem; color: var(--ink); cursor: pointer; text-align: start; box-shadow: var(--shadow-sm); white-space: nowrap; overflow: hidden; }
.date-btn .ico, .date-btn svg { color: var(--muted); flex: none; }
.date-btn span { overflow: hidden; text-overflow: ellipsis; }
.date-btn:hover { border-color: #98a2b3; }
.date-btn:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,92,83,.14); }
.filters .date-btn { height: 36px; }
.search .date-btn { border: 0; box-shadow: none; padding: 0; height: 30px; font-weight: 550; background: transparent; }
.alloc-row .date-btn { min-width: 0; }
body.rp-lock { overflow: hidden; }
.rp-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15,23,32,.38); display: none; align-items: center; justify-content: center; padding: 16px; }
.rp-backdrop.open { display: flex; }
.rp { background: #fff; border-radius: 14px; box-shadow: 0 24px 48px -12px rgba(16,24,40,.3); width: 100%; max-width: 640px; padding: 16px; color: var(--ink); }
.rp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rp-titles { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 24px; text-align: center; font-weight: 650; }
.rp-nav { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.rp-nav:hover { background: var(--surface-2); }
.rp-months { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 24px; }
.rp-wd, .rp-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.rp-wd span { text-align: center; font-size: .72rem; color: var(--faint); font-weight: 600; padding: 6px 0; }
.rp-day { height: 38px; border: 0; background: none; font: inherit; font-size: .88rem; color: var(--ink); cursor: pointer; position: relative; border-radius: 0; padding: 0; font-variant-numeric: tabular-nums; }
.rp-day:hover:not(:disabled):not(.start):not(.end) { background: var(--surface-2); border-radius: 8px; }
.rp-day.today { font-weight: 700; color: var(--brand); }
.rp-day:disabled { color: #d0d5dd; cursor: default; }
.rp-day.in { background: var(--brand-50); border-radius: 0; }
.rp-day.in.preview { background: var(--surface-2); }
.rp-day.start, .rp-day.end { background: var(--brand); color: #fff; border-radius: 8px; font-weight: 600; }
.rp-day.start.end { border-radius: 8px; }
.rp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.rp-sel { font-size: .88rem; color: var(--ink-2); }
.rp-sel em { color: var(--muted); font-style: normal; }
.rp-btns { display: flex; gap: 8px; margin-inline-start: auto; }
@media (max-width: 719px) {
  .rp-backdrop { align-items: flex-end; padding: 0; }
  .rp { border-radius: 16px 16px 0 0; max-width: none; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .rp-day { height: 44px; }
  .rp-btns .btn { flex: 1; height: 44px; }
  .rp-btns { width: 100%; }
}

/* Header switches */
.icon-btn.top-pill { width: auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; font-size: .82rem; font-weight: 600; }
.site-nav .staff-link { color: var(--ink-2); }
@media (max-width: 420px) {
  .admin-top .top-pill span { display: none; }
  .admin-top .top-pill { width: 36px; padding: 0; justify-content: center; }
  .site-nav { gap: 10px; }
}

/* Quick add sheet (phones) */
.quick-sheet { display: none; }
@media (max-width: 960px) {
  body.quick-open .quick-sheet { display: flex; position: fixed; inset: 0; z-index: 24; background: rgba(15,23,32,.38); align-items: flex-end; }
  .quick-sheet .qs { width: 100%; background: #fff; border-radius: 16px 16px 0 0; padding: 10px 10px calc(78px + env(safe-area-inset-bottom)); display: grid; gap: 2px; }
  .quick-sheet a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; color: var(--ink); font-weight: 550; text-decoration: none; }
  .quick-sheet a:active { background: var(--surface-2); }
  .quick-sheet .qi { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
  body.quick-open .bottomnav .cta .ico { transform: rotate(45deg); }
  .bottomnav .cta .ico { transition: transform .15s; }
}

@media (max-width: 560px) {
  .site-nav .btn:not(.staff-link) { display: none; }
  .site-header .logo { font-size: .95rem; line-height: 1.2; }
}
.ledger tr.opening td { background: var(--brand-50); }

.ledger-m { display: none; }
.lm { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.lm:last-child { border-bottom: 0; }
.lm .t { font-weight: 600; font-size: .9rem; }
.lm .d { color: var(--muted); font-size: .78rem; }
.lm .amt { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.lm.opening { background: var(--brand-50); }
@media (max-width: 760px) { .ledger-m { display: block; } .ledger-d { display: none; } }

/* ---------- Forecast grid ---------- */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 11px; border-radius: 6px; color: var(--ink-2); font-size: .84rem; font-weight: 550; text-decoration: none; }
.seg a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.fg-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.fg { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: .84rem; font-variant-numeric: tabular-nums; }
.fg th, .fg td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.fg td.num, .fg th.num { text-align: end; min-width: 74px; }
.fg thead th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; color: var(--ink-2); font-size: .76rem; vertical-align: bottom; }
.fg thead th span, .fg thead th small { display: block; } .fg thead th small { color: var(--faint); font-weight: 500; }
.fg .lab { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--surface); text-align: start; min-width: 190px; max-width: 240px; font-weight: 500; border-inline-end: 1px solid var(--line); }
.fg thead .lab { z-index: 2; background: var(--surface-2); }
.fg td.past { background: #fafbfc; color: var(--ink-2); }
.fg td.cur, .fg th.cur { background: var(--brand-50); }
.fg thead th.cur { color: var(--brand); }
.fg .tot { font-weight: 650; border-inline-start: 1px solid var(--line); background: var(--surface-2); }
.fg tr.grp th.lab, .fg tr.grp td { font-weight: 650; color: var(--ink); }
.fg tr.kid th.lab { padding-inline-start: 38px; color: var(--ink-2); font-weight: 450; }
.fg tr.kid td { color: var(--ink-2); }
.fg tr.result th.lab, .fg tr.result td { background: var(--surface-2); border-top: 1px solid var(--line); }
.fg tr.result td.cur { background: var(--brand-100); }
.fg tr.muted-row th.lab, .fg tr.muted-row td { color: var(--muted); font-weight: 500; }
.fg tr.sep th { background: var(--surface); padding-top: 18px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
html[lang="ar"] .fg tr.sep th { text-transform: none; letter-spacing: 0; font-size: .8rem; }
.fg .tg { width: 22px; height: 22px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-2); cursor: pointer; margin-inline-end: 8px; padding: 0; vertical-align: -5px; }
.fg .tg-sp { display: inline-block; width: 30px; }
.fg .neg { color: var(--bad); }
.legend .lg-past, .legend .lg-cur, .legend .lg-fc { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); display: inline-block; }
.lg-past { background: #fafbfc; } .lg-cur { background: var(--brand-50); } .lg-fc { background: #fff; }
@media (max-width: 680px) {
  .fg .lab { min-width: 130px; max-width: 150px; white-space: normal; }
  .fg tr.kid th.lab { padding-inline-start: 14px; }
  .seg { width: 100%; } .seg a { flex: 1; text-align: center; padding: 6px 4px; }
}

.fg th.lab { text-transform: none; letter-spacing: 0; font-size: .86rem; }
.fg tr.sep td { border-bottom: 1px solid var(--line-2); padding-top: 18px; }
.fg tr.sep th.lab { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
html[lang="ar"] .fg tr.sep th.lab { text-transform: none; letter-spacing: 0; font-size: .8rem; }
.legend .lg-past, .legend .lg-cur, .legend .lg-fc { border-color: #d0d5dd; }

.fg .tg .ico { vertical-align: 0; }
.fg .tg .i-minus, .fg tr.open .tg .i-plus { display: none; }
.fg tr.open .tg .i-minus { display: inline; }
.fg .tg:hover { background: var(--surface-2); color: var(--ink); }
.seg { gap: 4px; }
.seg a { padding: 6px 14px; }

.who-pill b { font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-pill.on { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); }
@media (max-width: 420px) {
  .admin-top .top-pill.who-pill { width: auto; padding: 0 10px; }
  .admin-top .who-pill .ico { display: none; }
  .who-pill b { max-width: 90px; }
}
