/* ============================================================
   אפליקציית הנהגים - אנרגיה בהישג ידך
   עיצוב v2: שפה עיצובית "אנרגיה" - כחול עומק + ענבר דלק
   מובייל RTL, נגיש בשמש, אזורי מגע גדולים
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;600;700;800&display=swap');

:root {
  --eda-navy-900: #0d2137;
  --eda-navy-700: #16395c;
  --eda-navy-500: #1f4e79;
  --eda-navy-100: #e8f0f9;
  --eda-amber-500: #f5a623;
  --eda-amber-100: #fff4e0;
  --eda-green-600: #1e7d3c;
  --eda-green-100: #e6f6ec;
  --eda-red-600: #c0392b;
  --eda-red-100: #fdecea;
  --eda-ink: #16202b;
  --eda-muted: #5d6b7a;
  --eda-line: #dde6ef;
  --eda-bg: #eef3f9;
  --eda-radius: 16px;
  --eda-shadow: 0 1px 2px rgba(13,33,55,.05), 0 8px 24px -12px rgba(13,33,55,.18);
  --eda-shadow-lift: 0 2px 4px rgba(13,33,55,.06), 0 14px 34px -14px rgba(13,33,55,.28);
}

#eda-app {
  direction: rtl;
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 14px 40px;
  font-family: 'Heebo', -apple-system, 'Segoe UI', Arial, sans-serif;
  color: var(--eda-ink);
  background:
    radial-gradient(1200px 400px at 50% -220px, rgba(31,78,121,.14), transparent 65%),
    var(--eda-bg);
  min-height: 100vh;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

/* ---------- כותרת מסך ---------- */
.eda-header {
  text-align: center;
  margin: 0 -14px 16px;
  padding: 20px 52px 18px;
  position: relative;
  background: linear-gradient(135deg, var(--eda-navy-900) 0%, var(--eda-navy-500) 100%);
  border-radius: 0 0 24px 24px;
  box-shadow: var(--eda-shadow);
}
.eda-header::after {
  content: '';
  position: absolute; right: 0; left: 0; bottom: 6px;
  height: 3px; margin: 0 24px;
  background: linear-gradient(90deg, transparent, var(--eda-amber-500), transparent);
  border-radius: 2px; opacity: .85;
}
.eda-title { font-size: 21px; font-weight: 800; color: #fff; letter-spacing: -0.2px; }
.eda-driver-name { font-size: 13px; color: rgba(255,255,255,.75); margin-top: 3px; font-weight: 400; }
.eda-back {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: none; color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 8px 14px; border-radius: 999px;
  transition: background .15s;
}
.eda-back:active { background: rgba(255,255,255,.25); }

/* ---------- כרטיסים ---------- */
.eda-card {
  background: #fff;
  border: 1px solid rgba(221,230,239,.8);
  border-radius: var(--eda-radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--eda-shadow);
}
.eda-card h2 { margin: 0 0 14px; font-size: 18px; font-weight: 700; text-align: center; color: var(--eda-navy-700); }

.eda-hint { font-size: 14px; color: var(--eda-muted); margin: 10px 0 6px; }
.eda-err {
  color: var(--eda-red-600); font-size: 14px; font-weight: 600;
  background: var(--eda-red-100); border-radius: 10px; padding: 8px 12px; margin: 6px 0;
}
.eda-total {
  font-weight: 800; font-size: 18px; color: var(--eda-navy-500);
  margin: 12px 0; padding: 10px 14px;
  background: var(--eda-navy-100); border-radius: 12px; text-align: center;
}

/* ---------- שדות קלט ---------- */
.eda-input {
  width: 100%; box-sizing: border-box;
  font-family: inherit; font-size: 18px; font-weight: 600;
  padding: 13px 14px;
  border: 1.5px solid var(--eda-line); border-radius: 12px;
  margin-bottom: 8px; text-align: right;
  background: #fbfdff; color: var(--eda-ink);
  transition: border-color .15s, box-shadow .15s;
}
.eda-input:focus {
  outline: none; border-color: var(--eda-navy-500);
  box-shadow: 0 0 0 3px rgba(31,78,121,.14);
  background: #fff;
}
.eda-input::placeholder { color: #9fb0c0; font-weight: 400; }
.eda-input-num { text-align: center; font-variant-numeric: tabular-nums; }
.eda-file { margin: 8px 0 12px; font-size: 14px; width: 100%; color: var(--eda-muted); }
.eda-file::file-selector-button {
  font-family: inherit; font-weight: 600; font-size: 14px;
  border: 1.5px solid var(--eda-navy-500); background: #fff; color: var(--eda-navy-500);
  border-radius: 999px; padding: 8px 16px; margin-left: 10px; cursor: pointer;
}

.eda-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.eda-row label { min-width: 86px; font-size: 15px; font-weight: 700; color: var(--eda-navy-700); }
.eda-row .eda-input { margin-bottom: 0; }

/* ---------- כפתורים ---------- */
.eda-btn {
  display: inline-block; border: none; border-radius: 13px; cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 700;
  padding: 13px 18px; text-decoration: none; text-align: center;
  background: var(--eda-navy-100); color: var(--eda-navy-500);
  transition: transform .08s, box-shadow .15s, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
.eda-btn:active { transform: scale(.97); }
.eda-btn:disabled { opacity: .45; transform: none; }
.eda-btn-main {
  width: 100%;
  background: linear-gradient(135deg, var(--eda-navy-700), var(--eda-navy-500));
  color: #fff; margin-top: 14px; font-size: 18px; padding: 15px;
  box-shadow: 0 6px 16px -6px rgba(31,78,121,.5);
}
.eda-btn-main:active { filter: brightness(1.08); }
.eda-btn-add { width: 100%; background: var(--eda-green-100); color: var(--eda-green-600); margin-top: 6px; }
.eda-btn-small { font-size: 14px; padding: 9px 14px; border-radius: 11px; }
.eda-btn-go {
  background: linear-gradient(135deg, var(--eda-amber-500), #e8940f);
  color: #3a2600;
  box-shadow: 0 4px 12px -4px rgba(245,166,35,.55);
}

/* ---------- תפריט ראשי ---------- */
.eda-menu { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.eda-menu-btn {
  font-size: 18px; font-weight: 700; padding: 20px 18px;
  background: #fff; border: 1px solid rgba(221,230,239,.9);
  color: var(--eda-navy-700);
  text-align: right;
  border-right: 5px solid var(--eda-amber-500);
  box-shadow: var(--eda-shadow);
  border-radius: var(--eda-radius);
}
.eda-menu-btn:active { box-shadow: var(--eda-shadow-lift); }

.eda-link {
  background: none; border: none; color: #8595a6; text-decoration: underline;
  font-family: inherit; font-size: 13px; margin: 12px auto 0; display: block; cursor: pointer;
}

/* ---------- כרטיסי הזמנה בסידור ---------- */
.eda-order {
  border: 1px solid rgba(221,230,239,.9);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
  border-right: 4px solid var(--eda-navy-500);
  box-shadow: var(--eda-shadow);
}
.eda-order-name { font-weight: 800; font-size: 16px; margin-bottom: 4px; color: var(--eda-navy-900); }
.eda-order-line { font-size: 14px; color: #455362; margin-bottom: 3px; line-height: 1.45; }
.eda-order-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.eda-order-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eda-tag {
  background: var(--eda-amber-100); color: #8a5a00;
  border: 1px solid rgba(245,166,35,.4);
  border-radius: 999px;
  font-size: 12px; font-weight: 700; padding: 4px 11px; white-space: nowrap;
}
.eda-order-notes {
  background: var(--eda-amber-100);
  border-right: 3px solid var(--eda-amber-500);
  border-radius: 10px; padding: 8px 12px; margin-top: 8px;
  font-size: 14px; color: #6b4a08; line-height: 1.45;
}
.eda-refresh { margin-bottom: 10px; }

/* ---------- שורות רכבים בתעודה ---------- */
.eda-vehicle {
  display: flex; gap: 6px; align-items: center; margin-bottom: 8px;
  background: #f7fafd; border-radius: 12px; padding: 6px;
}
.eda-vehicle .eda-input { margin-bottom: 0; background: #fff; }
.eda-del {
  background: var(--eda-red-100); color: var(--eda-red-600); border: none; border-radius: 10px;
  font-family: inherit; font-size: 15px; font-weight: 700; padding: 11px 13px; cursor: pointer; flex-shrink: 0;
}

/* ---------- חתימה ---------- */
.eda-canvas {
  width: 100%; height: 160px;
  border: 2px dashed #a9bdd2; border-radius: 14px;
  background:
    linear-gradient(0deg, rgba(31,78,121,.03), rgba(31,78,121,.03)),
    repeating-linear-gradient(0deg, transparent, transparent 38px, rgba(31,78,121,.06) 39px, transparent 40px),
    #fdfefe;
  touch-action: none; display: block;
}

/* ---------- חיווי אופליין ---------- */
.eda-queue-badge {
  display: none;
  background: var(--eda-amber-100); color: #8a5a00;
  border: 1px solid rgba(245,166,35,.45);
  border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600;
  text-align: center; margin-bottom: 12px;
  animation: eda-pulse 2.4s ease-in-out infinite;
}
@keyframes eda-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,166,35,.25); }
  50% { box-shadow: 0 0 0 6px rgba(245,166,35,0); }
}

/* ---------- טוסט ---------- */
.eda-toast {
  position: fixed; bottom: 26px; right: 50%;
  transform: translateX(50%) translateY(24px);
  background: rgba(13,33,55,.96); color: #fff;
  padding: 13px 22px; border-radius: 14px;
  font-family: 'Heebo', sans-serif; font-size: 15px; font-weight: 600;
  opacity: 0; transition: all .3s cubic-bezier(.2,.9,.3,1.2); z-index: 9999; max-width: 90%;
  direction: rtl; text-align: center;
  box-shadow: 0 12px 32px -8px rgba(13,33,55,.5);
  backdrop-filter: blur(4px);
}
.eda-toast.show { opacity: 1; transform: translateX(50%) translateY(0); }
.eda-toast-err { background: rgba(158,38,26,.96); }

.eda-loading { text-align: center; padding: 44px 0; color: #8595a6; }

/* ---------- מתג טעינה ראשונה/נוספת ---------- */
.eda-toggle {
  display: flex; gap: 0; margin-bottom: 10px;
  background: var(--eda-navy-100); border-radius: 13px; padding: 4px;
}
.eda-toggle-btn {
  flex: 1; border: none; background: transparent; color: var(--eda-muted);
  border-radius: 10px; padding: 11px; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all .18s;
}
.eda-toggle-btn.active {
  background: #fff; color: var(--eda-navy-500);
  box-shadow: 0 2px 8px -2px rgba(13,33,55,.25);
}

.eda-small { font-size: 12px; color: #8595a6; }
.eda-center { text-align: center; }
.eda-section {
  font-weight: 800; color: var(--eda-navy-700);
  border-top: 1px solid var(--eda-line); padding-top: 12px; margin-top: 4px;
}

/* ---------- כפתור מיכל מלא ---------- */
.eda-full-btn {
  flex-shrink: 0; border: 1.5px solid var(--eda-amber-500);
  background: #fff; color: #8a5a00;
  border-radius: 999px; padding: 10px 13px;
  font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.eda-full-btn.active {
  background: linear-gradient(135deg, var(--eda-amber-500), #e8940f);
  color: #3a2600; border-color: transparent;
  box-shadow: 0 3px 10px -3px rgba(245,166,35,.6);
}
