:root {
  --deep-space: #0A0E17;
  --surface-dark: #121820;
  --card-dark: #1A2332;
  --border-card: #202d3d;
  --electric-cyan: #00D4FF;
  --neon-amber: #FFB800;
  --cyber-green: #00E676;
  --alert-orange: #FF6D00;
  --danger-red: #FF1744;
  --text-primary: #E0E6ED;
  --text-secondary: #8B9BB4;
  --border-glow: rgba(0, 212, 255, 0.2);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: radial-gradient(ellipse at center, #0d1422 0%, var(--deep-space) 100%);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.hidden { display: none !important; }

/* ===== SPLASH ===== */
.splash-screen {
  position: fixed;
  inset: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.splash-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.splash-logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.3), transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  animation: logoPulse 2s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(0,212,255,0.3);
  border: 1px solid rgba(0,212,255,0.2);
}

.splash-logo i { font-size: 56px; color: var(--electric-cyan); }

@keyframes logoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(0,212,255,0.3); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(0,212,255,0.5); }
}

.splash-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--electric-cyan);
  letter-spacing: 6px;
  text-shadow: 0 0 20px rgba(0,212,255,0.5), 0 0 40px rgba(0,212,255,0.3);
  margin-bottom: 8px;
}

.splash-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.splash-version {
  font-size: 10px;
  color: var(--cyber-green);
  font-family: monospace;
  letter-spacing: 2px;
  opacity: 0.7;
  margin-bottom: 40px;
}

.splash-loading {
  width: 200px;
  height: 3px;
  background: var(--surface-dark);
  border-radius: 2px;
  margin: 0 auto;
  overflow: hidden;
}

.splash-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--electric-cyan), var(--cyber-green));
  border-radius: 2px;
  animation: loadBar 3s ease-out forwards;
}

@keyframes loadBar {
  0% { width: 0%; }
  70% { width: 85%; }
  100% { width: 100%; }
}

.splash-footer {
  position: absolute;
  bottom: 24px;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.5;
  z-index: 2;
}

/* ===== LOGIN ===== */
.login-screen {
  position: fixed;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.login-card {
  background: var(--card-dark);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 30px rgba(0,212,255,0.08);
  text-align: center;
  animation: loginFadeIn 0.5s ease-out;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.4), transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 30px rgba(0,212,255,0.2);
  border: 1px solid rgba(0,212,255,0.3);
}

.login-logo i { font-size: 36px; color: var(--electric-cyan); }

.login-card h2 {
  color: var(--electric-cyan);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
}

.login-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.input-group {
  position: relative;
  margin-bottom: 14px;
}

.input-group i:first-child {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--electric-cyan);
  font-size: 14px;
  opacity: 0.7;
}

.input-group input {
  width: 100%;
  height: 48px;
  padding: 0 42px;
  background: var(--surface-dark);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none !important;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  transition: all 0.2s;
}

.input-group input:focus {
  border-color: var(--electric-cyan);
  background: rgba(0,212,255,0.05);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

.input-group input::placeholder { color: var(--text-secondary); }

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s;
}

.toggle-pass:hover { color: var(--text-primary); }

.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--electric-cyan), #0090b3);
  color: var(--deep-space);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  letter-spacing: 1px;
}

