/* Minimal dark UI — keep it boring and fast. */
* { box-sizing: border-box; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0e1116; color: #e6edf3; margin: 0; line-height: 1.45;
}
body.auth { display: grid; place-items: center; min-height: 100vh; }
h1, h2 { margin: 0 0 .5rem; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.1rem; color: #c9d1d9; }
.muted { color: #8b949e; font-size: .9em; }
.alert { background: #4a1a1a; color: #ffb4b4; padding: .6rem .8rem;
  border-radius: 6px; margin-bottom: .8rem; }
.card {
  background: #161b22; border: 1px solid #30363d;
  border-radius: 10px; padding: 2rem; width: min(360px, 92vw);
  box-shadow: 0 10px 40px #0006;
}
.card.wide { width: min(520px, 92vw); text-align: center; }
.card label { display: block; margin: .8rem 0 .3rem; font-size: .9em; }
.card input, .card select {
  width: 100%; background: #0d1117; color: #e6edf3;
  border: 1px solid #30363d; border-radius: 6px;
  padding: .5rem .6rem; font: inherit;
}
.card input:focus, .card select:focus {
  outline: none; border-color: #1f6feb;
}
button, .button {
  background: #238636; color: #fff; border: 0; padding: .55rem 1rem;
  border-radius: 6px; cursor: pointer; font: inherit;
  text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: #2ea043; }
button.danger { background: #b62324; }
button.danger:hover { background: #d6373a; }
button.link { background: none; padding: 0; color: #8b949e; }
button.link:hover { color: #c9d1d9; background: none; }
form button[type=submit] { width: 100%; margin-top: 1rem; }
.qr { background: #fff; padding: .5rem; border-radius: 6px; }
.secret { background: #0d1117; padding: .8rem; border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  word-break: break-all; user-select: all; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2rem; border-bottom: 1px solid #30363d;
}
.topbar .right { display: flex; gap: 1rem; align-items: center; }
.topbar form.inline { display: inline; }
main { padding: 1.5rem 2rem; max-width: 1200px; margin: 0 auto; }
.panel {
  background: #161b22; border: 1px solid #30363d; border-radius: 10px;
  padding: 1.2rem 1.4rem; margin-bottom: 1.5rem;
}
table { width: 100%; border-collapse: collapse; font-size: .92em; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid #21262d; }
th { color: #8b949e; font-weight: 600; font-size: .82em; text-transform: uppercase; letter-spacing: .03em; }
td.vin { font-family: ui-monospace, monospace; }
.badge { padding: .15rem .55rem; border-radius: 999px; font-size: .8em; }
.badge.active { background: #1f6feb33; color: #6cb6ff; }
.badge.blocked { background: #b6232433; color: #ffa3a3; }
.row-blocked td { opacity: .65; }
.actions { display: flex; gap: .4rem; justify-content: flex-end; }
.actions button { padding: .3rem .7rem; font-size: .85em; }
#add-form { display: flex; gap: .5rem; flex-wrap: wrap; }
#add-form input[name=vin] { flex: 1; min-width: 200px; font-family: ui-monospace, monospace; }
#add-form input[name=note] { flex: 2; min-width: 200px; }
#add-form select, #add-form input { background: #0d1117; color: #e6edf3;
  border: 1px solid #30363d; border-radius: 6px; padding: .45rem .6rem; font: inherit; }
#add-result { margin-top: .6rem; min-height: 1.2em; }
.audit .ev { font-family: ui-monospace, monospace; font-size: .85em; }
