/* Kampüs Yoldaşım — modern mobilite teması
   Yön: BlaBlaCar 2026 "True Blue" (#0071EB) ana renk + Martı tarzı mercan vurgu.
   Yumuşak katmanlı kartlar, pill butonlar, yüksek okunabilirlik. */
:root {
  --bg: #f1f5fa;
  --surface: #ffffff;
  --surface-2: #f6f9fd;
  --ink: #0e1c2e;
  --muted: #5d6b7e;
  --line: #e3eaf3;
  --blue: #0071eb;
  --blue-dark: #0057b8;
  --blue-soft: #e8f2fe;
  --coral: #ff5a5f;
  --coral-soft: #ffecec;
  --amber: #f59e0b;
  --amber-soft: #fef3dd;
  --green-ok: #0a9e63;
  --green-soft: #e2f7ee;
  --red: #d92d20;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(14, 28, 46, 0.04), 0 6px 20px rgba(14, 28, 46, 0.06);
  --shadow-lift: 0 4px 8px rgba(14, 28, 46, 0.06), 0 14px 34px rgba(14, 28, 46, 0.12);
  font-size: 15px;
}

* { box-sizing: border-box; margin: 0; }
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--red); font-size: 0.9rem; margin-top: 0.6rem; }
.hint { color: var(--muted); font-size: 0.8rem; margin: 0.35rem 0 0.6rem; }

::selection { background: var(--blue-soft); }

/* İnce, modern kaydırma çubukları */
.rail::-webkit-scrollbar, .notif-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar, .tickets-wrap::-webkit-scrollbar { width: 8px; }
.rail::-webkit-scrollbar-thumb, .notif-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb, .tickets-wrap::-webkit-scrollbar-thumb {
  background: #c6d3e2; border-radius: 999px;
}

/* ---------- Auth ---------- */
.auth-wrap {
  height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 90, 95, 0.28), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(0, 183, 255, 0.25), transparent 55%),
    linear-gradient(150deg, #003c8f 0%, #0057b8 45%, #0071eb 100%);
}
.auth-card {
  background: var(--surface); border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 30, 70, 0.45);
  padding: 2.3rem; width: 410px; max-width: 92vw;
}
/* Giriş kartı markası — uygulamayla aynı: logo ortada üstte, altında sadece ad */
.auth-card .brand {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 0.8rem; margin-bottom: 1.4rem;
}
.auth-card .brand h1 { font-size: 1.45rem; letter-spacing: -0.03em; font-weight: 800; }
.auth-card .brand p { display: none; }
.auth-card .brand-mark { width: 84px; height: 84px; border-radius: 24px; }
.brand { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 1.6rem; }
.brand h1 { font-size: 1.4rem; letter-spacing: -0.03em; font-weight: 800; }
.brand p { font-size: 0.85rem; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 17px; flex-shrink: 0;
  background: linear-gradient(140deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  box-shadow: 0 8px 18px rgba(0, 113, 235, 0.35);
}
.brand-mark.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 0.75rem; box-shadow: none; }
/* Marka işareti görsel (logo.png) olarak kullanıldığında */
img.brand-mark {
  background: #fff; object-fit: cover; border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0, 113, 235, 0.18); padding: 2px;
}

