@font-face { font-family: Onest; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/onest-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/martian-mono-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/martian-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --ground: #0b0d10;
  --board: #14171b;
  --board-head: #101316;
  --line: #20252c;
  --line-strong: #353c45;
  --ink: #e9e7df;
  --muted: #8f969f;
  --paper: #e9e7df;
  --paper-ink: #0b0d10;
  --paper-muted: #575e66;
  --paper-rule: #a6aab0;
  --alert: #ffb000;
  --alert-ink: #8a5200;
  --alert-tint: #211b0c;
  --ok: #7fdcaa;
  --danger: #ff8a7a;
  --danger-action: #c4372f;
  --sans: Onest, ui-sans-serif, system-ui, sans-serif;
  --mono: 'Martian Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --radius: 10px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.45 var(--sans);
  font-variant-numeric: tabular-nums;
  scrollbar-color: var(--line-strong) var(--ground);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--ground); }
h1, h2, p, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: var(--ink); text-underline-offset: .2em; text-decoration-color: var(--line-strong); }
a:hover { text-decoration-color: currentColor; }
button, input { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
::selection { background: var(--alert); color: var(--paper-ink); }
:focus-visible { outline: 2px solid var(--alert); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
small { font-size: 12px; }
.num { font-family: var(--mono); font-weight: 500; letter-spacing: -.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.shell { width: min(1080px, calc(100% - 28px)); margin-inline: auto; }

/* Top bar */
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); }
.brand strong { color: var(--ink); font-weight: 800; letter-spacing: .02em; }
.mark { width: 26px; height: 19px; flex: none; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.mark path { stroke-dasharray: 2 2; }
.account { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted); font-size: 14px; }
.account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.account-name::after { content: '·'; margin-left: 6px; }
.link-button { min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--muted); font-size: 14px; }
.link-button:hover { color: var(--ink); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: 8px;
  font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; text-align: center;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.primary { background: var(--paper); color: var(--paper-ink); }
.primary:hover { background: #fffdf5; }
.secondary { border-color: var(--line-strong); background: transparent; color: var(--ink); }
.secondary:hover { border-color: var(--muted); background: #ffffff08; }
.danger { background: var(--danger-action); color: #fff; }
.danger:hover { background: #d8443b; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .55; cursor: default; transform: none; }

/* Layout */
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 4px 32px; }
.dashboard > *, .pass-body > *, .connect > *, .manual-import > * { min-width: 0; }

/* Subscription strip and sheet */
.pass { position: relative; --stub-w: clamp(108px, 30vw, 128px); --perf: radial-gradient(circle at 2px 5px, var(--ground) 1.8px, transparent 2.3px) 0 0 / 4px 10px repeat-y; }
.pass-strip {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: stretch;
  border-radius: var(--radius); background: var(--paper); color: var(--paper-ink);
  transition: border-radius .3s var(--ease);
}
.strip-cell { display: grid; align-content: center; gap: 1px; min-width: 0; padding: 10px 12px; }
.strip-cell + .strip-cell { border-left: 1px dashed var(--paper-rule); }
.strip-cell small, .strip-head small, .pass-grid dt {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-muted);
}
.strip-cell b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pass .is-alert { color: var(--alert-ink); }
.chevron { align-self: center; justify-self: center; width: 18px; height: 18px; fill: none; stroke: var(--paper-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.strip-head { display: none; }
.pass[open] .pass-strip { grid-template-columns: minmax(0, 1fr) var(--stub-w); border-radius: var(--radius) var(--radius) 0 0; }
.strip-stub { position: relative; display: none; place-items: center; }
.pass[open] .strip-stub { display: grid; }
.collapse { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--paper-muted); }
.pass-strip:hover .collapse { color: var(--paper-ink); }
.strip-more {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px;
  border-top: 1px dashed var(--paper-rule); border-radius: 0 0 var(--radius) var(--radius);
  font-size: 13px; font-weight: 600; color: var(--paper-ink); transition: background-color .2s var(--ease);
}
.strip-more .chevron { margin-left: auto; }
.qr-glyph { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--paper-ink); stroke-width: 1.3; }
.qr-glyph .fill { fill: var(--paper-ink); stroke: none; }
.pass-strip:hover .strip-more { background: #dfdcd3; }
.pass[open] .strip-more { display: none; }
.pass[open] .strip-stub { background: var(--perf); }
.pass[open] .strip-stub::before { content: ''; position: absolute; left: -7px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--ground); }
.pass[open] .strip-cell { display: none; }
.pass[open] .strip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 10px 16px; min-width: 0; }
.strip-head > span:first-child { display: grid; min-width: 0; }
.pass-name { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { flex: none; padding: 4px 8px; border-radius: 4px; background: var(--paper-ink); color: var(--paper); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.status.is-active::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--ok); vertical-align: 1px; }
.pass-strip:hover .chevron { transform: translateY(1px); }
.pass[open] .pass-strip:hover .chevron { transform: translateY(-1px); }

.pass-body { display: grid; gap: 18px; }
.pass[open] .pass-body { animation: unfold .45s var(--ease); }
@keyframes unfold { from { clip-path: inset(0 0 100% 0); transform: translateY(-6px); } to { clip-path: inset(0 0 -40px 0); transform: none; } }
.pass-sheet {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--stub-w);
  border-radius: 0 0 var(--radius) var(--radius); background: var(--paper); color: var(--paper-ink);
}
.pass-main { padding: 12px 14px 16px 16px; border-top: 1px dashed var(--paper-rule); }
.pass-grid { display: grid; gap: 12px; }
.pass-grid dd { display: grid; margin-top: 2px; }
.pass-grid dd > .num, .pass-grid dd > .qty, .pass-grid time { font-size: 16px; font-weight: 600; }
.pass-grid dd small { color: var(--paper-muted); font-size: 13px; }
.expiry-notice { justify-self: start; margin-top: 6px; padding: 2px 8px; border-radius: 4px; background: var(--paper-ink); color: var(--alert); font-size: 12px; font-weight: 700; }
.pass-stub { position: relative; display: grid; align-content: start; justify-items: center; gap: 8px; padding: 16px 12px; background: var(--perf); text-align: center; }
.pass-stub::after { content: ''; position: absolute; left: -7px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--ground); }
.qr-code { display: block; width: 100%; max-width: 148px; height: auto; aspect-ratio: 1; image-rendering: pixelated; mix-blend-mode: multiply; }
.pass-stub p { font-size: 12px; line-height: 1.3; color: var(--paper-muted); }

