/* ============================================================
   Hayleys Mobility EV Charging — shared design system
   ============================================================ */

:root {
  --green: #1a7241;
  --green-dark: #145a33;
  --orange: #f05223;
  --orange-dark: #d6431a;
  --blue: #0b3d6b;        /* corporate blue accent */
  --blue-bright: #2563eb;
  --charcoal: #14181a;
  --charcoal-2: #1d2326;
  --ink: #1b211d;
  --muted: #66716b;
  --line: #e6e4dc;
  --bg: #f8f7f3;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(20,24,26,0.08);
  --status-available: #16a34a;
  --status-occupied: #f59e0b;
  --status-unavailable: #dc2626;
  --status-offline: #6b7280;
  --status-coming_soon: #2563eb;
  --status-under_construction: #7c3aed;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--muted); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-dark { background: var(--charcoal); color: #eef1ee; }
.section-dark p { color: #b7bfb9; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.eyebrow {
  display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--orange-dark); background: rgba(240,82,35,.1);
  padding: 5px 12px; border-radius: 20px; margin-bottom: 14px;
}
.section-dark .eyebrow { color: #ffb08e; background: rgba(240,82,35,.18); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: .94rem; padding: 13px 26px; border-radius: 10px;
  border: 2px solid transparent; cursor: pointer; transition: all .15s ease;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-outline-dark { border-color: var(--ink); color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: .82rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }

/* ---------- Header / nav ---------- */
header.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.02rem; }
.brand img { width: 40px; height: 40px; border-radius: 9px; }
.brand small { display: block; font-weight: 600; font-size: .68rem; color: var(--muted); }
.brand-wordmark { width: auto !important; height: 34px !important; border-radius: 0 !important; }
.brand-tag {
  font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--green-dark); background: rgba(26,114,65,.1); padding: 4px 9px; border-radius: 20px;
  align-self: center;
}
.section-dark .brand-tag { color: #fff; background: rgba(255,255,255,.14); }
footer .brand-wordmark { height: 30px !important; margin-bottom: 14px; }
nav.main-nav { display: flex; align-items: center; gap: 2px; }
nav.main-nav a {
  font-size: .84rem; font-weight: 700; color: var(--ink); padding: 10px 13px; border-radius: 8px;
}
nav.main-nav a:hover { background: rgba(26,114,65,.08); color: var(--green-dark); }
nav.main-nav a.active { color: var(--green-dark); background: rgba(26,114,65,.1); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
@media (max-width: 980px) {
  nav.main-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; padding: 10px; border-bottom: 1px solid var(--line); gap: 0; }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 12px 14px; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(circle at 15% 20%, rgba(26,114,65,.35), transparent 45%),
              radial-gradient(circle at 85% 0%, rgba(240,82,35,.28), transparent 40%),
              var(--charcoal);
  color: #fff; padding: 96px 0 84px; position: relative; overflow: hidden;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); max-width: 820px; }
.hero .lede { font-size: 1.18rem; color: #d7ddd8; max-width: 620px; margin-bottom: 34px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.qr-card {
  background: #fff; border-radius: 16px; padding: 20px 22px 16px; text-align: center;
  box-shadow: 0 16px 40px rgba(0,0,0,.35); width: fit-content;
}
.qr-card img { width: 160px; height: 160px; display: block; margin: 0 auto 10px; border-radius: 6px; }
.qr-card p { margin: 0; font-size: .82rem; font-weight: 700; color: var(--ink); }
@media (max-width: 860px) { .qr-card { margin: 0 auto; } }
.bolt-art { position: absolute; right: -60px; top: -40px; width: 480px; opacity: .5; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-slide.active { opacity: 1; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(20,24,26,.92) 0%, rgba(20,24,26,.72) 45%, rgba(20,24,26,.4) 100%);
}

/* ---------- Stats bar ---------- */
.stats-bar { background: var(--card); border-top: 1px solid var(--line); }

/* ---------- StarCharge technology-partner section ---------- */
.starcharge-section { background: linear-gradient(180deg, #f7f6f2 0%, #eef1ee 100%); }
.starcharge-wordmark {
  font-weight: 800; color: #14212e; letter-spacing: -0.01em;
}
.starcharge-wordmark .bolt { color: var(--orange); font-size: .82em; }
.oem-partners-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
.oem-intro { text-align: center; font-weight: 700; color: var(--ink); margin-bottom: 24px; }
.oem-wrap { display: grid; grid-template-columns: 1.55fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .oem-wrap { grid-template-columns: 1fr; } }

.oem-logo-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
@media (max-width: 860px) { .oem-logo-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 520px) { .oem-logo-grid { grid-template-columns: repeat(4, 1fr); } }

.oem-logo-cell {
  aspect-ratio: 1.28/1; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  padding: 8px; cursor: default; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.oem-logo-cell img { width: 100%; height: 100%; object-fit: contain; }
.oem-logo-cell:hover, .oem-logo-cell.oem-highlight {
  transform: translateY(-4px) scale(1.07);
  box-shadow: 0 10px 22px rgba(20,24,26,.16);
  border-color: var(--orange);
  z-index: 2;
}

.oem-bullets { list-style: none; margin: 0; padding: 0; }
.oem-bullets li {
  position: relative; padding: 11px 14px 11px 22px; border-radius: 9px;
  color: var(--muted); font-size: .92rem; line-height: 1.4; margin-bottom: 2px;
  transition: background .18s ease, color .18s ease;
}
.oem-bullets li::before {
  content: ''; position: absolute; left: 6px; top: 19px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--line); transition: background .18s ease;
}
.oem-bullets li strong { color: var(--ink); font-weight: 800; }
.oem-bullets li:hover, .oem-bullets li.oem-highlight {
  background: rgba(240,82,35,.08); color: var(--ink);
}
.oem-bullets li:hover::before, .oem-bullets li.oem-highlight::before { background: var(--orange); }
.oem-bullets li:hover strong, .oem-bullets li.oem-highlight strong { color: var(--orange-dark); }


.stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  margin-top: -46px; position: relative; z-index: 2;
}
.stat-card {
  background: #fff; border: 1px solid var(--line); padding: 26px 18px; text-align: center;
  box-shadow: var(--shadow); border-radius: var(--radius);
}
.stat-card .num { font-size: 1.9rem; font-weight: 800; color: var(--green-dark); }
.stat-card .lbl { font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
@media (max-width: 980px) { .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (max-width: 620px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .stat-card{padding:18px 10px;} .stat-card .num{font-size:1.4rem;} }


/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(20,24,26,.12); }
.card h3 { font-size: 1.08rem; }
.icon-badge {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: rgba(26,114,65,.12); color: var(--green-dark); font-size: 1.3rem; margin-bottom: 16px; font-weight: 800;
}

.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card img.product-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; margin-bottom: 16px; background: var(--line); }
.product-card .badge {
  align-self: flex-start; font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; background: var(--orange); color: #fff; padding: 4px 10px; border-radius: 20px; margin-bottom: 14px;
}
.product-card .meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.product-card .meta span {
  font-size: .76rem; font-weight: 700; color: var(--green-dark); background: rgba(26,114,65,.1);
  padding: 5px 10px; border-radius: 8px;
}
.product-card ul { margin: 0 0 18px; padding-left: 18px; color: var(--muted); font-size: .9rem; }
.product-card ul li { margin-bottom: 5px; }
.product-card .spacer { flex: 1; }

.project-card img.thumb { border-radius: 10px; margin-bottom: 16px; aspect-ratio: 16/9; object-fit: cover; background: var(--line); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--blue); background: rgba(11,61,107,.09); padding: 4px 10px; border-radius: 20px; margin-right: 6px; }

/* ---------- Status badge ---------- */
.status-badge { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* ---------- Map + legend ---------- */
.network-split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 980px) { .network-split { grid-template-columns: 1fr; } }

.network-map-col {
  position: sticky; top: 92px;
  border-radius: var(--radius); padding: 6px;
  background: linear-gradient(135deg, var(--green) 0%, #0d9488 45%, var(--blue-bright) 100%);
  box-shadow: 0 14px 34px rgba(11,61,107,.22);
}
@media (max-width: 980px) { .network-map-col { position: static; } }
#map { width: 100%; height: min(640px, 72vh); border-radius: 10px; }

.network-detail-col {
  display: flex; flex-direction: column;
  height: min(640px, 72vh);
  min-height: 420px;
}
.detail-panel {
  flex-shrink: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); overflow-y: auto; max-height: 58%;
}
.detail-placeholder { text-align: center; padding: 20px 10px; color: var(--muted); }
.detail-placeholder-icon {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(37,99,235,.1); color: var(--blue-bright);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin: 0 auto 12px;
}
.detail-head { display: flex; gap: 12px; align-items: flex-start; }
.detail-icon { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); flex-shrink: 0; }
.detail-head h3 { font-size: 1.02rem; margin-bottom: 2px; }
.detail-addr { font-size: .82rem; color: var(--muted); }
.detail-fields { margin-top: 8px; }
.detail-field { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; padding: 6px 0; border-top: 1px solid var(--line); }
.detail-field span { color: var(--muted); }
.detail-field strong { text-align: right; font-weight: 700; }
.detail-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.detail-actions .btn { flex: 1; }

.mini-list {
  flex: 1; overflow-y: auto; margin-top: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px;
}
.mini-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent;
}
.mini-row:hover { background: rgba(26,114,65,.06); }
.mini-row.active { background: rgba(37,99,235,.09); border-color: rgba(37,99,235,.3); }
.mini-row-text { flex: 1; min-width: 0; }
.mini-row-name { font-weight: 700; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row-sub { font-size: .76rem; color: var(--muted); }
.mini-row-kw {
  flex-shrink: 0; font-size: .72rem; font-weight: 800; color: var(--blue-bright);
  background: rgba(37,99,235,.1); padding: 3px 8px; border-radius: 20px; margin-right: 6px;
}

.map-legend { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 18px 0 22px; }
.map-legend .item { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: var(--ink); }
.map-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.map-filters button {
  font-size: .78rem; font-weight: 700; padding: 7px 14px; border-radius: 20px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; color: var(--muted);
}
.map-filters button.active { border-color: var(--green); color: var(--green-dark); background: rgba(26,114,65,.08); }

.charger-popup { min-width: 220px; font-family: 'Manrope', sans-serif; }
.charger-popup h4 { margin: 0 0 4px; font-size: .95rem; }
.charger-popup .addr { font-size: .8rem; color: #667; margin-bottom: 8px; }
.charger-popup .btn { margin-top: 8px; width: 100%; }

/* ---------- Charger directory list (below map) ---------- */
.charger-list { margin-top: 30px; }
.charger-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px;
}
.charger-row .left { display: flex; align-items: center; gap: 14px; }
.charger-row .name { font-weight: 700; }
.charger-row .sub { font-size: .82rem; color: var(--muted); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .84rem; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-size: .76rem; color: var(--muted); margin-top: 4px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 9px;
  font-family: inherit; font-size: .92rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); }
