/* ==========================================================================
   Flare Portal — styles built on the Flare design system
   Tokens mirror the design system's tokens.json. Everything is square
   (radius-none), there are no shadows or gradients, and navy is the brand.
   ========================================================================== */

/* ---- Fonts -------------------------------------------------------------- */
@font-face { font-family: "Larken"; src: url("../fonts/Larken-Regular.8a185739b407.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.22bb96fee177.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "GE Dinar Two"; src: url("../fonts/GEDinarTwo-Medium.e537d3364351.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; } /* Arabic letters only: its digits are Arabic-Indic, Flare uses 0-9 */
@font-face { font-family: "Tajawal"; src: url("../fonts/Tajawal-Regular.b29891f9c659.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* Inter SemiBold (600) loads from Google Fonts in base.html, as the brand system specifies. */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* Brand palette */
  --navy: #002855;
  --black: #211f1d;
  --warm-grey: #bcbab7;
  --beige: #f0ece4;
  --light-blue: #21b9e8;
  --pale-blue: #8fabc3;
  --pale-yellow: #edc15e;
  --dark-khaki: #c9a56b;
  --copper: #c16522;
  --wheat: #f6e5b7;
  --error: #c62828;      /* functional: form errors only */
  --error-soft: #fdecec;

  /* Semantic (Light theme) */
  --surface: #ffffff;
  --surface-alt: var(--beige);
  --surface-tint: #e6e9ee;
  --ink: #111111;
  --ink-heading: var(--navy);
  --ink-muted: #65625e;
  --accent: var(--navy);
  --line: var(--warm-grey);
  --line-soft: #e4e2df;
  --rule-accent: var(--light-blue);
  --action: var(--navy);
  --on-action: #ffffff;
  --focus: var(--navy);

  /* Type */
  --font-display: "Larken", "GE Dinar Two", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-arabic-display: "GE Dinar Two", "Tajawal", sans-serif;
  --font-arabic: "Tajawal", "Inter", system-ui, sans-serif;

  /* Space (4px base) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;

  --sidebar-width: 264px;
  --icon: 24px;
}

/* Navy theme: used by the sidebar, auth panel and hero bands. */
.theme-navy {
  --surface: var(--navy);
  --surface-alt: #0d3562;
  --surface-tint: #1a3d66;
  --ink: #ffffff;
  --ink-heading: #ffffff;
  --ink-muted: #c8c6c3;
  --accent: var(--light-blue);
  --line: rgba(255, 255, 255, 0.24);
  --action: #ffffff;
  --on-action: var(--navy);
  --focus: var(--light-blue);
  background: var(--surface);
  color: var(--ink);
}

/* ---- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
.icon { flex: none; display: inline-block; vertical-align: middle; }
a { color: var(--action); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--rule-accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-8) 0; }
[dir="rtl"], :lang(ar) { font-family: var(--font-arabic); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Typography --------------------------------------------------------- */
/* Only Larken Regular is loaded, so every Larken style sets weight 400 to avoid faux bold. */
.display, .headline, .title, .subtitle, .lead, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink-heading);
  margin: 0;
}
.display  { font-size: clamp(48px, 7vw, 96px); line-height: 1; letter-spacing: -0.01em; }
.headline, h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -0.01em; }
.title, h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; }
.subtitle, h3 { font-size: 24px; line-height: 30px; }
.lead { font-size: 22px; line-height: 30px; color: var(--ink-muted); }
.eyebrow { font-size: 18px; line-height: 26px; color: var(--accent); margin: 0 0 var(--space-2); }
.overline {
  font-size: 12px; line-height: 16px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-muted); margin: 0;
}
.statement { font-size: 22px; line-height: 30px; font-weight: 600; color: var(--ink-heading); }
.body-lg { font-size: 18px; line-height: 28px; }
.strong { font-weight: 600; }
.muted { color: var(--ink-muted); }
.caption { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
p { margin: 0 0 var(--space-4); }
.arabic-title { font-family: var(--font-arabic-display); font-weight: 500; font-size: 32px; line-height: 48px; }

/* The thin light-blue rule that underlines headlines */
.rule { display: block; width: 56px; height: 0; border: 0; border-top: 2px solid var(--rule-accent); margin: var(--space-4) 0 0; }

/* ---- App shell ---------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; position: relative; }
/* Keep the navy column full height however long the page is. */
.shell::before { content: ""; position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-width); background: var(--navy); z-index: -1; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: var(--space-8) var(--space-6) var(--space-6);
  overflow-y: auto;
}
.sidebar__logo { display: block; width: 132px; margin-bottom: var(--space-12); }
.sidebar__logo img { width: 100%; height: auto; min-height: 35px; }
.sidebar__section { margin: 0 0 var(--space-6); }
.sidebar__section .overline { color: var(--ink-muted); margin-bottom: var(--space-2); padding-inline-start: 22px; }
.nav { list-style: none; margin: 0; padding: 0; }
.nav a {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 9px 0; color: var(--ink); text-decoration: none; font-size: 16px;
}
.nav a .spark { width: 10px; height: 10px; color: var(--light-blue); visibility: hidden; }
.nav a:hover { color: #ffffff; text-decoration: underline; text-decoration-color: var(--light-blue); }
.nav a.is-active { font-weight: 600; }
.nav a.is-active .spark { visibility: visible; }
.nav .count {
  margin-inline-start: auto; min-width: 24px; padding: 0 6px; font-size: 13px; line-height: 20px;
  text-align: center; background: var(--light-blue); color: var(--navy); font-weight: 600;
}
.sidebar__foot { margin-top: auto; padding-top: var(--space-6); border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); color: var(--ink); text-decoration: none; }
.who:hover .who__name { text-decoration: underline; text-decoration-color: var(--light-blue); }
.who__name { font-weight: 600; line-height: 20px; }
.who__role { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
  background: var(--light-blue); color: var(--navy);
}
.avatar--light { background: var(--surface-alt); color: var(--navy); }
.linklike {
  background: none; border: 0; padding: 0; font: inherit; color: var(--ink-muted); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.linklike:hover { color: var(--ink); }

.mobilebar { display: none; }

.main { min-width: 0; padding: var(--space-12) clamp(var(--space-4), 5vw, var(--space-16)) var(--space-16); }
.main__inner { max-width: 1160px; }

/* ---- Page header -------------------------------------------------------- */
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--space-6); margin-bottom: var(--space-12);
}
.page-head__text { max-width: 720px; }
.page-head .lead { margin-top: var(--space-4); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: 14px; color: var(--ink-muted); margin-bottom: var(--space-4); }
.crumbs a { color: var(--ink-muted); }
.crumbs span[aria-hidden] { color: var(--warm-grey); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-6);
  font: 600 16px/1 var(--font-sans); text-decoration: none; cursor: pointer;
  border: 1px solid var(--action); background: var(--action); color: var(--on-action);
  border-radius: 0; transition: background-color .15s ease, color .15s ease;
}
.btn:hover { background: #0d3562; border-color: #0d3562; }
.btn--secondary { background: transparent; color: var(--action); }
.btn--secondary:hover { background: var(--surface-tint); border-color: var(--action); }
.btn--small { min-height: 40px; padding: 0 var(--space-4); font-size: 15px; }
.btn--block { width: 100%; }
.theme-navy .btn:hover { background: var(--beige); border-color: var(--beige); color: var(--navy); }
.theme-navy .btn--secondary:hover { background: rgba(255,255,255,.08); color: #fff; border-color: #fff; }

.arrow-link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-weight: 600; color: var(--action); text-decoration: none;
}
.arrow-link .icon { width: 20px; height: 20px; transition: transform .15s ease; }
.arrow-link:hover { text-decoration: underline; text-decoration-color: var(--rule-accent); }
.arrow-link:hover .icon { transform: translateX(3px); }

/* ---- Panels, cards and grids -------------------------------------------- */
.grid { display: grid; gap: var(--space-6); }
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--main-side { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.stack > * + * { margin-top: var(--space-8); }

.panel { border: 1px solid var(--line); background: var(--surface); padding: var(--space-6); }
.panel--alt { background: var(--surface-alt); border-color: var(--surface-alt); }
.panel__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.panel__head h2, .panel__head h3 { font-size: 24px; line-height: 30px; }
.section + .section { margin-top: var(--space-12); }

/* Flare Curve notch — the brand's one curve, cut into a card's corner */
.notched { position: relative; overflow: hidden; }
.notched::after {
  content: ""; position: absolute; top: -28px; inset-inline-end: -28px; width: 56px; height: 56px;
  background: var(--rule-accent);
  -webkit-mask: url("../brand/flare-curve.e6bbcd6b784e.svg") center / contain no-repeat;
          mask: url("../brand/flare-curve.e6bbcd6b784e.svg") center / contain no-repeat;
}

/* Hero band on navy */
.hero {
  position: relative; overflow: hidden;
  padding: var(--space-12) var(--space-8); margin-bottom: var(--space-12);
}
.hero .eyebrow { color: var(--light-blue); }
.hero__stars { position: absolute; inset-inline-end: var(--space-8); top: 50%; transform: translateY(-50%); display: flex; gap: var(--space-6); align-items: center; color: var(--light-blue); }
.hero__stars .icon:nth-child(2) { width: 18px; height: 18px; opacity: .6; }
.hero__stars .icon:nth-child(3) { width: 10px; height: 10px; opacity: .4; }
.hero .lead { color: var(--ink-muted); max-width: 620px; margin-top: var(--space-4); }

/* Stat tiles */
.stat { padding: var(--space-6); border: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--space-2); text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--navy); }
.stat__value { font-family: var(--font-display); font-size: 48px; line-height: 1; color: var(--ink-heading); font-variant-numeric: tabular-nums; }
.stat__meta { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.meter { height: 4px; background: var(--surface-tint); margin-top: var(--space-2); }
.meter > span { display: block; height: 100%; background: var(--navy); }

/* Action cards (request types) */
.choice {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-6); border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none; min-height: 196px;
  transition: border-color .15s ease, background-color .15s ease;
}
.choice .icon { width: 32px; height: 32px; color: var(--navy); }
.choice__title { font-family: var(--font-display); font-size: 24px; line-height: 30px; color: var(--ink-heading); }
.choice__text { color: var(--ink-muted); margin: 0; }
.choice .arrow-link { margin-top: auto; }
.choice:hover { border-color: var(--navy); background: var(--beige); }

