:root {
  color-scheme: dark;
  --background: #131715;
  --panel: #1d2220;
  --field: #141916;
  --border: #414b44;
  --text: #f0f4f0;
  --muted: #bdc8bf;
  --accent: #b2f48b;
  --radius: 6px;
  font: 15px/1.45 system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1,h2,h3,h4,p,form { margin: 0; }
h1 { font-size: clamp(1.8rem,3vw,2.45rem); line-height: 1.1; letter-spacing: -.055em; }
h2 { font-size: 1.38rem; letter-spacing: -.035em; }
h3 { font-size: 1rem; }
a { color: var(--accent); }
button,input,textarea,select,.button-link { border-radius: var(--radius); font: inherit; }
button,.button-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px;
  padding: 7px 13px; border: 1px solid transparent; background: var(--accent); color: #15220f;
  font-weight: 650; cursor: pointer; text-decoration: none;
  transition: background-color 150ms ease, filter 150ms ease;
}
button:hover,.button-link:hover { filter: brightness(1.08); }
button:active,.button-link:active { filter: brightness(.92); }
button:disabled { opacity: .5; cursor: default; }
.secondary { color: var(--text); border-color: var(--border); background: transparent; }
.secondary:hover { background: #323a33; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
input,textarea,select {
  width: 100%; min-width: 0; min-height: 42px; padding: 8px 12px; border: 1px solid #626e63;
  background: var(--field); color: var(--text);
}
input[type=checkbox],input[type=radio] { min-height: auto; width: 17px; height: 17px; margin: 0; accent-color: var(--accent); flex: none; }
label { display: grid; gap: 5px; color: var(--muted); font-weight: 550; }
.admin-header { display: flex; align-items: center; gap: clamp(16px,4vw,64px); padding: 12px max(20px,calc((100% - 1160px)/2)); background: #191e1a; border-bottom: 1px solid var(--border); }
.brand,.login-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; white-space: nowrap; }
.brand svg,.login-brand svg { width: 36px; height: 36px; padding: 4px; border-radius: 6px; color: #1a2814; background: var(--accent); }
.admin-header nav { display: flex; gap: 4px; }
.admin-header a { display: inline-flex; align-items: center; padding: 8px 14px; min-height: 40px; border-radius: 5px; text-decoration: none; color: var(--muted); font-weight: 600; }
.admin-header a[aria-current] { background: #303a30; color: var(--accent); }
.admin-header a:hover { background: #272e28; }
.admin-header form { margin-left: auto; }
.account-page { width: min(calc(100% - 32px),660px); margin: clamp(28px,7vh,72px) auto; }
.account-page h1 { margin-bottom: 24px; }
.connection { display: grid; justify-items: start; gap: 18px; padding: clamp(18px,4vw,32px); background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.connection form,.login-form { display: grid; gap: 12px; width: 100%; }
.connection button { justify-self: start; }
.qr-frame { max-width: 210px; background: white; padding: 10px; }
#qr-code { display: block; width: 100%; }
.feedback { color: var(--muted); overflow-wrap: anywhere; }
.feedback:empty { display: none; }
.feedback[data-tone=error],.login-error { color: #ffbaa9; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  button,.button-link { transition: none; }
}
@media (max-width: 660px) {
  .admin-header { flex-wrap: wrap; gap: 6px 12px; padding: 10px 16px 4px; }
  .admin-header nav { order: 3; width: 100%; }
  .admin-header a { flex: 1; justify-content: center; }
}
@media (pointer:coarse),(max-width: 768px) {
  button,.button-link,.admin-header a,input,select,summary { min-height: 44px; }
}