.btn-login:hover {
  background: linear-gradient(135deg, #33ddff, var(--electric-cyan));
  box-shadow: 0 0 25px rgba(0,212,255,0.4);
  transform: translateY(-1px);
}

.btn-login:active { transform: translateY(0); }

.role-selector {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

.role-btn {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.role-btn.active {
  border-color: var(--electric-cyan);
  color: var(--electric-cyan);
  background: rgba(0,212,255,0.12);
}

.role-btn:hover {
  border-color: var(--electric-cyan);
  color: var(--electric-cyan);
}

.login-hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ===== DASHBOARD ===== */
.dashboard {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  background: var(--deep-space);
  padding-bottom: 28px;
}

/* ===== HEADER ===== */
.app-header {
  height: 56px;
  background: var(--surface-dark);
  border-bottom: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon { font-size: 22px; color: var(--electric-cyan); }

.app-title { font-size: 18px; font-weight: 800; color: var(--text-primary); }

.app-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--border-glow);
}

.header-center {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: monospace;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(139,155,180,0.3);
  color: var(--text-secondary);
  transition: all 0.3s;
}

.connection-status.connected {
  background: rgba(0,230,118,0.12);
  color: var(--cyber-green);
  border-color: rgba(0,230,118,0.4);
}

.connection-status.disconnected {
  background: rgba(255,23,68,0.12);
  color: var(--danger-red);
  border-color: rgba(255,23,68,0.4);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.btn-logout, .btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-logout:hover { color: var(--danger-red); background: rgba(255,23,68,0.1); }
.btn-icon:hover { color: var(--electric-cyan); background: rgba(0,212,255,0.1); }

/* ===== ADMIN LAYOUT ===== */
.admin-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.admin-sidebar {
  width: 300px;
  background: var(--surface-dark);
  border-right: 1px solid var(--border-glow);
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 5px;
  overflow: hidden;
  flex-shrink: 0;
}

.stat-card {
  background: var(--card-dark);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s;
}

.stat-card:hover { border-color: rgba(0,212,255,0.35); }

.stat-card.compact {
  flex: 1;
  padding: 8px 6px;
  flex-direction: column;
  text-align: center;
  gap: 4px;
}

.stat-row { display: flex; gap: 6px; }

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0,212,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--electric-cyan);
  font-size: 16px;
  flex-shrink: 0;
}

.stat-icon.small { width: 30px; height: 30px; font-size: 13px; }
.stat-icon.green { background: rgba(0,230,118,0.12); color: var(--cyber-green); }
.stat-icon.orange { background: rgba(255,109,0,0.12); color: var(--alert-orange); }

/* Sidebar Actions */
.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 0;
  margin-bottom: 0;
}

.btn-sidebar-action {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  color: var(--electric-cyan);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.btn-sidebar-action i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.btn-sidebar-action:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--electric-cyan);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
  transform: translateY(-1px);
}

.stat-info { flex: 1; }
.stat-label { font-size: 11px; color: var(--text-secondary); margin-bottom: 2px; }
.stat-value { font-size: 20px; font-weight: 800; color: var(--electric-cyan); }
.stat-card.compact .stat-value { font-size: 16px; }

.driver-list-header {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  color: var(--electric-cyan);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  letter-spacing: 0.5px;
  box-sizing: border-box;
}

.driver-list-header:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--electric-cyan);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
  transform: translateY(-1px);
}


.driver-list, .firma-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex-shrink: 0;
  padding-right: 2px;
  transition: all 0.3s ease;
}

.driver-list {
  display: none;
  height: 0px;
  max-height: 0px;
  min-height: 0px;
  overflow: hidden;
}

.firma-list {
  display: none;
  height: 0px;
  max-height: 0px;
  min-height: 0px;
  overflow: hidden;
}

.driver-list.expanded, .firma-list.expanded {
  display: block;
  height: 180px; /* Yaklasik 3 ogelik alan */
  max-height: 180px;
  min-height: 180px;
  overflow-y: auto;
}

.driver-item {
  background: var(--card-dark);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.driver-item:hover, .driver-item.active {
  border-color: var(--electric-cyan);
  background: rgba(0,212,255,0.05);
}

.driver-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,212,255,0.12);
  border: 1.5px solid var(--electric-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--electric-cyan);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.driver-info { flex: 1; min-width: 0; }

.driver-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.driver-speed { font-size: 11px; color: var(--cyber-green); margin-top: 2px; }

.driver-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-secondary);
  flex-shrink: 0;
}

/* ===== MAP AREA ===== */
.admin-main {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.map-ticker {
  flex: 1;
  margin: 0 10px;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #00e5ff;
  font-family: 'Outfit', 'Inter', 'Segoe UI', sans-serif;
  letter-spacing: 2px;
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 8px;
  padding: 5px 0;
  height: 26px;
  max-width: none;
  box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.05);
}

