/* QuoteHammer — dark, chunky, site-ready (spec §10).
   One strong accent per user, injected as --accent from their settings. */

:root {
  --accent: #F5C518;
  --accent-ink: #0B0C0E;

  --bg: #0B0C0E;
  --surface: #15171B;
  --surface-2: #1C1F25;
  --surface-3: #24282F;
  --line: #2A2F37;

  --text: #FFFFFF;
  /* Both verified against --bg: muted 6.1:1, dim 5.0:1 — WCAG AA at any size. */
  --muted: #8A9099;
  --dim: #7A828C;

  --good: #35C46A;
  --warn: #FFB020;
  --bad: #FF5A52;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;

  --tap: 48px;
  --tabbar: 68px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
  --glow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent),
          0 6px 22px color-mix(in srgb, var(--accent) 18%, transparent);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Kills the 300ms mobile tap delay — the builder has to feel instant. */
a, button, .tile, .list-row, label, summary, input, select, textarea {
  touch-action: manipulation;
}

html { -webkit-text-size-adjust: 100%; }

/* Keyboard focus stays visible everywhere. Pointer taps don't get a ring. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
  overscroll-behavior-y: contain;
}

body.no-tabbar { padding-bottom: env(safe-area-inset-bottom, 0px); }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ------------------------------------------------------------ typography */

.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.02em;
  text-transform: uppercase;
  line-height: .98;
}

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: .98rem; }

.eyebrow {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: .82rem; }
.tabular { font-variant-numeric: tabular-nums; }
.accent { color: var(--accent); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- layout */

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { height: 20px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 460px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }

/* -------------------------------------------------------------- app bar */

.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}

.appbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 16px;
  max-width: 1040px;
  margin: 0 auto;
}

.appbar h1 { font-size: 1.2rem; }

.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  margin-left: -8px;
  border-radius: 50%;
  color: var(--muted);
  flex: 0 0 auto;
}
.back:active { background: var(--surface-2); }

/* ---------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-tight { padding: 12px; }

.card-link { display: block; transition: transform .12s ease, border-color .12s ease; }
.card-link:active { transform: scale(.985); border-color: var(--accent); }

.panel {
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 12px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
}
.stat .value {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.stat.hero { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.stat.hero .value { color: var(--accent); font-size: 1.9rem; }
.stat.danger .value { color: var(--bad); }

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .1s ease, background .12s ease, border-color .12s ease;
  text-align: center;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--glow);
}
.btn-ghost { background: transparent; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: .85rem; border-radius: 9px; }
.btn-lg { min-height: 56px; font-size: 1.05rem; }

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 28px;
  box-shadow: var(--glow), var(--shadow);
}

/* --------------------------------------------------------------- forms */

.field { display: block; margin-bottom: 14px; }
.field > .label {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field .hint { display: block; margin-top: 6px; font-size: .78rem; color: var(--dim); }
.field .req { color: var(--accent); margin-left: 2px; }
.field .error { display: block; margin-top: 6px; font-size: .8rem; color: var(--bad); font-weight: 600; }

.input, .select, .textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--dim); }

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.input-money { position: relative; }
.input-money .prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; font-weight: 700;
}
.input-money .input { padding-left: 30px; font-variant-numeric: tabular-nums; }

.switch { display: flex; align-items: center; gap: 12px; min-height: var(--tap); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  position: relative; flex: 0 0 auto;
  width: 52px; height: 30px; border-radius: 15px;
  background: var(--surface-3); border: 1px solid var(--line);
  transition: background .16s ease, border-color .16s ease;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--muted); transition: transform .16s cubic-bezier(.3,.9,.4,1.2), background .16s ease;
}
.switch input:checked + .track { background: color-mix(in srgb, var(--accent) 28%, transparent); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(22px); background: var(--accent); }
.switch .switch-text { min-width: 0; }
.switch .switch-text b { display: block; font-size: .95rem; }
.switch .switch-text span { display: block; font-size: .78rem; color: var(--muted); line-height: 1.3; }

.seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px;
  gap: 4px;
}
.seg button, .seg a {
  min-height: 38px; padding: 0 14px;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font-weight: 700; font-size: .85rem; cursor: pointer;
  display: inline-flex; align-items: center;
}
.seg .on { background: var(--accent); color: var(--accent-ink); }

