/* ===== DVD — Minimal grid-based corporate UI ===== */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f8fa;
  --border: #e0e0e0;
  --border-light: #ebebeb;
  --border-focus: #1a1a1a;
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #888888;
  --primary: #1a1a1a;
  --primary-hover: #333333;
  --primary-light: #f2f2f2;
  --primary-glow: rgba(0, 0, 0, 0.04);
  --accent: #002855;
  --accent-light: #e8eef5;
  --navy: #002855;
  --navy-dark: #001a33;
  --danger: #c0392b;
  --danger-bg: #fdf0ef;
  --radius: 0;
  --radius-sm: 0;
  --radius-lg: 0;
  --shadow: none;
  --shadow-md: none;
  --shadow-lg: none;
  --font: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
  --logo-header: 88px;
  --logo-hero: 80px;
  --logo-auth: 38px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.2s;
  --grid-cols: 12;
  --grid-gap: 1.5rem;
  --grid-gap-lg: 2rem;
  --page-max: 1200px;
  --section-padding-y: 5rem;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero-bg-video { animation: none !important; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; overflow-x: hidden; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  transition: direction 0.2s;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.lang-ar { direction: rtl; }
body.lang-en { direction: ltr; }
body.lang-ar .en { display: none !important; }
body.lang-en .ar { display: none !important; }

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 0;
  align-items: center;
}
.lang-switcher button {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  min-height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--duration), color var(--duration), border-color var(--duration);
  direction: ltr;
  text-align: left;
}
.lang-switcher .lang-flag {
  width: 22px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 2px;
  display: inline-block;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  order: -1;
}
/* علم مصر — SVG ثلاث أشرطة أفقية */
.lang-switcher .lang-flag-ar {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect fill='%23c8102e' width='30' height='6.67'/%3E%3Crect y='6.67' fill='%23fff' width='30' height='6.66'/%3E%3Crect y='13.33' fill='%23000' width='30' height='6.67'/%3E%3C/svg%3E");
}
/* علم أمريكا — SVG 13 شريط */
.lang-switcher .lang-flag-en {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect y='0' width='30' height='1.54' fill='%23b22234'/%3E%3Crect y='1.54' width='30' height='1.54' fill='%23fff'/%3E%3Crect y='3.08' width='30' height='1.54' fill='%23b22234'/%3E%3Crect y='4.62' width='30' height='1.54' fill='%23fff'/%3E%3Crect y='6.16' width='30' height='1.54' fill='%23b22234'/%3E%3Crect y='7.7' width='30' height='1.54' fill='%23fff'/%3E%3Crect y='9.24' width='30' height='1.54' fill='%23b22234'/%3E%3Crect y='10.78' width='30' height='1.54' fill='%23fff'/%3E%3Crect y='12.32' width='30' height='1.54' fill='%23b22234'/%3E%3Crect y='13.86' width='30' height='1.54' fill='%23fff'/%3E%3Crect y='15.4' width='30' height='1.54' fill='%23b22234'/%3E%3Crect y='16.94' width='30' height='1.54' fill='%23fff'/%3E%3Crect y='18.48' width='30' height='1.52' fill='%23b22234'/%3E%3C/svg%3E");
}
.lang-switcher button:hover { background: var(--primary-light); color: var(--text); }
.lang-switcher button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.lang-switcher button:first-child { border-inline-end: none; }
.lang-switcher button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }

/* Logo fallback when image missing */
.logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 0;
  text-decoration: none;
}
.logo-fallback:hover { text-decoration: none; opacity: 0.9; }
.logo-link-wrap { display: flex; align-items: center; }
.logo-link-wrap img { display: block; }
.logo-link-wrap .logo-fallback { display: none; }
.logo-link-wrap img[data-failed="true"] { display: none !important; }
.logo-link-wrap img[data-failed="true"] + .logo-fallback { display: inline-flex !important; }
.logo-link-wrap .logo-fallback.only { display: inline-flex !important; }
.home-header .logo-fallback { min-height: 48px; padding: 0 0.5rem; font-size: 0.7rem; line-height: 1.2; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: scale(1.55); transform-origin: left center; }
body.lang-en .home-header .logo-fallback { transform-origin: right center; }
@media (min-width: 769px) { .home-header .logo-fallback { font-size: 0.8rem; max-width: 200px; } }
.home-hero .logo-link-wrap { margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: center; }
.home-hero .logo-fallback { height: var(--logo-hero); padding: 0 1.25rem; font-size: 1.75rem; }
.app-header .logo-fallback { height: 36px; padding: 0 0.65rem; font-size: 0.8rem; }
.admin-sidebar .logo-fallback { min-height: 38px; padding: 0 0.5rem; font-size: 0.7rem; line-height: 1.2; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Layout ===== */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.app-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}
.app-nav {
  display: flex;
  gap: 0.15rem;
  align-items: center;
}
.app-nav a {
  padding: 0.55rem 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 0;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration);
}
.app-nav a:hover { color: var(--text); }
.app-nav a.active {
  color: var(--text);
  border-bottom: 2px solid var(--text);
}
.app-nav a.nav-logout { color: var(--danger); }
.app-nav a.nav-logout:hover { background: var(--danger-bg); color: var(--danger); }
.app-main {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: var(--page-max);
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
}

/* ===== Auth pages — Full page (Header + Main + Footer, no card) ===== */
.auth-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.auth-main {
  flex: 1;
  padding: 3rem 1.5rem 4rem;
  background: var(--bg);
}
.auth-container {
  max-width: 520px;
  margin: 0 auto;
}
.company-container.auth-container {
  display: block;
  max-width: 520px;
  padding: 0 var(--grid-gap-lg);
}
.auth-container .company-container { max-width: none; padding: 0; display: block; }
.auth-page-title {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: inline-block;
}
.auth-form-inline .field { margin-bottom: 1.25rem; }
.auth-form-inline label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.auth-form-inline input[type="text"],
.auth-form-inline input[type="email"],
.auth-form-inline input[type="password"],
.auth-form-inline input[type="tel"],
.auth-form-inline input[type="number"],
.auth-form-inline input[type="date"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-form-inline input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.auth-form-inline input:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.auth-links a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }
.auth-layout .home-nav a:focus-visible,
.auth-layout .home-header-inner .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius); }
.auth-form-inline input::placeholder { color: var(--text-muted); }
.auth-form-inline .btn { margin-top: 0.75rem; width: 100%; max-width: 320px; }
.auth-form-inline .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.login-type-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}
@media (max-width: 600px) {
  .auth-form-grid { grid-template-columns: 1fr; }
}
.auth-form-signup .auth-form-grid { margin-bottom: 0; }
.auth-form-signup .field { margin-bottom: 1.25rem; }
.auth-form-signup .btn { margin-top: 1rem; }
.auth-links {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-links a { color: var(--primary); font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }
.auth-links-signup { margin-top: 1.75rem; }
.auth-photo-upload {
  width: 100%;
  aspect-ratio: 1;
  max-width: 120px;
  margin: 0.5rem auto 1rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.auth-photo-upload:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.auth-form-inline .field-center { text-align: center; }
/* Nav active state on auth pages */
.auth-layout .home-nav a.active,
.auth-layout .home-nav a.nav-link.active {
  color: var(--text);
  font-weight: 600;
  border-bottom: 2px solid var(--text);
}
.auth-layout .home-nav a.active:hover { text-decoration: none; }

/* ========== Homepage — Company Landing ========== */
.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Scroll-triggered animation — subtle */
.home [data-animate] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.home [data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header — minimal corporate */
.home-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-bottom: 1px solid var(--border);
  overflow: visible;
}
/* الصفحة الرئيسية: هيدر ثابت (fixed) */
.home .home-header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
}
.home {
  padding-top: 65px;
}
.dash-header {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}
.dash-header .home-header-inner {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin: 0;
  max-width: none;
  padding: 0.75rem 1.5rem;
}
.dash-header .mobile-nav-toggle {
  display: none;
  flex-shrink: 0;
  margin-inline-end: 0.5rem;
}

/* ===== Dash Topbar (هيدر الداشبورد الجديد) ===== */
.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-bottom: 1px solid var(--border);
  overflow: visible;
}
.dash-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}
.dash-topbar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--navy);
  overflow: visible;
}
.dash-topbar-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
  transform: scale(1.55);
  transform-origin: left center;
}
body.lang-en .dash-topbar-logo img { transform-origin: right center; }
.dash-topbar-logo img[data-failed="true"] { display: none; }
.dash-topbar-logo-fallback {
  display: none;
  min-height: 48px;
  padding: 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  align-items: center;
  background: var(--primary-light);
  color: var(--navy);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: scale(1.55);
  transform-origin: left center;
}
body.lang-en .dash-topbar-logo-fallback { transform-origin: right center; }
@media (min-width: 769px) {
  .dash-topbar-logo-fallback { font-size: 0.8rem; max-width: 200px; }
}
.dash-topbar-logo img[data-failed="true"] ~ .dash-topbar-logo-fallback { display: flex; }
.dash-topbar-nav {
  display: flex;
  align-items: center;
  gap: 0;
}
.dash-topbar-nav a {
  padding: 0 1rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration);
  border-bottom: 2px solid transparent;
}
.dash-topbar-nav a:hover { color: var(--primary); }
.dash-topbar-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }
.dash-topbar-nav a.dash-topbar-logout { color: var(--danger); }
.dash-topbar-nav a.dash-topbar-logout:hover { color: var(--danger); }
.dash-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.dash-topbar-actions .lang-switcher { margin: 0; }
.dash-topbar-toggle {
  display: none;
  flex-shrink: 0;
}

