/* ===== Rakeeb Dashboard — Saudi Vibe =====
 *
 * Web-font @import was removed and replaced with a sibling <link> in
 * Rakeeb Dashboard.html. The @import was forcing a SERIAL round trip
 * (parse this CSS → discover @import → fetch the font CSS → fetch the
 * woff2s), adding ~700 ms to LCP per GTmetrix. The <link> in HTML now
 * downloads the font CSS in parallel with this stylesheet, and we trim
 * the loaded weight axes to the ones the design actually uses. */

:root {
  /* Saudi-inspired palette */
  --saudi-green: #006C35;       /* official Saudi flag green */
  --saudi-green-deep: #00582B;
  --saudi-green-soft: #0E8B4A;
  --gold: #C9A24A;              /* warm gold accent */
  --gold-soft: #E2C97F;
  --sand: #F4EFE6;              /* warm light bg */
  --sand-2: #ECE5D6;
  --ink: #0E1A14;               /* near-black with green tint */
  --ink-2: #1A2A22;
  --muted: #5C6B62;
  --line: #E2DCCB;
  --card: #FFFFFF;
  --bg: #FAF7F0;

  /* Status */
  --ok: #1F9D55;
  --warn: #E8A317;
  --bad: #D64545;
  --info: #2E7DAF;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(14, 26, 20, 0.04), 0 1px 3px rgba(14, 26, 20, 0.06);
  --shadow-md: 0 4px 12px rgba(14, 26, 20, 0.06), 0 2px 4px rgba(14, 26, 20, 0.04);
  --shadow-lg: 0 12px 32px rgba(14, 26, 20, 0.08), 0 4px 8px rgba(14, 26, 20, 0.04);
}

[data-theme="dark"] {
  --saudi-green: #18A55B;
  --saudi-green-deep: #0E7A41;
  --saudi-green-soft: #2BC373;
  --gold: #E2C97F;
  --gold-soft: #F0DDA0;
  --sand: #131A16;
  --sand-2: #1A2520;
  --ink: #F1ECE0;
  --ink-2: #D6CFBE;
  --muted: #8A9A91;
  --line: #243029;
  --card: #14201A;
  --bg: #0C1410;

  --ok: #2BC373;
  --warn: #F0B83A;
  --bad: #ED6B6B;
  --info: #5BA8D5;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  overflow: hidden;
  height: 100vh;
}

[lang="ar"], [lang="ar"] * {
  font-family: 'IBM Plex Sans Arabic', 'Manrope', system-ui, sans-serif;
}

[dir="rtl"] {
  font-family: 'IBM Plex Sans Arabic', 'Manrope', sans-serif;
}

/* App layout */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  /* Pin the row to 100vh so .main's overflow-y can actually create a scroll
   * context. Without this, the implicit row sizes to content and .main grows
   * past the viewport with no scrollbar (html/body have overflow:hidden, so
   * the overflow just clips). */
  grid-template-rows: 100vh;
  height: 100vh;
  width: 100vw;
}

/* Grid tracks stay in source order — RTL flips visual placement automatically */

/* ===== Sidebar ===== */
.sidebar {
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 4px;
  position: relative;
  /* Now that .app pins each row to 100vh, the sidebar can't grow past the
   * viewport — but if a future feature adds enough nav items it'd clip
   * silently. Internal scroll keeps the bottom items reachable. */
  overflow-y: auto;
}

[dir="rtl"] .sidebar {
  border-right: none;
  border-left: 1px solid var(--line);
}

/* Decorative wave + water tower + palms anchored to the bottom of the sidebar.
 * Sticky pins it to the bottom of the visible scroll viewport so it remains
 * visible regardless of nav length. pointer-events:none keeps clicks falling
 * through to anything underneath. The sidebar's own children sit above this
 * because they come after it in the DOM and the deco doesn't establish a
 * stacking context above them. */
.sidebar-deco {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 240px;
  margin-top: auto;
  margin-inline: -14px;
  margin-bottom: -20px;
  pointer-events: none;
  z-index: 0;
  flex-shrink: 0;
}
.sidebar-deco svg {
  display: block;
  width: 100%;
  height: 100%;
}
.sidebar > .brand,
.sidebar > .sidebar-foot,
.sidebar > div:not(.sidebar-deco) {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 8px 18px 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.brand-mark {
  width: 190px;
  height: 190px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--saudi-green) 0%, var(--saudi-green-deep) 100%);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 12px rgba(0, 108, 53, 0.25);
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 60%);
}

.brand-logo-img {
  object-fit: contain;
  background: transparent;
  padding: 0;
  box-shadow: none;
  flex: 0 0 190px;
}

.brand-logo-img::after {
  display: none;
}

.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-tag {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  font-weight: 700;
}

.nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 16px 12px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
  border: none;
  background: transparent;
  width: 100%;
  text-align: start;
}

[dir="rtl"] .nav-item { text-align: right; }

.nav-item:hover {
  background: var(--sand-2);
  color: var(--ink);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(0,108,53,0.10), rgba(0,108,53,0.02));
  color: var(--saudi-green);
  font-weight: 600;
}

[data-theme="dark"] .nav-item.active {
  background: linear-gradient(90deg, rgba(43, 195, 115, 0.15), rgba(43, 195, 115, 0.02));
}

.nav-item.active::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--saudi-green);
  border-radius: 0 3px 3px 0;
}

[dir="rtl"] .nav-item.active::before {
  border-radius: 3px 0 0 3px;
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-item .nav-badge {
  margin-inline-start: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bad);
  color: white;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 4px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  display: grid;
  place-items: center;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--muted); }

/* ===== Main content =====
 *
 * `overflow-y: auto` (was `hidden`) so pages whose stacked content exceeds
 * the viewport scroll naturally — the Overview now stacks a 55vh map row
 * above a full-width activity feed, and shorter screens need to scroll to
 * reach the feed. The topbar is still pinned via `flex-shrink: 0`. */
.main {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.topbar {
  height: 64px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  background: var(--card);
  flex-shrink: 0;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.topbar-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.topbar-tools {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 12px;
  width: 280px;
  color: var(--muted);
  font-size: 13px;
}

.search input {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-2);
  position: relative;
  transition: all 0.15s;
}

.icon-btn:hover { background: var(--sand); border-color: var(--ink-2); }

.icon-btn .dot {
  position: absolute;
  top: 7px;
  inset-inline-end: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bad);
  border: 1.5px solid var(--card);
}

.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  padding: 3px;
  height: 36px;
}

.lang-toggle button {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}

.lang-toggle button.on {
  background: var(--ink);
  color: var(--bg);
}

[data-theme="dark"] .lang-toggle button.on {
  background: var(--saudi-green);
  color: white;
}

.content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  background: var(--bg);
}

/* ===== KPI strip ===== */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 20px 0 20px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.kpi-unit { font-size: 12px; color: var(--muted); font-weight: 500; }

.money-kpi-value {
  font-size: 20px;
  line-height: 1.15;
  white-space: nowrap;
}

.kpi-delta {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kpi-delta.up { color: var(--ok); }
.kpi-delta.down { color: var(--bad); }
.kpi-delta.flat { color: var(--muted); }

.kpi-spark {
  position: absolute;
  inset-inline-end: 12px;
  bottom: 12px;
  opacity: 0.5;
  pointer-events: none;
}

.revenue-breakdown {
  margin: 12px 20px 0;
  padding: 10px 12px;
}
.revenue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.revenue-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}
.revenue-filters input,
.revenue-filters select {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 9px;
  font-family: inherit;
  font-size: 12px;
}
.revenue-type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.revenue-type-card {
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.02);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}
.revenue-type-card span,
.revenue-totals span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}
.revenue-type-card strong {
  display: inline-block;
  font-size: 18px;
  margin-inline-end: 8px;
}
.revenue-type-card em {
  color: var(--saudi-green);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}
.revenue-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.revenue-totals > div {
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}
.revenue-totals strong { font-size: 16px; }
.revenue-totals small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
}
.revenue-totals small.rev-up { color: var(--ok); }
.revenue-totals small.rev-down { color: var(--bad); }
.rev-up strong { color: var(--ok); }
.rev-down strong { color: var(--bad); }
.revenue-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.rev-badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}
.rev-badge.high { background: rgba(31,157,85,0.10); color: var(--ok); }
.rev-badge.low { background: rgba(214,69,69,0.09); color: var(--bad); }

/* ===== Supply permits by source (Dashboard) =====
 * Mirrors .revenue-breakdown so the two panels read as a pair, but each
 * card carries an extra "source name" header + a fill bar showing that
 * source's share of the day's total. */
.permits-breakdown {
  margin: 12px 20px 0;
  padding: 10px 12px;
}
.permits-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,0.015);
}
.permits-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.permits-source-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 10px 12px;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.permits-source-card.is-internal { border-inline-start: 3px solid var(--saudi-green); }
.permits-source-card.is-external { border-inline-start: 3px solid #C9A24A; }
/* Quiet-day cards: keep them visible (so the operator sees the full
 * station list) but knock the saturation down so the active sources
 * pop in comparison. */
.permits-source-card.is-zero { opacity: 0.55; background: rgba(0,0,0,0.015); }
.permits-source-card.is-zero .permits-source-amount { color: var(--muted); }
.permits-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.permits-source-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.permits-source-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.permits-source-tag.tag-internal { background: rgba(31,157,85,0.10); color: var(--ok); }
.permits-source-tag.tag-external { background: rgba(201,162,74,0.14); color: #9A6A00; }
.permits-source-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--saudi-green);
}
.permits-source-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.permits-source-bar {
  height: 4px;
  background: rgba(0,0,0,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.permits-source-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--saudi-green), #1FB373);
  border-radius: 2px;
  transition: width 240ms ease-out;
}
/* Truck-type strip on the permits panel. Mirrors .revenue-type-grid
 * exactly so the two breakdowns read as a pair, plus a separate row
 * for the grand total + permit count. */
.permits-truck-head {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.permits-truck-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.permits-truck-card {
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.02);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}
.permits-truck-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}
.permits-truck-card strong {
  display: inline-block;
  font-size: 18px;
  margin-inline-end: 8px;
}
.permits-truck-card em {
  color: var(--saudi-green);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}