.colour-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.colour-swatch {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer; flex: 0 0 auto;
}
.colour-swatch.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.15); }
input[type="color"] {
  width: 48px; height: 48px; padding: 0;
  background: none; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
}

/* --------------------------------------------------------------- chips */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: .74rem; font-weight: 800; letter-spacing: .02em;
  background: var(--surface-3); color: var(--muted);
  white-space: nowrap;
}
.chip-draft { background: var(--surface-3); color: var(--muted); }
.chip-sent { background: color-mix(in srgb, #4A9EFF 20%, transparent); color: #79BBFF; }
.chip-accepted, .chip-paid { background: color-mix(in srgb, var(--good) 20%, transparent); color: var(--good); }
.chip-part_paid { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.chip-overdue, .chip-declined { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.chip-converted { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.chip-accent { background: var(--accent); color: var(--accent-ink); }

.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters a {
  flex: 0 0 auto; padding: 9px 15px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: .85rem; font-weight: 700; color: var(--muted);
}
.filters a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------------------------------------------------------------- lists */

.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; min-height: 62px;
}
.list-row:active { background: var(--surface-2); }
.list-title { font-weight: 700; }
.list-sub { font-size: .82rem; color: var(--muted); }
.list-amount { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 18px 4px 8px;
}

.az-head {
  position: sticky; top: 58px;
  padding: 8px 16px;
  background: var(--bg);
  font-weight: 800; font-size: .8rem; letter-spacing: .1em; color: var(--accent);
  border-bottom: 1px solid var(--line);
  z-index: 5;
}

/* -------------------------------------------------------------- tab bar */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar a {
  flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; height: var(--tabbar);
  color: var(--dim); font-size: .66rem; font-weight: 700;
  letter-spacing: .02em;
}
.tabbar a.on { color: var(--accent); }
.tabbar svg { width: 23px; height: 23px; }

/* ------------------------------------------------------------- builder */

.builder-scroll { padding-bottom: 132px; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.tile {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 92px; padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  text-align: left;
  transition: transform .08s ease, border-color .12s ease, background .12s ease;
  overflow: hidden;
}
.tile:active { transform: scale(.96); }
.tile.has-qty { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.tile .tile-name { font-weight: 700; font-size: .88rem; line-height: 1.25; }
.tile .tile-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 6px;
  margin-top: 8px;
}
.tile .tile-price { font-weight: 800; font-size: .92rem; font-variant-numeric: tabular-nums; }
.tile .tile-unit { font-size: .7rem; color: var(--muted); }
.tile.labour { border-style: dashed; }

.tile-badge {
  position: absolute; top: 7px; right: 7px;
  min-width: 26px; height: 26px; padding: 0 7px;
  display: none; align-items: center; justify-content: center;
  border-radius: 13px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: .8rem; font-variant-numeric: tabular-nums;
}
.tile.has-qty .tile-badge { display: flex; }
.tile-badge.pop { animation: pop .22s cubic-bezier(.34,1.56,.64,1); }
@keyframes pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.38); }
  100% { transform: scale(1); }
}

.tile-minus {
  position: absolute; bottom: 6px; right: 6px;
  width: 30px; height: 30px;
  display: none; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: var(--surface-3); color: var(--text);
  font-size: 1.1rem; font-weight: 800; line-height: 1; cursor: pointer;
}
.tile.has-qty .tile-minus { display: flex; }

.cat-tabs {
  position: sticky; top: 58px; z-index: 20;
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button {
  flex: 0 0 auto; min-height: 40px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
  font-weight: 700; font-size: .85rem; cursor: pointer;
}
.cat-tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.searchbar { position: relative; margin: 12px 0; }
.searchbar .input { padding-left: 42px; }
.searchbar svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted); pointer-events: none;
}
.searchbar .clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--surface-3); color: var(--muted); cursor: pointer;
}

.totalbar {
  position: fixed; left: 0; right: 0;
  bottom: env(safe-area-inset-bottom, 0px);
  z-index: 46;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--accent);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .55);
}
.totalbar-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  max-width: 1040px; margin: 0 auto;
}
.totalbar .amount {
  font-family: var(--display); font-weight: 800;
  font-size: 1.7rem; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; color: var(--accent);
  line-height: 1;
}
.totalbar .amount.bump { animation: bump .2s ease; }
@keyframes bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