/* Definition lists */
.facts { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: var(--space-3) var(--space-8); margin: 0; }
.facts dt { color: var(--ink-muted); }
.facts dd { margin: 0; }
.facts--stacked { grid-template-columns: 1fr; gap: 0; }
.facts--stacked dt { margin-top: var(--space-4); font-size: 13px; line-height: 18px; letter-spacing: .12em; text-transform: uppercase; }
.facts--stacked dt:first-child { margin-top: 0; }

/* ---- Tables ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--navy); }
.table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 15px; line-height: 22px; }
.table th {
  text-align: start; font-weight: 400; font-size: 12px; line-height: 16px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-muted); padding: var(--space-3) 0; padding-inline-end: var(--space-4);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: var(--space-4) 0; padding-inline-end: var(--space-4); border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom-color: var(--line); }
.table td.num, .table th.num { text-align: end; font-variant-numeric: tabular-nums; }
.table .row-link { font-weight: 600; text-decoration: none; color: var(--navy); }
.table .row-link:hover { text-decoration: underline; text-decoration-color: var(--rule-accent); }
.table tbody tr:hover { background: #faf8f5; }
.table .sub { display: block; font-size: 13px; line-height: 18px; color: var(--ink-muted); }

/* ---- Badges ------------------------------------------------------------- */
/* Every badge carries its text label, so colour is never the only signal. */
.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 2px 8px; font-size: 13px; line-height: 20px; font-weight: 600;
  border: 1px solid transparent; color: var(--navy);
}
.badge--new      { background: var(--pale-yellow); }
.badge--progress { background: var(--pale-blue); }
.badge--good     { background: var(--light-blue); }
.badge--done     { background: var(--beige); color: var(--ink-muted); }
.badge--stopped  { background: var(--dark-khaki); color: var(--black); }
.badge--muted    { background: transparent; border-color: var(--warm-grey); color: var(--ink-muted); }
.badge--alert    { background: #fff; border-color: var(--copper); color: var(--black); }
.badge--alert::before { content: ""; width: 6px; height: 6px; background: var(--copper); }
.badge--outline  { background: transparent; border-color: var(--navy); }

/* ---- Tabs / filters ----------------------------------------------------- */
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-6); border-bottom: 1px solid var(--line); margin-bottom: var(--space-6); }
.tabs a {
  padding: var(--space-3) 0; margin-bottom: -1px; color: var(--ink-muted); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--navy); font-weight: 600; border-bottom-color: var(--light-blue); }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; margin-bottom: var(--space-6); }
