/* ============================================================
   Milkollen – Isblå tema, mobil-first
   Typografi: Plus Jakarta Sans
   ============================================================ */

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

:root {
  --bg:           #F0F7FF;
  --surface:      #FFFFFF;
  --surface2:     #E8F3FF;
  --border:       #C5DEFF;
  --border-sm:    #DCEEFF;

  --text:         #0A1628;
  --text-2:       #2A4060;
  --text-muted:   #4A6080;
  --text-dim:     #8AAAC8;

  --primary:      #0077CC;
  --primary-dark: #005FA3;
  --primary-light:#E0F0FF;
  --primary-glow: rgba(0,119,204,0.13);

  --sidebar-bg:     #0A2A4A;
  --sidebar-border: rgba(255,255,255,0.07);
  --sidebar-text:   #7AADD4;
  --sidebar-active: #4A9FE0;

  --success:    #0A7A3C;
  --success-bg: rgba(10,122,60,0.09);
  --warning:    #B86800;
  --warning-bg: rgba(184,104,0,0.09);
  --danger:     #C0302A;
  --danger-bg:  rgba(192,48,42,0.09);

  --font:       'Plus Jakarta Sans', sans-serif;
  --r:          10px;
  --r-lg:       14px;
  --r-xl:       20px;
  --shadow:     0 1px 4px rgba(0,60,120,0.07), 0 2px 8px rgba(0,60,120,0.04);
  --shadow-lg:  0 4px 24px rgba(0,60,120,0.10);

  --sidebar-w:  240px;
  --bottom-nav: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden; /* förhindra horisontell scroll */
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app-layout {
  display: flex;
  flex: 1;
  width: 100%;
  max-width: 100vw;
}

.main-content {
  flex: 1;
  min-width: 0; /* kritiskt – förhindrar flex-barn från att expandera förbi förälder */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: var(--bottom-nav);
  max-width: 100%;
}

/* ============================================================
   DESKTOP SIDEBAR (visas bara >= 768px)
   ============================================================ */
.sidebar {
  display: none;
}

@media (min-width: 768px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
    border-right: 1px solid var(--sidebar-border);
  }

  .main-content {
    margin-left: var(--sidebar-w);
    padding-bottom: 0;
  }

  .bottom-nav { display: none !important; }
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.sidebar-brand {
  padding: 1.25rem;
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-logo {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none;
}

.brand-icon { width: 36px; height: 36px; flex-shrink: 0; }

.brand-name {
  font-size: 1.1rem; font-weight: 800;
  color: #fff; letter-spacing: -0.02em; display: block;
}
.brand-sub {
  font-size: 0.6rem; color: var(--sidebar-text);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.09em; display: block;
}

.sidebar-user {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex; align-items: center; gap: 0.6rem;
}

.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: white; flex-shrink: 0;
}
.user-name {
  font-size: 0.82rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.user-company {
  font-size: 0.68rem; color: var(--sidebar-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}

.role-badge {
  display: inline-block; padding: 1px 7px; border-radius: 20px;
  font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px;
}
.role-sysadmin      { background: rgba(192,48,42,0.2);  color: #FF8080; }
.role-company_admin { background: rgba(184,104,0,0.2);  color: #FFBA50; }
.role-user          { background: rgba(0,119,204,0.25); color: var(--sidebar-active); }

.sidebar-nav { flex: 1; padding: 0.5rem 0; }

.nav-section {
  padding: 0.75rem 1.25rem 0.25rem;
  font-size: 0.58rem; font-weight: 700;
  color: rgba(255,255,255,0.22);
  text-transform: uppercase; letter-spacing: 0.12em;
}

.nav-link {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 1.25rem;
  color: var(--sidebar-text);
  text-decoration: none; font-size: 0.855rem; font-weight: 500;
  transition: all 0.12s; border-left: 3px solid transparent;
}
.nav-link:hover  { color: #fff; background: rgba(255,255,255,0.06); border-left-color: rgba(74,159,224,0.4); }
.nav-link.active { color: #fff; background: rgba(74,159,224,0.12); border-left-color: var(--sidebar-active); font-weight: 600; }

.nav-icon { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.7; }
.nav-link.active .nav-icon, .nav-link:hover .nav-icon { opacity: 1; }

.sidebar-bottom {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--sidebar-border);
}
.logout-link {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--sidebar-text); text-decoration: none;
  font-size: 0.82rem; font-weight: 500;
  transition: color 0.12s;
}
.logout-link:hover { color: #FF8080; }

/* ============================================================
   BOTTOM NAVIGATION (mobil)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,60,120,0.08);
}

.bottom-nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.62rem; font-weight: 600;
  transition: color 0.12s;
  padding: 8px 4px;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item:active  { background: var(--primary-light); }

.bottom-nav-item svg { width: 22px; height: 22px; }

/* Stor mittknapp – starta resa */
.bottom-nav-cta {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-cta-inner {
  width: 52px; height: 52px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(0,119,204,0.4);
  margin-bottom: 2px;
}
.bottom-nav-cta-inner svg { width: 24px; height: 24px; color: white; }
.bottom-nav-cta span { font-size: 0.6rem; font-weight: 700; color: var(--primary); }

/* ============================================================
   PÅGÅENDE RESA BANNER
   ============================================================ */
.ongoing-banner {
  background: #FFF8EC;
  border-bottom: 2px solid var(--warning);
  padding: 0.65rem 1rem;
  display: flex; align-items: center;
  justify-content: space-between; gap: 0.75rem;
}
.ongoing-banner-warning {
  background: #FFF0EE;
  border-bottom-color: var(--danger);
}
.ongoing-banner-warning .ongoing-dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(192,48,42,0.2); }
.ongoing-banner-warning .ongoing-text { color: var(--danger); }
.ongoing-banner-warning .ongoing-meta { color: var(--danger); opacity: 0.8; }
.ongoing-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--warning); flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(184,104,0,0.2);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(184,104,0,0.2); }
  50%      { box-shadow: 0 0 0 6px rgba(184,104,0,0); }
}
.ongoing-text {
  flex: 1; font-size: 0.8rem; font-weight: 600;
  color: var(--warning); min-width: 0;
}
.ongoing-route {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ongoing-meta { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }

/* ============================================================
   SIDHUVUD
   ============================================================ */
.page-header {
  padding: 1.1rem 1rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border-sm);
  display: flex; align-items: center;
  justify-content: space-between; gap: 0.75rem;
  flex-wrap: wrap; /* wrap på liten skärm */
  width: 100%;
}
.page-title {
  font-size: 1.2rem; font-weight: 800;
  letter-spacing: -0.025em; color: var(--text);
}
.page-subtitle { color: var(--text-muted); font-size: 0.8rem; }

.page-body {
  padding: 1rem;
  flex: 1;
  width: 100%;
  min-width: 0;
}

@media (min-width: 768px) {
  .page-header { padding: 1.4rem 2rem; }
  .page-body   { padding: 1.5rem 2rem; }
  .page-title  { font-size: 1.35rem; }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card-body   { padding: 1rem; }
.card-padded { padding: 1.1rem; }
.card-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-sm);
}
.card-title { font-size: 0.875rem; font-weight: 700; color: var(--text); }

/* ============================================================
   STATS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* minmax(0,1fr) förhindrar overflow */
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--sidebar-active));
}
.stat-label {
  font-size: 0.65rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.09em; font-weight: 700;
}
.stat-value {
  font-size: 1.75rem; font-weight: 800;
  color: var(--text); line-height: 1.1; margin-top: 0.3rem;
  letter-spacing: -0.03em;
}
.stat-unit { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

/* ============================================================
   SNABBÅTGÄRDER (dashboard)
   ============================================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.quick-action {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem 0.875rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.1s, box-shadow 0.12s, border-color 0.12s;
  -webkit-tap-highlight-color: transparent;
  min-height: 100px;
}
.quick-action:active { transform: scale(0.96); }

.quick-action svg { flex-shrink: 0; }

.quick-action.qa-start  { border-top: 4px solid var(--success); }
.quick-action.qa-new    { border-top: 4px solid var(--primary); }
.quick-action.qa-vehicle{ border-top: 4px solid var(--warning); }
.quick-action.qa-ongoing{ border-top: 4px solid var(--danger);  }

.quick-action.qa-start  svg { color: var(--success); }
.quick-action.qa-new    svg { color: var(--primary); }
.quick-action.qa-vehicle svg { color: var(--warning); }
.quick-action.qa-ongoing svg { color: var(--danger); }

.quick-action:hover { box-shadow: var(--shadow-lg); }

.qa-label { font-size: 0.875rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.qa-desc  { font-size: 0.72rem; color: var(--text-muted); line-height: 1.3; }

/* ============================================================
   RESELISTA
   ============================================================ */
.trip-list { display: flex; flex-direction: column; }

.trip-item {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-sm);
}
.trip-item:last-child { border-bottom: none; }

