/* ====== FONTS — RagSans (Regular 400 + Bold 700), same as transport. ======
   Non-Hebrew scripts (ar/th/si) fall back per-glyph to system fonts. */
@font-face {
  font-family: 'RagSans';
  src: url('../fonts/RagSans-1.4-Regular.woff2') format('woff2'),
       url('../fonts/RagSans-1.4-Regular.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'RagSans';
  src: url('../fonts/RagSans-1.4-Bold.woff2') format('woff2'),
       url('../fonts/RagSans-1.4-Bold.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ============ VARIABLES (matching transport/style.css) ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --dark: #364153;
  --gray: #6A7282;
  --blue: #0A85ED;
  --blue-brand: #006FFF;
  --blue-light: #8DC1FF;
  --bg: #F5F5F5;
  --bg-soft: #F8FAFF;
  --card: #ffffff;
  --text: #364153;
  --text-light: #6A7282;
  --border: #E5E7EB;
  --border-card: #ECECEE;
  --shadow: 0 1px 3px rgba(54,65,83,0.06), 0 1px 2px rgba(54,65,83,0.04);
  --shadow-md: 0 4px 12px rgba(54,65,83,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  /* status colors */
  --st-02: #6B7280; --st-03: #F59E0B; --st-04: #3B82F6;
  --st-05: #8B5CF6; --st-06: #10B981; --st-07: #EF4444;
  --st-08: #06B6D4; --st-09: #84CC16;
}
body {
  font-family: 'RagSans', 'Noto Sans Hebrew', sans-serif;
  background: var(--bg-soft);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }

/* ============ USER SELECT SCREEN ============ */
.user-select-screen {
  min-height: 100vh;
  display: flex;
  /* מרכוז דרך margin-block:auto על הכרטיס (לא align-items:center) —
     כך במסך נמוך (טאבלט לרוחב) הכרטיס לא נחתך למעלה אלא נגלל */
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #F8FAFF 0%, #EEF4FF 100%);
}
.user-select-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 32px 24px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  margin-block: auto;
}
.user-select-logo { height: 48px; margin-bottom: 16px; }
.user-select-card h2 {
  font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 16px;
}
.user-select-subtitle {
  font-size: 14px; color: var(--text-light); margin-bottom: 24px;
}
.user-select-list { display: flex; flex-direction: column; gap: 10px; }
.user-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: start;
}
.user-row:hover, .user-row:active {
  background: #EEF4FF;
  border-color: var(--blue-light);
  transform: translateX(-2px);
}
[dir="ltr"] .user-row:hover, [dir="ltr"] .user-row:active { transform: translateX(2px); }
.user-row .chevron { color: var(--text-light); flex-shrink: 0; }
[dir="ltr"] .user-row .chevron { transform: scaleX(-1); }
.user-row .info { flex: 1; }
.user-row .name { font-size: 16px; font-weight: 600; color: var(--text); }
.user-row .role { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.user-row .avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--blue-light); background: var(--bg);
  flex-shrink: 0;
}
.user-row .avatar-fallback {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  color: white; font-size: 18px; font-weight: 600;
}

