/* RedLine Auto Repair — garage identity: charcoal steel, redline red,
   amber work-light. Deliberately NOT the Vajgrt Labs navy/sky palette:
   this demo wears the fictional shop's own colors (Wave 2 rule 13). */
:root {
  --char: #17181a;
  --char-2: #212226;
  --panel: #26272c;
  --panel-edge: #3a3b42;
  --paper: #f4f1ea;
  --ink: #23211c;
  --red: #d0342c;
  --red-dark: #a32318;
  --amber: #f2a61e;
  --cream: #efe9dc;
  --muted: #b9b4a6;
  --ok: #58c184;
  --radius: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  background: var(--char);
  color: var(--cream);
  line-height: 1.5;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; }
p { margin: 0 0 12px; }

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

/* Header */
.site-header { background: var(--char-2); border-bottom: 4px solid var(--red); }
.header-inner {
  max-width: 1160px; margin: 0 auto; padding: 16px 20px;
  display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline;
}
.brand {
  font-size: 1.7rem; font-weight: 900; letter-spacing: 0.06em;
  color: var(--cream); text-decoration: none; text-transform: uppercase;
}
.brand span { color: var(--red); }
.header-phone { color: var(--muted); font-weight: 700; margin: 0; }
.header-status { color: var(--muted); margin: 0; }
.open-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ok); margin-right: 6px;
}
.trust-strip { background: var(--red-dark); }
.trust-inner {
  max-width: 1160px; margin: 0 auto; padding: 7px 20px;
  display: flex; flex-wrap: wrap; gap: 6px 26px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}

/* Hero */
.hero { padding: 44px 0 10px; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; align-items: start; }
.eyebrow {
  color: var(--amber); font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.8rem;
}
.hero h1 { font-size: 2.35rem; text-transform: uppercase; letter-spacing: 0.01em; }
.hero-lede { color: var(--cream); font-size: 1.06rem; }
.pitch-strip {
  background: var(--char-2); border-left: 5px solid var(--amber);
  padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0;
}
.hero-instruction { color: var(--muted); }

