/* ==========================================================
   Vehicle Tracker theme
   ========================================================== */

:root {
  --brand: #2563eb;
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #f4f7fb;
  --border: #e6ecf5;
  --radius: 1rem;
  --radius-lg: 1.4rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .05);
  --shadow: 0 4px 10px rgba(15, 23, 42, .06), 0 14px 30px rgba(15, 23, 42, .09);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .16);
  --grad-brand: linear-gradient(135deg, #3b82f6, #1d4ed8);
  --grad-accent: linear-gradient(135deg, #fbbf24, #f59e0b);
  --grad-ink: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 420px at 92% -8%, rgba(37, 99, 235, .10), transparent 60%),
    radial-gradient(900px 400px at -8% 2%, rgba(245, 158, 11, .09), transparent 55%),
    var(--bg);
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -.015em; }
::selection { background: rgba(37, 99, 235, .16); }

/* ---------- Navbar ---------- */

.navbar {
  background: var(--grad-ink) !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .22);
  padding-top: .75rem;
  padding-bottom: .75rem;
}
.navbar .nav-link {
  color: rgba(255, 255, 255, .72);
  font-weight: 500;
  border-radius: .6rem;
  padding: .45rem .85rem;
  transition: color .15s ease, background-color .15s ease;
}
.navbar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.navbar .nav-link.active { color: #fff; background: rgba(255, 255, 255, .14); }
.navbar .dropdown-menu { border: 0; border-radius: .8rem; box-shadow: var(--shadow); }
.navbar .dropdown-item { border-radius: .5rem; padding: .5rem .9rem; font-weight: 500; }
.navbar .dropdown-item:hover { background: #eef4ff; color: var(--brand); }

.brand-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--grad-accent); color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 8px 18px rgba(245, 158, 11, .35);
  flex: 0 0 auto;
}
.brand-logo-sm { width: 30px; height: 30px; font-size: .85rem; border-radius: 9px; }
.auth-logo { width: 64px; height: 64px; font-size: 1.7rem; border-radius: 20px; box-shadow: 0 14px 30px rgba(245, 158, 11, .4); }

/* ---------- Page heading ---------- */

.page-heading { margin-bottom: 1.4rem; padding-bottom: .9rem; border-bottom: 1px dashed #d6e0ee; }
.page-heading h1 { font-weight: 800; }

/* ---------- Cards ---------- */

.card {
  --bs-card-border-radius: var(--radius);
  --bs-card-border-color: var(--border);
  --bs-card-inner-border-radius: calc(var(--radius) - 1px);
  --bs-card-cap-bg: #f8fafc;
  border-width: 1px;
  box-shadow: var(--shadow-sm);
}
.card-header { font-weight: 700; }
.card-header.bg-primary { background: var(--grad-brand) !important; border: 0; color: #fff; }
.card-header.bg-info { background: linear-gradient(135deg, #06b6d4, #0e7490) !important; border: 0; color: #fff; }
.card-hover { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3e0f4; }

/* ---------- Hero banner ---------- */

.hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #eef4ff 100%);
  border: 1px solid #dbe6fb;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(420px 160px at 92% 0%, rgba(37, 99, 235, .08), transparent 60%),
    radial-gradient(320px 140px at 2% 120%, rgba(245, 158, 11, .10), transparent 60%);
  pointer-events: none;
}
.hero-card .card-body { position: relative; z-index: 1; }
.hero-card h1, .hero-card .h1 { color: var(--ink); }

/* ---------- Stat cards ---------- */

.stat-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.25rem; flex: 0 0 auto;
  box-shadow: 0 8px 16px rgba(15, 23, 42, .18);
}
.stat-icon.blue  { background: var(--grad-brand); }
.stat-icon.amber { background: var(--grad-accent); }
.stat-icon.cyan  { background: linear-gradient(135deg, #06b6d4, #0e7490); }
.stat-icon.green { background: linear-gradient(135deg, #22c55e, #15803d); }
.stat-value { font-weight: 800; font-size: 1.75rem; letter-spacing: -.03em; line-height: 1.15; }

/* ---------- Vehicle / entity tiles ---------- */

.vehicle-tile {
  width: 56px; height: 56px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem; flex: 0 0 auto;
  box-shadow: 0 8px 16px rgba(15, 23, 42, .18);
}
.vehicle-tile.lg { width: 68px; height: 68px; font-size: 1.7rem; border-radius: 20px; }
.grad-1 { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.grad-2 { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.grad-3 { background: linear-gradient(135deg, #10b981, #059669); }
.grad-4 { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.grad-5 { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.grad-6 { background: linear-gradient(135deg, #f43f5e, #be123c); }

/* ---------- Buttons ---------- */

.btn { border-radius: .65rem; font-weight: 600; }
.btn-primary { background: var(--grad-brand); border: 0; box-shadow: 0 4px 12px rgba(37, 99, 235, .28); }
.btn-primary:hover, .btn-primary:focus { background: var(--grad-brand); filter: brightness(1.07); }
.btn-pill { border-radius: 50rem; padding: .6rem 1.25rem; }
.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand);
  --bs-btn-active-border-color: var(--brand);
}
.btn-outline-secondary { --bs-btn-color: #475569; --bs-btn-border-color: #cbd5e1; }

/* ---------- Forms ---------- */

.form-label { font-weight: 600; font-size: .85rem; color: #334155; }
.form-control, .form-select { border-color: var(--border); border-radius: .65rem; padding: .55rem .85rem; }
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 .22rem rgba(37, 99, 235, .12);
}

/* ---------- Tables ---------- */

.table { --bs-table-color: #334155; }
.table thead th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 700;
  background: #f8fafc; border-bottom: 1px solid var(--border);
}

/* ---------- Tabs ---------- */

.nav-tabs { border-bottom: 1px solid var(--border); gap: .3rem; }
.nav-tabs .nav-link {
  border: 0; color: var(--muted); font-weight: 600;
  border-radius: .7rem .7rem 0 0; padding: .6rem 1.1rem;
}
.nav-tabs .nav-link:hover { color: var(--brand); background: #eef4ff; }
.nav-tabs .nav-link.active {
  color: var(--brand); background: #fff;
  border: 1px solid var(--border); border-bottom-color: #fff;
  box-shadow: inset 0 -3px 0 var(--brand);
}
.tab-content { border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- Modals ---------- */

.modal-content { border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal-header { background: var(--grad-brand); border: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-header h5, .modal-header .h5 { font-weight: 700; }

/* ---------- Badges ---------- */

.badge { border-radius: 50rem; font-weight: 600; letter-spacing: .01em; }

/* ---------- Auth pages ---------- */

.auth-card { border: 0; border-radius: 1.4rem; box-shadow: var(--shadow-lg); }
.auth-input .input-group-text {
  background: #fff; color: var(--muted); border-color: var(--border);
  border-right: 0; border-radius: .65rem 0 0 .65rem;
}
.auth-input .form-control { border-left: 0; border-radius: 0 .65rem .65rem 0; }
.btn-auth {
  border-radius: 50rem; padding: .7rem 1rem; font-weight: 700;
  background: var(--grad-brand); border: 0;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .35);
}
.btn-auth:hover { filter: brightness(1.08); }

/* ---------- Footer ---------- */

.app-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem; padding: 1.75rem 0;
  color: var(--muted);
}

/* ---------- Animation & empty states ---------- */

.fade-up { animation: fadeUp .4s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.empty-icon {
  width: 72px; height: 72px; border-radius: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef2ff; color: var(--brand); font-size: 1.6rem;
  margin-bottom: .75rem;
}