/* أدمن: الهيدر الجديد يظهر على الموبايل فقط */
.dash-topbar-admin {
  display: none;
}

.home-header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.home-header .logo-link-wrap { display: flex; align-items: center; flex-shrink: 0; overflow: visible; }
.home-header .landing-logo { height: 40px; width: auto; object-fit: contain; transform: scale(1.4); transform-origin: left center; }
body.lang-en .home-header .landing-logo { transform-origin: right center; }
.home-header .logo-fallback { color: var(--text); background: transparent; border: 1px solid var(--border); font-size: 0.7rem; letter-spacing: 0.08em; }
.home-nav {
  display: flex;
  align-items: center;
  gap: 0;
}
.home-nav {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
}
.home-nav .nav-link,
.home-nav a.nav-link {
  padding: 0 1.25rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration);
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  font-family: inherit;
}
.home-nav .nav-link:hover,
.home-nav a.nav-link:hover { color: var(--text); }
.home-nav .nav-link.active,
.home-nav a.nav-link.active { color: var(--text); border-bottom-color: var(--text); }
.home-nav a.nav-logout { color: var(--danger); }
.home-nav a.nav-logout:hover { color: var(--danger); }

/* ===== Mega menu ===== */
.mega-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.mega-trigger {
  display: flex;
  align-items: center;
  text-align: inherit;
}
.mega-chevron {
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform var(--duration);
}
body.lang-ar .mega-chevron { transform: rotate(0deg); }
body.lang-en .mega-chevron { transform: rotate(-90deg); }
.mega-wrap[data-open="true"] .mega-chevron {
  transform: rotate(180deg);
}
body.lang-en .mega-wrap[data-open="true"] .mega-chevron {
  transform: rotate(90deg);
}
.mega-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  min-width: 320px;
  padding-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--duration), visibility var(--duration), transform var(--duration);
  z-index: 1001;
  pointer-events: none;
}
body.lang-en .mega-dropdown {
  right: 0;
  left: auto;
  min-width: 280px;
}
.mega-wrap[data-open="true"] .mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.mega-inner {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 2px solid var(--text);
  padding: 1.5rem 0;
  display: grid;
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 2rem;
  padding: 0 1.5rem;
  min-width: 0;
}
body.lang-en .mega-grid {
  padding: 0 1.25rem;
}
.mega-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.mega-col-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.mega-col a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0;
  border-radius: var(--radius-sm);
  transition: color var(--duration), background var(--duration);
  display: flex;
  align-items: center;
}
.mega-col a:hover {
  color: var(--primary);
  background: var(--bg);
}
.mega-col-cta {
  justify-content: flex-end;
  align-items: flex-start;
}
body.lang-en .mega-col-cta { align-items: flex-end; }
.mega-cta-link {
  color: var(--primary) !important;
  font-weight: 600;
}
.mega-cta-link:hover {
  background: var(--primary-light) !important;
}
@media (max-width: 768px) {
  .mega-wrap { position: static; }
  .mega-dropdown {
    position: static;
    padding: 0;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    display: none;
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .mega-wrap[data-open="true"] .mega-dropdown {
    display: block;
    margin-top: 0.5rem;
    margin-inline: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
  }
  .mega-inner { padding: 0; border: none; box-shadow: none; background: transparent; }
  .mega-grid { grid-template-columns: 1fr; gap: 0.25rem; padding: 0; }
  .mega-col-title { display: none; }
  .mega-col a { padding: 0.6rem 0; }
}
.home-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.home-header-actions .lang-switcher { margin: 0; }
.home-header-actions .btn { border-radius: 0; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.5rem 1.25rem; }
.home-header-actions .btn-primary { background: var(--text); color: #fff; border: 1px solid var(--text); }
.home-header-actions .btn-primary:hover { background: var(--primary-hover); }

/* ===== Mobile Nav Bar (همبرجر + قائمة منزلقة) ===== */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
  position: relative;
  z-index: 1001;
}
.mobile-nav-toggle:hover { background: var(--bg); color: var(--primary); }
.mobile-nav-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mobile-nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}
.mobile-nav-toggle-icon span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s var(--ease-out), opacity 0.25s;
}
body.mobile-menu-open .mobile-nav-toggle-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.mobile-menu-open .mobile-nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}
body.mobile-menu-open .mobile-nav-toggle-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
body.mobile-menu-open .mobile-nav-toggle {
  z-index: 10000;
}
/* ===== Mobile nav panel — minimal ===== */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}
body.mobile-menu-open .mobile-nav-backdrop {
  opacity: 1;
  visibility: visible;
}
.mobile-nav-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 9999;
  -webkit-overflow-scrolling: touch;
  width: min(88%, 340px);
  height: 100vh;
  height: 100dvh;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}
