/* ═══════════════════════════════════════════════════════════
   MotoTrip Admin — Design System
   Dark theme : #0D0F14 / #1C2030 / #FF6B00
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg-primary:     #0D0F14;
  --bg-component:   #1C2030;
  --bg-hover:       #242840;
  --accent:         #FF6B00;
  --accent-hover:   #E05A00;
  --accent-dim:     rgba(255, 107, 0, 0.15);
  --text-primary:   #F0F0F0;
  --text-secondary: #9AA0AB;
  --text-muted:     #5A6070;
  --separator:      #2A2D3A;
  --success:        #2ECC71;
  --danger:         #E74C3C;
  --warning:        #F1C40F;
  --info:           #3498DB;
  --online:         #2ECC71;
  --offline:        #5A6070;

  --radius-card:   16px;
  --radius-btn:    12px;
  --radius-input:  10px;
  --radius-small:  8px;

  --shadow-dark:   0 4px 24px rgba(0,0,0,0.5);
  --shadow-medium: 0 2px 12px rgba(0,0,0,0.35);
  --shadow-small:  0 1px 6px rgba(0,0,0,0.25);

  --sidebar-w: 240px;
  --transition: 250ms ease-out;

  --font-mono: 'Roboto Mono', 'SF Mono', 'Fira Code', monospace;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

/* ── Layout global ──────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 60px;
  background: var(--bg-component);
  border-bottom: 1px solid var(--separator);
  box-shadow: var(--shadow-small);
  z-index: 100;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
}

.topbar-logo .logo-icon {
  font-size: 1.4rem;
}

.topbar-logo span {
  color: var(--accent);
}

.topbar-spacer { flex: 1; }

.topbar-admin {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.topbar-admin strong {
  color: var(--text-primary);
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  background: var(--bg-component);
  border-right: 1px solid var(--separator);
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar-nav { list-style: none; }

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sidebar-nav li a.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-left-color: var(--accent);
}

.sidebar-nav li a .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-section-label {
  padding: 16px 24px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* ── Main content ───────────────────────────────────────────── */
.main-content {
  padding: 32px;
  overflow-y: auto;
}

/* ── Page header ────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.page-header-info { flex: 1; }

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-component);
  border-radius: var(--radius-card);
  border: 1px solid var(--separator);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--separator);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.card-body { padding: 24px; }

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--separator);
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(0,0,0,0.15);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  min-height: 40px;
  user-select: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--separator);
}
.btn-secondary:hover:not(:disabled) {
  background: #2e3248;
  border-color: #3a3e52;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  background: #c0392b;
  border-color: #c0392b;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.btn-success {
  background: var(--success);
  color: #000;
  border-color: var(--success);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  min-height: 32px;
  border-radius: 8px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  min-height: 52px;
}

.btn-icon {
  padding: 10px;
  min-height: 40px;
  min-width: 40px;
  justify-content: center;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  background: var(--bg-primary);
  border: 1px solid var(--separator);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: border-color var(--transition);
  width: 100%;
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239AA0AB' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* ── Badges & status ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-active   { background: rgba(46, 204, 113, 0.15); color: var(--success); }
.badge-inactive { background: rgba(90, 96, 112, 0.2); color: var(--text-muted); }
.badge-online   { background: rgba(46, 204, 113, 0.15); color: var(--success); }
.badge-offline  { background: rgba(90, 96, 112, 0.2); color: var(--text-muted); }
.badge-accent   { background: var(--accent-dim); color: var(--accent); }
.badge-warning  { background: rgba(241, 196, 15, 0.15); color: var(--warning); }
.badge-danger   { background: rgba(231, 76, 60, 0.15); color: var(--danger); }

/* ── Sessions list ──────────────────────────────────────────── */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.session-card {
  background: var(--bg-component);
  border-radius: var(--radius-card);
  border: 1px solid var(--separator);
  transition: all var(--transition);
  cursor: pointer;
  overflow: hidden;
}

.session-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-dark);
  transform: translateY(-2px);
}

.session-card.active {
  border-color: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}

.session-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 12px;
}

.session-card-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.session-card-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  flex: 1;
}

.session-card-meta {
  display: flex;
  gap: 16px;
  padding: 0 20px 12px;
}

.session-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.session-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--separator);
  background: rgba(0,0,0,0.15);
}

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--separator);
  margin-bottom: 28px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Leaflet map overrides ──────────────────────────────────── */
.leaflet-container {
  border-radius: var(--radius-small);
  background: var(--bg-primary);
}

.leaflet-popup-content-wrapper {
  background: var(--bg-component);
  color: var(--text-primary);
  border-radius: var(--radius-small);
  border: 1px solid var(--separator);
}

.leaflet-popup-tip {
  background: var(--bg-component);
}

.leaflet-control-zoom a {
  background: var(--bg-component);
  color: var(--text-primary);
  border-color: var(--separator);
}

.leaflet-control-zoom a:hover {
  background: var(--bg-hover);
}

.leaflet-bar {
  border-color: var(--separator) !important;
}

/* ── GPX section ────────────────────────────────────────────── */
.gpx-map-container {
  height: 420px;
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--separator);
  margin-bottom: 20px;
}

