:root {
  --bg: #070a0f;
  --sidebar: #0b0f16;
  --card: #111722;
  --card-2: #0d131d;
  --border: #222b39;
  --border-strong: #344155;
  --text: #f3f6fb;
  --muted: #8b98ab;
  --accent: #31d27c;
  --accent-soft: rgba(49, 210, 124, 0.12);
  --danger: #ff6b72;
  --danger-soft: rgba(255, 107, 114, 0.1);
  --warning: #f5bd4f;
  --warning-soft: rgba(245, 189, 79, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 2%, rgba(49, 210, 124, 0.07), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button:disabled { cursor: wait; opacity: 0.65; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(11, 15, 22, 0.96);
  padding: 24px 18px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; padding: 0 8px 26px; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(49, 210, 124, 0.42);
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}
.brand span:last-child, .user-menu > div:nth-child(2) { display: flex; flex-direction: column; }
.brand small, .user-menu small { color: var(--muted); margin-top: 2px; }

.nav { display: grid; gap: 7px; }
.nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 13px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.nav-item:hover { color: var(--text); border-color: var(--border); }
.nav-item.active { background: var(--accent-soft); color: #c9ffe0; border-color: rgba(49, 210, 124, 0.18); }
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 20px 8px 4px;
  color: var(--muted);
  font-size: 0.84rem;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warning); }
.status-dot.good { background: var(--accent); box-shadow: 0 0 12px rgba(49, 210, 124, 0.6); }
.status-dot.bad { background: var(--danger); }

.content { min-width: 0; padding: 36px clamp(22px, 4vw, 58px) 60px; }
.center-view { min-height: calc(100vh - 96px); display: grid; place-items: center; text-align: center; }
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lock-card {
  width: min(480px, 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(17, 23, 34, 0.98), rgba(12, 17, 26, 0.98));
  padding: 42px;
}
.lock-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: 0 auto 23px;
  border: 1px solid rgba(49, 210, 124, 0.4);
  border-radius: 17px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.4rem;
}
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
.lock-card h1, .topbar h1 { margin: 0; letter-spacing: -0.035em; }
.lock-card > p:not(.eyebrow):not(.hint) { color: var(--muted); line-height: 1.65; }
.command { margin: 25px 0 16px; border: 1px solid var(--border); border-radius: 12px; background: #080c12; padding: 15px; color: #c9ffe0; font: 600 0.95rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.hint { color: var(--muted); font-size: 0.84rem; line-height: 1.55; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.topbar h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); }
.page-subtitle { margin: 8px 0 0; color: var(--muted); }
.user-menu { display: flex; align-items: center; gap: 11px; }
.user-menu > div:nth-child(2) { min-width: 85px; }
.avatar, .mini-avatar { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.avatar { width: 40px; height: 40px; border-radius: 12px; }
.mini-avatar { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; }

.secondary-button, .danger-button, .text-button {
  border-radius: 10px;
  padding: 10px 13px;
  cursor: pointer;
}
.secondary-button { border: 1px solid var(--border); background: var(--card); color: var(--text); }
.secondary-button:hover { border-color: var(--border-strong); }
.danger-button { border: 1px solid rgba(255, 107, 114, 0.35); background: var(--danger-soft); color: #ffb8bc; }
.danger-button:hover { border-color: var(--danger); }
.text-button { border: 0; background: transparent; color: var(--accent); padding-left: 4px; padding-right: 4px; }
.text-button:hover { text-decoration: underline; }

.notice { margin-bottom: 22px; border: 1px solid rgba(245, 189, 79, 0.34); border-radius: 12px; background: var(--warning-soft); padding: 13px 15px; color: #ffe0a0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.metric-card, .panel-card { border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(180deg, var(--card), var(--card-2)); }
.metric-card { display: flex; min-height: 135px; flex-direction: column; padding: 19px; }
.metric-label { color: var(--muted); font-size: 0.84rem; }
.metric-value { margin: 12px 0 4px; font-size: 1.7rem; letter-spacing: -0.04em; }
.metric-value.good, .performance-good { color: var(--accent); }
.performance-warn { color: var(--warning); }
.performance-bad, .danger-text { color: var(--danger); }
.metric-card small { margin-top: auto; color: var(--muted); }

.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.panel-card { padding: 22px; }
.wide-card { width: 100%; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: 1.15rem; }
.section-heading > small { color: var(--muted); }
.live-badge, .state-badge, .current-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.75rem;
  white-space: nowrap;
}
.live-badge { gap: 7px; border: 1px solid rgba(49, 210, 124, 0.3); background: var(--accent-soft); padding: 6px 9px; color: #c9ffe0; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.state-badge { min-width: 59px; justify-content: center; border: 1px solid; padding: 5px 8px; }
.state-badge.online { border-color: rgba(49, 210, 124, 0.3); background: var(--accent-soft); color: #c9ffe0; }
.state-badge.offline { border-color: rgba(255, 107, 114, 0.28); background: var(--danger-soft); color: #ffb8bc; }
.current-badge { margin-left: 8px; background: var(--accent-soft); padding: 4px 8px; color: #c9ffe0; }

.status-list { display: grid; gap: 10px; }
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(7, 10, 15, 0.38);
  padding: 13px;
}
.status-main, .player-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.status-main strong, .status-main small { display: block; }
.status-main small, .right-meta { color: var(--muted); font-size: 0.8rem; }
.right-meta { text-align: right; }
.empty-state { border: 1px dashed var(--border); border-radius: 12px; padding: 23px; color: var(--muted); text-align: center; }

.details-list { margin: 0; }
.details-list div { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--border); padding: 13px 0; }
.details-list div:first-child { border-top: 0; }
.details-list dt { color: var(--muted); }
.details-list dd { margin: 0; max-width: 62%; overflow: hidden; text-overflow: ellipsis; text-align: right; white-space: nowrap; }

.search-field { width: min(360px, 100%); }
.search-field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #090e16;
  color: var(--text);
  padding: 10px 13px;
  outline: none;
}
.search-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 0 12px 11px; color: var(--muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; }
td { border-top: 1px solid var(--border); padding: 13px 12px; font-size: 0.87rem; vertical-align: middle; }
td:last-child { color: var(--muted); }
.cell-subtitle { display: block; margin-top: 4px; color: var(--muted); }
.mono-cell { font: 0.76rem ui-monospace, SFMono-Regular, Menlo, monospace; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.action-pill { display: inline-block; border-radius: 7px; background: var(--accent-soft); padding: 5px 8px; color: #c9ffe0; font: 600 0.74rem ui-monospace, SFMono-Regular, Menlo, monospace; }

.session-list { display: grid; gap: 11px; }
.session-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--border); border-radius: 13px; background: rgba(7, 10, 15, 0.38); padding: 16px; }
.session-row > div { min-width: 0; }
.session-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.session-row small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-two { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: static; width: auto; height: auto; display: block; border-right: 0; border-bottom: 1px solid var(--border); padding: 16px; }
  .brand { padding-bottom: 12px; }
  .nav { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
  .nav-item { width: auto; flex: 0 0 auto; padding: 9px 11px; }
  .sidebar-footer { display: none; }
  .content { padding: 24px 16px 42px; }
  .topbar { align-items: flex-start; }
  .user-menu > div:nth-child(2) { display: none; }
  .responsive-heading { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .lock-card { padding: 30px 22px; }
}

@media (max-width: 520px) {
  .topbar { display: block; }
  .user-menu { margin-top: 18px; }
  .secondary-button { margin-left: auto; }
  .metrics { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .status-row, .session-row { align-items: flex-start; flex-direction: column; }
  .right-meta { text-align: left; }
  .session-row button { width: 100%; }
  .panel-card { padding: 18px 14px; }
}

/* Owner-Panel 0.3 actions */
button, input, textarea, select { font: inherit; }
textarea, input, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #090e16;
  color: var(--text);
  padding: 11px 13px;
  outline: none;
}
textarea { resize: vertical; min-height: 88px; }
textarea:focus, input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.primary-button {
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #052414;
  padding: 10px 14px;
  font-weight: 750;
  cursor: pointer;
}
.primary-button:hover { filter: brightness(1.06); }
.compact-button { padding: 7px 9px; font-size: 0.78rem; white-space: nowrap; }
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }

.control-form { display: grid; gap: 11px; }
.control-form label { color: var(--muted); font-size: 0.84rem; }
.control-form > small, .form-footer small { color: var(--muted); line-height: 1.5; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; }
.action-controls { align-items: stretch; }

.notice-error {
  border-color: rgba(255, 107, 114, 0.34);
  background: var(--danger-soft);
  color: #ffc2c5;
}
.notice-success {
  border-color: rgba(49, 210, 124, 0.34);
  background: var(--accent-soft);
  color: #c9ffe0;
}

.state-badge.maintenance-on {
  border-color: rgba(255, 107, 114, 0.34);
  background: var(--danger-soft);
  color: #ffc2c5;
}
.action-status {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.74rem;
  white-space: nowrap;
}
.action-status.success { border-color: rgba(49, 210, 124, 0.3); background: var(--accent-soft); color: #c9ffe0; }
.action-status.failed { border-color: rgba(255, 107, 114, 0.3); background: var(--danger-soft); color: #ffc2c5; }
.action-status.confirm { border-color: rgba(245, 189, 79, 0.34); background: var(--warning-soft); color: #ffe0a0; }
.action-status.pending { border-color: rgba(139, 152, 171, 0.28); background: rgba(139, 152, 171, 0.08); color: #cad2de; }

.action-dialog {
  width: min(520px, calc(100% - 28px));
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: var(--card);
  color: var(--text);
  padding: 0;
}
.action-dialog::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(3px); }
.dialog-content { padding: 24px; }
.dialog-description { margin: -6px 0 20px; color: var(--muted); line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.35rem;
}
.icon-button:hover { color: var(--text); border-color: var(--border-strong); }

@media (max-width: 620px) {
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer .primary-button, .button-row > button { width: 100%; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  .inline-actions { min-width: 150px; }
}


/* Moderation 0.4 */
.inline-search{display:flex;gap:10px;align-items:center}.inline-search input{min-width:260px}.pager{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:18px}.moderation-grid{grid-template-columns:1fr}.compact-metrics{margin:18px 0}.profile-details{grid-template-columns:repeat(2,minmax(0,1fr))}.subsection{margin-top:28px}.subsection h3{margin:0}.note-list{display:grid;gap:10px}.note-row{border:1px solid var(--border);border-radius:12px;padding:14px;background:rgba(255,255,255,.02)}.note-row p{margin:0 0 8px}.note-row small{color:var(--muted)}@media(max-width:760px){.inline-search{width:100%;flex-direction:column;align-items:stretch}.inline-search input{min-width:0}.profile-details{grid-template-columns:1fr}}

/* Moderationsqualität 0.7 */
.moderation-advice {
  display: grid;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(49, 210, 124, 0.06);
}
.moderation-advice.warning {
  border-color: rgba(245, 189, 79, 0.36);
  background: var(--warning-soft);
}
.moderation-advice span,
.moderation-advice li { color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
.moderation-advice ul { margin: 0; padding-left: 20px; }
.case-dialog { width: min(900px, calc(100% - 28px)); }
.case-dialog-content { max-height: min(86vh, 920px); overflow-y: auto; }
.timeline-list { display: grid; gap: 0; }
.timeline-row { display: grid; grid-template-columns: 20px 1fr; gap: 12px; position: relative; padding: 0 0 18px; }
.timeline-row:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 1px; background: var(--border); }
.timeline-marker { width: 13px; height: 13px; margin-top: 3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline-row p { margin: 5px 0; color: var(--muted); }
.timeline-row small { color: var(--muted); }
.evidence-list { display: grid; gap: 10px; }
.evidence-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: rgba(255,255,255,.02); }
.evidence-row a { color: var(--accent); font-weight: 700; text-decoration: none; }
.evidence-row a:hover { text-decoration: underline; }
.evidence-row p { margin: 6px 0; overflow-wrap: anywhere; }
.evidence-row small { color: var(--muted); }
.evidence-form { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 16px; }
@media (max-width: 720px) {
  .evidence-row { flex-direction: column; }
  .evidence-row button { width: 100%; }
}