.map-ticker::before,
.map-ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  z-index: 2;
  pointer-events: none;
}
.map-ticker::before {
  left: 0;
  background: linear-gradient(to right, #0f172a, transparent);
}
.map-ticker::after {
  right: 0;
  background: linear-gradient(to left, #0f172a, transparent);
}

.ticker-content {
  display: inline-block;
  padding-left: 100%;
  animation: ticker-slide 20s linear infinite;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

@keyframes ticker-slide {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

.map-info {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-info i { color: var(--electric-cyan); }

.map-actions { display: flex; gap: 6px; }

.btn-map-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--card-dark);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-map-action:hover {
  border-color: var(--electric-cyan);
  color: var(--electric-cyan);
  background: rgba(0,212,255,0.08);
}

.map-container {
  flex: 1;
  background: var(--card-dark);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  min-height: 200px;
}

/* Map placeholder */
.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.map-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.map-placeholder-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-secondary);
}

.map-placeholder-content i {
  font-size: 48px;
  color: var(--electric-cyan);
  opacity: 0.4;
  margin-bottom: 12px;
  display: block;
}

.map-placeholder-content h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.map-placeholder-content p { font-size: 13px; }
.map-placeholder-content .small { font-size: 11px; margin-top: 4px; opacity: 0.6; }

/* Sim drivers grid */
.sim-drivers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
  max-width: 400px;
}

.sim-driver-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--electric-cyan);
  animation: simDriverPulse 2s ease-in-out infinite;
}

.sim-driver-dot .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyber-green);
  box-shadow: 0 0 4px var(--cyber-green);
}

@keyframes simDriverPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* ===== DRIVER LAYOUT ===== */
.driver-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 10px;
  gap: 10px;
  overflow: hidden;
}

.driver-map-area {
  flex: 1 1 35%;
  min-height: 150px;
  max-height: 40%;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

/* Simülasyon harita elementleri */
.sim-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.route-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.driver-dot {
  position: absolute;
  z-index: 10;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  transition: left 1s ease, top 1s ease;
}

.driver-dot-inner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--electric-cyan);
  box-shadow: 0 0 12px var(--electric-cyan);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.driver-dot-ring {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--electric-cyan);
  opacity: 0.4;
  position: absolute;
  animation: ringPulse 1.5s ease-in-out infinite;
}

@keyframes ringPulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

.target-pin {
  position: absolute;
  z-index: 8;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
}

.target-pin .pin-circle {
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid rgba(255,255,255,0.3);
}

.target-pin .pin-circle span {
  transform: rotate(45deg);
  color: white;
}

.target-pin.waiting .pin-circle { background: var(--text-secondary); }
.target-pin.ongoing .pin-circle { background: var(--neon-amber); box-shadow: 0 0 10px var(--neon-amber); }
.target-pin.done .pin-circle { background: var(--cyber-green); }
.target-pin.failed .pin-circle { background: var(--danger-red); }

/* Target card */
.target-card {
  background: var(--card-dark);
  border: 1px solid rgba(255,184,0,0.25);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 4px 20px rgba(255,184,0,0.08);
}

.target-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.target-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,184,0,0.12);
  border: 1px solid rgba(255,184,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-amber);
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.target-info { flex: 1; }
.target-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.target-address { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.target-status {
  padding: 4px 10px;
  background: rgba(0,212,255,0.1);
  color: var(--electric-cyan);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  border: 1px solid rgba(0,212,255,0.2);
}

.target-details {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.target-details i { margin-right: 4px; color: var(--electric-cyan); opacity: 0.7; }

/* Progress bar */
.target-progress {}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.progress-bar-bg {
  height: 4px;
  background: var(--surface-dark);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--electric-cyan), var(--cyber-green));
  border-radius: 2px;
  transition: width 0.5s ease;
  width: 0%;
}

/* Action buttons */
.action-buttons {
  display: flex;
  gap: 10px;
}

.btn-success, .btn-danger {
  flex: 1;
  padding: 13px;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.btn-success {
  background: linear-gradient(135deg, var(--cyber-green), #00b857);
  color: var(--deep-space);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,230,118,0.35);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-red), #c0001e);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,23,68,0.35);
}

