/* Aurovex Network DC Bot: Web-Dashboard, Farbwelt Neon (Brand-Kit 05_Neon) */

@font-face {
  font-family: "Geist";
  src: url("/static/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/static/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Syncopate";
  src: url("/static/fonts/syncopate-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Marke */
  --bg: #040509;
  --cyan: #00e5ff;
  --magenta: #ff2bd6;
  --text: #ffffff;
  --subline: #b3a6d6;
  /* Flächen und Linien */
  --surface: #0a0c15;
  --surface-2: #10131f;
  --line: rgba(179, 166, 214, 0.16);
  --line-strong: rgba(179, 166, 214, 0.32);
  --muted: #9a93b5;
  /* Zustände */
  --ok: #2bff88;
  --warn: #ffd60a;
  --error: #ff3b5c;
  /* Lichtstrich aus dem Logo: transparent, Cyan, Weiß, Magenta, transparent */
  --light-stroke: linear-gradient(90deg, transparent, var(--cyan) 25%, #fff 50%, var(--magenta) 75%, transparent);
  --radius: 10px;
  --font-ui: "Geist", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, Consolas, monospace;
  --font-logo: "Syncopate", "Geist", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(0, 229, 255, 0.08), transparent 60%),
    radial-gradient(1000px 500px at 95% -5%, rgba(255, 43, 214, 0.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font-ui);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 650; text-wrap: balance; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 0.3em; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* --- Kopf und Fuß --------------------------------------------------------- */

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(16px, calc((100vw - 1200px) / 2));
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--light-stroke);
  opacity: 0.6;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 10px; }
.wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.wordmark strong { font-family: var(--font-logo); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.22em; text-transform: uppercase; }
.wordmark small { color: var(--subline); font-size: 0.75rem; letter-spacing: 0.08em; }

.user-menu { display: flex; align-items: center; gap: 10px; }
.user-menu form { margin: 0; }
.avatar { border-radius: 50%; border: 1px solid var(--line-strong); }
.user-name { color: var(--subline); max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 16px 48px; }
.footer { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 24px 16px; border-top: 1px solid var(--line); }

.eyebrow { color: var(--subline); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; margin: 0 0 6px; }
.lead { color: var(--subline); max-width: 65ch; }
.hint { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 4px; }

/* --- Start ---------------------------------------------------------------- */

.hero { display: flex; align-items: center; gap: 32px; padding: 48px 0; flex-wrap: wrap; }
.hero-avatar { border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong), 0 0 36px rgba(0, 229, 255, 0.18); }
.hero-text { flex: 1; min-width: 280px; }
.hero h1 { font-size: 2.3rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: 600 0.92rem var(--font-ui);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--cyan); color: #00151a; }
.btn-primary:hover { box-shadow: 0 0 18px rgba(0, 229, 255, 0.35); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--cyan); }
.btn-danger { background: transparent; color: var(--error); border-color: rgba(255, 59, 92, 0.5); }
.btn-danger:hover { background: rgba(255, 59, 92, 0.1); }
.btn-ghost { background: transparent; color: var(--subline); padding: 6px 10px; }
.btn-ghost:hover { color: var(--text); }

/* --- Meldungen ------------------------------------------------------------ */

.flash, .notice { border-radius: var(--radius); padding: 12px 16px; margin: 0 0 20px; border: 1px solid var(--line); background: var(--surface); }
.flash-ok, .notice-ok { border-color: rgba(43, 255, 136, 0.45); }
.flash-error, .notice-error { border-color: rgba(255, 59, 92, 0.55); }
.notice-warn { border-color: rgba(255, 214, 10, 0.5); }
.notice-info { border-color: rgba(0, 229, 255, 0.4); }
.flash-ok::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.flash-error::before { content: "! "; color: var(--error); font-weight: 700; }

/* --- Serverliste ---------------------------------------------------------- */

.server-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.server-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.server-card:hover { border-color: var(--line-strong); }
.server-card-missing { opacity: 0.85; }
.server-name { font-weight: 600; overflow-wrap: anywhere; }
.guild-icon { border-radius: 50%; flex-shrink: 0; }
.guild-icon-fallback { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line-strong); font-weight: 700; font-size: 1.3rem; }

/* --- Server-Seite ----------------------------------------------------------- */

.server-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.server-head h1 { margin: 0; }
.server-head .guild-icon-fallback { width: 48px; height: 48px; }
.server-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.side-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; }
.side-nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--subline); border-left: 2px solid transparent; }
.side-nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.side-nav a.active { background: var(--surface); color: var(--text); border-left-color: var(--cyan); }
.nav-off { font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.server-content { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.section-head h2 { font-size: 1.5rem; margin-bottom: 4px; }
.section-head p { color: var(--subline); margin: 0; }

/* --- Karten --------------------------------------------------------------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* --- Formulare ------------------------------------------------------------ */

.stack-form { display: flex; flex-direction: column; gap: 16px; }
.inline-form { display: inline; margin: 0; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 600; font-size: 0.9rem; }
input[type="text"], select, textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
}
textarea { resize: vertical; min-height: 90px; font-family: var(--font-ui); }
input[type="text"]:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15); }
select option:disabled { color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--cyan); margin: 0; }
.check-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 20px; }
.counter { color: var(--muted); font-size: 0.78rem; text-align: right; font-family: var(--font-mono); }

/* --- Tabellen und Listen ---------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
tbody tr:last-child td { border-bottom: 0; }
td.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.item-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.item-paused { opacity: 0.75; }
.item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.item-title { font-weight: 650; overflow-wrap: anywhere; }
.item-meta { color: var(--subline); font-size: 0.88rem; display: flex; gap: 6px 16px; flex-wrap: wrap; }
.item-preview { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 6.5em; overflow: hidden; border-left: 2px solid var(--line-strong); padding-left: 12px; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.badge { display: inline-block; font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 1px 9px; border: 1px solid; white-space: nowrap; }
.badge-on { color: var(--ok); border-color: rgba(43, 255, 136, 0.45); }
.badge-off { color: var(--muted); border-color: var(--line-strong); }

.message-page { max-width: 640px; margin: 48px auto; text-align: center; }
.message-page .lead { margin-left: auto; margin-right: auto; }

/* --- Schmale Bildschirme -------------------------------------------------- */

@media (max-width: 760px) {
  .server-layout { grid-template-columns: 1fr; gap: 16px; }
  .side-nav { position: static; flex-direction: row; overflow-x: auto; }
  .side-nav a { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; }
  .side-nav a.active { border-bottom-color: var(--cyan); }
  .hero { padding: 24px 0; }
  .hero h1 { font-size: 1.8rem; }
  .user-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
