:root {
  --bg: #edf4f6;
  --sidebar: #062a4f;
  --sidebar-deep: #001a35;
  --sidebar-accent: #127cff;
  --text: #17333b;
  --muted: #74858c;
  --line: #dbe5ef;
  --panel: rgba(255, 255, 255, .9);
  --page-overlay: rgba(244, 248, 252, .26);
  --control-bg: rgba(255, 255, 255, .96);
  --control-border: rgba(203, 216, 230, .88);
  --field-bg: rgba(255, 255, 255, .98);
  --field-border: #c9d7e6;
  --soft-bg: #f4f8fc;
  --hover-bg: #eaf2ff;
  --shadow-color: rgba(48, 86, 131, .10);
  --teal: #2563eb;
  --accent-blue: #2f80ed;
  --accent-purple: #a855f7;
  --accent-pink: #ff5f98;
  --sidebar-width: 250px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg) url("/bg-last.png") center center / cover fixed no-repeat;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg) url("/bg-last.png") center center / cover fixed no-repeat;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  background: var(--page-overlay);
  pointer-events: none;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --sidebar: #07162b;
  --sidebar-deep: #020817;
  --text: #f8fbff;
  --muted: #d0d9e4;
  --line: rgba(226, 232, 240, .18);
  --panel: #000000;
  --page-overlay: rgba(5, 11, 22, .78);
  --control-bg: #000000;
  --control-border: rgba(203, 213, 225, .32);
  --field-bg: #000000;
  --field-border: rgba(203, 213, 225, .36);
  --soft-bg: #000000;
  --hover-bg: #050505;
  --shadow-color: rgba(0, 0, 0, .28);
  --teal: #22c7b0;
  background: #000000;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.menu-toggle {
  position: fixed;
  z-index: 70;
  top: 14px;
  left: 14px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 12px;
  background: linear-gradient(145deg, #06345f, #001d3b);
  color: #fff;
  box-shadow: 0 14px 34px rgba(0, 25, 52, .22);
  font-weight: 900;
  cursor: pointer;
}

.menu-toggle svg {
  width: 18px;
  height: 18px;
}

.sidebar-overlay {
  position: fixed;
  z-index: 58;
  inset: 0;
  background: rgba(0, 18, 39, .34);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

body.sidebar-open .sidebar-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.sidebar-open {
  overflow: hidden;
}

.sidebar {
  position: fixed;
  z-index: 60;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 18px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(4, 46, 85, .72), rgba(0, 22, 45, .72)), url("/sidebar-final.png") center center / cover no-repeat;
  color: #edf7ff;
  border: 1px solid rgba(255, 255, 255, .16);
  border-left: 0;
  border-radius: 0 22px 22px 0;
  box-shadow: 18px 0 42px rgba(0, 24, 52, .36);
  transform: translateX(calc(-100% - 18px));
  transition: transform .22s ease;
}

body.sidebar-open .sidebar {
  transform: translateX(0);
}

html[dir="rtl"] .menu-toggle {
  right: 12px;
  left: auto;
}

html[dir="rtl"] .sidebar {
  inset: 0 0 0 auto;
  border-right: 0;
  border-left: 0;
  border-radius: 22px 0 0 22px;
  box-shadow: -18px 0 42px rgba(0, 24, 52, .36);
  transform: translateX(calc(100% + 18px));
}

html[dir="rtl"] body.sidebar-open .sidebar {
  transform: translateX(0);
}

.brand,
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  min-height: 74px;
  padding: 6px 6px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, .13);
}

.brand-emblem {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 16px;
  background: radial-gradient(circle at 35% 25%, #145b98, #001b3a 70%);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, .08), 0 10px 24px rgba(0, 12, 30, .22);
  color: #fff;
}

.brand-emblem svg {
  width: 28px;
  height: 28px;
}

.brand-copy strong {
  display: block;
  color: #fff;
  font-size: 13px;
  line-height: 1.05;
}

.brand-copy small {
  display: block;
  margin-top: 3px;
  color: #9ec7e8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand-icon,
.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 7px;
  background: #182d35;
  color: #fff;
}

.brand-icon svg,
.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand strong,
.brand-name {
  display: block;
  font-size: 15px;
  line-height: 1;
  color: #fff;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: #8ec5bf;
  font-size: 9px;
  line-height: 1;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 auto;
  margin-top: 64px;
  padding-top: 10px;
  padding-bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, .13);
}

.nav-section {
  padding: 13px 9px 6px;
  color: #86b5d8;
  font-size: 9px;
  font-weight: 800;
}

.side-nav a,
.logout-link {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #f1f8ff;
  font-size: 12px;
  font-weight: 750;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.side-nav a svg,
.logout-link svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: #fff;
}

.side-nav a.active,
.side-nav a:hover,
.logout-link:hover {
  background: linear-gradient(90deg, #127cff, #0049c9);
  color: #fff;
  transform: translateX(3px);
}

.side-nav a.active {
  box-shadow: 0 9px 22px rgba(18, 124, 255, .28);
}

.side-nav a.active::after {
  position: absolute;
  top: 50%;
  right: -19px;
  width: 0;
  height: 0;
  content: "";
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 19px solid #0049c9;
  transform: translateY(-50%);
}

html[dir="rtl"] .side-nav a.active {
  box-shadow: 0 9px 22px rgba(18, 124, 255, .28);
}

html[dir="rtl"] .side-nav a.active::after {
  right: auto;
  left: -19px;
  border-right: 19px solid #0049c9;
  border-left: 0;
}

.nav-count {
  min-width: 22px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: #d62945;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

html[dir="rtl"] .nav-count {
  margin-right: auto;
  margin-left: 0;
}

.nav-alert-icon {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border-radius: 50%;
  background: #d62945;
  color: #fff;
  box-shadow: 0 0 0 0 rgba(214, 41, 69, .42);
  animation: blink-alert 1s infinite;
}

.nav-alert-icon b {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #9f1239;
  color: #fff;
  font-size: 8px;
  line-height: 1;
}

.nav-oil-alert {
  background: #e11d48;
  box-shadow: 0 0 0 0 rgba(225, 29, 72, .42);
}

.nav-installment-alert {
  background: #0b8bd3;
  box-shadow: 0 0 0 0 rgba(11, 139, 211, .38);
}

.nav-mission-alert {
  background: #127cff;
  box-shadow: 0 0 0 0 rgba(18, 124, 255, .42);
}

.side-nav a .nav-alert-icon svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #fff;
}

html[dir="rtl"] .nav-alert-icon {
  margin-right: auto;
  margin-left: 0;
}

.nav-contract-alert {
  min-width: 30px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: #0f9f6e;
  color: #fff;
  font-size: 9px;
  font-weight: 950;
  box-shadow: 0 0 0 0 rgba(15, 159, 110, .36);
  animation: blink-green-alert 1s infinite;
}

.side-nav a .nav-contract-alert svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  color: #fff;
}

html[dir="rtl"] .nav-contract-alert {
  margin-right: auto;
  margin-left: 0;
}

.logout-link {
  position: static;
  flex: 0 0 auto;
  margin-top: 8px;
  color: #ffe7db;
}

.sidebar-app-logo {
  position: static;
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: auto 0 8px;
  padding: 14px 4px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-app-logo img {
  width: 100%;
  max-width: 232px;
  max-height: 178px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 15, 35, .34));
}

.app {
  min-height: 100vh;
  margin-left: 0;
  padding: 14px 16px 18px;
}

html[dir="rtl"] .app {
  padding: 14px 16px 18px;
}

.topbar {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding-left: 112px;
  padding-top: 10px;
  padding-right: 14px;
  padding-bottom: 10px;
  border: 1px solid rgba(205, 218, 232, .9);
  border-radius: 28px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 18px 38px rgba(48, 86, 131, .10);
  backdrop-filter: blur(18px);
}

html[dir="rtl"] .topbar {
  padding-right: 112px;
  padding-left: 0;
}

.topbar small {
  color: var(--accent-blue);
  font-size: 9px;
  font-weight: 900;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-search {
  position: relative;
  width: min(330px, 31vw);
  display: block;
}

.global-search svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  width: 14px;
  height: 14px;
  color: #93a2a8;
  transform: translateY(-50%);
}

.global-search input {
  min-height: 38px;
  padding: 0 14px 0 36px;
  border: 1px solid rgba(215, 226, 238, .98);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: var(--text);
  box-shadow: 0 10px 24px rgba(51, 90, 132, .08);
  font-size: 12px;
}

.language-switch,
.theme-switch {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(215, 226, 238, .98);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(51, 90, 132, .08);
}

.language-switch svg {
  width: 15px;
  height: 15px;
  color: #159787;
}

.language-switch select {
  width: auto;
  min-width: 92px;
  min-height: 30px;
  padding: 0 22px 0 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  outline: 0;
}

.theme-switch,
.contract-beep-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(215, 226, 238, .98);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: var(--text);
  cursor: pointer;
  user-select: none;
  box-shadow: 0 10px 24px rgba(51, 90, 132, .08);
}

.theme-switch input,
.contract-beep-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-switch-icons,
.contract-beep-toggle span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--muted);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.theme-switch-icons svg,
.contract-beep-toggle span svg {
  width: 14px;
  height: 14px;
}