.btn-success:disabled, .btn-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Route panel */
.route-panel {
  flex: 1;
  background: var(--card-dark);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.route-header {
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid rgba(0,212,255,0.1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.route-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--electric-cyan);
  background: rgba(0,212,255,0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

.route-list {
  overflow-y: auto;
  padding: 6px;
  height: 54px;
  max-height: 54px;
  min-height: 54px;
  flex: 0 0 54px;
}

.route-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  margin-bottom: 4px;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}

.route-item:hover { background: rgba(0,212,255,0.04); }

.route-item.active {
  background: rgba(0,212,255,0.06);
  border-color: rgba(0,212,255,0.25);
}

.route-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.route-num.waiting { background: rgba(139,155,180,0.12); color: var(--text-secondary); }
.route-num.ongoing { background: rgba(255,184,0,0.12); color: var(--neon-amber); }
.route-num.done { background: rgba(0,230,118,0.12); color: var(--cyber-green); }
.route-num.failed { background: rgba(255,23,68,0.12); color: var(--danger-red); }

.route-info { flex: 1; min-width: 0; }

.route-firm {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-addr { font-size: 11px; color: var(--text-secondary); }
.route-icon { font-size: 14px; }
.route-icon.waiting { color: var(--text-secondary); }
.route-icon.ongoing { color: var(--neon-amber); }
.route-icon.done { color: var(--cyber-green); }
.route-icon.failed { color: var(--danger-red); }

/* ===== NOTIFICATIONS ===== */
#notification-container {
  position: fixed;
  bottom: 36px;
  right: 20px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.notification {
  background: var(--card-dark);
  border: 1.5px solid;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 280px;
  max-width: 360px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
  pointer-events: all;
  animation: notifSlideIn 0.3s ease-out;
  cursor: pointer;
}

.notification.closing {
  animation: notifSlideOut 0.3s ease-in forwards;
}

@keyframes notifSlideIn {
  from { transform: translateX(60px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes notifSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(60px); opacity: 0; }
}

.notif-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.notif-content { flex: 1; }
.notif-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.notif-message { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }

.notif-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  padding: 2px;
  margin-left: 4px;
  transition: color 0.2s;
}

.notif-close:hover { color: var(--text-primary); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9997;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--card-dark);
  border: 1px solid var(--border-glow);
  border-radius: 18px;
  padding: 24px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: modalSlideIn 0.25s ease-out;
  position: relative;
  z-index: 1;
}

.modal input,
.modal select,
.modal textarea {
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
}

@keyframes modalSlideIn {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal.large {
  max-width: 540px;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reason-list { display: flex; flex-direction: column; gap: 8px; }

.reason-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--surface-dark);
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
  font-size: 14px;
}

.reason-item:hover {
  background: rgba(255,23,68,0.08);
  border-color: rgba(255,23,68,0.3);
}

.reason-item i { color: var(--danger-red); width: 16px; }

/* Form */
.form-group { margin-bottom: 12px; }

.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group {
  flex: 1;
}

.plan-item-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.plan-item-row input {
  flex: 1;
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}
.plan-item-row input.item-qty {
  flex: 0 0 80px;
}
.plan-item-row .btn-remove-item {
  flex: 0 0 36px;
  background: rgba(255, 23, 68, 0.1);
  border: 1px solid rgba(255, 23, 68, 0.2);
  color: var(--danger-red);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.plan-item-row .btn-remove-item:hover {
  background: var(--danger-red);
  color: white;
}

.form-group label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-dark);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  pointer-events: auto !important;
  -webkit-user-select: text !important;
  user-select: text !important;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--electric-cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

.form-group select option { background: var(--card-dark); }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.form-actions button {
  flex: 1;
  padding: 11px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary { background: var(--electric-cyan); color: var(--deep-space); }
.btn-primary:hover { background: #33ddff; box-shadow: 0 4px 15px rgba(0,212,255,0.3); }

.btn-secondary {
  background: var(--surface-dark);
  color: var(--text-secondary);
  border: 1px solid rgba(0,212,255,0.15) !important;
}

.btn-secondary:hover { color: var(--text-primary); border-color: rgba(0,212,255,0.3) !important; }

/* ===== ADD BUTTON ===== */
.btn-add {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(0,212,255,0.12);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--electric-cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.2s;
}

.btn-add:hover { background: var(--electric-cyan); color: var(--deep-space); }

/* ===== FIRMA LIST ===== */
.firma-list {
  overflow-y: auto;
  height: 38px;
  max-height: 38px;
  min-height: 38px;
  flex-shrink: 0;
}

.firma-item {
  background: var(--card-dark);
  border: 1px solid rgba(255,184,0,0.1);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.2s;
  height: 32px;
  box-sizing: border-box;
}

.firma-item:hover { border-color: rgba(255,184,0,0.35); background: rgba(255,184,0,0.05); }

.firma-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,184,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-amber);
  font-size: 13px;
  flex-shrink: 0;
}

.firma-info { flex: 1; min-width: 0; }
.firma-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.firma-address { font-size: 11px; color: var(--text-secondary); }

.firma-category-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255,184,0,0.1);
  color: var(--neon-amber);
  border: 1px solid rgba(255,184,0,0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.firma-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.firma-item:hover .firma-actions {
  opacity: 1;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.3); }

/* ===== FOOTER ===== */
.app-footer {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  height: 28px;
  background: rgba(10, 14, 23, 0.97);
  border-top: 1px solid rgba(0,212,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  color: var(--text-secondary);
  z-index: 100;
  backdrop-filter: blur(10px);
}

.app-footer span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-footer i { color: var(--electric-cyan); font-size: 10px; }

.footer-version {
  font-family: monospace;
  color: var(--cyber-green);
  opacity: 0.7;
}

/* ===== PRINT STYLES ===== */
@media print {
  body * {
    visibility: hidden;
  }
  
  body.printing-modal #plans-modal-content, 
  body.printing-modal #plans-modal-content * {
    visibility: visible;
  }
  
  body.printing-modal #plans-modal-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: white !important;
    color: black !important;
  }
  
  body.printing-modal .plan-card {
    border: 1px solid #ccc !important;
    background: white !important;
    color: black !important;
    page-break-inside: avoid;
  }
  
  body.printing-modal .modal-title,
  body.printing-modal .plan-card div,
  body.printing-modal .plan-card ul,
  body.printing-modal .plan-card li,
  body.printing-modal .plan-card span {
    color: black !important;
  }

  body.printing-modal .form-actions {
    display: none !important;
  }

  /* Default printing if not modal */
  body:not(.printing-modal) #admin-dashboard, 
  body:not(.printing-modal) #admin-dashboard * {
    visibility: visible;
  }
  
  body:not(.printing-modal) .admin-layout {
    display: block !important;
  }
  
  body:not(.printing-modal) .admin-sidebar {
    width: 100% !important;
    border: none;
    height: auto !important;
    overflow: visible !important;
    position: absolute;
    left: 0;
    top: 0;
  }
  
  body:not(.printing-modal) .app-header, 
  body:not(.printing-modal) .admin-main, 
  body:not(.printing-modal) .sidebar-actions, 
  body:not(.printing-modal) .btn-add, 
  body:not(.printing-modal) .stat-row, 
  body:not(.printing-modal) .stat-card {
    display: none !important;
  }
  
  body:not(.printing-modal) .driver-item, 
  body:not(.printing-modal) .firma-item {
    border: 1px solid #ccc !important;
    color: #000 !important;
    page-break-inside: avoid;
  }
  
  body:not(.printing-modal) .driver-name, 
  body:not(.printing-modal) .firma-name, 
  body:not(.printing-modal) .driver-meta, 
  body:not(.printing-modal) .firma-address {
    color: #000 !important;
  }
}

