/* ── Proměnné ──────────────────────────────────────────────── */
:root {
  --sidebar-width: 240px;
  --sidebar-bg: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-hover: #334155;
  --sidebar-active: #3b82f6;
  --brand-blue: #3b82f6;
  --body-bg: #f1f5f9;
  --card-radius: 0.75rem;
}

/* ── Základní layout ────────────────────────────────────────── */
body {
  background: var(--body-bg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.ap-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
  flex-shrink: 0;
}

.ap-sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 0.5rem;
}

.ap-nav {
  padding: 0.25rem 0.75rem;
}

.ap-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}
.ap-nav-item:hover  { background: var(--sidebar-hover); color: #e2e8f0; }
.ap-nav-item.active { background: var(--sidebar-active); color: #fff; }
.ap-nav-item .bi    { font-size: 1rem; flex-shrink: 0; }

.ap-sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ap-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  overflow: hidden;
}
.ap-user-name  { font-size: 0.8rem; color: #e2e8f0; font-weight: 600; }
.ap-user-role  { font-size: 0.7rem; color: var(--sidebar-text); }
.ap-logout     { color: var(--sidebar-text); font-size: 1.1rem; text-decoration: none; transition: color .15s; }
.ap-logout:hover { color: #ef4444; }

/* ── Avatar ─────────────────────────────────────────────────── */
.ap-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.ap-avatar-sm {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem; flex-shrink: 0;
}

/* ── Hlavní obsah ───────────────────────────────────────────── */
.ap-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}
.ap-content {
  padding: 1.75rem 1.75rem;
  max-width: 1400px;
}

/* ── Karty ──────────────────────────────────────────────────── */
.card {
  border-radius: var(--card-radius);
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card-header {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
  font-weight: 600;
  font-size: 0.875rem;
  padding: .75rem 1rem;
}

/* ── Statistické karty ──────────────────────────────────────── */
.ap-stat-card { border-radius: var(--card-radius); }
.ap-stat-icon { font-size: 1.6rem; margin-bottom: .25rem; }
.ap-stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.ap-stat-label { font-size: .78rem; color: #64748b; margin-top: .2rem; }

/* ── Vozidlové karty ────────────────────────────────────────── */
.ap-vehicle-card {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  border-radius: var(--card-radius);
}
.ap-vehicle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.ap-status-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}
.ap-status-green { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.ap-status-amber { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.ap-status-red   { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.2); }

/* ── Tabulky ────────────────────────────────────────────────── */
.ap-table { font-size: 0.875rem; }
.ap-table th { font-weight: 600; color: #475569; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.ap-table td, .ap-table th { padding: .6rem .875rem; vertical-align: middle; }

/* ── Login ──────────────────────────────────────────────────── */
.ap-login-body {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.ap-login-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.ap-login-logo {
  font-size: 3rem;
  color: var(--brand-blue);
  text-align: center;
  margin-bottom: .5rem;
}
.ap-login-title { text-align: center; font-size: 1.5rem; font-weight: 700; margin: 0; }
.ap-login-sub   { text-align: center; color: #64748b; margin-bottom: 1.5rem; font-size: .875rem; }

/* ── Badges border variants ─────────────────────────────────── */
.border-green  { border-color: #22c55e !important; }
.border-amber  { border-color: #f59e0b !important; }
.border-red    { border-color: #ef4444 !important; }

/* ── Responsive: mobile sidebar ────────────────────────────── */
@media (max-width: 768px) {
  .ap-sidebar {
    transform: translateX(-100%);
    transition: transform .25s;
    z-index: 200;
  }
  .ap-sidebar.open { transform: translateX(0); }
  .ap-main { margin-left: 0; }
  .ap-content { padding: 1rem; }
}
