/* =============================================
   TOURING — Light Travel Theme
   ============================================= */

:root {
  --bg:        #f4f1eb;
  --bg2:       #faf9f6;
  --bg3:       #ffffff;
  --card:      #ffffff;
  --card2:     #f4f1eb;
  --border:    #e5e0d5;
  --border2:   #d4cfc4;
  --text:      #1a1a2e;
  --text2:     #5a6478;
  --text3:     #94a3b8;
  --shadow:    rgba(0,0,0,0.08);
  --shadow-md: rgba(0,0,0,0.12);

  --green:     #059669;
  --green-bg:  #ecfdf5;
  --green-bdr: #a7f3d0;
  --blue:      #1d5fb5;
  --blue-bg:   #eff6ff;
  --blue-bdr:  #bfdbfe;
  --orange:    #d97706;
  --orange-bg: #fffbeb;
  --orange-bdr:#fde68a;
  --red:       #dc2626;
  --red-bg:    #fef2f2;
  --red-bdr:   #fecaca;
  --purple:    #7c3aed;
  --yellow:    #b45309;
  --teal:      #0891b2;
  --pink:      #db2777;

  --radius:    18px;
  --radius-sm: 12px;
  --radius-xs:  8px;
  --font:      -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --nav-h:     62px;
  --safe-top:  env(safe-area-inset-top, 0px);
  --safe-bot:  env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app { height: 100vh; display: flex; flex-direction: column; }

/* =============================================
   TOP BAR
   ============================================= */
#top-bar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  min-height: 56px;
  box-shadow: 0 1px 8px var(--shadow);
}
.top-logo {
  font-size: 20px; font-weight: 900; letter-spacing: -1px;
  color: var(--blue);
  background: linear-gradient(135deg, #1d5fb5, #0891b2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.top-logo span {
  font-size: 13px; font-weight: 500; margin-left: 6px;
  color: var(--text2);
  -webkit-text-fill-color: var(--text2);
  background: none;
}
.top-right { display: flex; align-items: center; gap: 12px; }
#company-cash { font-size: 17px; font-weight: 800; color: var(--green); }
.notif-btn { position: relative; background: none; border: none; cursor: pointer; padding: 6px; }
.notif-btn svg { width: 22px; height: 22px; fill: var(--text2); }
.notif-badge {
  position: absolute; top: 0; right: 0;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.notif-badge.hidden { display: none; }

/* =============================================
   PAGE AREA
   ============================================= */
#page-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + var(--safe-bot) + 32px);
  background: var(--bg);
}

/* =============================================
   BOTTOM NAV
   ============================================= */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: flex;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bot);
  height: calc(var(--nav-h) + var(--safe-bot));
  box-shadow: 0 -2px 12px var(--shadow);
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: none; border: none; cursor: pointer;
  color: var(--text3); padding: 8px 0; transition: color 0.2s;
}
.nav-btn .nav-icon { font-size: 22px; }
.nav-btn .nav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.2px; }
.nav-btn.active { color: var(--blue); }

/* =============================================
   PAGE / SECTIONS
   ============================================= */
.page { padding: 16px; }
.page-header { margin-bottom: 20px; }
.page-header h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.page-header p  { color: var(--text2); margin-top: 4px; font-size: 14px; }

.section { margin-bottom: 24px; }
.section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text3);
  margin-bottom: 10px; padding: 0 2px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px var(--shadow);
}

/* =============================================
   COMPANY HEADER
   ============================================= */
.company-hero {
  background: linear-gradient(135deg, #1d5fb5 0%, #0891b2 100%);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(29,95,181,0.35);
}
.company-hero .company-name { color: #fff; }
.company-hero .company-level-name { color: rgba(255,255,255,0.75); }
.company-hero .co-stat-val { color: #fff; }
.company-hero .co-stat-lbl { color: rgba(255,255,255,0.65); }
.company-hero .prestige-bar-label { color: rgba(255,255,255,0.75); }
.company-hero .prestige-bar { background: rgba(255,255,255,0.20); }
.company-logo-circle {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.20);
}
.company-name  { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.company-level-name { color: var(--text2); font-size: 13px; margin-top: 2px; }
.company-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-top: 16px;
}
.co-stat { text-align: center; }
.co-stat-val { font-size: 18px; font-weight: 700; }
.co-stat-lbl { font-size: 11px; color: var(--text3); margin-top: 2px; }
.prestige-bar-wrap { margin-top: 14px; }
.prestige-bar-label { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 12px; color: var(--text2); }
.prestige-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.prestige-bar-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--teal)); border-radius: 3px; transition: width 0.8s; }