.trip-row1 { display: flex; align-items: center; gap: 0.75rem; }

.trip-date-pill {
  min-width: 38px; text-align: center; flex-shrink: 0;
}
.trip-day { font-weight: 800; font-size: 1.1rem; color: var(--text); line-height: 1; }
.trip-mon { font-size: 0.65rem; text-transform: uppercase; color: var(--text-muted); font-weight: 600; letter-spacing: 0.05em; }

.trip-info { flex: 1; min-width: 0; }
.trip-route {
  font-weight: 600; font-size: 0.875rem; color: var(--text);
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.trip-route .arrow { color: var(--primary); margin: 0 0.25rem; }
.trip-meta { font-size: 0.7rem; color: var(--text-muted); }

.trip-km { font-weight: 800; font-size: 1rem; color: var(--primary); text-align: right; white-space: nowrap; }
.trip-km-unit { font-size: 0.65rem; color: var(--text-muted); font-weight: 500; }

.trip-row2 {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-sm);
}
.trip-purpose {
  font-size: 0.72rem; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; margin-right: 0.5rem;
}

.summary-bar {
  display: flex; justify-content: space-between;
  padding: 0.75rem 1rem;
  font-size: 0.78rem; color: var(--text-muted);
  border-top: 1px solid var(--border-sm);
}
.summary-total { font-weight: 700; color: var(--primary); }

