/* ForeverUI Dashboard: gleiche Farbwelt wie foreverui.de */
:root {
  --bg: #0b0d14;
  --bg-2: #10131d;
  --flaeche: rgba(255, 255, 255, 0.035);
  --flaeche-2: rgba(255, 255, 255, 0.06);
  --linie: rgba(255, 255, 255, 0.08);
  --linie-stark: rgba(255, 255, 255, 0.16);
  --text: #ece7dc;
  --text-weich: #b6b0a3;
  --text-leise: #7d7a73;
  --gold: #e9b45a;
  --gold-weich: #f5d39a;
  --glut: #e0703f;
  --frost: #7cc6d6;
  --moos: #9cc58a;
  --rot: #e5675f;
  --radius: 14px;
  --radius-klein: 9px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, rgba(233, 180, 90, 0.07), transparent 60%), var(--bg);
  color: var(--text);
  font: 15px/1.55 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
}
a { color: var(--gold-weich); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0 0 4px; font-weight: 650; letter-spacing: -0.01em; }
h1 .symbol { margin-right: 4px; }
h2 { font-size: 17px; margin: 32px 0 12px; color: var(--text-weich); font-weight: 600; }
h3 { margin: 0; font-size: 15px; }
code { background: var(--flaeche-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
small { color: var(--text-leise); }
.unterzeile { color: var(--text-leise); margin: 0 0 24px; }
.leer { color: var(--text-leise); padding: 24px; border: 1px dashed var(--linie-stark); border-radius: var(--radius); text-align: center; }

/* Rahmen */
.rahmen { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.rahmen.ohne-nav { grid-template-columns: 1fr; }
.rahmen.ohne-nav aside { display: none; }
.rahmen.ohne-nav main { max-width: 1000px; margin: 0 auto; width: 100%; }
aside {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--bg-2); border-right: 1px solid var(--linie);
  display: flex; flex-direction: column; padding: 18px 12px;
}
.marke { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 4px 8px 18px; }
.marke:hover { text-decoration: none; }
.marke em { color: var(--text-leise); font-style: normal; font-size: 13px; }
.gildenwahl select, .gildenname { width: 100%; margin-bottom: 14px; }
.gildenname { display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: var(--flaeche); border-radius: var(--radius-klein); font-weight: 600; }
.gildenname img { width: 22px; height: 22px; border-radius: 6px; }
nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
nav h4 { margin: 16px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-leise); }
nav a { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: var(--radius-klein); color: var(--text-weich); }
nav a span { width: 20px; text-align: center; }
nav a:hover { background: var(--flaeche-2); color: var(--text); text-decoration: none; }
nav a.aktiv { background: rgba(233, 180, 90, 0.12); color: var(--gold-weich); }
.ich { display: flex; align-items: center; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--linie); margin-top: 12px; }
.ich img { width: 28px; height: 28px; border-radius: 50%; }
.ich span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ich form { margin: 0; }
main { padding: 32px 40px 80px; min-width: 0; }
.menue-knopf { display: none; }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--flaeche-2); color: var(--text); border: 1px solid var(--linie-stark);
  border-radius: var(--radius-klein); padding: 8px 14px; font: inherit; font-weight: 550;
}
.knopf:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.knopf.haupt { background: var(--gold); color: #1d1608; border-color: transparent; }
.knopf.haupt:hover { background: var(--gold-weich); }
.knopf.gefahr { color: var(--rot); border-color: rgba(229, 103, 95, 0.4); }
.knopf.leise { background: none; border-color: transparent; color: var(--text-leise); }
.knopf.klein { padding: 4px 10px; font-size: 13px; }
.knopf.gross { padding: 12px 22px; font-size: 16px; }
.knopf.discord { background: #5865f2; border-color: transparent; color: #fff; }
.knopf.discord:hover { background: #6a75f5; }

/* Meldungen */
.meldung { padding: 10px 14px; border-radius: var(--radius-klein); margin-bottom: 18px; border: 1px solid; }
.meldung.ok { background: rgba(156, 197, 138, 0.1); border-color: rgba(156, 197, 138, 0.35); color: var(--moos); }
.meldung.fehler { background: rgba(229, 103, 95, 0.1); border-color: rgba(229, 103, 95, 0.35); color: #f2a29c; }
.meldung.info { background: rgba(124, 198, 214, 0.08); border-color: rgba(124, 198, 214, 0.3); color: var(--frost); }

/* Raster und Karten */
.raster { display: grid; gap: 14px; }
.raster.zwei { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.raster.drei { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.raster.vier { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.karte {
  display: flex; gap: 14px; align-items: center; padding: 16px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); color: var(--text);
}
a.karte:hover { border-color: var(--linie-stark); background: var(--flaeche-2); text-decoration: none; }
.karte img, .karte .platzhalter { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.karte .platzhalter { display: grid; place-items: center; background: var(--flaeche-2); font-size: 20px; font-weight: 700; }
.karte p { margin: 2px 0; }
.karte.bot > div { flex: 1; }
.karte.modul .symbol { font-size: 24px; width: 36px; text-align: center; }
.karte.modul > div { flex: 1; }
.karte.modul .zustand { font-size: 12px; color: var(--moos); }
.karte.modul.aus { opacity: 0.6; }
.karte.modul.aus .zustand { color: var(--text-leise); }
.karte.panel { flex-direction: column; align-items: stretch; }
.gruen { color: var(--moos); }
.rot { color: var(--rot); }

/* Diagramme */
.diagramm { margin: 0; padding: 14px 16px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.diagramm figcaption { display: flex; justify-content: space-between; color: var(--text-leise); font-size: 13px; margin-bottom: 8px; }
.diagramm figcaption b { color: var(--text); font-size: 18px; }
.diagramm svg { width: 100%; height: 56px; display: block; }
.diagramm rect { fill: var(--gold); opacity: 0.85; }
.diagramm rect:hover { opacity: 1; fill: var(--gold-weich); }

/* Tabellen */
.liste { width: 100%; border-collapse: collapse; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.liste th, .liste td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.liste th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-leise); font-weight: 600; }
.liste td.breit { width: 40%; color: var(--text-weich); }
.liste tr:last-child td { border-bottom: none; }
.liste tr.klickbar { cursor: pointer; }
.liste tr.klickbar:hover td { background: var(--flaeche-2); }
.liste tr.durch td { opacity: 0.5; }
.liste .person { display: flex; gap: 8px; align-items: center; }
.liste .person img { width: 24px; height: 24px; border-radius: 50%; }
.marke-klein { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--flaeche-2); white-space: nowrap; }
.marke-klein.offen { color: var(--moos); background: rgba(156, 197, 138, 0.12); }
.seiten { display: flex; gap: 16px; }

.werkzeugleiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.werkzeugleiste form { display: flex; gap: 8px; margin: 0; }
.tabs { display: flex; gap: 4px; background: var(--flaeche); padding: 4px; border-radius: var(--radius-klein); }
.tabs a { padding: 5px 12px; border-radius: 7px; color: var(--text-weich); }
.tabs a.aktiv { background: var(--flaeche-2); color: var(--text); }
form.inline { display: inline-flex; gap: 6px; margin: 0; align-items: center; }

/* Formulare */
input[type=text], input[type=url], input[type=number], input[type=search], select, textarea {
  width: 100%; background: rgba(0, 0, 0, 0.25); color: var(--text);
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); padding: 8px 11px; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(233, 180, 90, 0.5); outline-offset: 1px; border-color: var(--gold); }
textarea { resize: vertical; min-height: 70px; }
input[type=color] { width: 56px; height: 38px; padding: 2px; background: none; border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); }
.werkzeugleiste input, .werkzeugleiste select { width: auto; min-width: 200px; }
form.einstellungen { margin-bottom: 24px; }
.kasten { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.kasten h3 { margin-bottom: 4px; }
.kasten p { margin: 0 0 12px; color: var(--text-leise); }
.kasten form.aktion { display: flex; gap: 8px; max-width: 520px; }
.felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px 22px; }
.feld { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.feld.breit { grid-column: 1 / -1; }
.feld.reihe { flex-direction: row; justify-content: space-between; align-items: center; }
.feld-kopf { display: flex; flex-direction: column; gap: 1px; }
.feld-kopf label { font-weight: 550; }
.feld.hat-fehler { border-color: rgba(229, 103, 95, 0.6); }
small.fehler { color: #f2a29c; }
.mit-einheit { display: flex; align-items: center; gap: 8px; }
.mit-einheit input { max-width: 160px; }
.mit-einheit em { color: var(--text-leise); font-style: normal; }
.leiste { position: sticky; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 14px 0; margin-top: 8px; background: linear-gradient(transparent, var(--bg) 30%); }
.ungespeichert { display: none; color: var(--gold); font-size: 13px; }
form.geaendert .ungespeichert { display: inline; }

/* Schalter */
.schalter { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.schalter input { opacity: 0; width: 0; height: 0; }
.schalter span { position: absolute; inset: 0; background: var(--flaeche-2); border: 1px solid var(--linie-stark); border-radius: 99px; cursor: pointer; transition: 0.15s; }
.schalter span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: var(--text-leise); border-radius: 50%; transition: 0.15s; }
.schalter input:checked + span { background: rgba(233, 180, 90, 0.3); border-color: var(--gold); }
.schalter input:checked + span::before { transform: translateX(20px); background: var(--gold); }
.schalter input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Tabellen-Editor */
.tabelle .zeile { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--linie); border-radius: var(--radius-klein); margin-bottom: 8px; background: rgba(0, 0, 0, 0.15); }
.tabelle .zelle { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; min-width: 120px; }
.tabelle .entfernen { align-self: center; }
.tabelle .zelle > span { font-size: 12px; color: var(--text-leise); }
.tabelle .zelle textarea { min-height: 38px; }

/* Chips für Mehrfachauswahl */
.chips { position: relative; display: flex; flex-direction: column; gap: 6px; }
.chips-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--flaeche-2); border: 1px solid var(--linie-stark); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; margin: 0 4px 4px 0; }
button.chip:hover { border-color: var(--rot) !important; }
.chips-auswahl { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 10; max-height: 260px; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); margin-top: 4px; padding: 4px; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7); }
.chips.offen .chips-auswahl:not(:empty) { display: block; }
.chips-auswahl button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 6px 10px; border-radius: 6px; font: inherit; cursor: pointer; }
.chips-auswahl button:hover { background: var(--flaeche-2); }

/* Anmelden */
.anmelden { max-width: 420px; margin: 12vh auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 28px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 22px; }
.anmelden p { color: var(--text-weich); margin: 0 0 8px; }

iframe.verlauf { width: 100%; height: 70vh; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--bg); }

/* Handy */
@media (max-width: 860px) {
  .rahmen { grid-template-columns: 1fr; }
  aside { position: fixed; inset: 0 30% 0 0; z-index: 20; transform: translateX(-100%); transition: transform 0.2s; box-shadow: 0 0 60px rgba(0, 0, 0, 0.6); }
  body.menue-offen aside { transform: none; }
  main { padding: 64px 16px 80px; }
  .menue-knopf { display: block; position: fixed; top: 12px; left: 12px; z-index: 30; background: var(--bg-2); color: var(--text); border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); padding: 6px 12px; font-size: 18px; }
  .rahmen.ohne-nav .menue-knopf { display: none; }
  .felder { grid-template-columns: 1fr; }
  .liste { display: block; overflow-x: auto; }
  .werkzeugleiste input, .werkzeugleiste select { min-width: 0; }
}