.auth-step label { display: block; font-weight: 600; font-size: 0.85rem; margin: 0.75rem 0 0.3rem; }
input, select {
  width: 100%; padding: 0.68rem 0.85rem; border: 1.5px solid var(--line);
  border-radius: 12px; font-size: 0.95rem; background: var(--surface-2); color: var(--ink);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input:focus, select:focus {
  outline: none; border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 113, 235, 0.14);
}
input::placeholder { color: #9aa8ba; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.check { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.85rem; margin: 0.55rem 0; font-weight: 400 !important; }
.check input { width: auto; margin-top: 2px; accent-color: var(--blue); }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-block; width: 100%; margin-top: 0.8rem; padding: 0.68rem 1rem;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface);
  font-size: 0.92rem; font-weight: 600; color: var(--ink); cursor: pointer;
  font-family: inherit;
  transition: transform 0.08s, box-shadow 0.18s, background 0.15s, border-color 0.15s;
}
.btn:hover { box-shadow: var(--shadow); border-color: #cdd9e7; }
.btn:active { transform: translateY(1px) scale(0.995); }
.btn.primary {
  background: linear-gradient(140deg, var(--blue) 0%, var(--blue-dark) 115%);
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(0, 113, 235, 0.3);
}
.btn.primary:hover { box-shadow: 0 6px 20px rgba(0, 113, 235, 0.42); filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn.small { width: auto; padding: 0.38rem 0.85rem; font-size: 0.8rem; margin-top: 0; border-radius: 999px; }
.btn.pick { background: var(--blue-soft); border-color: #cfe4fb; color: var(--blue-dark); }
.btn.pick:hover { border-color: var(--blue); }
.btn.pick.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.danger { color: var(--red); border-color: #f3cdc9; background: #fff; }
.btn.danger:hover { background: #fef3f2; border-color: var(--red); }
.pick-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pick-row .btn { margin-top: 0.3rem; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 1.2rem; padding: 0.6rem 1.1rem;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 1200;
}
.brand-sm { display: flex; align-items: center; gap: 0.55rem; font-weight: 800; letter-spacing: -0.02em; }
.tabs { display: flex; gap: 0.25rem; flex: 1; justify-content: center; }
.tab {
  border: none; background: transparent; padding: 0.5rem 1.15rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; color: var(--muted); cursor: pointer;
  font-family: inherit; transition: background 0.15s, color 0.15s;
}
.tab:hover { background: var(--surface-2); color: var(--ink); }
.tab.active {
  background: var(--blue); color: #fff;
  box-shadow: 0 3px 10px rgba(0, 113, 235, 0.35);
}
.topbar-right { display: flex; align-items: center; gap: 0.6rem; }
.chip {
  background: var(--blue-soft); color: var(--blue-dark); border-radius: 999px;
  padding: 0.32rem 0.8rem; font-size: 0.82rem; font-weight: 700;
}
.chip.user { background: var(--surface-2); color: var(--ink); }

.banner {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  background: var(--amber-soft); border-bottom: 1px solid #f5e3bd;
  padding: 0.5rem 1rem; font-size: 0.85rem;
}

/* ---------- Sekme düzeni ---------- */
.tab-pane { display: flex; height: calc(100vh - 96px); }
.rail {
  width: 372px; flex-shrink: 0; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.9rem;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.05rem 1.15rem; box-shadow: var(--shadow);
}
.card h3 { font-size: 0.98rem; margin-bottom: 0.45rem; letter-spacing: -0.015em; font-weight: 700; }
.card label { display: block; font-weight: 600; font-size: 0.8rem; margin: 0.6rem 0 0.25rem; }
/* Harita kutu içinde: yuvarlak köşe + çerçeve + gölge */
.map {
  flex: 1; min-height: 300px;
  margin: 1rem 1rem 1rem 0;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow); overflow: hidden;
}

/* ---------- Liste öğeleri ---------- */
.list { display: flex; flex-direction: column; gap: 0.6rem; }
.item {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 0.75rem 0.9rem; font-size: 0.86rem; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.18s, transform 0.12s;
}
.item:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.item.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 235, 0.16), var(--shadow);
}
.item .title { font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.item .sub { color: var(--muted); margin-top: 0.22rem; }
.item .actions { display: flex; gap: 0.4rem; margin-top: 0.55rem; flex-wrap: wrap; }
.item .actions .btn { width: auto; margin-top: 0; padding: 0.32rem 0.75rem; font-size: 0.78rem; border-radius: 999px; }

.status {
  display: inline-block; border-radius: 999px; padding: 0.14rem 0.6rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
}
.status.PENDING { background: var(--amber-soft); color: #a16207; }
.status.ACCEPTED, .status.PUBLISHED { background: var(--green-soft); color: var(--green-ok); }
.status.ONBOARD, .status.IN_PROGRESS { background: var(--blue-soft); color: var(--blue-dark); }
.status.COMPLETED { background: var(--green-soft); color: #067a4b; }
.status.REJECTED, .status.CANCELLED, .status.NO_SHOW, .status.EXPIRED,
.status.CANCELLED_BY_DRIVER, .status.CANCELLED_BY_PASSENGER { background: #feeceb; color: var(--red); }
.status.DRAFT, .status.FULL { background: #edf1f6; color: var(--muted); }

.stats { display: flex; gap: 0.6rem; }
.stat {
  flex: 1; background: linear-gradient(160deg, var(--surface-2), var(--blue-soft));
  border: 1px solid var(--line); border-radius: 12px; padding: 0.6rem; text-align: center;
}
.stat .val { font-size: 1.1rem; font-weight: 800; color: var(--blue-dark); letter-spacing: -0.02em; }
.stat .lbl { font-size: 0.66rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Biletler ---------- */
.tickets-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; padding: 1.2rem; width: 100%; overflow-y: auto; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; margin-top: 0.6rem; }
.pkg {
  position: relative; overflow: hidden;
  border: 1.5px solid var(--line); border-radius: 16px; padding: 1rem 0.9rem 0.9rem;
  text-align: center; cursor: pointer; background: var(--surface);
  transition: border-color 0.15s, transform 0.14s, box-shadow 0.18s;
}
.pkg::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--coral));
  opacity: 0; transition: opacity 0.15s;
}
.pkg:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.pkg:hover::before { opacity: 1; }
.pkg .cnt { font-size: 1.7rem; font-weight: 800; color: var(--blue-dark); letter-spacing: -0.03em; }
.pkg .name { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.pkg .price { font-weight: 800; margin-top: 0.35rem; }
.pkg .unit { font-size: 0.7rem; color: var(--muted); }

/* ---------- Bildirimler ---------- */
.bell {
  position: relative; border: none; background: transparent; font-size: 1.15rem;
  cursor: pointer; padding: 0.3rem 0.45rem; border-radius: 10px;
  transition: background 0.15s;
}
.bell:hover { background: var(--surface-2); }
.bell-badge {
  position: absolute; top: -2px; right: -4px; background: var(--coral); color: #fff;
  border-radius: 999px; font-size: 0.62rem; font-weight: 800; padding: 0.08rem 0.34rem;
  box-shadow: 0 2px 6px rgba(255, 90, 95, 0.5);
}
.notif-panel {
  position: fixed; top: 54px; right: 1rem; width: 330px; max-height: 430px; z-index: 1600;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lift); display: flex; flex-direction: column; overflow: hidden;
}
.notif-head { padding: 0.75rem 1rem; font-weight: 700; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
.notif-list { overflow-y: auto; }
.notif-item { padding: 0.68rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.84rem; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--blue-soft); }
.notif-item .t { font-weight: 700; }
.notif-item .b { color: var(--muted); margin-top: 0.15rem; }
.notif-item .d { color: var(--muted); font-size: 0.7rem; margin-top: 0.2rem; }

/* ---------- Sohbet çekmecesi ---------- */
.chat-drawer {
  position: fixed; right: 1rem; bottom: 1rem; width: 336px; height: 450px; z-index: 1500;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lift); display: flex; flex-direction: column;
}
.chat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1rem; font-weight: 700; font-size: 0.9rem;
  background: linear-gradient(140deg, var(--blue), var(--blue-dark)); color: #fff;
  border-radius: 18px 18px 0 0;
}
.chat-head .btn { color: #fff; }
.chat-messages { flex: 1; overflow-y: auto; padding: 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; background: var(--surface-2); }
.msg { display: flex; flex-direction: column; align-items: flex-start; }
.msg.mine { align-items: flex-end; }
.bubble {
  max-width: 80%; padding: 0.52rem 0.8rem; border-radius: 16px; font-size: 0.86rem;
  background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px;
}
.msg.mine .bubble {
  background: var(--blue); border-color: var(--blue); color: #fff;
  border-bottom-left-radius: 16px; border-bottom-right-radius: 5px;
}
.msg-time { font-size: 0.65rem; color: var(--muted); margin-top: 0.15rem; }
.chat-inputrow { display: flex; gap: 0.4rem; padding: 0.6rem; border-top: 1px solid var(--line); }
.chat-inputrow input { flex: 1; }
.chat-inputrow .btn { margin-top: 0; }

/* ---------- Modallar ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1800; background: rgba(8, 20, 38, 0.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--surface); border-radius: 20px; padding: 1.6rem;
  width: 390px; max-width: 92vw; box-shadow: 0 28px 80px rgba(0, 15, 40, 0.45);
  animation: modal-in 0.18s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal h3 { margin-bottom: 0.3rem; }
.modal textarea {
  width: 100%; margin-top: 0.5rem; padding: 0.65rem 0.8rem; resize: vertical;
  border: 1.5px solid var(--line); border-radius: 12px; font: inherit; background: var(--surface-2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.modal textarea:focus {
  outline: none; border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 113, 235, 0.14);
}
.modal label { display: block; font-weight: 600; font-size: 0.82rem; margin: 0.6rem 0 0.2rem; }
.modal .row-2 { margin-top: 0.4rem; }
.stars { display: flex; gap: 0.3rem; justify-content: center; margin: 0.7rem 0 0.2rem; }
.star {
  font-size: 2rem; border: none; background: transparent; cursor: pointer;
  color: #d3dbe6; transition: transform 0.1s, color 0.12s; padding: 0.1rem;
}
.star:hover { transform: scale(1.18); }
.star.on { color: var(--amber); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* Sürücü avatarı (arama kartı) */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(140deg, var(--blue), var(--blue-dark)); color: #fff;
  font-weight: 700; font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 113, 235, 0.3);
}
.plate {
  display: inline-block; border: 1.5px solid var(--ink); border-radius: 6px;
  padding: 0.05rem 0.45rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
  background: #fff;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; border-radius: 14px; padding: 0.75rem 1.4rem;
  font-size: 0.88rem; box-shadow: var(--shadow-lift); z-index: 2000;
  max-width: 80vw; animation: toast-in 0.2s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.toast.err { background: var(--red); }

/* ---------- Telefon görünümü: uygulamaya benzer düzen ---------- */
@media (max-width: 800px) {
  :root { font-size: 14px; }

  /* Masaüstünde sayfa sabit, iç panel kayar; mobilde SAYFA kaymalı —
     yoksa uzayan içerik erişilemez hale gelir */
  html, body { height: auto; min-height: 100%; overflow-y: auto; overflow-x: hidden; }

  /* Harita üstte (uygulamadaki gibi), form/listeler altında kayar */
  .tab-pane { flex-direction: column-reverse; height: auto; }
  .rail { width: 100%; max-height: none; overflow: visible; padding: 0.75rem; }
  .map { margin: 0.75rem; height: 34vh; min-height: 240px; flex: none; }

  /* Üst bar: sade — sadece logo + bakiye/zil/çıkış (uygulama adı gizli).
     backdrop-filter KAPALI olmalı: içindeki position:fixed sekme çubuğunu
     ekrana değil bara sabitler (CSS containing-block kuralı). */
  .topbar {
    gap: 0.5rem; padding: 0.45rem 0.75rem;
    position: sticky; top: 0; z-index: 1200;
    backdrop-filter: none; background: var(--surface);
  }
  .brand-sm { font-size: 0.92rem; gap: 0.5rem; font-weight: 800; }
  .topbar-right { margin-left: auto; gap: 0.35rem; }
  .chip.user { display: none; }
  .topbar-right .btn.ghost { padding: 0.3rem 0.5rem; }

  /* Sekmeler ALT ÇUBUĞA taşınır — uygulamadaki gibi, parmakla kolay erişim */
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1400;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 0.5rem 0.5rem calc(0.6rem + env(safe-area-inset-bottom));
    gap: 0.3rem; justify-content: space-around;
    box-shadow: 0 -2px 16px rgba(14, 28, 46, 0.1);
  }
  .tab {
    flex: 1; min-width: 0; padding: 0.75rem 0.3rem; font-size: 0.82rem;
    border-radius: 14px; text-align: center; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }
  .tab.active { box-shadow: none; }

  /* İçerik alt çubuğun altında kalmasın */
  .tab-pane { padding-bottom: 5.2rem; }

  .tickets-wrap { grid-template-columns: 1fr; padding: 0.75rem; overflow: visible; }
  .auth-wrap { height: auto; min-height: 100vh; padding: 1.5rem 0; }
  .auth-card { padding: 1.5rem 1.2rem; }
  .row-2 { grid-template-columns: 1fr; gap: 0.3rem; }
  .pick-row { flex-wrap: wrap; }
  .modal { padding: 1.2rem; max-height: 88vh; overflow-y: auto; }
  .notif-panel { right: 0.5rem; left: 0.5rem; width: auto; }
  .chat-drawer { right: 0.5rem; left: 0.5rem; width: auto; height: 60vh; }

  /* Tablolar (admin) yatay kaydırma ile taşmaz */
  .card { overflow-x: auto; }
  .admin-wrap { padding: 0.75rem; }
}