.permits-truck-card.is-zero { opacity: 0.55; }
.permits-truck-card.is-zero em { color: var(--muted); }
.permits-truck-total {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(0,108,53,0.08), rgba(0,108,53,0.02));
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.permits-truck-total span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.permits-truck-total strong { font-size: 22px; }
.permits-truck-total em {
  margin-inline-start: auto;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

/* Source picker on the supply-permit form. Stretches the dropdown to the
 * full row so a long station name doesn't get truncated against a tight
 * label column. */
.sp-source select { width: 100%; }

@media (max-width: 1100px) {
  .kpi-strip,
  .revenue-type-grid,
  .revenue-totals,
  .permits-truck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .revenue-head { flex-direction: column; }
}
@media (max-width: 640px) {
  .kpi-strip,
  .revenue-type-grid,
  .revenue-totals,
  .permits-truck-grid { grid-template-columns: 1fr; }
}

/* ===== Map area =====
 *
 * The map row gets ~half the viewport (55vh, clamped 420px..640px) and the
 * activity feed lives below in its own full-width row — so the operator can
 * scan the map at a glance without it eating the whole screen, and the
 * activity feed has real reading space at the bottom (rather than being
 * capped at 280px in a sidebar).
 *
 * Side column is 380px (down from 1fr/free): wide enough for the driver
 * detail card, tracking timeline, and active-order block. The whole grid is
 * a fixed-height block so the side panel scrolls internally if its content
 * exceeds the row, and the parent .main scrolls if total page content
 * exceeds the viewport. */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  padding: 14px 24px 14px 24px;
  height: clamp(420px, 55vh, 640px);
  flex-shrink: 0;
}

@media (max-width: 1280px) {
  .overview-grid { grid-template-columns: 1fr 340px; gap: 12px; padding: 12px 16px 12px 16px; }
}
@media (max-width: 1024px) {
  .overview-grid { grid-template-columns: 1fr; height: auto; }
}

/* Activity feed lives in its own full-width row below the map+side grid.
 * No fixed height — flows naturally and the parent .main scrolls when the
 * feed plus the 55vh map row exceed the viewport. */
.overview-activity {
  padding: 0 24px 24px 24px;
  flex-shrink: 0;
}
@media (max-width: 1280px) { .overview-activity { padding: 0 16px 16px 16px; } }
.overview-activity .panel { max-height: none; }
.overview-activity .panel-body { max-height: 50vh; overflow-y: auto; }

/* Grid tracks stay in source order in RTL too */

.map-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Leaflet container needs an explicit height to render its tiles. The
   wrapping div sets width/height to 100% on its parent (.map-card) so
   without this rule the Leaflet container collapses to 0. */
.map-card .leaflet-container,
.map-card > div > div.leaflet-container {
  width:  100%;
  height: 100%;
  min-height: 300px;
  flex:   1;
  background: transparent;
  z-index: 1;
}

/* Keep the map controls + header pills above the Leaflet tile layer.
   Leaflet's own controls live at z-index ~1000 but our overlays must
   sit higher so they aren't covered by attribution / zoom widgets. */
.map-card .map-header,
.map-card .map-controls,
.map-card .map-legend {
  z-index: 1100;
}

.map-header {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  inset-inline-end: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.map-header > * { pointer-events: auto; }

.map-pill {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.active-orders-menu-wrap {
  position: relative;
  pointer-events: auto;
}
.active-orders-trigger {
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
}
.active-orders-trigger.open,
.active-orders-trigger:hover {
  border-color: var(--saudi-green);
  color: var(--saudi-green);
}
.active-orders-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--saudi-green);
  color: white;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.active-orders-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: min(440px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 130px));
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 1400;
  display: flex;
  flex-direction: column;
}
.active-orders-menu-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.active-orders-menu-head strong {
  flex: 1;
  font-size: 13px;
}
.active-orders-menu-head button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.active-orders-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.active-orders-list {
  overflow: auto;
  padding: 8px;
}
.active-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
}
.active-order-row + .active-order-row {
  border-top-color: var(--line);
}
.active-order-row:hover {
  background: var(--sand);
}
.active-order-main {
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: inherit;
  cursor: pointer;
  font-family: inherit;
}
.active-order-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.active-order-top span {
  font-size: 12px;
  font-weight: 800;
  color: var(--saudi-green);
}
.active-order-top strong {
  font-size: 12px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-order-meta,
.active-order-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}
.active-order-meta span {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-order-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: center;
}
.btn.danger {
  border-color: rgba(214,69,69,0.32);
  color: var(--bad);
  background: rgba(214,69,69,0.08);
}
.btn.danger:hover {
  background: rgba(214,69,69,0.14);
}
.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bad);
  position: relative;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--bad);
  opacity: 0.3;
  animation: ping 1.6s infinite;
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(2); opacity: 0; }
}

.map-controls {
  position: absolute;
  inset-inline-end: 14px;
  bottom: 14px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-ctrl {
  width: 36px;
  height: 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.map-ctrl:hover { background: var(--sand); }

.map-legend {
  position: absolute;
  inset-inline-start: 14px;
  bottom: 14px;
  z-index: 5;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--card);
}

.map-gps-strip {
  position: absolute;
  top: 64px;
  inset-inline-start: 14px;
  z-index: 1100;
  display: flex;
  align-items: stretch;
  gap: 8px;
  pointer-events: none;
}

.gps-card,
.gps-selected {
  min-width: 86px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  padding: 8px 10px;
}

.gps-card span,
.gps-selected span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 5px;
}

.gps-card strong,
.gps-selected strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
}

.gps-card.good { border-color: color-mix(in srgb, var(--ok) 36%, var(--line)); }
.gps-card.warn { border-color: color-mix(in srgb, var(--warn) 42%, var(--line)); }
.gps-card.bad  { border-color: color-mix(in srgb, var(--bad) 36%, var(--line)); }
.gps-card.good strong { color: var(--ok); }
.gps-card.warn strong { color: var(--warn); }
.gps-card.bad strong  { color: var(--bad); }

.gps-selected {
  min-width: 150px;
  max-width: 240px;
}

.gps-selected span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rk-driver-icon,
.rk-station-icon,
.rk-customer-icon {
  background: transparent;
  border: 0;
}

.rk-driver-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.rk-driver-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0.18;
  transform: scale(0.96);
}

.rk-driver-wrap.selected .rk-driver-halo {
  opacity: 0.24;
  animation: markerPulse 1.7s ease-out infinite;
}

@keyframes markerPulse {
  0% { transform: scale(0.82); opacity: 0.28; }
  100% { transform: scale(1.55); opacity: 0; }
}

.rk-driver-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid;
  box-shadow: 0 5px 14px rgba(13, 31, 23, 0.34);
}

.rk-speed-bubble {
  position: absolute;
  z-index: 3;
  inset-inline-start: calc(50% + 12px);
  top: -4px;
  min-width: 25px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
}

.rk-station-wrap,
.rk-customer-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.rk-station-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--gold);
  border: 3px solid #fff;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 5px 14px rgba(13, 31, 23, 0.24);
}

.rk-station-label,
.rk-customer-label {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 7px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.rk-customer-pin {
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--bad);
  border: 3px solid #fff;
  box-shadow: 0 5px 14px rgba(13, 31, 23, 0.26);
}

.rk-map-popup {
  min-width: 150px;
  display: grid;
  gap: 4px;
  font-family: inherit;
}

.rk-map-popup strong { font-size: 13px; color: var(--ink); }
.rk-map-popup span { color: var(--muted); font-size: 11px; }
.rk-map-popup div { color: var(--ink-2); font-size: 11px; }
.rk-map-popup code {
  color: var(--muted);
  font-size: 10px;
  direction: ltr;
}

.rk-live-map .leaflet-popup-content-wrapper,
.rk-live-map .leaflet-popup-tip {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.rk-live-map .leaflet-tooltip {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 920px) {
  .map-gps-strip {
    top: auto;
    inset-inline-start: 10px;
    inset-inline-end: 58px;
    bottom: 12px;
    overflow-x: auto;
  }
  .map-legend { display: none; }
}

/* Maintenance + fuel cost cards on the Dashboard. Two-column grid that
 * collapses to one on narrow screens. Spacing mirrors the kpi-strip /
 * permits-truck-grid above so the section reads as part of the same KPI
 * family rather than a separate region. */
.ops-cost-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px 18px 20px;
}
@media (max-width: 880px) {
  .ops-cost-strip { grid-template-columns: 1fr; }
}

