﻿* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #eaf0f6;
  color: #111827;
}

.app-shell {
  width: min(520px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 12px 86px;
}

.app-header {
  background: linear-gradient(135deg, #111827, #24476f);
  color: white;
  border-radius: 22px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .22);
}

.app-header h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.app-header p {
  margin: 0;
  font-size: 13px;
  opacity: .86;
}

.source-badge {
  font-size: 12px;
  font-weight: 800;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  padding: 8px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.screen {
  display: none;
  margin-top: 14px;
}

.screen.active {
  display: block;
}

.status {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 14px;
}

.status.error {
  background: #fee2e2;
  color: #991b1b;
}

.hidden {
  display: none !important;
}

.route-form {
  display: grid;
  gap: 14px;
}

.route-cards {
  display: grid;
  gap: 10px;
}

.route-card,
.list-card,
.route-title-box,
.info-note {
  background: white;
  border: 1px solid #dce4ef;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.card-title {
  font-size: 16px;
  font-weight: 900;
  color: #4b5563;
  letter-spacing: .4px;
}

.title-line {
  height: 3px;
  background: #4b5563;
  margin: 10px 0 14px;
}

label {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  font-size: 14px;
  color: #374151;
}

select,
button {
  font-family: inherit;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 15px;
  background: white;
}

select:disabled {
  background: #eef2f7;
  color: #64748b;
}

.swap-row {
  display: grid;
  place-items: center;
  margin: -2px 0;
}

.swap-icon-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 0;
  background: #111827;
  color: white;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .24);
}

.primary-btn {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  background: #2563eb;
  color: white;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .24);
}

button:disabled {
  opacity: .65;
}

.info-note {
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.route-title-box {
  display: grid;
  gap: 6px;
}

.route-title-box span {
  color: #64748b;
  font-weight: 800;
  font-size: 13px;
}

.route-title-box strong {
  font-size: 16px;
}

.radar-notice {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 14px;
  line-height: 1.5;
}

.stats-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  background: white;
  border: 1px solid #dce4ef;
  border-radius: 18px;
  padding: 14px;
}

.stat-card span {
  display: block;
  color: #64748b;
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 30px;
}

.list-card {
  margin-top: 12px;
}

.list-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #e5eaf2;
  text-align: left;
  font-size: 13px;
}

th {
  background: #f8fafc;
  color: #475569;
}

.map-help {
  background: white;
  border: 1px solid #dce4ef;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}

.map-help span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.dot.blue {
  background: #2563eb;
}

.dot.red {
  background: #dc2626;
}

.dot.green {
  background: #16a34a;
}

.dot.black {
  background: #111827;
}

#map {
  margin-top: 12px;
  width: 100%;
  height: calc(100vh - 185px);
  min-height: 430px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #dce4ef;
  background: white;
}

.corridor-pin {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 3px solid white;
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
}

.corridor-pin-start {
  background: #16a34a;
}

.corridor-pin-end {
  background: #111827;
}

.speed-label {
  background: #dc2626;
  color: white;
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(500px, calc(100% - 20px));
  background: rgba(255, 255, 255, .96);
  border: 1px solid #dce4ef;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .18);
  border-radius: 22px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  z-index: 9999;
}

.tab-btn {
  border: 0;
  border-radius: 16px;
  min-height: 46px;
  background: transparent;
  color: #64748b;
  font-weight: 900;
  font-size: 13px;
}

.tab-btn.active {
  background: #2563eb;
  color: white;
}

@media (min-width: 840px) {
  .app-shell {
    width: min(980px, 100%);
  }

  .route-cards {
    grid-template-columns: 1fr 56px 1fr;
    align-items: center;
  }

  .swap-row {
    margin: 0;
  }
}


.drive-card {
  background: white;
  border: 1px solid #dce4ef;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.drive-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.drive-card p {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.drive-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.drive-info {
  background: #f8fafc;
  border: 1px solid #e5eaf2;
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 6px;
}

.drive-info span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.drive-info strong {
  font-size: 18px;
}

.drive-actions {
  display: grid;
  gap: 10px;
}

.secondary-btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: white;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}

.secondary-btn.active {
  background: #16a34a;
  border-color: #16a34a;
  color: white;
}

.drive-voice-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.drive-voice-row div {
  display: grid;
  gap: 6px;
}