.theme-switch b,
.contract-beep-toggle b {
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.theme-switch input:checked + .theme-switch-icons,
.contract-beep-toggle input:checked + span {
  background: #0f9f6e;
  color: #fff;
  box-shadow: 0 0 0 5px rgba(15, 159, 110, .12);
}

.theme-switch .theme-icon-dark {
  display: none;
}

.theme-switch input:checked + .theme-switch-icons .theme-icon-light {
  display: none;
}

.theme-switch input:checked + .theme-switch-icons .theme-icon-dark {
  display: block;
}

html[dir="rtl"] .global-search svg {
  right: 12px;
  left: auto;
}

html[dir="rtl"] .global-search input {
  padding: 0 34px 0 14px;
}

html[dir="rtl"] .language-switch select {
  padding: 0 0 0 22px;
}

.user-pill {
  min-width: 122px;
  min-height: 46px;
  display: grid;
  align-content: center;
  padding: 0 14px;
  border: 1px solid rgba(215, 226, 238, .98);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 24px rgba(51, 90, 132, .08);
}

.user-pill.access-countdown {
  min-width: 172px;
  gap: 1px;
}

.user-pill strong,
.user-pill span,
.user-pill .test-time-left,
.user-pill .company-time-left {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill strong {
  font-size: 11px;
}

.user-pill span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.user-pill .test-time-left {
  margin-top: 1px;
  color: #925600;
  font-size: 9px;
  font-weight: 950;
}

.user-pill .company-time-left {
  margin-top: 1px;
  color: #08725f;
  font-size: 9px;
  font-weight: 950;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(var(--metric-count, 10), minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}

.metric-card {
  position: relative;
  display: block;
  min-height: 38px;
  overflow: hidden;
  padding: 10px 28px 10px 12px;
  border-radius: 18px;
  color: #fff;
  transition: box-shadow .16s ease, filter .16s ease, transform .16s ease;
  box-shadow: 0 14px 30px rgba(48, 86, 131, .14);
}

html[dir="rtl"] .metric-card {
  padding: 6px 8px 5px 28px;
  text-align: right;
}

.metric-card.is-clickable {
  cursor: pointer;
}

.metric-card.is-clickable:hover {
  transform: translateY(-2px);
  filter: saturate(1.06);
  box-shadow: 0 10px 22px rgba(23, 51, 59, .16);
}

.metric-card.is-clickable:focus-visible {
  outline: 3px solid rgba(21, 154, 137, .35);
  outline-offset: 2px;
}

.metric-card.is-clickable:active {
  transform: translateY(0) scale(.985);
}

.mobile-update-card {
  display: none;
}

.metric-card::after {
  position: absolute;
  top: -15px;
  right: -16px;
  width: 42px;
  height: 42px;
  content: "";
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}

html[dir="rtl"] .metric-card::after {
  right: auto;
  left: -18px;
}

.metric-card p {
  position: relative;
  z-index: 2;
  margin: 0 0 3px;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 800;
}

.metric-card strong {
  position: relative;
  z-index: 2;
  display: block;
  font-size: 22px;
  line-height: .95;
}

.metric-card small {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 700;
  opacity: .9;
}

.metric-icon {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
}

html[dir="rtl"] .metric-icon {
  right: auto;
  left: 8px;
}

.metric-icon svg {
  width: 18px;
  height: 18px;
}

.green { background: linear-gradient(135deg, #2f80ed, #7c3aed); }
.blue { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.red { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.orange { background: linear-gradient(135deg, #f59e0b, #fb7185); }
.violet { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.cyan { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.slate { background: linear-gradient(135deg, #334155, #1e293b); }
.gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.amber { background: linear-gradient(135deg, #f97316, #ec4899); }
.indigo { background: linear-gradient(135deg, #2563eb, #7c3aed); }

.dashboard-available-pulse {
  border: 1px solid #2563eb;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .28);
  animation: dashboardAvailableBlink .72s steps(2, end) infinite;
}

.dashboard-recovery-pulse {
  border: 1px solid #f97316;
  background: linear-gradient(135deg, #f97316, #ec4899);
  box-shadow: 0 14px 30px rgba(249, 115, 22, .26);
  animation: dashboardRecoveryBlink .72s steps(2, end) infinite;
}

@keyframes dashboardAvailableBlink {
  0%, 100% {
    border-color: #064fbc;
    background: #0b63ce;
    color: #fff;
    box-shadow: 0 2px 0 #063f95, 0 0 0 0 rgba(11, 99, 206, .45);
  }
  50% {
    border-color: #38a8ff;
    background: #e8f4ff;
    color: #064fbc;
    box-shadow: 0 2px 0 #9acbf8, 0 0 0 3px rgba(56, 168, 255, .32);
  }
}

@keyframes dashboardRecoveryBlink {
  0%, 100% {
    border-color: #a63f00;
    background: #d95b00;
    color: #fff;
    box-shadow: 0 2px 0 #8a3100, 0 0 0 0 rgba(217, 91, 0, .45);
  }
  50% {
    border-color: #f59e0b;
    background: #fff7ed;
    color: #9a3412;
    box-shadow: 0 2px 0 #fed7aa, 0 0 0 3px rgba(245, 158, 11, .32);
  }
}

.dashboard-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-main {
  grid-template-columns: minmax(0, 1.62fr) minmax(270px, 1fr);
}

.dashboard-lower {
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 1fr);
}

.panel {
  min-width: 0;
  padding: 16px 18px;
  margin-bottom: 10px;
  border: 1px solid rgba(217, 227, 238, .9);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 40px var(--shadow-color);
  backdrop-filter: blur(16px);
}

.dashboard-grid > .panel {
  margin-bottom: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel h2 {
  margin: 0 0 3px;
  font-size: 15px;
  line-height: 1.15;
  color: #0f2150;
}

.panel p,
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.panel-link {
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  transition: color .15s ease, transform .15s ease;
}

.panel-link:hover {
  color: #1d4ed8;
  transform: translateX(2px);
}

.page-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(209, 222, 238, .95);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(243, 248, 255, .94)),
    linear-gradient(90deg, rgba(47, 128, 237, .10), rgba(255, 122, 24, .08));
  box-shadow: 0 18px 42px rgba(48, 86, 131, .12);
  backdrop-filter: blur(14px);
}

.page-hero-copy {
  display: grid;
  align-content: center;
  gap: 8px;
}

.page-hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .2);
}

.page-hero h2 {
  margin: 0;
  color: #0f2150;
  font-size: 30px;
  line-height: 1.02;
}

.page-hero p {
  margin: 0;
  color: #4f6786;
  font-size: 13px;
  line-height: 1.4;
}

.page-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.page-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(211, 222, 238, .95);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 24px rgba(51, 90, 132, .08);
  color: #23406e;
  font-size: 11px;
  font-weight: 800;
}

.page-hero-chip i {
  width: 15px;
  height: 15px;
  color: #2563eb;
}

.page-hero-chip strong {
  font-size: 14px;
  font-weight: 900;
  color: #0f2150;
}

body[data-page="dashboard"] .page-hero,
body[data-page="missions"] .page-hero,
body[data-page="vehicle_production"] .page-hero,
body[data-page="chauffeur_report"] .page-hero,
body[data-page="vehicle_revenue"] .page-hero {
  padding: 22px 24px;
  border-radius: 20px;
  box-shadow: 0 24px 54px rgba(48, 86, 131, .14);
}

body[data-page="dashboard"] .panel,
body[data-page="missions"] .panel,
body[data-page="vehicle_production"] .panel,
body[data-page="chauffeur_report"] .panel,
body[data-page="vehicle_revenue"] .panel {
  border-radius: 28px;
  border-color: rgba(203, 216, 230, .95);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 44px rgba(48, 86, 131, .12);
}

body[data-page="missions"] .table-wrap table,
body[data-page="vehicle_production"] .table-wrap table,
body[data-page="chauffeur_report"] .table-wrap table,
body[data-page="vehicle_revenue"] .table-wrap table {
  min-width: 760px;
}

body[data-page="missions"] .badge,
body[data-page="vehicle_production"] .badge,
body[data-page="chauffeur_report"] .badge,
body[data-page="vehicle_revenue"] .badge {
  background: #eef4ff;
}

.dashboard-showcase {
  display: grid;
  gap: 14px;
}

.dashboard-welcome {
  position: relative;
  min-height: 155px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 52%);
  align-items: stretch;
  overflow: hidden;
  padding: 24px 28px;
  border: 1px solid rgba(199, 216, 238, .95);
  border-radius: 20px;
  background:
    linear-gradient(110deg, rgba(221, 241, 255, .98) 0%, rgba(202, 232, 255, .94) 38%, rgba(248, 251, 255, .98) 39%, rgba(255, 255, 255, .98) 100%);
  box-shadow: 0 22px 50px rgba(53, 99, 154, .16);
}

.dashboard-welcome::before {
  content: "";
  position: absolute;
  inset: 0 40% 0 auto;
  width: 220px;
  background: linear-gradient(135deg, rgba(33, 127, 255, .72), rgba(160, 47, 255, .74));
  clip-path: polygon(38% 0, 100% 0, 62% 100%, 0 100%);
  opacity: .8;
  pointer-events: none;
}

.dashboard-welcome-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  align-content: center;
}

.dashboard-kicker {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #0b4eb8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dashboard-welcome h2 {
  margin: 0;
  color: #07185f;
  font-size: clamp(32px, 4.8vw, 48px);
  line-height: .95;
  letter-spacing: -.05em;
}

.dashboard-welcome p {
  max-width: 650px;
  margin: 0;
  color: #0d3174;
  font-size: 15px;
  font-weight: 700;
}

.dashboard-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.dashboard-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #061f68;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-trust-row i {
  width: 19px;
  height: 19px;
  color: #1684ff;
}

.dashboard-trust-row span:nth-child(2) i {
  color: #a42fff;
}

.dashboard-trust-row span:nth-child(3) i {
  color: #1172ee;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-stat-card,
.dashboard-widget {
  border: 1px solid rgba(211, 225, 241, .95);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 38px rgba(48, 86, 131, .12);
}

.dashboard-stat-card {
  position: relative;
  min-height: 116px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  align-items: center;
  padding: 18px 20px;
  overflow: hidden;
}

.dashboard-stat-icon {
  grid-row: span 3;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #127cff, #0049c9);
  color: #fff;
  box-shadow: 0 14px 26px rgba(18, 124, 255, .28);
}

.dashboard-stat-icon.pink {
  background: linear-gradient(135deg, #ff5d90, #e51383);
}

.dashboard-stat-icon.orange {
  background: linear-gradient(135deg, #ffb22b, #ff7800);
}

.dashboard-stat-icon i {
  width: 28px;
  height: 28px;
}

.dashboard-stat-card p {
  margin: 0;
  color: #07185f;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-stat-card strong {
  color: #07185f;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.dashboard-stat-card small {
  color: #637a9e;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-mini-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9e7f7;
}

.dashboard-mini-progress span {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f46e5, #1488ff);
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: 1.1fr .82fr 1fr;
  gap: 14px;
  align-items: start;
}

.dashboard-widget {
  min-height: 220px;
  padding: 16px 18px;
}

.dashboard-widget-wide {
  grid-column: span 1;
}

.dashboard-widget-tall {
  min-height: 220px;
}

.dashboard-widget-map {
  grid-column: span 2;
  min-height: 330px;
}

.dashboard-widget-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.dashboard-widget-head h3 {
  margin: 0;
  color: #07185f;
  font-size: 16px;
  line-height: 1.15;
}

.dashboard-widget-head p {
  margin: 4px 0 0;
  color: #6b7f9e;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-widget-head > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0b63da;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-widget-head i {
  width: 16px;
  height: 16px;
}

.dashboard-bars {
  height: 162px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  padding: 8px 4px 0;
  background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(152, 171, 199, .24) 31px 32px);
}

.dashboard-bars span {
  position: relative;
  display: block;
  min-height: 20px;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #1185ff, #5147f4);
  box-shadow: 0 12px 22px rgba(28, 111, 241, .2);
}

.dashboard-bars span:nth-child(even) {
  background: linear-gradient(180deg, #ae35ff, #6f36ee);
}

.dashboard-bars em {
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  color: #546b8e;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-fleet-list {
  display: grid;
  gap: 14px;
}

.dashboard-fleet-row {
  display: grid;
  gap: 8px;
}

.dashboard-fleet-row > div:first-child,
.dashboard-ring-info span,
.dashboard-plan-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-fleet-row > div:first-child span,
.dashboard-ring-info i,
.dashboard-plan-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 999px;
  background: #117cff;
}

.dashboard-fleet-row.free > div:first-child span,
.dashboard-ring-info .free,
.dashboard-plan-legend .free {
  background: #15c76f;
}

.dashboard-fleet-row.maintenance > div:first-child span,
.dashboard-ring-info .maintenance,
.dashboard-plan-legend .maintenance {
  background: #7b8799;
}

.dashboard-plan-legend .reserved {
  background: #f7b500;
}

.dashboard-fleet-row strong {
  color: #07185f;
  font-size: 12px;
}

.dashboard-fleet-row em {
  margin-left: auto;
  color: #07185f;
  font-style: normal;
  font-weight: 950;
}

.dashboard-activity-list,
.dashboard-compact-list {
  display: grid;
  gap: 11px;
}

.dashboard-activity-row,
.dashboard-compact-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(218, 229, 242, .78);
}

.dashboard-activity-row:last-child,
.dashboard-compact-list > div:last-child {
  border-bottom: 0;
}

.dashboard-activity-icon,
.dashboard-compact-list span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eaf4ff;
  color: #0b63da;
}

.dashboard-activity-icon i,
.dashboard-compact-list span i {
  width: 19px;
  height: 19px;
}

.dashboard-activity-row strong,
.dashboard-compact-list strong {
  display: block;
  color: #07185f;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-activity-row small,
.dashboard-compact-list small {
  display: block;
  margin-top: 2px;
  color: #657b9d;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-compact-list em {
  color: #07185f;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.dashboard-parking-plan {
  min-height: 230px;
  display: grid;
  grid-template-columns: repeat(8, minmax(42px, 1fr));
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .72)),
    linear-gradient(135deg, #3db45d, #1d7f52);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}

.dashboard-parking-plan span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
  color: #0b63da;
  box-shadow: 0 12px 20px rgba(15, 53, 91, .1);
}

.dashboard-parking-plan span.free {
  color: #0dbd5e;
}

.dashboard-parking-plan span.reserved {
  color: #e4a700;
}

.dashboard-parking-plan span.maintenance {
  color: #64748b;
}

.dashboard-parking-plan i {
  width: 24px;
  height: 24px;
}

.dashboard-plan-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  color: #07185f;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-ring-wrap {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: center;
}

.dashboard-ring {
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(#1185ff calc(var(--value) * 1%), #79d8ff 0, #e6eef8 100%);
  box-shadow: inset 0 0 0 16px rgba(255, 255, 255, .92), 0 16px 28px rgba(16, 103, 223, .14);
}

.dashboard-ring strong {
  color: #07185f;
  font-size: 28px;
  font-weight: 950;
}

.dashboard-ring-info {
  display: grid;
  gap: 12px;
  color: #07185f;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-ring-info strong {
  margin-left: auto;
}

.dashboard-empty {
  margin: 8px 0 0;
  color: #71839f;
  font-size: 12px;
  font-weight: 800;
}

.panel-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.device-period-form {
  display: inline-flex;
  align-items: end;
  gap: 7px;
  flex-wrap: wrap;
}

.device-period-form label {
  min-width: 126px;
  font-size: 9px;
}

.device-period-form input,
.device-period-form select {
  min-height: 28px;
  padding: 5px 7px;
  font-size: 10px;
}

.device-period-form button {
  cursor: pointer;
}

.action-link {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(201, 215, 230, .95);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  color: #1d4ed8;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.pagination-links {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.pagination-link {
  min-width: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid rgba(201, 215, 230, .95);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  color: var(--text);
}

.pagination-link.active {
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
}

.vehicle-management-table {
  min-width: 1880px;
}

.installments-table {
  min-width: 760px;
}

.installments-report-table {
  min-width: 1060px;
}

.vehicle-production-table {
  min-width: 1360px;
}

.vehicle-revenue-table,
.agents-report-table {
  min-width: 1120px;
}

.production-report-head {
  align-items: flex-end;
}

.production-period-form input {
  min-width: 132px;
}

.production-download {
  border-color: #0d9a7d;
  background: #eaf9f5;
  color: #08755f;
}

.global-report-form {
  display: grid;
  gap: 12px;
}

.global-report-period {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.global-report-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 8px;
}

.global-report-option {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .68);
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
}

.global-report-option input {
  width: 16px;
  height: 16px;
  accent-color: #0d8f7f;
}

.vehicle-id-chip {
  width: 136px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 4px 9px;
  box-sizing: border-box;
  border: 1px solid #bfd4dc;
  border-radius: 6px;
  background: #f8fbfc;
  color: #16323f;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.registration-chip {
  border-color: #d5c78a;
  background: #fff9df;
  color: #6e5705;
  direction: ltr;
  unicode-bidi: isolate-override;
  font-family: Arial, Tahoma, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0;
  gap: 3px;
}

.registration-part,
.registration-separator {
  direction: ltr;
  unicode-bidi: isolate;
  flex: 0 0 auto;
}

.registration-letter {
  min-width: 14px;
  font-family: Tahoma, Arial, sans-serif;
}

.model-chip {
  border-color: #b8d5e4;
  background: #eef8fc;
  color: #164f68;
}

.vehicle-pair-chips {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.revenue-total {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf9f5;
  color: #08755f;
  font-size: 10px;
  font-weight: 900;
}

.production-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 16px;
}

.production-summary article {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  border: 1px solid rgba(217, 227, 238, .92);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 250, 255, .95));
  box-shadow: 0 12px 28px rgba(48, 86, 131, .08);
}

.production-summary article > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e9f5f7;
  color: #0f7780;
}

.production-summary article:nth-child(2) > span {
  background: #fff0e4;
  color: #d85c0c;
}

.production-summary article:nth-child(3) > span {
  background: #e9f7ef;
  color: #12835a;
}

.production-summary article:nth-child(4) > span {
  background: #eef1ff;
  color: #4155b9;
}

.production-summary svg {
  width: 18px;
  height: 18px;
}

.production-summary p {
  min-width: 0;
  display: grid;
  gap: 3px;
  margin: 0;
  color: #617681;
  font-size: 10px;
}

.production-summary strong {
  color: #18323e;
  font-size: 18px;
  line-height: 1.1;
}

.production-extremes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.production-extremes article {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 227, 238, .92);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .95));
  box-shadow: 0 12px 28px rgba(48, 86, 131, .08);
}

.production-extremes article > span {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dff5ec;
  color: #0a8b64;
}

.production-extremes .least-rented > span {
  background: #fff0ed;
  color: #c84a3b;
}

.production-extremes svg {
  width: 17px;
  height: 17px;
}

.production-extremes p {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  margin: 0;
}

.production-extremes small {
  grid-column: 1 / -1;
  color: #607780;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.production-extremes strong {
  min-width: 0;
  overflow: hidden;
  color: #173440;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-extremes em {
  color: #58717c;
  font-size: 10px;
  font-style: normal;
}

.production-period-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-left: 3px solid #15987f;
  background: #f0faf7;
  color: #42646b;
  font-size: 10px;
}

.production-period-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #08755f;
}

.production-rank {
  color: #1d5a73;
  font-weight: 900;
}

.production-km {
  color: #08755f;
  font-weight: 900;
}

.installment-amount {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #e8f6ff;
  color: #075f9f;
  font-size: 10px;
  font-weight: 900;
}

.oil-change-table {
  min-width: 980px;
}

.spare-parts-table {
  min-width: 1120px;
}

.blacklist-table {
  min-width: 820px;
}

.clients-table {
  min-width: 980px;
}

.clients-table td {
  font-size: 12px;
}

.vehicle-management-table input,
.vehicle-management-table select {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 10px;
}

.vehicle-bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.vehicle-selection-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vehicle-selection-count {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #d9e5e8;
  border-radius: 999px;
  background: #f8fbfc;
  color: #23404f;
  font-size: 10px;
  font-weight: 900;
}

.vehicle-inline-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 8px;
}