.ops-dashboard-card{padding:15px 16px;display:grid;gap:12px;min-width:0}
.ops-dashboard-head{display:flex;align-items:center;gap:9px}
.ops-dashboard-icon{width:34px;height:34px;border-radius:8px;display:grid;place-items:center;flex:0 0 auto}
.ops-dashboard-head strong{display:block;font-size:13px}
.ops-dashboard-head span{display:block;font-size:11px;color:var(--muted);margin-top:2px}
.ops-dashboard-main{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.ops-dashboard-main strong{font-size:22px;line-height:1.15;white-space:nowrap}
.ops-dashboard-main span{font-size:11px;color:var(--muted);font-weight:700;text-align:end}
.ops-dashboard-split{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ops-mini-title{font-size:11px;color:var(--muted);font-weight:800;margin-bottom:8px}
.ops-mini-columns{height:118px;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(42px,1fr);gap:7px;align-items:end;overflow:hidden}
.ops-mini-col{height:100%;display:grid;grid-template-rows:1fr auto auto;gap:4px;text-align:center;min-width:0}
.ops-mini-plot{height:66px;border:1px solid var(--line);border-radius:8px;background:rgba(0,0,0,0.025);display:flex;align-items:flex-end;justify-content:center;padding:5px}
.ops-mini-plot span{display:block;width:100%;max-width:26px;min-height:4px;border-radius:5px 5px 2px 2px}
.ops-mini-col b{font-size:10px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ops-mini-col em{font-size:10px;font-style:normal;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ops-mini-empty{height:118px;display:grid;place-items:center;border:1px dashed var(--line);border-radius:8px;color:var(--muted);font-size:11px}
.ops-dashboard-foot{border-top:1px solid var(--line);padding-top:10px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}
.ops-dashboard-foot span{color:var(--muted);font-weight:700}
.ops-dashboard-loading{padding:20px;color:var(--muted);font-size:13px;text-align:center;grid-column:1/-1}
.ops-dashboard-loading.error{color:var(--bad)}
@media (max-width:1100px){.ops-dashboard-split{grid-template-columns:1fr}}

.report-ops-section{margin-top:14px;overflow:hidden}
.report-ops-loading{padding:22px;text-align:center;color:var(--muted);font-size:13px}
.report-ops-head{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line)}
.report-ops-mark{width:8px;height:28px;border-radius:6px;flex:0 0 auto}
.report-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:12px 16px;border-bottom:1px solid var(--line)}
.report-kpi{border:1px solid var(--line);border-radius:8px;background:rgba(0,0,0,0.018);padding:11px 12px;min-width:0}
.report-kpi span{display:block;color:var(--muted);font-size:11px;font-weight:700;margin-bottom:6px}
.report-kpi strong{display:block;font-size:18px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.report-analytics-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:12px;padding:14px 16px}
.report-chart-card,.report-table-card{border:1px solid var(--line);border-radius:8px;background:var(--card);padding:14px;min-width:0}
.report-card-title{font-size:12px;font-weight:800;color:var(--ink);margin-bottom:12px}
.report-col-chart{height:230px;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(70px,1fr);gap:10px;align-items:end;overflow-x:auto;padding:4px 2px 0}
.report-col{height:100%;display:grid;grid-template-rows:1fr auto auto auto;gap:5px;text-align:center;min-width:70px}
.report-col-plot{height:138px;display:flex;align-items:flex-end;justify-content:center;background:linear-gradient(to top, rgba(0,0,0,0.035), transparent);border:1px solid var(--line);border-radius:8px;padding:7px}
.report-col-bar{width:100%;max-width:42px;min-height:4px;border-radius:6px 6px 3px 3px;box-shadow:0 8px 16px rgba(0,0,0,0.08)}
.report-col strong{font-size:12px;line-height:1.2;color:var(--ink);white-space:nowrap}
.report-col span{font-size:11px;color:var(--ink-2);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.report-col em{font-style:normal;font-size:10px;color:var(--muted);line-height:1.25;min-height:24px}
.report-empty{display:grid;place-items:center;min-height:170px;color:var(--muted);font-size:12px;text-align:center}
.report-empty-wide{min-height:120px;border-top:1px solid var(--line)}
.report-party-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:0 16px 14px}
.report-party-card{border:1px solid var(--line);border-radius:8px;background:rgba(0,0,0,0.018);padding:11px 12px}
.report-party-card span,.report-party-card em{display:block;color:var(--muted);font-size:11px;font-style:normal}
.report-party-card strong{display:block;font-size:16px;margin:4px 0;color:var(--ink)}
.report-table-card{margin:0 16px 16px;padding:0}
.report-table-card .report-card-title{padding:13px 14px;margin:0;border-bottom:1px solid var(--line)}
.report-table-wrap{overflow:auto}
.report-detail-table{min-width:760px}
.report-detail-table td span{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.report-empty-cell{text-align:center;color:var(--muted);padding:24px!important}
@media (max-width:1200px){
  .report-analytics-grid{grid-template-columns:1fr}
  .report-kpi-grid,.report-party-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:720px){
  .report-kpi-grid,.report-party-grid{grid-template-columns:1fr}
  .report-analytics-grid{padding:12px}
  .report-table-card{margin:0 12px 12px}
}

/* ===== Side panels ===== */
.side-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  padding: 14px 16px 10px;
  gap: 8px;
}

.panel-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-sub {
  font-size: 11px;
  color: var(--muted);
}

.panel-action {
  margin-inline-start: auto;
  font-size: 11px;
  color: var(--saudi-green);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.panel-body {
  padding: 0 16px 14px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

/* Driver list */
.driver-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--r-sm);
  align-items: center;
  cursor: pointer;
  border: 1px solid transparent;
}
.driver-row:hover { background: var(--sand); }
.driver-row.selected { background: var(--sand); border-color: var(--saudi-green); }

.driver-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--saudi-green-soft), var(--saudi-green));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  position: relative;
}

.driver-avatar .status-pip {
  position: absolute;
  bottom: -1px;
  inset-inline-end: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--card);
  background: var(--ok);
}

.driver-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.driver-meta { font-size: 11px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; }

.driver-stat {
  text-align: end;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.driver-stat strong { color: var(--ink); font-size: 13px; display: block; font-weight: 700; }

.status-pip.moving { background: var(--ok); }
.status-pip.idle { background: var(--warn); }
.status-pip.break { background: var(--info); }
.status-pip.offline { background: var(--muted); }

/* Activity feed */
.feed-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  align-items: start;
}
.feed-item:last-child { border-bottom: none; }

.feed-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--sand);
  color: var(--ink-2);
  flex-shrink: 0;
}
.feed-icon.ok { background: rgba(31, 157, 85, 0.12); color: var(--ok); }
.feed-icon.warn { background: rgba(232, 163, 23, 0.14); color: var(--warn); }
.feed-icon.bad { background: rgba(214, 69, 69, 0.12); color: var(--bad); }
.feed-icon.info { background: rgba(46, 125, 175, 0.12); color: var(--info); }

.feed-text { font-size: 12px; line-height: 1.4; }
.feed-text strong { font-weight: 700; }
.feed-time { font-size: 10px; color: var(--muted); white-space: nowrap; }

/* ===== Generic page ===== */
.page-pad {
  padding: 16px 20px 20px;
  height: 100%;
  overflow: auto;
}

.page-grid {
  display: grid;
  gap: 12px;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: start;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--sand);
  position: sticky;
  top: 0;
}
[dir="rtl"] .table th { text-align: right; }
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tr:hover td { background: var(--sand); }
.table tr:last-child td { border-bottom: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.chip.ok { background: rgba(31, 157, 85, 0.12); color: var(--ok); }
.chip.warn { background: rgba(232, 163, 23, 0.16); color: #b87a09; }
.chip.bad { background: rgba(214, 69, 69, 0.12); color: var(--bad); }
.chip.info { background: rgba(46, 125, 175, 0.12); color: var(--info); }
.chip.neutral { background: var(--sand-2); color: var(--ink-2); }
[data-theme="dark"] .chip.warn { color: var(--warn); }

.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Mini bar/progress */
.bar {
  height: 5px;
  background: var(--sand-2);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%;
  background: var(--saudi-green);
  border-radius: 99px;
}
.bar-fill.warn { background: var(--warn); }
.bar-fill.bad { background: var(--bad); }

/* Buttons */
.btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 7px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.btn:hover { background: var(--sand); }
.btn.primary { background: var(--saudi-green); color: white; border-color: var(--saudi-green); }
.btn.primary:hover { background: var(--saudi-green-deep); }
.btn.ghost { border-color: transparent; }

/* Section titles */
.h-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 6px 4px 12px;
}
.h-row h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.h-row p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
::-webkit-scrollbar-track { background: transparent; }

/* Charts */
.spark-line {
  width: 100%;
  height: 60px;
}

.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut svg { width: 100px; height: 100px; }

/* Settings */
.setting-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}

.settings-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.company-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.settings-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.settings-field span {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.settings-field input,
.logo-editor input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
}

.settings-field input[readonly],
.logo-editor input:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.logo-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--card) 70%, var(--bg));
}

.logo-preview {
  width: 86px;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--saudi-green);
  font-size: 28px;
  font-weight: 900;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.ops-settings-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.settings-note {
  margin: 0 16px 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0,108,53,0.08);
  color: var(--saudi-green);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .company-settings-grid,
  .logo-editor {
    grid-template-columns: 1fr;
  }
}
.setting-row:last-child { border-bottom: none; }
.setting-row .label { font-size: 13px; font-weight: 600; }
.setting-row .desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.setting-row .ctrl { margin-inline-start: auto; }

.toggle {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}
.toggle.on { background: var(--saudi-green); }
.toggle.on::after { transform: translateX(16px); }
[dir="rtl"] .toggle.on::after { transform: translateX(-16px); }

/* utility */
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.muted { color: var(--muted); }
.tabular { font-variant-numeric: tabular-nums; }