.voice-switch {
  position: relative;
  width: 58px;
  height: 34px;
  margin: 0;
  display: inline-block;
  flex: 0 0 auto;
}

.voice-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.voice-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: .2s;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.12);
}

.voice-slider:before {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 999px;
  transition: .2s;
  box-shadow: 0 3px 8px rgba(0,0,0,.25);
}

.voice-switch input:checked + .voice-slider {
  background: #16a34a;
}

.voice-switch input:checked + .voice-slider:before {
  transform: translateX(24px);
}

.speed-box {
  display: grid !important;
  grid-template-columns: 1fr 140px;
  align-items: center;
  gap: 12px;
}

.speed-digital {
  display: grid;
  gap: 3px;
}

.speed-digital strong {
  font-size: 46px;
  line-height: 1;
  color: #0f172a;
}

.speed-digital small {
  color: #64748b;
  font-weight: 900;
}

.speed-gauge {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.gauge-arc {
  position: relative;
  width: 118px;
  height: 62px;
  overflow: hidden;
}

.gauge-arc::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 118px;
  height: 118px;
  border-radius: 999px;
  border: 12px solid #e2e8f0;
  border-bottom-color: transparent;
  border-left-color: #22c55e;
  border-top-color: #f59e0b;
  border-right-color: #ef4444;
  transform: rotate(45deg);
}

.speed-needle {
  position: absolute;
  left: 58px;
  bottom: 0;
  width: 3px;
  height: 50px;
  background: #111827;
  border-radius: 999px;
  transform-origin: bottom center;
  transform: rotate(-90deg);
  transition: transform .35s ease;
  z-index: 2;
}

.gauge-center {
  position: absolute;
  left: 51px;
  bottom: -7px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #111827;
  z-index: 3;
}

.gauge-labels {
  width: 118px;
  display: flex;
  justify-content: space-between;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 420px) {
  .speed-box {
    grid-template-columns: 1fr 120px;
  }

  .speed-digital strong {
    font-size: 40px;
  }
}

.location-box small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

