/* ============================================
   SIEM - Sistema de Trazabilidad OT
   Design System & Global Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-glow: rgba(37, 99, 235, 0.3);
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --info: #6366f1;

  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #263348;
  --bg-input: #0f172a;
  --bg-surface: #334155;
  --border: #334155;
  --border-light: #475569;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Animated Background --- */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* --- Layout --- */
.app-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* --- Header / Navbar --- */
.navbar {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.navbar-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-station {
  background: var(--primary);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.btn-logout {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.btn-logout:hover {
  background: var(--danger);
  color: white;
}

/* --- Cards --- */
.card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.card-header {
  margin-bottom: 24px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--primary-glow);
}

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

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--primary-light);
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.15rem;
  border-radius: var(--radius-lg);
}

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 4px;
  transition: var(--transition);
  -webkit-user-select: none;
  user-select: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input.is-valid {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
}

.form-error.visible { display: block; }

/* --- Virtual Keyboard (Shared) --- */
.vk-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  display: none;
  flex-direction: column;
  align-items: center;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vk-overlay.vk-visible {
  transform: translateY(0);
}

@keyframes vkSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.vk-container {
  width: 100%;
  max-width: 600px;
  background: rgba(30, 41, 59, 0.98);
  border-top: 1px solid var(--border-light);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 12px 16px 20px;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
}

.vk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}

.vk-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vk-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.vk-close:active, .vk-close.vk-key-active {
  background: var(--danger);
  color: white;
}

.vk-keys { width: 100%; }
.vk-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  justify-content: center;
}

/* Numeric keys */
.vk-numeric .vk-row { justify-content: center; }
.vk-numeric .vk-key {
  width: 80px;
  height: 60px;
}

/* Alpha keys */
.vk-alpha .vk-key {
  flex: 1;
  min-width: 0;
  height: 48px;
  max-width: 52px;
}

/* Base key style */
.vk-key {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.1s, transform 0.1s;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.vk-key-alpha {
  font-size: 1.05rem;
}

.vk-key:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-light);
}

.vk-key.vk-key-active,
.vk-key:active {
  transform: scale(0.93);
  background: var(--primary);
  color: white;
}

.vk-key-clear {
  background: var(--danger-bg) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: var(--danger) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
}

.vk-key-clear.vk-key-active,
.vk-key-clear:active {
  background: var(--danger) !important;
  color: white !important;
}

.vk-key-backspace {
  background: var(--warning-bg) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: var(--warning) !important;
  font-size: 1.1rem !important;
}

.vk-key-backspace.vk-key-active,
.vk-key-backspace:active {
  background: var(--warning) !important;
  color: white !important;
}

.vk-key-accept {
  background: linear-gradient(135deg, var(--success), #059669) !important;
  border-color: var(--success) !important;
  color: white !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
}

.vk-key-accept.vk-key-active,
.vk-key-accept:active {
  filter: brightness(0.85);
}

.vk-key-wide {
  flex: 1.5 !important;
  max-width: none !important;
}

.vk-key-full {
  width: 100% !important;
  max-width: none !important;
  height: 50px !important;
  font-size: 1rem !important;
  letter-spacing: 1px;
}

/* Focused input styling */
.form-input.vk-focused {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Operator number select */
.operario-select {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 2px;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.operario-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.operario-select option {
  background: var(--bg-dark);
  color: var(--text-primary);
}

/* Clinica input styling */
.form-input.clinica-input {
  text-transform: uppercase;
  letter-spacing: 3px;
  cursor: pointer;
}

/* OT preview */
.ot-preview {
  text-align: center;
  padding: 16px;
  margin: 16px 0;
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(6,182,212,0.1));
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: var(--radius-md);
}

.ot-preview-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.ot-preview-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 3px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Inter', monospace;
}

/* ─── Active-field indicator (floats above keyboard) ─── */
.vk-field-indicator {
  width: 100%;
  max-width: 600px;
  background: linear-gradient(135deg, rgba(37,99,235,0.25), rgba(6,182,212,0.18));
  border: 1px solid rgba(37,99,235,0.4);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  backdrop-filter: blur(16px);
}

.vk-field-indicator .vk-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.vk-field-indicator .vk-field-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 3px;
  text-align: right;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 1.3em;
}

.vk-field-indicator .vk-field-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--primary-light);
  margin-left: 2px;
  animation: vkCursorBlink 1s step-end infinite;
  vertical-align: middle;
}

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

/* ─── Field step dots (progress through fields) ─── */
.vk-field-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 20px 2px;
  width: 100%;
  max-width: 600px;
}

.vk-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
}

.vk-step-dot.active {
  background: var(--primary-light);
  box-shadow: 0 0 8px var(--primary-glow);
  width: 24px;
  border-radius: 4px;
}

.vk-step-dot.completed {
  background: var(--success);
}

/* Add bottom padding when keyboard is open so user can scroll content above it */
body.vk-open {
  padding-bottom: 420px;
}

/* Smooth scroll for the entire page when keyboard is active */
body.vk-open .main-content {
  scroll-behavior: smooth;
}

/* --- Diferencias Toggle --- */
.toggle-group {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.toggle-btn {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-btn.active-yes {
  border-color: var(--warning);
  background: var(--warning-bg);
  color: var(--warning);
}

.toggle-btn.active-no {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

/* --- Status Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-recepcion { background: rgba(99,102,241,0.15); color: #818cf8; }
.badge-prelavado { background: rgba(6,182,212,0.15); color: #22d3ee; }
.badge-lavado { background: rgba(37,99,235,0.15); color: #60a5fa; }
.badge-secado { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-esterilizacion { background: rgba(168,85,247,0.15); color: #c084fc; }
.badge-almacenamiento { background: rgba(16,185,129,0.15); color: #34d399; }

/* --- Process Timeline --- */
.process-timeline {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px 0;
  overflow-x: auto;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 80px;
}

.process-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: var(--transition);
}

.process-dot.completed {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.process-dot.current {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 12px var(--primary-glow);
  animation: pulse 2s infinite;
}

.process-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 20px;
}

.process-line.completed { background: var(--success); }

.process-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

/* --- Login Page --- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.login-logo h1 {
  font-size: 1.8rem;
  font-weight: 800;
}

.login-logo p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* --- Station Selector --- */
.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.station-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.station-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--primary-glow);
}

.station-card .station-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.station-card .station-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.station-card .station-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* --- Dashboard Stats --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 4px;
}

/* --- Table --- */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--bg-surface);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.data-table tr:hover td {
  background: rgba(37, 99, 235, 0.05);
}

/* --- Alerts / Toasts --- */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  z-index: 9999;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 400px;
}

.toast.show { transform: translateX(0); }

.toast-success {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.toast-error {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.toast-warning {
  background: var(--warning);
  color: #1e293b;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  transform: scale(0.9);
  transition: var(--transition);
}

.modal-overlay.active .modal { transform: scale(1); }

/* --- Animations --- */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 12px var(--primary-glow); }
  50% { box-shadow: 0 0 24px var(--primary-glow); }
}

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

.fade-in { animation: fadeIn 0.5s ease-out; }

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

.slide-up { animation: slideUp 0.6s ease-out; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .main-content { padding: 16px; }
  .card { padding: 20px; }
  .navbar { padding: 12px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .station-grid { grid-template-columns: repeat(2, 1fr); }
  .keypad-btn { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .station-grid { grid-template-columns: 1fr; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* --- Selection --- */
::selection {
  background: var(--primary);
  color: white;
}