.connect { display: grid; gap: 10px; }
.connect h2 { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.import-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.import-links .button { min-height: 50px; }
.fold > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 500; }
.fold > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--ease); }
.fold[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.fold > summary:hover { color: var(--ink); }
.manual-import[open] { padding-bottom: 4px; }
.manual-import > :not(summary) + * { margin-top: 10px; }
.manual-import > summary + * { margin-top: 2px; }
.manual-import p { color: var(--muted); font-size: 14px; max-width: 60ch; }
.subscription-details summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--board); }
.masked-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.reveal { flex: none; font-size: 13px; color: var(--ink); }
.conceal { display: none; font-size: 13px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .2em; }
.subscription-details[open] > summary { min-height: 36px; padding: 0; border: 0; background: none; justify-content: flex-start; }
.subscription-details[open] .reveal, .subscription-details[open] .masked-link { display: none; }
.subscription-details[open] .conceal { display: inline; }
.subscription-details input { margin-top: 8px; font-size: 13px; }
.manual-import .button { width: fit-content; }
.feedback { font-size: 14px; color: var(--alert); }
.feedback:empty { display: none; }

/* Inputs */
input[type=text], input[type=url], input[type=password] {
  display: block; width: 100%; min-height: 46px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--board);
  color: var(--ink); font-size: 16px; caret-color: var(--alert);
}
input::placeholder { color: var(--muted); }
input:hover { border-color: #47505b; }
input:focus-visible { outline: none; border-color: var(--alert); box-shadow: 0 0 0 3px #ffb00026; }
[aria-invalid="true"] { border-color: var(--danger); }

/* Devices board */
.devices { display: grid; gap: 12px; }
.devices-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 6px; }
.devices-head h1 { font-size: clamp(30px, 8vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.device-count { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.board { border: 1px solid var(--line); border-radius: 12px; background: var(--board); overflow: hidden; }
.board-cols, .row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 86px; align-items: center; column-gap: 10px; padding-inline: 12px; }
.board-cols { min-height: 34px; background: var(--board-head); color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.board-cols span:last-child { grid-column: 3 / 5; }
.row { min-height: 64px; padding-block: 8px; border-top: 1px solid var(--line); transition: background-color .6s var(--ease); }
.row-no { font-size: 13px; color: #7d858f; }
.device-data { min-width: 0; }
.rename-details > summary { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 26px; border-radius: 4px; }
.rename-details strong { font-size: 16px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.icon { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; color: #5d646d; transition: color .2s var(--ease); }
.rename-details > summary:hover .icon, .rename-details[open] .icon { color: var(--ink); }
.row-meta { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.sort-hint { display: none; }
.row-flag { display: block; margin-top: 1px; font-style: normal; font-weight: 600; color: var(--ink); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.is-next .row-flag { color: var(--alert); }
.qty { font-size: 16px; font-weight: 650; }
.nowrap { white-space: nowrap; }
.row-date { font-size: 12px; color: #c3c6cb; }
.row-delete { width: 100%; min-height: 40px; padding: 0 8px; border-color: var(--line-strong); font-size: 14px; }
.row-delete:hover { border-color: var(--muted); background: #ffffff08; }
.delete-details { min-width: 0; }
.is-next { background: var(--alert-tint); }
.is-next .row-no { color: var(--alert); }
.is-next .row-date { color: var(--alert); }
.is-next .row-delete { border-color: var(--alert); background: var(--alert); color: var(--paper-ink); font-weight: 700; }
.is-next .row-delete:hover { background: #ffc233; }
.is-free { min-height: 52px; }
.free-label { grid-column: 2 / -1; padding: 8px 12px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); font-size: 13px; }
.new-device { background: var(--alert-tint); animation: arrive 2.4s var(--ease); }
.new-device-label { display: block; color: var(--alert); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
@keyframes arrive { from { background: #4a3605; } }

.rename-form, .delete-form { display: grid; gap: 8px; margin-top: 10px; padding-bottom: 6px; }
.rename-form label { font-size: 13px; color: var(--muted); }
.rename-form .button, .delete-form .button { justify-self: start; }
.hint { font-size: 12px; color: var(--muted); }
.row:has(.rename-details[open]) .device-data { grid-column: 2 / -1; }
.row:has(.rename-details[open]) .row-date,
.row:has(.rename-details[open]) .delete-details { display: none; }
.row:has(.delete-details[open]) .delete-details { grid-column: 2 / -1; grid-row: 2; }
.delete-details[open] > summary { width: auto; justify-self: start; }
.delete-form p { color: var(--ink); }

.empty { color: var(--muted); max-width: 60ch; }
.pass-note { display: flex; gap: 12px; align-items: baseline; margin-top: -8px; color: var(--muted); font-size: 14px; }
.pass-note b { color: var(--alert); font-weight: 600; }
.capacity { display: flex; gap: 12px; align-items: baseline; color: var(--muted); font-size: 14px; max-width: 62ch; }
.capacity b { color: var(--ink); font-weight: 600; }
.pulse { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--alert); box-shadow: 0 0 0 4px #ffb00030; transform: translateY(-1px); }

.check-devices { display: grid; gap: 10px; justify-items: start; padding-top: 18px; border-top: 1px solid var(--line); }
.check-devices > p:first-child { color: var(--muted); font-size: 14px; max-width: 52ch; }

.connect-cta { position: sticky; bottom: 12px; z-index: 2; min-height: 52px; box-shadow: 0 10px 30px #000a, 0 2px 6px #0008; }
.pass[open] ~ .connect-cta { display: none; }

/* Dialog */
.delete-dialog { width: min(420px, calc(100% - 28px)); padding: 22px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--board); color: var(--ink); box-shadow: 0 24px 60px #000c, 0 4px 12px #0009; }
.delete-dialog::backdrop { background: #05060899; backdrop-filter: blur(3px); }
.delete-dialog[open] { animation: rise .3s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.delete-dialog h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.delete-dialog p { margin-top: 10px; color: var(--muted); }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 22px; }

/* Auth and error */
.auth-layout { display: grid; justify-items: center; padding-block: clamp(24px, 6vw, 56px) 48px; }
.auth { width: min(100%, 440px); }
.auth-sheet { position: relative; border-radius: 12px; overflow: hidden; }
.auth-head { position: relative; padding: 22px 18px 20px; background: var(--paper); color: var(--paper-ink); }
.auth-head::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -2px; height: 4px; background: radial-gradient(circle at 5px 2px, var(--board) 1.8px, transparent 2.3px) 0 0 / 10px 4px repeat-x; }
.auth h1 { font-size: clamp(28px, 7.5vw, 36px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.auth-head > p { margin-top: 8px; color: var(--paper-muted); }
.auth-head .notice-error { margin-top: 14px; padding: 9px 12px; border: 0; border-radius: 6px; background: #f3d6cf; color: #8c2214; font-weight: 500; }
.auth-form { position: relative; display: grid; gap: 14px; padding: 20px 18px 18px; background: var(--board); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; }
.auth-form::before, .auth-form::after { content: ''; position: absolute; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--ground); }
.auth-form::before { left: -9px; }
.auth-form::after { right: -9px; }
.auth-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.auth-form .button { margin-top: 6px; min-height: 50px; }
.field { display: grid; gap: 6px; }
.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.reveal-toggle {
  position: absolute; top: 1px; right: 1px; bottom: 1px; width: 48px;
  display: grid; place-items: center; border: 0; border-radius: 0 7px 7px 0; background: none; color: var(--muted);
}
.reveal-toggle:hover { color: var(--ink); }
.reveal-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.reveal-toggle[aria-pressed="false"] .slash { display: none; }
.password-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: -4px 0 2px; padding: 0; list-style: none; }
.password-rules li { position: relative; padding-left: 22px; font-size: 13px; line-height: 1.35; color: var(--muted); transition: color .2s var(--ease); }
.password-rules li::before {
  content: ''; position: absolute; left: 0; top: 1px; width: 15px; height: 15px; box-sizing: border-box;
  border: 1.5px solid var(--line-strong); border-radius: 50%; transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.password-rules li.is-met { color: var(--ink); }
.password-rules li.is-met::before { border-color: var(--ok); background: var(--ok); }
.password-rules li.is-met::after {
  content: ''; position: absolute; left: 5px; top: 4px; width: 4px; height: 7px;
  border-right: 1.8px solid var(--ground); border-bottom: 1.8px solid var(--ground); transform: rotate(45deg);
}
.password-rules li.is-missing { color: var(--danger); }
.password-rules li.is-missing::before { border-color: var(--danger); }
.field-status { min-height: 18px; font-size: 13px; color: var(--muted); }
.field-status.is-ok { color: var(--ok); }
.field-status.is-error { color: var(--danger); }
@media (max-width: 419px) { .password-rules { grid-template-columns: 1fr; gap: 6px; } }
.notice-error { margin-top: 18px; padding: 10px 12px; border: 1px solid #5a2a24; border-radius: 8px; background: #22120f; color: var(--danger); }
.auth-switch { margin-top: 18px; color: var(--muted); }
.auth-switch a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.auth .fold { margin-top: 2px; }
.auth .fold p { color: var(--muted); font-size: 14px; padding-bottom: 6px; }

/* Admin */
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.nav-link:hover { text-decoration: underline; text-decoration-color: var(--line-strong); }
.account .nav-link { margin-right: 8px; }
.admin { display: grid; gap: 18px; max-width: 760px; padding-block: 8px 56px; }
.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.admin-head h1 { font-size: clamp(30px, 8vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.admin-lead { color: var(--muted); max-width: 62ch; }
.admin h2 { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.admin .notice-error { margin-top: 0; }
.invite { display: grid; gap: 10px; padding: 18px; border-radius: 12px; background: var(--paper); color: var(--paper-ink); }
.invite h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; text-transform: none; color: var(--paper-ink); }
.invite p { color: var(--paper-muted); font-size: 14px; }
.invite textarea {
  width: 100%; min-height: 168px; padding: 12px; resize: vertical; border: 1px dashed var(--paper-rule); border-radius: 8px;
  background: #f6f4ee; color: var(--paper-ink); font: 400 14px/1.5 var(--sans);
}
.invite textarea:focus-visible { outline: 2px solid var(--alert-ink); outline-offset: 2px; }
.invite .button.primary { justify-self: start; background: var(--paper-ink); color: var(--paper); }
.invite .button.primary:hover { background: #22262c; }
.invite .feedback { color: var(--alert-ink); font-weight: 600; }
.admin-search { display: grid; gap: 6px; }
.admin-search label { font-size: 14px; font-weight: 500; color: var(--muted); }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.access-list { display: grid; gap: 10px; margin-top: 8px; }
.access-list ul { margin: 0; padding: 0; list-style: none; }
.access-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px;
  min-height: 60px; padding: 10px 14px; border-top: 1px solid var(--line);
}
.access-row:first-child { border-top: 0; }
.access-who { display: grid; min-width: 0; }
.access-who strong { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.access-who a { color: var(--ink); text-decoration: none; }
.access-who a:hover strong { text-decoration: underline; text-decoration-color: var(--line-strong); }
.access-state { font-size: 13px; text-align: right; color: var(--muted); }
.access-state.is-active { color: var(--ok); }
.access-state.is-pending { color: var(--alert); }
.access-state.is-expired { color: var(--danger); }
.access-actions { grid-column: 1 / -1; display: grid; gap: 8px; }
.access-actions form { display: grid; gap: 8px; justify-items: start; }
.access-actions .hint { font-size: 13px; }
.reset-confirm > summary { width: fit-content; }
.reset-confirm[open] > summary { margin-bottom: 10px; }
.reset-confirm form p { color: var(--muted); font-size: 14px; max-width: 60ch; }
.reset-confirm input[type=password] { max-width: 320px; }

/* Desktop */
@media (min-width: 960px) {
  .shell { width: min(1080px, calc(100% - 64px)); }
  .topbar-inner { min-height: 72px; }
  .dashboard { grid-template-columns: 372px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 40px; row-gap: 22px; align-items: start; padding-block: 12px 64px; }
  .pass { grid-column: 1; grid-row: 1 / 4; position: sticky; top: 20px; }
  .devices, .check-devices, .pass-note { grid-column: 2; }
  .pass-note { margin-top: 0; }
  .devices-head { margin-top: 0; }
  .connect-cta { display: none; }
  .pass[open] .pass-strip { cursor: default; }
  .pass[open] .collapse { display: none; }
  .pass[open] .strip-head { padding-right: 16px; }
  .board-cols, .row { grid-template-columns: 36px minmax(0, 1fr) 96px 104px; padding-inline: 16px; column-gap: 14px; }
  .row-date { font-size: 13px; }
  .sort-hint { display: inline; }
}

@media (max-width: 359px) {
  .pass-strip { grid-template-columns: 1fr 1fr; }
  .pass[open] .pass-strip { grid-template-columns: minmax(0, 1fr) 34px; }
  .pass[open] .strip-stub { background: none; }
  .pass[open] .strip-stub::before { display: none; }
  .strip-cell:nth-child(3) { display: none; }
  .pass-sheet { grid-template-columns: minmax(0, 1fr); }
  .pass-stub { background: none; border-top: 2px dashed var(--paper-rule); }
  .pass-stub::after { display: none; }
  .import-links { grid-template-columns: 1fr; }
  .board-cols, .row { grid-template-columns: 24px minmax(0, 1fr) 78px; }
  .row-date, .board-cols span:last-child { display: none; }
}

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