:root {
  --bg: #0a0a0b; --panel: #141416; --panel-2: #1b1b1e; --border: #27272b;
  --text: #ececee; --muted: #8d8d95; --accent: #ff7a00; --good: #2ecc71; --bad: #ff4d4d;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0 0 12px; font-weight: 650; line-height: 1.2; }
h2 { font-size: 18px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); margin-right: 10px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 28px; border-bottom: 1px solid var(--border); }
.top form { display: flex; align-items: center; gap: 12px; margin: 0; }
.brand { color: var(--text); font-weight: 700; font-size: 19px; display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand small { color: var(--muted); font-weight: 500; margin-left: 8px; font-size: 13px; }

.btn { display: inline-block; background: var(--accent); color: #111; border: 0; border-radius: 8px; padding: 10px 18px; font: inherit; font-weight: 650; cursor: pointer; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); font-weight: 500; padding: 7px 14px; font-size: 14px; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
button.link { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
button.link:hover { color: var(--text); }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }

/* Landingpage */
.hero { max-width: 820px; margin: 0 auto; padding: 84px 24px 56px; text-align: center; }
.hero h1 { font-size: clamp(32px, 6vw, 54px); letter-spacing: -0.02em; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 19px; color: var(--muted); max-width: 620px; margin: 0 auto 30px; }
.badge { display: inline-block; border: 1px solid rgba(255, 122, 0, .45); color: var(--accent); background: rgba(255, 122, 0, .08); border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 600; margin-bottom: 22px; }
.address { display: inline-block; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 22px; font: 600 18px/1 ui-monospace, Consolas, monospace; color: var(--muted); }
.address span { color: var(--accent); }
.features { max-width: 1080px; margin: 0 auto; padding: 0 24px 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.features .card p { color: var(--muted); margin: 0; font-size: 15px; }
.foot { border-top: 1px solid var(--border); padding: 20px 28px; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.foot a { color: var(--muted); }

/* Login-Boxen */
body.center { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px; }
.box { width: 100%; max-width: 420px; }
.box h1 { font-size: 20px; display: flex; align-items: center; margin-bottom: 22px; }
.box form { display: flex; flex-direction: column; gap: 14px; }
.box form.below { margin-top: 14px; align-items: center; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=password] { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 10px 12px; font: inherit; width: 100%; }
input:focus { outline: 0; border-color: var(--accent); }
.steps { padding-left: 20px; margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.secret { background: var(--bg); border: 1px dashed var(--accent); border-radius: 8px; padding: 14px; text-align: center; font: 600 16px/1.6 ui-monospace, Consolas, monospace; letter-spacing: .06em; margin-bottom: 10px; word-spacing: 4px; }
.codes { list-style: none; padding: 14px; margin: 0 0 18px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font: 600 15px/1.4 ui-monospace, Consolas, monospace; text-align: center; }

.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; font-size: 14px; }
.flash.ok { background: rgba(46, 204, 113, .08); border-color: rgba(46, 204, 113, .35); color: var(--good); }
.flash.error { background: rgba(255, 77, 77, .08); border-color: rgba(255, 77, 77, .35); color: var(--bad); }

/* Admin */
.wrap { max-width: 1100px; margin: 0 auto; padding: 26px 24px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.tile { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.tile .lbl { color: var(--muted); font-size: 13px; }
.tile .num { font-size: 27px; font-weight: 700; }
progress { width: 100%; height: 6px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--panel-2); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
td form { margin: 0; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status.up { background: rgba(46, 204, 113, .13); color: var(--good); }
.status.down { background: rgba(255, 77, 77, .15); color: var(--bad); }

/* Portal: Navigation, Formulare, Baukasten */
.nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tab { color: var(--muted); padding: 6px 12px; border-radius: 7px; font-size: 15px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.on { color: var(--text); background: var(--panel-2); }
.btn.big { padding: 14px 28px; font-size: 18px; }
.cta { margin-top: 30px; }
.btn.ghost.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn[disabled] { opacity: .35; cursor: default; }
.box.wide { max-width: 520px; }
.box h1 .brand { font-size: 20px; }
p.below { margin: 16px 0 0; text-align: center; }
.hint { color: var(--muted); font-size: 12px; opacity: .85; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
input[type=email], input[type=number], textarea { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 10px 12px; font: inherit; width: 100%; }
textarea { resize: vertical; }
input[type=color] { width: 70px; height: 40px; padding: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
input[type=file] { color: var(--muted); font: inherit; }
.addr-input { display: flex; align-items: center; gap: 6px; }
.addr-input span { color: var(--muted); white-space: nowrap; font-size: 15px; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin: 0; }
legend { color: var(--muted); font-size: 13px; padding: 0 6px; }
.tpl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tpl-opt { flex-direction: row; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 12px 10px; cursor: pointer; color: var(--text); }
.tpl-opt.t-dunkel { background: #101014; }
.tpl-opt.t-hell { background: #f3f1ec; color: #1c1c1c; }
.tpl-opt.t-bunt { background: linear-gradient(135deg, #2a1650, #0e3a5c); }
@media (max-width: 520px) { .tpl { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.stack.narrow { max-width: 380px; }
.row-form { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.card + .card, .tiles + .card, .card + .tiles { margin-top: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.tile .num.small-num { font-size: 16px; padding: 6px 0; word-break: break-all; }

.blocklist { list-style: none; margin: 0; padding: 0; }
.blocklist li { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.blocklist li:last-child { border-bottom: 0; }
.blocklist .pos { width: 26px; height: 26px; border-radius: 50%; background: var(--panel-2); color: var(--muted); font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.blocklist .what { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.blocklist .what .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blocklist .acts { display: flex; gap: 6px; }
.blocklist form { margin: 0; }
.addgrid { display: flex; flex-wrap: wrap; gap: 10px; }
.addgrid form { margin: 0; }

.picker { display: flex; flex-wrap: wrap; gap: 10px; }
.picker p { width: 100%; margin: 0; }
.pick { position: relative; width: 110px; height: 76px; border: 2px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; align-items: center; justify-content: center; }
.pick img { width: 100%; height: 100%; object-fit: cover; }
.pick input { position: absolute; top: 6px; left: 6px; z-index: 1; }
.pick:has(input:checked) { border-color: var(--accent); }
.pick.none span { font-size: 12px; }
.imggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.imggrid figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.imggrid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.imggrid form { margin: 0; }

.chart { width: 100%; height: auto; display: block; }
.chart rect { fill: var(--accent); }
.chart-legend { display: flex; justify-content: space-between; margin-top: 6px; }
.manage { display: flex; flex-wrap: wrap; gap: 18px; align-items: end; }
.manage form { margin: 0; }

/* Erweiterungen Admin + Pfad-Adressen */
.topnotice { background: rgba(255, 122, 0, .12); border-bottom: 1px solid rgba(255, 122, 0, .4); color: var(--accent); padding: 9px 28px; font-size: 14px; text-align: center; }
.topnotice.warn { background: rgba(255, 77, 77, .12); border-color: rgba(255, 77, 77, .4); color: var(--bad); }
.topnotice.admin-view { background: rgba(80, 140, 255, .12); border-color: rgba(80, 140, 255, .4); color: #8fb4ff; }
.topnotice a { color: inherit; text-decoration: underline; }
.flash.info { background: rgba(80, 140, 255, .08); border-color: rgba(80, 140, 255, .35); color: #9dbdff; }
.foot-links { display: flex; gap: 16px; }
.narrow-wrap { max-width: 800px; }
.legal h1 { font-size: 26px; }
.legal p { color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; margin-top: 20px; }
.cols > .card { margin: 0; }
.cols + .card, .card + .cols, .tiles + .tiles { margin-top: 20px; }
.tile.link { color: var(--text); }
.tile.link:hover { border-color: var(--accent); text-decoration: none; }
.rank { margin: 0; padding-left: 20px; }
.rank.plain { list-style: none; padding: 0; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.rank li:last-child { border-bottom: 0; }
.rank li b { margin-left: auto; }
.rank.plain li .status { margin-left: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; }
.filters label { min-width: 160px; }
.filters label:first-child { flex: 1; min-width: 220px; }
select { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 10px 12px; font: inherit; }
td.nowrap { white-space: nowrap; }
a.name { color: var(--text); font-weight: 600; }
a.name:hover { color: var(--accent); }
.head-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.head-acts form { margin: 0; }
.stack form .muted.small, form > .muted.small { margin-left: 8px; }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 15px; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.settings { display: flex; flex-direction: column; gap: 20px; }
.settings .card + .card { margin-top: 0; }
.settings > .btn { align-self: flex-start; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