/* Add User button at bottom of user list */
.add-user-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 15px;
  margin-top: 22px;
  background: var(--blue-brand);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.15s;
}
.add-user-btn:hover { background: #0058D4; }
.add-user-btn .add-user-icon { width: 20px; height: 20px; filter: brightness(0) invert(1); }

/* ============ LANGUAGE PICKER — dropdown (user-select top) ============ */
.lang-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.datetime-chip {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lang-dropdown { position: relative; }
.lang-trigger {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s;
}
.lang-trigger:hover { border-color: var(--blue-light); background: #EEF4FF; }
.lang-trigger .flag {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border); flex-shrink: 0;
}
.lang-trigger .caret { width: 14px; height: 14px; color: var(--text-light); transition: transform 0.2s; }
.lang-dropdown.open .lang-trigger .caret { transform: rotate(180deg); }
.lang-dropdown-list {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(54,65,83,0.16);
  padding: 6px;
  width: 200px;
  display: none;
  z-index: 50;
}
.lang-dropdown.open .lang-dropdown-list { display: block; }

/* Shared option button (used in dropdown + lightbox) */
.lang-option {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: start;
  transition: background 0.12s;
}
.lang-option:hover { background: var(--bg-soft); }
.lang-option.active { background: #EEF4FF; }
.lang-option-flag {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border); flex-shrink: 0;
}
.lang-option-name { flex: 1; }
.lang-option-check { width: 18px; height: 18px; color: var(--blue-brand); opacity: 0; flex-shrink: 0; }
.lang-option.active .lang-option-check { opacity: 1; }

/* ============ HEADER ============ */
.main-app { display: none; }
.main-app.active { display: block; }

.header {
  background: var(--card);
  border-bottom: 0.8px solid var(--border);
  padding: 10px 14px;
  position: sticky; top: 0; z-index: 100;
}
.header-content {
  max-width: 800px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
}
/* Center the SignOn logo regardless of side content */
.header-logo-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.header-right { display: flex; align-items: center; gap: 10px; }
.header-avatar {
  width: 34px; height: 34px; border-radius: 17px; object-fit: cover;
  border: 1px solid var(--blue-light); flex-shrink: 0;
}
.header-avatar-fb {
  width: 34px; height: 34px; border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  color: white; font-weight: 600; font-size: 14px;
  flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; gap: 1px; }
.user-name { font-size: 13.1px; font-weight: 600; color: var(--text); line-height: 1.2; }
.user-dept { font-size: 10.5px; color: var(--text-light); line-height: 1.2; }
.logo { height: 26px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 16px;
  border: 0.8px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; padding: 0;
}
.icon-btn:hover { background: var(--border); }
.icon-btn svg { width: 16px; height: 16px; color: var(--text); }
.icon-btn .btn-img { width: 17px; height: 17px; }

/* Header language flag button */
.lang-flag-btn {
  width: 32px; height: 32px; border-radius: 16px;
  border: 0.8px solid var(--border); background: var(--bg);
  padding: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.lang-flag-btn:hover { border-color: var(--blue-light); }
.lang-flag-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ============ SEARCH ============ */
.search-section { padding: 12px 14px 8px; }
.search-wrapper { position: relative; max-width: 800px; margin: 0 auto; }
.search-input {
  width: 100%; padding: 11px 40px 11px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); font-size: 14px; outline: none;
  font-family: inherit;
}
[dir="ltr"] .search-input { padding: 11px 14px 11px 40px; }
.search-input:focus { border-color: var(--blue); }
.search-icon {
  position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-light);
  pointer-events: none;
}

/* ============ TABS (top of main app) ============ */
.tabs {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  position: sticky;
  top: var(--header-h, 55px); /* נמדד ב-JS (ResizeObserver) — עמיד לכל שפה/רוחב */
  z-index: 90;
}
.tabs-inner { max-width: 800px; margin: 0 auto; display: flex; gap: 4px; }
.tab {
  flex: 1;
  padding: 14px 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tab.active { color: var(--blue-brand); border-bottom-color: var(--blue-brand); }
.tab .tab-count {
  background: var(--bg);
  color: var(--text-light);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}
.tab.active .tab-count { background: #E7F1FF; color: var(--blue-brand); }
.tab-label { display: inline-flex; align-items: center; gap: 7px; }
.tab-icon { width: 18px; height: 18px; opacity: 0.55; transition: opacity 0.15s; }
.tab.active .tab-icon { opacity: 1; }

/* ============ VEHICLE LIST — FLAT LIST ============ */
.vehicle-list { max-width: 800px; margin: 0 auto; padding: 0; background: var(--card); }
.vehicle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--card);
  border-bottom: 1px solid #F0F0F2;
  cursor: pointer;
  transition: background 0.12s;
  -webkit-tap-highlight-color: rgba(0,0,0,0.04);
}
.vehicle-row:active, .vehicle-row:hover { background: var(--bg-soft); }
.vr-body { flex: 1; min-width: 0; }
.vr-line1 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.vr-status-mini {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  background: #EFF6FF;
  color: var(--blue-brand);
  font-variant-numeric: normal;
  letter-spacing: 0;
}
.vr-status-mini.bodyshop { background: #E0F2FE; color: #0369A1; }
.vr-status-mini.paint    { background: #F3E8FF; color: #7C3AED; }
.vr-status-mini.assembly { background: #DCFCE7; color: #15803D; }
.vr-status-mini.external { background: #FEE2E2; color: #B91C1C; }
.vr-line2 {
  font-size: 13.5px;
  color: var(--text-light);
  margin-top: 3px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vr-chevron { color: #CBD5E1; flex-shrink: 0; }
[dir="ltr"] .vr-chevron { transform: scaleX(-1); }

/* ============ EMPTY STATE — per-tab ============ */
.tab-empty { text-align: center; padding: 60px 24px; color: var(--text-light); }
.tab-empty svg { width: 48px; height: 48px; color: #CBD5E1; margin-bottom: 10px; }
.tab-empty h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.tab-empty p { font-size: 13px; }

/* ============ ARCHIVE ACCORDION ============ */
.archive-section { max-width: 800px; margin: 18px auto 80px; padding: 0; }
.archive-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  background: var(--blue-brand);
  border: 1px solid var(--blue-brand);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  transition: all 0.15s;
}
.archive-toggle:hover { background: #0058D4; border-color: #0058D4; }
.archive-toggle.open { border-radius: 12px 12px 0 0; }
.archive-icon { width: 18px; height: 18px; color: #ffffff; flex-shrink: 0; }
.archive-count {
  background: rgba(255,255,255,0.22);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  margin-inline-start: auto;
}
.archive-chevron { color: #ffffff; }
.archive-chevron { width: 14px; height: 14px; transition: transform 0.2s; flex-shrink: 0; }
.archive-chevron.rotated { transform: rotate(-180deg); }
.archive-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}
.archive-list .vehicle-row { background: var(--bg-soft); }
.archive-list .vehicle-row:last-child { border-bottom: none; }
.archive-list .vr-line1 { opacity: 0.85; }

/* ============ DETAIL SCREEN (fullscreen card) ============ */
.detail-screen {
  position: fixed; inset: 0;
  background: var(--bg-soft);
  z-index: 300;
  display: none;
  flex-direction: column;
  animation: slideRight 0.25s ease-out;
}
.detail-screen.active { display: flex; }
@keyframes slideRight { from { transform: translateX(-100%); } to { transform: translateX(0); } }

.detail-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.detail-back-btn {
  width: 38px; height: 38px;
  border-radius: 50%; border: none;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.detail-back-btn svg { width: 18px; height: 18px; color: var(--text); }
[dir="ltr"] .detail-back-btn svg { transform: scaleX(-1); }
.detail-license-top { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.detail-spacer { width: 38px; }

.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 18px;
}
.detail-client-icon {
  display: flex; align-items: center; justify-content: center;
}
.detail-client-icon img { width: 42px; height: 72px; object-fit: contain; }
/* License plate look — yellow rectangle with thin black stroke */
.detail-license-big {
  display: inline-block;
  font-size: 30px;
  font-weight: 800;
  color: #111418;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  background: #F7B500;
  border: 2px solid rgba(0,0,0,0.85);
  border-radius: 8px;
  padding: 8px 22px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25), 0 2px 6px rgba(54,65,83,0.12);
}
.detail-model { font-size: 18px; font-weight: 600; color: var(--text); }
.detail-info-block {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border-card);
  margin-top: 6px;
}
.detail-info-row {
  display: flex; justify-content: space-between;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-card);
}
.detail-info-row:last-child { border-bottom: none; }
.detail-info-row .lbl { color: var(--text-light); }
.detail-info-row .val { color: var(--text); font-weight: 600; }
.detail-info-row .val.status { color: var(--blue); }
.detail-actions {
  width: 100%;
  max-width: 440px;
  display: flex; flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.detail-cta {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 20px;
  border: none;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 4px 14px rgba(0,111,255,0.18);
}
.detail-cta.intake { background: var(--blue-brand); color: white; }
.detail-cta.intake:active { transform: scale(0.98); }
.detail-cta.upload { background: var(--blue); color: white; }
.detail-cta.upload:active { transform: scale(0.98); }
.detail-cta svg { width: 22px; height: 22px; }
.detail-cta-secondary {
  width: 100%;
  padding: 14px;
  background: var(--card);
  border: 1.5px solid var(--st-07);
  color: var(--st-07);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 12px;
  cursor: pointer;
}
.detail-cta-secondary:active { background: #FEF2F2; }

/* ============ UPLOAD SCREEN ============ */
.upload-screen {
  position: fixed; inset: 0;
  background: var(--bg-soft);
  z-index: 400;
  display: none;
  flex-direction: column;
  animation: fadeUp 0.2s ease-out;
}
.upload-screen.active { display: flex; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.upload-body { flex: 1; overflow-y: auto; padding: 20px; max-width: 640px; margin: 0 auto; width: 100%; }
.upload-vehicle-bar {
  background: var(--card);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  gap: 12px;
}
.upload-vehicle-bar .lic { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.upload-vehicle-bar .meta { font-size: 12px; color: var(--text-light); }
.dropzone {
  background: var(--card);
  border: 2.5px dashed var(--blue-light);
  border-radius: 18px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
}
.dropzone:hover { border-color: var(--blue); background: #F5F9FF; }
.dropzone .ico {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #E7F1FF;
  display: flex; align-items: center; justify-content: center;
}
.dropzone .ico svg { width: 34px; height: 34px; color: var(--blue-brand); }
.dropzone .title { font-size: 17px; font-weight: 700; color: var(--text); }
.dropzone .sub { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow);
}
.preview-item img,
.preview-item .demo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-item .demo-img {
  background: linear-gradient(135deg, #DBEAFE 0%, #C7D2FE 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-brand);
}
.preview-item .demo-img svg { width: 36px; height: 36px; opacity: 0.65; }
.preview-item .remove-btn {
  position: absolute; top: 4px; inset-inline-start: 4px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: white;
  border: none;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.preview-item .upload-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.4);
}
.preview-item .upload-progress .bar { height: 100%; background: var(--st-06); width: 0; transition: width 0.3s; }
.preview-item .check-mark {
  position: absolute; top: 4px; inset-inline-end: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--st-06);
  color: white;
  display: none;
  align-items: center; justify-content: center;
}
.preview-item .check-mark svg { width: 14px; height: 14px; }
.preview-item.uploaded .check-mark { display: flex; }
.preview-item.uploaded .remove-btn { display: none; }
.upload-counter { text-align: center; font-size: 13px; color: var(--text-light); margin-top: 14px; }
.upload-counter strong { color: var(--text); }
.upload-bottom-bar {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
.upload-bottom-bar .cancel {
  flex: 0 0 auto;
  padding: 14px 22px;
  background: var(--bg);
  color: var(--text);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.upload-bottom-bar .send {
  flex: 1;
  padding: 14px;
  background: var(--blue-brand);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0,111,255,0.22);
}
.upload-bottom-bar .send:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.upload-bottom-bar .send svg { width: 17px; height: 17px; }
.upload-success {
  position: absolute; inset: 0;
  background: var(--bg-soft);
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 30px;
}
.upload-success.active { display: flex; }
.upload-success .check-circle {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--st-06);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  animation: pop 0.4s cubic-bezier(.34,1.56,.64,1);
}
.upload-success .check-circle svg { width: 52px; height: 52px; color: white; }
@keyframes pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.upload-success h2 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.upload-success p { color: var(--text-light); }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 200;
  padding: 0;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 600px;
  max-height: 92vh; overflow-y: auto;
  animation: slideUp 0.25s ease-out;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--card); z-index: 1;
}
.modal-header h2 { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%; border: none;
  background: var(--bg); color: var(--text);
  font-size: 18px;
}
.modal-body { padding: 16px 20px 24px; }
.modal-vehicle-info {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 16px;
}
.modal-vehicle-info .row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.modal-vehicle-info .row .label { color: var(--text-light); }
.modal-vehicle-info .row .value { font-weight: 600; }
.modal-action-area { display: flex; flex-direction: column; gap: 10px; }
.action-card {
  border: 1.5px dashed var(--blue-light);
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.action-card:hover { background: #EEF4FF; border-color: var(--blue); }
.action-card.intake { border-color: var(--st-04); }
.action-card.upload { border-color: var(--st-06); }
.action-card.external { border-color: var(--st-07); background: #FEF7F7; }
.action-card .icon { width: 48px; height: 48px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; }
.action-card .icon svg { width: 32px; height: 32px; color: var(--blue); }
.action-card.intake .icon svg { color: var(--st-04); }
.action-card.upload .icon svg { color: var(--st-06); }
.action-card.external .icon svg { color: var(--st-07); }
.action-card .title { font-size: 16px; font-weight: 700; }
.action-card .desc { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ============ ADD USER FORM ============ */
.add-user-form { padding: 20px 24px; }
.field { margin-bottom: 14px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: block; text-align: start; }
.field-input {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; outline: none;
}
.field-input:focus { border-color: var(--blue); }
.field-input[readonly] { background: var(--bg); color: var(--text-light); }
.selfie-area {
  border: 1.5px dashed var(--blue-light);
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
}
.selfie-area svg { width: 36px; height: 36px; color: var(--blue); margin-bottom: 6px; }
.selfie-area .label { font-size: 13px; font-weight: 600; }
.selfie-preview {
  width: 100px; height: 100px; border-radius: 50%;
  margin: 0 auto; display: block;
  border: 2px solid var(--blue);
  object-fit: cover;
}
.form-submit {
  width: 100%; padding: 14px;
  background: var(--blue-brand); color: white; border: none;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 600;
  margin-top: 8px;
}
.form-submit:disabled { background: var(--gray); opacity: 0.6; }

/* ============ LANGUAGE LIGHTBOX (header) ============ */
.lang-lightbox {
  position: fixed; inset: 0;
  background: rgba(54,65,83,0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 500;
  padding: 20px;
}
.lang-lightbox.active { display: flex; animation: fadeIn 0.18s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lang-lightbox-card {
  background: var(--card);
  border-radius: 20px;
  width: 100%; max-width: 360px;
  box-shadow: 0 20px 60px rgba(54,65,83,0.3);
  overflow: hidden;
  animation: popCard 0.22s cubic-bezier(.34,1.4,.64,1);
}
@keyframes popCard { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lang-lightbox-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.lang-lightbox-header h2 { font-size: 17px; font-weight: 700; color: var(--text); }
.lang-lightbox-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg); color: var(--text);
  font-size: 18px;
}
.lang-lightbox-list { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.lang-lightbox-list .lang-option { padding: 13px 14px; font-size: 16px; }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--dark); color: white;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 9999;
  opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* ============ EMPTY ============ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state svg { width: 64px; height: 64px; color: #CBD5E1; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 4px; }

/* =====================================================================
   TABLET / DESKTOP (≥768px) · 2026-07-02
   יעד ראשי: Samsung Galaxy Tab A11 8.7 (SM-X133) — viewport ‎~533×893
   לאורך (נשאר על פריסת המובייל) ו-‎~893×533 לרוחב (הבלוק הזה).
   שפה ויזואלית זהה ל-transport ≥768: רקע ‎#EAECF0, הדר-בר מעוגל,
   רשימה ככרטיס-טבלה לבן. המובייל (<768px) לא נגוע.
   ===================================================================== */
@media (min-width: 768px) {
  body { background: #EAECF0; }
  .user-select-screen { background: #EAECF0; }
  .user-select-card { max-width: 480px; }

  /* --- Header: full-width bar (כמו transport) --- */
  .header {
    padding: 14px 32px;
    box-shadow: 0 1px 4px rgba(54,65,83,0.06);
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .header-content { max-width: 1080px; }
  .header-avatar, .header-avatar-fb { width: 40px; height: 40px; border-radius: 20px; }
  .user-name { font-size: 14.5px; }
  .user-dept { font-size: 11.5px; }
  .logo { height: 30px; }
  .icon-btn, .lang-flag-btn { width: 38px; height: 38px; border-radius: 19px; }
  .icon-btn .btn-img { width: 19px; height: 19px; }

  /* --- Tabs --- */
  .tabs { padding: 0 32px; }
  .tab { font-size: 15px; padding: 15px 8px 13px; }
  .tab-icon { width: 20px; height: 20px; }

  /* --- Search --- */
  .search-section { padding: 20px 32px 12px; }
  .search-input {
    height: 46px;
    font-size: 14.5px;
    box-shadow: 0 1px 3px rgba(54,65,83,0.04);
  }

  /* --- Vehicle list: כרטיס-טבלה לבן (כמו transport) --- */
  .vehicle-list {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(54,65,83,0.06);
    overflow: hidden;
  }
  .main-app .vehicle-list, .archive-section { padding-inline: 0; margin-inline: auto; }
  .vehicle-list, .archive-section { width: calc(100% - 64px); }
  .vehicle-row { padding: 18px 28px; }
  .vr-line1 { font-size: 20px; }
  .vr-line2 { font-size: 14px; }

  /* --- Detail / Upload: תוכן ממורכז על רקע אפור --- */
  .detail-screen, .upload-screen { background: #EAECF0; }
  .detail-header {
    padding: 14px max(18px, calc((100% - 800px) / 2));
  }
  .upload-body { max-width: 720px; }
  .upload-bottom-bar {
    max-width: 100%;
    padding-inline: max(18px, calc((100% - 720px) / 2));
  }

  /* --- Modal: ממורכז (לא bottom-sheet) --- */
  .modal-overlay { align-items: center; padding: 20px; }
  .modal { border-radius: 20px; max-height: 88vh; }
}

/* =====================================================================
   טאבלט לרוחב — מסך נמוך (‎893×533): דחיסה אנכית של מסכי פירוט/העלאה
   כדי שהלוחית + הפרטים + כפתור הפעולה ייכנסו בלי גלילה מיותרת.
   ===================================================================== */
@media (min-width: 768px) and (max-height: 620px) {
  .detail-body { padding: 16px 22px; gap: 12px; }
  .detail-client-icon img { width: 32px; height: 54px; }
  .detail-license-big { font-size: 24px; padding: 6px 18px; }
  .detail-model { font-size: 16px; }
  .detail-info-block { padding: 10px 18px; }
  .detail-info-row { padding: 6px 0; }
  .detail-cta { padding: 14px; font-size: 16px; border-radius: 14px; }
  .detail-cta-secondary { padding: 10px; }
  .dropzone { padding: 18px 20px; }
  .dropzone .ico { width: 46px; height: 46px; margin-bottom: 8px; }
  .dropzone .ico svg { width: 26px; height: 26px; }
  .upload-body { padding: 14px 20px; }
  .upload-vehicle-bar { padding: 10px 16px; margin-bottom: 12px; }
  .upload-bottom-bar { padding-block: 10px; }
  .preview-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); margin-top: 12px; }
}
