/* ================================================================
   STREAM WIDGET PLATFORM — Design System
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────────── */
:root {
  --bg-0: #07071280;
  --bg-solid: #07071a;
  --bg-1: #0e0e1c;
  --bg-2: #14142a;
  --bg-3: #1c1c38;
  --surface: rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);

  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --primary-glow: rgba(124,58,237,0.35);

  --cyan: #06b6d4;
  --cyan-glow: rgba(6,182,212,0.3);
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;

  --text: #f0f0ff;
  --text-2: #8892a8;
  --text-3: #454c62;

  --sidebar-w: 256px;
  --topbar-h: 64px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 60px rgba(0,0,0,0.7);
  --glow-purple: 0 0 50px rgba(124,58,237,0.25);
}

/* ─── Reset & Base ──────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-solid);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ─── App Layout ────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ─── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: rgba(14,14,28,0.95);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.sidebar-logo {
  padding: 22px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: var(--glow-purple);
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-logo-sub {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-top: 1px;
}

.sidebar-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.18s;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  margin: 1px 0;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.nav-item:hover { background: var(--surface-hover); color: var(--text); }

.nav-item.active {
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(6,182,212,0.08));
  color: var(--text);
  border: 1px solid rgba(124,58,237,0.25);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 55%;
  background: linear-gradient(180deg, var(--primary), var(--cyan));
  border-radius: 0 2px 2px 0;
}

.nav-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  animation: pulseRed 2s ease infinite;
}

@keyframes pulseRed {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-username { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-plan { font-size: 11px; color: var(--text-2); }

.sidebar-logout {
  background: none; border: none;
  color: var(--text-3); cursor: pointer;
  padding: 6px; border-radius: 7px;
  font-size: 15px;
  transition: all 0.2s;
}
.sidebar-logout:hover { background: rgba(239,68,68,0.12); color: var(--red); }

/* ─── Main Content ──────────────────────────────────────────────── */
.main-content { flex: 1; margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  background: rgba(7,7,18,0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 26px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title { font-size: 17px; font-weight: 700; flex: 1; }
.topbar-sub { font-size: 12px; color: var(--text-2); }
.topbar-actions { display: flex; gap: 8px; }

.page-content { padding: 26px; flex: 1; }

/* ─── Section Panel ─────────────────────────────────────────────── */
.section-panel { animation: fadeSlide 0.35s ease both; }
.section-panel.hidden { display: none !important; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-hover); }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.card-title { font-size: 15px; font-weight: 700; }
.card-subtitle { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ─── Stat Cards ────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }

.stat-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-1px); box-shadow: var(--shadow); }

.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-value { font-size: 22px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-2); font-weight: 500; margin-top: 4px; }

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 17px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 3px 14px var(--primary-glow); }
.btn-primary:hover { box-shadow: 0 5px 22px var(--primary-glow); }
.btn-cyan { background: linear-gradient(135deg, var(--cyan), #0891b2); color: white; box-shadow: 0 3px 14px var(--cyan-glow); }
.btn-success { background: linear-gradient(135deg, var(--green), #059669); color: white; }
.btn-warning { background: linear-gradient(135deg, var(--amber), #d97706); color: white; }
.btn-danger { background: linear-gradient(135deg, var(--red), #dc2626); color: white; }
.btn-secondary { background: var(--bg-3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); }

.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 12px; }
.btn-icon { padding: 7px; border-radius: 7px; font-size: 15px; }

/* ─── Forms ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.3px; }
.form-hint { font-size: 11px; color: var(--text-3); margin-top: 5px; }
.form-error { color: var(--red); font-size: 12px; margin-top: 6px; font-weight: 500; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-1);
}
.form-input::placeholder { color: var(--text-3); }
.form-select { cursor: pointer; }
.form-textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.input-group { display: flex; }
.input-group .form-input { border-radius: 9px 0 0 9px; border-right: none; }
.input-group .btn { border-radius: 0 9px 9px 0; flex-shrink: 0; }

/* ─── Tables ────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-2); }
th { text-align: left; padding: 11px 15px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-2); white-space: nowrap; }
td { padding: 12px 15px; font-size: 13px; border-top: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: var(--surface); }
.table-actions { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }

/* ─── Badges ────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }

/* ─── Channel Cards ──────────────────────────────────────────────── */
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }

.channel-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all 0.22s;
  position: relative;
  overflow: hidden;
}
.channel-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--primary), var(--cyan)); }
.channel-card:hover { border-color: rgba(124,58,237,0.3); transform: translateY(-2px); box-shadow: var(--shadow); }

.channel-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.channel-avatar {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.channel-name { font-size: 15px; font-weight: 700; }
.channel-platform-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.channel-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }

/* ─── Verification Box ───────────────────────────────────────────── */
.verify-box {
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(6,182,212,0.05));
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius);
  padding: 14px;
  margin: 10px 0;
}

