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

:root {
  --brand: #e73b53;
  --brand-dark: #8c1f30;
  --brand-light: #f07b8b;
  --accent: #3556d1;
  --success: #1e8f5a;
  --bg-dark: #0d0d0f;
  --surface-dark: #17171a;
  --border-dark: #2a2a2e;
  --text-muted-dark: #9c9ca3;
  --ink: #1a1a1e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg-dark);
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--brand-light); text-decoration: none; }
a:hover { color: #fff; }

.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.screen-gradient {
  background: linear-gradient(160deg, var(--brand-light) 0%, var(--brand) 42%, var(--brand-dark) 100%);
  padding: 28px 24px 48px;
  align-items: center;
}
.screen-dark { background: var(--bg-dark); padding: 26px 20px 40px; }

.container-narrow { width: 100%; max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; flex: 1; }

.logo-mark { display: flex; align-items: center; justify-content: center; gap: 9px; }
.logo-mark svg { flex-shrink: 0; }
.logo-mark span { font-weight: 800; color: #fff; }

.brand-title { text-align: center; }
.brand-title .line1 { font-size: 20px; font-weight: 600; color: #fff; }
.brand-title .line2 { font-size: 30px; font-weight: 800; color: #fff; letter-spacing: 1.5px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 52px; border-radius: 999px; border: none;
  font-size: 16px; font-weight: 700; font-family: 'Manrope', sans-serif;
  cursor: pointer; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease;
  gap: 8px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-light { background: #fff; color: #c22943; box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.btn-light:hover { box-shadow: 0 10px 24px rgba(0,0,0,0.22); }
.btn-primary { background: linear-gradient(120deg,#ef5a70,#c8243c); color: #fff; }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(231,59,83,0.35); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-menu { background: #fff; color: var(--ink); justify-content: center; height: 56px; border-radius: 14px; font-size: 16px; }
.btn-pill-accent { height: 30px; padding: 0 16px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; border: none; cursor: pointer; }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; }
.field-light label { color: #fff; }
.field-dark label { color: #c9c9cd; }
.input {
  width: 100%; height: 48px; border-radius: 12px; padding: 0 16px;
  font-size: 15px; font-family: 'Manrope', sans-serif; outline: none; border: none;
}
.input-on-brand { color: #3a0d15; }
.input-on-brand::placeholder { color: #b9707c; }
.input-on-brand:focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(255,255,255,0.25); }
.input-on-dark { background: var(--surface-dark); color: #fff; border: 1.5px solid var(--border-dark); }
.input-on-dark:focus { border-color: var(--brand); }

/* Top bars */
.topbar { display: flex; align-items: center; justify-content: space-between; }
.back-link { display: flex; align-items: center; gap: 8px; color: #c9c9cd; font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.back-link:hover { color: #fff; }
.avatar {
  width: 44px; height: 44px; border-radius: 999px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #c22943; font-size: 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  text-decoration: none;
}
.page-title { font-size: 19px; font-weight: 800; color: #fff; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--text-muted-dark); }

/* Vehicle card */
.vehicle-card {
  background: #fff; border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.28);
  text-decoration: none; color: inherit; display: block; transition: box-shadow .15s ease, transform .1s ease;
}
.vehicle-card:hover { transform: translateY(-1px); }
.vehicle-card.is-unavailable { opacity: 0.55; pointer-events: none; }
.vehicle-card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.vehicle-card-head .name { font-size: 14px; font-weight: 700; color: var(--ink); }
.vehicle-photo { width: 100%; display: block; object-fit: cover; background: #fff; }
.badge-plate { display: inline-flex; align-items: center; gap: 5px; background: var(--accent); border-radius: 7px; padding: 4px 10px; color: #fff; font-size: 11.5px; font-weight: 700; }
.badge-status { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.badge-status.available { background: rgba(30,150,90,0.12); color: var(--success); }
.badge-status.taken { background: rgba(231,59,83,0.12); color: #c8243c; }

.vehicle-hero { position: relative; background: #fff; border-radius: 16px; padding: 20px 18px 16px; }
.vehicle-hero .tag { position: absolute; top: 14px; left: 14px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 8px; }
.vehicle-hero img { width: 100%; height: 150px; object-fit: contain; display: block; margin-top: 14px; }
.vehicle-hero .plate-row { text-align: center; margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* Damage checklist */
.damage-row {
  display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px;
  border-radius: 12px; border: 1.5px solid var(--border-dark); background: var(--surface-dark);
  cursor: pointer; transition: background .12s ease, border-color .12s ease;
}
.damage-row input { position: absolute; opacity: 0; pointer-events: none; }
.damage-row .box {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #3a3a3f; background: transparent;
}
.damage-row.is-checked { border-color: var(--brand); background: rgba(231,59,83,0.12); }
.damage-row.is-checked .box { border-color: var(--brand); background: var(--brand); }
.damage-row .box svg { opacity: 0; }
.damage-row.is-checked .box svg { opacity: 1; }
.damage-row .label { font-size: 14px; font-weight: 600; color: #e6e6ea; }

/* Flash messages */
.flash { border-radius: 12px; padding: 12px 16px; font-size: 13.5px; font-weight: 600; margin-bottom: 18px; }
.flash-success { background: rgba(30,150,90,0.14); color: #38c987; }
.flash-error { background: rgba(231,59,83,0.14); color: #ff8296; }

/* Admin */
.admin-shell { background: var(--bg-dark); min-height: 100vh; padding: 32px 28px 48px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 26px 0; }
.stat-card { background: #fff; border-radius: 14px; padding: 18px 20px; color: var(--ink); }
.stat-card .num { font-size: 26px; font-weight: 800; }
.stat-card .label { font-size: 12.5px; font-weight: 600; color: #7a7a82; margin-top: 4px; }
.admin-table-wrap { background: #fff; border-radius: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.admin-table { border-collapse: collapse; width: 100%; }
table.admin-table th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: #8b8b92; letter-spacing: 0.5px;
  text-transform: uppercase; padding: 14px 18px; background: #f4f4f6;
}
table.admin-table td { padding: 14px 18px; font-size: 13.5px; color: var(--ink); border-top: 1px solid #ececee; }
table.admin-table tr:hover td { background: #f7f4f5; }
.search-input { width: 300px; max-width: 100%; }
.nav-tabs { display: flex; gap: 10px; margin: 8px 0 22px; flex-wrap: wrap; }
.nav-tabs a { padding: 8px 16px; border-radius: 999px; background: var(--surface-dark); color: #c9c9cd; font-size: 13px; font-weight: 700; }
.nav-tabs a.active, .nav-tabs a:hover { background: var(--brand); color: #fff; }

.admin-columns { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.admin-columns > .admin-form { flex: 1 1 380px; }
.admin-columns > .admin-table-col { flex: 2 1 320px; min-width: 320px; }

.admin-form { background: #fff; border-radius: 14px; padding: 22px; color: var(--ink); margin-bottom: 24px; max-width: 480px; }
.admin-form .field label { color: #55555c; }
.admin-form .input { border: 1.5px solid #e2e2e6; color: var(--ink); }
.admin-form .input:focus { border-color: var(--brand); }
.admin-form-grid { display: grid; gap: 14px; margin-bottom: 16px; }

.text-center { text-align: center; }
.muted { color: var(--text-muted-dark); }
.mt-24 { margin-top: 24px; }
.mb-18 { margin-bottom: 18px; }
.spacer { flex: 1; }

@media (max-width: 680px) {
  .admin-columns { flex-direction: column; }
  .admin-columns > .admin-form,
  .admin-columns > .admin-table-col { flex-basis: auto; width: 100%; min-width: 0; }
  .admin-form { max-width: 100%; margin-left: auto; margin-right: auto; }
}

@media (max-width: 480px) {
  .search-input { width: 100%; }
  .admin-shell { padding: 22px 16px 40px; }
  table.admin-table th, table.admin-table td { padding: 11px 12px; font-size: 12.5px; }
}