.filters .field { margin: 0; min-width: 160px; }
.filters .field--grow { flex: 1 1 240px; }

/* ---- Forms -------------------------------------------------------------- */
.form { max-width: 720px; }
.field { margin-bottom: var(--space-6); }
.field label, .field .label { display: block; font-weight: 600; font-size: 15px; line-height: 22px; margin-bottom: var(--space-2); color: var(--ink); }
.field .help { display: block; font-size: 14px; line-height: 20px; color: var(--ink-muted); margin-top: var(--space-2); }
.field .errorlist { list-style: none; padding: 0; margin: var(--space-2) 0 0; color: var(--error); font-size: 14px; line-height: 20px; font-weight: 600; }
.field--error input:not([type="checkbox"]), .field--error select, .field--error textarea { border-color: var(--error); border-width: 2px; background: var(--error-soft); }
.field--error > label, .field--error .check span { color: var(--error); }
.field--error input[type="checkbox"] { outline: 2px solid var(--error); outline-offset: 2px; }
.req { color: var(--ink-muted); font-weight: 400; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"],
input[type="tel"], input[type="search"], input[type="url"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px var(--space-4);
  font: 16px/24px var(--font-sans); color: var(--ink); background: #fff;
  border: 1px solid var(--warm-grey); border-radius: 0; appearance: none;
}
textarea { min-height: 120px; resize: vertical; }
select {
  padding-inline-end: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23002855' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-muted); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--navy); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--navy); margin: 0; flex: none; }
.field label.check, .check { display: flex; gap: var(--space-3); align-items: flex-start; font-weight: 400 !important; }
.check span { line-height: 20px; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding-top: var(--space-6); border-top: 1px solid var(--line); margin-top: var(--space-8); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-6); }
.form-grid .field--full { grid-column: 1 / -1; }
.nonfield { padding: var(--space-4); background: var(--wheat); color: var(--black); margin-bottom: var(--space-6); }
.nonfield ul { margin: 0; padding-inline-start: var(--space-6); }

/* ---- Messages ----------------------------------------------------------- */
.messages { list-style: none; margin: 0 0 var(--space-8); padding: 0; display: grid; gap: var(--space-3); }
.message {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-4) var(--space-6); background: var(--beige); color: var(--ink);
  border-top: 2px solid var(--light-blue);
}
.message--error { background: var(--wheat); border-top-color: var(--copper); }
.message .icon { width: 16px; height: 16px; margin-top: 4px; color: var(--navy); }

/* ---- Timeline ----------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 40px 1fr; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--line-soft); }
.timeline li:last-child { border-bottom: 0; }
.timeline .avatar { width: 40px; height: 40px; font-size: 13px; }
.timeline__meta { font-size: 14px; line-height: 20px; color: var(--ink-muted); margin-bottom: var(--space-1); }
.timeline__meta strong { color: var(--ink); }
.timeline__body { white-space: pre-line; }
.timeline .is-internal { background: var(--wheat); padding: var(--space-3) var(--space-4); }
.timeline .status-change { display: inline-flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.dot { width: 40px; height: 40px; display: grid; place-items: center; color: var(--light-blue); }
.dot .icon { width: 14px; height: 14px; }

/* ---- Empty states ------------------------------------------------------- */
.empty { padding: var(--space-12) var(--space-6); text-align: center; border: 1px dashed var(--warm-grey); }
.empty .icon { margin: 0 auto var(--space-4); width: 24px; height: 24px; color: var(--light-blue); }
.empty p { color: var(--ink-muted); max-width: 420px; margin: 0 auto var(--space-4); }

/* ---- Pagination --------------------------------------------------------- */
.pager { display: flex; gap: var(--space-4); align-items: center; justify-content: space-between; margin-top: var(--space-6); font-size: 15px; color: var(--ink-muted); }

/* ---- People list -------------------------------------------------------- */
.people { list-style: none; padding: 0; margin: 0; }
.people li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line-soft); }
.people li:last-child { border-bottom: 0; }
.people__name { font-weight: 600; line-height: 20px; }
.people__meta { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.people__actions { margin-inline-start: auto; display: flex; gap: var(--space-3); align-items: center; }

/* ---- Auth layout -------------------------------------------------------- */
.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }
.auth__brand { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: var(--space-12); }
.auth__brand .logo { width: 150px; }
.auth__welcome { margin-top: auto; margin-bottom: auto; }
.auth__welcome .arabic { font-family: var(--font-arabic-display); font-size: 40px; line-height: 60px; color: var(--light-blue); margin: 0 0 var(--space-2); }
.auth__welcome .lead { color: var(--ink-muted); margin-top: var(--space-6); max-width: 420px; }
.auth__stars { position: absolute; inset: 0; pointer-events: none; color: var(--light-blue); }
.auth__stars .icon { position: absolute; }
.auth__foot { font-size: 14px; color: var(--ink-muted); }
.auth__form { position: relative; display: flex; align-items: center; justify-content: center; padding: var(--space-12) var(--space-6); }
.auth__card { width: 100%; max-width: 420px; }
.auth__card h1 { font-size: 40px; line-height: 44px; }
.auth__card .lead { font-size: 18px; line-height: 28px; margin: var(--space-4) 0 var(--space-8); }

/* ---- Utilities ---------------------------------------------------------- */
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.row--between { justify-content: space-between; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); } .mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); } .mb-6 { margin-bottom: var(--space-6); }
.text-right { text-align: end; }
.nowrap { white-space: nowrap; }
.inline-form { display: inline; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--main-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .shell::before { display: none; }
  .mobilebar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 20; padding: var(--space-3) var(--space-4);
  }
  .mobilebar img { height: 35px; width: auto; }
  .mobilebar button { background: none; border: 1px solid var(--line); color: #fff; min-height: 44px; padding: 0 var(--space-4); font: 600 15px var(--font-sans); cursor: pointer; }
  .sidebar { display: none; position: fixed; inset: 60px 0 0 0; height: auto; z-index: 19; }
  .shell.nav-open .sidebar { display: flex; }
  .sidebar__logo { display: none; }
  .main { padding-top: var(--space-8); }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__brand { min-height: 280px; padding: var(--space-8) var(--space-4); }
  .hero__stars { display: none; }
}
@media (max-width: 560px) {
  .grid--4 { grid-template-columns: 1fr 1fr; }
  .stat__value { font-size: 36px; }
  .hero { padding: var(--space-8) var(--space-4); }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: var(--space-3); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .sidebar, .mobilebar, .page-head__actions { display: none !important; } .shell { display: block; } }

