/* DriverLock creator pages. Colors and type match driverlock.app:
   ink navy, one electric-blue accent, a pale canvas tint, mono captions. */

@font-face {
  font-family: "Inter";
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/Inter-Variable.woff2") format("woff2-variations");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/IBMPlexMono-Medium.woff2") format("woff2");
}

:root {
  --ink: hsl(227 66% 11%);
  --ink-2: hsl(226 24% 44%);
  --blue: hsl(228 100% 56%);
  --blue-soft: hsl(228 100% 56% / 0.1);
  --canvas: hsl(217 60% 96%);
  --line: hsl(222 30% 90%);
  --card: #fff;
  --green: hsl(152 62% 34%);
  --red: hsl(359 72% 50%);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.5 "Inter", system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 17px; }
.brand img { border-radius: 8px; }

.kicker, .label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

main.wrap { padding-top: 36px; padding-bottom: 64px; }
h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.12; letter-spacing: -0.02em; margin: 6px 0 8px; font-weight: 780; }
h2 { font-size: 18px; margin: 36px 0 12px; font-weight: 720; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.loading { padding: 40px 0; }

.code-chip {
  display: inline-block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 3px 9px;
  border-radius: 999px;
}

.hero {
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  padding: 24px;
  margin: 22px 0 14px;
}
.hero .label { color: hsl(222 40% 75%); }
.hero .big { font-size: clamp(40px, 10vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 6px 0 4px; }
.hero p { color: hsl(222 40% 82%); margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .value { font-size: 22px; font-weight: 760; letter-spacing: -0.02em; margin-top: 2px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; background: #fbfcff; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.neg { color: var(--red); }
.pos { color: var(--green); }
.empty { padding: 22px 16px; color: var(--ink-2); }

.note { font-size: 13px; color: var(--ink-2); margin-top: 18px; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  min-height: 36px;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.btn:disabled { opacity: 0.5; cursor: default; }
.actions { display: flex; gap: 6px; }

form.grid { display: grid; gap: 12px; }
label.field { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
input[type="text"], input[type="number"], input[type="date"], input[type="password"] {
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: transparent; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
label.check input { margin-top: 3px; }

.row-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 36px 0 12px; }
.row-head h2 { margin: 0; }

dialog {
  border: 0;
  border-radius: 20px;
  padding: 22px;
  width: min(440px, calc(100vw - 32px));
  color: var(--ink);
  box-shadow: 0 24px 80px hsl(227 66% 11% / 0.3);
}
dialog::backdrop { background: hsl(227 66% 11% / 0.45); }
dialog h3 { margin: 0 0 14px; font-size: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 10px 30px hsl(227 66% 11% / 0.3);
}

.error-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; margin-top: 12px; }

@media (max-width: 560px) {
  .hero { padding: 20px; }
  th, td { padding: 10px 12px; }
}
