@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============ DESIGN TOKENS ============ */
:root {
  --bg: #07070a;
  --bg-panel: #101014;
  --bg-panel-2: #16161c;
  --bg-raised: #1b1b22;
  --border: #232329;
  --border-soft: #1c1c22;
  --text: #ececef;
  --text-dim: #9b9ba6;
  --text-faint: #5c5c68;

  --accent: #e6672a;
  --accent-strong: #ff7d40;
  --accent-soft: rgba(230, 103, 42, 0.14);
  --accent-border: rgba(230, 103, 42, 0.35);

  --discord: #5865f2;
  --discord-hover: #4752c4;

  --ok: #34c48b;
  --ok-soft: rgba(52, 196, 139, 0.12);
  --warn: #e0aa2e;
  --warn-soft: rgba(224, 170, 46, 0.12);
  --danger: #ea4c5b;
  --danger-soft: rgba(234, 76, 91, 0.12);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset, 0 8px 24px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--accent-soft); color: var(--accent-strong); }

/* Subtle dot-grid texture, used behind dark surfaces */
.bg-dotgrid {
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
.bg-dotgrid-soft {
  background-image: radial-gradient(circle, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 26px 26px;
}
/* Hazard stripes, reserved for irreversible / dangerous actions */
.bg-hazard {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(234, 76, 91, 0.10) 0px, rgba(234, 76, 91, 0.10) 10px,
    transparent 10px, transparent 20px
  );
}

/* ============ LAYOUT ============ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  position: relative;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 24px 22px 6px; text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(155deg, var(--accent-soft), rgba(230,103,42,0.03));
  border: 1px solid var(--accent-border);
  color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.4px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text .name { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: #fff; letter-spacing: -0.01em; }
.brand-text .name .accent { color: var(--accent-strong); }
.brand-text .eyebrow { font-size: 10px; letter-spacing: 1.4px; color: var(--text-faint); font-weight: 600; text-transform: uppercase; }

.nav-spacer { flex: 1; }
.nav-label { padding: 22px 22px 8px; font-size: 10.5px; letter-spacing: 1.4px; color: var(--text-faint); font-weight: 600; text-transform: uppercase; }
nav.nav { flex: 1; overflow-y: auto; padding: 0 14px; display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 500;
  text-decoration: none; color: var(--text-dim);
  border: 1px solid transparent;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.nav-item:hover { background: var(--bg-raised); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent-border);
  font-weight: 600;
}

.sidebar-footer { border-top: 1px solid var(--border-soft); padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.support-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--discord); color: #fff; text-decoration: none; font-weight: 700; font-size: 13px;
  padding: 10px; border-radius: 10px; box-shadow: 0 6px 18px rgba(88,101,242,0.3);
  transition: background .12s ease;
}
.support-btn:hover { background: var(--discord-hover); }
.support-btn svg { width: 15px; height: 15px; }
.logout-link {
  display: flex; align-items: center; gap: 9px;
  color: var(--text-dim); text-decoration: none; font-size: 13.5px; font-weight: 500;
}
.logout-link:hover { color: var(--danger); }
.logout-link svg { width: 15px; height: 15px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 34px; border-bottom: 1px solid var(--border-soft);
  background: rgba(16,16,20,0.7); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10;
}
.crumb { font-size: 13px; color: var(--text-faint); font-family: var(--font-mono); }
.crumb a { color: var(--text-dim); text-decoration: none; }
.crumb a:hover { color: var(--accent-strong); }

.user-chip { display: flex; align-items: center; gap: 12px; }
.user-meta { text-align: right; line-height: 1.25; }
.user-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.user-role { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--accent-strong); font-weight: 700; }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border); }

.content { padding: 34px; max-width: 1200px; }

.page-eyebrow { font-size: 11px; letter-spacing: 1.6px; color: var(--accent-strong); font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.page-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: #fff; margin: 0 0 6px; letter-spacing: -0.01em; }
.page-subtitle { color: var(--text-dim); font-size: 14px; margin: 0 0 30px; max-width: 640px; }

/* ============ FLOATING "VERWALTEN" BUTTON ============ */
.float-action {
  position: fixed; right: 30px; bottom: 30px; z-index: 30;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 20px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #c9501c);
  color: #fff; text-decoration: none; font-weight: 700; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(230,103,42,0.35), 0 2px 6px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.float-action:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(230,103,42,0.45); }
.float-action svg { width: 16px; height: 16px; }
.float-action-back {
  background: linear-gradient(135deg, #2a2a33, #1a1a20);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.4);
}
.float-action-back:hover { box-shadow: 0 14px 34px rgba(0,0,0,0.5); }

/* ============ ALERTS / FLASH ============ */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 20px; border: 1px solid; display: flex; align-items: center; gap: 10px; }
.alert-error { background: var(--danger-soft); border-color: rgba(234,76,91,0.35); color: #ffb3ba; }
.alert-warning { background: var(--warn-soft); border-color: rgba(224,170,46,0.35); color: #ffd889; }
.alert-neutral { background: var(--bg-panel-2); border-color: var(--border); color: var(--text-dim); }
.alert-success { background: var(--ok-soft); border-color: rgba(52,196,139,0.35); color: #9defc6; }

/* ============ BADGES / DOTS ============ */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid; }
.badge-ok { color: #9defc6; background: var(--ok-soft); border-color: rgba(52,196,139,0.3); }
.badge-warn { color: #ffd889; background: var(--warn-soft); border-color: rgba(224,170,46,0.3); }
.badge-bad { color: #ffb3ba; background: var(--danger-soft); border-color: rgba(234,76,91,0.3); }
.badge-neutral { color: var(--text-dim); background: var(--bg-raised); border-color: var(--border); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-ok { background: var(--ok); box-shadow: 0 0 8px rgba(52,196,139,0.6); }
.dot-warn { background: var(--warn); box-shadow: 0 0 8px rgba(224,170,46,0.6); }
.dot-bad { background: var(--danger); box-shadow: 0 0 8px rgba(234,76,91,0.6); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 13.5px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .1s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #c9501c); color: #fff; box-shadow: 0 4px 14px rgba(230,103,42,0.28); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--bg-raised); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: #212129; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-faint); }
.btn-danger { background: var(--danger-soft); border-color: rgba(234,76,91,0.4); color: #ffb3ba; }
.btn-danger:hover { background: rgba(234,76,91,0.22); }
.btn-danger-solid { background: linear-gradient(135deg, #ea4c5b, #b8283a); color: #fff; }
.btn-danger-solid:hover { filter: brightness(1.08); }
.btn:disabled, .btn[disabled] { opacity: .4; cursor: not-allowed; filter: none; transform: none; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

.btn-discord {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--discord); color: #fff; text-decoration: none; font-weight: 700; font-size: 14.5px;
  padding: 15px; border-radius: 12px; width: 100%; border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(88,101,242,0.35);
  transition: background .15s ease, transform .1s ease;
}
.btn-discord:hover { background: var(--discord-hover); }
.btn-discord:active { transform: scale(0.99); }
.btn-discord svg { width: 20px; height: 20px; }

/* ============ CARDS / PANELS ============ */
.panel {
  background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-card);
}
.panel + .panel { margin-top: 20px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.panel-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: #fff; margin: 0; }
.panel-hint { font-size: 12.5px; color: var(--text-faint); margin-top: 3px; }

/* Server card grid — starts from the left */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px;
}
.server-card, .invite-card {
  background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: inherit; display: block;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
  position: relative; overflow: hidden;
}
.server-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .2s ease;
  background: radial-gradient(420px circle at 85% -10%, rgba(230,103,42,0.14), transparent 60%);
  pointer-events: none;
}
.server-card:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.server-card:hover::before { opacity: 1; }
.server-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.server-card-head img { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); }
.server-name { font-weight: 600; color: #fff; font-size: 14.5px; }
.server-id { font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); margin-top: 2px; }
.server-card-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-dim); margin-top: 9px; }

/* Punktemaximum erreicht - rot blinkende Karte */
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234,76,91,0.45); border-color: rgba(234,76,91,0.55); }
  50% { box-shadow: 0 0 0 7px rgba(234,76,91,0); border-color: rgba(234,76,91,0.95); }
}
.server-card.max-points { animation: pulse-red 1.7s ease-in-out infinite; }
.max-points-badge {
  display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 7px 11px; border-radius: 8px;
  background: rgba(234,76,91,0.14); border: 1px solid rgba(234,76,91,0.4); color: #ffb3ba;
  font-size: 11.5px; font-weight: 700;
}
.max-points-badge svg { width: 14px; height: 14px; flex-shrink: 0; }
.warn-level-badge {
  display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 7px 11px; border-radius: 8px;
  background: var(--warn-soft); border: 1px solid rgba(224,170,46,0.4); color: #ffd889;
  font-size: 11.5px; font-weight: 700;
}
.warn-level-badge svg { width: 14px; height: 14px; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  .server-card.max-points { animation: none; border-color: rgba(234,76,91,0.7); }
}

.invite-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; border-style: dashed; }
.invite-card .server-card-head { margin-bottom: 0; }
.invite-card p { font-size: 12.5px; color: var(--text-faint); margin: 0; }

/* ============ STATS ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 6px; }
.stat-card { background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); font-weight: 700; }
.stat-value { font-family: var(--font-display); font-size: 23px; font-weight: 700; color: #fff; margin-top: 8px; display: flex; align-items: center; gap: 8px; }

/* Detail header */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.detail-icon { width: 58px; height: 58px; border-radius: 16px; border: 1px solid var(--border); }
.detail-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ FORMS ============ */
.field { margin-bottom: 18px; }
.field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.field-hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; }
select, input[type=text], input[type=search], textarea {
  width: 100%; background: var(--bg-raised); border: 1px solid var(--border); color: var(--text);
  padding: 11px 13px; border-radius: 10px; font-size: 13.5px; font-family: var(--font-body);
  outline: none; transition: border-color .12s ease;
}
select:focus, input:focus, textarea:focus { border-color: var(--accent-border); }
textarea { resize: vertical; min-height: 110px; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* Role chip list */
.chip-list-toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.chip-list-toolbar input[type=search] { flex: 1; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 220px; overflow-y: auto; padding: 4px 2px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip label {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  background: var(--bg-raised); border: 1px solid var(--border); color: var(--text-dim);
  font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all .12s ease; user-select: none;
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.15); }
.chip input:checked + label { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-strong); font-weight: 600; }

/* Colour picker */
.swatches { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; padding: 0; transition: transform .1s ease; }
.swatch:hover { transform: scale(1.1); }
.color-row { display: flex; align-items: center; gap: 12px; position: relative; }
.color-preview {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0;
  cursor: pointer; padding: 0; position: relative; transition: transform .1s ease;
}
.color-preview:hover { transform: scale(1.05); }
.color-preview::after {
  content: ""; position: absolute; inset: -3px; border-radius: 13px; border: 1px dashed var(--accent-border); opacity: 0;
}
.color-preview:hover::after { opacity: 1; }

.color-wheel-popover {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 40;
  background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: 0 24px 50px rgba(0,0,0,0.5); width: 232px;
}
.color-wheel-popover.hidden { display: none; }
.color-wheel-canvas-wrap { position: relative; width: 196px; height: 196px; margin: 0 auto 14px; }
.color-wheel-canvas-wrap canvas { border-radius: 50%; cursor: crosshair; display: block; }
.color-wheel-pointer {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.4);
  transform: translate(-50%, -50%); pointer-events: none;
}
.lightness-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lightness-row input[type=range] { flex: 1; accent-color: var(--accent); }
.lightness-row span { font-size: 10.5px; color: var(--text-faint); font-family: var(--font-mono); width: 30px; text-align: right; }
.color-wheel-actions { display: flex; justify-content: flex-end; }

/* Setup gating */
.gate-banner {
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 24px;
  border: 1px solid rgba(224,170,46,0.4);
  background: repeating-linear-gradient(135deg, rgba(224,170,46,0.10) 0 10px, rgba(224,170,46,0.04) 10px 20px);
  display: flex; align-items: flex-start; gap: 12px;
}
.gate-banner svg { width: 20px; height: 20px; color: var(--warn); flex-shrink: 0; margin-top: 1px; }
.gate-banner strong { color: #ffd889; }
.gate-banner p { margin: 4px 0 0; font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.setup-locked { position: relative; opacity: .45; pointer-events: none; filter: grayscale(0.3); }

.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 880px) { .setup-grid { grid-template-columns: 1fr; } }
.message-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 720px) { .message-grid { grid-template-columns: 1fr; } }
.news-compose { max-width: 720px; margin: 0 auto; }
.news-compose .page-title { font-size: 30px; }

/* ============ DANGER ZONE ============ */
.danger-zone {
  border-radius: var(--radius-lg); border: 1px solid rgba(234,76,91,0.35);
  background: var(--bg-panel-2); padding: 24px; margin-top: 26px; position: relative; overflow: hidden;
}
.danger-zone::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(234,76,91,0.07) 0 10px, transparent 10px 20px);
  pointer-events: none;
}
.danger-zone-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.danger-zone h3 { font-family: var(--font-display); color: #ffb3ba; margin: 0 0 6px; font-size: 15.5px; }
.danger-zone p { color: var(--text-dim); font-size: 13px; margin: 0; max-width: 460px; }

/* ============ VERSTOSS-PUNKTESYSTEM ============ */
.points-summary { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.points-count {
  font-family: var(--font-display); font-size: 30px; font-weight: 700; color: #fff; flex-shrink: 0; white-space: nowrap;
}
.points-count span { font-size: 16px; color: var(--text-faint); font-weight: 500; }
.points-bar-track { flex: 1; height: 10px; border-radius: 999px; background: var(--bg-raised); overflow: hidden; border: 1px solid var(--border); }
.points-bar-fill { height: 100%; border-radius: 999px; transition: width .3s ease; }
.points-bar-fill.bar-ok { background: linear-gradient(90deg, #2f9e6a, var(--ok)); }
.points-bar-fill.bar-warn { background: linear-gradient(90deg, #c78a1f, var(--warn)); }
.points-bar-fill.bar-danger { background: linear-gradient(90deg, #c23848, var(--danger)); }

.points-thresholds { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; }
.points-threshold { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-faint); font-weight: 500; }
.points-threshold-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.points-threshold.reached { color: var(--text-dim); }
.points-threshold.reached .points-threshold-dot { background: var(--warn); }

.max-points-banner {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid rgba(234,76,91,0.45); color: #ffb3ba;
  background: repeating-linear-gradient(135deg, rgba(234,76,91,0.12) 0 10px, rgba(234,76,91,0.04) 10px 20px);
  animation: pulse-red 1.7s ease-in-out infinite;
}
.max-points-banner svg { width: 20px; height: 20px; flex-shrink: 0; }
.max-points-banner strong { display: block; font-size: 13.5px; }
.max-points-banner p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-dim); }
.max-points-banner form { margin-left: auto; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { .max-points-banner { animation: none; } }

.points-divider { height: 1px; background: var(--border-soft); margin: 20px 0; }
.violation-form select { margin-bottom: 0; }

/* ============ GLOBALE BANS ============ */
.ban-form-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 4px; border-top: 1px solid var(--border-soft);
}
.ban-form-row:first-child { border-top: none; }
.ban-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ban-form input[type=text] { width: 220px; margin-bottom: 0; }
.ban-duration-row { display: flex; align-items: center; gap: 8px; }
.ban-duration-value { width: 66px; margin-bottom: 0; }
.ban-duration-unit { width: 110px; margin-bottom: 0; }

/* ============ TICKET-SYSTEM ============ */
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; }
.ticket-type-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-type-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-raised); border: 1px solid var(--border);
}
.ticket-type-row strong { color: #fff; font-size: 13.5px; }

/* ============ LOGS ============ */
.log-filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.log-filter-tab {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-raised);
  color: var(--text-dim); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .12s ease;
}
.log-filter-tab.active { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-strong); }
.log-feed { display: flex; flex-direction: column; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.log-day-header {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint);
  padding: 16px 8px 8px; position: sticky; top: 0; background: var(--bg-panel-2); z-index: 1;
}
.log-day-header:first-child { padding-top: 4px; }
.log-item { display: flex; align-items: flex-start; gap: 11px; padding: 9px 8px; border-bottom: 1px solid var(--border-soft); font-size: 13px; border-radius: 8px; transition: background .1s ease; }
.log-item:hover { background: var(--bg-raised); }
.log-item:last-child { border-bottom: none; }
.log-cat-badge {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
}
.log-cat-badge svg { width: 13px; height: 13px; }
.log-cat-badge.cat-member { background: var(--ok-soft); color: var(--ok); }
.log-cat-badge.cat-role { background: var(--accent-soft); color: var(--accent-strong); }
.log-cat-badge.cat-channel { background: rgba(88,101,242,0.14); color: #8f9bff; }
.log-cat-badge.cat-voice { background: var(--warn-soft); color: var(--warn); }
.log-cat-badge.cat-other { background: var(--bg-raised); color: var(--text-faint); border: 1px solid var(--border); }
.log-body { flex: 1; min-width: 0; }
.log-text { color: var(--text); line-height: 1.5; }
.log-text b { color: #fff; font-weight: 600; }
.log-detail { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.log-detail-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-family: var(--font-mono);
  background: var(--bg-raised); border: 1px solid var(--border-soft); border-radius: 7px; padding: 3px 8px; color: var(--text-faint);
}
.log-detail-chip .ld-field { color: var(--text-dim); font-family: var(--font-body); font-weight: 600; }
.log-detail-chip .ld-before { color: #ff9b9b; text-decoration: line-through; opacity: .8; }
.log-detail-chip .ld-after { color: #9defc6; }
.log-reason { margin-top: 6px; font-size: 11.5px; color: var(--text-faint); font-style: italic; }
.log-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); white-space: nowrap; padding-left: 12px; margin-top: 1px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-faint); font-size: 13.5px; }

/* Setup shortcut on server cards */
.server-card-setup-btn {
  position: absolute; top: 14px; right: 14px; padding: 6px 11px 6px 8px; border-radius: 999px;
  background: var(--bg-raised); border: 1px solid var(--border); color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 6px; z-index: 2;
  font-size: 11.5px; font-weight: 600; transition: all .12s ease; text-decoration: none;
}
.server-card-setup-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.server-card-setup-btn:hover { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-strong); }
.server-card-stretched-link { position: absolute; inset: 0; z-index: 1; }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(4,4,6,0.75); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal-box { background: var(--bg-panel-2); border: 1px solid rgba(234,76,91,0.4); border-radius: var(--radius-lg); padding: 26px; max-width: 440px; width: 100%; box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.modal-title { font-family: var(--font-display); color: #ffb3ba; font-size: 18px; margin: 0 0 10px; }
.modal-hint { color: var(--text-dim); font-size: 13.5px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ============ TABLE (Berechtigungen) ============ */
.utable { width: 100%; border-collapse: collapse; }
.utable th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); padding: 0 10px 10px; font-weight: 700; }
.utable td { padding: 12px 10px; border-top: 1px solid var(--border-soft); font-size: 13.5px; vertical-align: middle; }
.utable tr:first-child td { border-top: none; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); }
.uid { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }
.toggle-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.toggle {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-dim); cursor: pointer; user-select: none;
}
.toggle input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.toggle-super { color: var(--accent-strong); font-weight: 600; }