/* ==========================================================================
   Community: public layout, partner cards, perks
   ========================================================================== */
.topbar__inner { max-width: 1240px; margin: 0 auto; padding: var(--space-4) clamp(var(--space-4), 4vw, var(--space-12)); display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }
.topbar__logo img { height: 38px; width: auto; }
.topbar__nav { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.topbar__nav a:not(.btn) { color: #fff; text-decoration: none; }
/* Signed-in menu on website pages */
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: var(--space-2); color: #fff; cursor: pointer; font-size: 14px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary .avatar { width: 32px; height: 32px; font-size: 13px; }
.usermenu summary:focus-visible { outline: 2px solid var(--light-blue); outline-offset: 4px; }
.usermenu__panel { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); min-width: 220px; background: #fff; border: 1px solid #e4e0d8; z-index: 20; display: flex; flex-direction: column; padding: var(--space-2) 0; }
.usermenu__panel a, .usermenu__panel button { display: block; width: 100%; text-align: start; padding: 10px var(--space-4); color: var(--black) !important; text-decoration: none !important; background: none; border: 0; font: inherit; font-size: 15px; cursor: pointer; }
.usermenu__panel a:hover, .usermenu__panel button:hover { background: #f0ece4; }
.usermenu__panel form { margin: 0; border-top: 1px solid var(--line-soft); }
@media (max-width: 700px) { .usermenu__name { display: none; } }
.topbar__nav a:not(.btn):hover, .topbar__nav a.is-active { text-decoration: underline; text-decoration-color: var(--light-blue); text-underline-offset: 6px; }
.public-main { max-width: 1240px; margin: 0 auto; padding: var(--space-12) clamp(var(--space-4), 4vw, var(--space-12)) var(--space-16); min-height: 70vh; }
.public-foot { border-top: 1px solid var(--line); max-width: 1240px; margin: 0 auto; padding: var(--space-6) clamp(var(--space-4), 4vw, var(--space-12)); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: 14px; color: var(--ink-muted); }

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-8); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-4); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; background: #fff; }
.chip:hover { border-color: var(--navy); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Partner and perk cards */
.card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; min-height: 100%; }
a.card:hover { border-color: var(--navy); }
.card__head { display: flex; gap: var(--space-4); align-items: center; }
.card__title { font-family: var(--font-display); font-size: 24px; line-height: 28px; color: var(--ink-heading); margin: 0; }
.card__meta { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.card__foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: space-between; padding-top: var(--space-3); }
.monogram { flex: none; width: 56px; height: 56px; display: grid; place-items: center; background: var(--navy); color: #fff; font-family: var(--font-display); font-size: 22px; }
.monogram--lg { width: 88px; height: 88px; font-size: 34px; }
.monogram--free { background: var(--beige); color: var(--navy); }
.tag { display: inline-flex; font-size: 12px; line-height: 18px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); border: 1px solid var(--line); padding: 1px 8px; }

/* Perk value — the big number on a perk card */
.perk-value { font-family: var(--font-display); font-size: 36px; line-height: 1; color: var(--navy); }
.perk-value--sm { font-size: 28px; }
.perk { position: relative; }
.perk .notice { font-size: 14px; line-height: 20px; color: var(--ink-muted); background: var(--beige); padding: var(--space-2) var(--space-3); }

/* Apply choice */
.apply-choice { min-height: 260px; }

/* Application status banner */
.status-panel { padding: var(--space-8); margin-bottom: var(--space-8); }
.status-panel h2 { margin-bottom: var(--space-3); }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: var(--space-2) 0; border-bottom: 1px solid var(--line-soft); }
.list-plain li:last-child { border-bottom: 0; }

/* Checkbox groups (categories, space types) */
.checks > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-2) var(--space-6); }
.checks > div label { display: flex !important; gap: var(--space-3); align-items: flex-start; font-weight: 400 !important; margin: 0 !important; }
.checks input[type="checkbox"], .checks input[type="radio"] { margin-top: 2px; }
.honey { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Bars in the redemptions report */
.bar { display: block; height: 6px; background: var(--surface-tint); margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--navy); }

@media (max-width: 900px) {
  .topbar__nav { gap: var(--space-4); }
}

/* Landing page */
.landing-hero { padding-block: var(--space-16); }
.landing-hero .display { color: #fff; max-width: 12ch; }
.landing-section { margin-bottom: var(--space-16); }
.landing-about { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-8); background: var(--beige); }
.public-foot__links a { color: inherit; }
.notice { background: var(--beige); padding: var(--space-4) var(--space-6); border-inline-start: 3px solid var(--navy); }
.auth-alt { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--line-soft); }

/* Date picker (flatpickr), in Flare colours: square, navy, no shadow */
input[data-datepicker] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23002855' d='M7 2h2v2h6V2h2v2h4v18H3V4h4V2zm12 8H5v10h14V10zM5 6v2h14V6H5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; padding-inline-end: 46px; cursor: pointer; }
.flatpickr-calendar.flare-cal { border-radius: 0; box-shadow: none; border: 1px solid var(--navy); font-family: var(--font-sans); }
.flatpickr-calendar.flare-cal::before, .flatpickr-calendar.flare-cal::after { display: none; }
.flare-cal .flatpickr-months .flatpickr-month, .flare-cal .flatpickr-current-month { color: var(--navy); fill: var(--navy); }
.flare-cal .flatpickr-months .flatpickr-month { height: 44px; }
.flare-cal .flatpickr-current-month { font-size: 16px; font-weight: 600; padding-top: 10px; height: 44px; }
.flare-cal .flatpickr-months .flatpickr-prev-month, .flare-cal .flatpickr-months .flatpickr-next-month { top: 4px; }
.flare-cal .flatpickr-months .flatpickr-prev-month, .flare-cal .flatpickr-months .flatpickr-next-month { color: var(--navy); fill: var(--navy); padding: 10px 12px; }
.flare-cal .flatpickr-months .flatpickr-prev-month:hover svg, .flare-cal .flatpickr-months .flatpickr-next-month:hover svg { fill: var(--light-blue); }
.flare-cal span.flatpickr-weekday { color: var(--ink-muted); font-weight: 600; }
.flare-cal .flatpickr-day { border-radius: 0; color: var(--ink); }
.flare-cal .flatpickr-day:hover, .flare-cal .flatpickr-day:focus { background: var(--beige); border-color: var(--beige); }
.flare-cal .flatpickr-day.today { border-color: var(--light-blue); }
.flare-cal .flatpickr-day.selected, .flare-cal .flatpickr-day.selected:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.flare-cal .flatpickr-day.flatpickr-disabled, .flare-cal .flatpickr-day.flatpickr-disabled:hover { color: var(--line); background: transparent; text-decoration: line-through; }
.flare-cal .flatpickr-day.prevMonthDay, .flare-cal .flatpickr-day.nextMonthDay { color: var(--warm-grey); }