/* =============================================
   TRIP CARDS
   ============================================= */
.trip-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px var(--shadow);
}
.trip-card.arrived {
  border-color: var(--green-bdr);
  background: var(--green-bg);
}
.trip-route { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.trip-route .arr { color: var(--text3); font-size: 12px; }
.trip-meta { font-size: 13px; color: var(--text2); margin-bottom: 10px; }
.trip-progress { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.trip-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--teal)); border-radius: 3px; transition: width 1s linear; }
.trip-progress-fill.done { background: linear-gradient(90deg, var(--green), #34d399); }
.trip-bottom { display: flex; justify-content: space-between; align-items: center; }
.trip-timer { font-size: 16px; font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; }
.trip-timer.done { color: var(--green); }
.trip-earn { font-size: 13px; color: var(--text2); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-primary { background: linear-gradient(135deg,#1d5fb5,#0891b2); color: #fff; box-shadow: 0 2px 8px rgba(29,95,181,0.3); }
.btn-blue    { background: var(--blue);   color: #fff; box-shadow: 0 2px 8px rgba(29,95,181,0.25); }
.btn-green   { background: var(--green);  color: #fff; box-shadow: 0 2px 8px rgba(5,150,105,0.25); }
.btn-red     { background: var(--red);    color: #fff; }
.btn-orange  { background: var(--orange); color: #fff; }
.btn-ghost   { background: var(--card2);  color: var(--text); border: 1px solid var(--border); }
.btn-outline { background: transparent;   border: 1px solid var(--border2); color: var(--text); }
.btn-sm      { padding: 7px 13px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-full    { width: 100%; }

/* =============================================
   VEHICLE CARDS
   ============================================= */
.vehicle-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
  box-shadow: 0 1px 4px var(--shadow);
}
.vehicle-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.vehicle-icon-box {
  width: 48px; height: 48px; background: var(--blue-bg);
  border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px;
  border: 1px solid var(--blue-bdr);
}
.vehicle-name  { font-size: 16px; font-weight: 700; }
.vehicle-type  { font-size: 12px; color: var(--text2); margin-top: 2px; }
.v-status {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
}
.v-status.idle     { color: var(--text2);   background: var(--card2); border: 1px solid var(--border); }
.v-status.on_route { color: var(--blue);    background: var(--blue-bg); border: 1px solid var(--blue-bdr); }
.v-status.for_sale { color: var(--orange);  background: var(--orange-bg); border: 1px solid var(--orange-bdr); }
.vehicle-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.v-stat { text-align: center; background: var(--card2); border-radius: var(--radius-xs); padding: 8px; border: 1px solid var(--border); }
.v-stat-val { font-size: 14px; font-weight: 700; color: var(--text); }
.v-stat-lbl { font-size: 10px; color: var(--text3); margin-top: 2px; }
.condition-bar { height: 5px; background: var(--border); border-radius: 3px; margin: 6px 0; overflow: hidden; }
.condition-fill { height: 100%; border-radius: 3px; }

/* =============================================
   ROUTE CARDS
   ============================================= */
.route-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
  box-shadow: 0 1px 4px var(--shadow);
}
.route-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.route-cities { font-size: 17px; font-weight: 700; }
.route-cities .sep { color: var(--text3); font-size: 13px; margin: 0 6px; }
.r-status { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; letter-spacing: 0.2px; }
.r-status.active    { color: var(--green);  background: var(--green-bg);  border: 1px solid var(--green-bdr); }
.r-status.paused    { color: var(--orange); background: var(--orange-bg); border: 1px solid var(--orange-bdr); }
.r-status.no_vehicle{ color: var(--text3);  background: var(--card2);     border: 1px solid var(--border); }
.route-meta { font-size: 13px; color: var(--text2); margin-bottom: 10px; }
.route-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* =============================================
   MAP
   ============================================= */
#map-wrap {
  background: #e8f0f8; border-radius: var(--radius);
  overflow: hidden; margin-bottom: 16px; position: relative;
  border: 1px solid var(--border);
}
#turkey-svg { width: 100%; height: auto; display: block; }
#leaflet-map {
  width: 100%; height: 320px; border-radius: var(--radius);
  overflow: hidden; margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px var(--shadow);
}
.leaflet-container { background: #d4e4f0 !important; }
.leaflet-tile-pane { filter: saturate(0.85) brightness(1.05); }
.leaflet-control-attribution { display: none; }

/* =============================================
   CITY / OFFICE CARDS
   ============================================= */
.city-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px;
  cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px var(--shadow);
}
.city-row:active { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.city-emoji { font-size: 26px; width: 36px; text-align: center; }
.city-details { flex: 1; }
.city-details .name { font-size: 15px; font-weight: 700; }
.city-details .region { font-size: 12px; color: var(--text2); }
.city-badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.city-badge.has-office  { color: var(--green);  background: var(--green-bg);  border: 1px solid var(--green-bdr); }
.city-badge.open-office { color: var(--blue);   background: var(--blue-bg);   border: 1px solid var(--blue-bdr); }
.city-badge.locked      { color: var(--text3);  background: var(--card2);     border: 1px solid var(--border); }

/* =============================================
   FORMS
   ============================================= */
.form-group { margin-bottom: 14px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; display: block; }
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); padding: 12px 14px;
  font-family: var(--font); font-size: 15px; outline: none; -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-bg);
}
.form-select option { background: #fff; color: var(--text); }
.form-hint  { font-size: 12px; color: var(--text3); margin-top: 4px; }
.form-error { font-size: 13px; color: var(--red); margin-top: 6px; font-weight: 500; }
.color-row  { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.color-swatch {
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.color-swatch.sel { border-color: var(--text); transform: scale(1.15); }

/* =============================================
   MODALS / SHEETS
   ============================================= */
#modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
}
#modal-overlay.hidden { display: none; }
.modal {
  width: 100%; max-height: 92vh; overflow-y: auto;
  background: var(--bg3); border-radius: 24px 24px 0 0;
  padding: 8px 20px calc(24px + var(--safe-bot));
  animation: slide-up 0.28s cubic-bezier(0.32,0.72,0,1);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
}
.modal-handle { width: 40px; height: 4px; background: var(--border2); border-radius: 2px; margin: 12px auto 16px; }
.modal-title  { font-size: 20px; font-weight: 800; margin-bottom: 16px; color: var(--text); }
.modal-close-btn {
  position: absolute; top: 14px; right: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text2); font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
}
.modal-close-btn:hover { background: var(--border); color: var(--text); }
.modal { position: relative; }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* =============================================
   TOAST
   ============================================= */
#toast {
  position: fixed; top: 80px; left: 50%; z-index: 2000;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(255,255,255,0.97); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 12px 20px; font-size: 14px; font-weight: 600; color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  opacity: 0; transition: opacity 0.25s, transform 0.25s;
  pointer-events: none; max-width: 300px; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.success { border-color: var(--green-bdr); }
#toast.error   { border-color: var(--red-bdr); }

/* =============================================
   AUTH
   ============================================= */
#auth-screen {
  position: fixed; inset: 0; z-index: 300;
  background: linear-gradient(160deg, #e8f4fd 0%, #f4f1eb 60%, #fdf0e8 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 24px;
}
#auth-screen.hidden { display: none; }
.auth-logo {
  font-size: 52px; font-weight: 900; letter-spacing: -2px; margin-bottom: 4px;
  background: linear-gradient(135deg, #1d5fb5, #0891b2);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.auth-tagline { color: var(--text2); font-size: 15px; text-align: center; margin-bottom: 36px; }
.auth-tabs {
  display: flex; background: var(--card); border-radius: var(--radius-sm);
  padding: 4px; width: 100%; max-width: 340px; margin-bottom: 24px;
  border: 1px solid var(--border); box-shadow: 0 1px 4px var(--shadow);
}
.auth-tab {
  flex: 1; padding: 10px; border: none; background: none; cursor: pointer;
  border-radius: var(--radius-xs); font-size: 15px; font-weight: 600;
  color: var(--text3); transition: all 0.2s; font-family: var(--font);
}
.auth-tab.active { background: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(29,95,181,0.25); }
.auth-form { width: 100%; max-width: 340px; }

/* =============================================
   SETUP
   ============================================= */
#setup-screen {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(160deg, #e8f4fd 0%, #f4f1eb 60%, #fdf0e8 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 24px; overflow-y: auto;
}
#setup-screen.hidden { display: none; }
.setup-icon  { font-size: 72px; margin-bottom: 12px; }
.setup-title { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 8px; }
.setup-sub   { color: var(--text2); font-size: 15px; text-align: center; margin-bottom: 32px; }
.setup-form  { width: 100%; max-width: 360px; }

/* =============================================
   TUTORIAL
   ============================================= */
#tutorial-card {
  background: linear-gradient(135deg, #eff6ff, #ecfdf5);
  border: 1px solid var(--blue-bdr);
  border-radius: var(--radius);
  padding: 16px; margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(29,95,181,0.10);
}
#tutorial-card.hidden { display: none; }
.tutorial-badge {
  display: inline-block; background: var(--blue); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 6px;
}
.tutorial-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.tutorial-desc  { font-size: 13px; color: var(--text2); }
.tutorial-steps { display: flex; gap: 4px; margin-top: 12px; }
.tutorial-dot { flex: 1; height: 3px; border-radius: 2px; background: var(--blue-bdr); }
.tutorial-dot.done    { background: var(--green); }
.tutorial-dot.current { background: var(--blue); }

/* =============================================
   STAT GRID
   ============================================= */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; text-align: center;
  box-shadow: 0 1px 4px var(--shadow);
}
.stat-box .val { font-size: 22px; font-weight: 800; color: var(--text); }
.stat-box .lbl { font-size: 11px; color: var(--text3); margin-top: 3px; }
.stat-box.green  { border-color: var(--green-bdr); background: var(--green-bg); }
.stat-box.blue   { border-color: var(--blue-bdr);  background: var(--blue-bg); }
.stat-box.orange { border-color: var(--orange-bdr); background: var(--orange-bg); }
.stat-box.purple { background: #faf5ff; border-color: #e9d5ff; }

/* =============================================
   LEADERBOARD
   ============================================= */
.lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: none; }
.lb-rank { font-size: 18px; font-weight: 800; width: 32px; text-align: center; color: var(--text3); }
.lb-rank.top1 { color: #d97706; }
.lb-rank.top2 { color: #6b7280; }
.lb-rank.top3 { color: #b45309; }
.lb-company-dot { width: 10px; height: 10px; border-radius: 50%; }
.lb-info { flex: 1; }
.lb-name    { font-size: 15px; font-weight: 700; }
.lb-company { font-size: 12px; color: var(--text2); }
.lb-score   { font-size: 16px; font-weight: 700; color: var(--blue); }

/* =============================================
   MARKET
   ============================================= */
.market-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
  box-shadow: 0 1px 4px var(--shadow);
}
.market-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.market-price  { font-size: 20px; font-weight: 800; color: var(--green); }

/* =============================================
   TABS
   ============================================= */
.tab-bar {
  display: flex; background: var(--card2); border-radius: var(--radius-sm);
  padding: 4px; margin-bottom: 16px;
  border: 1px solid var(--border);
}
.tab-btn {
  flex: 1; padding: 9px; border: none; background: none; cursor: pointer;
  border-radius: var(--radius-xs); font-size: 13px; font-weight: 600;
  color: var(--text3); transition: all 0.2s; font-family: var(--font);
}
.tab-btn.active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px var(--shadow); }

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 24px; text-align: center;
}
.empty-state .icon  { font-size: 52px; margin-bottom: 12px; }
.empty-state .title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.empty-state .sub   { font-size: 14px; color: var(--text2); margin-bottom: 20px; }

/* =============================================
   CHAT
   ============================================= */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 160px); }
.chat-msgs  { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg   { display: flex; gap: 10px; }
.chat-msg.mine { flex-direction: row-reverse; }
.chat-av { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-bg); border: 1px solid var(--blue-bdr); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.chat-bubble { max-width: 75%; background: var(--card2); border-radius: 16px; padding: 8px 12px; border: 1px solid var(--border); }
.chat-msg.mine .chat-bubble { background: var(--blue); border-color: var(--blue); color: #fff; }
.chat-user { font-size: 11px; color: var(--text3); margin-bottom: 2px; }
.chat-text { font-size: 14px; }
.chat-time { font-size: 10px; color: var(--text3); margin-top: 3px; }
.chat-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--card); }
.chat-input {
  flex: 1; background: var(--bg2); border: 1.5px solid var(--border); border-radius: 20px;
  color: var(--text); padding: 10px 16px; font-size: 14px; font-family: var(--font); outline: none;
}
.chat-input:focus { border-color: var(--blue); }

/* =============================================
   ACHIEVEMENT CARDS
   ============================================= */
.ach-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 1px 3px var(--shadow);
}
.ach-card.unlocked { border-color: #fde68a; background: #fffbeb; }
.ach-card.locked   { opacity: 0.5; }
.ach-icon  { font-size: 26px; width: 38px; text-align: center; }
.ach-title { font-size: 14px; font-weight: 700; }
.ach-desc  { font-size: 12px; color: var(--text2); margin-top: 2px; }
.ach-reward{ font-size: 12px; color: var(--yellow); margin-top: 3px; font-weight: 600; }

/* =============================================
   BADGES
   ============================================= */
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.badge-green  { color: var(--green);  background: var(--green-bg);  border: 1px solid var(--green-bdr); }
.badge-blue   { color: var(--blue);   background: var(--blue-bg);   border: 1px solid var(--blue-bdr); }
.badge-orange { color: var(--orange); background: var(--orange-bg); border: 1px solid var(--orange-bdr); }
.badge-red    { color: var(--red);    background: var(--red-bg);    border: 1px solid var(--red-bdr); }
.badge-teal   { color: var(--teal);   background: #ecfeff;          border: 1px solid #a5f3fc; }
.badge-purple { color: var(--purple); background: #faf5ff;          border: 1px solid #e9d5ff; }

/* =============================================
   MISSION CARDS
   ============================================= */
.mission-section { margin-bottom: 24px; }
.mission-section-title {
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.mission-section-title .badge { font-size: 10px; }

.mission-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px var(--shadow);
  position: relative;
  overflow: hidden;
}
.mission-card.completed {
  border-color: var(--green-bdr);
  background: var(--green-bg);
}
.mission-card.claimed {
  opacity: 0.55;
}
.mission-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 2px 0 0 2px;
}
.mission-card.daily::before   { background: var(--orange); }
.mission-card.weekly::before  { background: var(--blue); }
.mission-card.story::before   { background: var(--purple); }

.mission-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.mission-icon { font-size: 28px; flex-shrink: 0; }
.mission-info { flex: 1; }
.mission-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.mission-desc  { font-size: 12px; color: var(--text2); margin-top: 2px; }
.mission-reward {
  display: flex; gap: 8px; align-items: center; margin-top: 3px;
  font-size: 12px; font-weight: 600;
}
.mission-reward .cash    { color: var(--green); }
.mission-reward .prestige{ color: var(--purple); }

.mission-progress-row {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.mission-bar {
  flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;
}
.mission-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 0.5s;
}
.mission-card.daily .mission-bar-fill   { background: linear-gradient(90deg,#ea7b0f,#f59e0b); }
.mission-card.weekly .mission-bar-fill  { background: linear-gradient(90deg,#1d5fb5,#0891b2); }
.mission-card.story .mission-bar-fill   { background: linear-gradient(90deg,#7c3aed,#a855f7); }
.mission-bar-fill.full { background: linear-gradient(90deg,var(--green),#34d399) !important; }
.mission-progress-text {
  font-size: 11px; font-weight: 700; color: var(--text3); white-space: nowrap;
}

.mission-claim-btn {
  width: 100%; margin-top: 10px;
  background: linear-gradient(135deg,#059669,#34d399);
  color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px; border-radius: var(--radius-xs);
  border: none; cursor: pointer;
  box-shadow: 0 2px 8px rgba(5,150,105,0.3);
  transition: opacity 0.15s, transform 0.1s;
}
.mission-claim-btn:active { transform: scale(0.97); }

.story-unlock-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--purple);
  background: #faf5ff; border: 1px solid #e9d5ff;
  border-radius: 20px; padding: 2px 8px; margin-top: 3px;
}

/* =============================================
   MISC
   ============================================= */
.divider  { height: 1px; background: var(--border); margin: 16px 0; }
.text-dim  { color: var(--text2); font-size: 13px; }
.text-green{ color: var(--green); font-weight: 600; }
.text-red  { color: var(--red); font-weight: 600; }
.text-orange{color: var(--orange); font-weight: 600; }
.text-blue { color: var(--blue); font-weight: 600; }
.bold      { font-weight: 700; }
.loader    { display: flex; flex-direction: column; align-items: center; padding: 60px 20px; color: var(--text2); }
.spinner   { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-decoration: none; }

/* ── Leaflet tooltip light skin ── */
.leaflet-tooltip-dark {
  background: rgba(255,255,255,0.97);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 4px 16px var(--shadow-md);
}
.leaflet-tooltip-dark::before {
  border-top-color: var(--border) !important;
}
.leaflet-bar a {
  background: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-bar a:hover { background: var(--card2) !important; }

/* =============================================
   CHARTER & DRIVER & UPGRADE
   ============================================= */

/* Badge ek renk */
.badge-purple { background: #faf5ff; color: #7c3aed; border: 1px solid #e9d5ff; }
.badge-red    { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-green  { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bdr); }
.badge-blue   { background: var(--blue-bg);  color: var(--blue);  border: 1px solid var(--blue-bdr); }

/* Charter aktif sefer progress bar */
.trip-progress-bar  { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.trip-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width 1s linear; border-radius: 3px; }

/* Piyasa chat — ilan mesajı */
.chat-system-msg {
  text-align: center; font-size: 12px; color: var(--text3);
  padding: 4px 16px; margin: 4px 0;
}
.chat-ad-msg {
  display: flex; gap: 10px; align-items: flex-start;
  background: linear-gradient(135deg,rgba(251,191,36,0.08),rgba(245,158,11,0.04));
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 10px; padding: 10px 12px; margin: 6px 12px;
}
.chat-ad-icon { font-size: 20px; flex-shrink: 0; }

/* Sürücü XP progress bar (mission-bar yeniden kullanım) */
.mission-bar       { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.mission-bar-fill  { height: 100%; background: linear-gradient(90deg, var(--blue), #0891b2); border-radius: 3px; }

/* btn-red, btn-orange eksikse */
.btn-red    { background: var(--red)    !important; color: #fff !important; border: none; }
.btn-orange { background: var(--orange) !important; color: #fff !important; border: none; }

/* Araç yükseltme modal card */
.upgrade-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }

/* =============================================
   HARİTA — Araç ikonu & trend bar
   ============================================= */
.map-bus-icon {
  font-size: 20px; line-height: 28px; text-align: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  animation: bus-bounce 1.2s ease-in-out infinite;
}
@keyframes bus-bounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* Şehir talep trend bar wrap */
#city-trend-wrap {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px 0;
}

/* =============================================
   GÜNLÜK BONUS STREAK
   ============================================= */
.streak-row {
  display: flex; gap: 6px; justify-content: center;
  margin-bottom: 20px; flex-wrap: wrap;
}
.streak-dot {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 38px;
}
.streak-day {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--border); color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  border: 2px solid var(--border2);
}
.streak-dot.done .streak-day  { background: var(--green-bg); color: var(--green); border-color: var(--green-bdr); }
.streak-dot.current .streak-day {
  background: linear-gradient(135deg,#1d5fb5,#0891b2); color:#fff; border-color: transparent;
  box-shadow: 0 0 0 3px rgba(8,145,178,0.25);
  animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(8,145,178,0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(8,145,178,0); }
  100% { box-shadow: 0 0 0 0 rgba(8,145,178,0); }
}
.streak-reward { font-size: 9px; color: var(--text3); text-align: center; line-height: 1.2; }
.streak-dot.current .streak-reward { color: var(--blue); font-weight: 700; }
.bonus-reward-box {
  background: var(--green-bg); border: 1px solid var(--green-bdr);
  border-radius: 16px; padding: 16px; margin-top: 4px;
}

/* =============================================
   BİLET FİYATI YARDIMCI ÇUBUĞU
   ============================================= */
.price-hint-bar {
  display: flex; border-radius: 10px; overflow: hidden;
  margin-bottom: 12px; height: 52px; font-size: 11px; font-weight: 600;
}
.price-zone { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.price-zone span { font-size: 12px; font-weight: 800; }
.price-zone.cheap    { background: #dcfce7; color: #15803d; }
.price-zone.optimal  { background: #dbeafe; color: #1d4ed8; }
.price-zone.expensive{ background: #fee2e2; color: #dc2626; }

/* =============================================
   SKELETON LOADING
   ============================================= */
.skeleton-page { padding: 16px; }
.skeleton-hero, .skeleton-card, .skeleton-line {
  background: linear-gradient(90deg, var(--border) 25%, var(--card2) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 16px;
}
.skeleton-hero  { height: 140px; margin-bottom: 16px; }
.skeleton-card  { height: 80px;  margin-bottom: 10px; }
.skeleton-line  { height: 14px;  margin-bottom: 10px; border-radius: 6px; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w60 { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Sayfa giriş animasyonu */
.page { animation: page-in 0.22s ease-out both; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   PARA ANİMASYONU
   ============================================= */
.coin-particle {
  position: fixed; z-index: 9999;
  font-size: 22px; pointer-events: none;
  transform: translate(-50%, -50%);
}
.cash-flash {
  animation: cash-flash 0.5s ease-out;
}
@keyframes cash-flash {
  0%  { transform: scale(1);    color: var(--green); }
  40% { transform: scale(1.25); color: #00c96e; }
  100%{ transform: scale(1);    color: var(--green); }
}

/* =============================================
   LEVEL UP KUTLAMASI
   ============================================= */
.levelup-firework {
  font-size: 64px;
  animation: firework-pop 0.6s cubic-bezier(.36,.07,.19,.97) both;
  display: block; margin-bottom: 12px;
}
@keyframes firework-pop {
  0%  { transform: scale(0) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100%{ transform: scale(1) rotate(0deg);   opacity: 1; }
}
.levelup-perks {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.perk-item {
  background: var(--blue-bg); color: var(--blue);
  border: 1px solid var(--blue-bdr);
  border-radius: 20px; padding: 6px 14px;
  font-size: 13px; font-weight: 600;
}
.confetti-piece {
  position: fixed; top: -10px; z-index: 9998; pointer-events: none;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* =============================================
   PROFİL SAYFASI
   ============================================= */
.profile-hero {
  padding: 28px 20px 24px;
  text-align: center; color: #fff;
}
.profile-logo {
  width: 72px; height: 72px; border-radius: 20px;
  background: rgba(255,255,255,0.2);
  font-size: 36px; font-weight: 900; color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.profile-name { font-size: 24px; font-weight: 900; letter-spacing: -0.5px; }
.profile-sub  { font-size: 14px; color: rgba(255,255,255,0.75); margin-top: 3px; margin-bottom: 14px; }
.profile-prestige-row { max-width: 280px; margin: 0 auto; }
.profile-prestige-bar {
  height: 6px; background: rgba(255,255,255,0.25); border-radius: 3px; overflow: hidden; margin-bottom: 5px;
}
.profile-prestige-bar div {
  height: 100%; background: rgba(255,255,255,0.85); border-radius: 3px; transition: width 1s;
}
.profile-prestige-lbl { font-size: 12px; color: rgba(255,255,255,0.7); }

.profile-stat-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 4px;
}
.profile-stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 8px; text-align: center;
}
.psv { font-size: 17px; font-weight: 800; color: var(--text); }
.psl { font-size: 11px; color: var(--text3); margin-top: 3px; }

.ach-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ach-pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 10px;
  font-size: 12px; font-weight: 600; color: var(--text2);
}

.level-road-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  opacity: 0.45;
}
.level-road-item.done   { opacity: 0.7; }
.level-road-item.active { opacity: 1; }
.lri-dot {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--border); color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.level-road-item.done .lri-dot   { background: var(--green-bg); color: var(--green); }
.level-road-item.active .lri-dot {
  background: linear-gradient(135deg,#1d5fb5,#0891b2); color:#fff;
  box-shadow: 0 0 0 3px rgba(8,145,178,0.2);
}
.lri-body { flex: 1; }
.lri-name { font-weight: 700; font-size: 14px; }
.lri-req  { font-size: 12px; color: var(--text3); }
.lri-badge {
  font-size: 11px; font-weight: 700; color: var(--blue);
  background: var(--blue-bg); border: 1px solid var(--blue-bdr);
  border-radius: 10px; padding: 3px 8px;
}

/* =============================================
   SÜRÜCÜ KARTI
   ============================================= */
.driver-section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-weight: 700; font-size: 15px; color: var(--text);
}
.driver-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s;
}
.driver-card:active { box-shadow: 0 2px 12px var(--shadow); }
.driver-card-muted { opacity: 0.7; }
.driver-card-top {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px;
}
.driver-avatar {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, #1d5fb5, #0891b2);
  color: #fff; font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.driver-info { flex: 1; min-width: 0; }
.driver-name { font-size: 16px; font-weight: 700; color: var(--text); }
.driver-meta {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: 12px; color: var(--text3); margin-top: 2px;
}
.driver-salary {
  text-align: right; flex-shrink: 0;
  font-size: 17px; font-weight: 800; color: var(--red, #ff453a);
  line-height: 1.2;
}
.driver-xp-bar {
  height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 8px;
}
.driver-xp-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #0891b2, #30d158);
  transition: width 0.8s ease;
}
.driver-stats {
  display: flex; gap: 12px; font-size: 12px; color: var(--text2); margin-bottom: 10px;
}
.driver-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* =============================================
   SEFer PLANLAYICI
   ============================================= */
.trip-planner-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 2px 12px var(--shadow);
}
.tp-row { margin-bottom: 4px; }
.tp-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text3); margin-bottom: 5px;
}
.tp-arrow {
  text-align: center; font-size: 22px; color: var(--border2);
  margin: 6px 0; line-height: 1;
}
.tp-info-box {
  background: var(--blue-bg); border: 1px solid var(--blue-bdr);
  border-radius: 12px; padding: 12px; margin: 10px 0;
}
.tp-preview {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; margin-top: 14px;
}
.tp-preview-row {
  display: flex; justify-content: space-between;
  font-size: 14px; padding: 4px 0; color: var(--text2);
}
.tp-preview-row strong { color: var(--text); }

/* =============================================
   YAKIT MODALI
   ============================================= */
.fuel-modal-status { margin-bottom: 14px; }
.fuel-tank-bar {
  height: 14px; background: var(--border); border-radius: 7px; overflow: hidden;
}
.fuel-tank-fill {
  height: 100%; border-radius: 7px;
  background: linear-gradient(90deg, var(--orange), var(--green));
  transition: width 0.5s;
}
.fuel-price-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--orange-bg); border: 1px solid var(--orange-bdr);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 14px;
  font-size: 14px; color: var(--orange);
}
.fuel-price-row strong { font-size: 18px; }