.cart-line {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.cart-line:last-child { border-bottom: 0; }
.cart-line .qty-pill {
  flex: 0 0 auto; min-width: 34px; height: 30px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--surface-3);
  font-weight: 800; font-size: .82rem; font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- sheet */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, .65);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  max-height: 88vh; overflow-y: auto;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .26s cubic-bezier(.3, .9, .3, 1);
  box-shadow: var(--shadow);
}
.sheet.open { transform: translateY(0); }
.sheet-grip {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--surface-3); margin: 8px auto 14px;
}
.sheet h2 { margin-bottom: 14px; }

@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; width: 560px; transform: translate(-50%, 100%); border-radius: var(--r-lg); bottom: 24px; }
  .sheet.open { transform: translate(-50%, 0); }
}

/* --------------------------------------------------------------- misc */

.flash-stack {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 16px; right: 16px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.flash {
  padding: 13px 16px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  box-shadow: var(--shadow); font-weight: 600; font-size: .9rem;
  animation: slideIn .26s cubic-bezier(.3,.9,.3,1);
  pointer-events: auto;
}
.flash-success { border-color: var(--good); color: var(--good); }
.flash-error { border-color: var(--bad); color: var(--bad); }
.flash-info { border-color: var(--line); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

.empty { text-align: center; padding: 48px 24px; }
.empty .empty-mark { width: 62px; height: 62px; margin: 0 auto 16px; opacity: .5; }
.empty h3 { font-size: 1.05rem; margin-bottom: 6px; }
.empty p { color: var(--muted); margin: 0 0 18px; font-size: .92rem; }

.bar-chart { display: flex; align-items: flex-end; gap: 5px; height: 150px; padding-top: 8px; }
.bar-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar {
  width: 100%; border-radius: 4px 4px 0 0;
  background: color-mix(in srgb, var(--accent) 75%, transparent);
  min-height: 2px; transition: height .4s cubic-bezier(.3,.9,.3,1);
}
.bar.zero { background: var(--surface-3); }
.bar-label { font-size: .62rem; color: var(--muted); font-weight: 700; }

.progress { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.divider { height: 1px; background: var(--line); margin: 18px 0; }

.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th {
  text-align: left; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 800;
}
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.totals-list { list-style: none; margin: 0; padding: 0; }
.totals-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; font-size: .92rem;
}
.totals-list li + li { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.totals-list .val { font-variant-numeric: tabular-nums; font-weight: 700; }
.totals-list .grand { padding-top: 12px; margin-top: 4px; border-top: 2px solid var(--accent); }
.totals-list .grand span { font-size: 1.15rem; font-weight: 800; color: var(--accent); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .thumb-del {
  position: absolute; top: 4px; right: 4px;
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.7); color: #fff; cursor: pointer; font-size: .9rem;
}

.logo-lockup { display: flex; align-items: center; gap: 12px; }
.logo-lockup svg { width: 40px; height: 40px; flex: 0 0 auto; }
.logo-lockup .word { font-family: var(--display); font-weight: 800; font-size: 1.32rem; letter-spacing: -.03em; text-transform: uppercase; }
.logo-lockup .word em { font-style: normal; color: var(--accent); }

.login-shell { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 32px 20px; }
.login-mark { width: 82px; height: 82px; margin: 0 auto 20px; display: block; }

.autocomplete { position: relative; }
.autocomplete-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); overflow: hidden; box-shadow: var(--shadow);
  max-height: 260px; overflow-y: auto;
}
.autocomplete-list button {
  display: block; width: 100%; text-align: left;
  padding: 12px 14px; border: 0; background: transparent; cursor: pointer;
}
.autocomplete-list button + button { border-top: 1px solid var(--line); }
.autocomplete-list button:active { background: var(--surface-3); }
.autocomplete-list .ac-name { font-weight: 700; font-size: .92rem; }
.autocomplete-list .ac-sub { font-size: .78rem; color: var(--muted); }

.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .input { min-height: 40px; padding: 8px 10px; }

.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
