/* ==========================================================================
   Citizen Global Transport — corporate design system
   Palette: "Police Strobe" blue (primary, #0BB5FF -- the exact swatch picked
   25 Aug 2026, matching the mobile app's BrandColors) + Ferrari red (accent)
   on a cool neutral ground.
   Built for dense operational data: tabular figures, quiet chrome, strong hierarchy.
   ========================================================================== */

:root {
  /* Brand */
  /* Cyan ramp. The variable names still read "teal" because every screen in
     the app references them; only the values changed (25 Aug 2026: re-based
     on Police Strobe -- 500 is the exact swatch, 700/900 are shared 1:1 with
     the mobile app's blue700/blueDeep so web and mobile read as one brand). */
  --teal-50:  #F0FBFF;
  --teal-100: #DDF5FF;
  --teal-200: #B1E7FF;
  --teal-300: #6DD3FF;
  --teal-500: #0BB5FF;
  --teal-600: #0991CC;
  --teal-700: #0777A8;
  --teal-800: #05577A;
  --teal-900: #043A52;

  --red:      #E30613;
  --red-dark: #B00410;
  --red-50:   #FDECEE;
  --red-100:  #FAD4D8;

  /* Neutrals */
  --ink:    #16232B;
  --ink-2:  #45575F;
  --muted:  #78888F;
  --line:   #E1E9EC;
  --line-2: #EDF2F4;
  --bg:     #F5F9FA;
  --card:   #FFFFFF;
  --sunken: #F0F5F7;

  /* Status */
  --ok: #14855C; --ok-bg: #E4F6EE;
  --warn: #B87503; --warn-bg: #FFF5E0;
  --bad: #C40410; --bad-bg: #FDECEE;
  --info: #0777A8; --info-bg: #E6F3F6;

  /* Form */
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(6, 64, 79, .06);
  --shadow: 0 2px 8px rgba(6, 64, 79, .07), 0 1px 2px rgba(6, 64, 79, .05);
  --shadow-lg: 0 12px 32px rgba(6, 64, 79, .12);
  --sidebar-w: 244px;
  --font: 'Inter', 'Segoe UI', Roboto, -apple-system, Arial, sans-serif;
  --font-ar: 'Cairo', 'Tajawal', 'Noto Kufi Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv05' 1, 'ss01' 1;
}
[dir="rtl"] body { font-family: var(--font-ar); }

a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-900); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; } h4 { font-size: .92rem; }
p { margin: 0 0 1rem; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
::selection { background: var(--teal-200); }
:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; border-radius: 4px; }

/* Numbers line up in columns — essential for money and VAT */
.money, .num, td.num, th.num, .stat .value, .doc-totals td, .data-table td.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
.money { white-space: nowrap; }

/* ============================== App shell ============================== */

.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  /* Lighter cyan glass panel, not a near-black navy block — a soft diagonal
     sheen (::before) reads as light catching a glass surface, and a slow
     drifting shimmer (::after) gives a subtle "water" feel. Both overlays
     sit at low opacity and are pinned behind the real content (z-index: 0
     vs. 1) so legibility never suffers for the effect. */
  background: linear-gradient(165deg, var(--teal-600) 0%, var(--teal-800) 55%, var(--teal-900) 100%);
  color: #fff;
  padding: 16px 12px 24px;
  position: sticky; top: 0;
  height: 100vh; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  isolation: isolate;
}
.sidebar::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(140% 60% at 8% -10%, rgba(255,255,255,.30) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(115deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,0) 22%, rgba(255,255,255,0) 62%, rgba(255,255,255,.10) 80%, rgba(255,255,255,0) 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.sidebar::after {
  content: '';
  position: absolute; left: -20%; right: -20%; bottom: 0; z-index: 0;
  height: 60%;
  background: repeating-linear-gradient(122deg, rgba(255,255,255,.05) 0 2px, transparent 2px 30px);
  opacity: .6;
  animation: sidebarShimmer 16s linear infinite;
  pointer-events: none;
}
@keyframes sidebarShimmer {
  from { transform: translateX(0); }
  to   { transform: translateX(60px); }
}
.sidebar > * { position: relative; z-index: 1; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }
.sidebar .brand {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 8px 16px; margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.sidebar .brand img { width: 38px; height: 38px; border-radius: 9px; background: #fff; padding: 3px; flex: none; }
.sidebar .brand b { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: .2px; }
.sidebar .brand small { display: block; font-size: 9.5px; opacity: .72; letter-spacing: 1.3px; text-transform: uppercase; margin-top: 1px; }
.sidebar .section {
  font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  opacity: .55; font-weight: 600; margin: 16px 10px 5px;
}
/* Collapsible sidebar groups (built by app.js from the flat .section list) */
.sidebar .nav-group { margin-top: 8px; }
.sidebar .nav-group-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: 0; cursor: pointer; color: #fff;
  font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  opacity: .55; font-weight: 600; padding: 8px 10px 5px; font-family: inherit;
  transition: opacity .12s;
}
.sidebar .nav-group-head:hover { opacity: .9; }
.sidebar .nav-group-arrow { font-size: 9px; transition: transform .15s; }
.sidebar .nav-group.collapsed .nav-group-arrow { transform: rotate(-90deg); }
[dir="rtl"] .sidebar .nav-group.collapsed .nav-group-arrow { transform: rotate(90deg); }
.sidebar .nav-group-body { overflow: hidden; }
.sidebar .nav-group.collapsed .nav-group-body { display: none; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  color: #fff; padding: 8px 11px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; opacity: .88;
  transition: background .12s, opacity .12s;
}
.sidebar nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; opacity: 1; }
.sidebar nav a.active { background: rgba(255,255,255,.16); opacity: 1; font-weight: 600; box-shadow: inset 3px 0 0 var(--teal-500); }
[dir="rtl"] .sidebar nav a.active { box-shadow: inset -3px 0 0 var(--teal-500); }
.sidebar nav a .ico { width: 17px; text-align: center; font-size: 14px; flex: none; opacity: .9; }
.sidebar nav a .count {
  margin-inline-start: auto; background: var(--red); color: #fff;
  border-radius: 20px; padding: 1px 7px; font-size: 11px; font-weight: 700;
}

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 24px; background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar strong { font-size: 15px; font-weight: 650; }
.topbar .who { font-size: 12.5px; color: var(--muted); text-align: end; line-height: 1.4; }
.topbar .who b { color: var(--ink); font-weight: 600; display: block; font-size: 13px; }
.content { padding: 22px 24px 56px; flex: 1; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1, .page-head h2 { margin-bottom: 2px; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 10px; }

/* ============================== Public site ============================== */

.pub-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.pub-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; }
.pub-header nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pub-header nav a { margin-inline-start: 14px; font-weight: 550; color: var(--ink-2); font-size: 14px; }
.pub-header nav a:hover { color: var(--teal-700); text-decoration: none; }
.pub-header nav a.btn { color: #fff; margin-inline-start: 18px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--teal-50) 0%, #fff 62%);
  padding: 76px 0 64px; border-bottom: 1px solid var(--line);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(46,196,182,.22) 0%, rgba(46,196,182,0) 70%);
}
.hero::before { width: 520px; height: 520px; top: -220px; inset-inline-end: -140px; }
.hero::after { width: 360px; height: 360px; bottom: -200px; inset-inline-end: 18%; background: radial-gradient(circle, rgba(227,6,19,.10) 0%, rgba(227,6,19,0) 70%); }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); max-width: 800px; letter-spacing: -.02em; line-height: 1.15; }
.hero .tag { color: var(--red); font-weight: 700; letter-spacing: 3px; text-transform: uppercase; font-size: 11.5px; margin-bottom: 12px; }
.hero p.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 660px; }