.gpx-stats {
  display: flex;
  gap: 20px;
  padding: 14px 20px;
  background: var(--bg-hover);
  border-radius: var(--radius-small);
  margin-bottom: 20px;
}

.gpx-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gpx-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.gpx-stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.direction-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.direction-option {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-card);
  border: 2px solid var(--separator);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
}

.direction-option:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.direction-option.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.direction-option input[type="radio"] { display: none; }

.direction-option-icon { font-size: 1.5rem; }

.direction-option-info { flex: 1; }

.direction-option-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.direction-option-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Dropzone ───────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--separator);
  border-radius: var(--radius-card);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

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

.dropzone-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.dropzone-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Planning ───────────────────────────────────────────────── */
.days-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.day-card {
  background: var(--bg-component);
  border-radius: var(--radius-card);
  border: 1px solid var(--separator);
  overflow: hidden;
}

.day-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--separator);
}

.day-number {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.day-label-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  padding: 2px 6px;
  border-radius: 6px;
}

.day-label-input:hover { background: var(--bg-hover); }
.day-label-input:focus { background: var(--bg-primary); border: 1px solid var(--accent); }

.day-arrival {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(46, 204, 113, 0.06);
  border-bottom: 1px solid var(--separator);
}

.day-arrival-icon { font-size: 1.1rem; }

.day-arrival-info { flex: 1; }

.day-arrival-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.day-arrival-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Waypoints list */
.waypoints-list {
  list-style: none;
  padding: 12px 0;
  min-height: 40px;
}

.waypoint-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: 0;
  transition: background var(--transition);
}

.waypoint-item:hover { background: var(--bg-hover); }

.drag-handle {
  color: var(--text-muted);
  cursor: grab;
  font-size: 1rem;
  padding: 2px 4px;
}

.drag-handle:active { cursor: grabbing; }

.waypoint-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

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

.waypoint-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waypoint-coords {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.waypoint-actions { display: flex; gap: 4px; }

.day-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--separator);
}

/* Sortable drag placeholder */
.sortable-chosen { background: var(--bg-hover); border-radius: var(--radius-small); }
.sortable-ghost  { opacity: 0.4; }

/* ── Riders ─────────────────────────────────────────────────── */
.riders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.rider-card {
  background: var(--bg-component);
  border-radius: var(--radius-card);
  border: 1px solid var(--separator);
  overflow: hidden;
  transition: all var(--transition);
}

.rider-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-dark);
}

.rider-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 14px;
}

.rider-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid transparent;
}

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

.rider-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.rider-brand {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.rider-card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--separator);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.15);
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Color picker */
.color-picker-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.color-swatch:hover, .color-swatch.selected {
  border-color: #fff;
  transform: scale(1.15);
}

/* ── QR Code ────────────────────────────────────────────────── */
.qr-section {
  text-align: center;
  padding: 28px;
}

.qr-image {
  background: #fff;
  padding: 12px;
  border-radius: var(--radius-card);
  display: inline-block;
  margin-bottom: 14px;
}

.qr-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  word-break: break-all;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 200ms ease-out;
}

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

.modal {
  background: var(--bg-component);
  border-radius: var(--radius-card);
  border: 1px solid var(--separator);
  box-shadow: var(--shadow-dark);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 200ms ease-out;
}

.modal-lg { max-width: 780px; }

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

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--separator);
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--separator);
}

/* Mini-map in modal */
.mini-map {
  height: 260px;
  border-radius: var(--radius-small);
  border: 1px solid var(--separator);
  overflow: hidden;
  margin-bottom: 14px;
}

/* ── Toast notifications ────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-card);
  border: 1px solid var(--separator);
  background: var(--bg-component);
  box-shadow: var(--shadow-dark);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 280px;
  max-width: 420px;
  pointer-events: all;
  animation: toastIn 250ms ease-out;
}

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

.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info    { border-left: 4px solid var(--info); }

.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-msg  { flex: 1; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
}

/* ── Loading / Spinner ──────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--separator);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 20, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.6; }
.empty-state-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state-desc { font-size: 0.88rem; margin-bottom: 24px; }

/* ── Login page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(255,107,0,0.05) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(52,152,219,0.04) 0%, transparent 60%);
}

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

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

.login-logo-icon { font-size: 3rem; display: block; margin-bottom: 8px; }

.login-logo-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.login-logo-title span { color: var(--accent); }

.login-logo-url {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-error {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid var(--danger);
  border-radius: var(--radius-small);
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--danger);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Utility ────────────────────────────────────────────────── */
.d-flex      { display: flex; }
.d-grid      { display: grid; }
.align-center { align-items: center; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.gap-16      { gap: 16px; }
.gap-20      { gap: 20px; }
.flex-1      { flex: 1; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 0.85rem; }
.text-xs     { font-size: 0.78rem; }
.fw-bold     { font-weight: 700; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mt-20       { margin-top: 20px; }
.mb-8        { margin-bottom: 8px; }
.mb-16       { margin-bottom: 16px; }
.mb-20       { margin-bottom: 20px; }
.mb-28       { margin-bottom: 28px; }
.mono        { font-family: var(--font-mono); }
.truncate    { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--separator); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
