/* ============================================================
   Land's Garage — Slate & Amber
   Dark (default): charcoal cloth #2A323A · amber gold #D4A017 · cream #EDE8DC · navy #1E3A56
   Light:          canvas #F0EDE6 · charcoal #2A323A · muted amber #B88808
   Bright accent:  amber gold (satisfies high-visibility requirement)
   Fonts: Saira Condensed · Barlow · IBM Plex Mono
   ============================================================ */

/* ─── DARK MODE (default) ─── */
:root {
  --floor:       #2A323A;   /* body / page bg — charcoal twill */
  --surface:     #343E47;   /* card / panel bg */
  --lift:        #3D4852;   /* table headers, hover fills, secondary bg */
  --ink:         #EDE8DC;   /* primary text — warm cream */
  --ink-soft:    #C7CDD3;   /* secondary text — steel grey */
  --line:        #505C66;   /* borders */

  --amber:       #D4A017;   /* PRIMARY bright accent — amber gold */
  --amber-dark:  #B88A10;   /* hover / active */
  --amber-glow:  #EBC230;   /* light amber for text on dark */

  --navy:        #1E3A56;   /* secondary accent — logo edge */
  --navy-dark:   #142A40;
  --navy-light:  #2E5078;

  --hazard:      #D4A017;
  --ok:          #3A8C5A;
  --bad:         #C44040;

  /* backward-compat aliases */
  --orange:      var(--amber);
  --orange-dark: var(--amber-dark);
  --steel:       var(--navy);
  --steel-dark:  var(--navy-dark);

  --radius:  6px;
  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --body:    "Barlow", "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", "Consolas", monospace;
}

/* ─── LIGHT MODE ─── */
[data-theme="light"] {
  --floor:      #F0EDE6;   /* warm canvas */
  --surface:    #FAFAF7;   /* near-white panels */
  --lift:       #E6E2D8;   /* table headers, secondary bg */
  --ink:        #2A323A;   /* charcoal text */
  --ink-soft:   #48525B;
  --line:       #CCC8BE;

  --amber:      #B88808;   /* darker amber for contrast on light */
  --amber-dark: #9A7206;
  --amber-glow: #C49A0A;

  --navy:       #1E3A56;
  --navy-dark:  #142A40;
  --navy-light: #2E5078;

  --ok:         #2E7D4F;
  --bad:        #B3261E;
}

/* ─── RESET ─── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--floor);
  transition: background 0.22s, color 0.22s;
}

a { color: var(--amber); }
a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ─── UTILITY BAR (always dark) ─── */
.utility-bar {
  background: #0D1820;
  color: #7AAABE;
  font-size: 0.85rem;
  padding: 6px 0;
}
.utility-bar .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.utility-bar a { color: var(--amber-glow); text-decoration: none; font-weight: 600; }