/* ============================== How it works ============================== */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 23px; inset-inline-start: 12.5%; inset-inline-end: 12.5%;
  height: 2px; background: repeating-linear-gradient(90deg, var(--teal-200) 0 8px, transparent 8px 14px); z-index: 0;
}
.step { position: relative; z-index: 1; text-align: center; }
.step .num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--teal-700); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px;
  margin: 0 auto 14px; box-shadow: 0 0 0 6px #fff;
}
.step h3 { font-size: 15px; margin-bottom: 5px; }
.step p { font-size: 13.5px; color: var(--muted); margin: 0; }

/* ============================== Merit / benefit cards ============================== */

.merit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.merit {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; display: flex; gap: 14px; align-items: flex-start;
}
.merit .ico {
  width: 44px; height: 44px; border-radius: 12px; background: var(--teal-50); color: var(--teal-700);
  display: flex; align-items: center; justify-content: center; font-size: 21px; flex: none;
}
.merit h3 { font-size: 14.5px; margin-bottom: 4px; }
.merit p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ============================== App download band ============================== */

.app-band {
  background: linear-gradient(135deg, var(--teal-900), var(--teal-700)); color: #fff;
  border-radius: var(--radius-lg); padding: 36px 40px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.app-band h2 { color: #fff; margin-bottom: 6px; }
.app-band p { opacity: .9; max-width: 480px; margin: 0; }
.store-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.store-badge {
  display: flex; align-items: center; gap: 9px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px; padding: 9px 16px; color: #fff; font-weight: 600; font-size: 13px;
}
.store-badge:hover { background: rgba(0,0,0,.4); color: #fff; text-decoration: none; }
.store-badge .glyph { font-size: 19px; }
.store-badge small { display: block; font-weight: 400; opacity: .8; font-size: 10.5px; }

.pub-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 30px 0; margin-top: 56px; background: #fff; }
.pub-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 36px; justify-content: space-between; }
.pub-footer a { color: var(--ink-2); }

@media (max-width: 860px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
  .steps::before { display: none; }
  .merit-grid { grid-template-columns: 1fr; }
  .app-band { padding: 28px 24px; }
}

/* ============================== Cards & grids ============================== */

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 18px 20px; margin-bottom: 16px;
}
.card.tight { padding: 13px 15px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card.flush .table-wrap { margin: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-accent { border-top: 3px solid var(--teal-500); }
.card-accent-red { border-top: 3px solid var(--red); }

.grid { display: grid; gap: 16px; }
.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-sidebar { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }

.stat { display: flex; flex-direction: column; gap: 3px; }
.stat .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.1px; font-weight: 650; }
.stat .value { font-size: 1.75rem; font-weight: 700; color: var(--teal-800); letter-spacing: -.02em; line-height: 1.15; }
.stat .value.sm { font-size: 1.3rem; }
.stat .hint { font-size: 12.5px; color: var(--ink-2); }
.stat.red .value { color: var(--red); }
.stat.ok .value { color: var(--ok); }
.stat.muted-stat .value { color: var(--ink-2); }
.trend-up { color: var(--ok); font-weight: 600; }
.trend-down { color: var(--red); font-weight: 600; }

/* ============================== Buttons ============================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; background: var(--teal-700); color: #fff;
  padding: 8px 15px; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .13s, border-color .13s, box-shadow .13s, transform .05s;
}
.btn:hover { background: var(--teal-800); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); } .btn-red:hover { background: var(--red-dark); }
.btn-light { background: #fff; color: var(--teal-700); border-color: var(--teal-200); }
.btn-light:hover { background: var(--teal-50); color: var(--teal-800); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }
.btn-danger { background: #fff; color: var(--red); border-color: var(--red-100); }
.btn-danger:hover { background: var(--red-50); color: var(--red-dark); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 11px 22px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ============================== Forms ============================== */

.form-row { margin-bottom: 14px; }
.form-row:last-child { margin-bottom: 0; }
label { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 5px; letter-spacing: .01em; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=time], input[type=tel], input[type=search], input[type=url],
input[type=file], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
  font: inherit; font-size: 14px; background: #fff; color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
input[type=number], input.money-input { font-variant-numeric: tabular-nums; text-align: end; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--teal-200); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-100);
}
input:disabled, select:disabled, textarea:disabled { background: var(--sunken); color: var(--muted); cursor: not-allowed; }
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
select {
  appearance: none;
  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 fill='%2378888F' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-inline-end: 30px;
}
[dir="rtl"] select { background-position: left 11px center; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.field-error { color: var(--red); font-size: 12px; margin-top: 4px; font-weight: 550; }
input.has-error, select.has-error, textarea.has-error { border-color: var(--red); }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; font-size: 13.5px; color: var(--ink); }
.check input { width: auto; margin-top: 3px; flex: none; accent-color: var(--teal-700); }
.inline-form { display: inline; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
legend { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--teal-700); font-weight: 700; padding: 0 6px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span {
  display: flex; align-items: center; padding: 0 11px; background: var(--sunken);
  border: 1px solid var(--line); border-inline-end: 0; border-radius: 9px 0 0 9px;
  font-size: 12.5px; color: var(--muted); font-weight: 650;
}
.input-prefix input { border-radius: 0 9px 9px 0; }
[dir="rtl"] .input-prefix span { border-radius: 0 9px 9px 0; }
[dir="rtl"] .input-prefix input { border-radius: 9px 0 0 9px; }

/* ============================== Tables ============================== */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: start; padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-2);
  background: var(--sunken); font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--line);
}
tbody tr:hover td { background: #FAFCFD; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: end; }
td.tight, th.tight { width: 1%; white-space: nowrap; }

.data-table tbody tr td:first-child { font-weight: 600; }
.data-table tbody tr.is-total td { background: var(--teal-50); font-weight: 700; border-top: 2px solid var(--teal-200); }
.data-table tbody tr.is-muted td { color: var(--muted); }

/* Company drill-down row on the super-admin Users page: a company's admin row(s) are
   shown by default, with its other team members tucked behind a native <details> toggle
   so the page stays scannable at a glance and still works with JavaScript disabled. */
.org-drilldown-row td { border-bottom: 1px solid var(--line-2); background: var(--sunken); }
.org-drilldown-row details { padding: 2px 12px; }
.org-drilldown-row summary {
  cursor: pointer; padding: 8px 0; font-weight: 600; color: var(--teal-700);
  list-style: none; display: flex; align-items: center; gap: 6px;
}
.org-drilldown-row summary::-webkit-details-marker { display: none; }
.org-drilldown-row summary::before { content: '▸'; font-size: 11px; transition: transform .15s ease; }
.org-drilldown-row details[open] summary::before { transform: rotate(90deg); }
.org-drilldown-row summary:hover { color: var(--teal-900); }
.table-sub { margin: 0 0 10px; background: var(--card); border-radius: 8px; overflow: hidden; }
.table-sub th, .table-sub td { padding: 7px 10px; font-size: 12.5px; }
.table-sticky thead th { position: sticky; top: 0; z-index: 2; }

.empty-state { text-align: center; color: var(--muted); padding: 36px 18px; }
.empty-state b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; font-weight: 650; }
.empty-state .btn { margin-top: 12px; }