.vehicle-inline-select input {
  width: 16px;
  height: 16px;
  accent-color: #b22942;
}

.vehicle-bulk-delete-btn[disabled] {
  opacity: .58;
  cursor: not-allowed;
  box-shadow: none;
}

.status-form {
  display: grid;
  grid-template-columns: 26px minmax(108px, 1fr) 34px;
  gap: 6px;
  align-items: center;
}

.status-form select {
  grid-column: 2;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 10px;
}

.return-km-form {
  display: inline-flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid #d8e8eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

.return-km-form label {
  min-width: 180px;
  font-size: 10px;
  font-weight: 900;
}

.return-km-form input {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.vehicle-status-select,
.vehicle-status-badge {
  font-weight: 900;
}

.vehicle-status-select.available,
.vehicle-status-badge.available {
  border-color: #5aa9e6;
  background: #e2f1ff;
  color: #075f9f;
}

.vehicle-status-select.rented,
.vehicle-status-badge.rented {
  border-color: #63bd86;
  background: #e2f6eb;
  color: #08744c;
}

.vehicle-status-select.maintenance,
.vehicle-status-badge.maintenance {
  border-color: #e5bf42;
  background: #fff4d6;
  color: #8a6200;
}

.vehicle-status-select option[value="disponible"] {
  background: #e2f1ff;
  color: #075f9f;
}

.vehicle-status-select option[value="loue"] {
  background: #e2f6eb;
  color: #08744c;
}

.vehicle-status-select option[value="maintenance"] {
  background: #fff4d6;
  color: #8a6200;
}

.status-form .icon-btn {
  grid-column: 3;
}

.maintenance-builder.compact {
  min-width: 310px;
  gap: 6px;
}

.maintenance-item.compact {
  grid-template-columns: minmax(100px, 1fr) 76px 76px;
  gap: 5px;
}

.compact-add {
  width: max-content;
  min-height: 26px;
  padding: 0 9px;
  font-size: 9px;
}

.expiry-alert-btn {
  grid-column: 1;
  width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #d62945;
  color: #fff;
  cursor: help;
  animation: blink-alert 1s infinite;
}

.expiry-alert-btn svg {
  width: 13px;
  height: 13px;
}

@keyframes blink-alert {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(214, 41, 69, .42);
  }
  50% {
    opacity: .45;
    box-shadow: 0 0 0 5px rgba(214, 41, 69, .08);
  }
}

@keyframes blink-green-alert {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(15, 159, 110, .36);
  }
  50% {
    opacity: .58;
    box-shadow: 0 0 0 5px rgba(15, 159, 110, .08);
  }
}

@keyframes blink-confirmed-status {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(8, 116, 95, .3);
  }
  50% {
    opacity: .62;
    box-shadow: 0 0 0 4px rgba(8, 116, 95, .08);
  }
}

@keyframes blink-blue-alert {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(23, 111, 174, .34);
  }
  50% {
    opacity: .58;
    box-shadow: 0 0 0 5px rgba(23, 111, 174, .08);
  }
}

.activity-panel,
.fleet-panel {
  height: 258px;
}

.activity-panel {
  height: auto;
  min-height: 376px;
}

.line-chart {
  position: relative;
  height: 208px;
  padding: 4px 5px 24px 31px;
}

.line-chart svg {
  width: 100%;
  height: 174px;
  overflow: visible;
}

.chart-grid line {
  stroke: #e5ecee;
  stroke-width: 1;
}

