/* Anmeldeseite und Admin-Seite. Nutzt die Werte aus style.css (Schrift 12/14/16/22, Raster 4/8, eine Ecke, eine Akzentfarbe). */
body.auth { overflow: auto; min-height: 100%; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.auth-main { display: grid; place-items: center; padding: var(--s5) var(--s4); }
.auth-card { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); }
.auth-card h1 { margin: var(--s4) 0 var(--s1); font-size: var(--fs-xl); line-height: 28px; font-weight: 600; }
.auth-card .logo { color: var(--ink); }
.auth-card p { margin: 0 0 var(--s4); color: var(--muted); }
.auth-card label { display: block; font-weight: 600; font-size: var(--fs-s); line-height: 16px; margin: var(--s4) 0 var(--s1); }
.auth-card input[type=text], .auth-card input[type=password], .auth-card input[type=email] {
  width: 100%; height: 40px; padding: 0 var(--s3); font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r); min-height: 0;
}
.auth-card input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.auth-card button.primary { width: 100%; height: 40px; margin-top: var(--s5); border: 0; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.auth-card button.primary:hover { filter: brightness(1.08); }
.auth-error { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--bad); border-radius: var(--r); color: var(--bad); font-size: var(--fs-s); line-height: 16px; }
.auth-error:empty { display: none; }
.auth-foot { margin-top: var(--s4); font-size: var(--fs-s); line-height: 16px; color: var(--muted); }

/* Admin */
.admin-main { max-width: 920px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s6); }
.admin-main h1 { font-size: var(--fs-xl); line-height: 28px; font-weight: 600; margin: 0 0 var(--s4); }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--panel); border-bottom: 1px solid var(--line); }
.admin-top a { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.admin-top a:hover { text-decoration: underline; }
.card { border-top: 1px solid var(--line); padding: var(--s4) 0 var(--s5); }
.card h2 { margin: 0 0 var(--s3); font-size: var(--fs-l); line-height: 24px; font-weight: 600; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s3); align-items: end; }
.grid-form label { font-size: var(--fs-s); line-height: 16px; font-weight: 600; display: block; margin-bottom: var(--s1); }
.grid-form input, .grid-form select { width: 100%; height: 40px; padding: 0 var(--s3); font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r); }
.grid-form input:focus-visible, .grid-form select:focus-visible { outline-offset: 0; border-color: var(--accent); }
.btn2 { height: 40px; padding: 0 var(--s4); border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--panel); font-weight: 600; white-space: nowrap; }
.btn2:hover { background: var(--soft); }
.btn2.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn2.accent:hover { filter: brightness(1.08); }
.btn2.bad { color: var(--bad); border-color: var(--bad); }
.btn2.small { height: 32px; padding: 0 var(--s3); font-size: var(--fs-s); line-height: 16px; }
table.users { width: 100%; border-collapse: collapse; }
table.users th, table.users td { text-align: left; padding: var(--s3) var(--s2); border-bottom: 1px solid var(--line); vertical-align: middle; }
table.users th { font-size: var(--fs-s); line-height: 16px; color: var(--muted); font-weight: 600; }
table.users td.act .btn2 { margin: 0 var(--s2) var(--s1) 0; }
table.users tr > td { overflow-wrap: anywhere; }
.tag { display: inline-block; padding: 0 var(--s2); border: 1px solid var(--line-strong); border-radius: var(--r); font-size: var(--fs-s); line-height: 20px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tag.admin { border-color: var(--accent); color: var(--accent); }
.tag.off { border-color: var(--bad); color: var(--bad); }
.secret { display: none; margin-top: var(--s3); padding: var(--s3) var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--soft); }
.secret.on { display: block; }
.secret code { display: block; margin: var(--s2) 0; font: 600 var(--fs-m)/20px ui-monospace, Menlo, Consolas, monospace; user-select: all; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  table.users thead { display: none; }
  table.users, table.users tbody, table.users tr, table.users td { display: block; width: 100%; }
  table.users tr { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
  table.users td { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); border: 0; padding: var(--s1) 0; }
  table.users td::before { content: attr(data-l); color: var(--muted); font-size: var(--fs-s); line-height: 16px; font-weight: 600; flex: none; }
  table.users td.act { display: block; padding-top: var(--s2); }
  table.users td.act::before { content: none; }
}
