/* roehrhoff.net intern – dunkles Design */
:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg2: #10131a;
  --card: #161a23;
  --card2: #1c212c;
  --ink: #e7e9ee;
  --muted: #8b93a3;
  --line: #262c38;
  --input: #0f1218;
  --accent: #e0313b;
  --accent-soft: rgba(224, 49, 59, .16);
  --ok: #3fb96b;
  --info: #4a9eff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 50% -200px, #1a1f2b 0%, var(--bg) 60%) fixed;
  color: var(--ink);
}
a { color: #ff6b73; }
a:hover { color: #ff8a90; }
main { flex: 1; width: 100%; margin: 0 auto; padding: 2rem 1.25rem; }
main.narrow { max-width: 24rem; display: flex; flex-direction: column; justify-content: center; }
main.wide { max-width: 64rem; }
footer { text-align: center; color: #5a6170; font-size: .75rem; padding: 1.5rem; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 1rem; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .85rem; font-weight: normal; }
.small { font-size: .85rem; text-align: center; margin: 1.25rem 0 0; }
code { background: var(--input); padding: .1rem .35rem; border-radius: 4px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; margin-bottom: 1.25rem; box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.card.danger { border-top: 3px solid var(--accent); }

/* Anmeldung */
.card.login { padding: 2.25rem 2rem 2rem; text-align: left; }
.card.login h1 { text-align: center; }
.card.login > .muted { text-align: center; margin: 0 0 1.25rem; }
.logo {
  width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5rem;
  background: var(--accent-soft); border: 1px solid rgba(224,49,59,.35);
}

/* Kopfzeile */
nav.top {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem;
  padding: .8rem 1.25rem; background: rgba(11,13,18,.85); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5;
}
nav.top a, nav.top .link { color: var(--ink); text-decoration: none; }
nav.top .brand { font-weight: 700; }
nav.top .brand span { color: var(--muted); font-weight: 400; }
nav.top .brand a + span + a { font-weight: 400; color: #ff6b73; }
nav.top .links { display: flex; align-items: center; gap: 1.25rem; color: var(--muted); }
nav.top .links a:hover, nav.top .link:hover { color: #fff; text-decoration: underline; }
nav.top form { margin: 0; }

/* Formulare */
form { margin: 0; }
label { display: block; font-weight: 600; font-size: .85rem; color: #c3c8d2; margin: 1rem 0 .4rem; }
input[type=email], input[type=password], input[type=text], input:not([type]) {
  width: 100%; padding: .75rem .85rem; font: inherit; color: var(--ink);
  background: var(--input); border: 1px solid var(--line); border-radius: 10px;
}
input::placeholder { color: #4b5261; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:-webkit-autofill { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px var(--input) inset; caret-color: var(--ink); }
input.code { font-size: 1.8rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; padding-left: 1.3rem; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 1rem 0 0; padding: .5rem 1rem .75rem; }
legend { font-weight: 600; font-size: .85rem; color: #c3c8d2; padding: 0 .3rem; }
label.check { font-weight: 400; color: var(--ink); display: flex; gap: .5rem; align-items: center; margin: .5rem 0; }
input[type=checkbox] { accent-color: var(--accent); width: 1rem; height: 1rem; }
button, .button {
  display: inline-block; margin-top: 1.25rem; padding: .75rem 1.1rem; font: inherit; font-weight: 600;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card2); color: var(--ink);
  cursor: pointer; text-decoration: none;
}
button:hover { border-color: #3a4252; }
button.primary, .button.primary {
  width: 100%; background: var(--accent); border-color: var(--accent); color: #fff; text-align: center;
}
button.primary:hover { filter: brightness(1.1); }
button.danger { background: transparent; color: #ff6b73; border-color: var(--accent); }
button.link {
  background: none; border: 0; padding: 0; margin: 0; font-weight: 400; color: #ff6b73;
  text-decoration: underline; cursor: pointer;
}
form.secondary { text-align: center; margin-top: 1rem; }

/* Meldungen */
.alert {
  padding: .75rem 1rem; border-radius: 10px; margin: 1rem 0;
  border: 1px solid rgba(224,49,59,.4); background: rgba(224,49,59,.12); color: #ffd1d4;
}
.alert.ok { border-color: rgba(63,185,107,.4); background: rgba(63,185,107,.12); color: #c9f2d7; }
.alert.info { border-color: rgba(74,158,255,.4); background: rgba(74,158,255,.12); color: #cfe4ff; }
code.pw {
  display: block; font-size: 1.3rem; margin: .5rem 0; padding: .6rem; background: var(--input);
  color: #fff; border-radius: 8px; user-select: all;
}

/* Kacheln */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.tile {
  display: flex; flex-direction: column; gap: .3rem; padding: 1.5rem; min-height: 9.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); transition: transform .12s, border-color .12s, background .12s;
}
a.tile:hover, a.tile:focus { border-color: var(--accent); background: var(--card2); transform: translateY(-2px); color: var(--ink); }
.tile .icon { font-size: 2rem; }
.tile .t { font-weight: 700; font-size: 1.1rem; }
.tile .d { color: var(--muted); font-size: .88rem; }
.tile.off { opacity: .4; }

/* Tabellen */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
td.ua { color: var(--muted); font-size: .8rem; }
tr.inactive td { color: var(--muted); }
table.log td { font-size: .8rem; }
.badge { display: inline-block; font-size: .68rem; padding: .05rem .45rem; border-radius: 99px; background: var(--accent); color: #fff; vertical-align: middle; }
.badge.grey { background: #3a4252; }

@media (max-width: 34rem) {
  main.narrow { justify-content: flex-start; padding-top: 3rem; }
  .card, .card.login { padding: 1.5rem 1.25rem; }
  nav.top .links { gap: .9rem; font-size: .9rem; }
}