/* ===== NEW CUSTOM STYLES (USER MANAGEMENT & PASSWORD OPTIONS) ===== */
.login-links a {
  transition: all 0.2s;
}
.login-links a:hover {
  color: var(--electric-cyan) !important;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.user-table-container {
  max-height: 350px;
  overflow-y: auto;
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 16px;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface-dark);
}

.user-table th, .user-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.user-table th {
  background: var(--card-dark);
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.8px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 10;
}

.user-table tr:hover {
  background: rgba(255,255,255,0.02);
}

.role-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-badge.admin {
  background: rgba(0, 212, 255, 0.12);
  color: var(--electric-cyan);
  border: 1px solid rgba(0, 212, 255, 0.25);
}

.role-badge.panel {
  background: rgba(255, 184, 0, 0.12);
  color: var(--neon-amber);
  border: 1px solid rgba(255, 184, 0, 0.25);
}

.role-badge.driver {
  background: rgba(0, 230, 118, 0.12);
  color: var(--cyber-green);
  border: 1px solid rgba(0, 230, 118, 0.25);
}

.btn-table-action {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-table-action.delete {
  color: var(--danger-red);
}

.btn-table-action.delete:hover {
  background: rgba(255, 23, 68, 0.15);
  box-shadow: 0 0 8px rgba(255, 23, 68, 0.2);
}

.btn-table-action.edit {
  color: var(--electric-cyan);
}

.btn-table-action.edit:hover {
  background: rgba(0, 212, 255, 0.15);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

/* ===== MAP ALERT OVERLAY ===== */
.map-alert-overlay {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(10px);
  border: 2px solid var(--cyber-green);
  box-shadow: 0 0 25px rgba(0, 230, 118, 0.25);
  border-radius: 12px;
  padding: 14px 20px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  pointer-events: none;
}

.map-alert-overlay.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.map-alert-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.15);
  border: 2px solid var(--cyber-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyber-green);
  font-size: 16px;
  animation: alertPulse 1.5s infinite;
}