.chart-area {
  fill: url(#activity-fill);
}

.chart-line {
  fill: none;
  stroke: #269e8d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.chart-points circle {
  fill: #269e8d;
  stroke: #fff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.missions-chart .chart-area {
  fill: url(#missions-fill);
}

.missions-chart .chart-line {
  stroke: #6f36ee;
}

.missions-chart .chart-points circle {
  fill: #6f36ee;
}

.y-axis {
  position: absolute;
  top: 8px;
  bottom: 28px;
  left: 0;
  width: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  color: #85959b;
  font-size: 8px;
}

.x-axis {
  position: absolute;
  right: 3px;
  bottom: 1px;
  left: 31px;
  display: flex;
  justify-content: space-between;
  color: #85959b;
  font-size: 7px;
}

.dashboard-mission-stats {
  display: inline-flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-mission-stats span {
  display: grid;
  gap: 2px;
  min-width: 84px;
  padding: 8px 10px;
  border: 1px solid rgba(211, 225, 241, .9);
  border-radius: 14px;
  background: rgba(244, 249, 255, .98);
}

.dashboard-mission-stats strong {
  color: #0f2150;
  font-size: 12px;
  font-weight: 950;
}

.dashboard-mission-stats small {
  color: #667a98;
  font-size: 9px;
  font-weight: 800;
}

.dashboard-mission-feed {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.dashboard-mission-item {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid rgba(211, 225, 241, .9);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 20px rgba(48, 86, 131, .08);
}

.dashboard-mission-item strong {
  color: #0f2150;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-mission-item small {
  color: #667a98;
  font-size: 9px;
  font-weight: 800;
}

.dashboard-mission-item em {
  color: #6f36ee;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.fleet-chart {
  position: relative;
  height: 204px;
  overflow: hidden;
  border-bottom: 1px solid #e5ecee;
}

.fleet-grid {
  position: absolute;
  inset: 0 0 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fleet-grid span {
  width: 100%;
  border-top: 1px solid #e7edef;
}

.fleet-bars {
  position: absolute;
  inset: 10px 18px 0;
  display: flex;
  align-items: end;
  justify-content: space-around;
  gap: 18px;
}

.fleet-bars > div {
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.fleet-bars > div > span {
  width: min(42px, 75%);
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: #2b9f90;
}

.fleet-bars > div:nth-child(2) > span {
  background: #f1792d;
}

.fleet-bars > div:nth-child(3) > span {
  background: #2572ad;
}

.fleet-bars small {
  height: 20px;
  padding-top: 6px;
  color: #71848b;
  font-size: 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-scroll-top {
  width: 100%;
  height: 16px;
  margin: 4px 0 6px;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 999px;
  background: rgba(14, 35, 56, .12);
  scrollbar-color: #5fb7e5 rgba(14, 35, 56, .14);
}

.table-scroll-top[hidden] {
  display: none;
}

.table-scroll-top-inner {
  height: 1px;
}

table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  overflow: hidden;
}

th,
td {
  padding: 8px 7px;
  border-bottom: 1px solid #e7eef6;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #5c6f87;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

td {
  color: #12213e;
  font-size: 11px;
}

.dashboard-lower .panel {
  min-height: 154px;
}

.dashboard-lower table {
  min-width: 530px;
}

.dashboard-lower th,
.dashboard-lower td {
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 9px;
}

.badge {
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2563eb;
  font-size: 9px;
  font-weight: 800;
}

.badge.pending {
  background: #fff4db;
  color: #b45309;
}

.badge.confirmed {
  background: #e4f8ef;
  color: #0f766e;
  animation: blink-confirmed-status 1s infinite;
}

.badge.cancelled {
  background: #fde7ef;
  color: #be185d;
}

.mission-status-blink {
  animation: blink-confirmed-status 1s infinite;
}

.mission-action-form {
  display: inline-block;
  margin: 0 4px 4px 0;
}

.mission-done-btn {
  background: linear-gradient(135deg, #0f9d7a, #0b7f63);
  color: #fff;
}

.mission-failed-btn {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
}

.mission-action-form button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.contracts-table {
  min-width: 1860px;
}

.contracts-table input,
.contracts-table select {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 11px;
}

.contracts-table th,
.contracts-table td {
  padding: 12px 9px;
}

.contracts-table td {
  font-size: 12px;
  color: #17333b;
}

.contracts-table strong {
  white-space: nowrap;
}

.contract-status-select {
  min-width: 132px;
  font-weight: 900;
  white-space: nowrap;
}

.contract-status-select.pending {
  border-color: #e5b63b;
  background: #fff4d6;
  color: #8a5b00;
}

.contract-status-select.confirmed {
  border-color: #66b98b;
  background: #e2f6eb;
  color: #0c6f46;
  animation: blink-confirmed-status 1s infinite;
}

.contract-status-select.cancelled {
  border-color: #e08695;
  background: #fde8ec;
  color: #a82940;
}

.contract-status-select option[value="en_attente"] {
  background: #fff4d6;
  color: #8a5b00;
}

.contract-status-select option[value="confirme"],
.contract-status-select option[value="actif"] {
  background: #e2f6eb;
  color: #0c6f46;
}

.contract-status-select option[value="annule"] {
  background: #fde8ec;
  color: #a82940;
}

.video-link,
.download-link {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 6px;
  background: #eef7fb;
  color: #176fae;
  font-size: 9px;
  font-weight: 800;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.video-link:hover,
.download-link:hover {
  transform: translateY(-1px);
  background: #dff0f8;
  color: #0d5689;
}

.download-link svg {
  width: 13px;
  height: 13px;
}

.contract-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: center;
  min-width: 116px;
}

.contract-actions form {
  margin: 0;
}

.status-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.contract-new-alert {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 999px;
  background: #dcf8e8;
  color: #087a4e;
  border: 1px solid #8fdcb9;
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
  animation: blink-green-alert 1s infinite;
}

.contract-new-alert svg {
  width: 13px;
  height: 13px;
}

.contract-countdown {
  min-height: 26px;
  min-width: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #e5f2ff;
  color: #075ca8;
  border: 1px solid #8fc7f7;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 0 0 0 rgba(23, 111, 174, .34);
  animation: blink-blue-alert 1s infinite;
}

.blacklist-warning {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 6px;
  background: #fff1d6;
  color: #8a5600;
  border: 1px solid #f2ca7b;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.blacklist-warning svg {
  width: 13px;
  height: 13px;
}

.contract-panel,
.contracts-list-panel {
  padding: 16px;
  border: 1px solid rgba(205, 222, 229, .72);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 14px 38px rgba(15, 45, 60, .08);
  backdrop-filter: blur(6px);
}

.contract-stack {
  display: grid;
  gap: 18px;
}

.contract-record {
  display: grid;
  gap: 10px;
}

.contract-sheet {
  --contract-ink: #263574;
  display: grid;
  gap: 10px;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 18px;
  border: 2px solid rgba(38, 53, 116, .8);
  border-radius: 8px;
  background: rgba(255, 255, 246, .9);
  color: var(--contract-ink);
  box-shadow: inset 0 0 0 1px rgba(38, 53, 116, .16);
}

.contract-sheet label {
  display: grid;
  gap: 3px;
  color: var(--contract-ink);
  font-size: 12px;
  font-weight: 900;
}

.contract-sheet input,
.contract-sheet select,
.contract-sheet textarea {
  width: 100%;
  min-height: 30px;
  padding: 5px 7px;
  border: 0;
  border-bottom: 1px dotted rgba(38, 53, 116, .72);
  border-radius: 0;
  background: rgba(255, 255, 255, .42);
  color: #132535;
  font-size: 12px;
  font-weight: 700;
}

.contract-sheet textarea {
  min-height: 58px;
  border: 1px dotted rgba(38, 53, 116, .72);
  resize: vertical;
}

.contract-paper-head {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
}

.contract-logo-frame {
  height: 82px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(38, 53, 116, .8);
  border-radius: 8px;
  background: rgba(255, 255, 255, .5);
  overflow: hidden;
}

.contract-logo-frame img {
  max-width: 96%;
  max-height: 76px;
  object-fit: contain;
}

.contract-brand-title {
  display: grid;
  gap: 4px;
  text-align: center;
}

.contract-brand-title strong {
  font-size: 28px;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.contract-brand-title span {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .03em;
}

.contract-main-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 28px;
  font-weight: 900;
}

.contract-main-title span {
  font-size: 24px;
}

.contract-main-title b {
  font-size: 18px;
  letter-spacing: .08em;
}

.contract-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  color: #31415c;
  font-size: 11px;
  font-weight: 900;
}

.contract-meta-line span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(38, 53, 116, .08);
}

.contract-top-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.drivers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.drivers-grid fieldset {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 10px;
  border: 2px solid rgba(38, 53, 116, .8);
  border-radius: 8px;
}

.drivers-grid legend {
  width: 90%;
  padding: 3px 10px;
  border: 2px solid rgba(38, 53, 116, .8);
  border-radius: 999px;
  background: rgba(255, 255, 246, .94);
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.contract-date-km {
  display: grid;
  grid-template-columns: 1.25fr .8fr;
  gap: 12px;
}

.contract-date-table,
.place-time-table {
  display: grid;
  border: 2px solid rgba(38, 53, 116, .8);
  border-radius: 8px;
  overflow: hidden;
}

.contract-date-table {
  grid-template-columns: 150px 1fr;
}

.contract-date-table > *,
.place-time-table > * {
  min-height: 36px;
  display: grid;
  align-items: center;
  padding: 6px 10px;
  border-right: 1px solid rgba(38, 53, 116, .55);
  border-bottom: 1px solid rgba(38, 53, 116, .55);
}

.contract-date-table > :nth-child(2n),
.place-time-table > :nth-child(3n) {
  border-right: 0;
}

.contract-date-table input,
.place-time-table input {
  border: 0;
  background: transparent;
}

.contract-date-table em {
  font-style: normal;
  font-weight: 900;
}

.contract-km-box,
.fuel-box {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 2px solid rgba(38, 53, 116, .8);
  border-radius: 8px;
}

.place-time-table {
  grid-template-columns: 170px 1fr 170px;
}

.fuel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vehicle-sketch {
  min-height: 125px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(38, 53, 116, .8);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(38, 53, 116, .08), rgba(255, 255, 255, .28));
  color: rgba(38, 53, 116, .72);
  font-weight: 900;
}

.contract-responsibility {
  margin: 0;
  color: var(--contract-ink);
  font-size: 12px;
  font-style: italic;
  font-weight: 900;
  line-height: 1.35;
}

.contract-signature-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contract-signature-link {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 10px;
  border: 2px solid rgba(38, 53, 116, .8);
  border-radius: 8px;
  background: rgba(255, 255, 255, .58);
  text-align: center;
}

.contract-signature-link strong {
  font-size: 12px;
  font-weight: 900;
}

.contract-signature-tools {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
}

.contract-signature-tools img {
  width: 132px;
  height: 132px;
  padding: 5px;
  border: 1px solid rgba(38, 53, 116, .28);
  border-radius: 6px;
  background: #fff;
}

.contract-signature-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 92px;
  min-height: 48px;
  padding: 0 10px;
  border: 2px solid rgba(38, 53, 116, .82);
  border-radius: 6px;
  background: #f7fbff;
  color: #263574;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(38, 53, 116, .22);
  transition: transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.contract-signature-copy:hover,
.contract-signature-copy:focus-visible,
.contract-signature-copy.is-copied {
  background: #0f9f6e;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 rgba(14, 116, 77, .24);
}

.contract-signature-copy svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

.contract-signature-copy span {
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.contract-signature-link small {
  color: #1c4d8f;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  min-height: 12px;
}

.signature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.signature-row > div {
  min-height: 112px;
  display: grid;
  gap: 6px;
  place-items: start stretch;
  padding: 8px;
  border: 2px solid rgba(38, 53, 116, .8);
  border-radius: 4px;
  font-weight: 900;
}

.signature-pad span {
  text-align: center;
}

.signature-date-pad {
  position: relative;
  overflow: hidden;
}

.contract-stamp {
  position: absolute;
  z-index: 1;
  top: 31px;
  left: 50%;
  width: min(90%, 210px);
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 9px;
  border: 2px solid #1f55a8;
  background: rgba(255, 255, 255, .62);
  color: #1f55a8;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%) rotate(-12deg);
  pointer-events: none;
}

.contract-stamp b {
  font-size: 12px;
  line-height: 1.05;
}

.contract-stamp small {
  overflow: hidden;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-pad canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 82px;
  border: 1px dashed rgba(38, 53, 116, .62);
  border-radius: 4px;
  background: rgba(255, 255, 255, .42);
  cursor: crosshair;
  touch-action: none;
}

.signature-pad .small-btn {
  min-height: 28px;
  padding: 0 8px;
  justify-self: center;
  font-size: 10px;
}

.contract-footer {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 2px solid rgba(38, 53, 116, .8);
  text-align: center;
  font-weight: 900;
}

.contract-footer span {
  font-size: 12px;
  line-height: 1.35;
}

.contract-extra-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 12px;
  align-items: start;
  padding-top: 8px;
}

.contract-notes {
  margin-top: 4px;
}

.contract-action-bar {
  max-width: 1120px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid rgba(205, 222, 229, .74);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
}

.contract-action-bar form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.contract-action-bar input[type="date"] {
  min-height: 32px;
  max-width: 150px;
  padding: 6px 8px;
  border: 1px solid #cbdde4;
  border-radius: 7px;
}

.contracts-summary-table {
  min-width: 1180px;
}

.contracts-summary-table th,
.contracts-summary-table td {
  vertical-align: middle;
}

.contracts-summary-table td {
  font-size: 12px;
}

.contracts-summary-table strong {
  white-space: nowrap;
}

.contracts-summary-table .blacklist-warning,
.contracts-summary-table .video-link,
.contracts-summary-table .download-link,
.contracts-summary-table .contract-countdown {
  white-space: nowrap;
}

.contract-view-btn {
  min-width: 106px;
  min-height: 34px;
  padding: 0 10px;
  background: #0f9f6e;
  font-size: 11px;
  white-space: nowrap;
}

.available-vehicle-list {
  margin-top: 4px;
}

.available-vehicles-table {
  min-width: 520px;
}

.available-vehicles-table td {
  font-size: 12px;
  font-weight: 800;
}

.available-status-pulse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #064fbc;
  border-radius: 6px;
  background: #0b63ce;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow: 0 2px 0 #063f95, 0 0 0 0 rgba(11, 99, 206, .55);
  animation: availableButtonBlink .72s steps(2, end) infinite;
  white-space: nowrap;
}

@keyframes availableButtonBlink {
  0%, 100% {
    border-color: #064fbc;
    background: #0b63ce;
    color: #fff;
    box-shadow: 0 2px 0 #063f95, 0 0 0 0 rgba(11, 99, 206, .55);
  }
  50% {
    border-color: #38a8ff;
    background: #e8f4ff;
    color: #064fbc;
    box-shadow: 0 2px 0 #9acbf8, 0 0 0 3px rgba(56, 168, 255, .35);
  }
}

.contract-row-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.contract-row-actions form {
  margin: 0;
}

.contract-row-actions .small-btn,
.contract-row-actions .danger-btn {
  min-width: 86px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 10px;
}

.vehicle-alerts-table {
  min-width: 840px;
}

.devices-table {
  min-width: 1480px;
}

.devices-table td {
  font-size: 12px;
}

.devices-table strong,
.devices-table small {
  display: block;
}

.devices-table small {
  max-width: 260px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-alerts-table td {
  font-size: 12px;
}

.alert-type,
.alert-state {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.alert-state-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.row-alert-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #d62945;
  color: #fff;
  box-shadow: 0 0 0 0 rgba(214, 41, 69, .42);
  animation: blink-alert 1s infinite;
}

.row-alert-icon svg {
  width: 15px;
  height: 15px;
  color: #fff;
}

.alert-type {
  background: #eef7fb;
  color: #176fae;
}

.alert-row.upcoming .alert-state {
  background: #fff4d6;
  color: #8a5b00;
}

.alert-row.expired .alert-state {
  background: #fde8ec;
  color: #a82940;
}

.renew-form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.public-signature-screen {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #eef7f4, #f8fbff 52%, #fff7e8);
  color: #132535;
}

.public-signature-confirmation {
  display: grid;
  min-height: 100vh;
  box-sizing: border-box;
  place-items: center;
  padding: 24px;
  color: #18633c;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.public-signature-shell {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.public-signature-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(205, 222, 229, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 46px rgba(15, 45, 60, .12);
}

.public-signature-head {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
}

.public-signature-head img {
  width: 86px;
  height: 66px;
  object-fit: contain;
}

.public-signature-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.public-signature-head p,
.public-signature-summary span,
.public-contract-conditions p {
  margin: 0;
}

.public-signature-summary {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 8px;
  background: #f4f8fa;
  font-weight: 800;
}

.public-contract-conditions {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(205, 222, 229, .9);
  border-radius: 8px;
  background: #fff;
}

.public-contract-conditions h2,
.public-electronic-signature-notice h2 {
  margin: 0;
  font-size: 18px;
}

.public-contract-conditions h3 {
  margin: 6px 0 -4px;
  color: #263574;
  font-size: 14px;
}

.public-electronic-signature-notice {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(205, 222, 229, .9);
  border-radius: 8px;
  background: #f8fbff;
}

.public-electronic-signature-notice p {
  margin: 0;
  line-height: 1.5;
}

.public-signature-form {
  display: grid;
  gap: 12px;
}

.public-accept-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 900;
}

.public-accept-row input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.public-signature-pad {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 2px solid rgba(38, 53, 116, .8);
  border-radius: 8px;
  background: #fffefa;
  font-weight: 900;
}

.public-signature-pad canvas {
  width: 100%;
  height: 210px;
}

.renew-form input[type="date"] {
  width: 132px;
  min-height: 30px;
  padding: 5px 7px;
  font-size: 10px;
}

.contract-actions .small-btn,
.contract-actions .danger-btn {
  min-height: 36px;
  padding: 0 10px;
  font-size: 10px;
}

.team-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 6px;
}

.team-summary > div {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.team-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
}

.team-icon svg {
  width: 17px;
  height: 17px;
}

.blue-soft {
  background: #e7f1fa;
  color: #2673ad;
}

.green-soft {
  background: #e4f5f1;
  color: #138d7d;
}

.team-summary p {
  display: grid;
  gap: 5px;
}

.team-summary b {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.team-summary small {
  color: var(--muted);
  font-size: 9px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 11px;
  align-items: stretch;
}

.vehicle-add-form {
  align-items: start;
}

.vehicle-add-form > label {
  align-self: start;
}

.stack-form {
  display: grid;
  gap: 11px;
}

label {
  display: grid;
  gap: 5px;
  color: #405960;
  font-size: 11px;
  font-weight: 800;
}

.registration-field {
  align-self: stretch;
}

.ww-registration-option {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid #d5c78a;
  border-radius: 6px;
  background: #fff9df;
  color: #6e5705;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.ww-registration-option input {
  width: 14px;
  min-height: 14px;
  height: 14px;
  padding: 0;
  margin: 0;
  accent-color: #0d9a7d;
}

.ww-registration-active {
  border-color: #d5c78a;
  background: #fff9df;
  color: #6e5705;
  font-weight: 900;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 37px;
  padding: 8px 10px;
  border: 1px solid var(--field-border);
  border-radius: 16px;
  background: var(--field-bg);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(15, 32, 56, .04);
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  transform: scale(.75);
  transform-origin: center;
  accent-color: #0d9a7d;
}

.inline-checkbox-field {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 37px;
  align-self: stretch;
}

.inline-checkbox-field > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.chauffeur-access-item {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chauffeur-name-stack {
  display: grid;
  gap: 5px;
  align-self: end;
}

.chauffeur-subcontractor-field {
  min-height: 16px;
  align-self: start;
}

.chauffeur-salary-field {
  align-self: end;
}

.chauffeur-access-block {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 5px 11px;
  align-items: end;
}

.chauffeur-access-title {
  grid-column: 1 / -1;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.excursion-name-stack {
  display: grid;
  gap: 5px;
}

.excursion-date-field {
  align-self: end;
}

.excursion-date-field input[type="date"] {
  min-height: 37px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.model-suggest-menu {
  position: absolute;
  z-index: 120;
  max-height: 286px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(188, 212, 217, .9);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 42px rgba(48, 86, 131, .12);
  backdrop-filter: blur(10px);
}

.model-suggest-option {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.model-suggest-option:hover,
.model-suggest-option:focus-visible {
  background: var(--hover-bg);
  outline: 0;
}

.model-brand-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, hsl(var(--brand-hue), 74%, 42%), hsl(var(--brand-hue), 78%, 26%));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 6px 14px rgba(23, 51, 59, .16);
  font-size: 10px;
  font-weight: 950;
}

.model-brand-logo.has-image {
  background: #fff;
  border: 1px solid #dce8eb;
  overflow: hidden;
}

.model-brand-logo img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.model-suggest-option strong,
.model-suggest-option small {
  display: block;
}

.model-suggest-option strong {
  font-size: 12px;
}

.model-suggest-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

html[dir="rtl"] .model-suggest-option {
  text-align: right;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.span-2 {
  grid-column: span 2;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.maintenance-builder {
  display: grid;
  gap: 8px;
}

.maintenance-items {
  display: grid;
  gap: 7px;
}

.maintenance-item {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) minmax(95px, .75fr) minmax(95px, .75fr);
  gap: 7px;
  align-items: center;
}

.icon-btn {
  width: 34px;
  min-height: 34px;
  background: var(--soft-bg);
  color: #176fae;
}

.icon-btn:hover {
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.file-capture {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.video-capture-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.video-capture-button {
  min-height: 38px;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: var(--soft-bg);
  color: #176fae;
  cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.video-capture-button:hover {
  transform: translateY(-1px);
  background: var(--hover-bg);
  box-shadow: 0 7px 15px rgba(23, 51, 59, .1);
}

.video-capture-button svg {
  width: 16px;
  height: 16px;
}

.file-name {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.primary-btn,
.small-btn,
.danger-btn {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: filter .15s ease, box-shadow .15s ease, transform .15s ease;
}

.primary-btn:hover,
.small-btn:hover,
.danger-btn:hover {
  filter: saturate(1.08) brightness(1.03);
  box-shadow: 0 10px 24px rgba(48, 86, 131, .16);
}

.primary-btn:active,
.small-btn:active,
.danger-btn:active {
  transform: scale(.98);
}

.tap-pulse {
  animation: micro-vibrate .18s linear;
}

@keyframes micro-vibrate {
  0%,
  100% {
    translate: 0 0;
  }

  25% {
    translate: -1px 0;
  }

  50% {
    translate: 1px 0;
  }

  75% {
    translate: -1px 0;
  }
}

.primary-btn {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .26);
}

.small-btn {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  box-shadow: 0 8px 18px rgba(29, 78, 216, .22);
}

.danger-btn {
  background: linear-gradient(135deg, #f97316, #ec4899);
  box-shadow: 0 8px 18px rgba(249, 115, 22, .22);
}

.actions {
  white-space: nowrap;
}

.inline-edit {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr 1fr auto;
  gap: 7px;
  align-items: center;
}

.company-edit-list {
  display: grid;
  gap: 12px;
}

.company-edit-card {
  padding: 12px;
  border: 1px solid rgba(205, 222, 229, .78);
  border-radius: 8px;
  background: rgba(255, 255, 255, .62);
}

.company-list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.company-list-row strong,
.company-list-row span {
  display: block;
}

.company-list-row strong {
  color: var(--text);
  font-size: 14px;
}

.company-list-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.company-row-actions {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.company-row-actions form {
  margin: 0;
}

.companies-list-table {
  min-width: 980px;
}

.companies-list-table th,
.companies-list-table td {
  vertical-align: middle;
}

.companies-list-table td {
  font-size: 12px;
}

.companies-list-table strong {
  color: var(--text);
  font-size: 13px;
}

.companies-list-table form {
  margin: 0;
}

.company-access-badge {
  width: fit-content;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
}

.company-access-badge.active {
  background: #dff5ec;
  color: #08745f;
}

.company-access-badge.expired {
  background: #fff3d7;
  color: #9a6500;
}

.company-access-badge.suspended {
  background: #fde5ea;
  color: #b12d47;
}

.company-access-time,
.company-access-date {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.company-access-time {
  color: #925600;
  font-weight: 950;
}

.company-access-actions {
  width: 230px;
  display: grid;
  gap: 6px;
}

.company-access-actions form {
  display: grid;
  grid-template-columns: 112px 112px;
  gap: 6px;
  align-items: center;
}

.company-access-actions form:last-child {
  grid-template-columns: 112px;
}

.company-access-actions select,
.company-access-actions input {
  width: 112px;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 10px;
}

.users-list-table {
  min-width: 760px;
}

.users-list-table th,
.users-list-table td {
  vertical-align: middle;
}

.users-list-table td {
  font-size: 12px;
}

.users-list-table strong {
  color: var(--text);
  font-size: 13px;
}

.users-list-table form {
  margin: 0;
}

.test-manager-panel {
  border-color: rgba(249, 115, 22, .34);
  background: rgba(255, 251, 245, .82);
}

.test-manager-form {
  align-items: end;
}

.test-btn {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: #f97316;
  color: #fff;
  font-weight: 950;
  cursor: pointer;
  transition: filter .15s ease, box-shadow .15s ease, transform .15s ease;
}

.test-btn:hover {
  filter: saturate(1.08) brightness(1.03);
  box-shadow: 0 7px 15px rgba(249, 115, 22, .2);
  transform: translateY(-1px);
}

.test-btn svg {
  width: 14px;
  height: 14px;
}

.test-account-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff4d6;
  color: #925600;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.test-account-badge.expired {
  background: #fde8ec;
  color: #a82940;
}

.company-action-btn {
  width: 104px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 999px;
}

.companies-list-table .company-action-btn,
.users-list-table .company-action-btn {
  width: 112px;
  height: 34px;
}

.company-action-btn.modify {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.company-edit-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 9px;
  align-items: end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(205, 222, 229, .78);
}

.user-edit-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 9px;
  align-items: end;
}

.company-edit-form[hidden] {
  display: none;
}

.file-choice input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-choice span {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(201, 215, 230, .95);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  color: #1d4ed8;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(51, 90, 132, .08);
}

.file-choice svg {
  width: 15px;
  height: 15px;
}

.company-managers {
  min-height: 37px;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 7px 9px;
  border: 1px solid #ccdadd;
  border-radius: 6px;
  background: rgba(255, 255, 255, .72);
  font-size: 11px;
}

.company-managers strong {
  color: #405960;
  font-size: 10px;
  text-transform: uppercase;
}

.company-managers span {
  color: var(--text);
  font-weight: 800;
}

.company-managers .panel-link {
  justify-self: start;
  font-size: 10px;
}

.company-access-edit-panel {
  margin-top: 10px;
}

.company-inline-access-form {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.company-inline-access-form select,
.company-inline-access-form input[type="date"] {
  width: auto;
  min-width: 110px;
}

.delete-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 7px;
}

.alert {
  margin: 0 0 9px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.success {
  background: #e8f8ee;
  color: #157347;
}

.error {
  background: #fdecef;
  color: #b22942;
}

.alert.error {
  border: 1px solid rgba(127, 29, 29, .28);
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #fff;
  box-shadow: 0 10px 24px rgba(127, 29, 29, .22);
  text-shadow: 0 1px 1px rgba(69, 10, 10, .32);
}

body[data-theme="dark"] .topbar {
  border-color: rgba(148, 163, 184, .24);
  background: #000000;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .28);
}

body[data-theme="dark"] .topbar h1,
body[data-theme="dark"] .topbar small,
body[data-theme="dark"] .top-actions,
body[data-theme="dark"] .top-actions b,
body[data-theme="dark"] .top-actions span {
  color: #f8fbff;
}

body[data-theme="dark"] .global-search input,
body[data-theme="dark"] .language-switch,
body[data-theme="dark"] .language-switch select,
body[data-theme="dark"] .theme-switch,
body[data-theme="dark"] .theme-switch b,
body[data-theme="dark"] .contract-beep-toggle,
body[data-theme="dark"] .contract-beep-toggle b,
body[data-theme="dark"] .user-pill {
  border-color: rgba(148, 163, 184, .24);
  background: #000000;
  color: #f8fbff;
}

body[data-theme="dark"] .global-search input::placeholder {
  color: #a7b7cb;
  opacity: 1;
}

body[data-theme="dark"] .global-search svg {
  color: #8bd9ff;
}

body[data-theme="dark"] .language-switch svg,
body[data-theme="dark"] .theme-switch svg,
body[data-theme="dark"] .contract-beep-toggle svg {
  color: #8bd9ff;
}

body[data-theme="dark"] .theme-switch-icons,
body[data-theme="dark"] .contract-beep-toggle span {
  background: #000000;
  color: #8bd9ff;
}

body[data-theme="dark"] .user-pill span,
body[data-theme="dark"] .user-pill .test-time-left,
body[data-theme="dark"] .user-pill .company-time-left {
  color: #cfe1f3;
}

body[data-theme="dark"] .user-pill .test-time-left {
  color: #ffd39c;
}

body[data-theme="dark"] .user-pill .company-time-left {
  color: #8ff0d0;
}

body[data-theme="dark"] .panel,
body[data-theme="dark"] .page-hero,
body[data-theme="dark"] .dashboard-welcome,
body[data-theme="dark"] .contract-panel,
body[data-theme="dark"] .contracts-list-panel {
  border-color: rgba(148, 163, 184, .22);
  background: #000000 !important;
  color: #f8fbff !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}

body[data-theme="dark"] body[data-page="dashboard"] .page-hero,
body[data-theme="dark"] body[data-page="missions"] .page-hero,
body[data-theme="dark"] body[data-page="vehicle_production"] .page-hero,
body[data-theme="dark"] body[data-page="chauffeur_report"] .page-hero,
body[data-theme="dark"] body[data-page="vehicle_revenue"] .page-hero,
body[data-theme="dark"] body[data-page="dashboard"] .panel,
body[data-theme="dark"] body[data-page="missions"] .panel,
body[data-theme="dark"] body[data-page="vehicle_production"] .panel,
body[data-theme="dark"] body[data-page="chauffeur_report"] .panel,
body[data-theme="dark"] body[data-page="vehicle_revenue"] .panel {
  background: #000000 !important;
  border-color: rgba(148, 163, 184, .24) !important;
  color: #f8fbff !important;
}

body[data-theme="dark"] body[data-page="missions"] .page-hero h2,
body[data-theme="dark"] body[data-page="vehicle_production"] .page-hero h2,
body[data-theme="dark"] body[data-page="chauffeur_report"] .page-hero h2,
body[data-theme="dark"] body[data-page="vehicle_revenue"] .page-hero h2,
body[data-theme="dark"] body[data-page="missions"] .page-hero p,
body[data-theme="dark"] body[data-page="vehicle_production"] .page-hero p,
body[data-theme="dark"] body[data-page="chauffeur_report"] .page-hero p,
body[data-theme="dark"] body[data-page="vehicle_revenue"] .page-hero p {
  color: #f8fbff !important;
}

body[data-theme="dark"] .page-hero h2,
body[data-theme="dark"] .page-hero-chip strong,
body[data-theme="dark"] .panel h2,
body[data-theme="dark"] .dashboard-welcome h2,
body[data-theme="dark"] .contract-panel h2,
body[data-theme="dark"] .contracts-list-panel h2 {
  color: #f8fbff;
}

body[data-theme="dark"] .page-hero p,
body[data-theme="dark"] .dashboard-welcome p,
body[data-theme="dark"] .panel p,
body[data-theme="dark"] .contract-panel p,
body[data-theme="dark"] .contracts-list-panel p,
body[data-theme="dark"] .panel-head p {
  color: #dbe7f3;
}

body[data-theme="dark"] .page-hero-chip {
  border-color: rgba(148, 163, 184, .28);
  background: #000000;
  color: #f8fbff;
}

body[data-theme="dark"] .production-summary article,
body[data-theme="dark"] .dashboard-stat-card {
  border-color: rgba(148, 163, 184, .22);
  background: #000000;
  color: #f8fbff;
}

body[data-theme="dark"] .production-summary article > span,
body[data-theme="dark"] .dashboard-stat-icon {
  background: #050505;
  color: #93e6ff;
}

body[data-theme="dark"] .production-summary article:nth-child(2) > span,
body[data-theme="dark"] .dashboard-stat-icon.pink {
  background: rgba(69, 26, 3, .52);
  color: #ffbf8a;
}

body[data-theme="dark"] .production-summary article:nth-child(3) > span,
body[data-theme="dark"] .dashboard-stat-icon.green {
  background: rgba(3, 65, 49, .52);
  color: #8bf0c5;
}

body[data-theme="dark"] .production-summary article:nth-child(4) > span,
body[data-theme="dark"] .dashboard-stat-icon.violet {
  background: rgba(40, 43, 92, .58);
  color: #b6b9ff;
}

body[data-theme="dark"] .production-summary p,
body[data-theme="dark"] .dashboard-stat-card p {
  color: #dbe7f3;
}

body[data-theme="dark"] .production-summary strong,
body[data-theme="dark"] .dashboard-stat-card strong {
  color: #f8fbff;
}

body[data-theme="dark"] .dashboard-mission-stats span,
body[data-theme="dark"] .dashboard-mission-item,
body[data-theme="dark"] .fleet-chart {
  border-color: rgba(148, 163, 184, .22);
  background: #000000;
  color: #f8fbff;
}

body[data-theme="dark"] .dashboard-mission-stats strong,
body[data-theme="dark"] .dashboard-mission-item strong {
  color: #f8fbff;
}

body[data-theme="dark"] .dashboard-mission-stats small,
body[data-theme="dark"] .dashboard-mission-item small {
  color: #c8d8e8;
}

body[data-theme="dark"] .dashboard-mission-item em {
  color: #9b7cff;
}

body[data-theme="dark"] .line-chart {
  color: #dbe7f3;
}

body[data-theme="dark"] .chart-grid line {
  stroke: rgba(148, 163, 184, .26);
}

body[data-theme="dark"] .y-axis,
body[data-theme="dark"] .x-axis {
  color: #a7b7c8;
}

body[data-theme="dark"] .fleet-grid span {
  border-top-color: rgba(148, 163, 184, .18);
}

body[data-theme="dark"] .action-link,
body[data-theme="dark"] .panel-link.action-link,
body[data-theme="dark"] .production-download {
  border-color: rgba(96, 165, 250, .36);
  background: #000000;
  color: #bfe8ff;
}

body[data-theme="dark"] .model-suggest-menu {
  border-color: rgba(148, 163, 184, .22);
  background: #000000;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
}

body[data-theme="dark"] .model-suggest-option {
  color: #f8fbff;
}

body[data-theme="dark"] .model-suggest-option:hover,
body[data-theme="dark"] .model-suggest-option:focus-visible {
  background: #050505;
}

body[data-theme="dark"] .model-suggest-option small {
  color: #c8d8e8;
}

body[data-theme="dark"] .action-link:hover,
body[data-theme="dark"] .panel-link.action-link:hover,
body[data-theme="dark"] .production-download:hover {
  background: #050505;
  color: #ffffff;
}

body[data-theme="dark"] .table-wrap table,
body[data-theme="dark"] .users-list-table,
body[data-theme="dark"] .contracts-table,
body[data-theme="dark"] .contracts-summary-table {
  color: #f8fbff;
  background: transparent;
}

body[data-theme="dark"] table thead th,
body[data-theme="dark"] .users-list-table th,
body[data-theme="dark"] .contracts-table th,
body[data-theme="dark"] .contracts-summary-table th {
  color: #e2e8f0;
}

body[data-theme="dark"] table td,
body[data-theme="dark"] .users-list-table td,
body[data-theme="dark"] .contracts-table td,
body[data-theme="dark"] .contracts-summary-table td {
  color: #f8fbff;
  border-color: rgba(148, 163, 184, .18);
}

body[data-theme="dark"] .table-wrap {
  background: transparent;
}

body[data-theme="dark"] .dashboard-welcome::before {
  opacity: .34;
}

body[data-theme="dark"] .global-search svg,
body[data-theme="dark"] .language-switch svg {
  color: #6ee7d8;
}

body[data-theme="dark"] table {
  color: var(--text);
}

body[data-theme="dark"] th {
  color: #a7b7c8;
}

body[data-theme="dark"] label,
body[data-theme="dark"] .panel-head p,
body[data-theme="dark"] .page-hero p,
body[data-theme="dark"] .dashboard-welcome p,
body[data-theme="dark"] .user-pill span,
body[data-theme="dark"] .muted,
body[data-theme="dark"] small,
body[data-theme="dark"] .field-head,
body[data-theme="dark"] .login-field-label {
  color: #e2e8f0;
}

body[data-theme="dark"] .login-secure,
body[data-theme="dark"] .login-forgot-help,
body[data-theme="dark"] .top-actions b,
body[data-theme="dark"] .top-actions span,
body[data-theme="dark"] .page-hero-chip,
body[data-theme="dark"] .dashboard-trust-row span {
  color: #f1f5f9;
}

body[data-theme="dark"] td,
body[data-theme="dark"] .contracts-table td {
  color: var(--text);
}

body[data-theme="dark"] .contract-panel,
body[data-theme="dark"] .contracts-list-panel {
  background: var(--panel) !important;
  color: var(--text) !important;
}

body[data-theme="dark"] .contracts-summary-table,
body[data-theme="dark"] .contracts-table {
  background: transparent !important;
  color: var(--text) !important;
}

body[data-theme="dark"] .contracts-table th,
body[data-theme="dark"] .contracts-summary-table th {
  color: #a7b7c8 !important;
}

body[data-theme="dark"] .contracts-table td,
body[data-theme="dark"] .contracts-summary-table td {
  border-color: rgba(148, 163, 184, .22) !important;
  color: #e6edf5 !important;
}

body[data-theme="dark"] .contracts-table strong,
body[data-theme="dark"] .contracts-summary-table strong {
  color: #f8fbff !important;
}

body[data-theme="dark"] .model-chip,
body[data-theme="dark"] .registration-chip {
  border-color: rgba(148, 163, 184, .34) !important;
  background: #000000 !important;
  color: #f8fbff !important;
}

body[data-theme="dark"] .contract-view-btn {
  background: #0f766e !important;
  color: #ecfeff !important;
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #7e8fa2;
}

body[data-theme="dark"] select option {
  background: #000000;
  color: #e6edf5;
}

body[data-theme="dark"] .action-link,
body[data-theme="dark"] .video-link,
body[data-theme="dark"] .download-link,
body[data-theme="dark"] .company-action-btn,
body[data-theme="dark"] .available-status-pulse,
body[data-theme="dark"] .production-download,
body[data-theme="dark"] .file-choice span {
  border-color: rgba(91, 141, 175, .38);
  background: #000000;
  color: #9ddcff;
}

body[data-theme="dark"] .video-link:hover,
body[data-theme="dark"] .download-link:hover,
body[data-theme="dark"] .company-action-btn:hover,
body[data-theme="dark"] .production-download:hover,
body[data-theme="dark"] .file-choice span:hover {
  background: #050505;
  color: #d9f2ff;
}

body[data-theme="dark"] .company-action-btn.modify {
  background: #0f9f6e;
  color: #fff;
}

body[data-theme="dark"] .danger-btn.company-action-btn {
  background: #c0394f;
  color: #fff;
}

body[data-theme="dark"] .company-action-btn.modify:hover,
body[data-theme="dark"] .danger-btn.company-action-btn:hover {
  color: #fff;
  filter: saturate(1.08) brightness(1.03);
}

body[data-theme="dark"] .badge {
  background: rgba(20, 184, 166, .16);
  color: #7ddbd0;
}

body[data-theme="dark"] .badge.pending,
body[data-theme="dark"] .contract-status-select.pending {
  border-color: rgba(245, 158, 11, .42);
  background: rgba(146, 96, 10, .24);
  color: #f8d58d;
}

body[data-theme="dark"] .badge.confirmed,
body[data-theme="dark"] .contract-status-select.confirmed {
  border-color: rgba(34, 197, 94, .4);
  background: rgba(22, 101, 52, .24);
  color: #9cf2bc;
}

body[data-theme="dark"] .badge.cancelled,
body[data-theme="dark"] .contract-status-select.cancelled {
  border-color: rgba(244, 63, 94, .45);
  background: rgba(136, 19, 55, .28);
  color: #ffb4c3;
}

body[data-theme="dark"] .company-access-badge.active {
  background: rgba(22, 101, 52, .24);
  color: #9cf2bc;
}

body[data-theme="dark"] .company-access-badge.expired {
  background: rgba(146, 96, 10, .24);
  color: #f8d58d;
}

body[data-theme="dark"] .company-access-badge.suspended {
  background: rgba(136, 19, 55, .28);
  color: #ffb4c3;
}

body[data-theme="dark"] .company-access-time {
  color: #f8d58d;
}

body[data-theme="dark"] .vehicle-status-select.available {
  border-color: rgba(56, 189, 248, .42);
  background: rgba(12, 74, 110, .28);
  color: #9ddcff;
}

body[data-theme="dark"] .vehicle-status-select.rented {
  border-color: rgba(34, 197, 94, .42);
  background: rgba(22, 101, 52, .28);
  color: #9cf2bc;
}

body[data-theme="dark"] .vehicle-status-select.maintenance {
  border-color: rgba(245, 158, 11, .42);
  background: rgba(146, 64, 14, .28);
  color: #f8d58d;
}

body[data-theme="dark"] .model-brand-logo.has-image,
body[data-theme="dark"] .test-manager-panel,
body[data-theme="dark"] .contract-signature-link,
body[data-theme="dark"] .device-session-card,
body[data-theme="dark"] .company-list-row,
body[data-theme="dark"] .user-list-row,
body[data-theme="dark"] .inline-edit,
body[data-theme="dark"] .vehicle-id-chip,
body[data-theme="dark"] .maintenance-summary,
body[data-theme="dark"] .production-summary,
body[data-theme="dark"] .production-extremes article,
body[data-theme="dark"] .company-managers {
  border-color: var(--field-border);
  background: var(--soft-bg);
  color: var(--text);
}

body[data-theme="dark"] .production-summary p,
body[data-theme="dark"] .production-extremes em,
body[data-theme="dark"] .production-period-note {
  color: #c8d8e8;
}

body[data-theme="dark"] .production-summary strong,
body[data-theme="dark"] .production-extremes strong {
  color: #f8fbff;
}

body[data-theme="dark"] .production-extremes small {
  color: #a7d8e8;
}

body[data-theme="dark"] .production-period-note {
  border-left-color: #22c7b0;
  background: rgba(8, 85, 78, .62);
}

body[data-theme="dark"] .table-scroll-top {
  background: rgba(15, 23, 42, .72);
  scrollbar-color: #7dd3fc rgba(15, 23, 42, .72);
}

body[data-theme="dark"] .global-report-option {
  border-color: var(--field-border);
  background: rgba(15, 23, 42, .78);
  color: #e6edf5;
}

body[data-theme="dark"] .company-managers strong {
  color: #c4d3e2;
}

body[data-theme="dark"] .contract-signature-copy {
  border-color: rgba(148, 163, 184, .5);
  background: rgba(15, 23, 42, .92);
  color: #dbeafe;
  box-shadow: 0 3px 0 rgba(2, 6, 23, .48);
}

body[data-theme="dark"] .contract-signature-copy:hover,
body[data-theme="dark"] .contract-signature-copy:focus-visible,
body[data-theme="dark"] .contract-signature-copy.is-copied {
  background: #0f9f6e;
  color: #fff;
}

body[data-theme="dark"] .success {
  background: rgba(22, 101, 52, .28);
  color: #9cf2bc;
}

body[data-theme="dark"] .error {
  background: rgba(136, 19, 55, .24);
  color: #ffc0ca;
}

body[data-theme="dark"] .alert.error {
  border-color: rgba(248, 113, 113, .38);
  background: linear-gradient(135deg, #991b1b, #dc2626);
  color: #fff;
}

body[data-theme="dark"] .test-account-badge {
  background: rgba(146, 96, 10, .28);
  color: #f8d58d;
}

body[data-theme="dark"] .user-pill .test-time-left {
  color: #f8d58d;
}

body[data-theme="dark"] .user-pill .company-time-left {
  color: #8ee7d3;
}

body[data-theme="dark"] .test-account-badge.expired {
  background: rgba(136, 19, 55, .28);
  color: #ffb4c3;
}

body[data-theme="dark"] .ww-registration-active {
  border-color: rgba(245, 158, 11, .48);
  background: rgba(146, 64, 14, .24);
  color: #f8d58d;
}

.operation-confirm-layer {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(214, 236, 247, .46);
  backdrop-filter: blur(5px);
}

.operation-toast {
  width: min(62vw, 360px);
  min-height: 72px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 70px;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 14px;
  background: linear-gradient(118deg, rgba(255, 255, 255, .94), rgba(247, 253, 255, .9));
  color: #203f56;
  box-shadow: 0 12px 28px rgba(33, 80, 120, .18), inset 0 0 18px rgba(255, 255, 255, .72);
  animation: operationToastIn .2s ease-out;
}

.operation-toast-icon {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 194, 172, .16), rgba(0, 194, 172, .06) 62%, rgba(0, 194, 172, 0) 63%);
}

.operation-toast-icon::before {
  width: 34px;
  height: 34px;
  content: "";
  border: 2px solid rgba(193, 238, 238, .9);
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
  box-shadow: inset -1px -1px 0 rgba(255, 255, 255, .84), 0 6px 12px rgba(17, 186, 165, .14);
}

.operation-toast-icon::after {
  position: absolute;
  width: 21px;
  height: 12px;
  content: "";
  border-bottom: 4px solid #12c89b;
  border-left: 4px solid #12c89b;
  border-radius: 2px;
  transform: rotate(-45deg) translate(2px, -2px);
}

.operation-toast-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.operation-toast-copy strong {
  color: #213d56;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
}

.operation-toast-copy span {
  color: #31516a;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
}

.operation-toast-ok {
  justify-self: end;
  min-width: 58px;
  min-height: 26px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, #078be5, #14c99d);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .02em;
  box-shadow: 0 6px 12px rgba(10, 139, 215, .22), inset 0 -2px 0 rgba(255, 255, 255, .18);
}

.operation-toast-ok:focus-visible {
  outline: 3px solid rgba(10, 127, 211, .28);
  outline-offset: 2px;
}

.operation-toast-ok:hover {
  filter: saturate(1.06);
}

.operation-dialog-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.operation-toast-cancel {
  min-width: 68px;
  min-height: 26px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #31516a;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(202, 226, 232, .9), 0 6px 12px rgba(33, 80, 120, .1);
}

.operation-toast-cancel:focus-visible {
  outline: 3px solid rgba(49, 81, 106, .18);
  outline-offset: 2px;
}

.operation-toast-cancel:hover {
  background: #fff;
}

.operation-confirm-layer.is-hiding {
  opacity: 0;
  transition: opacity .22s ease;
}

.operation-confirm-layer.is-hiding .operation-toast {
  transform: translateY(-10px) scale(.98);
  transition: transform .22s ease;
}

@keyframes operationToastIn {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-screen {
  background:
    linear-gradient(135deg, rgba(231, 244, 255, .78), rgba(224, 255, 244, .72)),
    url("/bg-last.png") center center / cover fixed no-repeat;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: rgba(239, 247, 250, .12);
}

.login-panel {
  width: min(390px, 100%);
  padding: 26px 28px 22px;
  border: 2px solid rgba(255, 255, 255, .88);
  border-radius: 28px;
  background:
    radial-gradient(circle at 9% 87%, rgba(255, 135, 49, .18), transparent 34%),
    linear-gradient(145deg, rgba(242, 249, 255, .96), rgba(204, 225, 245, .93));
  box-shadow: 0 24px 60px rgba(12, 52, 93, .24), inset 0 1px 0 rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.login-brand-card {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .84);
  border-radius: 18px;
  background: rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 10px 24px rgba(21, 61, 103, .1);
}

.login-logo {
  width: 88%;
  height: 88%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.login-panel h1 {
  margin: 24px 0 6px;
  color: #072f69;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0;
}

.login-panel .muted {
  margin: 0 0 22px;
  color: #315b8d;
  font-size: 16px;
  line-height: 1.4;
}

.login-panel .stack-form {
  gap: 15px;
}

.login-field {
  display: grid;
  gap: 7px;
}

.login-field-label {
  color: #082f68;
  font-size: 14px;
  font-weight: 900;
}

.login-control {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(108, 146, 190, .55);
  border-radius: 12px;
  background: rgba(255, 255, 255, .7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

.login-control > svg {
  position: absolute;
  z-index: 1;
  left: 15px;
  width: 22px;
  height: 22px;
  color: #0b428a;
  pointer-events: none;
}

.login-panel input,
.login-panel select {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 48px;
  border: 0;
  border-radius: 12px;
  outline: 0;
  background: transparent;
  color: #123c76;
  font-size: 16px;
  font-weight: 600;
  box-shadow: none;
}

.login-panel select {
  cursor: pointer;
}

.login-control:focus-within {
  border-color: #0879e7;
  box-shadow: 0 0 0 3px rgba(8, 121, 231, .15), inset 0 1px 0 rgba(255, 255, 255, .82);
}

.login-panel input::placeholder {
  color: rgba(39, 82, 132, .72);
  opacity: 1;
}

.login-password-toggle {
  position: absolute;
  z-index: 2;
  right: 8px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0b428a;
  cursor: pointer;
}

.login-password-toggle svg {
  width: 22px;
  height: 22px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #143d72;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.login-remember input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  border: 1px solid #1d589d;
  border-radius: 4px;
  accent-color: #0879e7;
}

.login-forgot {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #0874dc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.login-forgot-help {
  margin: -6px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(8, 116, 220, .08);
  color: #174679;
  font-size: 12px;
  line-height: 1.35;
}

.login-panel .primary-btn {
  width: 100%;
  min-height: 56px;
  margin-top: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, #0477e8, #ff760f);
  box-shadow: 0 14px 28px rgba(6, 77, 141, .24);
  font-size: 18px;
}

.login-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 2px 0 0;
  color: #183f72;
  font-size: 14px;
}

.login-secure svg {
  width: 23px;
  height: 23px;
  color: #0a4e9c;
}

html[dir="rtl"] .login-control > svg {
  right: 15px;
  left: auto;
}

html[dir="rtl"] .login-password-toggle {
  right: auto;
  left: 8px;
}

html[dir="rtl"] input[type="date"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] .production-summary strong,
html[dir="rtl"] .production-km,
html[dir="rtl"] .installment-amount,
html[dir="rtl"] .contract-countdown,
html[dir="rtl"] td:nth-child(1) .production-rank {
  direction: ltr;
  unicode-bidi: isolate;
}

html[dir="rtl"] .production-summary strong {
  text-align: right;
}

@media (max-width: 1050px) {
  :root {
    --sidebar-width: 250px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main,
  .dashboard-lower,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-welcome,
  .dashboard-detail-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-welcome::before {
    inset: auto -20px 20px auto;
    width: 210px;
    height: 120px;
    opacity: .45;
  }

  .dashboard-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-widget-map {
    grid-column: auto;
  }

  .dashboard-parking-plan {
    grid-template-columns: repeat(6, minmax(40px, 1fr));
  }

  .dashboard-mission-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero {
    grid-template-columns: 1fr;
  }

  .chauffeur-access-block {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contract-paper-head,
  .drivers-grid,
  .contract-date-km,
  .fuel-row,
  .contract-extra-row,
  .company-edit-form,
  .user-edit-form {
    grid-template-columns: 1fr;
  }

  .operation-toast {
    width: min(76vw, 340px);
    grid-template-columns: 58px minmax(0, 1fr) 66px;
    gap: 8px;
    padding: 10px 12px;
  }

  .operation-toast-icon {
    width: 50px;
    height: 50px;
  }

  .operation-toast-icon::before {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .operation-toast-icon::after {
    width: 19px;
    height: 11px;
    border-bottom-width: 4px;
    border-left-width: 4px;
  }

  .operation-toast-copy strong {
    font-size: 13px;
  }

  .operation-toast-copy span {
    font-size: 10px;
  }

  .operation-dialog-actions {
    gap: 6px;
  }
}

@media (max-width: 760px) {
  .public-signature-shell {
    padding: 10px;
  }

  .public-signature-panel {
    padding: 12px;
  }

  .public-signature-head {
    grid-template-columns: 64px 1fr;
  }

  .public-signature-head img {
    width: 64px;
    height: 52px;
  }

  .public-signature-head h1 {
    font-size: 19px;
  }

  .public-signature-pad canvas {
    height: 180px;
  }

  html[dir="rtl"],
  html[dir="rtl"] body {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .menu-toggle {
    top: 10px;
    left: 12px;
    right: auto;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    margin: 0;
    transform: none;
    justify-content: center;
    text-align: center;
  }

  html[dir="rtl"] .menu-toggle {
    left: 12px;
    right: auto;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    margin: 0;
    transform: none;
  }

  .sidebar {
    position: fixed;
    width: min(var(--sidebar-width), calc(100vw - 34px));
    min-height: 100vh;
  }

  html[dir="rtl"] .sidebar {
    right: 0;
    left: auto;
    width: min(var(--sidebar-width), calc(100vw - 34px));
    max-width: calc(100vw - 34px);
  }

  .operation-confirm-layer {
    padding: 12px;
  }

  .operation-toast {
    width: min(86vw, 260px);
    min-height: auto;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 7px;
    padding: 12px 10px;
    border-radius: 14px;
    text-align: center;
  }

  .operation-toast-icon {
    width: 46px;
    height: 46px;
  }

  .operation-toast-copy {
    justify-items: center;
  }

  .operation-toast-copy strong {
    font-size: 12px;
  }

  .operation-toast-copy span {
    font-size: 10px;
  }

  .operation-toast-ok {
    justify-self: center;
    min-width: 62px;
  }

  .operation-dialog-actions {
    justify-content: center;
  }

  .logout-link {
    position: static;
    margin-top: 8px;
  }

  .side-nav {
    padding-bottom: 0;
  }

  .sidebar-app-logo {
    min-height: 212px;
    margin: auto 0 8px;
  }

  .sidebar-app-logo img {
    max-width: 226px;
    max-height: 178px;
  }

  .app {
    margin-left: 0;
    padding: 68px 10px 12px;
  }

  html[dir="rtl"] .app {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 68px 10px 12px;
  }

  .topbar,
  html[dir="rtl"] .topbar {
    padding-right: 0;
    padding-left: 0;
  }

  .topbar,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    gap: 8px;
    margin-bottom: 6px;
  }

  .dashboard-showcase {
    gap: 10px;
  }

  .dashboard-welcome {
    min-height: auto;
    padding: 18px;
    border-radius: 18px;
  }

  .dashboard-welcome h2 {
    font-size: 34px;
  }

  .dashboard-welcome p {
    font-size: 13px;
  }

  .dashboard-stat-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-card {
    min-height: 104px;
    padding: 15px;
  }

  .dashboard-detail-grid {
    gap: 10px;
  }

  .dashboard-widget {
    min-height: auto;
    padding: 14px;
    border-radius: 16px;
  }

  .dashboard-bars {
    height: 135px;
    gap: 8px;
  }

  .dashboard-parking-plan {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 190px;
    gap: 8px;
    padding: 12px;
  }

  .dashboard-mission-stats {
    width: 100%;
  }

  .dashboard-mission-feed {
    grid-template-columns: 1fr;
  }

  .dashboard-ring-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .dashboard-ring-info {
    width: 100%;
  }

  .page-hero {
    gap: 12px;
    padding: 15px;
    border-radius: 24px;
  }

  .page-hero h2 {
    font-size: 24px;
  }

  .page-hero p {
    font-size: 12px;
  }

  .page-hero-chip {
    min-height: 36px;
    padding: 0 12px;
    font-size: 10px;
  }

  .topbar h1 {
    font-size: 20px;
    width: fit-content;
    max-width: 100%;
    padding: 4px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .82);
    color: #06345f;
    text-shadow: none;
  }

  body[data-theme="dark"] .topbar h1 {
    background: rgba(255, 255, 255, .9);
    color: #001d3b;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(82px, .9fr) minmax(62px, .72fr) minmax(96px, 1fr);
    gap: 6px;
    width: 100%;
  }

  .global-report-period,
  .global-report-options {
    grid-template-columns: 1fr;
  }

  .global-search {
    grid-column: 1 / -1;
    width: 100%;
  }

  .language-switch,
  .theme-switch,
  .contract-beep-toggle,
  .user-pill {
    min-width: 0;
    width: 100%;
  }

  .language-switch,
  .theme-switch,
  .contract-beep-toggle {
    min-height: 34px;
    padding: 0 7px;
    gap: 5px;
  }

  .language-switch select {
    min-width: 0;
    width: 100%;
    font-size: 10px;
  }

  .theme-switch,
  .contract-beep-toggle {
    justify-content: flex-start;
  }

  .theme-switch-icons,
  .contract-beep-toggle span {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }

  .theme-switch b,
  .contract-beep-toggle b {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
  }

  .user-pill {
    min-height: 34px;
    padding: 0 9px;
    border-radius: 18px;
  }

  .user-pill.test-account {
    min-height: 48px;
  }

  .user-pill strong {
    font-size: 10px;
  }

  .user-pill span {
    font-size: 8px;
  }

  .user-pill .test-time-left {
    font-size: 8px;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .metric-card {
    min-height: 42px;
    padding: 6px 24px 5px 7px;
  }

  .mobile-update-card {
    display: block;
  }

  html[dir="rtl"] .metric-card {
    padding: 6px 7px 5px 24px;
  }

  .metric-card p {
    font-size: 7px;
  }

  .metric-card strong {
    font-size: 13px;
  }

  .metric-card small {
    font-size: 6px;
  }

  .metric-icon {
    right: 6px;
  }

  html[dir="rtl"] .metric-icon {
    left: 6px;
  }

  .metric-icon svg {
    width: 11px;
    height: 11px;
  }

  .dashboard-main,
  .dashboard-lower,
  .form-grid,
  .inline-edit {
    grid-template-columns: 1fr;
  }

  .chauffeur-access-block {
    grid-template-columns: 1fr;
  }

  .contract-panel,
  .contracts-list-panel {
    padding: 10px;
  }

  .available-status-pulse {
    width: fit-content;
  }

  .contract-sheet {
    padding: 12px;
    border-width: 1px;
  }

  .contract-brand-title strong {
    font-size: 20px;
  }

  .contract-brand-title span,
  .contract-main-title b {
    font-size: 13px;
  }

  .contract-main-title {
    align-items: center;
    flex-direction: column;
    gap: 3px;
    text-align: center;
  }

  .contract-main-title span {
    font-size: 20px;
  }

  .contract-top-fields,
  .inline-fields,
  .contract-signature-link-grid,
  .signature-row,
  .company-list-row {
    grid-template-columns: 1fr;
  }

  .company-row-actions {
    justify-content: stretch;
  }

  .company-row-actions .small-btn,
  .company-row-actions .danger-btn {
    width: 100%;
  }

  .company-access-actions {
    width: 100%;
  }

  .company-access-actions form {
    grid-template-columns: minmax(96px, 1fr) 112px;
  }

  .company-access-actions form:last-child {
    grid-template-columns: 112px;
  }

  .company-access-actions select,
  .company-access-actions input {
    width: 100%;
  }

  .contract-date-table,
  .place-time-table {
    grid-template-columns: 1fr;
  }

  .contract-date-table > *,
  .place-time-table > * {
    border-right: 0;
  }

  .activity-panel,
  .fleet-panel {
    height: auto;
  }

  .production-report-head,
  .production-report-head .panel-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .production-report-head .panel-actions,
  .production-period-form {
    width: 100%;
  }

  .production-period-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-period-form label {
    min-width: 0;
  }

  .production-period-form button,
  .production-download {
    width: 100%;
    justify-content: center;
  }

  .production-period-form button {
    grid-column: 1 / -1;
  }

  .production-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-summary article:nth-child(2) {
    border-right: 0;
  }

  .production-summary article:nth-child(-n+2) {
    border-bottom: 1px solid #d8e6ea;
  }

  .production-extremes {
    grid-template-columns: 1fr;
  }

  .production-extremes strong {
    white-space: normal;
  }

  .production-period-note {
    align-items: flex-start;
    line-height: 1.4;
  }

  .span-2 {
    grid-column: auto;
  }
}

@media (max-width: 460px) {
  .team-summary {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 40px;
  }
}

/* nextvoice dark black override */
html:has(body[data-theme="dark"]),
body[data-theme="dark"],
body[data-theme="dark"] .login-screen {
  background: #000000 !important;
  background-image: none !important;
}

/* Touristiquemanager: rate checkboxes directly below the vehicle model. */
.vehicle-model-field { min-width: 0; }
.vehicle-model-field > label { display: block; }
.vehicle-model-field > input { width: 100%; }
.vehicle-rate-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; min-height: 28px; font-size: 13px; font-weight: 700; }
.vehicle-rate-options > label { display: inline-flex; align-items: center; gap: 4px; margin: 0; cursor: pointer; white-space: nowrap; }
.vehicle-rate-options input[type="checkbox"] { width: 15px; min-width: 15px; min-height: 15px; height: 15px; margin: 0; accent-color: #2563eb; }
.vehicle-rate-label { color: #40535b; }

/* Keep the Mission, Client and Date fields aligned at the top. */
.mission-form { align-items: start; }
.mission-form > label { align-self: start; }

/* Professional mission selector inspired by a pickup-location dropdown. */
.mission-combobox { position: relative; margin-top: 4px; }
.mission-combobox-input { width: 100%; min-height: 48px; padding: 11px 42px 11px 13px; border: 1px solid #cbdcf3; border-radius: 16px; background: #fff; color: #1b355b; font-weight: 700; box-shadow: 0 4px 12px rgba(38, 87, 155, .06); }
.mission-combobox::after { content: ''; position: absolute; top: 50%; right: 15px; width: 8px; height: 8px; border-right: 2px solid #31588a; border-bottom: 2px solid #31588a; transform: translateY(-72%) rotate(45deg); pointer-events: none; transition: transform .18s ease; }
.mission-combobox.is-open::after { transform: translateY(-30%) rotate(225deg); }
.mission-combobox-input:focus { outline: none; border-color: #2864ff; box-shadow: 0 0 0 3px rgba(40, 100, 255, .15), 0 7px 18px rgba(38, 87, 155, .12); }
.mission-combobox-menu { position: absolute; z-index: 80; top: calc(100% + 7px); left: 0; right: 0; display: none; max-height: 260px; overflow-y: auto; padding: 7px; border: 1px solid #d9e4f4; border-radius: 14px; background: #fff; box-shadow: 0 16px 30px rgba(20, 50, 93, .18); }
.mission-combobox.is-open .mission-combobox-menu { display: block; }
.mission-combobox-option, .mission-combobox-create { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 0; border-radius: 10px; background: transparent; color: #17345c; text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.mission-combobox-option > span, .mission-combobox-create > span { min-width: 0; display: flex; align-items: center; gap: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mission-combobox-option svg { width: 17px; height: 17px; flex: 0 0 auto; color: #2d67d8; }
.mission-combobox-option > svg { width: 16px; height: 16px; flex: 0 0 auto; color: #8da0ba; }
.mission-combobox-option:hover { background: #eef5ff; color: #1554cc; }
.mission-combobox-create { margin-top: 4px; background: #eff6ff; color: #1d5ad0; font-weight: 800; }
.mission-combobox-create svg { width: 18px; height: 18px; }
.mission-combobox-create:hover { background: #dceaff; }

/* Chauffeur-only commission entry for an excursion row. */
.excursion-commission-btn { margin-bottom: 6px; background: #1f7a58; color: #fff; }
.excursion-commission-form { display: grid; grid-template-columns: minmax(118px, 1fr) auto; align-items: end; gap: 6px; margin: 0 0 7px; padding: 8px; border: 1px solid #bfe5d5; border-radius: 9px; background: #f2fbf7; }
.excursion-commission-form label { display: grid; gap: 4px; margin: 0; font-size: 11px; font-weight: 800; color: #245a48; }
.excursion-commission-form input { min-height: 33px; padding: 6px 8px; }
.excursion-commission-form .small-btn { min-height: 33px; }
.excursion-commission-saved { display: block; margin: 0 0 7px; color: #176844; font-size: 11px; font-weight: 800; }
