:root {
  --primary: #1450a3;
  --primary-dark: #0d3a7d;
  --accent: #d99a06;
  --bg: #f2f4f8;
  --card: #ffffff;
  --border: #d8dee8;
  --text: #1c2434;
  --muted: #63708a;
  --danger: #c62828;
  --success: #1e7e34;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

#sidebarMount{
  background-color: #000;
}
.topbar {
  background: var(--primary);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 {
  font-size: 1.2rem;
  margin: 0;
}

.topbar a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,0.6);
  padding: 6px 12px;
  border-radius: 6px;
}

.topbar a:hover { background: rgba(255,255,255,0.15); }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(20, 30, 60, 0.06);
}

.card h2 {
  font-size: 1.05rem;
  margin: 0 0 4px;
  color: var(--primary-dark);
}

.card .hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
}

.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.field { display: flex; flex-direction: column; gap: 4px; }
.field.full { grid-column: 1 / -1; }

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #3a4356;
}

input, select, textarea {
  font-family: inherit;
  font-size: 0.92rem;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20,80,163,0.12);
}

input[readonly] { background: #eef1f6; color: var(--muted); }

textarea { resize: vertical; min-height: 46px; }

.words-hint {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  min-height: 14px;
}

.serial-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.terms-box {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  background: #fafbfd;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #45506a;
}

.terms-box p { margin: 0 0 10px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.88rem;
}
.checkbox-row input { width: 16px; height: 16px; margin-top: 2px; }

.sig-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.sig-block { display: flex; flex-direction: column; gap: 8px; }

canvas.sig-pad {
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: #fff;
  width: 100%;
  height: 130px;
  touch-action: none;
  cursor: crosshair;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #e7ebf3; color: var(--text); }
.btn-secondary:hover { background: #dde3ee; }
.btn-block { width: 100%; padding: 13px; font-size: 1rem; }

.actions-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.msg {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.msg.error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6cb; }
.msg.success { background: #e9f7ec; color: var(--success); border: 1px solid #c3e6cb; }

.success-panel {
  text-align: center;
  padding: 30px 20px;
}
.success-panel h2 { color: var(--success); }
.success-panel .actions-row { justify-content: center; margin-top: 20px; }

.login-screen {
  min-height: 100vh;
  display: flex;
}

/* ---- left panel ---- */
.login-left {
  flex: 1 1 50%;
  background: linear-gradient(160deg, var(--navy) 0%, #0a1322 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  right: -160px;
  bottom: -200px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%);
}
.login-left-inner { position: relative; z-index: 1; max-width: 480px; width: 100%; }

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 56px; }
.brand-icon { font-size: 1.8rem; line-height: 1; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: 0.5px; color: #fff; }
.brand-sub { font-weight: 700; font-size: 0.68rem; letter-spacing: 1.5px; color: var(--gold); }

.left-headline { font-size: 2rem; font-weight: 800; line-height: 1.25; margin: 0 0 28px; }
.left-headline .accent { color: var(--gold); }

.feature-list { list-style: none; margin: 0 0 56px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.feature-list li { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; color: #dbe2ef; }
.feature-icon { flex-shrink: 0; width: 20px; height: 20px; color: var(--gold); }
.feature-icon svg { width: 100%; height: 100%; }

.bike-art { width: 230px; max-width: 60%; height: auto; display: block; margin-left: auto; }

.left-footer { margin-top: 32px; font-size: 0.78rem; color: #7f8bab; }

/* ---- right panel ---- */
.login-right {
  flex: 1 1 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.login-card { flex: 0 1 360px; min-width: 0; }
.login-card h1 { font-size: 1.7rem; margin: 0 0 6px; color: var(--navy); text-align: left; }
.login-card p.hint { margin: 0 0 28px; color: var(--muted); font-size: 0.9rem; text-align: left; }
.login-card .field { margin-bottom: 16px; }
.login-card label { display: block; margin-bottom: 6px; }
.login-card input { width: 100%; padding: 11px 12px; }
.login-card .btn-block { padding: 13px; font-size: 0.95rem; margin-top: 6px; }

@media (max-width: 860px) {
  .login-left { display: none; }
  .login-right { padding: 24px; }
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: #fff;
}
table.admin-table th, table.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 9px 10px;
  text-align: left;
  white-space: nowrap;
}
table.admin-table th { background: #eef1f6; color: var(--primary-dark); }
table.admin-table tr:hover td { background: #f7f9fc; }
table.admin-table tr.row-clickable { cursor: pointer; }
table.admin-table tr.row-clickable:hover td { background: #fff5e0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.toolbar input { min-width: 220px; }

@media (max-width: 640px) {
  .grid, .grid.cols-3, .sig-grid { grid-template-columns: 1fr; }
}

/* ---------- Dashboard shell (sidebar + main content) ---------- */

:root {
  --navy: #0f1b30;
  --navy-light: #17263f;
  --gold: #f0a93a;
  --gold-dark: #d68f1f;
}

.dash-shell { display: flex; min-height: 100vh; align-items: stretch; }

.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--navy);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 18px 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

.sb-logo { text-align: center; padding: 0 16px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 10px; }
.sb-logo-icon { font-size: 2rem; line-height: 1; }
.sb-logo-text { color: #fff; font-weight: 800; font-size: 1.02rem; letter-spacing: 0.5px; margin-top: 4px; }
.sb-logo-sub { color: var(--gold); font-weight: 700; font-size: 0.78rem; letter-spacing: 1px; }

.sb-nav { display: flex; flex-direction: column; padding: 4px 10px; gap: 2px; flex: 1; }
.sb-section-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 1px; color: #5d6c88; text-transform: uppercase; margin: 14px 12px 4px; }
.sb-section-label:first-child { margin-top: 4px; }
.sb-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #cbd5e1; text-decoration: none; font-size: 0.86rem; font-weight: 500; }
.sb-link:hover { background: rgba(255,255,255,0.07); color: #fff; }
.sb-link.active { background: var(--gold); color: #1c1400; font-weight: 700; }
.sb-icon { font-size: 0.95rem; width: 18px; text-align: center; }
.sb-label { flex: 1; }
.sb-badge { background: rgba(255,255,255,0.15); color: #fff; font-size: 0.68rem; font-weight: 700; border-radius: 20px; padding: 1px 8px; }
.sb-link.active .sb-badge { background: rgba(0,0,0,0.18); color: #1c1400; }

.sb-contact { margin: 14px 10px 0; padding: 12px; background: rgba(255,255,255,0.05); border-radius: 8px; font-size: 0.7rem; line-height: 1.7; color: #9fb0c7; }
.sb-contact-row { display: flex; gap: 6px; align-items: flex-start; }

.dash-main { flex: 1; min-width: 0; padding: 20px 26px 50px; }

.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 16px; }
.dash-header .title-block { flex-shrink: 0; }
.dash-header h1 { font-size: 1.45rem; margin: 0; color: var(--navy); }
.dash-header .subtitle { margin: 2px 0 0; font-size: 0.82rem; color: var(--muted); }
#headerRight { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
.dash-date { font-size: 0.83rem; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.dash-admin { position: relative; font-size: 0.86rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; user-select: none; flex-shrink: 0; }
.dash-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; }
.dash-admin-text { font-size: 0.83rem; font-weight: 700; color: var(--text); line-height: 1.3; white-space: nowrap; }
.dash-admin-text small { font-weight: 500; color: var(--muted); }
.dash-admin-dropdown { display: none; position: absolute; right: 0; top: 130%; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.14); min-width: 140px; z-index: 20; overflow: hidden; }
.dash-admin-dropdown.open { display: block; }
.dash-admin-dropdown a { display: block; padding: 10px 14px; color: var(--text); text-decoration: none; font-size: 0.83rem; font-weight: 500; }
.dash-admin-dropdown a:hover { background: var(--bg); }

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

.stat-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 1px 3px rgba(20,30,60,0.06); }
.stat-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; color: #fff; }
.stat-icon.blue { background: #2f7de1; }
.stat-icon.green { background: #29a86a; }
.stat-icon.orange { background: #ef9d1f; }
.stat-icon.purple { background: #8a5cf6; }
.stat-icon.teal { background: #17a398; }
.stat-value { font-size: 1.32rem; font-weight: 800; color: var(--text); line-height: 1.15; }
.stat-label-top { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); font-weight: 700; }
.stat-label-sub { font-size: 0.72rem; color: var(--muted); }

/* ---------- Greeting row ---------- */

.greeting-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.greeting-row h2 { margin: 0 0 4px; font-size: 1.3rem; color: var(--navy); }
.greeting-row .hint { margin: 0; }
.greeting-actions { display: flex; gap: 10px; flex-shrink: 0; }
.greeting-actions .btn { text-decoration: none; display: inline-flex; align-items: center; }

/* ---------- Collection panel stat strip ---------- */

.collection-stats-row { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 4px; }
.collection-stat-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.collection-stat-value { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.collection-stat-value.down { color: var(--danger); }
.collection-stat-value.up { color: var(--success); }
.collection-stat-badge { display: inline-block; background: #fff5e0; color: #a2680a; font-size: 0.68rem; font-weight: 700; padding: 1px 8px; border-radius: 20px; margin-left: 6px; }

/* ---------- Fleet utilization callout ---------- */

.util-callout { margin-top: 14px; background: #eef2ff; color: var(--primary-dark); border-radius: 8px; padding: 10px 14px; font-size: 0.8rem; }
.util-callout strong { font-weight: 800; }

/* ---------- Two-column dashboard body ---------- */

.dash-columns { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.dash-columns.even { grid-template-columns: 1fr 1fr; }

.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(20,30,60,0.06); margin-bottom: 18px; overflow: hidden; }
.panel-header { background: var(--navy); color: #fff; padding: 12px 18px; font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.panel-header .view-all { margin-left: auto; font-size: 0.73rem; font-weight: 500; color: var(--gold); text-decoration: none; }
.panel-body { padding: 16px 18px; }

.section-title { font-weight: 700; font-size: 0.85rem; color: var(--navy); display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; }
.section-title .badge-num { background: var(--navy); color: #fff; border-radius: 50%; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; }

/* ---------- Donut chart (pure CSS, no library) ---------- */

.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut { width: 108px; height: 108px; border-radius: 50%; position: relative; flex-shrink: 0; }
.donut-total-label { position: absolute; inset: 16px; background: #fff; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-total-label .num { font-size: 1.25rem; font-weight: 800; line-height: 1; color: var(--text); }
.donut-total-label .lbl { font-size: 0.58rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 0.77rem; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; }
.donut-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-item .lname { flex: 1; color: var(--text); }
.donut-legend-item .lcount { font-weight: 700; }

/* ---------- List rows (today's returns / recent rentals) ---------- */

.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.81rem; }
.list-row:last-child { border-bottom: none; }
.list-row-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.list-row-main { flex: 1; min-width: 0; }
.list-row-title { font-weight: 700; color: var(--text); }
.list-row-sub { color: var(--muted); font-size: 0.74rem; }
.list-row-side { text-align: right; white-space: nowrap; }

.status-pill { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 0.66rem; font-weight: 700; white-space: nowrap; }
.status-pill.due { background: #fdecea; color: var(--danger); }
.status-pill.upcoming { background: #fff5e0; color: #a2680a; }
.status-pill.active { background: #e9f7ec; color: var(--success); }
.status-pill.returned { background: #eef1f6; color: var(--muted); }

/* ---------- Quick action cards ---------- */

.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 6px; }
.quick-action-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--text); box-shadow: 0 1px 3px rgba(20,30,60,0.05); }
.quick-action-card:hover { border-color: var(--gold); }
.quick-action-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.quick-action-title { font-weight: 700; font-size: 0.85rem; }
.quick-action-sub { font-size: 0.71rem; color: var(--muted); }

/* ---------- Buttons / toggles / form-lock ---------- */

.btn-gold { background: var(--gold); color: #1c1400; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-light); }

.toggle-group { display: flex; gap: 8px; flex-wrap: wrap; }
.toggle-btn { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 9px 14px; font-size: 0.84rem; font-weight: 600; cursor: pointer; color: var(--text); }
.toggle-btn.selected { border-color: var(--navy); background: var(--navy); color: #fff; }

.locked-section { opacity: 0.45; pointer-events: none; filter: grayscale(0.35); transition: opacity 0.2s ease; }
.locked-section.unlocked { opacity: 1; pointer-events: auto; filter: none; }

.verify-badge { color: var(--success); font-weight: 700; font-size: 0.78rem; }
.inline-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-row > * { flex: 1; min-width: 140px; }
.inline-row .btn { flex: 0 0 auto; }

.summary-box { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 4px 0; }
.summary-row.total { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 1.05rem; color: var(--navy); }

.coming-soon { text-align: center; padding: 60px 20px; color: var(--muted); }
.coming-soon .icon { font-size: 3rem; margin-bottom: 12px; }

.stat-mini-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }

@media (max-width: 1100px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .dash-columns { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .dash-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; }
  .sb-nav { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Topbar: search ---------- */

.topbar-search { position: relative; flex: 1; min-width: 160px; max-width: 420px; }
.topbar-search input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.83rem;
}
.topbar-search input:focus { background: #fff; }
.search-results {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.14);
  z-index: 30;
  overflow: hidden;
}
.search-result-item { display: flex; flex-direction: column; gap: 2px; padding: 9px 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); font-size: 0.82rem; }
.search-result-item:hover { background: var(--bg); }
.search-result-item span { font-size: 0.72rem; color: var(--muted); }
.search-view-all { display: block; padding: 9px 14px; text-align: center; font-size: 0.78rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.search-view-all:hover { background: var(--bg); }
.search-empty { padding: 12px 14px; font-size: 0.8rem; color: var(--muted); }

/* ---------- Topbar: notifications ---------- */

.notif-bell { position: relative; font-size: 1.1rem; cursor: pointer; flex-shrink: 0; user-select: none; }
.notif-badge { position: absolute; top: -6px; right: -8px; background: var(--danger); color: #fff; font-size: 0.6rem; font-weight: 700; border-radius: 10px; padding: 1px 5px; min-width: 15px; text-align: center; }
.notif-dropdown { display: none; position: absolute; right: 0; top: 150%; width: 320px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.16); z-index: 30; overflow: hidden; }
.notif-dropdown.open { display: block; }
.notif-dropdown-header { padding: 12px 14px; font-weight: 700; font-size: 0.85rem; color: var(--navy); border-bottom: 1px solid var(--border); }
#notifList { max-height: 320px; overflow-y: auto; }
.notif-item { display: block; padding: 10px 14px; font-size: 0.8rem; line-height: 1.4; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.danger { border-left-color: var(--danger); }
.notif-item.warn { border-left-color: var(--gold-dark); }

/* ---------- Overdue alert banner ---------- */

.alert-banner { display: flex; align-items: center; gap: 12px; background: #fdecea; border: 1px solid #f5c6cb; color: var(--danger); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; font-size: 0.85rem; }
.alert-banner .icon { font-size: 1.1rem; flex-shrink: 0; }
.alert-banner .text { flex: 1; }
.alert-banner .btn { flex-shrink: 0; }

/* ---------- Collection bar chart (plain divs, no library) ---------- */

.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; margin-top: 16px; }
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.chart-bar { width: 100%; max-width: 26px; background: var(--gold); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart-bar.today { background: var(--navy); }
.chart-bar-label { font-size: 0.62rem; color: var(--muted); white-space: nowrap; }
.chart-bar-value { font-size: 0.62rem; font-weight: 700; color: var(--navy); }

/* ---------- Status pills: overdue variant / avatar circle ---------- */

.status-pill.overdue { background: #fdecea; color: var(--danger); }

.avatar-circle { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; color: #fff; flex-shrink: 0; }

@media (max-width: 700px) {
  .topbar-search { display: none; }
}

/* ---------- Page section header (content-level title + actions) ---------- */

.page-section-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-section-header h2 { margin: 0 0 4px; font-size: 1.25rem; color: var(--navy); }
.page-section-header .hint { margin: 0; }
.page-section-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.page-section-actions select { min-width: 140px; }

/* ---------- Flat cards (no navy header bar) ---------- */

.flat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(20,30,60,0.06); padding: 20px; }
.flat-card-title { margin: 0 0 16px; font-size: 0.95rem; font-weight: 700; color: var(--navy); }

/* ---------- Category pill / breakdown bars ---------- */

.cat-pill { display: inline-block; background: #eef1f6; color: var(--primary-dark); font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }

.cat-bar-item { margin-bottom: 16px; }
.cat-bar-item:last-child { margin-bottom: 0; }
.cat-bar-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.85rem; margin-bottom: 6px; }
.cat-bar-head span { font-weight: 700; color: var(--text); }
.cat-bar-head strong { font-weight: 700; color: var(--navy); }
.cat-bar-track { height: 6px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: 4px; }

/* ---------- Icon delete button ---------- */

.icon-btn-delete { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 0.82rem; padding: 0; }
.icon-btn-delete:hover { background: #fdecea; border-color: #f5c6cb; }

/* ---------- Modal ---------- */

.modal-overlay { position: fixed; inset: 0; background: rgba(10,15,25,0.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-overlay[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 12px; width: 600px; max-width: 100%; max-height: 90vh; box-shadow: 0 20px 60px rgba(0,0,0,0.3); display: flex; flex-direction: column; }
.modal-header { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-icon { font-size: 1.25rem; }
.modal-header h3 { margin: 0; flex: 1; font-size: 1.1rem; color: var(--navy); }
.modal-close { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-footer { flex-shrink: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); background: var(--bg); border-radius: 0 0 12px 12px; }
.modal-box-wide { width: 760px; }
.modal-box-xwide { width: 1100px; }
.modal-section-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.modal-body .modal-section-label:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.doc-upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-upload-row input[type="file"] { flex: 1 1 220px; min-width: 0; font-size: 0.82rem; }
.doc-upload-status { font-size: 0.78rem; color: var(--muted); }
.doc-upload-status.error { color: var(--danger); }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; margin-top: 14px; }
.doc-thumb { display: flex; flex-direction: column; gap: 6px; text-decoration: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: var(--bg); transition: border-color 0.15s; }
.doc-thumb:hover { border-color: var(--gold); }
.doc-thumb img { width: 100%; height: 80px; object-fit: cover; border-radius: 5px; background: #e9edf3; }
.doc-thumb-name { font-size: 0.68rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-empty { font-size: 0.82rem; color: var(--muted); margin: 10px 0; }

.rental-doc-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.rental-doc-card:last-child { margin-bottom: 0; }
.rental-doc-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rental-doc-card-sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.doc-links-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.doc-links-row .btn { font-size: 0.78rem; padding: 7px 12px; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #166a2c; }
.btn-success:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-danger { background: var(--danger); color: #fff; }

/* ---------- Return / settlement modal ---------- */

.return-columns { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .return-columns { grid-template-columns: 1fr; } }

.return-vehicle-card { display: flex; gap: 14px; background: var(--bg); border-radius: 10px; padding: 12px; }
.return-vehicle-illustration { width: 110px; height: 80px; flex-shrink: 0; background: #fff; border-radius: 8px; padding: 6px; }
.return-vehicle-illustration svg { width: 100%; height: 100%; display: block; }
.return-vehicle-info h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--navy); }
.return-customer-line { margin-top: 6px; font-size: 0.82rem; color: var(--muted); }

.return-stats-row { display: flex; gap: 24px; margin-top: 14px; }
.return-stat-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.4px; color: var(--muted); text-transform: uppercase; margin-bottom: 2px; }
.return-stat-value { font-size: 0.92rem; font-weight: 700; color: var(--text); }

.settlement-row { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 7px 0; border-bottom: 1px solid var(--border); }
.settlement-row:last-child { border-bottom: none; }
.settlement-row.total { font-weight: 800; font-size: 1rem; color: var(--navy); border-top: 1px dashed var(--border); border-bottom: none; padding-top: 10px; margin-top: 2px; }
.settlement-row.muted { color: var(--muted); }
.settlement-row .amt { font-weight: 700; }

.settlement-banner { margin-top: 14px; border-radius: 8px; padding: 12px 14px; color: #fff; }
.settlement-banner.refund { background: var(--success); }
.settlement-banner.due { background: var(--danger); }
.settlement-banner .sb-label { font-size: 0.75rem; opacity: 0.9; }
.settlement-banner .sb-amount { font-size: 1.3rem; font-weight: 800; margin-top: 2px; }

/* ---------- Return queue: section badges ---------- */

.badge-num.overdue { background: var(--danger); }
.badge-num.due-today { background: #ef9d1f; }
.badge-num.upcoming { background: var(--success); }

/* ---------- Return queue: list rows ---------- */

.return-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.return-list-row { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(20,30,60,0.06); padding: 14px 16px; flex-wrap: wrap; }

.return-row-vehicle { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; min-width: 220px; }
.return-row-illustration { width: 72px; height: 56px; flex-shrink: 0; background: var(--bg); border-radius: 8px; padding: 4px; }
.return-row-illustration svg { width: 100%; height: 100%; display: block; }
.plate-badge.small { font-size: 0.68rem; margin-bottom: 3px; }
.return-row-model { font-weight: 700; font-size: 0.88rem; color: var(--navy); }
.return-row-sub { font-size: 0.72rem; color: var(--muted); }

.return-row-renter { display: flex; align-items: center; gap: 8px; flex: 1 1 170px; min-width: 150px; }
.return-row-renter-name { font-weight: 700; font-size: 0.82rem; }
.return-row-renter-phone { font-size: 0.72rem; color: var(--muted); }

.return-row-due { flex: 1 1 220px; min-width: 200px; }
.return-row-due-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.3px; color: var(--muted); text-transform: uppercase; }
.return-row-due-value { font-weight: 700; font-size: 0.85rem; margin: 2px 0 6px; }
.return-progress-track { height: 5px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.return-progress-fill { height: 100%; border-radius: 4px; }
.return-progress-fill.green { background: var(--success); }
.return-progress-fill.amber { background: #ef9d1f; }
.return-progress-fill.red { background: var(--danger); }
.return-row-timeleft { font-size: 0.72rem; font-weight: 700; margin-top: 4px; }
.return-row-timeleft.green { color: var(--success); }
.return-row-timeleft.amber { color: #a2680a; }
.return-row-timeleft.red { color: var(--danger); }

.return-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.icon-btn-plain { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--border); background: #fff; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 0.9rem; flex-shrink: 0; }
.icon-btn-plain:hover { background: var(--bg); }

/* ---------- Vehicle toolbar / status tabs ---------- */

.vehicle-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.status-tabs { display: flex; gap: 6px; background: var(--bg); border-radius: 8px; padding: 4px; }
.status-tab { border: none; background: transparent; padding: 8px 14px; border-radius: 6px; font-size: 0.83rem; font-weight: 600; color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.status-tab:hover { color: var(--text); }
.status-tab.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(20,30,60,0.12); }
.status-tab-count { background: rgba(0,0,0,0.08); color: inherit; font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 20px; }
.status-tab.active .status-tab-count { background: var(--bg); }
#searchBox { min-width: 240px; }

/* ---------- Vehicle card grid ---------- */

.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }

.vehicle-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(20,30,60,0.06); overflow: hidden; display: flex; flex-direction: column; }
.vehicle-card-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 0; }

.status-pill-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.status-pill-dot .dot { width: 6px; height: 6px; border-radius: 50%; }
.status-pill-dot.available { background: #e9f7ec; color: var(--success); }
.status-pill-dot.available .dot { background: var(--success); }
.status-pill-dot.on-rent { background: #fff5e0; color: #a2680a; }
.status-pill-dot.on-rent .dot { background: #ef9d1f; }
.status-pill-dot.maintenance { background: #f1edff; color: #6b46c1; }
.status-pill-dot.maintenance .dot { background: #8a5cf6; }
.status-pill-dot.unavailable { background: #eef1f6; color: var(--muted); }
.status-pill-dot.unavailable .dot { background: var(--muted); }

.type-badge { font-size: 0.7rem; font-weight: 700; color: var(--muted); border: 1px solid var(--border); padding: 3px 10px; border-radius: 6px; }

.vehicle-illustration { background: var(--bg); margin: 10px 14px 0; border-radius: 10px; padding: 6px 10px; }
.vehicle-illustration svg { width: 100%; height: 100px; display: block; }

.vehicle-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vehicle-title-row h3 { margin: 0; font-size: 1.02rem; color: var(--navy); }
.vehicle-subtitle { font-size: 0.78rem; color: var(--muted); }

.plate-badge { display: inline-flex; align-self: flex-start; align-items: stretch; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; font-weight: 700; font-size: 0.78rem; }
.plate-flag { background: var(--primary); color: #fff; padding: 3px 6px; font-size: 0.62rem; display: flex; align-items: center; }
.plate-no { padding: 3px 9px; letter-spacing: 0.5px; }

.vehicle-stats-row { display: flex; justify-content: space-between; background: var(--bg); border-radius: 8px; padding: 8px 10px; margin-top: 2px; }
.vehicle-stats-row > div { text-align: center; flex: 1; }
.vehicle-stats-row .label { display: block; font-size: 0.6rem; font-weight: 700; color: var(--muted); letter-spacing: 0.3px; margin-bottom: 2px; }
.vehicle-stats-row strong { font-size: 0.84rem; color: var(--navy); }

.vehicle-odometer { font-size: 0.78rem; color: var(--muted); }

.vehicle-occupant { display: flex; align-items: center; gap: 10px; background: #fff5e0; border-radius: 8px; padding: 8px 10px; }
.vehicle-occupant-name { font-weight: 700; font-size: 0.82rem; color: var(--text); }
.vehicle-occupant-due { font-size: 0.72rem; color: #a2680a; }
.vehicle-occupant-due.overdue { color: var(--danger); font-weight: 700; }

.vehicle-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 4px; }
.vehicle-action-btn { flex: 1; text-align: center; text-decoration: none; font-size: 0.82rem; padding: 9px; }
.vehicle-action-placeholder { flex: 1; text-align: center; font-size: 0.8rem; color: var(--muted); padding: 9px; }
.icon-btn-edit { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; flex-shrink: 0; }
.icon-btn-edit:hover { background: var(--bg); }
