/* Wardex One Dashboard – Markenfarben aus dem Logo (Graphit, Gold, Rot) */
@font-face { font-family: 'Space Grotesk'; font-weight: 400; font-display: swap; src: url('/static/fonts/sg-400.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('/static/fonts/sg-700.woff2') format('woff2'); }

:root {
  --bg: #1C1D21;
  --surface: #24262B;
  --surface-2: #2A2C31;
  --border: #3A3C43;
  --text: #F4F4F5;
  --muted: #B4B4BC;
  --gold: #D9A930;
  --gold-hover: #E8BE45;
  --red: #D7263D;
  --ok-bg: #1F3326;
  --ok-text: #9BE3B0;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 'Space Grotesk', system-ui, sans-serif;
}
a { color: var(--gold); }
a:hover { color: var(--gold-hover); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 6px; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }

/* Kopfzeile */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.brand { position: relative; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.wordmark { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand-sub { color: var(--muted); font-size: 14px; padding-left: 10px; border-left: 1px solid var(--border); }
.user { display: flex; align-items: center; gap: 10px; }
.user form { margin: 0; }
.avatar { border-radius: 50%; }
.user-name { font-weight: 700; }

/* Inhalt */
.wrap { flex: 1; width: 100%; max-width: 920px; margin: 0 auto; padding: 32px 16px 48px; }
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 0 0 16px;
}
.center { max-width: 440px; margin: 48px auto; text-align: center; }
.center .logo { display: block; margin: 0 auto 12px; }
.center p { margin: 0 0 22px; }

.grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.guild { display: flex; align-items: center; gap: 14px; margin: 0; color: var(--text); text-decoration: none; }
.guild:hover { border-color: var(--gold); color: var(--text); }
.guild-icon { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.initials { display: grid; place-items: center; background: var(--surface-2); color: var(--gold); font-weight: 700; }
.guild-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.guild-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--muted); font-size: 24px; }

.back { display: inline-block; margin-bottom: 14px; text-decoration: none; }
.notice { background: var(--ok-bg); color: var(--ok-text); border-radius: var(--radius); padding: 10px 14px; }

/* Einstellungen */
.settings { margin-top: 24px; }
fieldset.card { min-width: 0; }
legend { font-weight: 700; color: var(--gold); padding: 0 6px; }
.setting { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; cursor: pointer; }
.setting + .setting { border-top: 1px solid var(--border); }
.setting input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { flex-shrink: 0; width: 44px; height: 26px; margin-top: 2px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); position: relative; transition: background 0.15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform 0.15s, background 0.15s; }
.setting input:checked + .switch { background: var(--gold); border-color: var(--gold); }
.setting input:checked + .switch::after { transform: translateX(18px); background: var(--bg); }
.setting input:focus-visible + .switch { outline: 2px solid var(--gold); outline-offset: 2px; }
.setting-text { display: flex; flex-direction: column; }
.setting-label { font-weight: 700; }

/* Formulare und Feature-Seiten */
h2 { font-size: 20px; margin: 0; }
h3 { font-size: 15px; margin: 16px 0 6px; color: var(--muted); }
.feature-link { margin-top: 20px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--ok-bg); color: var(--ok-text); vertical-align: middle; }
.badge-off { background: var(--surface-2); color: var(--muted); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 14px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 3px 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; min-width: 0; }
.radio { display: flex; align-items: center; gap: 8px; margin: 6px 0; cursor: pointer; }
.indent { margin-left: 26px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
input[type=text], input[type=number], select {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; min-height: 44px; width: 100%; min-width: 0;
}
input[type=text]:focus-visible, input[type=number]:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
input[type=range] { width: 100%; accent-color: var(--gold); min-height: 32px; }
.group-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 8px; }
.warn { color: #F0C75A; }
.error { background: #3A1E22; color: #F5B7BF; border-radius: var(--radius); padding: 10px 14px; margin: 0 0 16px; }
.error ul { margin: 6px 0 0; padding-left: 20px; }
.danger-zone { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.btn-danger { background: transparent; color: #F5B7BF; border-color: #7A2E38; }
.btn-danger:hover { border-color: var(--red); color: #FFFFFF; }

/* Schaltflächen */
.btn { display: inline-block; font: inherit; font-weight: 700; border-radius: 8px; padding: 10px 18px; min-height: 44px; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--gold); color: #1C1D21; }
.btn-primary:hover { background: var(--gold-hover); color: #1C1D21; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); padding: 6px 14px; min-height: 36px; }
.btn-ghost:hover { border-color: var(--gold); color: var(--text); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.foot { padding: 16px 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; text-align: center; }

/* Testhinweise: liegen über dem Live-Layout, verschieben nichts */
.test-stripe {
  position: fixed; top: 0; left: 0; right: 0; height: 8px; z-index: 10; pointer-events: none;
  background: repeating-linear-gradient(45deg, #FFFFFF 0 12px, #2A2C31 12px 24px);
}
.test-badge {
  position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 12px; white-space: nowrap;
  background: #FFFFFF; color: #2A2C31; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; padding: 3px 8px; border-radius: 4px;
}
@media (max-width: 560px) {
  .brand-sub { display: none; }
  .test-badge { left: 46px; top: 100%; transform: none; margin: 4px 0 0; }
}
