:root {
  color-scheme: light;
  --ink: #14202d;
  --muted: #596574;
  --blue: #204ed6;
  --tint: #edf2ff;
  --rule: #d9e0e7;
  --paper: #fff;
  --wash: #f4f6f8;
  font: 100%/1.5 Inter, Arial, "Liberation Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box }
body, h1, h2, p, ul { margin: 0 }
[hidden] { display: none !important }
h1, h2, strong { letter-spacing: -.035em }
h1 { font-size: clamp(1.75rem, 3.2vw, 2.45rem); line-height: 1.15 }
h2 { font-size: 1.5rem; line-height: 1.2; overflow-wrap: anywhere }
button, input, select { font: inherit }
button, a { touch-action: manipulation }
button { cursor: pointer }
button:disabled { opacity: .63; cursor: wait }
a { color: inherit; text-decoration: none }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px }
header { border-bottom: 1px solid var(--rule) }
.topbar {
  width: min(94%, 1490px); margin: auto; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.identity, nav, .quiet { display: inline-flex; gap: .6rem; align-items: center }
.identity strong { font-size: 1.25rem }
.identity span { padding-left: .7rem; border-left: 1px solid var(--rule); color: var(--muted); font-size: .875rem }
nav { gap: .75rem }
.quiet, .text { color: var(--blue); background: transparent; border: 0; font-size: .9375rem }
.quiet { color: var(--ink); min-height: 42px; padding: 0 .45rem }
.quiet:hover, .text:hover { color: var(--blue); text-decoration: underline }
.quiet svg { width: 18px; height: 18px }
.skip { position: absolute; transform: translateY(-150%); background: var(--blue); color: white; padding: .5rem; z-index: 1 }
.skip:focus { transform: none }
main { width: min(94%, 1000px); margin: auto }
main:focus { outline: 0 }
.loading, noscript p { margin: 3rem auto; color: var(--muted); text-align: center }
.login-pane { width: min(100%, 24rem); margin: clamp(3rem, 11vh, 7rem) auto }
.lead { color: var(--muted); margin: .55rem 0 2rem }
.fields { display: grid; gap: 1.05rem }
label { font-size: .9375rem; font-weight: 580; display: grid; gap: .3rem }
input, select { width: 100%; color: var(--ink); border: 1px solid #aeb9c4; border-radius: 5px; background: var(--paper); min-height: 44px; padding: .52rem .7rem; font-weight: normal; font-size: 1rem }
select { appearance: none; padding-right: 2rem }
label:has(> select) { position: relative }
label:has(> select)::after {
  content: ""; position: absolute; right: .95rem; bottom: 1.15rem; width: .45rem; height: .45rem;
  transform: rotate(45deg); border: solid var(--muted); border-width: 0 1.5px 1.5px 0; pointer-events: none;
}
.primary, .secondary, .row-action {
  min-height: 40px; padding: .5rem .85rem;
  font-size: .9375rem; font-weight: 600; border: 1px solid transparent; border-radius: 5px;
}
.primary { background: var(--blue); color: white }
.primary:hover { background: #193fac }
.secondary, .row-action { background: var(--paper); border-color: var(--rule); color: var(--ink) }
.secondary:hover, .row-action:hover { background: var(--wash); color: var(--blue) }
.login-pane .primary { margin-top: .35rem; min-height: 44px }
.admin-pane { padding: clamp(2rem, 6vw, 4rem) 0 }
.head-row, .user-row, .actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem }
.head-row { margin-bottom: 1.5rem }
.users { padding: 0; border-top: 1px solid var(--rule) }
.user-row { border-bottom: 1px solid var(--rule); min-height: 80px; padding: .85rem 0 }
.user-data { min-width: 0 }
.user-name { font-weight: 650; overflow-wrap: anywhere }
.user-meta { color: var(--muted); font-size: .875rem }
.user-meta .blocked { color: #983b26 }
.row-action { flex-shrink: 0 }
#feedback { color: #1c6955; padding: .5rem 0 1rem }
.error { color: #a42c2b; font-size: .9375rem }
#list-error { padding: .65rem 0 }
dialog { width: min(calc(100% - 2rem), 27rem); max-height: 90dvh; padding: 1.5rem; color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); overflow-y: auto }
dialog::backdrop { background: rgba(15, 29, 47, .32) }
.actions { justify-content: flex-end; margin-top: .3rem }
small, .hint { display: block; color: var(--muted); font-size: .84375rem; margin-top: .3rem }
@media (max-width: 540px) {
  main, .topbar { width: calc(100% - 2rem) }
  nav { gap: .1rem }
  .identity span { display: none }
  .head-row { align-items: flex-start; flex-direction: column }
  .user-row { min-height: 84px }
  .topbar { min-height: 58px }
}
:root,:root[data-theme]{color-scheme:inherit;--ink:var(--fg);--muted:var(--dim);--tint:var(--selected);--paper:var(--panel);--wash:var(--low);font-family:var(--body);background:var(--bg);color:var(--fg)}
:root[data-theme=dark]{color-scheme:dark;--blue:#84aeff;--rule:#333b48}
:root[data-theme=light]{color-scheme:light;--blue:#0058be;--rule:#cbd2df}
body{background:var(--bg)}header,dialog{background:var(--panel)}header .topbar{width:auto;margin:0 20px;gap:12px}.identity strong,h1,h2{font-family:var(--head)}.theme-control{margin-left:auto;background:var(--panel);border:1px solid var(--rule);border-radius:4px;color:var(--fg);padding:6px;display:grid;place-items:center}.login-pane{background:var(--panel);border:1px solid var(--rule);padding:24px;border-radius:6px}.primary{background:#2365c9}.primary:hover{background:#194e9e}input,select{border-color:var(--rule)}.error,.user-meta .blocked{color:var(--amber)}#feedback{color:var(--green)}
#telegram-login{margin-top:16px}#telegram-open{width:100%;padding:10px;border:1px solid var(--rule);border-radius:4px;color:var(--fg);background:var(--panel)}
