/* Метафора — схема пересадок: каждый способ входа это линия своего цвета, SSO — узел. */
@font-face { font-family: Golos; font-weight: 400; font-display: swap; src: url(/fonts/golos-text/golos-text-cyrillic-400-normal.woff2); unicode-range: U+0400-045F, U+0490-0491, U+2116; }
@font-face { font-family: Golos; font-weight: 400; font-display: swap; src: url(/fonts/golos-text/golos-text-latin-400-normal.woff2); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: Golos; font-weight: 600; font-display: swap; src: url(/fonts/golos-text/golos-text-cyrillic-600-normal.woff2); unicode-range: U+0400-045F, U+0490-0491, U+2116; }
@font-face { font-family: Golos; font-weight: 600; font-display: swap; src: url(/fonts/golos-text/golos-text-latin-600-normal.woff2); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: Unbounded; font-weight: 500; font-display: swap; src: url(/fonts/unbounded/unbounded-cyrillic-500-normal.woff2); unicode-range: U+0400-045F, U+0490-0491, U+2116; }
@font-face { font-family: Unbounded; font-weight: 500; font-display: swap; src: url(/fonts/unbounded/unbounded-latin-500-normal.woff2); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --petrol: #123b3a;
  --mist: #edf1f0;
  --paper: #ffffff;
  --ink: #12211f;
  --dim: #55696a;
  --rule: #cbd7d5;
  --signal: #f2b01e;
  --bad: #b3261e;
  --good: #1c6b4f;
  --accent: var(--petrol);
  --on-accent: #ffffff;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 16px/1.55 Golos, system-ui, sans-serif; }
h1, h2 { font-family: Unbounded, Golos, sans-serif; font-weight: 500; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; }
h2 { font-size: 1.1rem; margin: 2.5rem 0 .75rem; }
a { color: var(--petrol); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
img { max-width: 100%; }
small { display: block; color: var(--dim); font-size: .85rem; line-height: 1.4; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .85rem; }
pre { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: .9rem; overflow-x: auto; }

input:not([type=checkbox]):not([type=color]), textarea {
  font: inherit; color: inherit; width: 100%; padding: .6rem .75rem; background: var(--paper);
  border: 1px solid #9fb2b0; border-radius: 6px;
}
input[type=color] { width: 4rem; height: 2.5rem; padding: 2px; border: 1px solid #9fb2b0; border-radius: 6px; background: var(--paper); }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; margin: .2rem 0 0; accent-color: var(--petrol); flex: none; }
label, .field-name { font-weight: 600; font-size: .92rem; }
.field-name { margin: 1rem 0 .3rem; }
label.check { display: flex; gap: .6rem; font-weight: 400; font-size: 1rem; }

.stack { display: flex; flex-direction: column; gap: .5rem; }
.stack > button, .stack > .btn { margin-top: .5rem; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .5rem 0; }
.row input { width: auto; flex: 1 1 12rem; }
.btn {
  font: inherit; font-weight: 600; display: inline-block; padding: .6rem 1.1rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--petrol); background: transparent; color: var(--petrol); text-decoration: none; text-align: center;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.small { padding: .25rem .6rem; font-size: .85rem; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.linklike { font: inherit; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: underline; text-align: left; }

.notice { padding: .75rem 1rem; border-radius: 6px; background: #fdf1d3; }
.notice.good { background: #dcefe6; color: #0f4532; }
.notice.bad { background: #fbe3e1; color: #7d1a15; }
.secret .copy { margin-top: .5rem; }
.quiet { color: var(--dim); font-size: .92rem; }
.bad-text { color: var(--bad); }
.empty { padding: 1.5rem; border: 2px dashed var(--rule); border-radius: 8px; color: var(--dim); }
.copy { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.copy code { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: .4rem .6rem; overflow-wrap: anywhere; min-width: 0; }

/* ---------- Вход пользователя ---------- */
.public { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.gate { width: 100%; max-width: 25rem; }
.pass { background: var(--paper); border-radius: 14px; border-top: 8px solid var(--accent); padding: 1.75rem 1.5rem; box-shadow: 0 18px 40px -28px rgba(18, 59, 58, .55); }
.pass-logo { max-height: 48px; margin-bottom: 1rem; display: block; }
.gate-foot { color: var(--dim); font-size: .85rem; margin: .75rem .25rem; }
.way {
  display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border-radius: 8px; border: 1px solid var(--rule);
  text-decoration: none; color: var(--ink); font-weight: 600;
}
.way::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--line); flex: none; }
.way:hover { border-color: var(--line); }
.or { display: flex; align-items: center; gap: .75rem; color: var(--dim); font-size: .85rem; }
.or::before, .or::after { content: ""; height: 1px; background: var(--rule); flex: 1; }
input.code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.match { font-family: Unbounded, sans-serif; font-size: 3.5rem; margin: .5rem 0 1rem; color: var(--petrol); }
.qr { margin: 1rem 0; }
.qr svg { width: 150px; height: 150px; display: block; }
.qr figcaption { color: var(--dim); font-size: .85rem; margin-top: .4rem; }

/* ---------- Настройки ---------- */
.admin { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--petrol); color: #e5eeec; padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
.side a, .side button { color: #e5eeec; text-decoration: none; padding: .45rem .75rem; border-radius: 6px; }
.side a:hover { background: rgba(255, 255, 255, .08); }
.side a[aria-current] { background: var(--signal); color: var(--ink); font-weight: 600; }
.side .brand { font-family: Unbounded, sans-serif; font-size: .95rem; margin-bottom: 1.25rem; }
.side form { margin-top: auto; }
.side button { text-decoration: underline; }
.work { padding: 2rem clamp(1rem, 4vw, 3rem) 4rem; max-width: 58rem; }
.lead { color: var(--dim); max-width: 38rem; }
.work form.stack { max-width: 36rem; }
fieldset { border: 0; border-top: 2px solid var(--rule); padding: 1rem 0 .5rem; margin: 1rem 0 0; }
legend { font-weight: 600; font-size: 1.05rem; padding: 0 .75rem 0 0; }
details > summary { cursor: pointer; padding: .5rem 0; }

.scheme-wrap { background: var(--paper); border-radius: 14px; padding: 1rem; overflow-x: auto; }
.scheme { width: 100%; min-width: 620px; height: auto; display: block; }
.scheme text { font: 600 14px Golos, sans-serif; fill: var(--ink); }
.scheme text.sub { font-weight: 400; font-size: 11px; fill: var(--dim); }
.scheme text.hub { fill: #fff; font-family: Unbounded, sans-serif; font-size: 13px; }

.provider { background: var(--paper); border-radius: 8px; border-left: 8px solid var(--line); margin-bottom: .75rem; padding: 0 1.25rem; }
.provider > summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; list-style-position: inside; }
.provider-body { padding-bottom: 1.25rem; }
.state { color: var(--dim); font-size: .9rem; }
.state.on { color: var(--good); font-weight: 600; }

.cards { list-style: none; padding: 0; display: grid; gap: .5rem; }
.cards li { background: var(--paper); border-left: 8px solid var(--line); border-radius: 8px; padding: .9rem 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }

.scroll { overflow-x: auto; background: var(--paper); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--mist); vertical-align: top; }
th { color: var(--dim); font-weight: 600; white-space: nowrap; }
td.row { margin: 0; flex-wrap: nowrap; }

@media (max-width: 760px) {
  .admin { display: block; }
  .side { flex-direction: row; flex-wrap: wrap; padding: .75rem; }
  .side .brand { width: 100%; margin-bottom: .25rem; }
  .side form { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