/* Room availability calendar */
.availability { margin-bottom: var(--space-8); }
.availability__head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.availability__nav { display: flex; gap: var(--space-2); align-items: center; font-size: 15px; white-space: nowrap; }
.availability__nav a, .availability__nav span { display: grid; place-items: center; width: 36px; height: 36px; font-size: 22px; border: 1px solid var(--line); }
.availability__nav strong { padding: 0 var(--space-2); }
@media (max-width: 480px) { .availability__nav { font-size: 13px; } .availability { padding: var(--space-4); } }
.availability__nav a { color: var(--navy); text-decoration: none; }
.availability__nav a:hover { background: var(--beige); }
.slots { width: 100%; min-width: 460px; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.slots th { font-size: 13px; font-weight: 600; color: var(--ink-heading); text-align: center; padding: 4px; }
.slots tbody th { text-align: end; font-weight: 400; color: var(--ink-muted); width: 56px; font-variant-numeric: tabular-nums; }
.slot { height: 28px; padding: 0; text-align: center; font-size: 12px; }
.slot a { display: block; height: 100%; min-height: 28px; }
.slot--free { background: #fff; outline: 1px solid var(--line-soft); }
.slot--free a:hover, .slot--free a:focus-visible { background: var(--surface-tint); outline: 2px solid var(--navy); outline-offset: -2px; }
.slot--pending { background: var(--wheat); color: var(--black); }
.slot--booked { background: var(--navy); color: #fff; }
.slot--past, .slot--closed { background: var(--line-soft); }
.slot.is-selected, .legend__swatch.is-selected { background: var(--light-blue); outline: 2px solid var(--navy); outline-offset: -2px; }
.slot--pending span, .slot--booked span { display: block; line-height: 28px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.legend { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: 13px; color: var(--ink-muted); }
.legend li { display: flex; align-items: center; gap: var(--space-2); }
.legend__swatch { width: 16px; height: 16px; display: inline-block; outline: 1px solid var(--line); }
.days { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.days th { font-size: 13px; font-weight: 600; color: var(--ink-heading); padding: 4px; }
.day { height: 56px; padding: 0; vertical-align: top; font-size: 14px; }
.day a, .day > span { display: block; height: 100%; min-height: 56px; padding: 6px 8px; color: inherit; text-decoration: none; }
.day small { display: block; font-size: 11px; margin-top: 4px; }
.day.is-out { opacity: .45; }
.day.is-selected { background: var(--light-blue); outline: 2px solid var(--navy); outline-offset: -2px; }
.day.is-selected a { color: var(--navy); font-weight: 600; }

/* Membership card */
.member-card { position: relative; overflow: hidden; aspect-ratio: 1.586 / 1; max-width: 520px; width: 100%; padding: var(--space-6) var(--space-8); display: flex; flex-direction: column; justify-content: space-between; background: var(--navy); color: #fff; }
.member-card__top { display: flex; justify-content: space-between; align-items: center; }
.member-card__logo { height: 34px; width: auto; }
.member-card__tier { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; padding: 6px 12px; border: 1px solid currentColor; }
.member-card__stars { position: absolute; inset-inline-end: var(--space-8); top: 42%; display: flex; gap: var(--space-4); align-items: center; color: var(--light-blue); opacity: .9; }
.member-card__name { font-family: var(--font-display); font-size: clamp(24px, 4vw, 34px); line-height: 1.1; margin: 0; color: inherit; }
.member-card__company { margin: var(--space-2) 0 0; opacity: .8; }
.member-card__facts { display: flex; gap: var(--space-8); margin: 0; }
.member-card__facts dt { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.member-card__facts dd { margin: 2px 0 0; font-size: 17px; letter-spacing: .04em; }
.member-card--free { background: var(--beige); color: var(--navy); }
.member-card--free .member-card__logo { filter: brightness(0) saturate(100%) invert(11%) sepia(62%) saturate(2800%) hue-rotate(200deg); }
.member-card--free .member-card__stars { color: var(--navy); opacity: .25; }
.member-card--silver { background: #6f7378; color: #fff; }
.member-card--gold { background: var(--dark-khaki); color: var(--black); }
.member-card--gold .member-card__logo { filter: brightness(0); }
.member-card--gold .member-card__stars { color: #fff; }
.member-card--platinum { background: var(--navy); color: #fff; }
.benefits li { padding: var(--space-2) 0; border-bottom: 1px solid var(--line-soft); }
@media (max-width: 480px) { .member-card { padding: var(--space-4) var(--space-6); } .member-card__stars { display: none; } }

/* Lease attachments (Google Drive links) */
.attachments li { align-items: flex-start; }
.attachment__icon { width: 40px; height: 40px; display: grid; place-items: center; background: var(--beige); color: var(--navy); flex: none; }
.attach-add { margin-top: var(--space-4); border-top: 1px solid var(--line-soft); padding-top: var(--space-4); }
.attach-add summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.member-card__facts dd { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }

/* --- Arabic / right-to-left ------------------------------------------------ */
[dir="rtl"] { --font-sans: var(--font-arabic); --font-display: "GE Dinar Two", "Larken", Georgia, serif; }
[dir="rtl"] body { line-height: 1.7; }
[dir="rtl"] body * { letter-spacing: 0 !important; } /* spacing breaks Arabic letter joining */
[dir="rtl"] .mono { letter-spacing: normal !important; }
[dir="rtl"] input[data-datepicker] { background-position: left 14px center; }
[dir="rtl"] .icon--dir { transform: scaleX(-1); }
[dir="rtl"] .arrow-link:hover .icon--dir { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .mono, [dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="url"] { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="url"] { text-align: right; }

/* Language switch */
.lang-switch { font: 600 15px/1 var(--font-sans); color: inherit; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.lang-switch:hover { text-decoration: underline; }
.lang-switch[lang="ar"] { font-family: var(--font-arabic); font-size: 16px; }
.lang-form { display: inline; margin: 0; }
.auth__lang { position: absolute; top: var(--space-6); inset-inline-end: var(--space-6); }
[dir="rtl"] select { background-position: left 16px center; }
[dir="rtl"] .flatpickr-calendar { direction: rtl; } /* week runs Sunday on the right */
[dir="rtl"] .flatpickr-prev-month svg, [dir="rtl"] .flatpickr-next-month svg { transform: scaleX(-1); }
[dir="rtl"] .flatpickr-months .flatpickr-prev-month.flatpickr-prev-month { left: auto; right: 0; }
[dir="rtl"] .flatpickr-months .flatpickr-next-month.flatpickr-next-month { right: auto; left: 0; }
/* Landing pillars and sign-in panel pillars */
.pillar__links { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); margin-top: auto; }
.auth__pillars { list-style: none; padding: 0; margin: var(--space-6) 0 0; display: grid; gap: var(--space-3); }
.auth__pillars li { display: flex; align-items: center; gap: var(--space-3); font-size: 18px; line-height: 26px; color: #fff; }
.auth__pillars .icon { color: var(--light-blue); flex: none; }

/* Grouped form options (e.g. Emails on the profile page) */
.form-section { border: 0; border-top: 1px solid var(--line); margin: var(--space-8) 0 0; padding: var(--space-6) 0 0; min-width: 0; }
.form-section legend { padding: 0 var(--space-2) 0 0; }

/* Room booking picker (day → start time → length) */
.picker { min-width: 0; border: 1px solid var(--line); background: #fff; padding: var(--space-6); margin-bottom: var(--space-2); }
#booking-form, #booking-form .form-grid > * { min-width: 0; }
.picker[hidden] { display: none; }
.picker__step { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-6) 0 var(--space-3); font-weight: 600; color: var(--ink-heading); }
.picker__step span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; }
.picker__days, .picker__times, .picker__lengths { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.picker__summary { margin: var(--space-6) 0 0; padding-top: var(--space-4); border-top: 1px solid var(--line-soft); font-weight: 600; color: var(--navy); }
.picker__error { margin: var(--space-4) 0 0; color: var(--alert, #b91c1c); font-weight: 600; }
.chip { min-height: 44px; min-width: 88px; padding: 8px 14px; border: 1px solid var(--line); background: #fff; color: var(--navy); font: inherit; font-size: 15px; cursor: pointer; font-variant-numeric: tabular-nums; }
.chip:hover:not(:disabled) { border-color: var(--navy); background: var(--surface-tint); }
.chip:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.chip[aria-pressed="true"], .chip[aria-pressed="true"]:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip:disabled { cursor: not-allowed; color: var(--ink-muted); background: var(--line-soft); border-color: transparent; }
.chip--taken { text-decoration: line-through; }
.chip--day { display: grid; justify-items: center; gap: 2px; min-width: 72px; padding: 8px 10px; line-height: 1.15; }
.chip--day span { font-size: 13px; }
.chip--day strong { font-size: 16px; }
.chip--day small { font-size: 11px; }
@media (max-width: 700px) {
  .picker { padding: var(--space-4); }
  .picker__days { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-2); margin-inline: calc(var(--space-4) * -1); padding-inline: var(--space-4); }
  .picker__days .chip { flex: 0 0 auto; scroll-snap-align: start; }
  .picker__times .chip { min-width: calc(33.33% - var(--space-2)); flex: 1 0 calc(33.33% - var(--space-2)); }
  .picker__lengths .chip { flex: 1 0 calc(33.33% - var(--space-2)); min-width: 0; }
}

/* Availability overview above the picker: days × half-hour cells */
.overview__head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.overview .availability__nav button { display: grid; place-items: center; width: 36px; height: 36px; font-size: 22px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; }
.overview .availability__nav button:disabled { color: var(--ink-muted); cursor: default; opacity: .5; }
.overview__table { overflow-x: auto; margin-top: var(--space-3); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.overview__grid { width: 100%; min-width: 300px; border-collapse: separate; border-spacing: 0 4px; table-layout: fixed; }
.overview__grid thead th { font-size: 11px; font-weight: 400; color: var(--ink-muted); text-align: left; padding: 0 0 2px; white-space: nowrap; overflow: hidden; }
.overview__corner { width: 84px; }
.overview__grid tbody th { width: 84px; text-align: left; overflow: hidden; font-size: 13px; line-height: 1.2; color: var(--ink-heading); white-space: nowrap; padding: 0 var(--space-2) 0 10px; font-variant-numeric: tabular-nums; }
.overview__grid tbody th span { display: block; font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.overview__grid tbody th strong { display: block; font-weight: 600; }
.overview__grid tr.is-current th { color: var(--navy); box-shadow: inset 4px 0 0 var(--light-blue); }
.ov { height: 40px; padding: 0; border-left: 1px solid rgba(0, 0, 0, .06); outline: none; }
.ov.ov--hour { border-left: 1px solid var(--line); }
.ov.slot--free { outline: none; box-shadow: inset 0 1px 0 var(--line-soft), inset 0 -1px 0 var(--line-soft); }
.ov button { display: block; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; }
.ov button:hover, .ov button:focus-visible { background: var(--surface-tint); outline: 2px solid var(--navy); outline-offset: -2px; }
.ov.is-selected { background: var(--light-blue); }
.ov.is-selected button:hover { background: transparent; }
.ov.is-dragging { background: var(--light-blue); box-shadow: inset 0 2px 0 var(--navy), inset 0 -2px 0 var(--navy); }
.ov.slot--free { cursor: pointer; }
.overview .legend__swatch.slot--past { background: var(--line-soft); }
@media (max-width: 700px) {
  .overview__corner, .overview__grid tbody th { width: 64px; }
  .overview__grid tbody th { padding-left: 8px; }
  .overview__grid thead th { font-size: 10px; overflow: visible; }
  .overview__grid thead th.ov-odd { color: transparent; }
  .ov { height: 40px; }
}

/* Space photos: 3:2 frames, cover-cropped; a navy star panel when there's no photo */
.photo-frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--navy); }
.photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-frame__empty { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .55); font-size: 14px; }
.photo-frame__star { position: absolute; inset: 0; display: grid; place-items: center; color: var(--light-blue); }
.photo-frame__star .icon { width: 48px; height: 48px; }
.photo-frame--preview { width: 260px; max-width: 100%; border: 1px solid var(--line); }
.photo-field__box { display: flex; gap: var(--space-6); align-items: flex-start; flex-wrap: wrap; }
.photo-field__pick { cursor: pointer; align-self: flex-start; }

/* Room cards with a photo on top */
.room-card { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.room-card:hover, .room-card:focus-visible { border-color: var(--navy); box-shadow: 0 6px 24px rgba(0, 40, 85, .12); }
.room-card .photo-frame img { transition: transform .4s ease; }
.room-card:hover .photo-frame img { transform: scale(1.04); }
.room-card__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); flex: 1; }
.room-card__seats { position: absolute; left: var(--space-3); bottom: var(--space-3); background: rgba(255, 255, 255, .92); color: var(--navy); font-size: 13px; font-weight: 600; padding: 4px 10px; }
.room-card .arrow-link { margin-top: auto; }

/* Booking page: photo beside the room name */
.page-head--photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: var(--space-8); align-items: center; }
.page-head--photo .photo-frame { border: 1px solid var(--line); }
@media (max-width: 860px) { .page-head--photo { grid-template-columns: 1fr; } .page-head--photo .photo-frame { order: -1; } }

/* Staff space list thumbnails */
.space-thumb { width: 64px; aspect-ratio: 3 / 2; object-fit: cover; display: block; border: 1px solid var(--line-soft); }
.space-thumb--none { background: var(--surface-tint); }
.hero--photo { background-image: linear-gradient(90deg, rgba(0, 40, 85, .94) 0%, rgba(0, 40, 85, .8) 45%, rgba(0, 40, 85, .25) 100%), var(--hero-photo); background-size: cover; background-position: center; }
@media (max-width: 700px) { .hero--photo { background-image: linear-gradient(rgba(0, 40, 85, .82), rgba(0, 40, 85, .88)), var(--hero-photo); } }
.photo-field label.photo-field__pick { display: inline-flex; align-items: center; width: auto; min-height: 44px; padding: 10px 20px; margin: 0; font-size: 15px; font-weight: 600; color: var(--navy); border: 1px solid var(--navy); background: #fff; }
.photo-field label.photo-field__pick:hover { background: var(--beige); }
.photo-field .stack { flex: 1 1 220px; }

/* Confirmation dialog (cancelling a paid booking) */
dialog.confirm { width: min(480px, calc(100vw - 32px)); padding: var(--space-8); border: 0; border-top: 4px solid var(--light-blue); background: #fff; color: var(--ink); box-shadow: 0 24px 64px rgba(0, 20, 45, .35); }
dialog.confirm::backdrop { background: rgba(0, 28, 60, .55); }
dialog.confirm .subtitle { margin: 0 0 var(--space-4); }
.confirm__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-6); }
.btn--danger { color: #9b2c1f; border-color: #9b2c1f; }
.btn--danger:hover { background: #fbeceb; }

/* Staff room schedule (Event Calendar themed with Flare tokens: square corners, navy, beige) */
.sched__bar { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.sched__bar .seg, .sched .seg { display: inline-flex; }
.sched .seg button { font: inherit; font-size: 14px; min-height: 40px; padding: 6px 16px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; margin-left: -1px; }
.sched .seg button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); position: relative; }
.sched__nav { display: flex; align-items: center; gap: var(--space-2); }
.sched__nav button { font: inherit; font-size: 14px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; }
.sched__nav button:hover, .sched .seg button:hover:not([aria-pressed="true"]) { background: var(--beige); }
.sched__nav .sched__icon { width: 40px; padding: 0; font-size: 20px; }
.sched__nav strong { min-width: 190px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink-heading); }
.sched__closed { font-size: 14px; }
.sched__legend { margin: 0 0 var(--space-4); }
.sched__main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-6); align-items: start; }
@media (max-width: 1100px) { .sched__main { grid-template-columns: minmax(0, 1fr); } }
.sched__cal { background: #fff; border: 1px solid var(--line); padding: var(--space-2); overflow-x: auto; min-width: 0; }
.sched__cal [data-calendar] { min-width: 640px; }
.sched__panel { position: sticky; top: var(--space-6); }
.sched__panel .facts { margin-bottom: var(--space-4); }
.sched__panel .field { margin-bottom: var(--space-3); }
.sched__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.sched__toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; max-width: min(460px, calc(100vw - 32px)); background: var(--navy); color: #fff; padding: 12px 18px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 20, 45, .3); }
.sched__toast.is-bad { background: #8a2a1c; }
.sched .ec { --ec-bg-color: #fff; --ec-border-color: var(--line-soft); --ec-text-color: var(--ink); --ec-today-bg-color: transparent; --ec-highlight-color: rgba(33, 185, 232, .18); --ec-now-indicator-color: var(--copper); font-size: 13px; font-variant-numeric: tabular-nums; }
.sched .ec-header .ec-resource, .sched .ec-header .ec-day { font-weight: 600; color: var(--ink-heading); }
.sched .ec-time { color: var(--ink-muted); font-size: 12px; }
.sched .ec-event { border-radius: 0 !important; box-shadow: none !important; border-left: 4px solid; padding: 3px 6px; cursor: pointer; }
.sched .ec-event.is-selected { outline: 2px solid var(--light-blue); outline-offset: 1px; z-index: 5; }
.ev { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; overflow: hidden; }
.ev b { font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { font-size: 11px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev__auto { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 0 4px; border: 1px solid currentColor; }
/* statuses — events and legend swatches */
.sched .ec-event.s-requested, .sw-requested { background: var(--wheat) !important; border-color: var(--copper) !important; color: var(--black) !important; }
.sched .ec-event.s-awaiting_payment, .sw-awaiting_payment { background: #fff !important; border: 1px dashed var(--navy) !important; border-left: 4px dashed var(--navy) !important; color: var(--navy) !important; opacity: .7; }
.sched .ec-event.s-approved, .sw-approved { background: var(--navy) !important; border-color: var(--light-blue) !important; color: #fff !important; }
.sched .ec-event.s-completed, .sw-completed { background: #e3f1e7 !important; border-color: #2e7d4f !important; color: #173d27 !important; }
.sched .ec-event.s-blocked, .sw-blocked { background: repeating-linear-gradient(45deg, #ecebe7 0 6px, #f7f6f3 6px 12px) !important; border-color: #8a8579 !important; color: #55524b !important; }
.sched .ec-event.s-cancelled, .sched .ec-event.s-declined, .sw-cancelled, .sw-declined { background: #f4f3f0 !important; border-color: #c9c5bd !important; color: #8a8579 !important; text-decoration: line-through; }
.sched-badge { border: 1px solid; }
.sched-badge.sw-awaiting_payment { opacity: 1; }

/* ---- Public information pages: About, Contact, Prices, Terms, Privacy --- */
.info { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 240px); gap: var(--space-12); align-items: start; margin-top: var(--space-8); }
.info__body { font-size: 17px; line-height: 28px; }
.info__body > * + * { margin-top: var(--space-4); }
.info__body h2 { font-size: 26px; line-height: 32px; margin-top: var(--space-12); scroll-margin-top: var(--space-6); }
.info__body ul, .info__body ol { padding-inline-start: 22px; }
.info__body li + li { margin-top: var(--space-2); }
.info__body .table-wrap { margin-top: var(--space-4); }
.info__body .table { min-width: 560px; }
.info__nav { position: sticky; top: var(--space-6); border-top: 1px solid var(--navy); padding-top: var(--space-4); }
.info__nav ul { list-style: none; margin: var(--space-2) 0 0; padding: 0; }
.info__nav li + li { margin-top: var(--space-2); }
.info__nav a { color: var(--ink); text-decoration: none; }
.info__nav a:hover { text-decoration: underline; text-decoration-color: var(--rule-accent); }
.info__nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }
.toc { background: var(--beige); padding: var(--space-4) var(--space-6); }
.toc ol { margin: 0; columns: 2; column-gap: var(--space-8); font-size: 15px; line-height: 24px; }
.toc a { color: var(--navy); }
.info__body .facts { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); border-top: 1px solid var(--navy); margin: var(--space-4) 0 0; }
.info__body .facts dt, .info__body .facts dd { margin: 0; padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: 1px solid var(--line-soft); }
.info__body .facts dt { color: var(--ink-muted); }
.info__body .facts .sub { display: block; font-size: 14px; color: var(--ink-muted); }
@media (max-width: 860px) {
  .info { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .info__nav { position: static; }
  .toc ol { columns: 1; }
  .info__body .facts { grid-template-columns: minmax(0, 1fr); }
  .info__body .facts dt { border-bottom: 0; padding-bottom: 0; }
}

/* Footer links + cookie line (every layout) */
.legal-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: 14px; }
.legal-links a { color: inherit; }
.legal-note { margin: var(--space-2) 0 0; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.legal-note a { color: inherit; }
.public-foot__legal { flex-basis: 100%; }
.auth__form { flex-direction: column; }
.auth__legal { width: 100%; max-width: 420px; margin-top: var(--space-12); color: var(--ink-muted); }
.sidebar__legal { margin-top: var(--space-4); color: var(--ink-muted); }
.sidebar__legal .legal-links { font-size: 13px; gap: var(--space-1) var(--space-3); }
.sidebar__legal .legal-note { font-size: 12px; line-height: 16px; }
.table--prices td.num { white-space: nowrap; }
.info__body .facts .sub[dir="rtl"] { text-align: start; unicode-bidi: plaintext; }
[dir="rtl"] .info__body .facts .sub[dir="ltr"] { text-align: right; }
/* Phone numbers and email addresses keep their left-to-right order inside Arabic text */
a[href^="tel:"], a[href^="mailto:"], .ltr { direction: ltr; unicode-bidi: isolate; }

/* Long email addresses and links wrap instead of spilling out of narrow columns */
.facts dd { overflow-wrap: anywhere; min-width: 0; }

/* Day pass: pick several days (checkbox chips), people, total */
.daypass__days { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.daypass__day { position: relative; }
.daypass__day:has(input:checked) { background: var(--navy); border-color: var(--navy); color: #fff; }
.daypass__day:has(input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 2px; }
.daypass__day.is-full { cursor: not-allowed; color: var(--ink-muted); background: var(--line-soft); border-color: transparent; }
.daypass__people select { min-width: 120px; }
.daypass__rules { margin: var(--space-6) 0 0; padding-inline-start: 18px; display: grid; gap: var(--space-1); }
.daypass__unpaid-panel { margin-bottom: var(--space-8); }
.daypass__unpaid + .daypass__unpaid { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line-soft); }
.daypass__mine { margin-top: var(--space-12); }
.daypass__mine h2 { margin-bottom: var(--space-4); }
/* Day boxes: an even grid; on phones short day names ("Wed") so nothing spills out of its box. */
.daypass__days { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.daypass__day { min-width: 0; text-align: center; }
.daypass__day > * { max-width: 100%; overflow-wrap: anywhere; }
.daypass__day .day-short { display: none; }
@media (max-width: 700px) {
  .daypass__days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .daypass__days .chip--day { min-width: 0; padding: 8px 4px; }
  .daypass__day .day-long { display: none; }
  .daypass__day .day-short { display: inline; }
}
@media (max-width: 340px) { .daypass__days { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.daypass-staff__nav { margin: var(--space-8) 0 var(--space-4); }
.daypass-staff__nav h2 { font-size: 24px; line-height: 30px; }
.daypass__day:has(input:checked):hover { background: var(--navy); border-color: var(--navy); color: #fff; }
[dir="rtl"] .picker__summary[dir="ltr"] { text-align: right; }
bdi[dir="ltr"] { white-space: nowrap; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Read-only form values (e.g. "Requested by" on the member request form). */
.field input:disabled { background: var(--line-soft); color: var(--ink-muted); border-color: transparent; cursor: not-allowed; }
