:root{
  --bg:#e6e8ec;
  --paper:#fff;
  --ink:#111418;
  --muted:#5c636e;
  --line:#d5d8de;
  --dark:#111418;
  --dark-2:#1a1e24;
  --accent:#f0b429;
  --accent-ink:#1a1404;
  --ok:#1f7a45;
  --warn:#9a5b12;
  --closed:#c62828;
  --shadow:0 8px 24px rgba(17,20,24,.08);
  --radius:8px;
  --ease:cubic-bezier(.22,.7,.25,1);
  --display:"Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --sans:"IBM Plex Sans", "Segoe UI", Arial, sans-serif;
}

*{box-sizing:border-box}
html{
  -webkit-text-size-adjust:100%;
}
html,body{margin:0}
body{
  font-family: var(--sans);
  background: var(--bg);
  color:var(--ink);
  min-height:100vh;
}
.bg{display:none}
.hidden{display:none !important}

.ico{
  width:22px; height:22px;
  display:block;
  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.ico.lg{width:24px; height:24px}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 22px;
  background: var(--dark);
  color:#f4f5f7;
  border-bottom: 3px solid var(--accent);
  position:sticky; top:0; z-index:20;
}
.brand{display:flex; align-items:center; gap:12px; min-width:0; color:inherit; text-decoration:none;}
.logo{
  width:44px; height:44px;
  object-fit:contain;
  border-radius:6px;
  flex:0 0 auto;
  background: var(--dark);
}
#brandLogo,
#footerLogo{
  filter: none;
}
.brandTitle{
  font-family: var(--display);
  font-weight:700;
  font-size:26px;
  letter-spacing:.03em;
  text-transform:none;
  line-height:1.05;
}
.brandSub{font-size:12px; color:#b8bec8; font-weight:500; margin-top:4px}
.status{display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
.pill{
  padding:8px 12px; border-radius:4px;
  background: transparent;
  border:1px solid #3a404a;
  font-size:12px; color:#c5cad3;
  font-weight:600;
  text-decoration:none;
}
.pill.open{
  color: #d4f5e0;
  background: #163524;
  border-color: #2a6b45;
}
.pill.closed{
  color: #ffd0d0;
  background: #3a1515;
  border-color: #7a3030;
}
.phonePill{
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  font-weight:700;
}
.phonePill:hover{filter:brightness(.95)}
.topbar .ghost{
  color:#f4f5f7;
  border-color:#3a404a;
  background:transparent;
}
.topbar .ghost:hover{background:#252a32; border-color:#5a6270}

.wrap{padding:24px 18px 12px; max-width:1120px; margin:0 auto; position:relative; z-index:2;}
.panel{display:none}
.panel.active{display:block}

.card{
  background: var(--paper);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:22px;
}

.row{display:flex; gap:10px; align-items:center}
.row.right{justify-content:flex-end}
.row.between{justify-content:space-between; flex-wrap:wrap}
.row.wrap{flex-wrap:wrap}
.gap{height:12px}

.primary,.ghost{
  border-radius:6px; padding:12px 16px;
  font-weight:650; border:1px solid transparent;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  transition: background .15s var(--ease), border-color .15s var(--ease), filter .15s var(--ease);
  color:inherit;
  background:none;
  font-family:inherit;
}
.primary{
  background: var(--dark);
  color:#fff;
}
.primary:hover{background:#000; filter:none}
.ghost{
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.ghost:hover{border-color:#9aa1ab; background:#f7f8fa}
.primary:disabled,.ghost:disabled{opacity:.45; cursor:not-allowed}

label{display:block; font-size:12px; color:var(--muted); margin-bottom:6px; font-weight:600}
input,select,textarea{
  width:100%;
  border-radius:6px; padding:11px 12px;
  border:1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight:500;
  outline:none;
  font-family:inherit;
}
textarea{min-height:110px; resize:vertical; font-weight:400; line-height:1.5}
input:focus,select:focus,textarea:focus{
  border-color: var(--dark);
  box-shadow:0 0 0 3px rgba(17,20,24,.12);
}

.muted{color:var(--muted)}
.small{font-size:12px}
.panelTop{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-bottom:14px;
}
.panelTitle{
  font-family: var(--display);
  font-weight:700;
  font-size:22px;
  letter-spacing:.03em;
  text-transform:uppercase;
}

.hero{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}
@media(min-width:960px){
  .hero{grid-template-columns: 1.15fr .85fr; align-items:stretch;}
}
.heroLeft{
  background: var(--dark);
  color:#f4f5f7;
  border:0;
  border-radius: var(--radius);
  padding:36px 32px 28px;
  position:relative;
  overflow:hidden;
  box-shadow: var(--shadow);
}
.heroLeft::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:6px;
  background: var(--accent);
}
.heroBadge{
  display:inline-flex;
  color: var(--accent);
  font-weight:700;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.heroLeft .heroTitle,
.heroTitle{
  margin:12px 0 12px;
  font-family: var(--display);
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing:.02em;
  font-weight:700;
  line-height:.95;
  text-transform:uppercase;
  color:inherit;
}
.heroLeft .heroText,
.heroText{margin:0; color: #c5cad3; line-height:1.55; max-width: 42ch; font-size:16px; font-weight:400;}
.heroOpen{
  margin:18px 0 0;
  font-weight:650;
  color: #fff;
}
.heroFacts{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:20px;
}
.heroFacts span{
  padding:7px 10px;
  border-radius:4px;
  background: #1c2128;
  border:1px solid #323844;
  font-size:13px;
  font-weight:600;
  color:#d7dbe2;
}
.heroRight{display:flex; flex-direction:column; gap:10px;}

.tile{
  border-radius: var(--radius);
  border:1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding:16px 18px;
  cursor:pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
  text-align:left;
  color:inherit;
  width:100%;
  font-family:inherit;
}
.tile:hover{
  border-color: var(--dark);
  background:#fafbfc;
}
.tile.primaryTile{
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.tile.primaryTile:hover{filter:brightness(.97); background: var(--accent)}
.tile.primaryTile .tileText,
.tile.primaryTile .tileCta{color: var(--accent-ink); opacity:.8}
.tileTop{display:flex; align-items:flex-start; gap:14px;}
.tileIcon{
  width:42px; height:42px;
  border-radius:6px;
  border:1px solid var(--line);
  background: #f3f4f6;
  color: var(--ink);
  display:flex; align-items:center; justify-content:center;
  flex:0 0 auto;
}
.tile.primaryTile .tileIcon{
  background: rgba(17,20,24,.1);
  border-color: transparent;
}
.tileTitle{
  font-family: var(--display);
  font-size:22px;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.tileText{color:var(--muted); margin-top:4px; font-size:13px; line-height:1.45; font-weight:450}
.tileCta{margin-top:12px; font-weight:700; color:var(--ink); font-size:12px; letter-spacing:.06em; text-transform:uppercase}

.localStrip{
  margin-top:18px;
  display:grid;
  gap:10px;
}
@media(min-width:800px){.localStrip{grid-template-columns:1fr 1fr 1fr;}}
.localCard{
  background: var(--paper);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:18px 16px 16px;
  box-shadow: var(--shadow);
}
.localIco{
  width:36px; height:36px;
  border-radius:6px;
  background: var(--dark);
  color: var(--accent);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:12px;
}
.localCard h2{
  margin:0 0 8px;
  font-family: var(--display);
  font-size:20px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.localCard p{
  margin:0;
  color:var(--muted);
  line-height:1.5;
  font-size:14px;
}

.servicesBand{
  margin-top:18px;
  background: var(--paper);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:24px 22px;
  box-shadow: var(--shadow);
}
.sectionKicker{
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-weight:700;
  color: var(--muted);
}
.sectionTitle{
  margin:6px 0 0;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 36px);
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.serviceGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1px;
  margin-top:18px;
  background: var(--line);
  border:1px solid var(--line);
}
@media(min-width:720px){.serviceGrid{grid-template-columns:1fr 1fr 1fr;}}
.serviceGrid article{
  background: #fff;
  padding:16px 14px;
}
.serviceGrid strong{
  display:block;
  font-family: var(--display);
  font-size:18px;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.serviceGrid span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
}

.visit{
  margin-top:18px;
  display:grid;
  gap:12px;
}
@media(min-width:960px){.visit{grid-template-columns: .9fr 1.1fr;}}
.visitCard{
  background: var(--paper);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:24px 22px;
  box-shadow: var(--shadow);
}
.visitLead{
  color:var(--muted);
  line-height:1.55;
  margin:12px 0 0;
}
.visitList{
  list-style:none;
  padding:0;
  margin:18px 0 0;
  display:grid;
  gap:10px;
}
.visitList li{
  display:grid;
  gap:2px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line);
}
.visitList span{
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:700;
}
.visitList b{font-weight:650}
.visitList a{color:inherit; text-decoration:none}
.visitList a:hover{text-decoration:underline}
.visitActions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.mapCard{min-width:0}
.mapFrame{
  position:relative;
  border-radius: var(--radius);
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow: var(--shadow);
  min-height:340px;
  background:#d8dce2;
}
.mapFrame iframe{
  display:block;
  width:100%;
  height:360px;
  border:0;
}
.mapBadge{
  position:absolute;
  left:12px;
  bottom:12px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:4px;
  background: var(--dark);
  color:#fff;
  font-weight:700;
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-family: var(--display);
}
.mapCredit{
  display:inline-block;
  margin-top:8px;
  color:var(--muted);
  font-size:12px;
  font-weight:600;
}

.contact{
  margin-top:16px;
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
@media(min-width:720px){.contact{grid-template-columns:1fr 1fr 1fr;}}
.contact a,.contact div{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px 16px;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background: var(--paper);
  color:inherit;
  text-decoration:none;
  box-shadow: var(--shadow);
}
.contact a:hover{border-color: var(--dark)}
.contactIco{
  width:36px; height:36px;
  border-radius:6px;
  background: var(--dark);
  color: var(--accent);
  display:flex; align-items:center; justify-content:center;
  flex:0 0 auto;
}
.contactLbl{font-size:11px; color:var(--muted); font-weight:600; letter-spacing:.06em; text-transform:uppercase}
.contactVal{font-weight:650; margin-top:2px}

.formGrid{display:grid; grid-template-columns:1fr; gap:12px;}
@media(min-width:720px){.formGrid{grid-template-columns:1fr 1fr;}}
@media(min-width:980px){.formGrid.three{grid-template-columns:1fr 1fr 1fr;}}

.chips{display:flex; flex-wrap:wrap; gap:8px;}
.chip{
  border-radius:4px;
  border:1px solid var(--line);
  background: #fff;
  color:var(--ink);
  padding:9px 12px;
  font-weight:600;
  cursor:pointer;
  font-family:inherit;
}
.chip:hover{border-color: var(--dark)}
.chip.active{
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
}
.chip:disabled{opacity:.35; cursor:not-allowed}
.chip.day{min-width:92px}
.chip.time{min-width:72px; text-align:center}

.itemList{display:flex; flex-direction:column; gap:12px; margin-top:12px}
.item{
  border:1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding:14px;
}
.itemTop{display:flex; justify-content:space-between; gap:10px; align-items:flex-start;}
.itemTitle{font-size:16px; font-weight:700}
.itemMeta{color:var(--muted); font-size:13px; margin-top:4px; line-height:1.5}
.badges{display:flex; gap:8px; flex-wrap:wrap; margin-top:8px}
.badge{
  padding:4px 8px;
  border-radius:4px;
  border:1px solid var(--line);
  background: #f3f4f6;
  color: var(--muted);
  font-size:12px;
  font-weight:650;
}
.badge.wait{border-color:#ead7b4; background:#fbf4e6; color:#7a5420}
.badge.ok{border-color:#b7dcc6; background:#e8f6ee; color:#1f5a38}
.badge.work{border-color:#111418; background: var(--dark); color: var(--accent)}

.empty{
  padding:22px 14px;
  text-align:center;
  color:var(--muted);
  border:1px dashed var(--line);
  border-radius:6px;
  background:#fafbfc;
}

.tireSeason{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.tirePhotos{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
  gap:8px;
  margin-top:12px;
}
.tireShot{
  display:block;
  width:100%;
  padding:0;
  border:1px solid var(--line);
  border-radius:8px;
  overflow:hidden;
  background:#f3f4f6;
  cursor:zoom-in;
}
.tireShot img{
  display:block;
  width:100%;
  aspect-ratio:1;
  object-fit:cover;
}
.tireLightbox{
  position:fixed;
  inset:0;
  z-index:80;
  background:rgba(17,20,24,.88);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  cursor:zoom-out;
}
.tireLightbox img{
  max-width:min(96vw,1100px);
  max-height:92vh;
  object-fit:contain;
  border-radius:8px;
}
#tireCode{
  width:100%;
  max-width:180px;
  letter-spacing:.2em;
  font-size:20px;
  font-weight:700;
  text-align:center;
}

.quoteTable{width:100%; border-collapse:collapse; margin-top:10px}
.quoteTable th,.quoteTable td{
  text-align:left; padding:8px 6px;
  border-bottom:1px solid var(--line);
  font-size:13px;
}
.quoteTable th{color:var(--muted); font-size:11px; font-weight:700}
.quoteTable .num,.totals .num,.quoteSub .num{text-align:right; font-variant-numeric:tabular-nums}
.quoteBlock{margin-top:16px}
.quoteBlock h4{
  margin:0 0 4px;
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}
.quoteSub{
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid var(--line);
  font-weight:700;
  font-size:13px;
}
.totals{margin-top:12px; display:grid; gap:4px; justify-items:end}
.totals div{min-width:220px; display:flex; justify-content:space-between; gap:16px}
.totals .gross{font-weight:700; font-size:18px}

.toast{
  position:fixed; left:50%; bottom:18px; transform:translateX(-50%) translateY(16px);
  background: var(--dark);
  color:#fff;
  padding:12px 16px;
  border-radius:6px;
  box-shadow: var(--shadow);
  opacity:0; pointer-events:none;
  transition: .2s var(--ease);
  z-index:80;
  font-weight:600;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0)}
.toast.err{background:var(--closed)}
.toast.ok{background:var(--ok)}

.siteFooter{
  margin: 24px 0 0;
  padding: 22px 18px 28px;
  background: var(--dark);
  color:#b8bec8;
  text-align:center;
  font-size:13px;
  line-height:1.6;
}
.footerBrand{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  margin-bottom:8px;
  color:#fff;
}
.footerBrand img{
  width:36px;
  height:36px;
  border-radius:6px;
}
.footerBrand strong{
  display:block;
  font-size:16px;
  font-family: var(--display);
  letter-spacing:.06em;
  text-transform:uppercase;
}
.footerBrand div{font-size:13px; color:#b8bec8; font-weight:450}

.loginWrap{max-width:440px; margin:48px auto; padding:0 16px}
.loginCard{padding:28px}
.pinInput{letter-spacing:.3em; font-size:22px}
.dash{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px;
  margin-bottom:16px;
}
@media(min-width:800px){.dash{grid-template-columns:repeat(4,1fr)}}
.stat{
  background: var(--paper);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:16px;
  box-shadow: var(--shadow);
}
.statNum{
  font-family: var(--display);
  font-size:32px;
  font-weight:700;
  line-height:1;
}
.statLbl{color:var(--muted); font-size:12px; margin-top:6px; font-weight:600}
.tabs{display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px}
.search{width:100%}

@media (max-width: 720px){
  body{min-height:100dvh}
  input,select,textarea{font-size:16px; padding:12px}
  .topbar{
    padding:10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    gap:8px;
  }
  .logo{width:38px; height:38px}
  .brand{min-width:0}
  .brandTitle{font-size:15px; letter-spacing:.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:42vw}
  .brandSub{display:none}
  .status{flex-shrink:0}
  .phonePill{
    display:inline-flex;
    padding:8px 10px;
    font-size:13px;
  }
  .wrap{
    padding:14px 12px 8px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .hero{gap:10px}
  .heroLeft{padding:20px 16px 16px}
  .heroLeft .heroTitle,
  .heroTitle{
    font-size:30px;
    line-height:1;
    margin:10px 0 8px;
  }
  .heroText{font-size:15px; max-width:none; line-height:1.5}
  .heroFacts{margin-top:14px}
  .tile{padding:14px; min-height:56px}
  .tileTitle{font-size:20px}
  .tileIcon{width:40px; height:40px}
  .tileCta{margin-top:10px}
  .mapFrame iframe{height:220px}
  .mapFrame{min-height:220px}
  .panelTop{flex-wrap:wrap}
  .panelTitle{font-size:20px}
  .card{padding:16px}
  .wrap .primary, .wrap .ghost, .panelTop .ghost{min-height:48px}
  .row.right{justify-content:stretch}
  .row.right .primary, .row.right .ghost{flex:1}
  .visitActions{flex-direction:column}
  .visitActions .primary,
  .visitActions .ghost{width:100%}
  .chips{gap:8px}
  .chip{min-height:44px; padding:10px 12px}
  .chip.day,.chip.time{min-width:0; flex:1 1 calc(33.33% - 8px)}
  .formGrid,.formGrid.three{grid-template-columns:1fr}
  .serviceGrid{grid-template-columns:1fr 1fr}
  .localStrip{grid-template-columns:1fr}
  .contact{grid-template-columns:1fr}
  .siteFooter{
    padding:18px 12px calc(22px + env(safe-area-inset-bottom, 0px));
    margin:16px 0 0;
  }
}

@media (max-width: 420px){
  .pill:not(.phonePill){display:none}
  .heroLeft .heroTitle,
  .heroTitle{font-size:26px}
  .heroFacts span{font-size:12px; padding:6px 8px}
}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation:none !important;
    transition:none !important;
  }
}

html[data-theme="dark"]{
  --bg:#111418;
  --paper:#1a1e24;
  --ink:#f4f5f7;
  --muted:#b8bec8;
  --line:#2c333c;
  --shadow:0 8px 24px rgba(0,0,0,.35);
}
html[data-theme="dark"] body{background:var(--bg); color:var(--ink);}
html[data-theme="dark"] .tile,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .localCard,
html[data-theme="dark"] .itemCard{background:var(--paper); color:var(--ink);}
html[data-theme="dark"] .empty,
html[data-theme="dark"] .tireShot{background:#12161c}
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select{
  background:#12161c;
  color:var(--ink);
  border-color:var(--line);
}