.fact-card {
  background: var(--paper); color: var(--ink); border-radius: var(--radius);
  padding: 20px; border-top: 6px solid var(--red);
}
.card-kicker {
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--red-dark); margin-bottom: 10px;
}
.fact-list { margin: 0 0 14px; }
.fact-list div { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; border-bottom: 1px dashed #cfc8b8; }
.fact-list dt { font-weight: 700; color: #6b675c; }
.fact-list dd { margin: 0; font-weight: 700; text-align: right; }
.tally { background: #e9e2cf; border-radius: 8px; padding: 10px 14px; }
.tally p { margin: 0 0 4px; }

/* Stage track */
.board-section { padding: 26px 0 8px; }
.section-title { text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.35rem; }
.stage-track {
  list-style: none; display: flex; gap: 6px; margin: 0 0 8px; padding: 0;
}
.stage {
  flex: 1; text-align: center; padding: 12px 4px 10px;
  background: var(--char-2); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); color: var(--muted);
}
.stage-dot {
  display: block; width: 16px; height: 16px; margin: 0 auto 6px;
  border-radius: 50%; border: 3px solid var(--panel-edge); background: var(--char);
}
.stage-name { font-size: 0.83rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.stage.done { color: var(--cream); }
.stage.done .stage-dot { background: var(--ok); border-color: var(--ok); }
.stage.current { border-color: var(--amber); color: var(--amber); }
.stage.current .stage-dot { background: var(--amber); border-color: var(--amber); }
.stage-now { color: var(--muted); }
.stage-now strong { color: var(--amber); }

/* Main grid */
.main-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 26px; align-items: start; padding-bottom: 14px; }
.left-col { display: grid; gap: 22px; }

.advisor-card, .owner-panel {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 20px;
}
.advisor-card h3 { margin-bottom: 10px; }
.demo-label, .demo-label-dark {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.13em; color: var(--amber);
  text-transform: uppercase; margin-bottom: 8px;
}
.lever-row { display: flex; flex-wrap: wrap; gap: 9px; }
.job-note, .mock-note { color: var(--muted); font-size: 0.9rem; margin: 10px 0 0; }

.button {
  font: inherit; font-weight: 800; letter-spacing: 0.03em; cursor: pointer;
  border-radius: 8px; border: 2px solid transparent; padding: 10px 16px;
}
.button-primary { background: var(--red); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--red-dark); }
.button-secondary { background: var(--amber); color: #23190a; }
.button-reset { background: transparent; color: var(--muted); border-color: var(--panel-edge); }
.button:disabled { opacity: 0.38; cursor: not-allowed; }

/* Estimate */
.estimate-card {
  background: var(--paper); color: var(--ink); border-radius: var(--radius);
  padding: 20px; border-top: 6px solid var(--amber);
}
.estimate-card .job-note { color: #6b675c; }
.estimate-table { width: 100%; border-collapse: collapse; }
.estimate-table th, .estimate-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #d8d1bf; }
.estimate-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: #6b675c; }
.estimate-table tfoot td { font-weight: 800; border-bottom: none; }
.estimate-table tr.declined td { color: #8a8578; text-decoration: line-through; }
.line-status { font-weight: 700; color: var(--red-dark); }

/* Phone */
.phone-panel {
  background: #0e0e10; border: 1px solid var(--panel-edge);
  border-radius: 18px; padding: 18px;
}
.thread { display: grid; gap: 9px; max-height: 430px; overflow-y: auto; padding: 4px 2px 10px; }
.bubble { max-width: 88%; padding: 10px 13px; border-radius: 14px; }
.bubble p { margin: 0; }
.bubble-shop { background: #2c2d33; color: var(--cream); justify-self: start; border-bottom-left-radius: 4px; }
.bubble-dana { background: var(--amber); color: #23190a; justify-self: end; border-bottom-right-radius: 4px; font-weight: 600; }
.approve-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin: 8px 0 4px; }
.approve-prompt { margin: 0; color: var(--muted); font-weight: 700; }
.button-approve { background: var(--ok); color: #0c2416; }
.button-approve-alt { background: var(--cream); color: var(--ink); }
.ask-form { margin-top: 12px; }
.ask-form label { display: block; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.ask-row { display: flex; gap: 8px; }
.ask-row input {
  flex: 1; font: inherit; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--panel-edge); background: var(--char-2); color: var(--cream);
}
.button-send { background: var(--red); color: #fff; }
.chip {
  margin-top: 10px; font: inherit; font-size: 0.88rem; cursor: pointer;
  background: transparent; color: var(--amber); border: 1px dashed var(--amber);
  border-radius: 999px; padding: 6px 12px;
}

/* Owner board */
.owner-panel h2 { font-size: 1.25rem; text-transform: uppercase; }
.bays { display: grid; gap: 12px; }
.bay-card { background: var(--char-2); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 14px 16px; }
.bay-card.bay-live { border-color: var(--red); box-shadow: inset 4px 0 0 var(--red); }
.bay-head { display: flex; justify-content: space-between; margin: 0 0 4px; }
.bay-tech { color: var(--muted); font-size: 0.88rem; }
.bay-vehicle { font-weight: 800; margin: 0 0 2px; }
.bay-job, .bay-status, .bay-amount { margin: 0 0 2px; color: var(--muted); }
.bay-status strong, .bay-amount strong { color: var(--cream); }
.day-total { margin-top: 14px; background: var(--char-2); border-radius: var(--radius); padding: 12px 16px; }
.day-total p { margin: 0 0 4px; }
.day-total strong { color: var(--amber); font-size: 1.15rem; }

/* View toggle */
.view-bar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px 18px; padding-top: 22px;
}
.view-toggle {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--char-2); border: 1px solid var(--panel-edge); border-radius: 999px;
}
.view-btn {
  font: inherit; font-weight: 800; letter-spacing: 0.03em; cursor: pointer;
  background: transparent; color: var(--muted);
  border: 2px solid transparent; border-radius: 999px; padding: 8px 18px;
}
.view-btn:hover { color: var(--cream); }
.view-btn.is-active { background: var(--red); color: #fff; }
.view-hint { color: var(--muted); margin: 0; font-size: 0.92rem; }
.view-hint strong { color: var(--amber); }

/* Owner Admin — RO book */
.admin-panel { padding: 26px 0 8px; }
.admin-card {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 22px;
}
.admin-card h2 { font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-sub { color: var(--muted); max-width: 660px; }
.admin-headline {
  background: var(--char-2); border-left: 5px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; margin: 16px 0 20px;
}
.admin-headline-label {
  margin: 0; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--muted);
}
.admin-headline-value { margin: 0; font-size: 2.1rem; font-weight: 900; color: var(--amber); line-height: 1.15; }
.admin-headline-note { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }
.admin-subhead { text-transform: uppercase; letter-spacing: 0.05em; font-size: 1rem; margin: 20px 0 10px; }
.ro-list { display: grid; gap: 12px; }
.ro-card { background: var(--char-2); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 14px 16px; }
.ro-card.ro-live { border-color: var(--red); box-shadow: inset 4px 0 0 var(--red); }
.ro-head { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 4px; }
.ro-tech { color: var(--muted); font-size: 0.88rem; }
.ro-vehicle { font-weight: 800; margin: 0 0 2px; }
.ro-status, .ro-lines, .ro-amount { margin: 0 0 2px; color: var(--muted); }
.ro-status strong, .ro-amount strong { color: var(--cream); }
.approval-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.log-entry {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  background: var(--char-2); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 10px 14px;
}
.log-entry.log-yours { border-color: var(--amber); box-shadow: inset 4px 0 0 var(--amber); }
.log-time { font-weight: 800; color: var(--amber); white-space: nowrap; }
.log-badge {
  background: var(--amber); color: #23190a; border-radius: 999px; padding: 2px 9px;
  font-size: 0.7rem; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap;
}
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0 4px; }
.admin-stat {
  background: var(--char-2); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 12px 8px; text-align: center;
}
.stat-num { display: block; font-size: 1.45rem; font-weight: 900; color: var(--cream); line-height: 1.2; }
.stat-label {
  color: var(--muted); font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.admin-insight {
  background: var(--char-2); border-left: 5px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 12px 16px; margin: 16px 0 0;
}

/* Notes + footer */
.notes-section { padding: 30px 0 44px; }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.notes-grid ul { margin: 0; padding-left: 20px; }
.notes-grid li { margin-bottom: 8px; }
.price-line { font-size: 1.05rem; }
.price-line strong, .audit-line { color: var(--amber); }
.site-footer { border-top: 1px solid var(--panel-edge); padding: 20px 0 30px; color: var(--muted); }
.sr-only { position: absolute; left: -9999px; }

@media (max-width: 820px) {
  .hero-grid, .main-grid, .notes-grid { grid-template-columns: 1fr; }
  .stage-track { flex-wrap: wrap; }
  .stage { flex: 1 1 30%; }
  .hero h1 { font-size: 1.8rem; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