.verify-code {
  font-family: 'Courier New', monospace;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 5px;
  color: var(--primary-light);
  text-align: center;
  padding: 10px;
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
  margin: 8px 0;
  user-select: all;
  cursor: pointer;
}

.verify-steps { list-style: none; counter-reset: step; }
.verify-steps li {
  counter-increment: step;
  padding: 5px 0 5px 30px;
  position: relative;
  font-size: 12.5px;
  color: var(--text-2);
}
.verify-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 7px;
  width: 20px; height: 20px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Widget Selector ────────────────────────────────────────────── */
.widget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 18px; }

.widget-option {
  background: var(--bg-2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.widget-option:hover { border-color: var(--primary); background: rgba(124,58,237,0.08); transform: scale(1.02); }
.widget-option.selected { border-color: var(--primary); background: rgba(124,58,237,0.14); box-shadow: 0 0 20px var(--primary-glow); }
.widget-option-icon { font-size: 28px; margin-bottom: 7px; }
.widget-option-name { font-size: 12.5px; font-weight: 700; }
.widget-option-desc { font-size: 10.5px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }

/* ─── Notifications ──────────────────────────────────────────────── */
.notif-list { display: flex; flex-direction: column; gap: 7px; }

.notif-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: all 0.18s;
  position: relative;
}
.notif-item.unread { border-color: rgba(124,58,237,0.3); background: rgba(124,58,237,0.05); }
.notif-item.unread::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 55%; background: var(--primary); border-radius: 0 2px 2px 0; }

.notif-dot { font-size: 16px; flex-shrink: 0; }
.notif-msg { font-size: 13px; flex: 1; line-height: 1.4; }
.notif-time { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.notif-actions { display: flex; gap: 4px; }

/* ─── Chat ───────────────────────────────────────────────────────── */
.chat-window { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-2); min-height: 300px; max-height: 440px; }

.chat-message { max-width: 72%; display: flex; flex-direction: column; gap: 4px; }
.chat-message.from-admin { align-self: flex-start; }
.chat-message.from-user { align-self: flex-end; }

.chat-bubble { padding: 9px 13px; border-radius: 15px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.from-admin .chat-bubble { background: var(--bg-3); border: 1px solid var(--border); border-radius: 4px 15px 15px 15px; }
.from-user .chat-bubble { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border-radius: 15px 4px 15px 15px; }

.chat-time { font-size: 10px; color: var(--text-3); padding: 0 4px; }

.chat-input-area { background: var(--bg-1); border-top: 1px solid var(--border); padding: 11px; display: flex; gap: 8px; }
.chat-input-area .form-input { margin: 0; }

/* ─── Admin user list thread ─────────────────────────────────────── */
.thread-list { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; margin-bottom: 16px; }
.thread-item { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 13px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: all 0.18s; }
.thread-item:hover { border-color: var(--primary); background: rgba(124,58,237,0.08); }
.thread-item.selected { border-color: var(--primary); background: rgba(124,58,237,0.12); }
.thread-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--cyan)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: white; flex-shrink: 0; }

/* ─── Modal ──────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(10px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity 0.28s; pointer-events: none; }
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box { background: var(--bg-1); border: 1px solid var(--border-hover); border-radius: var(--radius-xl); width: 100%; max-width: 540px; max-height: 85vh; overflow-y: auto; transform: scale(0.94) translateY(20px); transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1); }
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }

.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close-btn { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 17px; padding: 4px; border-radius: 6px; transition: all 0.18s; }
.modal-close-btn:hover { background: rgba(239,68,68,0.12); color: var(--red); }

.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 9px; justify-content: flex-end; }
.modal-confirm-msg { color: var(--text-2); font-size: 14px; line-height: 1.5; }

/* ─── Toast ──────────────────────────────────────────────────────── */
#toast-container { position: fixed; top: 18px; right: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }

.toast { background: rgba(14,14,28,0.96); border: 1px solid var(--border); backdrop-filter: blur(16px); border-radius: 11px; padding: 12px 15px; display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; max-width: 350px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateX(110%); transition: all 0.3s cubic-bezier(0.34, 1.5, 0.64, 1); pointer-events: all; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-color: rgba(16,185,129,0.4); }
.toast-warning { border-color: rgba(245,158,11,0.4); }
.toast-danger,.toast-error { border-color: rgba(239,68,68,0.4); }
.toast-info { border-color: rgba(6,182,212,0.4); }
.toast-icon { font-size: 17px; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.4; }
.toast-close { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 13px; flex-shrink: 0; padding: 2px 4px; border-radius: 4px; }
.toast-close:hover { color: var(--text); }

/* ─── Auth Page ──────────────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; overflow: hidden; background: var(--bg-solid); }

.auth-orb { position: fixed; border-radius: 50%; filter: blur(130px); opacity: 0.12; pointer-events: none; }
.auth-orb-1 { width: 700px; height: 700px; background: var(--primary); top: -280px; left: -250px; animation: floatOrb 8s ease-in-out infinite; }
.auth-orb-2 { width: 500px; height: 500px; background: var(--cyan); bottom: -150px; right: -150px; animation: floatOrb 10s ease-in-out infinite reverse; }

@keyframes floatOrb {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.auth-container { width: 100%; max-width: 460px; position: relative; z-index: 1; }

.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-icon { width: 62px; height: 62px; background: linear-gradient(135deg, var(--primary), var(--cyan)); border-radius: 17px; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 12px; box-shadow: 0 0 60px var(--primary-glow); }
.auth-logo-name { font-size: 26px; font-weight: 900; background: linear-gradient(135deg, var(--primary-light), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.auth-logo-tagline { font-size: 13px; color: var(--text-2); margin-top: 5px; }

.auth-card { background: rgba(14,14,26,0.85); backdrop-filter: blur(50px); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--shadow-lg); }

.auth-tabs { display: flex; background: var(--bg-2); border-radius: 9px; padding: 4px; margin-bottom: 24px; }
.auth-tab { flex: 1; padding: 9px; text-align: center; border-radius: 6px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: all 0.2s; border: none; background: none; font-family: inherit; }
.auth-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 2px 10px var(--primary-glow); }

.auth-features { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.auth-feat { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }

/* ─── Utility ─────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.text-danger { color: var(--red); }
.text-success { color: var(--green); }
.text-warn { color: var(--amber); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.mono { font-family: 'Courier New', monospace; }
.bold { font-weight: 700; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.empty-state { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty-state-icon { font-size: 44px; margin-bottom: 14px; }
.empty-state-msg { font-size: 15px; font-weight: 600; }
.empty-state-sub { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }

input[type="color"] { width: 46px; height: 30px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-2); cursor: pointer; padding: 2px; }

/* ─── Search bar ─────────────────────────────────────────────────── */
.search-bar { position: relative; }
.search-bar .form-input { padding-left: 36px; }
.search-bar::before { content: '🔍'; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 14px; pointer-events: none; }

/* ─── Tab bar ────────────────────────────────────────────────────── */
.tab-bar { display: flex; border-bottom: 1px solid var(--border); gap: 2px; margin-bottom: 18px; }
.tab-btn { padding: 9px 15px; border: none; background: none; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.18s; border-radius: 5px 5px 0 0; }
.tab-btn:hover { color: var(--text); background: var(--surface); }
.tab-btn.active { color: var(--primary-light); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.28s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── Glow info box ─────────────────────────────────────────────── */
.info-box { border-radius: var(--radius); padding: 12px 15px; font-size: 12.5px; border: 1px solid; }
.info-box.warn { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.3); color: var(--amber); }
.info-box.success { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.3); color: var(--green); }
.info-box.info { background: rgba(6,182,212,0.08); border-color: rgba(6,182,212,0.3); color: var(--cyan); }
.info-box.danger { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.3); color: var(--red); }

/* ─── Spinner ────────────────────────────────────────────────────── */
.spinner { width: 22px; height: 22px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.75s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
}
@media (max-width: 580px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 22px; }
}
