/* Penny UI — one shared design system for every page (the console keeps its own
   bespoke brand.css). Penny-Blue accent on a light surface; one voice everywhere.
   Surfaces use CSS variables so a garage's published theme overrides them. */

:root {
  --paper:#EEF3F8; --panel:#FFFFFF; --ink:#0B1B2B; --muted:#6B7B8B;
  --line:#D7E0E8; --blue:#00AEFE; --accent:#0095DB;
  --ok-bg:#e7f4ec; --ok:#1b6b46; --warn-bg:#fbf0db; --warn:#9a6b00;
  --bad-bg:#fdeceb; --bad:#a6312a; --shadow:0 18px 45px rgba(11,27,43,.10);
  --radius:18px; color-scheme: light;
  /* Match the console (brand.css): Inter body, Georgia-serif headings. */
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
  font-family: var(--font);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }

/* ----- page chrome ------------------------------------------------------- */
.appbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  gap: 14px; padding: 12px 20px; background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.appbar .logo { height: 28px; display: block; }
.appbar .title { font-family: var(--font-head); font-weight: 700; font-size: 17px; }
.appbar .title .sub { color: var(--muted); font-weight: 500; }
.appbar .spacer { flex: 1; }
.appbar a, .appbar .navlink { color: var(--blue); text-decoration: none; font-weight: 700; font-size: 14px; }
.appbar a:hover { text-decoration: underline; }
/* Shared top navigation (the _nav.html partial), consistent on every screen. */
.appnav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.appnav a, .appnav .navmenu > summary, .appnav form button { color: var(--blue); text-decoration: none; font-weight: 700; font-size: 14px; background: none; border: 0; cursor: pointer; padding: 0; font: inherit; }
.appnav a:hover, .appnav .navmenu > summary:hover { text-decoration: underline; }
.appnav a.on { color: var(--ink); text-decoration: none; cursor: default; }
.navmenu { position: relative; }
.navmenu > summary { list-style: none; }
.navmenu > summary::-webkit-details-marker { display: none; }
.navmenu > summary::after { content: " \25BE"; }
.navmenu-panel { position: absolute; right: 0; top: calc(100% + 8px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; min-width: 190px; z-index: 50; }
.navmenu-panel a { padding: 9px 12px; border-radius: 8px; white-space: nowrap; }
.navmenu-panel a:hover { background: var(--paper); text-decoration: none; }

.wrap { width: min(960px, calc(100% - 36px)); margin: 26px auto 56px; }
.wrap.narrow { width: min(640px, calc(100% - 36px)); }
.head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
h1, .h1 { font-family: var(--font-head); font-weight: 700; font-size: 26px; margin: 0; letter-spacing: -.02em; }
h2, .h2 { font-family: "Poppins", system-ui, sans-serif; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 28px 0 10px; }
.lead { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 8px; }
.muted { color: var(--muted); }

/* ----- cards ------------------------------------------------------------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat { font-family: var(--font-head); font-size: 34px; font-weight: 700; line-height: 1; }
.stat-label { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* ----- buttons ----------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; padding: 11px 18px; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; text-decoration: none; line-height: 1; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary:disabled { background: #b9c2bb; cursor: default; filter: none; }
.btn.ghost { background: var(--panel); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--paper); }
.btn.danger { background: var(--panel); border-color: #eccfcb; color: var(--bad); }
.btn.sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }

/* ----- form fields ------------------------------------------------------- */
.field { display: block; margin-bottom: 14px; }
.field > .label, label .label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input, select, textarea { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--panel); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,174,254,.18); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }

/* ----- tables ------------------------------------------------------------ */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ----- pills / badges / plate ------------------------------------------- */
.pill { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 20px; background: var(--paper); color: #41566a; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.reg { font-family: "Poppins", system-ui, sans-serif; font-weight: 700; letter-spacing: .06em; background: #FFD400; color: #0B1B2B; padding: 4px 10px; border-radius: 6px; border: 1px solid #d9b600; font-size: 15px; }
.reg.none { background: var(--paper); color: var(--muted); border-color: var(--line); letter-spacing: normal; }

/* ----- states ------------------------------------------------------------ */
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 34px; text-align: center; color: var(--muted); }
.banner { border-radius: 12px; padding: 13px 16px; margin: 0 0 16px; font-size: 14px; border: 1px solid var(--line); background: var(--panel); }
.banner.info { background: #e6f5ff; color: #0a6aa3; border-color: #bfe6fb; }
.banner.warn { background: var(--warn-bg); color: var(--warn); border-color: #efdcb4; }
.banner.bad { background: var(--bad-bg); color: var(--bad); border-color: #eccfcb; }
.banner b { font-weight: 800; }

/* ----- auth / centered-card pages --------------------------------------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .box { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: var(--shadow); }
.auth .logo { height: 55px; display: block; margin: 0 0 16px; }
.auth h1 { font-size: 24px; margin: 0 0 8px; }
.auth p { color: var(--muted); line-height: 1.5; margin: 0 0 4px; }
.auth label { display: block; margin: 16px 0 6px; font-weight: 700; }
.auth .hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.auth .btn.primary { width: 100%; justify-content: center; margin-top: 22px; padding: 13px; }
.auth .links { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; font-size: 14px; }
.auth .links a { font-weight: 700; text-decoration: none; }
.auth .links a:hover { text-decoration: underline; }
.steps { display: flex; gap: 8px; margin: 0 0 18px; }
.steps span { flex: 1; height: 6px; border-radius: 4px; background: var(--line); }
.steps span.on { background: var(--blue); }
.kicker { color: var(--blue); font-weight: 800; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