.map-alert-content {
  display: flex;
  flex-direction: column;
}

.map-alert-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--cyber-green);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.map-alert-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.map-alert-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-alert-close:hover {
  color: var(--danger-red);
}

@keyframes alertPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 230, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

/* ===== LOGOUT SCREEN ===== */
.logout-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, #0d1422 0%, var(--deep-space) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12000;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.logout-screen:not(.hidden) {
  opacity: 1;
}

.logout-card {
  background: var(--card-dark);
  border: 1px solid rgba(255, 23, 68, 0.25);
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 30px rgba(255,23,68,0.08);
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logout-screen:not(.hidden) .logout-card {
  transform: scale(1);
}

.logout-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,23,68,0.3), transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 30px rgba(255,23,68,0.2);
  border: 1px solid rgba(255,23,68,0.3);
  animation: pulseGlowRed 2s infinite ease-in-out;
}

@keyframes pulseGlowRed {
  0%, 100% { box-shadow: 0 0 20px rgba(255,23,68,0.2); border-color: rgba(255,23,68,0.3); }
  50% { box-shadow: 0 0 35px rgba(255,23,68,0.45); border-color: rgba(255,23,68,0.6); }
}

.logout-icon i {
  font-size: 36px;
  color: var(--danger-red);
}

.logout-card h2 {
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  font-family: 'Outfit', 'Inter', 'Segoe UI', sans-serif;
}

.logout-card p {
  color: var(--text-primary);
  font-size: 15px;
  margin-bottom: 6px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

.logout-card .logout-sub {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 24px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* ===== PRINT STYLES ===== */
@media print {
  body * {
    visibility: hidden;
  }
  #print-area, #print-area * {
    visibility: visible;
  }
  #print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
  }
  
  /* Reset page margins for printing labels */
  @page { margin: 0; }
  
  .barcode-label {
    background: #fff;
    color: #000;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    page-break-after: always;
    font-family: sans-serif;
  }
  
  .label-100x50 {
    width: 100mm;
    height: 50mm;
    padding: 2mm;
  }
  
  .label-100x100 {
    width: 100mm;
    height: 100mm;
    padding: 5mm;
  }

  .label-title {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2px;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .label-item {
    font-size: 16px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 2px;
  }
  
  .label-date {
    font-size: 10px;
    margin-bottom: 4px;
  }
  
  .barcode-svg {
    max-width: 100%;
    height: auto;
  }
}
\n
@media (max-width: 768px) {
  .admin-layout, .driver-layout {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }
  .admin-sidebar {
    width: 100% !important;
    max-height: 40vh;
    overflow-y: auto;
    flex-shrink: 0;
  }
  .admin-main {
    height: 60vh;
    width: 100%;
    flex-shrink: 0;
    min-height: 400px;
  }
  .map-container {
    min-height: 350px;
  }
  .driver-map-area {
    height: 50vh;
    width: 100%;
    min-height: 350px;
  }
  .login-card {
    width: 90%;
    padding: 20px;
  }
  .app-header {
    flex-direction: column;
    height: auto;
    padding: 10px;
    gap: 10px;
  }
  .header-center {
    display: none;
  }
  .admin-grid {
    display: flex;
    flex-direction: column;
    height: auto;
  }
}

@media (max-width: 768px) {
  body {
    overflow: auto !important;
    height: auto !important;
  }
  .admin-layout, .driver-layout {
    height: auto !important;
    overflow: visible !important;
  }
}