/* ─── HEADER ─── */
header.site {
  background: var(--surface);
  border-bottom: 4px solid var(--amber);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mark {
  font-family: var(--display); font-weight: 700; font-size: 1.9rem;
  text-transform: uppercase; letter-spacing: 0.5px; line-height: 1;
}
.brand .mark em { font-style: normal; color: var(--amber); }

/* ─── LOGO — larger ─── */
.brand-badge { height: 90px; width: auto; display: block; }
@media (max-width: 560px) { .brand-badge { height: 70px; } }

/* ─── NAV ─── */
nav.main { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
nav.main a {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 1px;
  font-size: 1.05rem; text-decoration: none; color: var(--ink-soft);
  padding: 8px 12px; border-radius: var(--radius);
}
nav.main a:hover { color: var(--ink); background: var(--lift); }
nav.main a.cta {
  background: var(--amber); color: #1C1208; font-weight: 600;
}
nav.main a.cta:hover { background: var(--amber-dark); color: #1C1208; }

/* ─── THEME TOGGLE BUTTON ─── */
.theme-toggle {
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  cursor: pointer;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--amber); border-color: var(--amber); }
.theme-toggle svg { display: block; }

/* Show sun (switch to light) in dark mode; show moon (switch to dark) in light mode */
.th-sun  { display: none; }
.th-moon { display: none; }
[data-theme="dark"]  .th-sun  { display: block; }
[data-theme="dark"]  .th-moon { display: none;  }
[data-theme="light"] .th-sun  { display: none;  }
[data-theme="light"] .th-moon { display: block; }
:root:not([data-theme]) .th-sun { display: block; }

/* ─── HAZARD STRIPE ─── */
.hazard {
  height: 10px;
  background: repeating-linear-gradient(135deg,
    var(--amber) 0 16px, var(--navy-dark) 16px 32px);
}

/* ─── HERO ─── */
.hero { background: var(--navy); padding: 64px 0 56px; }
[data-theme="light"] .hero { background: var(--surface); }

.hero .eyebrow {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--amber);
}
.hero h1 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 0.98;
  margin: 10px 0 16px; letter-spacing: 0.5px; color: #EDE8DC;
}
[data-theme="light"] .hero h1 { color: var(--ink); }
.hero h1 .accent { color: var(--amber); }
.hero p.lede {
  max-width: 56ch; font-size: 1.12rem; margin: 0 0 28px; color: #A8C0D0;
}
[data-theme="light"] .hero p.lede { color: var(--ink-soft); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ─── HERO TWO-COLUMN LAYOUT ─── */
.hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
}
.hero-text {
  flex: 1 1 auto;
  min-width: 0;
}
.hero-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-badge-img {
  width: clamp(220px, 28vw, 360px);
  height: auto;
  filter: drop-shadow(0 6px 32px rgba(0,0,0,0.55));
}
@media (max-width: 760px) {
  .hero-inner { flex-direction: column; gap: 32px; }
  .hero-brand { order: -1; }
  .hero-badge-img { width: clamp(160px, 52vw, 240px); }
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--display); text-transform: uppercase; letter-spacing: 1.2px;
  font-size: 1.05rem; padding: 12px 22px; border-radius: var(--radius);
}
.btn-primary { background: var(--amber); color: #1C1208; font-weight: 600; }
.btn-primary:hover { background: var(--amber-dark); }
.btn-secondary { background: var(--navy); color: #EDE8DC; }
.btn-secondary:hover { background: var(--navy-dark); }
.btn-quiet { background: var(--lift); color: var(--ink); border: 1px solid var(--line); }
.btn-quiet:hover { background: var(--line); }

/* ─── SECTIONS ─── */
section.block { padding: 52px 0; }
section.block h2 {
  font-family: var(--display); text-transform: uppercase; font-weight: 700;
  font-size: 2rem; letter-spacing: 0.5px; margin: 0 0 6px; color: var(--ink);
}
section.block .sub { color: var(--ink-soft); margin: 0 0 28px; max-width: 60ch; }

.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.service-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 16px;
  border-top: 3px solid var(--navy);
}
.service-card h3 {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.8px;
  margin: 0 0 6px; font-size: 1.15rem; color: var(--ink);
}
.service-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ─── FORMS ─── */
form.panel, .panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; max-width: 680px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block; font-family: var(--display); text-transform: uppercase;
  letter-spacing: 1px; font-size: 0.92rem; margin-bottom: 5px; color: var(--ink);
}
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--lift);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--amber);
  outline: 2px solid var(--amber);
  outline-offset: 0;
}
[data-theme="light"] .field input,
[data-theme="light"] .field select,
[data-theme="light"] .field textarea { background: #FBFCFC; }
.field textarea { min-height: 110px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.hint { font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }

/* ─── NOTICES ─── */
.notice {
  border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px;
  max-width: 680px; border: 1px solid;
}
.notice.ok  { background: #1A3D28; border-color: #3A8C5A; color: #7DD4A0; }
.notice.err { background: #3A1A1A; border-color: #C44040; color: #E89090; }
[data-theme="light"] .notice.ok  { background: #EAF5EE; border-color: #BCDFC9; color: #2E7D4F; }
[data-theme="light"] .notice.err { background: #FBEAE9; border-color: #EFC4C1; color: #B3261E; }

/* ─── REPAIR TRACKER ─── */
.ticket-tag {
  font-family: var(--mono); font-size: 1.25rem; letter-spacing: 2px;
  display: inline-block; background: var(--navy-dark); color: var(--amber);
  padding: 6px 14px; border-radius: 3px;
}
.lane { list-style: none; margin: 30px 0 10px; padding: 0; position: relative; }
.lane::before {
  content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px;
  width: 4px; background: var(--line); border-radius: 2px;
}
.lane li { position: relative; padding: 0 0 22px 40px; }
.lane li:last-child { padding-bottom: 0; }
.lane .dot {
  position: absolute; left: 0; top: 2px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--surface); border: 4px solid var(--line);
}
.lane li.done    .dot { border-color: var(--navy);  background: var(--navy); }
.lane li.current .dot { border-color: var(--amber); background: var(--surface); }
.lane .st {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 1px;
  font-size: 1.05rem; color: var(--ink-soft);
}
.lane li.done    .st { color: var(--navy-light); }
.lane li.current .st { color: var(--amber); }
.lane .when { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); }
.lane .note { font-size: 0.93rem; color: var(--ink-soft); margin-top: 2px; max-width: 56ch; }

/* ─── FOOTER (always dark) ─── */
footer.site { background: #0D1820; color: #7AAABE; margin-top: 56px; }
footer.site .wrap {
  padding: 36px 20px; display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
footer.site h4 {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 1px;
  color: #EDE8DC; margin: 0 0 8px;
}
footer.site a { color: var(--amber-glow); }
footer.site .fineprint {
  grid-column: 1 / -1; border-top: 1px solid #1E3A56;
  padding-top: 14px; font-size: 0.82rem;
}

/* ─── ADMIN ─── */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
@media (max-width: 760px) { .admin-shell { grid-template-columns: 1fr; } }

.admin-nav { background: #0D1820; padding: 20px 14px; }
.admin-nav .brand-sm {
  font-family: var(--display); text-transform: uppercase; color: #EDE8DC;
  font-size: 1.2rem; letter-spacing: 1px; display: block;
  margin-bottom: 18px; text-decoration: none;
}
.admin-nav .brand-sm em { font-style: normal; color: var(--amber); }
.admin-nav a.item {
  display: block; color: #7AAABE; text-decoration: none; padding: 9px 12px;
  border-radius: var(--radius); font-family: var(--display); text-transform: uppercase;
  letter-spacing: 1px; font-size: 1rem; margin-bottom: 2px;
}
.admin-nav a.item:hover { background: #1A2830; color: #EDE8DC; }
.admin-nav a.item.active { background: var(--amber); color: #1C1208; font-weight: 600; }
.admin-main { padding: 28px 30px; background: var(--floor); min-height: 100vh; }
.admin-main h1 {
  font-family: var(--display); text-transform: uppercase;
  letter-spacing: 0.5px; margin: 0 0 20px; color: var(--ink);
}

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 5px solid var(--navy);
  border-radius: var(--radius); padding: 14px 16px;
}
.stat .n { font-family: var(--display); font-size: 2.2rem; font-weight: 700; line-height: 1; color: var(--ink); }
.stat .l { font-size: 0.85rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 1px; }
.stat.warn { border-left-color: var(--amber); }

table.data {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
table.data th {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem;
  text-align: left; background: var(--lift); color: var(--ink);
  padding: 10px 12px; border-bottom: 2px solid var(--line);
}
table.data td {
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  vertical-align: top; font-size: 0.95rem; color: var(--ink);
}
table.data tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

/* ─── STATUS PILLS ─── */
.pill {
  display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.5px;
}
/* dark (default) */
.pill.Pending,   .pill.Received  { background: rgba(212,160,23,0.18); color: #EBC230; }
.pill.Confirmed, .pill.Diagnosing,
.pill.In.repair, .pill.repair    { background: rgba(30,58,86,0.55);   color: #9BBDD4; }
.pill.Completed, .pill.Ready,
.pill.Picked                     { background: rgba(58,140,90,0.22);  color: #7DD4A0; }
.pill.Declined                   { background: rgba(196,64,64,0.22);  color: #E89090; }
.pill.Awaiting,  .pill.Quality   { background: rgba(212,160,23,0.14); color: #D4A017; }

/* light overrides */
[data-theme="light"] .pill.Pending,
[data-theme="light"] .pill.Received  { background: #FFF3E0; color: #9A7206; }
[data-theme="light"] .pill.Confirmed,
[data-theme="light"] .pill.Diagnosing,
[data-theme="light"] .pill.In.repair,
[data-theme="light"] .pill.repair    { background: #E8F0F5; color: #1E3A56; }
[data-theme="light"] .pill.Completed,
[data-theme="light"] .pill.Ready,
[data-theme="light"] .pill.Picked    { background: #EAF5EE; color: #2E7D4F; }
[data-theme="light"] .pill.Declined  { background: #FBEAE9; color: #B3261E; }
[data-theme="light"] .pill.Awaiting,
[data-theme="light"] .pill.Quality   { background: #FBF3D7; color: #8A6A06; }

/* ─── INLINE FORM ─── */
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input {
  padding: 6px 8px; font: inherit; font-size: 0.9rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--lift);
}
.btn-sm { font-size: 0.85rem; padding: 7px 12px; }

/* ─── UTILITIES ─── */
.mono  { font-family: var(--mono); }
.muted { color: var(--ink-soft); }
.mb    { margin-bottom: 24px; }

/* ─── SITE EDITOR ─── */
.ed-h { font-family: var(--display); text-transform: uppercase; font-size: 1.15rem; margin: 18px 0 12px; color: var(--ink); }
.panel .ed-h:first-child { margin-top: 0; }
.dnd-list { list-style: none; margin: 0 0 16px; padding: 0; }
.dnd-item {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--lift); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px;
}
.dnd-item.dragging { opacity: 0.45; border-style: dashed; }
.order-saved .dnd-item { border-color: var(--ok); transition: border-color 0.3s; }
.dnd-handle {
  cursor: grab; user-select: none; font-size: 1.2rem; line-height: 1.6;
  color: var(--ink-soft); padding: 4px 6px;
}
.dnd-handle:active { cursor: grabbing; }
.dnd-form { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; align-items: center; }
.dnd-form input, .dnd-form textarea {
  padding: 8px 10px; font: inherit; font-size: 0.93rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.dnd-form input[name="name"], .dnd-form input[name="heading"] { flex: 1 1 180px; font-weight: 600; }
.dnd-form input[name="description"] { flex: 2 1 280px; }
.dnd-form-stack { flex-direction: column; align-items: stretch; }
.dnd-form-stack textarea { min-height: 70px; resize: vertical; }
.dnd-actions { display: flex; gap: 10px; align-items: center; }
.chk { display: inline-flex; gap: 5px; align-items: center; font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; }
.add-form { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px; }