/* Profesyonel hız kadranı */
.speed-pro-card {
  display: grid !important;
  grid-template-columns: 1fr 170px;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.speed-readout {
  display: grid;
  gap: 3px;
}

.speed-readout span {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.speed-readout strong {
  font-size: 54px;
  line-height: .95;
  color: #0f172a;
  letter-spacing: -2px;
}

.speed-readout small {
  color: #64748b;
  font-weight: 900;
}

.speedometer-pro {
  width: 170px;
  height: 112px;
}

.speedometer-pro svg {
  width: 100%;
  height: 100%;
  display: block;
}

.speed-track {
  fill: none;
  stroke: #dbe4ef;
  stroke-width: 18;
  stroke-linecap: round;
}

.speed-progress {
  fill: none;
  stroke: #2563eb;
  stroke-width: 18;
  stroke-linecap: round;
  stroke-dasharray: 282;
  stroke-dashoffset: 282;
  transition: stroke-dashoffset .35s ease;
}

.speed-needle-pro {
  stroke: #111827;
  stroke-width: 4;
  stroke-linecap: round;
  transition: transform .35s ease;
  transform-origin: 120px 118px;
}

.speed-center {
  fill: #111827;
  stroke: white;
  stroke-width: 4;
}

.speed-scale {
  fill: #64748b;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 420px) {
  .speed-pro-card {
    grid-template-columns: 1fr 145px;
  }

  .speed-readout strong {
    font-size: 46px;
  }

  .speedometer-pro {
    width: 145px;
  }
}

/* Gerçekçi araç kadranı */
.speed-dashboard-card {
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  background: linear-gradient(145deg, #111827, #020617) !important;
  border: 1px solid #1f2937 !important;
  color: white !important;
}

.speed-dashboard-card .speed-readout {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 6px;
}

.speed-dashboard-card .speed-readout span {
  color: #94a3b8 !important;
}

.speed-dashboard-card .speed-readout strong {
  color: #e5f9ff !important;
  text-shadow: 0 0 18px rgba(56,189,248,.45);
}

.speed-dashboard-card .speed-readout small {
  color: #94a3b8 !important;
  padding-bottom: 6px;
}

.realistic-speedometer {
  width: 100% !important;
  height: auto !important;
  max-width: 360px;
  margin: 0 auto;
}

.realistic-speedometer svg {
  width: 100%;
  height: auto;
  display: block;
}

.gauge-bg {
  fill: url(#gaugeBg);
  stroke: #334155;
  stroke-width: 4;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.45));
}

.realistic-speedometer .speed-track {
  fill: none !important;
  stroke: #1e293b !important;
  stroke-width: 18 !important;
  stroke-linecap: round !important;
}

.realistic-speedometer .speed-progress {
  fill: none !important;
  stroke: url(#gaugeGlow) !important;
  stroke-width: 18 !important;
  stroke-linecap: round !important;
  stroke-dasharray: 371;
  stroke-dashoffset: 371;
  filter: drop-shadow(0 0 8px rgba(34,211,238,.45));
  transition: stroke-dashoffset .35s ease;
}

.gauge-ticks line {
  stroke: #e2e8f0;
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(226,232,240,.55));
}

.realistic-speedometer .speed-scale {
  fill: #cbd5e1 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  text-anchor: middle;
}

.realistic-speedometer .red-scale {
  fill: #f87171 !important;
}

.gauge-speed-number {
  fill: #ecfeff;
  font-size: 42px;
  font-weight: 900;
  text-anchor: middle;
  letter-spacing: -1px;
  text-shadow: 0 0 14px rgba(34,211,238,.75);
}

.gauge-speed-unit {
  fill: #94a3b8;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
}

.realistic-speedometer .speed-needle-pro {
  stroke: #22d3ee !important;
  stroke-width: 5 !important;
  stroke-linecap: round !important;
  filter: url(#needleGlow);
  transition: transform .35s ease;
  transform-origin: 160px 156px;
}

.realistic-speedometer .speed-center {
  fill: #e2e8f0 !important;
  stroke: #22d3ee !important;
  stroke-width: 4 !important;
  filter: drop-shadow(0 0 8px rgba(34,211,238,.8));
}

/* Belirgin hız ibresi */
.realistic-speedometer .speed-needle-pro {
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, .95));
  transition: transform .35s ease;
  transform-origin: 160px 156px;
}

.realistic-speedometer .speed-needle-pro line {
  stroke: #22d3ee;
  stroke-width: 7;
  stroke-linecap: round;
}

.realistic-speedometer .speed-needle-pro circle {
  fill: #f43f5e;
  stroke: white;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(244, 63, 94, .9));
}

