:root {
  --ink: #292b2d;
  --brand: #d92d32;
  --brand-deep: #bd2228;
  --brand-soft: #f8e9e9;
  --accent: #e52d32;
  --accent-soft: #fae8e8;
  --bg: #f5f5f3;
  --line: #dededb;
  --muted: #6d7072;
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(217, 45, 50, .035), transparent 32rem),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

nav {
  height: 76px;
  background: rgba(255,255,255,.98);
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 5px 24px rgba(38, 39, 40, .08);
}

.nav-search { flex: 1; max-width: 390px; margin: 0 18px; }
.nav-search input { min-height: 42px; margin: 0; border-color: #ddd; background: #f5f5f3; color: var(--ink); caret-color: var(--brand); }
.nav-search input::placeholder { color: #73777a; opacity: 1; }
.score { padding: 6px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); font-size: 13px; font-style: normal; font-weight: 800; white-space: nowrap; }
.device-list .search-hit b,.device-list .search-hit small { display:block; }
.device-list .search-hit b { color:var(--ink); }
.device-list .search-hit small { margin-top:4px; color:var(--muted); font-size:13px; }
.scanner { max-width: 680px; margin: auto; }
.scanner video { display: block; width: 100%; min-height: 240px; max-height: 480px; border-radius: 14px; background: #242526; object-fit: cover; }
.scanner > .button.wide { margin:0 0 16px; }
.label-create { max-width: 600px; margin: auto; }
.reservation-preview { display:flex; justify-content:space-between; align-items:center; margin:20px 0; padding:18px; border-radius:12px; background:var(--brand-soft); }
.reservation-preview strong { font-size:25px; color:var(--brand-deep); }
.label-table { display:grid; gap:2px; overflow:hidden; border:1px solid var(--line); border-radius:14px; background:var(--line); }
.label-row { display:grid; grid-template-columns:110px 120px minmax(150px,1fr) 120px minmax(150px,1fr); align-items:center; gap:10px; padding:12px 14px; background:white; }
.label-row.head { background:#efefed; }

.brand,
.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.brand { flex: 0 0 auto; min-width: 0; }
.home-button { display:inline-flex; align-items:center; gap:5px; min-height:40px; padding:8px 12px; border-radius:10px; background:#f1f1ef; color:var(--ink); font-weight:750; text-decoration:none; white-space:nowrap; }
.home-button:hover { background:var(--brand-soft); color:var(--brand-deep); }

.brand-logo-crop {
  position: relative;
  display: flex;
  align-items: center;
  width: 198px;
  height: 52px;
  padding: 4px 6px;
  overflow: visible;
  flex: 0 0 198px;
}

.brand-logo-crop img {
  position: static;
  display: block;
  width: auto;
  height: 44px;
  object-fit: contain;
  object-position: left center;
  max-width: 100%;
  color: var(--brand);
  font-size: 22px;
  font-weight: 850;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  border: 3px solid #27292b;
  border-bottom: 0;
  border-radius: 9px 9px 2px 2px;
  background: #fff;
}

.brand-mark i {
  position: absolute;
  display: block;
  top: 7px;
  width: 4px;
  height: 24px;
  border-radius: 50%;
  border-left: 3px solid var(--brand);
  transform: skewX(-12deg);
}

.brand-mark i:first-child { left: 8px; }
.brand-mark i:nth-child(2) { left: 17px; }
.brand-mark i:last-child { left: 26px; }

.brand-name {
  display: flex;
  flex-direction: column;
  font-size: 21px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .09em;
  color: var(--brand);
}

.brand-name small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.login-brand {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--brand);
}
.login-brand .brand-mark { background: #fff; border-color: #27292b; }
.login-brand .brand-name small { color: var(--muted); }

.link { color: var(--ink); opacity: .72; text-decoration: none; }
.nav-labels { color:var(--brand-deep); font-weight:750; text-decoration:none; }
.link:hover { opacity: 1; }
.user { color: var(--muted); }

h1 { letter-spacing: -.025em; }
.eyebrow { color: var(--brand); letter-spacing: .17em; }

.card,
.stats div,
.action,
.device-list > a,
.empty,
.flash {
  border-color: var(--line);
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 30px rgba(38, 39, 40, .05);
}

.action { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.action:hover { border-color: #d5b8b9; box-shadow: 0 12px 32px rgba(38, 39, 40, .09); }
.action.primary,
.primary,
.search button { background: var(--brand) !important; border-color: var(--brand) !important; }
.action.primary { background: linear-gradient(120deg, var(--brand-deep), var(--brand)) !important; }
.action b { background: var(--brand-soft); }
.action.primary b { background: rgba(255,255,255,.13); }

input,
select {
  border-color: #c8c8c5;
  background: #fcfdfd;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(217,45,50,.1);
}
.model-suggestions { display:grid; gap:6px; margin:-8px 0 12px; padding:8px; border:1px solid var(--line); border-radius:12px; background:white; box-shadow:0 12px 30px rgba(38,39,40,.12); }
.model-suggestion { display:block; min-height:0; padding:10px 12px; border:0; text-align:left; background:#f7f7f5; }
.model-suggestion:hover { background:var(--brand-soft); }
.model-suggestion strong,.model-suggestion small { display:block; }
.model-suggestion small { margin-top:2px; color:var(--muted); font-weight:500; }
.model-technical { margin:8px 0 16px; padding:12px; border-left:4px solid var(--brand); border-radius:8px; background:var(--brand-soft); }
.ocr-status { margin:14px 0 0; border-left:4px solid var(--brand); }

button,
.button { border-color: #afc5c5; }
button:focus-visible,
.button:focus-visible,
a:focus-visible { outline: 3px solid rgba(217,45,50,.38); outline-offset: 3px; }

.steps span.active { border-color: var(--accent); }
.type input:checked + span { background: var(--brand-soft); }
.photo { border-color: #aac2c1; background: #f9fbfb; }
.photo:hover { background: var(--brand-soft); }
.history .dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.success .check { background: #e2f1e8; }

@media (max-width: 600px) {
  nav { height: 70px; }
  .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .brand-name { font-size: 18px; }
  .login-brand { top: 20px; }
  .auth { margin-top: 86px; }
  .nav-search { display: none; }
  .label-table { display:block; border:0; background:transparent; }
  .label-row { grid-template-columns:1fr auto; margin-bottom:9px; border:1px solid var(--line); border-radius:12px; }
  .label-row.head { display:none; }
  .label-row > span:nth-child(n+3) { grid-column:1/-1; }
  .brand-logo-crop { width: 150px; height: 44px; padding: 4px; flex-basis: 150px; }
  .brand-logo-crop img { width: auto; height: 36px; }
  nav .nav-labels { display:none; }
  .brand-name { font-size:17px; }
  .brand-mark { width:34px; height:34px; flex-basis:34px; }
  .home-button { padding:7px 9px; }
  .home-button span { display:none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
