/* ============================================================
   dashboard-v2.css — Carbon Teal / Horizon UI
   smthg Bot Dashboard v2
   ============================================================ */

/* ── 1. Design Tokens ──────────────────────────────────────── */
:root {
  --bg:           #060D10;
  --sidebar:      rgba(8, 18, 24, 0.92);
  --card:         #0A1520;
  --border:       rgba(8, 145, 178, 0.12);
  --accent:       #0891B2;
  --accent2:      #22D3EE;
  --accent-rgb:   8, 145, 178;
  --text:         #ECFEFF;
  --muted:        #4E7A85;
  --green:        #10B981;
  --amber:        #F59E0B;
  --red:          #EF4444;
  --sidebar-w:    290px;
  --topbar-h:     72px;
  --radius:       12px;
  --shadow:       0 4px 24px rgba(0,0,0,0.4);
}

/* ── 2. Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent2); text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── 3. Mesh Gradient Background ───────────────────────────── */
/* Both blob gradients are on a single ::before pseudo-element (one keyframe)
   instead of two separate elements — same visual result, less DOM. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 15% 20%, rgba(8,145,178,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 75%, rgba(34,211,238,0.08) 0%, transparent 65%),
    var(--bg);
  animation: blob-drift 20s ease-in-out infinite alternate;
}
@keyframes blob-drift {
  from { background-position: 0% 0%, 100% 100%; }
  to   { background-position: 5% 8%, 95% 92%; }
}

/* ── 4. Shell Layout ───────────────────────────────────────── */
.layout-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  min-height: 100vh;
}