/* Driver detail card */
.driver-card {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.driver-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.driver-card-top .driver-avatar { width: 48px; height: 48px; font-size: 14px; }
.driver-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.driver-card-stats .ds {
  background: var(--sand);
  padding: 8px 10px;
  border-radius: var(--r-sm);
}
.driver-card-stats .ds-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.driver-card-stats .ds-value { font-size: 14px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* Tweak panel font fix when arabic */
[lang="ar"] .tweaks-panel-title,
[lang="ar"] .tweaks-section-title { font-family: 'IBM Plex Sans Arabic', sans-serif; }
/* Supply permit */
.sp-grid{display:grid;grid-template-columns:minmax(360px,0.9fr) minmax(420px,1.1fr);gap:16px;align-items:start}
.sp-form{padding:16px}
.sp-open-notice{display:flex;align-items:center;gap:8px;margin:0 0 12px;padding:9px 11px;border:1px solid rgba(31,157,85,0.28);border-radius:8px;background:rgba(31,157,85,0.08);color:var(--ok);font-size:12px;font-weight:700}
.sp-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.sp-fields label,.sp-extra-row label{display:block;font-size:11px;font-weight:700;color:var(--muted);margin-bottom:6px}
.sp-fields input,.sp-fields select,.sp-fields textarea,.sp-extra-row input{width:100%;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--ink);padding:10px 12px;font-family:inherit;font-size:13px;outline:none}
.sp-fields textarea{resize:vertical;grid-column:1/-1}
.sp-fields>div:has(textarea){grid-column:1/-1}
.sp-extra-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:16px 0 10px}
.sp-extra-list{display:grid;gap:8px}
.sp-extra-row{display:grid;grid-template-columns:1fr 1.4fr 34px;gap:8px;align-items:center}
.sp-preview{min-width:0}
.sp-paper{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:24px;box-shadow:var(--shadow-sm);min-height:680px;color:var(--ink)}
.sp-head{display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:2px solid var(--ink);padding-bottom:14px}
.sp-brand{display:flex;align-items:center;gap:12px;min-width:0}
.sp-brand img,.sp-mark{width:64px;height:64px;border-radius:8px;border:1px solid var(--line);object-fit:contain;flex:0 0 auto}
.sp-mark{display:grid;place-items:center;background:var(--saudi-green);color:white;font-size:24px;font-weight:800;border-color:var(--saudi-green)}
.sp-brand strong{display:block;font-size:20px}
.sp-brand span{display:block;font-size:12px;color:var(--muted);margin-top:3px}
.sp-no{text-align:end}.sp-no span{display:block;color:var(--muted);font-size:11px;font-weight:700}.sp-no strong{font-size:18px}
.sp-paper h1{text-align:center;margin:22px 0 18px;font-size:30px}
.sp-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-bottom:16px}
.sp-summary>div,.sp-preview-fields>div{border:1px solid var(--line);border-radius:8px;padding:12px;background:rgba(0,0,0,0.02)}
.sp-summary span,.sp-preview-fields span{display:block;font-size:11px;color:var(--muted);font-weight:700;margin-bottom:6px}
.sp-summary strong,.sp-preview-fields strong{font-size:15px}
.sp-preview-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sp-preview-fields>div:last-child{grid-column:1/-1;min-height:82px}
.sp-signs{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:46px}
.sp-signs span{border-top:1px solid var(--ink);padding-top:9px;text-align:center;color:var(--muted);font-size:12px}
.sp-saved-panel{margin-top:16px;padding:16px}
.sp-saved-wrap{overflow:auto;border:1px solid var(--line);border-radius:8px;background:var(--card)}
.sp-saved-table{width:100%;border-collapse:collapse;min-width:980px}
.sp-saved-table th,.sp-saved-table td{padding:11px 12px;border-bottom:1px solid var(--line);text-align:inherit;white-space:nowrap;font-size:13px}
.sp-saved-table th{font-size:11px;color:var(--muted);font-weight:800;background:rgba(0,0,0,0.025)}
.sp-saved-table tbody tr:hover{background:rgba(0,108,53,0.05)}
.sp-saved-table tbody tr.is-opened{background:rgba(31,157,85,0.1)}
.sp-saved-table tbody tr.is-opened td:first-child{box-shadow:inset 3px 0 0 var(--ok)}
[dir="rtl"] .sp-saved-table tbody tr.is-opened td:first-child{box-shadow:inset -3px 0 0 var(--ok)}
.sp-saved-table tbody tr:last-child td{border-bottom:0}
.sp-saved-table .btn{min-height:30px;padding:6px 10px;font-size:12px}
.sp-empty{padding:18px;color:var(--muted);font-size:13px;text-align:center}
.sp-empty-start{margin-top:16px;padding:18px}
.sp-empty-start .panel-head{align-items:center}
@media (max-width:1100px){.sp-grid{grid-template-columns:1fr}.sp-paper{min-height:auto}.sp-summary{grid-template-columns:1fr}.sp-preview-fields{grid-template-columns:1fr}}

/* ============================================================
 * ===== LOGIN PAGE — design handoff (rakeeeeeb-login v2) ======
 * ============================================================
 * Two-pane layout (Saudi-green identity throughout):
 *   - Brand pane (right in RTL): mini landing page that SCROLLS with
 *     the document (hero+stats, why, live-ops mock, features, driver
 *     app, pricing, CTA). Has scroll-progress bar pinned to top.
 *   - Form pane (left in RTL): position:sticky, stays in view as the
 *     brand pane scrolls past it. Green-accented login card.
 *
 * Palette is scoped via --green-* custom props on the .login-page
 * wrapper so the dashboard isn't affected. Generic class names from
 * the design (btn, field, input, tabs, etc.) are scoped with the
 * `.login-page` ancestor selector to avoid collisions. Legacy
 * `.login-*` selectors used by the React component are kept too so
 * the component code stays readable; they map onto the design-class
 * styles via shared rule blocks below. */
.login-page {
  /* Saudi-green identity palette */
  --green-950: #062A1B;
  --green-900: #08361F;
  --green-800: #0B4D34;
  --green-700: #0E5C3D;
  --green-600: #006C35;        /* Saudi flag green */
  --green-500: #0B7A45;
  --green-400: #1F9D5E;
  --green-300: #2ECC71;        /* accent */
  --green-200: #A7E3BF;
  --green-100: #D6F1E0;
  --green-50:  #EAF6EE;

  --gold:    #C9A227;
  --ink:     #0E2419;
  --ink-2:   #324A3D;
  --ink-3:   #6A7E73;
  --line:    #E1EAE3;
  --paper:   #FFFFFF;
  --bg:      #F4F8F4;
  --danger:  #B0322B;

  /* Legacy aliases — old React component still references these names */
  --login-navy-700: var(--green-800);
  --login-navy-600: var(--green-700);
  --login-navy-800: var(--green-900);
  --login-navy-900: var(--green-950);
  --login-navy-500: var(--green-500);
  --login-water-700: var(--green-700);
  --login-water-500: var(--green-600);
  --login-water-300: var(--green-300);
  --login-green-800: var(--green-800);
  --login-green-600: var(--green-600);
  --login-sand-50: var(--bg);
  --login-sand-100: var(--green-50);
  --login-line: var(--line);
  --login-ink: var(--ink);
  --login-ink-2: var(--ink-2);
  --login-ink-3: var(--ink-3);
  --login-danger: var(--danger);

  position: fixed; inset: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: start;
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.login-page * { box-sizing: border-box; }

@media (max-width: 1080px) {
  .login-page { grid-template-columns: 1fr; }
  .login-page .form-pane,
  .login-page .login-form-pane { position: static !important; height: auto !important; }
}

/* ============== ANIMATIONS ============== */
@keyframes login-fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes login-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes login-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes login-orbDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -40px) scale(1.08); }
  66%      { transform: translate(-25px, 20px) scale(0.96); }
}
@keyframes login-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5); }
  50%      { box-shadow: 0 0 0 14px rgba(46, 204, 113, 0); }
}
@keyframes login-ping {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(3); opacity: 0; }
}
@keyframes login-float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes login-wave-shift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes login-truck-drive {
  0%   { left: -8%; }
  100% { left: 108%; }
}
@keyframes login-notif-in {
  0%        { transform: translateY(-30px); opacity: 0; }
  15%, 85%  { transform: translateY(0); opacity: 1; }
  100%      { transform: translateY(-30px); opacity: 0; }
}
@keyframes login-spin { to { transform: rotate(360deg); } }

/* Reveal-on-scroll base — JS adds .in once visible */
.login-page .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.login-page .reveal.in { opacity: 1; transform: translateY(0); }
.login-page .reveal.delay-1 { transition-delay: 0.08s; }
.login-page .reveal.delay-2 { transition-delay: 0.16s; }
.login-page .reveal.delay-3 { transition-delay: 0.24s; }
.login-page .reveal.delay-4 { transition-delay: 0.32s; }
.login-page .reveal.delay-5 { transition-delay: 0.40s; }
.login-page .reveal.delay-6 { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  .login-page *, .login-page *::before, .login-page *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .login-page .reveal { opacity: 1; transform: none; }
}

/* ============================================================
 * Design's brand pane + form pane CSS — scoped under .login-page
 * ============================================================ */

/* ===== Brand pane (right in RTL) ===== */
.login-page .brand-pane {
  position: relative;
  background:
    radial-gradient(1100px 600px at 85% 5%, rgba(46,204,113,0.14), transparent 60%),
    radial-gradient(900px 700px at 10% 95%, rgba(11,77,52,0.45), transparent 60%),
    linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 45%, var(--green-950) 100%);
  color: #EAF6EE;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px 48px 48px;
  grid-column: 1;
}
.login-page .brand-pane::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 30px);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, black 30%, transparent 80%);
          mask-image: radial-gradient(ellipse at 60% 40%, black 30%, transparent 80%);
  pointer-events: none;
}
.login-page .brand-pane::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 92% 92%, rgba(46,204,113,0.10) 0 60px, transparent 90px);
  pointer-events: none;
}