.search-bar { display: flex; gap: 10px; margin-bottom: 24px; }
.search-bar input { flex: 1; }

/* ============ AUSBILDUNGS-KALENDER ============ */
.week-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
}
.week-nav .week-label { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); }

.training-calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
.training-calendar th {
  text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-faint); padding: 8px 4px; font-weight: 700; border-bottom: 1px solid var(--border-soft);
}
.training-calendar th .day-date { display: block; font-size: 10px; color: var(--text-faint); font-weight: 500; margin-top: 2px; }
.training-calendar td { padding: 3px; border-top: 1px solid var(--border-soft); text-align: center; vertical-align: middle; }
.training-calendar .time-col {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); text-align: right;
  padding-right: 10px; white-space: nowrap; width: 56px;
}
.slot-link {
  display: block; width: 100%; height: 34px; border-radius: 8px; background: var(--surface-alt, rgba(255,255,255,0.03));
  border: 1px solid transparent; transition: background 0.12s, border-color 0.12s;
}
.slot-link:hover { background: var(--accent-soft, rgba(230,107,41,0.12)); border-color: var(--accent-strong); }

/* ============ LOGIN PAGE ============ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 24px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(230,103,42,0.16), transparent 60%),
    radial-gradient(700px 500px at 90% 110%, rgba(88,101,242,0.10), transparent 60%),
    var(--bg);
}
.login-page::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 35%, black, transparent 75%);
  pointer-events: none;
}
.login-scan {
  position: absolute; top: 50%; left: 50%; width: 900px; height: 900px;
  transform: translate(-50%, -55%);
  background: conic-gradient(from 0deg, transparent 0deg, rgba(230,103,42,0.10) 40deg, transparent 90deg);
  animation: spin 14s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { transform: translate(-50%, -55%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .login-scan { animation: none; } }

.login-wrap { position: relative; z-index: 2; width: 100%; max-width: 408px; display: flex; flex-direction: column; align-items: center; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 30px; }
.login-mark {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(155deg, rgba(230,103,42,0.22), rgba(230,103,42,0.04));
  border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.5px; color: var(--accent-strong);
  box-shadow: 0 0 40px rgba(230,103,42,0.25);
}
.login-brand h1 { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: #fff; margin: 0; letter-spacing: -0.01em; }
.login-brand h1 .accent { color: var(--accent-strong); }
.login-eyebrow { font-size: 10.5px; letter-spacing: 2px; color: var(--text-faint); font-weight: 700; text-transform: uppercase; }

.login-card {
  width: 100%; background: rgba(16,16,20,0.75); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px; backdrop-filter: blur(16px);
  box-shadow: 0 30px 70px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.02) inset;
}
.login-hint { color: var(--text-dim); font-size: 13.5px; margin: 0 0 22px; line-height: 1.55; text-align: center; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.login-divider span { font-size: 10.5px; letter-spacing: 1px; color: var(--text-faint); text-transform: uppercase; font-weight: 600; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.login-features { display: flex; flex-direction: column; gap: 11px; }
.login-feature { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-dim); }
.login-feature svg { width: 15px; height: 15px; color: var(--accent-strong); flex-shrink: 0; }

.login-footer { margin-top: 24px; font-size: 11.5px; color: var(--text-faint); text-align: center; font-family: var(--font-mono); }
.login-legal { margin-top: 10px; font-size: 11.5px; color: var(--text-faint); text-align: center; line-height: 1.6; max-width: 340px; }
.login-legal a { color: var(--text-dim); text-decoration: underline; }
.login-legal a:hover { color: var(--text); }

.legal-footer {
  margin-top: 40px; padding: 16px 0 8px; border-top: 1px solid var(--border-soft);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  font-size: 12px; color: var(--text-faint);
}
.legal-footer a { color: var(--text-dim); text-decoration: none; }
.legal-footer a:hover { color: var(--text); text-decoration: underline; }
.legal-footer .legal-sep { color: var(--border); }
.legal-footer .legal-note { color: var(--text-faint); }

.legal-page { max-width: 760px; }
.legal-page h2 { font-size: 17px; margin: 28px 0 10px; color: var(--text); }
.legal-page h2:first-of-type { margin-top: 0; }
.legal-page p, .legal-page li { font-size: 14px; line-height: 1.7; color: var(--text-dim); }
.legal-page ul { margin: 6px 0 6px 20px; padding: 0; }
.legal-page a { color: var(--accent-strong); }

/* Scrollbars */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

@media (max-width: 900px) {
  .sidebar { width: 76px; }
  .brand-text, .nav-item span.label, .nav-label, .sidebar-footer .logout-link span, .support-btn span { display: none; }
  .nav-item { justify-content: center; }
  .content { padding: 22px; }
}