/* ── 5. Sidebar ────────────────────────────────────────────── */
.sidebar {
  grid-area: sidebar;
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  animation: pulse-glow 3s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.6)); }
  50%       { filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), 0.9)); }
}
.sidebar-logo-text { display: flex; flex-direction: column; }
.sidebar-logo-name { font-weight: 700; font-size: 1rem; color: var(--text); line-height: 1.2; }
.sidebar-logo-guild { font-size: 0.75rem; color: var(--muted); }

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-section { padding: 0 12px; margin-bottom: 8px; }
.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 8px 8px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  user-select: none;
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(var(--accent-rgb), 0.08); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(8,145,178,0.25), rgba(34,211,238,0.12));
  color: var(--accent2);
  font-weight: 600;
}
.nav-item-icon { width: 18px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}
.sidebar-upgrade {
  margin: 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(8,145,178,0.18), rgba(34,211,238,0.08));
  border: 1px solid var(--border);
  padding: 16px;
  flex-shrink: 0;
}
.sidebar-upgrade h4 { font-size: 0.8rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.sidebar-upgrade p { font-size: 0.75rem; color: var(--muted); margin-bottom: 10px; line-height: 1.4; }
.sidebar-upgrade a { font-size: 0.75rem; color: var(--accent2); font-weight: 600; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

/* ── 6. Topbar ─────────────────────────────────────────────── */
.topbar {
  grid-area: topbar;
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: var(--sidebar);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 50;
}
.topbar-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
}
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--muted); }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--text); font-weight: 600; }
.topbar-search { flex: 1; max-width: 340px; margin: 0 auto; }
.topbar-search input {
  width: 100%;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.8rem;
  color: var(--muted);
  outline: none;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar-bell { background: none; border: none; color: var(--muted); font-size: 1rem; cursor: pointer; padding: 4px; transition: color 0.15s; }
.topbar-bell:hover { color: var(--text); }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box,
              linear-gradient(135deg, var(--accent2), var(--accent)) border-box;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-ring img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff;
}
.topbar-username { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.topbar-logout {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.topbar-logout:hover { border-color: var(--accent); color: var(--accent2); }

/* ── 7. Main Content ───────────────────────────────────────── */
.main-content {
  grid-area: main;
  padding: 2rem;
  overflow-y: auto;
  min-height: calc(100vh - var(--topbar-h));
}
.page-header { margin-bottom: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.page-subtitle { font-size: 0.875rem; color: var(--muted); margin-top: 4px; }

/* ── 8. KPI Grid ───────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 2rem;
}
.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  animation: fadeSlideUp 0.4s ease forwards;
  animation-delay: var(--delay, 0s);
  opacity: 0;
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.kpi-sub { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

/* ── 9. Cards ──────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 1.5rem;
  animation: fadeSlideUp 0.4s ease forwards;
  opacity: 0;
  animation-delay: var(--delay, 0.1s);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.card-subtitle { font-size: 0.8rem; color: var(--muted); }

/* ── 10. Tables ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table thead th {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.05);
  color: var(--text);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(var(--accent-rgb), 0.04); }
.data-table .col-actions { text-align: right; white-space: nowrap; }

/* ── 11. Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #fff; }
.btn-danger  { background: var(--red); color: #fff; }
.btn-ghost   { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent2); }
.btn-sm { padding: 4px 10px; font-size: 0.75rem; }
.btn-icon {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 1rem;
  transition: color 0.15s, background 0.15s;
}
.btn-icon:hover { background: rgba(var(--accent-rgb), 0.1); color: var(--accent2); }

/* ── 12. Form Elements ─────────────────────────────────────── */
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(var(--accent-rgb), 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent2); }
.form-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.form-group { margin-bottom: 14px; }
.toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-info { flex: 1; }
.toggle-info strong { font-size: 0.875rem; display: block; margin-bottom: 2px; }
.toggle-info small { font-size: 0.75rem; color: var(--muted); }
.toggle-switch { position: relative; width: 42px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(var(--accent-rgb), 0.15);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: #fff; }

/* ── 13. Modal ─────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }

/* ── 14. Badges ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-rank   { background: rgba(var(--accent-rgb), 0.15); color: var(--accent2); border: 1px solid var(--border); }
.badge-role-admin  { background: rgba(239,68,68,0.15);   color: var(--red); }
.badge-role-mod    { background: rgba(245,158,11,0.15);  color: var(--amber); }
.badge-role-viewer { background: rgba(var(--accent-rgb),0.15); color: var(--accent2); }
.badge-pending { background: rgba(245,158,11,0.15); color: var(--amber); }
.badge-active  { background: rgba(16,185,129,0.15);  color: var(--green); }
.badge-banned  { background: rgba(239,68,68,0.15);   color: var(--red); }

/* ── 15. Progress Bar ──────────────────────────────────────── */
.progress-bar  { height: 6px; background: rgba(var(--accent-rgb), 0.1); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 3px; transition: width 0.4s ease; }

/* ── 16. Login Page ────────────────────────────────────────── */
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: calc(var(--radius) * 1.5);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: fadeSlideUp 0.5s ease forwards;
}
.login-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 20px;
  animation: pulse-glow 3s ease-in-out infinite;
}
.login-title  { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.login-sub    { font-size: 0.875rem; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.login-error  { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; color: var(--red); font-size: 0.8rem; padding: 10px; margin-bottom: 16px; }

/* ── 17. Rank Chart ────────────────────────────────────────── */
.rank-chart { display: flex; flex-direction: column; gap: 10px; }
.rank-chart-row { display: flex; align-items: center; gap: 12px; }
.rank-chart-label { font-size: 0.75rem; color: var(--muted); width: 90px; text-align: right; flex-shrink: 0; }
.rank-chart-bar-wrap { flex: 1; height: 14px; background: rgba(var(--accent-rgb), 0.06); border-radius: 7px; overflow: hidden; }
.rank-chart-bar { height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 7px; }
.rank-chart-count { font-size: 0.75rem; font-weight: 600; color: var(--text); width: 28px; text-align: left; }

/* ── 18. Profile Card ──────────────────────────────────────── */
.profile-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  animation: fadeSlideUp 0.4s ease forwards;
  opacity: 0;
}
.profile-avatar-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box,
              linear-gradient(135deg, var(--accent2), var(--accent)) border-box;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar-ring img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { flex: 1; }
.profile-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.profile-meta { font-size: 0.8rem; color: var(--muted); }

/* ── 19. Alerts ────────────────────────────────────────────── */
.alert { border-radius: 8px; padding: 10px 14px; font-size: 0.875rem; margin-bottom: 12px; }
.alert-success { background: rgba(16,185,129,0.1);  color: var(--green); border: 1px solid rgba(16,185,129,0.25); }
.alert-danger  { background: rgba(239,68,68,0.1);   color: var(--red);   border: 1px solid rgba(239,68,68,0.25); }
.alert-info    { background: rgba(var(--accent-rgb),0.1); color: var(--accent2); border: 1px solid var(--border); }

/* ── 20. Panels ────────────────────────────────────────────── */
.panel { display: none; }
.panel.active { display: block; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-title { font-size: 1.125rem; font-weight: 700; color: var(--text); margin: 0; }

/* ── 21. Mobile ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .layout-shell {
    grid-template-columns: 1fr;
    grid-template-areas: "topbar" "main";
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }
  body.sidebar-open .sidebar { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.5); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .topbar { margin-left: 0; }
  .topbar-hamburger { display: flex; }
  .main-content { margin-left: 0; padding: 1rem; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-search { display: none; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ── 22. Utilities ─────────────────────────────────────────── */
.hidden       { display: none !important; }
.text-muted   { color: var(--muted); }
.text-green   { color: var(--green); }
.text-amber   { color: var(--amber); }
.text-red     { color: var(--red); }
.text-accent  { color: var(--accent2); }
.mt-1 { margin-top: 4px; }   .mt-2 { margin-top: 8px; }   .mt-3 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.font-bold   { font-weight: 700; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Dev Login ─────────────────────────────────────────────── */
.dev-login-details {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.dev-login-details summary {
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  text-align: center;
  list-style: none;
}
.dev-login-details summary::-webkit-details-marker { display: none; }
.dev-login-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.dev-login-form input {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.875rem;
  box-sizing: border-box;
}
.dev-login-form input:focus {
  outline: none;
  border-color: var(--accent2);
}
.dev-login-form button {
  padding: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
}
.dev-login-form button:hover {
  border-color: var(--accent2);
  color: var(--text);
}

/* ── Dashboard Extensions: Ignorelist / Roles / Config ──────── */

/* Trust-level badges (extend existing badge pattern) */
.badge-trusted { background: rgba(16,185,129,0.15);  color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.badge-review  { background: rgba(245,158,11,0.15);  color: var(--amber); border: 1px solid rgba(245,158,11,0.3); }
.badge-blocked { background: rgba(239,68,68,0.15);   color: var(--red);   border: 1px solid rgba(239,68,68,0.3); }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

/* Config sections — collapsible cards */
.config-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.config-section-title {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.config-section-title::marker,
.config-section-title::-webkit-details-marker { display: none; }

.config-section[open] .config-section-title::after   { content: '▲'; margin-left: auto; font-size: 0.7rem; color: var(--muted); }
.config-section:not([open]) .config-section-title::after { content: '▼'; margin-left: auto; font-size: 0.7rem; color: var(--muted); }

.config-section-body { padding: 16px 18px; }

/* Toggle rows (label + checkbox aligned) */
.config-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.config-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── User menu dropdown ─────────────────────────────────── */
.topbar-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
  user-select: none;
}
.topbar-user:hover { background: rgba(255,255,255,0.07); }
.user-menu-caret { font-size: 0.65rem; opacity: 0.6; }
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200;
  overflow: hidden;
}
.user-dropdown.open { display: block; }
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.12s;
}
.user-dropdown-item:hover { background: rgba(255,255,255,0.07); }

/* ── WoW Character Cards ─────────────────────────────────────── */
.char-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--class-color, var(--accent));
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.char-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.char-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.char-class-icon {
  width: 36px; height: 36px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
}
.char-name { font-size: 1rem; font-weight: 700; color: var(--class-color, var(--text)); }
.char-realm { font-size: 0.8rem; color: var(--muted); margin-left: 4px; }
.char-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.char-stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.char-stat { display: flex; flex-direction: column; gap: 2px; }
.char-stat-label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.char-stat-value { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.char-stat-value.ilvl { color: #e6cc80; }
.char-stat-value.score { color: #3FC7EB; }
.char-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.badge-main { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.badge-raid-alt { background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }
/* Battle.net character picker */
.bnet-char-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  border: 1px solid transparent; margin-bottom: 4px;
  transition: background 0.1s, border-color 0.1s;
}
.bnet-char-row:hover { background: rgba(255,255,255,0.05); }
.bnet-char-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.bnet-char-row.selected { background: rgba(var(--accent-rgb),0.1); border-color: var(--accent); }
.bnet-char-class-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.bnet-char-level { font-size: 0.75rem; color: var(--muted); margin-left: auto; white-space: nowrap; }

/* ── Raidplanner Layout ────────────────────────────────────────── */
.raidplanner-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.raidplanner-header h3 {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
}

.raidplanner-columns {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.raidplanner-column {
  flex: 1;
  min-width: 160px;
  background: var(--surface2, #1e1e2e);
  border-radius: 8px;
  padding: 0.5rem;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.raidplanner-column.drag-over {
  border-color: var(--accent, #7aa2f7);
}
.raidplanner-column-header {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.25rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ── Player Card ───────────────────────────────────────────────── */
.player-card {
  background: var(--surface3, #2a2a3e);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.4rem;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border: 1px solid transparent;
  transition: border-color 0.15s, opacity 0.15s;
}
.player-card[draggable="true"] {
  cursor: grab;
}
.player-card[draggable="true"]:active {
  cursor: grabbing;
}
.player-card.dragging {
  opacity: 0.4;
}
.player-card-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.player-card-handle {
  opacity: 0.4;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.player-card-name {
  font-weight: 600;
  font-size: 0.85rem;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-card-class-icon {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  flex-shrink: 0;
}
.player-card-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.player-card-spec-select {
  flex: 1;
  font-size: 0.75rem;
  background: var(--surface2, #1e1e2e);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: inherit;
  padding: 2px 4px;
}
.player-card-swap-btn {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  cursor: pointer;
  color: inherit;
  white-space: nowrap;
}
.player-card-swap-btn:hover {
  background: rgba(255,255,255,0.12);
}

/* ── Pending Strip ─────────────────────────────────────────────── */
.raidplanner-pending {
  margin-top: 1rem;
}
.raidplanner-pending-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  margin-bottom: 0.5rem;
}
.pending-signup-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.5rem;
  background: var(--surface2, #1e1e2e);
  border-radius: 6px;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}
.pending-signup-info {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pending-signup-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.btn-accept {
  background: rgba(80,200,120,0.15);
  border: 1px solid rgba(80,200,120,0.35);
  color: #50c878;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 0.8rem;
}
.btn-accept:hover { background: rgba(80,200,120,0.28); }
.btn-decline {
  background: rgba(240,80,80,0.12);
  border: 1px solid rgba(240,80,80,0.3);
  color: #f05050;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 0.8rem;
}
.btn-decline:hover { background: rgba(240,80,80,0.25); }

/* ── Character Swap Modal ──────────────────────────────────────── */
.char-swap-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 320px;
  overflow-y: auto;
}
.char-swap-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--surface2, #1e1e2e);
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 0.85rem;
}
.char-swap-row:hover {
  border-color: var(--accent, #7aa2f7);
}