/* Final profesyonel araç kadranı */
.speed-dashboard-card {
  background: linear-gradient(145deg, #0f172a, #020617) !important;
  border: 1px solid #1e293b !important;
  color: white !important;
  padding: 16px !important;
}

.speed-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.speed-topline span {
  display: block;
  color: #94a3b8 !important;
  font-size: 13px;
  font-weight: 900;
}

.speed-topline strong {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.speed-topline b {
  font-size: 42px;
  line-height: .9;
  color: #ecfeff;
  text-shadow: 0 0 18px rgba(34, 211, 238, .55);
}

.speed-topline small {
  color: #94a3b8 !important;
  font-size: 13px;
  font-weight: 900;
}

.speed-topline em {
  font-style: normal;
  background: rgba(34, 211, 238, .12);
  color: #67e8f9;
  border: 1px solid rgba(103, 232, 249, .28);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.pro-speedometer {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.pro-speedometer svg {
  width: 100%;
  height: auto;
  display: block;
}

.dash-outer {
  fill: url(#dashBg);
  stroke: #334155;
  stroke-width: 5;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,.55));
}

.dash-inner {
  fill: rgba(2, 6, 23, .72);
  stroke: rgba(148, 163, 184, .18);
  stroke-width: 2;
}

.dash-track {
  fill: none;
  stroke: #1e293b;
  stroke-width: 20;
  stroke-linecap: round;
}

.dash-progress {
  fill: none;
  stroke: url(#dashArc);
  stroke-width: 20;
  stroke-linecap: round;
  stroke-dasharray: 494;
  stroke-dashoffset: 494;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, .55));
  transition: stroke-dashoffset .35s ease;
}

.dash-ticks line {
  stroke: #e2e8f0;
  stroke-width: 5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(226,232,240,.55));
}

.dash-scale {
  fill: #cbd5e1;
  font-size: 14px;
  font-weight: 900;
  text-anchor: middle;
}

.dash-scale.danger {
  fill: #fb7185;
}

.dash-speed {
  fill: #ecfeff;
  font-size: 46px;
  font-weight: 900;
  text-anchor: middle;
  letter-spacing: -1px;
  filter: drop-shadow(0 0 8px rgba(34,211,238,.85));
}

.dash-unit {
  fill: #94a3b8;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
}

.dash-needle {
  transition: transform .35s ease;
  transform-origin: 160px 178px;
  filter: url(#softGlow);
}

.dash-needle polygon {
  fill: #22d3ee;
  stroke: white;
  stroke-width: 1.5;
}

.dash-needle circle:first-of-type {
  fill: #111827;
  stroke: #22d3ee;
  stroke-width: 4;
}

.dash-needle circle:last-of-type {
  fill: #f43f5e;
  stroke: white;
  stroke-width: 2;
}

@media (max-width: 420px) {
  .speed-topline b {
    font-size: 36px;
  }
}

/* hız kadranı */
.vehicle-speed-card {
  border-radius: 24px !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(34, 211, 238, .18), transparent 34%),
    linear-gradient(145deg, #111827, #020617 72%) !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 16px 34px rgba(2,6,23,.28) !important;
  padding: 16px !important;
}

.vehicle-speed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.vehicle-speed-header span {
  color: #94a3b8 !important;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .2px;
}

.vehicle-speed-header strong {
  color: #ecfeff !important;
  font-size: 30px;
  line-height: .9;
  letter-spacing: -1px;
  text-shadow: 0 0 18px rgba(34, 211, 238, .62);
  white-space: nowrap;
}

.vehicle-speed-header b {
  font-size: 30px;
}

.vehicle-speed-header small {
  color: #94a3b8 !important;
  font-size: 12px;
  margin-left: 3px;
  text-shadow: none;
  letter-spacing: 0;
}

.vehicle-gauge-wrap {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.vehicle-gauge-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.vehicle-dial-bg {
  fill: url(#vehicleDialBg);
  stroke: #334155;
  stroke-width: 5;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,.6));
}

.vehicle-inner-ring {
  fill: rgba(2,6,23,.34);
  stroke: rgba(148, 163, 184, .16);
  stroke-width: 2;
}

.vehicle-arc-base {
  fill: none;
  stroke: #1e293b;
  stroke-width: 17;
  stroke-linecap: round;
}

.vehicle-arc-active {
  fill: none;
  stroke: url(#vehicleArcGlow);
  stroke-width: 17;
  stroke-linecap: round;
  filter: drop-shadow(0 0 9px rgba(34,211,238,.65));
  stroke-dasharray: 494;
  stroke-dashoffset: 494;
  transition: stroke-dashoffset .25s ease;
}

.vehicle-minor-ticks line {
  stroke: rgba(226, 232, 240, .68);
  stroke-width: 2;
  stroke-linecap: round;
}

.vehicle-major-ticks line {
  stroke: #e2e8f0;
  stroke-width: 5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(226,232,240,.55));
}

.vehicle-scale {
  fill: #cbd5e1;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
}

.vehicle-scale.danger {
  fill: #fb7185;
}

.vehicle-digital {
  fill: #ecfeff;
  font-size: 42px;
  font-weight: 900;
  text-anchor: middle;
  letter-spacing: -1px;
  filter: drop-shadow(0 0 8px rgba(34,211,238,.85));
}

.vehicle-unit {
  fill: #94a3b8;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
}

.vehicle-needle-line {
  stroke: #22d3ee;
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(34,211,238,.95));
  transition: all .25s ease;
}

.vehicle-needle-glow {
  stroke: rgba(34,211,238,.32);
  stroke-width: 11;
  stroke-linecap: round;
  transition: all .25s ease;
}

.vehicle-needle-tip {
  fill: #f43f5e;
  stroke: white;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(244,63,94,.9));
  transition: all .25s ease;
}

.vehicle-hub-outer {
  fill: #111827;
  stroke: #22d3ee;
  stroke-width: 4;
  filter: drop-shadow(0 0 9px rgba(34,211,238,.85));
}

.vehicle-hub-inner {
  fill: #f43f5e;
  stroke: white;
  stroke-width: 2;
}
