/* Bimshire Mobility — shared styles
   Brand tokens live as CSS custom properties so the whole site can be
   re-themed from one place. Colors match the canvas prototype (Option C —
   Slate & Turquoise). */

:root {
  --primary: #1F2937;
  --accent: #0EA5A0;
  --bg: #F5F7F7;
  --surface: #FFFFFF;
  --label-color: #5B6472;
  --border: rgba(31, 41, 55, 0.08);
  --border-strong: rgba(31, 41, 55, 0.15);
  --series-revenue: #2a78d6;
  --series-expenses: #eb6834;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Manrope', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--primary);
  font-family: var(--font-body);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }

a { text-decoration: none; color: inherit; }
button { font-family: var(--font-body); cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 9px 10px; font-size: 12.5px; }

/* ---------- Public site nav ---------- */
.site-nav {
  height: 88px;
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.logo {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 700;
  color: var(--primary);
}
.logo .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-bottom: 4px;
}
.nav-links { display: flex; align-items: center; gap: 36px; font-size: 14px; font-weight: 500; }
.nav-links a.active { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.staff-login-link { font-size: 13px; color: var(--primary); opacity: 0.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 10px;
  border: none;
  text-align: center;
}
.btn-primary { background: var(--primary); color: var(--bg); }
.btn-accent { background: var(--accent); color: var(--bg); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); padding: 11.5px 26px; }
.btn-pill { border-radius: 999px; padding: 11px 22px; font-size: 14px; font-weight: 700; background: var(--accent); color: var(--bg); }
.btn-sm { font-size: 13px; padding: 10px 16px; border-radius: 8px; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
}
.hero-copy { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.eyebrow { font-size: 11px; letter-spacing: 0.18em; color: var(--accent); font-weight: 700; }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: 46px; line-height: 1.1; color: var(--primary); margin: 0; }
.hero p { font-size: 16px; line-height: 1.6; color: var(--primary); opacity: 0.75; margin: 0; }
.cta-row { display: flex; gap: 14px; margin-top: 8px; }
.placeholder-photo {
  border-radius: 20px;
  background: rgba(31,41,55,0.06);
  border: 1px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--label-color);
  font-weight: 700;
}

/* ---------- Section / cards / grid ---------- */
.section { padding: 36px 64px; display: flex; flex-direction: column; gap: 20px; border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.section-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--primary); margin: 0; }
.see-all { font-size: 13px; font-weight: 700; color: var(--accent); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-photo {
  min-height: 140px;
  flex-grow: 1;
  background: rgba(31,41,55,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--label-color);
  font-weight: 700;
}
.card-photo.vehicle-photo {
  flex-direction: column;
  gap: 8px;
  color: var(--label-color);
}
.vehicle-icon { width: 68px; height: 38px; }
.vehicle-name-tag { font-size: 11px; letter-spacing: 0.06em; font-weight: 700; text-transform: uppercase; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--primary); }
.card-meta { font-size: 12.5px; color: var(--label-color); }
.card-price { font-size: 14px; font-weight: 700; color: var(--accent); margin-top: 2px; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 24px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--label-color);
}
.mark-sq {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 11px; color: var(--bg);
}

/* ---------- Chips / segmented controls ---------- */
.chip {
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--primary);
}
.chip.pill { border-radius: 999px; padding: 9px 18px; }
.chip.active { border-color: var(--accent); background: var(--accent); color: var(--bg); }

/* ---------- Forms ---------- */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--primary); min-width: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row { display: flex; gap: 16px; }
input[type="text"], input[type="password"], input[type="date"] {
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 8px;
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--primary);
}

/* ---------- Booking / payment page layout ---------- */
.page-shell { display: flex; flex-direction: column; min-height: 100vh; }
.step-header { font-size: 13px; color: var(--label-color); font-weight: 700; }
.two-col { flex-grow: 1; padding: 40px 64px; display: flex; gap: 40px; }
.summary-card {
  width: 360px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: fit-content;
}
.summary-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--primary); opacity: 0.75; gap: 12px; }
.summary-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; color: var(--primary); }
.divider { height: 1px; background: rgba(31,41,55,0.1); }
.center-column { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 40px; }

/* ---------- Page header blocks (fleet / sales / etc.) ---------- */
.page-head { padding: 40px 64px 24px; }
.page-subnote { padding: 0 64px 8px; }
.page-body { padding: 0 64px 40px; }

/* ---------- Hero photo ---------- */
.hero-photo { width: 520px; height: 340px; flex-shrink: 0; }

/* ---------- Split panel (sidebar list + detail, e.g. statements/invoices) ---------- */
.split-panel { display: flex; flex-direction: row; gap: 24px; align-items: flex-start; }
.split-panel-aside { flex-shrink: 0; }
.split-panel-aside--sm { width: 260px; }
.split-panel-aside--md { width: 380px; }

