@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

:root {
  --bg: #0a0c10;
  --surface: #111318;
  --surface2: #181c24;
  --border: #252b38;
  --accent: #3b82f6;
  --accent2: #2563eb;
  --text: #e8eaf0;
  --muted: #6b7280;
  --danger: #ef4444;
  --success: #10b981;
  --info: #06b6d4;
  --radius: 12px;
  --radius-lg: 18px;
}

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

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── BACKGROUND TEXTURE ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(59,130,246,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(37,99,235,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4 { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.04em; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 8vw, 4rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 4vw, 1.8rem); }

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }

/* ── LAYOUT ── */
.container { max-width: 520px; margin: 0 auto; padding: 1rem; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 1rem; }

/* ── NAVBAR ── */
.navbar {
  background: rgba(17,19,24,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .875rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.navbar-brand {
  display: flex; align-items: center; gap: .6rem;
}
.navbar-brand .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1.1rem;
}
.brand-name { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: .06em; }
.brand-name span { color: var(--accent); }
.navbar-actions { display: flex; gap: .5rem; align-items: center; }

/* ── HERO ── */
.hero {
  padding: 3rem 1.25rem 2rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.3);
  color: var(--accent);
  font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero h1 { margin-bottom: .5rem; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); max-width: 340px; margin: 0 auto 2rem; font-size: .95rem; }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.card-header {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.25rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0;
}
.card-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; letter-spacing: .04em; }
.card-sub { font-size: .8rem; color: var(--muted); }

/* ── FORMS ── */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: .4rem;
}
.form-control {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  padding: .75rem 1rem;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-control::placeholder { color: var(--muted); }
select.form-control { 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 d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ── ROLE SELECTOR ── */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1rem; }
.role-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem .75rem;
  text-align: center; cursor: pointer;
  transition: all .2s;
  background: var(--surface2);
}
.role-card input[type=radio] { display: none; }
.role-card .role-icon { font-size: 2rem; margin-bottom: .4rem; }
.role-card .role-label { font-family: 'Bebas Neue',sans-serif; font-size: 1.1rem; letter-spacing: .04em; }
.role-card .role-desc { font-size: .72rem; color: var(--muted); margin-top: .2rem; }
.role-card:has(input:checked), .role-card.selected {
  border-color: var(--accent);
  background: rgba(59,130,246,.08);
}
.role-card:hover { border-color: rgba(59,130,246,.5); }

/* ── FILE UPLOAD ── */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative; overflow: hidden;
}
.file-upload:hover, .file-upload.dragover {
  border-color: var(--accent);
  background: rgba(59,130,246,.05);
}
.file-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-upload-icon { font-size: 2rem; margin-bottom: .5rem; }
.file-upload-text { font-size: .85rem; color: var(--muted); }
.file-upload-text strong { color: var(--accent); }
.file-preview { margin-top: .75rem; }
.file-preview img { max-height: 160px; border-radius: 8px; object-fit: cover; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: .9rem;
  padding: .75rem 1.5rem; border-radius: var(--radius);
  border: none; cursor: pointer; transition: all .2s;
  text-decoration: none; letter-spacing: .02em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000; width: 100%;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,.35); }
.btn-outline {
  background: transparent; border: 1px solid var(--border); color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-sm { padding: .4rem .9rem; font-size: .8rem; border-radius: 8px; }
.btn-xs { padding: .25rem .65rem; font-size: .75rem; border-radius: 6px; }
.btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }

/* ── ALERTS ── */
.alert {
  border-radius: var(--radius); padding: .875rem 1rem;
  font-size: .88rem; margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: .6rem;
}
.alert-danger  { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.3);  color: #fca5a5; }
.alert-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }
.alert-info    { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.3); color: #93c5fd; }
.alert-warn    { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.3); color: #fcd34d; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .22rem .65rem; border-radius: 999px;
}
.badge-pending  { background: rgba(59,130,246,.15); color: var(--accent); border: 1px solid rgba(59,130,246,.3); }
.badge-approved { background: rgba(16,185,129,.15); color: var(--success); border: 1px solid rgba(16,185,129,.3); }
.badge-rejected { background: rgba(239,68,68,.15);  color: var(--danger);  border: 1px solid rgba(239,68,68,.3); }
.badge-admin    { background: rgba(139,92,246,.15); color: #a78bfa; border: 1px solid rgba(139,92,246,.3); }
.badge-guard    { background: rgba(139,92,246,.15); color: #c4b5fd; border: 1px solid rgba(139,92,246,.3); }

/* ── DIVIDER ── */
.divider { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0; color: var(--muted); font-size: .8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── STEP INDICATOR ── */
.steps { display: flex; justify-content: center; gap: 0; margin-bottom: 1.75rem; }
.step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 16px; left: 50%; width: 100%; height: 2px;
  background: var(--border); z-index: 0;
}
.step.active:not(:last-child)::after, .step.done:not(:last-child)::after { background: var(--accent); }
.step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface); color: var(--muted);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
  position: relative; z-index: 1; transition: all .3s;
}
.step.active .step-circle { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,.1); }
.step.done .step-circle { border-color: var(--success); background: var(--success); color: #000; }
.step-label { font-size: .65rem; color: var(--muted); margin-top: .35rem; text-align: center; letter-spacing: .03em; }
.step.active .step-label { color: var(--accent); }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
thead { background: var(--surface2); }
th { padding: .75rem 1rem; text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: .75rem 1rem; border-bottom: 1px solid rgba(37,43,56,.5); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── SEARCH BOX ── */
.search-wrap { position: relative; }
.search-wrap .search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-wrap .form-control { padding-left: 2.75rem; }

/* ── STATS GRID ── */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.stat-value { font-family: 'Bebas Neue',sans-serif; font-size: 2rem; letter-spacing: .04em; line-height: 1; }
.stat-label { font-size: .75rem; color: var(--muted); margin-top: .2rem; }
.stat-accent { color: var(--accent); }
.stat-success { color: var(--success); }
.stat-info { color: var(--info); }
.stat-danger { color: var(--danger); }

/* ── VEHICLE CARD ── */
.vehicle-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex; gap: 1rem; align-items: flex-start;
}
.vehicle-photo {
  width: 80px; height: 64px; border-radius: 8px; object-fit: cover;
  background: var(--border); flex-shrink: 0;
  display: grid; place-items: center; color: var(--muted);
}
.vehicle-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* ── SIDEBAR (admin/guard) ── */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  transform: translateX(-100%); transition: transform .3s;
}
.sidebar.open { transform: translateX(0); }
.sidebar-header { padding: 1.25rem; border-bottom: 1px solid var(--border); }
.sidebar-nav { padding: .75rem; flex: 1; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; border-radius: 10px;
  color: var(--muted); font-size: .9rem; font-weight: 500;
  transition: all .2s; margin-bottom: .2rem;
}
.sidebar-nav a:hover { background: var(--surface2); color: var(--text); }
.sidebar-nav a.active { background: rgba(59,130,246,.12); color: var(--accent); }
.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); }
.main-content { flex: 1; margin-left: 0; transition: margin .3s; padding-bottom: 2rem; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 49; }
.sidebar-overlay.open { display: block; }

@media (min-width: 768px) {
  .sidebar { transform: translateX(0); }
  .main-content { margin-left: 240px; }
  .sidebar-overlay { display: none !important; }
  #menuToggle { display: none; }
}

/* ── MOBILE MENU TOGGLE ── */
#menuToggle {
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: .5rem; display: flex; flex-direction: column; gap: 5px;
}
#menuToggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; display: block; }

/* ── MODAL ── */
.modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px); z-index: 200;
  place-items: center; padding: 1rem;
}
.modal-backdrop.open { display: grid; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem; width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.3rem; line-height: 1; padding: .25rem; }
.modal-close:hover { color: var(--text); }

/* ── PAGINATION ── */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 1rem; }
.page-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface2); color: var(--muted);
  cursor: pointer; font-size: .85rem; transition: all .2s;
  display: grid; place-items: center;
}
.page-btn.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }
.page-btn:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

/* ── SEARCH RESULT HIGHLIGHT ── */
.highlight { background: rgba(59,130,246,.2); border-radius: 3px; padding: 0 2px; }

/* ── MISC ── */
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; } .align-center { align-items: center; } .gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: .4; }

/* ── ANIMATIONS ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .4s ease forwards; }
.fade-in-delay-1 { animation-delay: .1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: .2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: .3s; opacity: 0; }

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