/* ============================================================
   FILTER
   ============================================================ */
.filter-scroll {
  padding: 0.75rem 1rem 0.25rem;
  display: flex; gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100vw;
}
.filter-scroll::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px; font-size: 0.78rem; font-weight: 600;
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--text-muted); white-space: nowrap; cursor: pointer;
  text-decoration: none; flex-shrink: 0;
  transition: all 0.12s;
}
.filter-chip:hover, .filter-chip.active {
  border-color: var(--primary); color: var(--primary); background: var(--primary-light);
}
.filter-chip.has-filter { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.filter-chip.danger     { border-color: var(--danger);  color: var(--danger);  background: var(--danger-bg); }

.filter-panel {
  display: none; padding: 1rem;
  background: var(--surface); border-bottom: 1px solid var(--border-sm);
}
.filter-panel.open { display: block; }

.filter-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem;
}

.filter-label {
  font-size: 0.65rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.07em; display: block; margin-bottom: 0.3rem;
}

/* ============================================================
   FORMULÄR
   ============================================================ */
.form-section { margin-bottom: 1.25rem; }
.form-section-title {
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-muted); margin-bottom: 0.75rem;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--border-sm);
}
.form-group { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.875rem; }
.form-group:last-child { margin-bottom: 0; }

label { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.required::after { content: ' *'; color: var(--danger); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="date"],
select,
textarea {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  padding: 0.65rem 0.875rem;
  font-family: var(--font);
  font-size: 16px; /* 16px förhindrar iOS auto-zoom vid fokus */
  width: 100%;
  max-width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
textarea { resize: vertical; min-height: 80px; }

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

.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (max-width: 360px) { .row-2 { grid-template-columns: 1fr; } }

/* ============================================================
   KNAPPAR
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--r); font-family: var(--font);
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: all 0.13s; white-space: nowrap; line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--primary); color: white; box-shadow: 0 1px 3px rgba(0,119,204,0.3); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-success { background: var(--success-bg); color: var(--success); border: 1.5px solid rgba(10,122,60,0.2); }
.btn-success:hover { background: rgba(10,122,60,0.15); }

.btn-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1.5px solid rgba(192,48,42,0.15); }
.btn-danger:hover  { background: rgba(192,48,42,0.15); }

.btn-warning { background: var(--warning-bg); color: var(--warning); border: 1.5px solid rgba(184,104,0,0.2); }
.btn-warning:hover { background: rgba(184,104,0,0.15); }

.btn-ghost   { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); border-color: var(--primary); }

.btn-sm  { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
.btn-lg  { padding: 0.75rem 1.5rem; font-size: 0.95rem; min-height: 48px; }
.btn-full { width: 100%; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 700;
}
.badge-ongoing   { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(184,104,0,0.2); }
.badge-completed { background: var(--success-bg); color: var(--success); border: 1px solid rgba(10,122,60,0.2); }
.badge-inactive  { background: var(--surface2);   color: var(--text-dim); border: 1px solid var(--border); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--r); font-size: 0.855rem;
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin-bottom: 0.875rem; line-height: 1.5;
}
.alert-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.alert-error   { background: var(--danger-bg);    border: 1px solid rgba(192,48,42,0.2); color: var(--danger); }
.alert-success { background: var(--success-bg);   border: 1px solid rgba(10,122,60,0.2); color: var(--success); }
.alert-info    { background: var(--primary-light); border: 1px solid rgba(0,119,204,0.2); color: var(--primary-dark); }
.alert-warning { background: var(--warning-bg);   border: 1px solid rgba(184,104,0,0.2); color: var(--warning); }

/* ============================================================
   INLOGGNING
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #E4F0FF 0%, #F5F9FF 60%, #EEF6FF 100%);
  padding: 1.5rem;
}
.login-box { width: 100%; max-width: 400px; }
.login-header { text-align: center; margin-bottom: 1.75rem; }
.login-logo {
  display: inline-flex; align-items: center; gap: 10px;
  background: white; border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 18px;
  box-shadow: var(--shadow-lg); margin-bottom: 1.1rem;
}
.login-app-name  { font-size: 1.15rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; display: block; }
.login-app-sub   { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.09em; font-weight: 600; }
.login-title     { font-size: 1.4rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.login-subtitle  { color: var(--text-muted); font-size: 0.855rem; margin-top: 0.25rem; }
.login-form      { background: white; border: 1px solid var(--border); border-radius: var(--r-xl); padding: 1.75rem; box-shadow: var(--shadow-lg); }
.remember-row    { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--text-muted); margin-top: 0.5rem; cursor: pointer; }
.remember-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-icon  { margin-bottom: 0.75rem; opacity: 0.4; }
.empty-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.empty-text  { font-size: 0.855rem; color: var(--text-muted); margin-bottom: 1.25rem; }

/* ============================================================
   PROFIL / ADMIN
   ============================================================ */
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 0; border-bottom: 1px solid var(--border-sm);
  font-size: 0.855rem;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); }
