/* Dashboard: Theme + Komponenten (Tailwind für Layout in index.html) */
:root {
  --bg: #313338;
  --bg-secondary: #2b2d31;
  --bg-elevated: #383a40;
  --bg-tertiary: #1e1f22;
  --bg-hover: #3f4147;
  --accent: #5865F2;
  --accent-hover: #4752c4;
  --accent-soft: rgba(88, 101, 242, 0.12);
  --theme-color: #5865F2;
  --red: #DA373C;
  --red-hover: #a12828;
  --text: #f2f3f5;
  --text-secondary: #b5bac1;
  --text-muted: #80848e;
  --border: #3f4147;
  --border-light: #4e5058;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Inputs (Tailwind-Ergänzung) */
.input-tailwind {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.15s;
}
.input-tailwind:focus {
  outline: none;
  border-color: var(--theme-color, var(--accent));
}

/* Server-Dropdown (Multi-Guild) im Header */
.guild-select {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
}
.guild-select:hover { background: rgba(255, 255, 255, 0.1); }
.guild-select option { background: var(--bg-secondary); color: var(--text); }
.input-tailwind::placeholder {
  color: var(--text-muted);
}

/* Tabs (JS togglet .active) – !important damit Tailwind .flex die Sichtbarkeit nicht überschreibt */
.tab-content { display: none !important; }
.tab-content.active { display: flex !important; }
.tab.tab-pill { background: transparent; border: none; }
.tab.tab-pill.active {
  background: var(--theme-color, var(--accent));
  color: white;
}

/* Dashboard: Sidebar links, Main rechts. JS setzt display:flex auf #dashboard-view beim Einloggen. */
#dashboard-view.dashboard-layout {
  flex-direction: row;
  flex-wrap: nowrap;
}
#dashboard-view.dashboard-layout .dashboard-sidebar {
  flex-shrink: 0;
}
#dashboard-view.dashboard-layout > main {
  flex: 1 1 auto;
  min-width: 0;
}

/* Sidebar nav (Dashboard) */
.dashboard-sidebar .tab.tab-pill.nav-item {
  border: none;
}
.dashboard-sidebar .tab.tab-pill.nav-item.active {
  background: var(--theme-color, var(--accent));
  color: white;
}
.dashboard-sidebar .tab.tab-pill.nav-item.active .nav-icon {
  background: rgba(255, 255, 255, 0.2);
}
.dashboard-sidebar .tab.tab-pill.nav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

/* Buttons (Theme-fähig) */
.btn {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  border: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--theme-color, var(--accent));
  color: white;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text); }
.btn-danger {
  background: var(--red);
  color: white;
}
.btn-danger:hover { background: var(--red-hover); }

/* Ticket-Aktionen (farbig) */
.btn-ticket-claim {
  background: #57F287;
  color: #1a1a1a;
}
.btn-ticket-claim:hover { filter: brightness(1.1); }
.btn-ticket-archive {
  background: #FEE75C;
  color: #1a1a1a;
}
.btn-ticket-archive:hover { filter: brightness(1.1); }
.btn-ticket-reactivate {
  background: #5865F2;
  color: white;
}
.btn-ticket-reactivate:hover { filter: brightness(1.1); }
.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* Login-Tabs */
.login-tab.active {
  background: var(--theme-color, var(--accent));
  color: white;
}