textarea { resize: vertical; min-height: 90px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .form-row-2 { grid-template-columns: 1fr; } }

.alert { padding: 13px 16px; border-radius: 10px; font-size: .88rem; font-weight: 600; margin-bottom: 18px; }
.alert-success { background: rgba(22,163,74,.12); color: #14532d; border: 1px solid rgba(22,163,74,.3); }
.alert-error { background: rgba(220,38,38,.1); color: #7f1d1d; border: 1px solid rgba(220,38,38,.3); }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--charcoal); color: #cfd6d1; padding: 56px 0 26px; }
footer.site-footer h4 { color: #fff; font-size: .92rem; margin-bottom: 14px; }
footer.site-footer a { color: #b6bdb8; font-size: .88rem; display: block; margin-bottom: 8px; }
footer.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; font-size: .78rem; color: #8a938c; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;}

/* ---------- Admin ---------- */
.admin-body { background: #f1f3f1; min-height: 100vh; font-family: 'Manrope', sans-serif; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--charcoal); color: #dfe4e0; padding: 24px 16px; }
.admin-sidebar .brand { color: #fff; margin-bottom: 28px; padding: 0 8px; }
.admin-sidebar a { display: block; padding: 10px 12px; border-radius: 8px; font-size: .88rem; font-weight: 600; color: #c7ceca; margin-bottom: 2px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar .divider { height: 1px; background: rgba(255,255,255,.1); margin: 14px 0; }
.admin-main { padding: 32px 36px; max-width: 1100px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-topbar h1 { font-size: 1.5rem; margin: 0; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.admin-table th { background: #f6f7f5; font-weight: 800; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-actions { display: flex; gap: 8px; }
.admin-card { background: #fff; border-radius: 14px; padding: 26px; box-shadow: var(--shadow); }
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--charcoal); }
.admin-login-card { background: #fff; padding: 40px; border-radius: 16px; width: 100%; max-width: 380px; text-align: center; }
.admin-login-card img { width: 200px; height: auto; margin: 0 auto 20px; }
.pill { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.pill-existing { background: rgba(37,99,235,.12); color: #1d4ed8; }
.pill-proposed { background: rgba(240,82,35,.12); color: var(--orange-dark); }

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; overflow-x: auto; gap: 4px; padding: 14px; }
  .admin-sidebar .brand { display: none; }
  .admin-sidebar .divider { display: none; }
  .admin-main { padding: 22px 18px; }
}