body.lang-ar .mobile-nav-panel {
  right: 0;
  left: auto;
  transform: translateX(100%);
}
body.lang-en .mobile-nav-panel {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}
body.lang-ar.mobile-menu-open .mobile-nav-panel,
body.lang-en.mobile-menu-open .mobile-nav-panel {
  transform: translateX(0);
}
.mobile-nav-panel-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}
.mobile-nav-panel-header .logo-link-wrap {
  display: inline-flex;
  align-items: center;
}
.mobile-nav-panel-header .landing-logo,
.mobile-nav-panel-header .app-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}
.mobile-nav-panel-header .logo-fallback {
  font-size: 0.8rem;
  padding: 0.4rem 0.5rem;
  min-height: 42px;
}
.mobile-nav-panel-links {
  flex: 1;
  padding: 1.25rem 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-nav-panel-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1rem;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 0;
  border-inline-start: 2px solid transparent;
  transition: background var(--duration), color var(--duration), border-color var(--duration);
}
body.lang-en .mobile-nav-panel-links a {
  border-inline-start: none;
  border-inline-end: 3px solid transparent;
}
.mobile-nav-panel-links a:hover {
  background: var(--bg);
  color: var(--primary);
  border-inline-start-color: var(--primary);
}
body.lang-en .mobile-nav-panel-links a:hover {
  border-inline-end-color: var(--primary);
}
.mobile-nav-panel-links a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-inline-start-color: var(--primary);
}
body.lang-en .mobile-nav-panel-links a.active {
  border-inline-end-color: var(--primary);
}
.mobile-nav-panel-links a.nav-logout {
  color: var(--danger);
  border-color: transparent;
}
.mobile-nav-panel-links a.nav-logout:hover {
  background: var(--danger-bg);
  color: var(--danger);
  border-inline-start-color: transparent;
}
body.lang-en .mobile-nav-panel-links a.nav-logout:hover {
  border-inline-end-color: transparent;
}
.mobile-nav-panel-footer {
  padding: 1rem 1.25rem 1.25rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.mobile-nav-panel-footer .lang-switcher {
  display: flex;
  gap: 0.5rem;
}
.mobile-nav-panel-footer .lang-switcher button {
  flex: 1;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.mobile-nav-panel-footer .lang-switcher button:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.mobile-nav-panel-footer .lang-switcher button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
body.mobile-menu-open { overflow: hidden; }

/* Buttons — minimal corporate */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 0;
  text-decoration: none;
  transition: background var(--duration), color var(--duration), border-color var(--duration);
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--text); color: #fff; border-color: var(--text); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--text); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-muted); border: none; }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 0.85rem 2rem; font-size: 0.85rem; }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.75rem; }
.btn-white { color: #fff; border-color: rgba(255,255,255,0.5); background: transparent; }
.btn-white:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Hero — minimal grid-based corporate */
.company-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--text);
}
.company-hero-bg-video {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.3;
}
.company-hero.hero-bg-video-failed .company-hero-bg-video { display: none; }
.company-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  pointer-events: none;
}
.company-hero.hero-bg-video-failed .company-hero-bg {
  background: var(--text);
}
.company-hero-bg::before { display: none; }
.company-hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.1);
  pointer-events: none;
}
.company-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 6rem var(--grid-gap-lg) 7rem;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: 0 var(--grid-gap);
}
@media (max-width: 768px) {
  .company-hero-inner { padding: 4rem 1.5rem 5rem; }
}
.company-hero-copy {
  grid-column: 1 / -1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
body.lang-ar .company-hero-copy { text-align: center; }
body.lang-en .company-hero-copy { text-align: center; }

.company-hero-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.company-hero-title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.25rem;
}
.company-hero-title::after { display: none; }
.company-hero-tagline {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}
.company-hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 540px;
  margin-inline: auto;
  font-weight: 400;
}
.company-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}
.company-hero-cta .btn {
  min-height: 50px;
  padding: 0.85rem 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background var(--duration), border-color var(--duration);
}
.company-hero-cta .btn-primary {
  background: #fff;
  color: var(--text);
  border: 1px solid #fff;
}
.company-hero-cta .btn-primary:hover {
  background: rgba(255,255,255,0.9);
  color: var(--text);
}
.company-hero-cta .btn-outline {
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  background: transparent;
}
.company-hero-cta .btn-outline:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.company-hero-copy .company-hero-badge.is-visible { transition-delay: 0.05s; }
.company-hero-copy .company-hero-title.is-visible { transition-delay: 0.12s; }
.company-hero-copy .company-hero-tagline.is-visible { transition-delay: 0.2s; }
.company-hero-copy .company-hero-desc.is-visible { transition-delay: 0.28s; }
.company-hero-copy .company-hero-cta.is-visible { transition-delay: 0.36s; }

.company-hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.company-hero-scroll-dot {
  display: block;
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.3);
}

/* Section container — 12-col grid corporate */
.company-container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--grid-gap-lg);
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: 0 var(--grid-gap);
  align-items: start;
}
.company-container > * {
  grid-column: 1 / -1;
}
.company-section {
  padding: var(--section-padding-y) 0;
  border-bottom: 1px solid var(--border);
}
.company-section:last-of-type { border-bottom: none; }
@media (max-width: 768px) {
  .company-section { padding: 3.5rem 0; }
}
.company-section-head {
  text-align: center;
  margin-bottom: 3.5rem;
  max-width: 560px;
  margin-inline: auto;
}
.company-section-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.company-section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.company-section-title::after { display: none; }

/* About — minimal grid */
.company-about { background: #fff; }
.company-about .company-container { padding: 0 var(--grid-gap-lg); max-width: var(--page-max); }
.company-about-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 3rem var(--grid-gap-lg);
  align-items: start;
}
.company-about-lead {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.company-about-p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.company-about-icons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.about-icon-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  transition: background var(--duration);
}
.about-icon-item:hover {
  background: var(--surface-alt);
}
.about-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text);
}
.about-icon svg { width: 20px; height: 20px; }
.about-icon-label { font-size: 0.8rem; font-weight: 600; color: var(--text); letter-spacing: 0.02em; }
.company-about-visual {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: flex-start;
}
.company-about-video-wrap {
  position: relative;
  overflow: hidden;
  background: var(--surface-alt);
  width: 100%;
  border: 1px solid var(--border);
}
.company-about-video-wrap::before { display: none; }
.company-about-video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  object-fit: cover;
  background: var(--surface-alt);
  vertical-align: middle;
}
.company-about-video-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}
.company-about-video-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  padding: 0;
  text-align: start;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