.login-page .orb {
  position: absolute; border-radius: 50%; filter: blur(50px);
  pointer-events: none; animation: login-orbDrift 22s ease-in-out infinite;
  will-change: transform;
}
.login-page .orb.a { width: 380px; height: 380px; background: #0B7A45; top: -100px; left: -90px; opacity: 0.55; }
.login-page .orb.b { width: 300px; height: 300px; background: #2ECC71; bottom: -80px; right: -60px; opacity: 0.25; animation-delay: -7s; animation-duration: 28s; }
.login-page .orb.c { width: 220px; height: 220px; background: #1F9D5E; top: 42%; left: 50%; opacity: 0.30; animation-delay: -14s; animation-duration: 26s; }

.login-page .scroll-progress {
  position: fixed;
  top: 0; right: 0; height: 3px;
  width: 50%;
  z-index: 30;
  pointer-events: none;
  background: rgba(255,255,255,0.06);
}
@media (max-width: 1080px) { .login-page .scroll-progress { width: 100%; } }
.login-page .scroll-progress::after {
  content: ""; display: block;
  height: 100%; width: var(--scroll-pct, 0%);
  background: linear-gradient(90deg, #2ECC71, #A7E3BF);
  transition: width 0.12s linear;
  box-shadow: 0 0 12px rgba(46,204,113,0.6);
}

/* Wave silhouettes at the bottom of the brand pane */
.login-page .waves {
  position: absolute; left: 0; right: 0; bottom: 0; height: 160px;
  pointer-events: none;
  background: radial-gradient(80% 80% at 50% 100%, rgba(46,204,113,0.08), transparent 60%);
}
.login-page .waves svg { position: absolute; bottom: -1px; left: 0; width: 100%; }

/* === Top bar === */
.login-page .brand-top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  color: #BDD8C7; font-size: 13px;
}
.login-page .gov-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.login-page .gov-badge svg { width: 16px; height: 16px; }
.login-page .top-meta { display: inline-flex; gap: 14px; align-items: center; opacity: 0.85; }
.login-page .top-meta .live { display: inline-flex; align-items: center; gap: 6px; color: #A7E3BF; }
.login-page .top-meta .live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #2ECC71;
  animation: login-pulse 1.8s ease-in-out infinite;
}

/* Section spacing for scroll landing */
.login-page .section {
  position: relative; z-index: 2;
  padding-block: 64px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.login-page .section:first-of-type { border-top: 0; }

/* Hero-section decoration: palm + water tower silhouette anchored to the
 * bottom-end (visual LEFT in RTL) of the first section. Pointer-events
 * disabled so it never blocks clicks on the form pane (which sits to the
 * left of the brand pane in LTR / right in RTL). The container is
 * absolute-positioned inside the section (which is position:relative).
 *
 * Raised ~15cm off the section floor and resized larger per the user's
 * request — the previous 240×180 anchored at bottom:0 was too small and
 * sat behind the stats row. */
.login-page .section .hero-deco {
  position: absolute;
  bottom: 11cm;              /* lifted; lowered 4cm from the previous 15cm */
  inset-inline-end: 0;       /* Visual LEFT in RTL because brand-pane is on the right */
  width: 360px;
  height: 270px;
  pointer-events: none;
  opacity: 0.92;
  z-index: 1;
}
.login-page .section .hero-deco svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* Smaller viewports: scale down + lift less so it doesn't escape off-screen */
@media (max-width: 1280px) {
  .login-page .section .hero-deco { bottom: 4cm; width: 280px; height: 210px; }
}
@media (max-width: 1080px) {
  .login-page .section .hero-deco { bottom: 0;   width: 220px; height: 165px; opacity: 0.75; }
}
.login-page .section-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.32em;
  color: #A7E3BF; text-transform: uppercase;
  margin-bottom: 14px;
}
.login-page .section-eyebrow::before { content: ""; width: 24px; height: 1px; background: #2ECC71; }
.login-page .section h2 {
  font-family: 'Tajawal', sans-serif;
  font-weight: 300; font-size: 38px; line-height: 1.15;
  color: #fff; margin: 0 0 12px;
  letter-spacing: -0.01em;
  max-width: 22ch;
}
.login-page .section .sub {
  color: #BDD8C7; font-size: 16px; line-height: 1.7;
  max-width: 56ch; margin: 0 0 32px;
}

/* === Hero === */
.login-page .hero {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: 22px;
}
.login-page .hero-logo {
  width: 110px; height: 110px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.4);
  animation: login-float-y 5s ease-in-out infinite;
  position: relative;
}
.login-page .hero-logo::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 28px;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(46,204,113,0.6) 60deg, transparent 120deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 2px; opacity: 0.7;
  animation: login-spin 6s linear infinite;
}
.login-page .hero-logo img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); }
.login-page .eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 11.5px; letter-spacing: 0.32em;
  color: #A7E3BF; text-transform: uppercase;
}
.login-page .eyebrow::before { content: ""; width: 32px; height: 1px; background: #2ECC71; opacity: 0.7; }
.login-page .hero h1 {
  font-family: 'Tajawal', sans-serif;
  font-weight: 300;
  font-size: 60px; line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0; color: #fff;
  text-wrap: pretty;
  max-width: 14ch;
}
.login-page .hero h1 .accent {
  background: linear-gradient(180deg, #D6F1E0 0%, #2ECC71 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-page .hero .lede {
  max-width: 52ch;
  color: #C7DDD0;
  font-size: 17px; line-height: 1.75;
  margin: 0;
}

/* Feature pills */
.login-page .pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.login-page .pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: #D6F1E0; font-size: 13px; font-weight: 500;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.login-page .pill:hover {
  background: rgba(46,204,113,0.14);
  border-color: rgba(46,204,113,0.40);
  transform: translateY(-2px);
}
.login-page .pill svg { width: 14px; height: 14px; color: #2ECC71; }

/* Stats — using the design's class name (.stats) but scoped */
.login-page .stats {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  overflow: hidden;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  margin-top: 8px;
}
.login-page .stat {
  background: rgba(8,54,31,0.55);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
  transition: background 0.3s;
  position: relative;
}
.login-page .stat:hover { background: rgba(46,204,113,0.12); }
.login-page .stat::after {
  content: ""; position: absolute; bottom: 0; right: 0; left: 0;
  height: 2px; background: #2ECC71; transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s ease;
}
.login-page .stat:hover::after { transform: scaleX(1); }
.login-page .stat .v {
  font-family: 'Tajawal', sans-serif;
  font-weight: 400; font-size: 24px; color: #fff;
  display: flex; align-items: baseline; gap: 4px;
}
.login-page .stat .v small { font-size: 12px; color: #A7E3BF; font-weight: 600; }
.login-page .stat .l { font-size: 12px; color: #9FB6A8; letter-spacing: 0.02em; }

/* Why cards (3 col) */
.login-page .why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.login-page .why-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 20px;
  transition: background 0.35s, transform 0.35s, border-color 0.35s, box-shadow 0.35s;
  position: relative;
  overflow: hidden;
}
.login-page .why-card::before {
  content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(46,204,113,0.18), transparent 40%);
  opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.login-page .why-card:hover::before { opacity: 1; }
.login-page .why-card:hover {
  background: rgba(46,204,113,0.06);
  border-color: rgba(46,204,113,0.45);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(46,204,113,0.35);
}
.login-page .why-card:hover .ic { transform: rotate(-8deg) scale(1.08); background: rgba(46,204,113,0.25); }
.login-page .why-card .ic {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(46,204,113,0.15);
  border: 1px solid rgba(46,204,113,0.25);
  display: flex; align-items: center; justify-content: center;
  color: #2ECC71;
  margin-bottom: 14px;
  transition: transform 0.35s, background 0.35s;
}
.login-page .why-card .ic svg { width: 20px; height: 20px; }
.login-page .why-card h3 {
  font-family: 'Tajawal', sans-serif;
  font-weight: 400; font-size: 17px;
  margin: 0 0 6px; color: #fff;
}
.login-page .why-card p { margin: 0; color: #BDD8C7; font-size: 13.5px; line-height: 1.65; }

/* Feature list (2 col) */
.login-page .feat-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px; overflow: hidden;
}
.login-page .feat-item {
  background: rgba(8,54,31,0.55);
  padding: 18px 20px;
  display: flex; gap: 14px; align-items: flex-start;
  transition: background 0.3s;
  position: relative;
}
.login-page .feat-item:hover { background: rgba(46,204,113,0.10); }
.login-page .feat-item:hover .ic { transform: scale(1.15); background: rgba(46,204,113,0.30); }
.login-page .feat-item .ic {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 9px;
  background: rgba(46,204,113,0.12);
  color: #2ECC71;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s, background 0.3s;
}
.login-page .feat-item .ic svg { width: 18px; height: 18px; }
.login-page .feat-item .t { font-family: 'Tajawal', sans-serif; font-weight: 400; font-size: 15px; color: #fff; margin: 0 0 4px; }
.login-page .feat-item .d { font-size: 13px; color: #A7BCAE; line-height: 1.6; margin: 0; }

/* Mock dashboard */
.login-page .mock {
  margin-top: 8px;
  background: linear-gradient(180deg, #0E5C3D 0%, #08361F 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.55);
}
.login-page .mock-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.login-page .mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.login-page .mock-bar i:first-child { background: #FF6058; }
.login-page .mock-bar i:nth-child(2) { background: #FFBD2E; }
.login-page .mock-bar i:nth-child(3) { background: #27CA40; }
.login-page .mock-bar .url {
  margin-inline-start: auto;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 3px 12px; font-size: 11px; color: #A7E3BF;
  direction: ltr; font-family: ui-monospace, monospace;
}
.login-page .mock-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.login-page .mock-tile {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.login-page .mock-tile::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgba(46,204,113,0.10) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: login-shimmer 4s linear infinite;
  pointer-events: none;
}
.login-page .mock-tile .lab { font-size: 11px; color: #A7BCAE; margin-bottom: 6px; }
.login-page .mock-tile .num { font-family: 'Tajawal', sans-serif; font-weight: 400; font-size: 22px; color: #fff; }
.login-page .mock-tile .delta { font-size: 11px; color: #2ECC71; margin-top: 4px; }
.login-page .mock-map {
  margin-top: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  height: 140px; position: relative; overflow: hidden;
}
.login-page .mock-map::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(46,204,113,0.06) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(46,204,113,0.06) 0 1px, transparent 1px 24px);
}
.login-page .mock-map .pin {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: #2ECC71; box-shadow: 0 0 0 6px rgba(46,204,113,0.20);
  animation: login-pulse 2s ease-in-out infinite;
  transition: top 4s linear, left 4s linear;
}
.login-page .mock-map .pin::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid #2ECC71;
  animation: login-ping 2.4s cubic-bezier(0,0,0.2,1) infinite;
}
.login-page .mock-map .truck {
  position: absolute; top: 50%; left: 0;
  width: 18px; height: 10px; border-radius: 2px;
  background: linear-gradient(90deg, #2ECC71, #A7E3BF);
  transform: translateY(-50%);
  animation: login-truck-drive 8s linear infinite;
  box-shadow: 0 0 12px rgba(46,204,113,0.6);
}
.login-page .mock-map .truck::before {
  content: ""; position: absolute; right: -4px; top: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: #2ECC71; transform: translateY(-50%);
  box-shadow: 0 0 8px #2ECC71;
}
.login-page .mock-map .route { position: absolute; inset: 0; pointer-events: none; }
.login-page .mock-map .route path {
  fill: none; stroke: rgba(46,204,113,0.4); stroke-width: 1.5;
  stroke-dasharray: 4 4;
  animation: login-wave-shift 1.5s linear infinite;
}

/* Driver app */
.login-page .driver-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 24px; align-items: center;
}
.login-page .phone {
  width: 160px; height: 300px;
  background: #08361F;
  border: 8px solid #062A1B;
  border-radius: 28px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
  padding: 14px 10px;
  position: relative; overflow: hidden;
  animation: login-float-y 4s ease-in-out infinite;
}
.login-page .phone::before {
  content: ""; position: absolute; top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 5px; border-radius: 5px;
  background: rgba(255,255,255,0.15);
}
.login-page .phone-screen {
  height: 100%; border-radius: 14px;
  background: linear-gradient(180deg, #0B4D34, #062A1B);
  padding: 14px 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.login-page .phone-screen .h { color: #A7E3BF; font-size: 10px; letter-spacing: 0.2em; text-align: center; }
.login-page .phone-screen .pcard {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff; font-size: 11px;
  animation: login-notif-in 5s ease-in-out infinite;
}
.login-page .phone-screen .pcard:nth-of-type(2) { animation-delay: -1.6s; }
.login-page .phone-screen .pcard:nth-of-type(3) { animation-delay: -3.2s; }
.login-page .phone-screen .pcard .t { font-weight: 700; margin-bottom: 2px; }
.login-page .phone-screen .pcard .s { color: #A7BCAE; font-size: 10px; }
.login-page .phone-screen .btn-mini {
  margin-top: auto;
  background: #2ECC71; color: #062A1B;
  border-radius: 8px; padding: 8px;
  text-align: center; font-weight: 700; font-size: 11px;
}

/* Pricing */
.login-page .price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.login-page .price-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.login-page .price-card:hover {
  transform: translateY(-6px);
  border-color: rgba(46,204,113,0.40);
  box-shadow: 0 24px 48px -24px rgba(46,204,113,0.5);
}
.login-page .price-card.featured {
  background: rgba(46,204,113,0.08);
  border-color: rgba(46,204,113,0.40);
}
.login-page .price-card .tag {
  position: absolute; top: -10px; right: 16px;
  background: #2ECC71; color: #062A1B;
  font-size: 10px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
  letter-spacing: 0.06em;
}
.login-page .price-card .name { font-family: 'Tajawal', sans-serif; font-weight: 700; font-size: 14px; color: #A7E3BF; }
.login-page .price-card .amt {
  font-family: 'Tajawal', sans-serif;
  font-weight: 800; font-size: 30px; color: #fff;
  display: flex; align-items: baseline; gap: 6px;
}
.login-page .price-card .amt small { font-size: 12px; color: #A7BCAE; font-weight: 500; }
.login-page .price-card ul {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: #BDD8C7;
}
.login-page .price-card li { display: flex; align-items: center; gap: 8px; }
.login-page .price-card li::before {
  content: ""; width: 14px; height: 14px; flex: 0 0 14px;
  background: #2ECC71;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='5 12 10 17 19 7'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='5 12 10 17 19 7'/></svg>") center/contain no-repeat;
}

/* Tagline strip */
.login-page .tagline {
  margin-top: 8px;
  border-radius: 16px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(46,204,113,0.18), rgba(46,204,113,0.04));
  border: 1px solid rgba(46,204,113,0.30);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-page .tagline::before {
  content: ""; position: absolute; inset: -2px;
  background: linear-gradient(90deg, transparent, rgba(46,204,113,0.25), transparent);
  background-size: 200% 100%;
  animation: login-shimmer 6s linear infinite;
  pointer-events: none;
}
.login-page .tagline h3 {
  font-family: 'Tajawal', sans-serif;
  font-weight: 400; font-size: 26px; color: #fff;
  margin: 0 0 8px; line-height: 1.25;
}
.login-page .tagline p { color: #BDD8C7; margin: 0 0 14px; }
.login-page .tagline .cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: #2ECC71; color: #062A1B;
  padding: 10px 18px; border-radius: 999px;
  font-weight: 700; font-size: 14px; text-decoration: none;
  transition: filter 0.15s, transform 0.06s;
}
.login-page .tagline .cta:hover { filter: brightness(1.08); }
.login-page .tagline .cta:active { transform: translateY(1px); }
.login-page .tagline .cta svg { width: 14px; height: 14px; transform: scaleX(-1); }

.login-page .brand-foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  color: #9FB6A8; font-size: 12px;
  margin-top: 24px;
}
.login-page .brand-foot .left { display: inline-flex; gap: 18px; align-items: center; }
.login-page .brand-foot .left a { color: #BDD8C7; text-decoration: none; }
.login-page .brand-foot .left a:hover { color: #fff; }

/* ===== Form pane (left in RTL) — sticky ===== */
.login-page .form-pane,
.login-page .login-form-pane {
  position: sticky;
  top: 0;
  height: 100vh;
  grid-column: 2;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 28px;
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(46,204,113,0.07), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(11,77,52,0.06), transparent 60%),
    var(--bg);
  overflow-y: auto;
}
/* Top + bottom green bands */
.login-page .ornament-top,
.login-page .login-ornament {
  position: absolute; top: 0; right: 0; left: 0; height: 8px;
  background: linear-gradient(90deg, var(--green-800) 0%, var(--green-600) 50%, var(--green-300) 100%);
  z-index: 5;
}
.login-page .ornament-bot {
  position: absolute; bottom: 0; right: 0; left: 0; height: 8px;
  background: linear-gradient(90deg, var(--green-300) 0%, var(--green-600) 50%, var(--green-800) 100%);
  z-index: 5;
}

.login-page .login-shell {
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}

/* Logo + wordmark stacked above the card */
.login-page .brand-stack {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.login-page .brand-stack .logo-mark,
.login-page .login-logo-mark {
  width: 78px; height: 78px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
  box-shadow:
    0 1px 0 rgba(11,77,52,0.04),
    0 14px 28px -16px rgba(11,77,52,0.30);
  flex: 0 0 78px;
}
.login-page .brand-stack .logo-mark img,
.login-page .login-logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.login-page .brand-stack .ar,
.login-page .login-logo-text .ar {
  font-family: 'Tajawal', sans-serif;
  font-weight: 400; font-size: 30px; color: var(--green-800);
  line-height: 1; letter-spacing: -0.01em;
  margin-top: 6px;
}
.login-page .brand-stack .en,
.login-page .login-logo-text .en {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 11px; letter-spacing: 0.36em; color: var(--green-600);
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.login-page .brand-stack .en::before, .login-page .brand-stack .en::after {
  content: ""; width: 18px; height: 1px; background: var(--green-300);
}

/* Login card */
.login-page .login-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 32px 26px;
  box-shadow:
    0 1px 0 rgba(11,77,52,0.04),
    0 12px 32px -16px rgba(11,77,52,0.18),
    0 30px 60px -30px rgba(11,77,52,0.22);
  position: relative;
  overflow: hidden;
}
.login-page .login-card::before {
  content: ""; position: absolute; top: 0; right: 0; left: 0; height: 4px;
  background: linear-gradient(90deg, var(--green-800), var(--green-600), var(--green-300));
}
.login-page .title-block,
.login-page .login-title-block { text-align: center; margin-bottom: 22px; }
.login-page .title-block h2,
.login-page .login-title-block h2 {
  font-family: 'Tajawal', sans-serif;
  font-weight: 400; font-size: 24px;
  margin: 0 0 6px; color: var(--green-900);
  letter-spacing: -0.01em;
}
.login-page .title-block p,
.login-page .login-title-block p { margin: 0; color: var(--ink-3); font-size: 14px; line-height: 1.6; }

/* Tabs */
.login-page .tabs,
.login-page .login-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
}
.login-page .tabs button,
.login-page .login-tabs button {
  appearance: none; border: 0; background: transparent;
  font: inherit; cursor: pointer;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--ink-2);
  font-weight: 600; font-size: 13.5px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.login-page .tabs button[aria-selected="true"],
.login-page .login-tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--green-800);
  box-shadow: 0 1px 2px rgba(11,77,52,0.06), 0 6px 14px -8px rgba(11,77,52,0.25);
}
.login-page .tabs button svg,
.login-page .login-tabs button svg { width: 16px; height: 16px; }
.login-page .tabs button[aria-selected="true"] svg,
.login-page .login-tabs button[aria-selected="true"] svg { color: var(--green-600); }

.login-page .login-card form { display: flex; flex-direction: column; gap: 14px; }

.login-page .field,
.login-page .login-field { position: relative; }
.login-page .field label,
.login-page .login-field label {
  display: block; font-size: 13px; color: var(--ink-2);
  margin-bottom: 8px; font-weight: 600;
}
.login-page .field label .link { float: left; }
.login-page .input,
.login-page .login-input {
  display: flex; align-items: center;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-page .input:hover,
.login-page .login-input:hover { border-color: #C5D6CB; }
.login-page .input:focus-within,
.login-page .login-input:focus-within {
  border-color: var(--green-600);
  box-shadow: 0 0 0 4px rgba(0,108,53,0.14);
}
.login-page .input.error,
.login-page .login-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(176,50,43,0.10);
}
.login-page .input svg.lead,
.login-page .login-input svg.lead {
  width: 18px; height: 18px; flex: 0 0 18px;
  margin-inline-start: 14px;
  color: var(--green-600);
}
.login-page .input input,
.login-page .login-input input {
  flex: 1; min-width: 0;
  appearance: none; border: 0; outline: 0; background: transparent;
  font: inherit; color: var(--ink);
  padding: 13px 12px;
  font-size: 15px;
  text-align: right;
}
[dir="ltr"] .login-page .input input,
[dir="ltr"] .login-page .login-input input { text-align: left; }
.login-page .input input::placeholder,
.login-page .login-input input::placeholder { color: #9CAFA3; }
.login-page .input .toggle,
.login-page .login-toggle {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 0 14px; height: 100%;
  display: flex; align-items: center;
  color: var(--green-700);
  font-size: 12.5px; font-weight: 600;
}
.login-page .input .toggle:hover,
.login-page .login-toggle:hover { color: var(--green-900); }

.login-page .row,
.login-page .login-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: -2px;
}
.login-page .check,
.login-page .login-check {
  display: inline-flex; align-items: center; gap: 9px;
  cursor: pointer; user-select: none;
  color: var(--ink-2); font-size: 13.5px;
  position: relative;
}
.login-page .check input,
.login-page .login-check input { position: absolute; opacity: 0; pointer-events: none; }
.login-page .check .box,
.login-page .login-check .box {
  width: 18px; height: 18px; border-radius: 6px;
  border: 1.5px solid #C5D6CB; background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.login-page .check .box svg,
.login-page .login-check .box svg { width: 12px; height: 12px; opacity: 0; }
.login-page .check input:checked + .box,
.login-page .login-check input:checked + .box {
  background: var(--green-600); border-color: var(--green-600);
}
.login-page .check input:checked + .box svg,
.login-page .login-check input:checked + .box svg { opacity: 1; }

.login-page .link,
.login-page .login-link {
  color: var(--green-700);
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.login-page .link:hover,
.login-page .login-link:hover { text-decoration: underline; color: var(--green-900); }

.login-page .login-card .btn,
.login-page .login-btn {
  appearance: none; border: 0; cursor: pointer;
  width: 100%; padding: 14px 16px;
  border-radius: 12px;
  font: inherit; font-weight: 700; font-size: 15px;
  color: #fff;
  background: linear-gradient(180deg, var(--green-600) 0%, var(--green-800) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 8px 18px -8px rgba(11,77,52,0.55);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform 0.06s ease, filter 0.15s;
  margin-top: 6px;
}
.login-page .login-card .btn:hover,
.login-page .login-btn:hover { filter: brightness(1.08); }
.login-page .login-card .btn:active,
.login-page .login-btn:active { transform: translateY(1px); }
.login-page .login-card .btn svg,
.login-page .login-btn svg { width: 16px; height: 16px; }
.login-page .login-card .btn[disabled],
.login-page .login-btn[disabled] { opacity: 0.7; cursor: progress; }
.login-page .login-card .btn .label-default,
.login-page .login-btn .label-default { display: flex; align-items: center; gap: 10px; }
.login-page .login-card .btn .spinner,
.login-page .login-btn .spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  animation: login-spin 0.8s linear infinite;
  display: none;
}
.login-page .login-card .btn.loading .spinner,
.login-page .login-btn.loading .spinner { display: inline-block; }
.login-page .login-card .btn.loading .label-default,
.login-page .login-btn.loading .label-default { display: none; }

.login-page .foot,
.login-page .login-foot {
  margin-top: 18px; padding-top: 18px;
  border-top: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--ink-3);
}
.login-page .foot .lang,
.login-page .login-lang {
  background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; cursor: pointer;
  color: var(--ink-2); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.login-page .foot .lang:hover,
.login-page .login-lang:hover { border-color: var(--green-600); color: var(--green-800); }

.login-page .alert,
.login-page .login-alert {
  display: none; align-items: flex-start; gap: 10px;
  background: #FBECEA; border: 1px solid #F1C9C5;
  color: #7A201A;
  border-radius: 10px; padding: 10px 12px;
  font-size: 13px; line-height: 1.5;
  margin-bottom: 12px;
}
.login-page .alert.show,
.login-page .login-alert.show { display: flex; }
.login-page .alert svg,
.login-page .login-alert svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; color: #B0322B; }

.login-page .below,
.login-page .login-below {
  text-align: center; color: var(--ink-3); font-size: 12px;
  margin-top: 4px;
}
.login-page .below a,
.login-page .login-below a { color: var(--green-700); font-weight: 600; text-decoration: none; }
.login-page .below a:hover,
.login-page .login-below a:hover { text-decoration: underline; }

.login-page .login-demo {
  width: 100%; max-width: 460px;
  margin: 14px auto 0;
  padding: 12px 14px;
  background: rgba(0,108,53,0.06);
  color: var(--green-800);
  border-radius: 10px;
  border: 1px solid rgba(0,108,53,0.12);
  font-size: 12px; line-height: 1.6;
  font-family: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
}
.login-page .login-demo-title { font-weight: 700; margin-bottom: 4px; }

.login-page .login-server-warn {
  width: 100%; max-width: 460px;
  margin: 12px auto 0;
  padding: 10px 14px;
  background: rgba(176,50,43,0.08);
  color: var(--danger);
  border-radius: 10px;
  font-size: 12px; text-align: center;
}
.login-page .login-server-warn code { font-family: ui-monospace, monospace; font-size: 11.5px; }

.login-page .login-ribbon { display: none; }

/* ===== Login modal (forgot password / request access / terms / privacy) =====
 * Lives outside the .login-page grid so it covers BOTH panes. We use the
 * login palette (var(--login-*)) so the modal matches the rest of the
 * sign-in screen without depending on the dashboard's theme variables. */
.login-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(8, 54, 31, 0.55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  z-index: 1200;
  animation: login-modal-fade-in 0.15s ease-out;
}
@keyframes login-modal-fade-in { from { opacity: 0; } to { opacity: 1; } }
.login-modal {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 48px -16px rgba(8, 54, 31, 0.45);
  display: flex; flex-direction: column;
  max-height: min(85vh, 720px);
  overflow: hidden;
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, sans-serif;
  color: var(--login-ink, #0E2419);
}
.login-modal header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--login-line, #E1EAE3);
}
.login-modal header h3 {
  margin: 0;
  font-family: 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--login-navy-700, #0B4D34);
}
.login-modal-close {
  appearance: none; border: 0; background: transparent;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--login-ink-3, #6A7E73);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.login-modal-close:hover {
  background: var(--login-sand-100, #EAF6EE);
  color: var(--login-ink, #0E2419);
}
.login-modal-body {
  padding: 18px 22px 22px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  color: var(--login-ink-2, #324A3D);
}
.login-modal-body p { margin: 0 0 10px; }
.login-modal-body ol, .login-modal-body ul {
  margin: 8px 0 12px;
  padding-inline-start: 22px;
}
.login-modal-body li { margin-bottom: 6px; }
.login-modal-body h4 {
  font-family: 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
  margin: 14px 0 6px;
  font-size: 14px;
  color: var(--login-navy-700, #0B4D34);
  font-weight: 700;
}
.login-modal-body h4:first-child { margin-top: 0; }
.login-modal-body a {
  color: var(--login-water-700, #0E5C3D);
  font-weight: 600;
  text-decoration: none;
}
.login-modal-body a:hover { text-decoration: underline; }
.login-modal-contact {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--login-sand-100, #EAF6EE);
  border-radius: 10px;
  font-size: 13.5px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.login-modal-contact strong {
  font-weight: 700;
  color: var(--login-ink, #0E2419);
}
.login-modal-contact .sep { color: var(--login-ink-3, #6A7E73); }
.login-modal-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--login-sand-100, #EAF6EE);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.login-modal-tabs button {
  appearance: none; border: 0; background: transparent;
  font: inherit; cursor: pointer;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 600; font-size: 13.5px;
  color: var(--login-ink-2, #324A3D);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.login-modal-tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--login-navy-700, #0B4D34);
  box-shadow: 0 1px 2px rgba(11, 77, 52, 0.06), 0 6px 14px -8px rgba(11, 77, 52, 0.18);
}

/* =====================================================================
 * Rakeeb dark-emerald sidebar theme
 * Overrides the default light sidebar to match the brand mockup —
 * dark forest green background, white nav cards with subtle borders,
 * bright-green active pill with end-side accent bar, and the wave +
 * water tower + palms decoration anchored to the bottom.
 * Specificity-wins approach (selectors are .sidebar-prefixed) so this
 * block sits below the original rules and intentionally overrides them.
 * ===================================================================== */
.sidebar {
  background: #0B4D34;
  background-image:
    radial-gradient(circle at 20% 8%, rgba(255,255,255,0.04) 0, transparent 28%),
    radial-gradient(circle at 80% 4%, rgba(255,255,255,0.03) 0, transparent 22%);
  border-right: 0;
  color: #fff;
}
[dir="rtl"] .sidebar { border-left: 0; }

.sidebar .brand {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0 6px 14px;
  /* The logo PNG carries its own dark-emerald canvas which extends to the
   * top of the sidebar — zero top padding keeps the image edge-to-edge. */
}
.sidebar .brand-logo-img {
  flex: none;
  width: 100%;
  max-width: 220px;
  height: auto;
  background: transparent;
  padding: 0;
  /* The image already carries the matching dark-emerald background — we
   * only need a subtle drop-shadow so it doesn't look 100% flat against
   * the sidebar. */
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.30));
}
.sidebar .brand-tag { display: none; }

.sidebar .nav-section {
  color: rgba(255,255,255,0.42);
  padding: 14px 6px 6px;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.sidebar .nav-item {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 11px 14px;
  margin: 4px 0;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  gap: 12px;
}
.sidebar .nav-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}
.sidebar .nav-item .nav-icon {
  color: rgba(255,255,255,0.85);
  opacity: 1;
}

.sidebar .nav-item.active {
  background: linear-gradient(90deg, rgba(46,204,113,0.22), rgba(46,204,113,0.08));
  border-color: rgba(46,204,113,0.35);
  color: #fff;
  font-weight: 600;
}
.sidebar .nav-item.active .nav-icon { color: #fff; }

/* Override the default ::before accent bar — wider, brighter, taller. */
.sidebar .nav-item.active::before {
  background: #2ECC71;
  width: 4px;
  top: 4px;
  bottom: 4px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(46,204,113,0.55);
}
/* In the mockup the accent bar sits on the visual LEFT — which is the
 * inline-END in RTL. Flip it for RTL only. */
[dir="rtl"] .sidebar .nav-item.active::before {
  inset-inline-start: auto;
  inset-inline-end: 0;
  border-radius: 0 4px 4px 0;
}

/* Chevron at the inline-end of inactive nav items — drawn purely with
 * borders (no extra DOM). Active items hide it because the accent bar
 * already marks them. */
.sidebar .nav-item::after {
  content: '';
  width: 6px;
  height: 6px;
  border-top: 1.5px solid rgba(255,255,255,0.4);
  border-right: 1.5px solid rgba(255,255,255,0.4);
  margin-inline-start: auto;
  flex-shrink: 0;
  transform: rotate(45deg);
}
[dir="rtl"] .sidebar .nav-item::after { transform: rotate(-135deg); }
.sidebar .nav-item.active::after { display: none; }
.sidebar .nav-item .nav-badge { margin-inline-start: 0; }

/* Footer (user + logout) */
.sidebar .sidebar-foot {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 12px 6px 8px;
}
.sidebar .avatar {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
}
.sidebar .user-name { color: #fff; }
.sidebar .user-role { color: rgba(255,255,255,0.55); }
.sidebar .sidebar-foot .icon-btn {
  color: rgba(255,255,255,0.75);
  background: transparent;
  border: 0;
}
.sidebar .sidebar-foot .icon-btn:hover {
  background: rgba(255,255,255,0.08);
}

/* =====================================================================
 * AI Bot UI — floating button + slide-in drawer + chat surface
 * Lives outside the dashboard's normal grid; renders into the body via
 * fixed positioning. Class names are `bot-*` so they don't collide with
 * existing dashboard styles. Palette pulled from the Saudi-green CSS
 * vars defined at the top of this file.
 * ===================================================================== */

/* ── Floating button (FAB) ────────────────────────────────────────────── */
.bot-fab {
  position: fixed;
  bottom: 24px;
  /* Pinned to the visual LEFT edge regardless of RTL/LTR — matches the
   * drawer that now slides in from the left. Using physical `left`
   * (instead of inset-inline-end) makes the placement direction-agnostic. */
  left: 24px;
  right: auto;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--saudi-green) 0%, var(--saudi-green-deep) 100%);
  color: #fff;
  display: grid; place-items: center;
  box-shadow:
    0 6px 16px -4px rgba(0,108,53,0.45),
    0 12px 32px -8px rgba(0,108,53,0.30),
    inset 0 1px 0 rgba(255,255,255,0.18);
  z-index: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.bot-fab:hover {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.06);
}
.bot-fab:active { transform: translateY(0) scale(0.98); }

/* Pulsing ring around the FAB to draw attention. Pure CSS, no JS. */
.bot-fab-pulse {
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(46,204,113,0.6);
  animation: bot-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes bot-pulse {
  0%   { transform: scale(0.95); opacity: 0.6; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

.bot-fab-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--bad);
  color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  display: grid; place-items: center;
  border: 2px solid #fff;
}

/* ── Overlay + sliding panel ─────────────────────────────────────────── */
.bot-overlay {
  position: fixed; inset: 0;
  background: rgba(14,26,20,0.42);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  z-index: 950;
  display: flex;
  /* Drawer pinned to the visual LEFT edge of the viewport regardless of
   * direction. In LTR, flex-start is left. In RTL, flex-start is right —
   * so we use flex-end in RTL to keep the panel on the left. */
  justify-content: flex-start;
  animation: bot-fade-in 0.18s ease-out;
}
[dir="rtl"] .bot-overlay { justify-content: flex-end; }
@keyframes bot-fade-in { from { opacity: 0; } to { opacity: 1; } }

.bot-panel {
  position: relative;
  width: 100%; max-width: 480px; height: 100%;
  background: var(--card);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  /* Slide in from the visual LEFT — translateX(-100%) is always physical
   * leftward regardless of writing direction, so a single keyframe works
   * for both LTR and RTL. */
  animation: bot-slide-in 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes bot-slide-in {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}
@media (max-width: 640px) {
  .bot-panel { max-width: 100%; }
}

/* ── Header ──────────────────────────────────────────────────────────── */
.bot-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0,108,53,0.04) 0%, transparent 100%);
  flex-shrink: 0;
}
.bot-header-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--saudi-green) 0%, var(--saudi-green-deep) 100%);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 6px -2px rgba(0,108,53,0.4);
}
.bot-header-title {
  font-weight: 800; font-size: 15px; color: var(--ink);
  letter-spacing: -0.01em;
}
.bot-header-sub {
  font-size: 11px; color: var(--muted);
  margin-top: 2px;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.bot-header-status { display: inline-flex; align-items: center; gap: 4px; }

.bot-icon-btn {
  appearance: none; border: 1px solid var(--line); background: var(--bg);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.bot-icon-btn:hover {
  background: rgba(0,108,53,0.06);
  border-color: var(--saudi-green);
  color: var(--saudi-green);
}

/* ── Messages area ───────────────────────────────────────────────────── */
.bot-messages {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(0,108,53,0.03) 0%, transparent 40%),
    var(--bg);
  scroll-behavior: smooth;
}

/* Empty state */
.bot-empty {
  margin: auto 0;
  padding: 24px 8px;
  text-align: center;
}
.bot-empty-emoji { font-size: 36px; margin-bottom: 8px; }
.bot-empty-title {
  font-weight: 800; font-size: 18px; color: var(--ink);
  margin-bottom: 6px;
}
.bot-empty-sub {
  font-size: 13px; color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
  max-width: 32ch; margin-inline: auto;
}
.bot-quick-prompts {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center;
}
.bot-quick-chip {
  appearance: none; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit; font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.06s;
}
.bot-quick-chip:hover {
  background: rgba(0,108,53,0.06);
  border-color: var(--saudi-green);
  color: var(--saudi-green-deep);
  transform: translateY(-1px);
}

/* ── Message rows + bubbles ──────────────────────────────────────────── */
.bot-row {
  display: flex; gap: 8px;
  animation: bot-msg-in 0.22s ease-out;
}
@keyframes bot-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bot-row.user { justify-content: flex-end; }
.bot-row.asst { justify-content: flex-start; }

.bot-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--saudi-green) 0%, var(--saudi-green-deep) 100%);
  color: #fff;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 4px -1px rgba(0,108,53,0.3);
}

.bot-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px; line-height: 1.6;
  word-wrap: break-word; overflow-wrap: anywhere;
}
.bot-bubble.user {
  background: linear-gradient(180deg, var(--saudi-green) 0%, var(--saudi-green-deep) 100%);
  color: #fff;
  border-end-end-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,108,53,0.18);
}
.bot-bubble.asst {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-end-start-radius: 4px;
}
[dir="rtl"] .bot-bubble.user { border-end-end-radius: 14px; border-end-start-radius: 4px; }
[dir="rtl"] .bot-bubble.asst { border-end-start-radius: 14px; border-end-end-radius: 4px; }

.bot-source {
  font-size: 9px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 4px;
  display: inline-flex; align-items: center; gap: 3px;
  font-weight: 700;
}

.bot-text > div { margin: 0; }
.bot-bullet { padding-inline-start: 4px; }

/* ── Tool call indicator ─────────────────────────────────────────────── */
.bot-tool-call {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted);
  padding: 4px 10px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: rgba(0,108,53,0.03);
}
.bot-tool-call code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: var(--saudi-green);
  font-size: 10.5px;
}
.bot-tool-icon { font-size: 12px; }

/* ── Typing indicator ────────────────────────────────────────────────── */
.bot-typing {
  display: flex; gap: 4px; align-items: center; height: 14px;
}
.bot-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  animation: bot-typing-bounce 1.2s infinite ease-in-out;
}
.bot-typing span:nth-child(2) { animation-delay: 0.15s; }
.bot-typing span:nth-child(3) { animation-delay: 0.30s; }
@keyframes bot-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

/* ── Inline error ────────────────────────────────────────────────────── */
.bot-error {
  background: rgba(214,69,69,0.08);
  border: 1px solid rgba(214,69,69,0.2);
  color: var(--bad);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
}

/* ── History sidebar (overlay inside the panel) ──────────────────────── */
.bot-history {
  position: absolute; inset: 0;
  background: var(--card);
  z-index: 5;
  display: flex; flex-direction: column;
  animation: bot-fade-in 0.15s ease-out;
}
.bot-history-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.bot-history-list {
  flex: 1; overflow-y: auto;
  padding: 8px;
}
.bot-history-item {
  position: relative;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
}
.bot-history-item:hover { background: rgba(0,108,53,0.04); }
.bot-history-item.active {
  background: rgba(0,108,53,0.07);
  border: 1px solid rgba(0,108,53,0.18);
}
.bot-history-title {
  font-size: 13px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-inline-end: 22px;
}
.bot-history-time {
  font-size: 10.5px; color: var(--muted); margin-top: 2px;
}
.bot-history-del {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  inset-inline-end: 8px;
  width: 24px; height: 24px;
  appearance: none; border: 0; background: transparent;
  cursor: pointer;
  border-radius: 6px;
  color: var(--muted);
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity 0.12s, color 0.12s, background 0.12s;
}
.bot-history-item:hover .bot-history-del { opacity: 1; }
.bot-history-del:hover { color: var(--bad); background: rgba(214,69,69,0.08); }

/* ── Input bar ───────────────────────────────────────────────────────── */
.bot-input-wrap {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--card);
  flex-shrink: 0;
}
.bot-input {
  flex: 1;
  appearance: none;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
  resize: none;
  max-height: 120px;
  min-height: 42px;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bot-input:focus {
  outline: none;
  border-color: var(--saudi-green);
  box-shadow: 0 0 0 4px rgba(0,108,53,0.10);
}
.bot-input:disabled { opacity: 0.6; cursor: progress; }

.bot-send {
  appearance: none; border: 0; cursor: pointer;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--saudi-green) 0%, var(--saudi-green-deep) 100%);
  color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px -2px rgba(0,108,53,0.4);
  transition: transform 0.06s, filter 0.15s;
}
.bot-send:hover:not(:disabled) { filter: brightness(1.06); }
.bot-send:active:not(:disabled) { transform: translateY(1px); }
.bot-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Footer hint ─────────────────────────────────────────────────────── */
.bot-foot {
  font-size: 10.5px; color: var(--muted);
  text-align: center;
  padding: 6px 12px 10px;
  background: var(--card);
}
.bot-foot kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
  color: var(--ink-2);
  background: var(--sand-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}

/* ── Inline chat form (presentForm widget) ─────────────────────────── */
.bot-form {
  margin-top: 10px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bot-form-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--saudi-green-deep);
}
.bot-form-desc {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: -4px;
  line-height: 1.5;
}
.bot-form-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bot-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bot-form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 4px;
}
.bot-form-req {
  color: var(--bad);
  font-size: 12px;
  line-height: 1;
}
.bot-form-input {
  appearance: none;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bot-form-input:focus {
  outline: none;
  border-color: var(--saudi-green);
  box-shadow: 0 0 0 3px rgba(0,108,53,0.10);
}
.bot-form-input:disabled {
  background: var(--sand-2);
  color: var(--muted);
  cursor: not-allowed;
}
.bot-form-input[type="number"] { direction: ltr; text-align: end; }
.bot-form-input[type="tel"]    { direction: ltr; text-align: end; }
.bot-form-input[type="email"]  { direction: ltr; text-align: end; }
.bot-form-input[type="date"],
.bot-form-input[type="time"]   { direction: ltr; text-align: end; font-family: ui-monospace, monospace; }
/* Native picker indicator (calendar/clock icon) — keep visible in RTL */
.bot-form-input[type="date"]::-webkit-calendar-picker-indicator,
.bot-form-input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(0.4) sepia(1) saturate(5) hue-rotate(85deg);
  cursor: pointer;
}
.bot-form-hint {
  font-size: 11px;
  color: var(--bad);
  background: rgba(214,69,69,0.06);
  padding: 6px 10px;
  border-radius: 6px;
}
.bot-form-submit {
  appearance: none;
  border: 0;
  background: linear-gradient(180deg, var(--saudi-green) 0%, var(--saudi-green-deep) 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.06s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 2px 6px -2px rgba(0,108,53,0.40);
}
.bot-form-submit:hover:not(:disabled) { filter: brightness(1.06); }
.bot-form-submit:active:not(:disabled) { transform: translateY(1px); }
.bot-form-submit:disabled { opacity: 0.5; cursor: not-allowed; }