/* Developer-Badge (Animation) */
.user-info-btn.user-display-developer {
  border: none;
  background: linear-gradient(110deg, #6366f1, #8b5cf6, #a855f7, #6366f1);
  background-size: 300% 100%;
  color: #fff;
  animation: developer-gradient-flow 6s ease-in-out infinite;
}
.user-info-btn.user-display-developer:hover {
  color: #fff;
  filter: brightness(1.1);
}
@keyframes developer-gradient-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.error {
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #f87171;
  border: 1px solid rgba(218, 55, 60, 0.3);
  background: rgba(218, 55, 60, 0.12);
}

/* Stat-Karten (JS) */
.stat-card {
  padding: 20px 24px;
  background: rgba(37, 38, 43, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: border-color 0.2s;
}
.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--theme-color, var(--accent));
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* Members (JS) */
.member-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.member-row:hover { background: var(--bg-hover); }
.member-row.selected {
  background: var(--accent-soft);
  border-left: 4px solid var(--theme-color, var(--accent));
}
.member-info { display: flex; align-items: center; gap: 14px; }
.member-info img { width: 44px; height: 44px; border-radius: 50%; }
.member-details h4 { font-size: 15px; font-weight: 500; }
.member-details .member-id { font-size: 12px; color: var(--text-muted); font-family: ui-monospace, monospace; }
.member-details .member-roles { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.member-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.member-badge { font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 500; }
.member-badge-verified { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.member-badge-automod { background: rgba(249, 115, 22, 0.2); color: #f97316; }
.member-badge-warnings { background: var(--bg-hover); color: var(--text-muted); }
.member-badge-warnings.has-warnings { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.detail-card-automod { border-left: 3px solid #f97316; }
.detail-card-automod .automod-icon { margin-right: 4px; }
.automod-flags-list { margin: 0; padding-left: 1.25rem; color: var(--text-muted); font-size: 14px; }
.automod-flags-list li { margin-top: 4px; }
.automod-flags-list .automod-reason { color: #f97316; font-weight: 500; }

.member-detail-panel.empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-detail-placeholder { text-align: center; color: var(--text-muted); }

.members-load-more {
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.member-detail-placeholder-icon { font-size: 64px; display: block; margin-bottom: 16px; opacity: 0.5; }
.member-detail-placeholder p { font-size: 16px; }
.member-detail-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.member-detail-avatar { width: 100px; height: 100px; border-radius: 50%; flex-shrink: 0; }
.member-detail-hero-text { min-width: 0; }
.member-detail-name { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.member-detail-id { font-size: 14px; color: var(--text-muted); font-family: ui-monospace, monospace; }
.member-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  display: grid;
  gap: 24px;
  align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.detail-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.detail-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.detail-meta { font-size: 14px; color: var(--text-muted); }
.detail-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg-hover);
  border-radius: 6px;
  font-size: 13px;
}
.role-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 8px;
}
.detail-actions-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.detail-actions-grid .btn { width: auto; }
.detail-card-warnings {
  background: rgba(250, 204, 21, 0.06);
  border-color: rgba(250, 204, 21, 0.35);
}
.warnings-heading { display: flex; align-items: center; gap: 8px; }
.warnings-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #eab308;
  color: #1e1f22;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.warnings-badge { font-size: 11px; font-weight: 600; color: #ca8a04; }
.warnings-badge.warnings-active { color: #eab308; }
.warnings-badge.warnings-full { color: #b91c1c; }
.warnings-list { font-size: 13px; margin-top: 10px; }
.warnings-empty { color: var(--text-muted); }
.warning-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(250, 204, 21, 0.2);
  font-size: 12px;
}
.warning-item:last-child { border-bottom: none; }
.warning-item-content { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.warning-item-num { font-weight: 600; color: #ca8a04; }
.warning-item-meta { color: var(--text-muted); font-size: 11px; }
.warning-item-reason { color: var(--text-secondary); }
.warning-delete { flex-shrink: 0; font-size: 12px; padding: 4px 8px; }
.warning-delete:hover { color: var(--red); }

/* Profile */
.profile-avatar.has-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.profile-discord-linked {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.profile-discord-linked .discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Roles */
.roles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.role-item {
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 4px solid var(--theme-color, var(--accent));
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.role-item:hover { border-color: var(--border-light); }
.role-item-name { font-weight: 600; margin-bottom: 4px; }
.role-item-id { font-size: 12px; color: var(--text-muted); font-family: ui-monospace, monospace; }

/* Logs */
.logs-list { display: flex; flex-direction: column; gap: 10px; }
.log-row {
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: var(--shadow);
}
.log-row .action { font-weight: 600; color: var(--theme-color, var(--accent)); }
.log-row .meta { color: var(--text-muted); font-size: 12px; margin-top: 6px; }

/* Reaction roles */
.reaction-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.reaction-role-info { font-size: 14px; color: var(--text-secondary); }

/* Werkzeuge: Submenü + Subpanels */
.tool-subpanel { display: none !important; }
.tool-subpanel.active { display: block !important; }
.tools-subnav .tool-subnav-item.active {
  background: var(--theme-color, var(--accent));
  color: white;
}
.tools-subnav .tool-subnav-item.active:hover {
  background: var(--theme-color, var(--accent));
  color: white;
}

/* Embed builder */
.embed-field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.embed-field-row input[type="text"] { flex: 1; min-width: 120px; }
.embed-field-row .embed-remove-field { padding: 4px 10px; }
.char-count { font-size: 11px; color: var(--text-muted); margin-left: auto; }

/* Embed preview (Discord-ähnlich) */
.embed-preview {
  min-height: 200px;
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
  background: #313338;
  font-family: 'gg sans', 'Noto Sans', Helvetica, sans-serif;
  color: #dbdee1;
  line-height: 1.375;
}
.embed-preview .preview-msg-header { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.embed-preview .preview-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #5865F2;
  flex-shrink: 0;
}
.embed-preview .preview-username { font-weight: 500; color: #f2f3f5; }
.embed-preview .preview-content {
  margin-left: 56px;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}
.embed-preview .preview-embed {
  margin-left: 56px;
  max-width: 520px;
  border-radius: 4px;
  overflow: hidden;
  border-left: 4px solid var(--theme-color, #5865F2);
  background: #2b2d31;
}
.embed-preview .preview-embed-body { padding: 8px 16px 16px 12px; }
.embed-preview .preview-embed-author { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 14px; }
.embed-preview .preview-embed-author img { width: 24px; height: 24px; border-radius: 50%; }
.embed-preview .preview-embed-title { font-weight: 600; color: #f2f3f5; margin-bottom: 4px; }
.embed-preview .preview-embed-title a { color: #00a8fc; text-decoration: none; }
.embed-preview .preview-embed-title a:hover { text-decoration: underline; }
.embed-preview .preview-embed-desc { margin-bottom: 8px; white-space: pre-wrap; }
.embed-preview .preview-embed-fields { display: grid; gap: 8px; margin-bottom: 8px; }
.embed-preview .preview-embed-field { font-size: 14px; }
.embed-preview .preview-embed-field-name { font-weight: 600; color: #f2f3f5; margin-bottom: 2px; }
.embed-preview .preview-embed-field-value { color: #b5bac1; }
.embed-preview .preview-embed-fields-inline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.embed-preview .preview-embed-image { margin-top: 8px; max-height: 300px; border-radius: 4px; overflow: hidden; }
.embed-preview .preview-embed-image img { max-width: 100%; display: block; }
.embed-preview .preview-embed-thumbnail {
  float: right;
  margin-left: 16px;
  margin-bottom: 8px;
  width: 80px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
}
.embed-preview .preview-embed-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.embed-preview .preview-embed-footer {
  font-size: 12px;
  color: #949ba4;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.embed-preview .preview-embed-footer img { width: 20px; height: 20px; border-radius: 50%; }

/* Stat channels */
.stat-channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-channel-info { font-size: 14px; color: var(--text); }

/* Social */
.social-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.social-sub-info { font-size: 14px; color: var(--text); }

/* Team/Admin */
.team-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.team-role-info {
  flex: 1;
  padding-left: 16px;
  border-left: 4px solid var(--theme-color, var(--accent));
}
.team-role-name { font-weight: 600; margin-bottom: 4px; }
.team-role-id { font-size: 12px; color: var(--text-muted); font-family: ui-monospace, monospace; }
.team-role-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.team-role-badges .badge {
  font-size: 11px;
  padding: 4px 8px;
  background: var(--bg-hover);
  border-radius: 4px;
  color: var(--text-muted);
}
.team-role-quick-add {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.admin-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.admin-role {
  font-size: 13px;
  font-weight: 500;
  color: var(--theme-color, var(--accent));
}
.role-check-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  gap: 12px;
}
.role-check-item:hover { background: var(--bg-hover); }
.role-check-item input { margin: 0; width: auto; }

/* Empty state (in lists) */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 320px;
  color: var(--text-muted);
}

/* Modal (JS setzt display = 'flex' – Layout via Tailwind items-center justify-center) */