/* ---------- Tile grid modifier ---------- */
.tile-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Staff portal shell ---------- */
.portal-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  box-sizing: border-box;
}
.sidebar .logo span:first-child { color: var(--bg); }
.sidebar-label { font-size: 10px; letter-spacing: 0.12em; color: rgba(245,247,247,0.45); font-weight: 700; margin: 20px 0 8px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a { font-size: 13.5px; font-weight: 700; padding: 10px 12px; border-radius: 8px; color: rgba(245,247,247,0.75); }
.sidebar-nav a.active { background: rgba(255,255,255,0.12); color: var(--bg); }
.sidebar-logout { font-size: 12.5px; color: rgba(245,247,247,0.55); margin-top: auto; }
.portal-main { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.portal-topbar {
  height: 72px;
  flex-shrink: 0;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.portal-topbar h1 { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--primary); margin: 0; }
.badge-demo {
  font-size: 10px; letter-spacing: 0.1em; font-weight: 700;
  color: var(--label-color); background: rgba(31,41,55,0.06);
  padding: 4px 10px; border-radius: 999px;
}
.portal-content { flex-grow: 1; padding: 28px 40px; display: flex; flex-direction: column; gap: 24px; overflow: auto; }
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.tile-label { font-size: 10.5px; letter-spacing: 0.04em; color: var(--label-color); font-weight: 700; }
.tile-value { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--primary); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; overflow-x: auto; }
.status-pill { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.status-confirmed { background: rgba(14,165,160,0.12); color: var(--accent); }
.status-pending { background: rgba(31,41,55,0.08); color: var(--label-color); }
.status-sold { background: rgba(31,41,55,0.12); color: var(--primary); }

/* ---------- WhatsApp live chat button ---------- */
.whatsapp-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  z-index: 40;
}
.whatsapp-fab svg { width: 28px; height: 28px; }
.whatsapp-fab:hover { filter: brightness(1.05); }

/* ---------- Misc ---------- */
.muted-note { font-size: 12px; color: var(--label-color); line-height: 1.6; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button {
  width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid var(--border-strong);
  background: var(--surface); color: var(--primary); font-size: 16px; font-weight: 700;
}

/* ---------- Mobile nav toggle (public site header) ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.staff-login-mobile { display: none; }

/* ---------- Mobile sidebar toggle (staff portal) ---------- */
.sidebar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  flex-shrink: 0;
}
.sidebar-toggle span { display: block; width: 20px; height: 2px; background: var(--primary); border-radius: 2px; }
.sidebar-overlay { display: none; }

/* =====================================================================
   Responsive — tablet and phone widths
   ===================================================================== */
@media (max-width: 900px) {
  .sidebar-toggle { display: flex; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 24px rgba(0,0,0,0.18);
    overflow-y: auto;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-overlay.is-open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    z-index: 90;
  }
  .portal-topbar { position: relative; padding: 0 20px; justify-content: flex-start; gap: 12px; }
  .portal-topbar h1 { flex-grow: 1; }
  .portal-content { padding: 20px; }
  .tile-grid, .tile-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .site-nav { position: relative; padding: 0 20px; height: 64px; }
  .nav-toggle { display: flex; }
  .nav-right { gap: 12px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 18px;
    box-shadow: 0 12px 20px rgba(15,23,42,0.08);
    z-index: 60;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: 15px; }
  .nav-links a:last-child { border-bottom: none; }
  .staff-login-link { display: none; }
  .staff-login-mobile { display: block; opacity: 0.7; }

  .hero { flex-direction: column; align-items: stretch; padding: 32px 20px; gap: 28px; }
  .hero h1 { font-size: 32px; }
  .hero-copy { max-width: none; }
  .hero-photo { width: 100%; height: 220px; }

  .section { padding: 28px 20px; }
  .section-head h2 { font-size: 22px; }

  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .page-head { padding: 28px 20px 16px; }
  .page-subnote { padding: 0 20px 8px; }
  .page-body { padding: 0 20px 32px; }

  .site-footer { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }

  .two-col { flex-direction: column; padding: 24px 20px; gap: 24px; }
  .summary-card { width: 100%; }

  .split-panel { flex-direction: column; }
  .split-panel-aside--sm, .split-panel-aside--md { width: 100%; }

  .form-grid { grid-template-columns: 1fr; }

  .center-column { padding: 24px; }
}

@media (max-width: 560px) {
  .card-grid, .tile-grid, .tile-grid-3 { grid-template-columns: 1fr; }
  .field-row { flex-wrap: wrap; }
  .field-row > * { min-width: 140px; flex: 1 1 140px; }
  .hero h1 { font-size: 28px; }
  .btn, .btn-pill { padding: 11px 18px; font-size: 13px; }
}