@media (max-width: 899px) {
  .company-about .company-container { padding: 0 1rem; }
  .company-about-grid { grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
  .company-about-visual { max-width: 100%; margin: 0 auto; width: 100%; padding: 0; }
  .company-about-video { min-height: 220px; }
  .company-about-icons { grid-template-columns: 1fr; }
}

/* Features — minimal grid cells */
.company-features { background: #fff; }
.company-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
@media (max-width: 899px) {
  .company-features-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .company-features-grid { grid-template-columns: 1fr; }
}
.company-feature-card {
  background: #fff;
  padding: 2rem 1.5rem;
  border: none;
  border-inline-end: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background var(--duration);
}
.company-feature-card:last-child { border-inline-end: none; }
body.lang-en .company-feature-card { border-inline-start: none; border-inline-end: 1px solid var(--border); }
body.lang-en .company-feature-card:last-child { border-inline-end: none; }
.company-feature-card:hover {
  background: var(--surface-alt);
}
body.lang-en .company-feature-card:hover { background: var(--surface-alt); }
.company-feature-card[data-animate] {
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), background var(--duration);
}
.company-feature-card[data-animate].is-visible:nth-child(1) { transition-delay: 0s; }
.company-feature-card[data-animate].is-visible:nth-child(2) { transition-delay: 0.06s; }
.company-feature-card[data-animate].is-visible:nth-child(3) { transition-delay: 0.12s; }
.company-feature-card[data-animate].is-visible:nth-child(4) { transition-delay: 0.18s; }
.company-feature-icon {
  width: 40px;
  height: 40px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.company-feature-icon svg {
  width: 24px;
  height: 24px;
}
.company-feature-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.company-feature-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* How it works — minimal numbered grid */
.company-how { background: var(--surface-alt); }
.company-how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  margin-top: 1rem;
}
@media (max-width: 899px) {
  .company-how-steps { grid-template-columns: 1fr; }
}
.company-how-step {
  position: relative;
  padding: 2rem 1.75rem;
  background: #fff;
  border-inline-end: 1px solid var(--border);
  transition: background var(--duration);
}
.company-how-step:last-child { border-inline-end: none; }
.company-how-step:hover {
  background: var(--surface-alt);
}
.company-how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.company-how-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.6rem;
  line-height: 1.3;
}
.company-how-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}
.company-how-step[data-animate] { transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.company-how-step[data-animate].is-visible:nth-child(1) { transition-delay: 0s; }
.company-how-step[data-animate].is-visible:nth-child(2) { transition-delay: 0.1s; }
.company-how-step[data-animate].is-visible:nth-child(3) { transition-delay: 0.2s; }

/* Who it's for — minimal two-col grid */
.company-who { background: #fff; }
.company-who-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  margin-top: 1rem;
}
@media (max-width: 600px) {
  .company-who-grid { grid-template-columns: 1fr; }
}
.company-who-card {
  background: #fff;
  padding: 2.25rem 2rem;
  border-inline-end: 1px solid var(--border);
  transition: background var(--duration);
}
.company-who-card:last-child { border-inline-end: none; }
.company-who-card:hover {
  background: var(--surface-alt);
}
.company-who-icon {
  width: 40px;
  height: 40px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.company-who-icon svg { width: 24px; height: 24px; }
.company-who-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.6rem;
  line-height: 1.3;
}
.company-who-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 1.5rem;
}
.company-who-card .btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
}
.company-who-card[data-animate] { transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.company-who-card[data-animate].is-visible:nth-child(1) { transition-delay: 0s; }
.company-who-card[data-animate].is-visible:nth-child(2) { transition-delay: 0.1s; }

/* CTA — minimal flat */
.company-cta {
  position: relative;
  padding: var(--section-padding-y) 0;
  overflow: hidden;
  border-bottom: none;
}
.company-cta-bg {
  position: absolute;
  inset: 0;
  background: var(--text);
}
.company-cta-inner { position: relative; z-index: 1; }
.company-cta-content { text-align: center; max-width: 520px; margin: 0 auto; }
.company-cta-title {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.company-cta-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2.25rem;
  line-height: 1.7;
}
.company-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.company-cta-buttons .btn {
  min-height: 48px;
  padding: 0.75rem 2rem;
  font-size: 0.8rem;
  transition: background var(--duration), border-color var(--duration);
}
.company-cta-buttons .btn:hover { transform: none; }
.company-cta-buttons .btn-white { border-width: 1px; }

/* ===== Footer — minimal corporate ===== */
.company-footer {
  background: var(--text);
  color: rgba(255,255,255,0.85);
  padding: 3.5rem 0 2rem;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}
.company-footer .company-container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--grid-gap-lg);
  box-sizing: border-box;
}
.company-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem 2rem;
  margin-bottom: 2.5rem;
  align-items: start;
}
.company-footer .logo-link-wrap { display: inline-flex; }
.company-footer .landing-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.company-footer .logo-fallback {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}
.company-footer .logo-link-wrap img[data-failed="true"] ~ .logo-fallback { display: inline-flex; }
.company-footer-tagline {
  font-size: 0.8rem;
  margin: 1rem 0 0;
  opacity: 0.5;
  max-width: 280px;
  line-height: 1.6;
}
.company-footer-links h4 {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin: 0 0 1rem;
}
.company-footer-links a {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  padding: 0.4rem 0;
  min-height: 44px;
  transition: color var(--duration);
}
.company-footer-links a:hover { color: #fff; }
.company-footer-bottom {
  padding-top: 1.75rem;
  margin-top: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.company-footer-bottom p {
  font-size: 0.75rem;
  opacity: 0.4;
  margin: 0;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
@media (max-width: 768px) {
  .company-footer { padding: 2.5rem 0 1.5rem; padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
  .company-footer .company-container { padding: 0 1rem; }
  .company-footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: center;
  }
  .company-footer-brand { display: flex; flex-direction: column; align-items: center; }
  .company-footer-tagline { margin-inline: auto; text-align: center; }
  .company-footer-links { text-align: center; }
  .company-footer-links a { justify-content: center; }
}
@media (max-width: 480px) {
  .company-footer { padding: 2rem 0 1.25rem; }
  .company-footer-grid { gap: 1.75rem; margin-bottom: 1.75rem; }
  .company-footer-links a { padding: 0.5rem 0; min-height: 44px; }
}

/* Home: initial hero animations */
.company-hero [data-animate] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.company-hero [data-animate].is-visible { opacity: 1; transform: translateY(0); }
.company-hero-badge.is-visible { transition-delay: 0.1s; }
.company-hero-title.is-visible { transition-delay: 0.2s; }
.company-hero-tagline.is-visible { transition-delay: 0.3s; }
.company-hero-desc.is-visible { transition-delay: 0.4s; }
.company-hero-cta.is-visible { transition-delay: 0.5s; }
.company-hero-scroll.is-visible { transition-delay: 0.8s; }

@media (max-width: 768px) {
  :root { --logo-header: 62px; --logo-hero: 72px; --logo-auth: 32px; }
  .home .home-nav,
  .home .home-header-actions { display: none !important; }
  .auth-layout .home-nav,
  .auth-layout .home-header-actions { display: none !important; }
  .home-header .app-nav-desk,
  .home-header .home-header-actions { display: none !important; }
  .home-header .mobile-nav-toggle,
  .auth-layout .mobile-nav-toggle { display: flex !important; }
  .dash-header .mobile-nav-toggle { display: flex !important; }
  .dash-topbar-nav,
  .dash-topbar-actions { display: none !important; }
  .dash-topbar-toggle { display: flex !important; margin: 0; flex-shrink: 0; }
  .dash-topbar-inner {
    padding: 0.5rem 1rem;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    align-items: center;
  }
  .dash-topbar-logo { flex-shrink: 0; min-width: 0; }
  .dash-topbar-logo img { transform: scale(1.15); transform-origin: left center; }
  body.lang-en .dash-topbar-logo img { transform-origin: right center; }
  .dash-topbar-logo-fallback { transform: scale(1.15); transform-origin: left center; }
  body.lang-en .dash-topbar-logo-fallback { transform-origin: right center; }
  .home-nav a { height: auto; min-height: 44px; padding: 0.5rem 0.75rem; }
  .home-header-inner {
    padding: 0.5rem 1rem;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-width: 0;
  }
  .dash-header .home-header-inner { padding-inline-end: 0.5rem; }
  .home-header .logo-link-wrap { flex-shrink: 0; min-width: 0; }
  .home-header .mobile-nav-toggle { flex-shrink: 0; margin: 0; }
  .home-header .landing-logo { transform: scale(1.15); transform-origin: left center; }
  body.lang-en .home-header .landing-logo { transform-origin: right center; }
  .home-header .logo-fallback { transform: scale(1.15); transform-origin: left center; }
  body.lang-en .home-header .logo-fallback { transform-origin: right center; }
  .home { padding-top: 64px; }
  .company-hero-content { padding: 3rem 1rem 4rem; }
  .company-about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .company-features-grid { grid-template-columns: 1fr; }
  .company-footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .company-section { padding: 3.5rem 0; }
}
@media (max-width: 600px) {
  .auth-main { padding: 2rem 1rem 3rem; }
  .auth-container { max-width: none; }
  .login-type-row { flex-direction: column; }
  .home-header-inner { padding: 0.5rem 0.75rem; }
  .dash-topbar-inner { padding: 0.5rem 0.75rem; }
  .admin-main {
    padding: 1rem 0.75rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .app-main {
    padding: 1rem 0.75rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .admin-header-row { margin-bottom: 1.25rem; gap: 0.75rem; flex-wrap: wrap; }
  .admin-header-row .page-title { font-size: 1.2rem; line-height: 1.35; flex: 1 1 auto; min-width: 0; }
  .dash-cards { gap: 1rem; margin-bottom: 1.5rem; }
  .dash-card { padding: 1.25rem 1rem; }
  .dash-card .dash-card-value { font-size: 1.65rem; }
  .dash-card .dash-card-label { font-size: 0.8rem; }
  .user-dash-cards { gap: 1rem; }
  .user-dash-card { padding: 1.25rem 1.25rem; }
  .user-dash-card h3 { font-size: 1.05rem; }
  .user-dash-card p { font-size: 0.875rem; }
  .user-dash-welcome { font-size: 0.95rem; margin-bottom: 1.25rem; max-width: 100%; }
  .company-container { padding: 0 1rem; }
  .search-bar { max-width: none; }
  .avatar-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-card { padding: 1.25rem 1.25rem; margin: 0 0.75rem; max-width: calc(100% - 1.5rem); box-sizing: border-box; }
  .panel { padding: 1.25rem; }
  .dash-section { padding: 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 480px) {
  .company-hero-cta { flex-direction: column; }
  .company-hero-cta .btn { width: 100%; }
  .company-cta-buttons { flex-direction: column; }
  .company-cta-buttons .btn { width: 100%; }
  .company-hero-inner { padding: 3rem 1rem 4rem; }
  .admin-main { padding: 0.75rem 0.6rem; }
  .app-main { padding: 0.75rem 0.6rem; }
  .home-header-inner { padding: 0.5rem 0.6rem; }
  .dash-header .home-header-inner { padding: 0.5rem 0.6rem; padding-inline-end: 0.5rem; }
  .dash-topbar-inner { padding: 0.5rem 0.6rem; }
  .admin-sidebar { padding: 0 0.6rem; min-height: 52px; }
  .admin-sidebar .app-logo { height: 50px; }
  .dash-cards { grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
  .dash-card { padding: 1rem 0.85rem; }
  .dash-card .dash-card-value { font-size: 1.5rem; }
  .user-dash-cards { grid-template-columns: 1fr; gap: 0.75rem; }
  .user-dash-card { padding: 1rem 0.85rem; }
  .admin-header-row .page-title { font-size: 1.05rem; }
  .dash-section { padding: 0.75rem 0.6rem; }
}
/* ===== Admin: هيدر الداشبورد الجديد على الموبايل (إخفاء السايدبار وإظهار الـ topbar) ===== */
@media (max-width: 900px) {
  .admin-layout { flex-direction: column; min-height: 100vh; }
  .admin-main { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; overflow-x: hidden; }
  .dash-topbar-admin {
    display: block !important;
  }
  .dash-topbar-admin .dash-topbar-toggle { display: flex !important; }
  .admin-sidebar { display: none !important; }
}

/* Legacy landing (if used elsewhere) */
.landing { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; background: var(--bg); }
.landing-logo-wrap { margin-bottom: 2rem; }
.landing-logo {
  height: var(--logo-hero);
  width: auto;
  object-fit: contain;
}
body.lang-en .landing .lang-switcher { left: auto; right: 1rem; }
.landing-actions { display: flex; gap: 1rem; }
.landing-actions a { padding: 0.85rem 2rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; text-decoration: none; transition: background 0.2s, color 0.2s; }
.landing-btn-primary { background: var(--primary); color: #fff; border: none; }
.landing-btn-primary:hover { background: var(--primary-hover); }
.landing-btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.landing-btn-secondary:hover { background: var(--bg); }

/* ===== Database page ===== */
.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}
.search-bar {
  max-width: 400px;
  margin-bottom: 1.5rem;
}
.search-bar input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
}
body.lang-en .search-bar input { background-position: left 0.75rem center; }
.search-bar input:focus { outline: none; border-color: var(--primary); }
.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) { .panels { grid-template-columns: 1fr; } }
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.5rem;
}
.panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.panel.disability .panel-title { color: var(--primary); }
.panel .field {
  margin-bottom: 1rem;
}
.panel label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.panel input[type="text"],
.panel input[type="number"],
.panel input[type="file"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
}
.panel input:focus { outline: none; border-color: var(--primary); }
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--bg);
  margin-bottom: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-zone input[type="file"] { display: none; }

/* ===== Database — add person form ===== */
.dash-export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  align-items: center;
}
/* ===== Database — multi-driver plate link ===== */
.vehicle-link-section {
  max-width: 920px;
}
.vehicle-link-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--primary-light);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}
.vehicle-link-hint strong { color: var(--primary); font-weight: 600; }
.vehicle-link-hint-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  font-style: normal;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}
.vehicle-link-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 1.25rem 1.35rem 1.35rem;
  margin-bottom: 1.25rem;
}
.vehicle-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}
.vehicle-link-grid .field { margin: 0; min-width: 0; }
.vehicle-link-grid label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}
.vehicle-link-grid label .req {
  color: var(--danger);
  font-weight: 700;
}
.vehicle-link-grid input[type="text"],
.vehicle-link-grid select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.vehicle-link-grid select {
  cursor: pointer;
  appearance: auto;
}
.vehicle-link-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.vehicle-link-table-wrap {
  margin-top: 0;
}
.vehicle-link-table .vehicle-plate-cell {
  width: 28%;
  vertical-align: middle;
}
.vehicle-link-table .vehicle-drivers-cell {
  width: 52%;
  vertical-align: middle;
}
.vehicle-link-table .vehicle-date-cell {
  width: 20%;
  vertical-align: middle;
  color: var(--text-muted);
  font-size: 0.88rem;
  white-space: nowrap;
}
.vehicle-plate-badge {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: var(--primary-light);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.vehicle-drivers-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.vehicle-driver-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  line-height: 1.3;
  max-width: 100%;
}
.vehicle-driver-name { font-weight: 600; }
.vehicle-driver-nid {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}
.btn-unlink-driver {
  border: none;
  background: rgba(198, 40, 40, 0.08);
  color: #c62828;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-unlink-driver:hover {
  background: rgba(198, 40, 40, 0.18);
}
.vehicle-link-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1.75rem 1rem !important;
  font-size: 0.92rem;
}
@media (max-width: 640px) {
  .vehicle-link-grid { grid-template-columns: 1fr; }
  .vehicle-link-table .vehicle-plate-cell,
  .vehicle-link-table .vehicle-drivers-cell,
  .vehicle-link-table .vehicle-date-cell { width: auto; }
}
.trip-type-match { color: #1b7a3d; font-weight: 600; }
.trip-type-violation { color: #c62828; font-weight: 600; }
.trip-loc-link { font-size: 0.85rem; }
.person-add-method {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.person-method-btn {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.person-method-btn.active {
  border-color: var(--primary);
  background: var(--primary-light, rgba(59, 130, 246, 0.12));
  color: var(--primary);
  font-weight: 600;
}
.person-face-preview {
  margin-top: 0.65rem;
}
.person-face-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.btn-sm {
  margin-top: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}
.json-file-status.json-ok { color: var(--success, #16a34a); }
.json-file-status.json-err { color: var(--danger, #dc2626); }
.person-add-form {
  max-width: 920px;
}
.person-add-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 1.35rem 1.5rem 1.5rem;
}
.person-add-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 0 1.35rem;
  padding: 0.85rem 1rem;
  background: var(--primary-light);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}
.person-add-hint strong { color: var(--primary); font-weight: 600; }
.person-add-hint-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  font-style: normal;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}
.person-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.35rem;
}
.person-add-grid .field {
  margin: 0;
  min-width: 0;
}
.person-add-grid .field-full,
.person-add-grid .field-span-2 {
  grid-column: 1 / -1;
}
.person-add-grid label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}
.person-add-grid label .label-sub {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
}
.person-add-grid label .req {
  color: var(--danger);
  font-weight: 700;
  line-height: 1;
}
.person-add-grid input[type="text"],
.person-add-grid input[type="email"],
.person-add-grid input[type="tel"],
.person-add-grid textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--duration), box-shadow var(--duration);
}
.person-add-grid input::placeholder,
.person-add-grid textarea::placeholder {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.person-add-grid input:hover,
.person-add-grid textarea:hover {
  border-color: var(--border-focus);
}
.person-add-grid input:focus,
.person-add-grid textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.person-add-grid input:focus-visible,
.person-add-grid textarea:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.person-add-grid .field-embedding textarea {
  min-height: 9.5rem;
  max-height: 18rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  resize: vertical;
  direction: ltr;
  text-align: left;
}
body.lang-ar .person-add-grid .field-embedding textarea {
  text-align: left;
}
.person-add-grid .field-help {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.person-add-grid .field-help code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  padding: 0.1rem 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.person-add-actions {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.person-add-actions .form-msg {
  margin-inline-start: 0.25rem;
}
@media (max-width: 720px) {
  .person-add-card { padding: 1rem; }
  .person-add-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .person-add-grid .field-span-2 {
    grid-column: 1;
  }
  .person-add-actions {
    flex-wrap: wrap;
  }
  .person-add-actions .btn {
    flex: 1 1 auto;
    min-width: 120px;
  }
}
.sub-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.sub-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.avatar-slot {
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.avatar-slot:hover { border-color: var(--primary); }

/* ===== Violations page ===== */
.violation-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 900px;
}
@media (max-width: 700px) { .violation-layout { grid-template-columns: 1fr; } }
.violation-image-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.violation-details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.5rem;
}
.violation-details h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}
.violation-meta {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.violation-meta strong { color: var(--text); }
.violation-reason {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--danger-bg);
  border-right: 3px solid var(--danger);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--danger);
  font-weight: 500;
  font-size: 0.95rem;
}
body.lang-en .violation-reason { border-right: none; border-left: 3px solid var(--danger); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.violation-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}
.violation-thumbs .violation-image-box { min-height: 100px; }

/* ===== Admin layout (sidebar) ===== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border-inline-start: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: column;
}
body.lang-en .admin-sidebar { border-inline-start: none; border-inline-end: 1px solid var(--border); }
.admin-sidebar .logo-wrap {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.admin-sidebar .app-logo {
  height: 72px;
  width: auto;
  object-fit: contain;
  display: block;
}
.admin-sidebar-nav {
  padding: 0.5rem 0;
}
.admin-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  margin: 0;
  border-radius: 0;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  transition: color var(--duration), background var(--duration);
  border-inline-start: 2px solid transparent;
}
.admin-sidebar-nav a:hover { color: var(--text); background: var(--surface-alt); }
.admin-sidebar-nav a.active {
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 600;
  border-inline-start-color: var(--text);
}
.admin-sidebar .logout-wrap {
  margin-top: auto;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.admin-sidebar .logout-wrap a {
  display: block;
  padding: 0.5rem 0;
  color: var(--danger);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.admin-sidebar .logout-wrap a:hover { text-decoration: underline; }
.admin-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: visible;
  padding: 2rem;
  background: #fff;
}
.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.admin-header-row .page-title {
  margin-bottom: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
}

/* ===== Admin Dashboard ===== */
.admin-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.admin-only-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
}
.dash-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.dash-intro strong { color: var(--primary); }
.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.dash-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.5rem;
  transition: background var(--duration);
}
.dash-card:hover {
  background: var(--surface-alt);
}
.dash-card .dash-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.dash-card .dash-card-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.dash-card .dash-card-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  opacity: 0.9;
}
.dash-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dash-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th,
.data-table td { padding: 0.75rem 1rem; text-align: right; border-bottom: 1px solid var(--border); }
body.lang-en .data-table th,
body.lang-en .data-table td { text-align: left; }
.data-table thead tr:last-child th { border-bottom: 2px solid var(--border); }
.data-table th {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-alt);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-alt); }
.data-table a { color: var(--primary); font-weight: 600; text-decoration: none; }
.data-table a:hover { text-decoration: underline; }
.btn-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 0;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }

/* Login type (Admin / User) */
.login-type-row { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.login-type-btn {
  flex: 1;
  min-height: 44px;
  padding: 0.8rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--duration), background var(--duration), color var(--duration);
  text-align: center;
}
.login-type-btn:hover { border-color: var(--text); color: var(--text); }
.login-type-btn.active {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}
.login-form-wrap { margin-top: 0.25rem; }
.login-form-wrap.hidden { display: none; }
.auth-demo-accounts {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.auth-demo-title {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}
.auth-demo-row {
  margin: 0.4rem 0;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.auth-demo-row code {
  background: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 0;
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 0.85em;
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 500;
}
.auth-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

/* User dashboard */
.app-main .admin-header-row { margin-bottom: 1.5rem; }
.app-main .page-title { font-size: 1.35rem; }
.user-dash-welcome {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.55;
  max-width: 480px;
}
.user-dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.user-dash-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.6rem 1.75rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background var(--duration);
}
body.lang-en .user-dash-card { border-inline-start: none; }
.user-dash-card:hover {
  background: var(--surface-alt);
}
.user-dash-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.user-dash-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ===== Personal page ===== */
.profile-card {
  max-width: 520px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 2rem 2.25rem;
}
.profile-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.profile-card .field { margin-bottom: 1rem; }
.profile-card label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.profile-card .value { font-weight: 500; color: var(--text); font-size: 1rem; }

/* DB connection status indicator */
.db-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
}
.db-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.db-status-ok { color: #16a34a; border-color: #bbf7d0; }
.db-status-ok .db-status-dot { background: #16a34a; }
.db-status-err { color: var(--danger); border-color: #fecaca; }
.db-status-err .db-status-dot { background: var(--danger); }

/* Form action bar */
.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.form-actions .btn { min-width: 140px; }
.form-msg {
  font-size: 0.85rem;
  font-weight: 500;
}
.form-msg-ok { color: #16a34a; }
.form-msg-err { color: var(--danger); }

/* ===== Database table enhancements ===== */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--text);
  color: #fff;
  border-radius: 2px;
  margin-inline-start: 0.5rem;
  vertical-align: middle;
}
.data-table { font-size: 0.85rem; }
.data-table th { font-size: 0.72rem; white-space: nowrap; }
.data-table td { vertical-align: middle; }
.row-num {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  width: 36px;
  text-align: center;
}
.col-name { font-weight: 600; }
.mono { font-family: 'Courier New', monospace; font-size: 0.8rem; letter-spacing: 0.02em; }
.col-date { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-ok { color: #16a34a; border-color: #bbf7d0; }
.badge-ok::before { background: #16a34a; }
.badge-warn { color: #d97706; border-color: #fde68a; }
.badge-warn::before { background: #d97706; }
.badge-none { color: var(--text-muted); border-color: var(--border); }
.badge-none::before { background: var(--text-muted); }

.plate-cell { min-width: 10rem; }
.plate-view {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.plate-text { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.plate-empty { color: var(--text-muted); }
.btn-plate-edit {
  flex-shrink: 0;
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color var(--duration), border-color var(--duration), background var(--duration);
}
.btn-plate-edit:hover {
  color: var(--text);
  border-color: var(--border-focus);
  background: var(--primary-light);
}
.plate-edit { display: flex; flex-direction: column; gap: 0.45rem; }
.plate-edit.hidden { display: none; }
.plate-view.hidden { display: none; }
.plate-input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--surface);
}
.plate-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.plate-edit-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.btn-xs {
  padding: 0.3rem 0.55rem;
  font-size: 0.75rem;
  min-width: auto;
}
.data-table .col-plate { min-width: 11rem; }

.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.show-more-wrap {
  padding: 1rem 0 0.25rem;
  text-align: center;
}
.show-more-btn {
  min-width: 160px;
  gap: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.show-more-counter {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .data-table { min-width: 800px; }
}

/* ===== Admin: filter bar (matches / violations) ===== */
.list-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.list-filter-search {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
}
.list-filter-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  background: #fff;
}
.list-filter-btn {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.list-filter-btn:hover { background: var(--bg); }

.list-view-btn, .viol-view-btn, .match-view-btn, .inc-view-btn {
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--accent, #002855);
  color: var(--accent, #002855);
  background: transparent;
}
.list-view-btn:hover, .viol-view-btn:hover, .match-view-btn:hover, .inc-view-btn:hover {
  background: var(--accent, #002855);
  color: #fff;
}

/* ===== Admin: alert badge in topbar ===== */
.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-inline-start: auto;
  margin-inline-end: 0.5rem;
}
.admin-alert-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  color: var(--accent, #002855);
  transition: background 0.15s, border-color 0.15s;
}
.admin-alert-btn:hover { background: var(--bg); border-color: var(--accent, #002855); }
.admin-alert-btn svg { width: 18px; height: 18px; }
.admin-alert-badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  background: #dc3545;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.admin-alert-badge.visible { display: flex; }
.admin-alert-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: min(320px, 90vw);
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  z-index: 200;
  display: none;
}
.admin-alert-dropdown.open { display: block; }
.admin-alert-item {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,.05);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.admin-alert-item:hover { background: #f7f8fa; }
.admin-alert-item-type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-alert-item-type.violation { color: #dc3545; }
.admin-alert-item-type.incident { color: #856404; }
.admin-alert-item-title { font-weight: 600; font-size: 0.88rem; margin-top: 0.15rem; }
.admin-alert-item-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
.admin-alert-wrap { position: relative; }

/* ===== Admin dashboard: today cards + chart ===== */
.dash-cards-today .dash-card-value { color: var(--accent, #002855); }
.dash-card-today-matches .dash-card-value { color: #28a745; }
.dash-card-today-violations .dash-card-value { color: #dc3545; }
.dash-card-today-incidents .dash-card-value { color: #856404; }

.dash-chart-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.dash-chart-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--accent, #002855);
}
.dash-chart-legend {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.dash-chart-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.dash-chart-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.legend-matches i { background: #28a745; }
.legend-violations i { background: #dc3545; }

.dash-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 180px;
  padding-top: 0.5rem;
}
.dash-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.dash-chart-bar-group {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 150px;
  width: 100%;
  justify-content: center;
}
.dash-chart-bar {
  width: 42%;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s;
}
.dash-chart-bar.bar-matches { background: #28a745; }
.dash-chart-bar.bar-violations { background: #dc3545; }
.dash-chart-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  white-space: nowrap;
}

.dash-devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}
.dash-device-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  background: #fff;
}
.dash-device-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent, #002855);
}
.dash-device-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.45;
}
.dash-device-dot-online, .dash-device-dot-offline {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-inline-end: 0.35rem;
}
.dash-device-dot-online { background: #28a745; }
.dash-device-dot-offline { background: #dc3545; }

.detail-map-wrap { margin-top: 1rem; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.detail-map-wrap #detail-inc-map { height: 240px; }

/* ===== Unified detail pages ===== */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent, #002855);
  text-decoration: none;
  transition: opacity 0.15s;
}
.detail-back:hover { opacity: 0.7; }
.detail-back svg { width: 18px; height: 18px; }

.detail-banner {
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.detail-banner svg { width: 22px; height: 22px; flex-shrink: 0; }
.detail-banner-success { background: linear-gradient(135deg, #28a745, #20c997); color: #fff; }
.detail-banner-danger { background: #f8d7da; color: #721c24; }
.detail-banner-warning { background: #fff3cd; color: #856404; }
.detail-banner-info { background: #d1ecf1; color: #0c5460; }
.detail-banner-neutral { background: #e2e3e5; color: #383d41; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 750px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-images-panel { display: flex; flex-direction: column; gap: 1rem; }
.detail-img-card {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  overflow: hidden;
  background: #f7f8fa;
}
.detail-img-card-label {
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted, #888);
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.detail-img-card img {
  width: 100%;
  display: block;
  object-fit: contain;
  max-height: 340px;
  background: #f3f4f6;
}
.detail-img-empty {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 2.5rem;
}
.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.detail-details-panel { display: flex; flex-direction: column; gap: 1rem; }
.detail-info-card {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.detail-info-card-header {
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 0.92rem;
  background: #f7f8fa;
  border-bottom: 1px solid rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.detail-info-card-header svg { width: 18px; height: 18px; opacity: 0.6; }
.detail-info-card-body { padding: 0.85rem 1rem; }
.detail-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.detail-info-table td {
  padding: 0.45rem 0;
  vertical-align: top;
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.detail-info-table td:first-child {
  color: var(--text-muted, #888);
  font-weight: 600;
  width: 42%;
  font-size: 0.85rem;
}
.detail-info-table tr:last-child td { border-bottom: none; }

.detail-plate-text {
  direction: rtl;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.detail-sim-badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
}
.detail-sim-high { background: #d4edda; color: #155724; }
.detail-sim-mid { background: #fff3cd; color: #856404; }
.detail-sim-low { background: #f8d7da; color: #721c24; }

.detail-person-card { border: 1px solid rgba(0,0,0,.08); border-radius: 12px; background: #fff; overflow: hidden; }
.detail-person-body {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
}
.detail-person-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent, #002855);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.detail-person-name { font-size: 1.1rem; font-weight: 700; color: var(--accent, #002855); }
.detail-person-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.15rem; }

.detail-timeline {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: #fff;
  padding: 1rem 1.1rem;
}
.detail-timeline-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
  color: var(--accent, #002855);
}
.detail-tl-step {
  display: flex;
  gap: 0.75rem;
  position: relative;
  padding-bottom: 1rem;
}
.detail-tl-step:last-child { padding-bottom: 0; }
.detail-tl-step:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 22px;
  inset-inline-start: 11px;
  width: 2px;
  height: calc(100% - 10px);
  background: #e0e3e8;
}
.detail-tl-step.done:not(:last-child)::before { background: #28a745; }
.detail-tl-step.fail:not(:last-child)::before { background: #dc3545; }
.detail-tl-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #e0e3e8;
  background: #fff;
  flex-shrink: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}
.detail-tl-step.done .detail-tl-dot { border-color: #28a745; background: #28a745; color: #fff; }
.detail-tl-step.fail .detail-tl-dot { border-color: #dc3545; background: #dc3545; color: #fff; }
.detail-tl-step.pending .detail-tl-dot { border-color: #ccc; color: #999; }
.detail-tl-title { font-weight: 700; font-size: 0.88rem; }
.detail-tl-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; line-height: 1.45; }

.detail-actions { margin-top: 0.25rem; }
.detail-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.detail-btn:hover { opacity: 0.85; }
.detail-btn-danger { background: #dc3545; color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   Landing page v2 — Modern overrides (appended, لا تعديل لباقي الملف)
   ═══════════════════════════════════════════════════════════════ */

/* ── Scroll progress bar ───────────────────────────────────── */
#lp-progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  z-index: 9999;
  transition: width .12s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Header modernisation ──────────────────────────────────── */
.home .home-header {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,.07);
  box-shadow: 0 1px 12px rgba(0,0,0,.06);
  transition: background .3s, box-shadow .3s;
}
.home .home-header.scrolled {
  background: rgba(255,255,255,.97);
  box-shadow: 0 2px 20px rgba(0,0,0,.09);
}

/* Login button — rounded + accent */
.home-header-actions .btn-primary {
  background: #0f172a;
  color: #fff;
  border-radius: 8px !important;
  border: none !important;
  padding: .55rem 1.35rem !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
  font-size: .85rem !important;
  transition: background .2s, box-shadow .2s, transform .15s !important;
}
.home-header-actions .btn-primary:hover {
  background: #1e293b;
  box-shadow: 0 4px 14px rgba(15,23,42,.25);
  transform: translateY(-1px);
}

/* ── Hero — richer gradient ────────────────────────────────── */
.company-hero {
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 100%);
}
.company-hero-bg::after {
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.15));
}
.company-hero-badge {
  color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-bottom: none;
  border-radius: 999px;
  padding: .35rem 1rem;
  letter-spacing: .18em;
}
.company-hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.04em;
}
.company-hero-cta .btn-primary {
  background: #2563eb;
  color: #fff;
  border: none !important;
  border-radius: 10px !important;
  padding: 1rem 2.5rem !important;
  font-size: .9rem !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 20px rgba(37,99,235,.45);
  transition: background .2s, box-shadow .2s, transform .15s !important;
}
.company-hero-cta .btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 28px rgba(37,99,235,.55);
  transform: translateY(-2px);
}
/* scroll indicator — animated line */
.company-hero-scroll-dot {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,.5), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: .6; transform: scaleY(1); }
  50%      { opacity: 1;  transform: scaleY(1.15); }
}

/* ── Stats row ─────────────────────────────────────────────── */
.lp-stats {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
}
.lp-stats-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 768px) {
  .lp-stats-inner { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) {
  .lp-stats-inner { grid-template-columns: 1fr 1fr; }
}
.lp-stat {
  padding: 1.75rem 1rem;
  text-align: center;
  border-inline-end: 1px solid #e2e8f0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
.lp-stat:last-child { border-inline-end: none; }
.lp-stat.is-visible { opacity: 1; transform: translateY(0); }
.lp-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: .35rem;
}
.lp-stat-num span { color: #2563eb; }
.lp-stat-label {
  font-size: .78rem;
  color: #64748b;
  font-weight: 500;
  line-height: 1.35;
}

/* ── Section label — modern pill ───────────────────────────── */
.company-section-label {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #2563eb;
  background: #dbeafe;
  border-radius: 999px;
  padding: .28rem .85rem;
  margin-bottom: 1rem;
}

/* ── Section head ──────────────────────────────────────────── */
.company-section-title {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.035em;
}

/* ── Features — modern cards ───────────────────────────────── */
.company-features { background: #f8fafc; }
.company-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  border: none;
}
@media (max-width: 899px) { .company-features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px)  { .company-features-grid { grid-template-columns: 1fr; } }

.company-feature-card {
  background: #fff;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 1.75rem 1.5rem !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: box-shadow .25s, transform .25s, border-color .25s !important;
}
.company-feature-card:hover {
  background: #fff !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  transform: translateY(-3px);
  border-color: #2563eb !important;
}
.company-feature-icon {
  width: 44px;
  height: 44px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 10px;
  margin-bottom: 1.1rem;
}
.company-feature-icon svg { width: 22px; height: 22px; }
.company-feature-title { font-size: 1rem; color: #0f172a; }
.company-feature-desc  { font-size: .87rem; color: #64748b; }

/* ── How it works — modern numbered ───────────────────────── */
.company-how { background: #fff; }
.company-how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  border: none;
  margin-top: 0;
}
@media (max-width: 899px) { .company-how-steps { grid-template-columns: 1fr; } }

.company-how-step {
  padding: 2rem 1.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px;
  position: relative;
  transition: box-shadow .25s, transform .25s !important;
}
.company-how-step:hover {
  background: #f8fafc !important;
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
  transform: translateY(-3px);
}
.company-how-num {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
  margin-bottom: 1.25rem;
}
.company-how-title { color: #0f172a; }
.company-how-desc  { color: #64748b; }

/* ── Who / Use cases ───────────────────────────────────────── */
.company-who { background: #f8fafc; }
.company-who-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 1.5rem;
  border: none;
  margin-top: 0;
}
@media (max-width: 600px) { .company-who-grid { grid-template-columns: 1fr; } }

.company-who-card {
  background: #fff;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 2.25rem 2rem !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: box-shadow .25s, transform .25s !important;
}
.company-who-card:hover {
  background: #fff !important;
  box-shadow: 0 10px 36px rgba(0,0,0,.1);
  transform: translateY(-3px);
}
.company-who-icon {
  width: 46px;
  height: 46px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}
.company-who-icon svg { width: 24px; height: 24px; }
.company-who-title { color: #0f172a; }
.company-who-desc  { color: #64748b; }

.company-who-card .btn-ghost {
  border: 1px solid #e2e8f0;
  color: #2563eb;
  border-radius: 8px;
  font-weight: 600;
  font-size: .82rem;
  transition: background .2s, border-color .2s;
}
.company-who-card .btn-ghost:hover {
  background: #eff6ff;
  border-color: #2563eb;
}

/* ── About section ─────────────────────────────────────────── */
.company-about { background: #fff; }
.company-about-video-wrap {
  border-radius: 14px !important;
  border: 1px solid #e2e8f0 !important;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
.about-icon-item {
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0 !important;
  margin: 4px;
  transition: background .2s, box-shadow .2s;
}
.about-icon-item:hover {
  background: #eff6ff;
  box-shadow: 0 2px 10px rgba(37,99,235,.1);
}
.about-icon {
  background: #eff6ff;
  color: #2563eb;
  border-radius: 8px;
}
.company-about-icons {
  gap: 0;
}

/* ── CTA — gradient ─────────────────────────────────────────── */
.company-cta-bg {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #1e40af 100%);
}
.company-cta-buttons .btn-white {
  background: #fff;
  color: #0f172a;
  border-color: #fff;
  border-radius: 10px !important;
  font-weight: 700 !important;
  padding: .85rem 2.5rem !important;
  text-transform: none !important;
  letter-spacing: .02em !important;
  font-size: .9rem !important;
  box-shadow: 0 4px 18px rgba(255,255,255,.15);
  transition: transform .2s, box-shadow .2s !important;
}
.company-cta-buttons .btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,255,255,.25);
}

/* ── Footer ─────────────────────────────────────────────────── */
.company-footer {
  background: #0f172a;
}

/* ── mobile nav — rounded panel ─────────────────────────────── */
.mobile-nav-panel {
  border-radius: 0;
  box-shadow: -4px 0 32px rgba(0,0,0,.15);
}

/* ── data-animate delay helpers ─────────────────────────────── */
.lp-stat:nth-child(1) { transition-delay: .05s; }
.lp-stat:nth-child(2) { transition-delay: .12s; }
.lp-stat:nth-child(3) { transition-delay: .19s; }
.lp-stat:nth-child(4) { transition-delay: .26s; }