.info-value { font-weight: 600; color: var(--text); }

/* Fordon */
.vehicle-row {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.875rem 1rem; border-bottom: 1px solid var(--border-sm);
}
.vehicle-row:last-child { border-bottom: none; }
.vehicle-icon {
  width: 42px; height: 42px; border-radius: var(--r);
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vehicle-reg { font-weight: 700; letter-spacing: 0.06em; font-size: 0.95rem; }
.vehicle-desc { font-size: 0.75rem; color: var(--text-muted); }

/* Admin tabeller */
.table-wrap {
  overflow-x: auto; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: 0.855rem; }
thead { background: var(--surface2); border-bottom: 1px solid var(--border); }
th {
  padding: 0.75rem 1rem; text-align: left;
  font-weight: 700; font-size: 0.65rem;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-muted); white-space: nowrap;
}
td {
  padding: 0.875rem 1rem; border-bottom: 1px solid var(--border-sm);
  color: var(--text); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--primary-light); }

/* ============================================================
   UTILS
   ============================================================ */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.mt-1 { margin-top: 0.5rem; }  .mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); } .text-sm { font-size: 0.78rem; }
.text-center { text-align: center; }

/* ============================================================
   MOBIL TOPBAR
   ============================================================ */
.mobile-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--sidebar-bg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 90;
}
.mobile-topbar .brand-logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; flex-shrink: 0;
}
.mobile-topbar .brand-icon { width: 26px; height: 26px; }
.mobile-topbar .brand-name { font-size: 0.95rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.mobile-topbar-user {
  flex: 1; min-width: 0; text-align: right;
}
.mobile-topbar-name {
  font-size: 0.875rem; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mobile-topbar-date {
  font-size: 0.68rem; color: rgba(255,255,255,0.55); margin-top: 1px;
}

@media (min-width: 768px) {
  .mobile-topbar { display: none; }
}
