/* ============================================================
   TAXI.ACTOR — Mobile Apps (Rider / Driver)
   ============================================================ */

:root {
  --bg: #14161c;
  --surface: #1d212a;
  --surface-2: #262b36;
  --surface-3: #2f3543;
  --border: #333a48;
  --ink: #ece9e1;
  --ink-dim: #9aa0ad;
  --ink-faint: #656c7a;

  --yellow: #f5b400;
  --yellow-ink: #1a1500;
  --teal: #3fa796;
  --red: #e2574c;

  --font-display: 'Cairo', 'IBM Plex Sans Arabic', sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Cairo', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--yellow); color: var(--yellow-ink); }

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

.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 20px; height: 20px; border-radius: 6px;
  background: linear-gradient(155deg, var(--yellow), #c98e00);
  box-shadow: 0 0 0 1px rgba(245,180,0,0.25), 0 2px 10px rgba(245,180,0,0.25);
  flex-shrink: 0;
}
.brand-word { font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.1em; font-size: 14px; }
.brand-dot { color: var(--yellow); }

/* ---------- شاشة الدخول/التسجيل ---------- */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(circle at 20% 10%, rgba(245,180,0,0.08), transparent 45%),
              radial-gradient(circle at 85% 90%, rgba(63,167,150,0.07), transparent 40%), var(--bg);
}
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 26px; box-shadow: 0 20px 60px rgba(0,0,0,0.35); }
.login-card .brand { justify-content: center; margin-bottom: 6px; }
.login-sub { text-align: center; color: var(--ink-dim); font-size: 13px; margin: 4px 0 22px; }
.login-tabs { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 3px; margin-bottom: 20px; }
.login-tab { flex: 1; text-align: center; padding: 8px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-dim); background: transparent; border: none; }
.login-tab.active { background: var(--yellow); color: var(--yellow-ink); }

.login-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12.5px; color: var(--ink-dim); font-weight: 500; }
.field input, .field select {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 14px; color: var(--ink); font-size: 15px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(245,180,0,0.15); }
.form-error { background: rgba(226,87,76,0.12); border: 1px solid rgba(226,87,76,0.35); color: #f3a39c; font-size: 13px; padding: 10px 12px; border-radius: var(--radius-sm); margin: 0; }
.form-note { background: rgba(245,180,0,0.1); border: 1px solid rgba(245,180,0,0.3); color: #f5c945; font-size: 13px; padding: 10px 12px; border-radius: var(--radius-sm); margin: 0; }

.btn { border: none; border-radius: var(--radius-sm); padding: 14px 18px; font-size: 15px; font-weight: 700; font-family: var(--font-display); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform 0.1s, filter 0.15s, opacity 0.15s; width: 100%; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--yellow); color: var(--yellow-ink); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink-dim); border: 1px solid var(--border); }
.btn-red { background: rgba(226,87,76,0.14); color: #f3a39c; border: 1px solid rgba(226,87,76,0.38); }
.btn-teal { background: rgba(63,167,150,0.16); color: #7fd6c4; border: 1px solid rgba(63,167,150,0.4); }
.btn-sm { padding: 9px 14px; font-size: 13px; width: auto; }

/* ---------- الهيكل العام للتطبيق (موبايل: توب بار + محتوى + شريط سفلي) ---------- */
.app-shell { display: flex; flex-direction: column; min-height: 100vh; max-width: 480px; margin: 0 auto; background: var(--bg); position: relative; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 10; }
.status-chip { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: var(--ink-dim); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.status-dot.online { background: var(--teal); box-shadow: 0 0 0 3px rgba(63,167,150,0.2); }

.content { flex: 1; padding: 16px 16px 90px; overflow-y: auto; }

.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; background: var(--surface); border-top: 1px solid var(--border); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); z-index: 20; }
.bottom-nav-link { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--ink-faint); font-size: 11px; border-radius: 10px; background: none; border: none; }
.bottom-nav-link.active { color: var(--yellow); }
.bottom-nav-icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- الخريطة ---------- */
.map-box { height: 300px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-bottom: 14px; }
.map-hint { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim); margin-bottom: 10px; }
.map-hint-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(245,180,0,0.18); flex-shrink: 0; }

/* ---------- بطاقة تذكرة (سعر تقريبي، إحصائيات) ---------- */
.ticket { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.ticket-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-faint); text-transform: uppercase; margin-bottom: 8px; }
.ticket-value { font-family: var(--font-mono); font-size: 26px; font-weight: 600; color: var(--ink); line-height: 1; }
.ticket-value.accent { color: var(--yellow); }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- بطاقة السائق/الراكب ---------- */
.person-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.person-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: var(--yellow); flex-shrink: 0; font-size: 17px; }
.person-name { font-weight: 700; font-family: var(--font-display); font-size: 15px; }
.person-meta { font-size: 12.5px; color: var(--ink-dim); margin-top: 2px; }

/* ---------- مؤشر مراحل الرحلة ---------- */
.status-stepper { display: flex; align-items: center; justify-content: space-between; margin: 18px 0; padding: 0 4px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; position: relative; }
.step-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--border); z-index: 1; }
.step.done .step-dot { background: var(--teal); border-color: var(--teal); }
.step.current .step-dot { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(245,180,0,0.2); }
.step-label { font-size: 10.5px; color: var(--ink-faint); text-align: center; }
.step.done .step-label, .step.current .step-label { color: var(--ink); }
.step-line { position: absolute; top: 5px; right: 50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.step:first-child .step-line { display: none; }
.step.done .step-line { background: var(--teal); }

/* ---------- تقييم بالنجوم ---------- */
.stars { display: flex; gap: 6px; justify-content: center; margin: 16px 0; }
.star-btn { background: none; border: none; font-size: 34px; color: var(--surface-3); padding: 2px; width: auto; }
.star-btn.filled { color: var(--yellow); }

/* ---------- بطاقة طلب وارد (سائق) ---------- */
.incoming-request { background: var(--surface); border: 2px solid var(--yellow); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; animation: pulse-border 1.6s ease-in-out infinite; }
@keyframes pulse-border { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,180,0,0.25); } 50% { box-shadow: 0 0 0 8px rgba(245,180,0,0); } }

/* ---------- عناصر عامة ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.pill-active { background: rgba(63,167,150,0.14); color: #7fd6c4; } .pill-active::before { background: var(--teal); }
.pill-pending { background: rgba(245,180,0,0.14); color: #f5c945; } .pill-pending::before { background: var(--yellow); }
.pill-blocked { background: rgba(226,87,76,0.14); color: #f3a39c; } .pill-blocked::before { background: var(--red); }
.pill-neutral { background: var(--surface-3); color: var(--ink-dim); } .pill-neutral::before { background: var(--ink-faint); }

.trip-history-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.trip-history-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.trip-history-price { font-family: var(--font-mono); font-weight: 600; }
.trip-history-meta { font-size: 12px; color: var(--ink-dim); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-faint); font-size: 13.5px; }
.loading-state { text-align: center; padding: 50px 20px; color: var(--ink-dim); font-size: 13.5px; }
.center-col { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; gap: 14px; }

a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