.pager { display: flex; gap: 5px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.pager a, .pager span {
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 12.5px; color: var(--ink-2); background: #fff;
}
.pager a:hover { background: var(--teal-50); border-color: var(--teal-200); text-decoration: none; }
.pager span.cur { background: var(--teal-700); color: #fff; border-color: var(--teal-700); font-weight: 650; }
.pager .info { border: 0; background: transparent; color: var(--muted); margin-inline-start: auto; }

/* ============================== Badges, alerts, pills ============================== */

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 650; text-transform: capitalize; white-space: nowrap;
  border: 1px solid transparent; letter-spacing: .01em;
}
.badge-ok    { background: var(--ok-bg);   color: var(--ok);   border-color: #C5E6EC; }
.badge-warn  { background: var(--warn-bg); color: var(--warn); border-color: #F7E3B4; }
.badge-bad   { background: var(--bad-bg);  color: var(--bad);  border-color: var(--red-100); }
.badge-info  { background: var(--info-bg); color: var(--info); border-color: var(--teal-200); }
.badge-muted { background: #EEF2F3;        color: var(--ink-2); border-color: var(--line); }

.alert { padding: 11px 15px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; font-size: 13.5px; }
.alert b { font-weight: 650; }
.alert-success { background: var(--ok-bg);   border-color: #BCE3EA; color: #0B5D6E; }
.alert-error   { background: var(--bad-bg);  border-color: #F5B5BA; color: var(--red-dark); }
.alert-info    { background: var(--info-bg); border-color: var(--teal-200); color: var(--teal-900); }
.alert-warn    { background: var(--warn-bg); border-color: #F6DFA8; color: #7A5200; }

.pill-row { display: flex; gap: 7px; flex-wrap: wrap; }
.pill {
  background: var(--teal-50); color: var(--teal-900); padding: 5px 11px;
  border-radius: 20px; font-size: 12.5px; border: 1px solid var(--teal-100); font-weight: 550;
}
.pill.active { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }

.kv { display: grid; grid-template-columns: 170px 1fr; gap: 7px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 550; }
.kv dd { margin: 0; color: var(--ink); }

.toolbar {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end;
  margin-bottom: 14px; padding: 13px 15px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.toolbar .form-row { margin: 0; min-width: 150px; }
.toolbar .form-row.grow { flex: 1; min-width: 200px; }
.toolbar label { font-size: 11px; margin-bottom: 3px; }

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a, .tabs button {
  padding: 8px 15px; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer;
}
.tabs a:hover, .tabs button:hover { color: var(--teal-700); text-decoration: none; }
.tabs a.active, .tabs button.active { color: var(--teal-700); border-bottom-color: var(--teal-700); }

/* ============================== Auth ============================== */

.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(140deg, var(--teal-900) 0%, var(--teal-700) 40%, var(--teal-500) 100%);
}
.auth-card {
  width: 100%; max-width: 428px; background: #fff;
  border-radius: 18px; box-shadow: var(--shadow-lg); padding: 32px 30px;
}
.auth-card .logo { display: block; margin: 0 auto 20px; max-width: 300px; }
.auth-card h1 { text-align: center; font-size: 1.22rem; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.role-tabs { display: flex; gap: 7px; margin-bottom: 16px; }
.role-tabs label {
  flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 6px; cursor: pointer; font-weight: 600; font-size: 13px; margin: 0;
  color: var(--ink-2); transition: .12s;
}
.role-tabs input { display: none; }
.role-tabs label:has(input:checked) { border-color: var(--teal-500); background: var(--teal-50); color: var(--teal-800); box-shadow: 0 0 0 2px var(--teal-100); }

.check.disabled { opacity: .55; cursor: not-allowed; }
.check.disabled input { cursor: not-allowed; }
.legal-links { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.legal-links button { background: none; border: 1px solid var(--teal-300); color: var(--teal-800); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.legal-links button:hover { background: var(--teal-50); }
.legal-links button.viewed { border-color: var(--teal-600); background: var(--teal-50); }
.legal-links button.viewed::after { content: ' ✓'; }

/* Native <dialog> used for the register page's forced terms / privacy read-before-agree flow. */
dialog.legal-dialog {
  width: min(720px, 92vw); max-height: 82vh; padding: 0; border: 0; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); color: var(--ink);
}
dialog.legal-dialog::backdrop { background: rgba(9, 30, 38, .55); }
.legal-dialog-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--line);
}
.legal-dialog-head h2 { font-size: 1rem; margin: 0; }
.legal-dialog-body { max-height: calc(82vh - 54px); overflow-y: auto; }
.legal-dialog-body section.wrap { padding: 20px 24px 30px; max-width: none; }

/* ============================== Map ============================== */

.map { width: 100%; height: 560px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--sunken); overflow: hidden; }
.map.small { height: 300px; }
.map.tall { height: calc(100vh - 190px); min-height: 420px; }
/* Free-map (Leaflet) vehicle-arrow marker: strip the library's default white pin-box
   background so only our own rotated SVG pointer shows (see window.cgtMap in app.js).
   Doubled class beats leaflet.css's .leaflet-div-icon rule on specificity regardless of
   which stylesheet loads second. */
.leaflet-div-icon.cgt-map-arrow { background: transparent; border: none; }
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 9px; }
.map-legend span::before {
  content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-inline-end: 6px; background: var(--teal-500); vertical-align: middle;
}
.map-legend span.red::before { background: var(--red); }
.map-legend span.grey::before { background: #9AA5AB; }
.map-legend span.amber::before { background: var(--warn); }

/* ============================== Misc components ============================== */

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.right { text-align: end; } .center { text-align: center; }
.mt { margin-top: 14px; } .mb-0 { margin-bottom: 0; } .mt-0 { margin-top: 0; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 700; }
.divider { border-top: 1px solid var(--line); margin: 16px 0; }

.signature-pad {
  border: 1px dashed var(--teal-300); border-radius: var(--radius);
  background: #fff; touch-action: none; width: 100%; height: 176px; display: block;
}
.feature { display: flex; gap: 14px; }
.feature .ico {
  font-size: 22px; width: 44px; height: 44px; border-radius: 12px;
  background: var(--teal-50); color: var(--teal-700);
  display: grid; place-items: center; flex: none; border: 1px solid var(--teal-100);
}
.feature h3 { margin-bottom: 3px; }
.vehicle-card { display: flex; gap: 13px; align-items: center; }
.vehicle-card .cap { font-size: 1.35rem; font-weight: 700; color: var(--teal-700); min-width: 62px; text-align: center; }
.vehicle-card .cap small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .8px; }

.sev-critical { color: var(--red); font-weight: 700; }
.sev-high { color: var(--red); font-weight: 600; }
.sev-medium { color: var(--warn); font-weight: 600; }
.sev-low { color: var(--ink-2); }
.sev-info { color: var(--muted); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-inline-start: 2px solid var(--line); margin-inline-start: 5px; }
[dir="rtl"] .timeline li { padding: 0 22px 14px 0; }
.timeline li::before {
  content: ''; position: absolute; inset-inline-start: -7px; top: 3px;
  width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--teal-300);
}
.timeline li.done::before { background: var(--teal-600); border-color: var(--teal-600); }
.timeline li:last-child { border-inline-start-color: transparent; }
.timeline .when { font-size: 11.5px; color: var(--muted); }

.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.chart-bars .bar { flex: 1; background: var(--teal-500); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.chart-bars .bar.accent { background: var(--red); }
.chart-bars .bar span { position: absolute; bottom: -19px; inset-inline-start: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); }

.print-only { display: none; }

/* ============================== Documents (contracts, invoices, statements) ============ */

.doc {
  background: #fff; padding: 34px 40px; max-width: 900px; margin: 0 auto;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  font-size: 14px; line-height: 1.7; color: var(--ink);
}
.doc .doc-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  border-bottom: 3px solid var(--teal-700); padding-bottom: 14px; margin-bottom: 22px;
}
.doc .doc-head img { height: 50px; }
.doc h1 { font-size: 1.3rem; color: var(--teal-900); }
.doc.ar, .doc[dir="rtl"] { direction: rtl; text-align: right; font-family: var(--font-ar); }
.doc .sign-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 34px; }
.doc .sign-box { border-top: 1px solid var(--ink); padding-top: 8px; font-size: 12.5px; }
.doc .sign-box img { max-height: 68px; display: block; }
.doc-toolbar { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; margin: 14px 0 22px; }
.doc-body h3 { margin-top: 20px; color: var(--teal-800); font-size: 1rem; }

/* Invoice / credit note / settlement */
.invoice-doc { max-width: 920px; }
.invoice-doc .doc-title { text-align: end; }
[dir="rtl"] .invoice-doc .doc-title { text-align: start; }
.invoice-doc .doc-title h1 { margin-bottom: 2px; }
.invoice-doc .doc-number { color: var(--muted); font-size: 12.5px; letter-spacing: 1.1px; font-weight: 650; }

.doc-parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.doc-parties .party {
  background: var(--teal-50); border: 1px solid var(--teal-100);
  border-radius: var(--radius); padding: 12px 14px; font-size: 13px; line-height: 1.6;
}
.doc-parties .party h3 {
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--teal-700); margin-bottom: 6px; font-weight: 700;
}
.doc-parties .party .trn { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.doc-meta { background: #fff !important; border-color: var(--line) !important; }
.doc-meta div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.doc-meta span { color: var(--muted); }
.doc-meta b { font-variant-numeric: tabular-nums; }

.doc-table { margin-bottom: 18px; font-size: 13px; }
.doc-table th { background: var(--teal-50); color: var(--teal-800); }
.doc-table td, .doc-table th { border-bottom: 1px solid var(--line); }
.doc-table.compact { font-size: 12.5px; }
.doc-table.compact th, .doc-table.compact td { padding: 6px 9px; }
.doc-table tbody tr:hover td { background: transparent; }

.doc-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 22px; align-items: start; margin-bottom: 14px; }
.doc-summary h3 { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.doc-totals table { font-size: 13.5px; }
.doc-totals td { padding: 7px 11px; border-bottom: 1px solid var(--line-2); }
.doc-totals td:last-child { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-totals tr.grand td {
  font-size: 1.02rem; font-weight: 700; color: var(--teal-900);
  border-top: 2px solid var(--teal-700); border-bottom: 2px solid var(--teal-700); background: var(--teal-50);
}
.doc-totals tr.strong td { font-weight: 700; }
.commission-box { border: 1px solid var(--teal-200); border-radius: var(--radius); overflow: hidden; margin-top: 12px; }
.commission-box tr.strong td { font-weight: 700; color: var(--teal-900); background: var(--teal-50); }

.doc-words { font-size: 12.5px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 10px; }
.doc-words span { color: var(--muted); text-transform: uppercase; font-size: 10.5px; letter-spacing: 1.2px; font-weight: 700; }
.doc-alert { background: var(--warn-bg); border: 1px solid #F6DFA8; color: #7A5200; border-radius: 9px; padding: 10px 14px; font-size: 12.5px; }
.doc-note { background: var(--sunken); border-radius: 9px; padding: 10px 14px; font-size: 12.5px; color: var(--ink-2); }
.doc-bank { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 12.5px; margin-bottom: 14px; }
.doc-bank h3 { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.doc-footer { border-top: 2px solid var(--teal-700); margin-top: 20px; padding-top: 10px; font-size: 11.5px; color: var(--ink-2); text-align: center; }
.doc-footer .small { font-size: 10.5px; }

/* VAT return boxes */
.vat-box-table td:first-child { width: 54px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.vat-box-table tr.is-total td { background: var(--teal-50); font-weight: 700; }
.vat-net { background: var(--teal-900); color: #fff; border-radius: var(--radius-lg); padding: 18px 22px; }
.vat-net .label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; opacity: .8; font-weight: 650; }
.vat-net .value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vat-net .hint { font-size: 12.5px; opacity: .85; }

/* ============================== Print ============================== */

@media print {
  body { background: #fff; font-size: 11.5pt; }
  .sidebar, .topbar, .toolbar, .doc-toolbar, .no-print, .btn, .pub-header, .pub-footer, .pager, .tabs { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
  .card, .doc { border: 0; box-shadow: none; padding: 0; margin: 0; max-width: none; border-radius: 0; }
  .print-only { display: block; }
  .doc-parties .party, .doc-table th, .doc-totals tr.grand td, .commission-box tr.strong td {
    background: #F3F7F8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .doc-head, .doc-footer { border-color: #0777A8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table { page-break-inside: auto; } tr { page-break-inside: avoid; }
  thead { display: table-header-group; }
  a { text-decoration: none; color: inherit; }
  @page { margin: 15mm; }
}

/* ============================== Responsive ============================== */

/* Base state: hidden on desktop, where the sidebar sits in the grid layout
   permanently. Must stay BEFORE the max-width media queries below -- this
   is an unscoped rule, and CSS resolves equal-specificity conflicts by
   source order, so placing it after the 960px query (which sets
   `display: inline-flex` to reveal the button on narrow viewports) would
   silently cancel that override and hide the only way to open the sidebar
   on mobile. That regression shipped once already; keep this comment so it
   does not happen again. */
.menu-btn { display: none; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    transform: translateX(-100%); transition: transform .2s ease; z-index: 60; box-shadow: var(--shadow-lg);
  }
  [dir="rtl"] .sidebar { inset: 0 0 0 auto; transform: translateX(100%); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
  .doc { padding: 22px 20px; }
  .doc-parties, .doc-foot { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .doc .sign-row { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: stretch; }
  .topbar .who { display: none; }
  .stat .value { font-size: 1.5rem; }
}

/* Touch targets: (pointer: coarse) is deliberately not a width breakpoint -- it targets
   any touch-primary device (a phone, a tablet, a workshop kiosk touchscreen) regardless of
   screen size, since the desktop .btn/input sizing above (~34px tall) is comfortable for a
   mouse but tight for a finger. 44px matches Apple's Human Interface Guidelines minimum and
   sits just above Android's 48dp Material guideline once converted; nothing here changes
   layout, only tap-area, so desktop and narrow-but-mouse-driven views are unaffected. */
@media (pointer: coarse) {
  .btn { min-height: 44px; padding-block: 11px; }
  .btn-sm { min-height: 38px; padding-block: 8px; }
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
  input[type=datetime-local], input[type=time], input[type=tel], input[type=search], input[type=url],
  input[type=file], select, textarea {
    min-height: 44px; padding-block: 11px;
  }
  select { min-height: 44px; }
  .nav a, nav a { min-height: 44px; }
}

/* ==========================================================================
   Corporate homepage — cyan on white, glass surfaces, image slideshows
   Self-contained: every class below is new, so nothing on the other public
   pages changes. Slide artwork is plain SVG in assets/img/scenes and can be
   swapped for photographs without touching this file.
   ========================================================================== */

:root {
  --cyan-300: #67DEF6;
  --cyan-400: #22C3E6;
  --cyan-500: #0BA5C8;
  --glass-bg:     rgba(255, 255, 255, .62);
  --glass-bg-2:   rgba(255, 255, 255, .78);
  --glass-line:   rgba(8, 145, 178, .18);
  --glass-shadow: 0 18px 46px rgba(6, 64, 79, .13);
}

/* ------------------------------- Hero stage ------------------------------- */

.stage {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(155deg, #ECFDFF 0%, #FFFFFF 46%, #E2F8FE 100%);
  color: var(--ink); min-height: 620px; display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
}
.stage::before, .stage::after {
  content: ""; position: absolute; border-radius: 50%; z-index: 0; pointer-events: none;
}
.stage::before {
  width: 640px; height: 640px; top: -280px; inset-inline-end: -160px;
  background: radial-gradient(circle, rgba(34, 195, 230, .30) 0%, rgba(34, 195, 230, 0) 70%);
}
.stage::after {
  width: 420px; height: 420px; bottom: -240px; inset-inline-start: 8%;
  background: radial-gradient(circle, rgba(227, 6, 19, .10) 0%, rgba(227, 6, 19, 0) 70%);
}
.stage-bg { position: absolute; inset: 0; z-index: 0; }

/* Atmospheric wash behind the whole stage — the sharp artwork lives in .stage-figure */
.stage-slide {
  position: absolute; inset: -6%; opacity: 0; transform: scale(1.04);
  background-position: center; background-size: cover; background-repeat: no-repeat;
  filter: blur(7px) saturate(115%);
  transition: opacity 1.2s ease, transform 9s linear;
}
.stage-slide.is-on { opacity: .13; transform: scale(1); }
.stage-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to right, rgba(255, 255, 255, .94) 0%, rgba(255, 255, 255, .82) 34%, rgba(255, 255, 255, .5) 100%),
    linear-gradient(to top, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, 0) 45%);
}
html[dir="rtl"] .stage-scrim {
  background:
    linear-gradient(to left, rgba(255, 255, 255, .94) 0%, rgba(255, 255, 255, .82) 34%, rgba(255, 255, 255, .5) 100%),
    linear-gradient(to top, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, 0) 45%);
}

/* Framed artwork panel */
.stage-figure {
  position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 9.4;
  border: 1px solid var(--teal-100); box-shadow: var(--glass-shadow); background: #F4FDFF;
  margin-bottom: 18px;
}
.stage-figure img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s ease, transform 9s linear; transform: scale(1.05);
}
.stage-figure img.is-on { opacity: 1; transform: scale(1); }

.stage > .wrap { position: relative; z-index: 2; padding-top: 64px; padding-bottom: 64px; width: 100%; }
.stage-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-size: 11.5px; font-weight: 700;
  letter-spacing: 2.6px; text-transform: uppercase;
  color: var(--teal-800); background: var(--teal-50); border: 1px solid var(--teal-200);
  border-radius: 999px; padding: 7px 15px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(227, 6, 19, .16); }
.stage h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.12; letter-spacing: -.025em;
  margin: 18px 0 14px; max-width: 15ch; text-wrap: balance;
}
.stage h1 .hl {
  background: linear-gradient(100deg, var(--teal-600), var(--teal-800));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stage .lead { font-size: 1.05rem; color: var(--ink-2); max-width: 56ch; margin-bottom: 26px; }
.stage-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.btn-glass {
  background: var(--glass-bg-2); border: 1px solid var(--teal-200); color: var(--teal-800); font-weight: 650;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-glass:hover { background: #fff; border-color: var(--teal-500); color: var(--teal-900); text-decoration: none; }

/* "Try the live demo" -- a third, deliberately distinct CTA: not the primary red
   conversion action, not the glass secondary -- a gentle pulse invites a no-commitment
   click. See DemoController and app/views/public/home.php / auth/login.php. */
.btn-demo { background: var(--teal-500); color: #06323F; box-shadow: 0 0 0 0 rgba(11,181,255,.5); animation: btnDemoPulse 2.6s ease-out infinite; }
.btn-demo:hover { background: var(--teal-300); color: #06323F; animation-play-state: paused; }
@keyframes btnDemoPulse {
  0%   { box-shadow: 0 0 0 0 rgba(11,181,255,.45); }
  70%  { box-shadow: 0 0 0 12px rgba(11,181,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(11,181,255,0); }
}

/* Glass surface, reusable */
.glass {
  background: var(--glass-bg); border: 1px solid var(--glass-line); border-radius: 20px;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--glass-shadow);
}
.glass-pad { padding: 22px 24px; }

/* The caption card that changes with each slide */
.stage-card { padding: 26px 28px; background: rgba(255, 255, 255, .72); }
.stage-card .kicker { font-size: 11px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase; color: var(--teal-700); }
.stage-card h2 { font-size: 1.35rem; margin: 8px 0 8px; }
.stage-card p { color: var(--ink-2); font-size: 13.8px; margin: 0 0 16px; line-height: 1.6; }
.stage-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.stage-card li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.4px; color: var(--ink); }
.stage-card li .tick {
  flex: none; width: 19px; height: 19px; border-radius: 50%; margin-top: 1px;
  background: linear-gradient(140deg, var(--teal-500), var(--teal-700));
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; font-weight: 800;
}

/* Slideshow controls */
.stage-controls { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.stage-dots { display: flex; gap: 8px; }
.stage-dots button {
  width: 30px; height: 5px; border-radius: 3px; border: 0; padding: 0; cursor: pointer;
  background: var(--teal-200); transition: background .25s, width .25s;
}
.stage-dots button[aria-current="true"] { background: var(--red); width: 46px; }
.stage-arrows { display: flex; gap: 8px; margin-inline-start: auto; }
.stage-arrows button {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; color: var(--teal-800); font-size: 16px; line-height: 1;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--teal-200);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.stage-arrows button:hover { background: #fff; border-color: var(--teal-500); }
html[dir="rtl"] .stage-arrows button { transform: scaleX(-1); }

/* KPI strip riding the bottom of the stage */
.kpi-band {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  overflow: hidden; margin-top: 36px; background: var(--teal-100);
}
.kpi { padding: 18px 20px; background: rgba(255, 255, 255, .86); }
.kpi b { display: block; font-size: 1.7rem; letter-spacing: -.02em; color: var(--teal-800); line-height: 1.1; }
.kpi span { font-size: 12px; color: var(--muted); }

/* ---------------------------- Section furniture ---------------------------- */

.sec { padding: 64px 0 0; }
.sec-head { max-width: 680px; margin: 0 auto 34px; text-align: center; }
.sec-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); letter-spacing: -.02em; margin: 14px 0 10px; }
.sec-head p { color: var(--muted); margin: 0; font-size: 15px; }

/* --------------------- Category carousel with artwork --------------------- */

.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.rail-nav { display: flex; gap: 8px; }
.rail-nav button {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1;
  background: #fff; border: 1px solid var(--line); color: var(--teal-700);
}
.rail-nav button:hover { border-color: var(--teal-500); color: var(--teal-800); }
html[dir="rtl"] .rail-nav button { transform: scaleX(-1); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(290px, 1fr);
  gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-bottom: 10px; scrollbar-width: thin;
}
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--teal-200); border-radius: 3px; }
.rail-card {
  scroll-snap-align: start; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; color: inherit; display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.rail-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--teal-300); text-decoration: none; color: inherit; }
.rail-card .shot { position: relative; aspect-ratio: 16 / 10; background: #F4FDFF center / cover no-repeat; border-bottom: 1px solid var(--teal-100); }
.rail-card .shot .badge-float {
  position: absolute; z-index: 1; inset-inline-start: 12px; bottom: 12px;
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px;
  color: var(--teal-900); background: rgba(255, 255, 255, .88); border: 1px solid var(--teal-200);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.rail-card .body { padding: 16px 18px 18px; }
.rail-card .body p { font-size: 13px; color: var(--muted); margin: 0 0 12px; line-height: 1.55; }
.rail-card .more { font-size: 12.5px; font-weight: 700; color: var(--red); }

/* --------------------------- Alternating showcase --------------------------- */

.showcase { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: center; margin-bottom: 52px; }
.showcase.flip .showcase-art { order: 2; }
.showcase-art {
  position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 5 / 3.4;
  background: #F4FDFF center / cover no-repeat; box-shadow: var(--glass-shadow);
  border: 1px solid var(--teal-100);
}
.showcase-art .float-chip {
  position: absolute; inset-inline-end: 16px; bottom: 16px; padding: 12px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .84); border: 1px solid var(--teal-200); color: var(--ink);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 12.5px; max-width: 62%;
}
.showcase-art .float-chip b { display: block; font-size: 14px; margin-bottom: 2px; color: var(--teal-800); }
.showcase h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); letter-spacing: -.02em; margin-bottom: 12px; }
.showcase .lead { color: var(--ink-2); margin-bottom: 18px; }
.showcase ul { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 11px; }
.showcase li { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; }
.showcase li .tick {
  flex: none; width: 21px; height: 21px; border-radius: 7px; margin-top: 1px; font-size: 12px; font-weight: 800;
  background: var(--teal-50); color: var(--teal-700); display: flex; align-items: center; justify-content: center;
}

/* ------------------------------- CTA band ------------------------------- */

.band {
  position: relative; overflow: hidden; border-radius: 24px; padding: 46px 44px; color: #fff;
  background: linear-gradient(140deg, var(--teal-800), var(--teal-700) 55%, var(--teal-600));
}
.band::before {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  inset-inline-end: -160px; top: -220px;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 70%);
}
.band::after {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  inset-inline-start: 12%; bottom: -220px;
  background: radial-gradient(circle, rgba(227, 6, 19, .32), rgba(227, 6, 19, 0) 70%);
}
.band > * { position: relative; z-index: 1; }
.band h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.02em; }
.band p { color: rgba(255, 255, 255, .9); max-width: 60ch; }
.band .btn-glass { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .45); color: #fff; }
.band .btn-glass:hover { background: rgba(255, 255, 255, .28); border-color: #fff; color: #fff; }
.band-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 34px; align-items: center; }
.contact-line { display: flex; gap: 11px; align-items: center; font-size: 14px; margin-bottom: 11px; color: #fff; }
.contact-line .ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .34); font-size: 15px;
}
.contact-line a { color: #fff; }

/* -------------------------------- Responsive -------------------------------- */

@media (max-width: 980px) {
  .stage-grid { grid-template-columns: 1fr; gap: 28px; }
  .stage h1 { max-width: none; }
  .showcase { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
  .showcase.flip .showcase-art { order: 0; }
  .kpi-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .stage { min-height: 0; }
  .stage > .wrap { padding-top: 44px; padding-bottom: 44px; }
  .band { padding: 30px 22px; }
  .band-grid { grid-template-columns: 1fr; }
  .rail { grid-auto-columns: 84%; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-slide, .stage-figure img, .rail { transition: none; scroll-behavior: auto; }
}

/* -------------------------------- Trip Planner -------------------------------- */

.planner-matrix input[type="number"] { width: 62px; padding: 5px 6px; font-size: 12.5px; }
.planner-matrix tfoot td { background: var(--sunken); font-weight: 700; }
.planner-matrix th, .planner-matrix td { white-space: nowrap; }
.planner-day-input { width: 84px; padding: 5px 6px; font-size: 12.5px; }
.planner-summary-box {
  background: var(--teal-50); padding: 12px 16px; border-radius: var(--radius);
  border-inline-start: 4px solid var(--teal-600); font-size: 13px; line-height: 1.6; margin-bottom: 16px;
}
.planner-ai-banner {
  background: var(--teal-50); padding: 12px 16px; border-radius: var(--radius);
  border-inline-start: 4px solid var(--teal-600); font-size: 13px; margin-bottom: 16px;
}
.planner-total-row { background: var(--sunken); font-weight: 700; }
.planner-unit-select { width: 100%; font-size: 12px; padding: 4px; margin-top: 4px; }

.planner-modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(22, 35, 43, .55);
  align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.planner-modal-overlay.open { display: flex; }
.planner-modal-box {
  background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 22px 24px; max-width: 440px; width: 100%; max-height: 88vh; overflow: auto;
}

.planner-toast-host { position: fixed; top: 16px; inset-inline-end: 16px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.planner-toast {
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-size: 13px; box-shadow: var(--shadow-lg); max-width: 320px;
}
.planner-toast.error { background: var(--bad); }
.planner-toast.success { background: var(--ok); }

@media print {
  body > *:not(.planner-modal-overlay) { display: none !important; }
  .planner-modal-overlay { position: static !important; background: none !important; display: block !important; }
  .planner-modal-overlay .planner-modal-box { box-shadow: none; max-width: none; max-height: none; }
  .planner-modal-overlay .no-print { display: none !important; }
}

/* -------------------------------- Naql AI assistant -------------------------------- */
.naql-ai-btn {
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--teal-500, #0F8B8D);
  background: #fff; cursor: pointer; box-shadow: 0 6px 22px rgba(15, 43, 47, .25);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.naql-ai-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 26px rgba(15, 43, 47, .3); }
.naql-ai-btn img { width: 34px; height: 34px; }
.naql-ai-panel {
  position: fixed; bottom: 90px; inset-inline-end: 22px; z-index: 901;
  width: min(370px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 120px));
  background: #fff; border: 1px solid var(--line, #D8E4E4); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 43, 47, .28);
  display: none; flex-direction: column; overflow: hidden;
}
.naql-ai-panel.open { display: flex; }
.naql-ai-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid var(--line, #D8E4E4); background: var(--teal-050, #EAF5F5);
}
.naql-ai-head img { width: 22px; height: 22px; }
.naql-ai-close { margin-inline-start: auto; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--ink-2, #33555A); line-height: 1; }
.naql-ai-messages { padding: 12px 14px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.naql-ai-msg { border-radius: 12px; padding: 9px 12px; font-size: 13.5px; line-height: 1.5; max-width: 92%; white-space: pre-wrap; }
.naql-ai-msg.bot { background: var(--teal-050, #EAF5F5); align-self: flex-start; border-start-start-radius: 4px; }
.naql-ai-msg.user { background: var(--ink, #16333A); color: #fff; align-self: flex-end; border-start-end-radius: 4px; }
.naql-ai-msg.thinking { opacity: .65; font-style: italic; }
.naql-ai-links { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.naql-ai-links a { font-size: 12.5px; padding: 4px 10px; border: 1px solid var(--teal-300, #7CC4C6); border-radius: 999px; text-decoration: none; }
.naql-ai-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line, #D8E4E4); }
.naql-ai-input input { flex: 1; }
@media print { .naql-ai-btn, .naql-ai-panel { display: none !important; } }

/* -------------------------------- Cookie consent -------------------------------- */
.cookie-banner {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 950;
  background: var(--ink); color: #fff;
  box-shadow: 0 -8px 28px rgba(6, 64, 79, .22);
  transform: translateY(100%); transition: transform .2s ease;
}
.cookie-banner.open { transform: translateY(0); }
.cookie-banner-inner {
  max-width: 1100px; margin: 0 auto; padding: 16px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.cookie-banner-inner p { margin: 0; flex: 1 1 420px; font-size: 13px; line-height: 1.6; color: rgba(255,255,255,.92); }
.cookie-banner-inner p a { color: var(--teal-200); }
.cookie-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.cookie-banner-actions .btn-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.28); }
.cookie-banner-actions .btn-light:hover { background: rgba(255,255,255,.16); }
@media (max-width: 640px) { .cookie-banner-inner { flex-direction: column; align-items: stretch; } .cookie-banner-actions { justify-content: stretch; } .cookie-banner-actions .btn { flex: 1; } }

dialog.cookie-prefs-dialog { width: min(560px, 92vw); }
.cookie-prefs-body { padding: 18px 24px 8px; max-width: none; }
.cookie-cat { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.cookie-cat:last-child { border-bottom: 0; }
.cookie-cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.cookie-cat-head > div { display: flex; align-items: center; gap: 8px; }
.cookie-prefs-footer {
  position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  padding: 14px 20px; background: #fff; border-top: 1px solid var(--line);
}

/* Toggle switch, used for cookie categories */
.switch { position: relative; display: inline-flex; flex: none; width: 38px; height: 22px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch input:disabled { cursor: not-allowed; }
.switch-track {
  position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .15s ease;
}
.switch-track::before {
  content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(6,64,79,.3); transition: transform .15s ease;
}
.switch input:checked + .switch-track { background: var(--teal-500); }
.switch input:checked + .switch-track::before { transform: translateX(16px); }
[dir="rtl"] .switch input:checked + .switch-track::before { transform: translateX(-16px); }
.switch input:disabled + .switch-track { background: var(--teal-300); opacity: .8; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--teal-600); outline-offset: 2px; }
