:root {
  --bg-dark: #090d16;
  --card-bg: rgba(18, 24, 38, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(99, 102, 241, 0.35);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-sub: #6b7280;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.35);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --warning: #f59e0b;
  --danger: #ef4444;
  --cyan: #06b6d4;
  --purple: #8b5cf6;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

/* 🎨 THEMES FOR BROADCASTER */
[data-theme="emerald"] {
  --bg-dark: #061412;
  --card-bg: rgba(11, 37, 32, 0.78);
  --card-border: rgba(16, 185, 129, 0.15);
  --card-hover-border: rgba(16, 185, 129, 0.45);
  --text-main: #f0fdf4;
  --text-muted: #86efac;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.35);
}

[data-theme="ocean"] {
  --bg-dark: #071324;
  --card-bg: rgba(14, 34, 61, 0.78);
  --card-border: rgba(14, 165, 233, 0.15);
  --card-hover-border: rgba(14, 165, 233, 0.45);
  --text-main: #f0f9ff;
  --text-muted: #7dd3fc;
  --primary: #0ea5e9;
  --primary-hover: #0284c7;
  --primary-glow: rgba(14, 165, 233, 0.35);
}

[data-theme="amber"] {
  --bg-dark: #140d07;
  --card-bg: rgba(40, 25, 14, 0.78);
  --card-border: rgba(245, 158, 11, 0.15);
  --card-hover-border: rgba(245, 158, 11, 0.45);
  --text-main: #fffbeb;
  --text-muted: #fcd34d;
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-glow: rgba(245, 158, 11, 0.35);
}

[data-theme="purple"] {
  --bg-dark: #11081d;
  --card-bg: rgba(32, 16, 54, 0.78);
  --card-border: rgba(168, 85, 247, 0.15);
  --card-hover-border: rgba(168, 85, 247, 0.45);
  --text-main: #faf5ff;
  --text-muted: #d8b4fe;
  --primary: #a855f7;
  --primary-hover: #9333ea;
  --primary-glow: rgba(168, 85, 247, 0.35);
}

[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --card-hover-border: rgba(79, 70, 229, 0.35);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-sub: #64748b;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding: 24px 16px;
}

/* Ambient glow orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 450px;
  height: 450px;
  top: -100px;
  left: -100px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.18), transparent 70%);
}
.orb-2 {
  width: 550px;
  height: 550px;
  bottom: -150px;
  right: -150px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12), transparent 70%);
}
.orb-3 {
  width: 380px;
  height: 380px;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1), transparent 70%);
}

/* Lock Screen Overlay (100% Solid Opaque Shield) */
.lock-screen-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: #090d16;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lock-card {
  max-width: 440px;
  width: 100%;
  text-align: center;
  padding: 38px 28px;
  background: rgba(18, 24, 38, 0.95);
  border: 1px solid rgba(79, 70, 229, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  border-radius: var(--radius-lg);
  animation: modalScale 0.3s ease;
}
@keyframes modalScale {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lock-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px auto;
  border-radius: 18px;
  background: rgba(79, 70, 229, 0.2);
  border: 1px solid rgba(79, 70, 229, 0.4);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lock-card h2 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}
.lock-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrapper input {
  padding-right: 42px;
}
.btn-toggle-eye {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-toggle-eye:hover {
  color: #fff;
}
.error-text {
  display: block;
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 6px;
  text-align: left;
}

.app-container {
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.glass-card:hover {
  border-color: var(--card-hover-border);
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(18, 24, 38, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-text h1 span {
  color: var(--cyan);
  font-weight: 500;
  font-size: 0.95rem;
}
.badge-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-indicator-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
}
.status-indicator-pill.connected {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--success);
}
.status-indicator-pill.connecting, .status-indicator-pill.qr_ready {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--warning);
}
.status-indicator-pill.disconnected, .status-indicator-pill.logged_out, .status-indicator-pill.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  gap: 8px;
  background: rgba(18, 24, 38, 0.4);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 6px;
  overflow-x: auto;
}
.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.nav-tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Tab Pages */
.tab-page {
  display: none;
}
.tab-page.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Layouts */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.metric-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
}
.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.metric-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.metric-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--purple); }
.metric-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.metric-info .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.metric-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 4px 0 2px 0;
}
.metric-info .sub-label {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .two-col-layout {
    grid-template-columns: 1fr;
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}
.card-header h2 {
  font-size: 1.05rem;
  font-weight: 600;
}
.header-right-actions {
  display: flex;
  gap: 8px;
}
.section-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

/* Auth QR & Pairing */
.auth-mode-switch {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 2px;
}
.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
}
.mode-btn.active {
  background: var(--primary);
  color: #fff;
}
.qr-container {
  width: 220px;
  height: 220px;
  margin: 10px auto 16px auto;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.qr-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #1f2937;
  font-size: 0.85rem;
  text-align: center;
}
#btnReloadQr {
  background: #4f46e5 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35) !important;
  font-size: 12px !important;
  transition: all 0.2s ease !important;
}
#btnReloadQr:hover {
  background: #4338ca !important;
  transform: translateY(-1px) !important;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(79, 70, 229, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.qr-instruction {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.pair-input-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.input-with-btn {
  display: flex;
  gap: 8px;
}
.input-with-btn input {
  flex: 1;
}
.pair-result-box {
  margin-top: 18px;
  background: rgba(79, 70, 229, 0.1);
  border: 1px dashed rgba(79, 70, 229, 0.4);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.code-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #818cf8;
  margin: 10px 0;
}
.connected-badge-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.avatar-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.online-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
}
.auth-action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* Scanner Styles */
.scanner-metrics {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.scan-pill {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}
.scan-pill.total { background: rgba(255, 255, 255, 0.08); }
.scan-pill.green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.scan-pill.red { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* Table Styles */
.table-container {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
th {
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 12px;
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--card-border);
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-status.active { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-status.inactive { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-status.sent { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-status.pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-status.failed { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-status.running { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.badge-status.completed { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-status.paused { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-status.cancelled { background: rgba(156, 163, 175, 0.15); color: var(--text-muted); }

/* Groups UI */
.group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}
.group-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}
.group-item-card:hover, .group-item-card.active {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
}
.group-item-info h4 {
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.group-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.group-count-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

/* Template Helper */
.template-tags-helper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.template-tags-helper span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.tag-insert {
  background: rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.3);
  color: #a5b4fc;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
}
.tag-insert:hover {
  background: var(--primary);
  color: #fff;
}

/* Campaign Monitor */
.active-campaign-monitor {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 18px;
}
.monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.campaign-ctrl-btns {
  display: flex;
  gap: 6px;
}
.progress-bar-wrapper {
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  transition: width 0.3s ease;
}
.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.campaigns-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
}
.campaign-history-card {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}
input[type="text"], input[type="tel"], input[type="url"], input[type="password"], textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}
input:focus, textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}
.form-select option {
  background: #111827;
  color: #fff;
}
.spintax-preview-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.preview-title {
  font-size: 0.75rem;
  color: var(--text-sub);
  display: block;
  margin-bottom: 4px;
}
#spintaxPreviewText, #campaignSpintaxPreview {
  font-size: 0.85rem;
  color: var(--cyan);
  font-style: italic;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 14px var(--primary-glow); }
.btn-secondary { background: rgba(255, 255, 255, 0.08); color: var(--text-main); border: 1px solid var(--card-border); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }
.btn-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }
.btn-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.btn-warning:hover { background: rgba(245, 158, 11, 0.25); }
.btn-success { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.btn-success:hover { background: rgba(16, 185, 129, 0.25); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* Settings items */
.settings-grid { display: flex; flex-direction: column; gap: 16px; }
.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}
.delay-slider-box { display: flex; gap: 16px; }
.slider-inputs { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.slider-inputs span { font-size: 0.78rem; color: var(--text-muted); }
.slider-inputs b { color: var(--cyan); }
input[type="range"] { accent-color: var(--primary); width: 90px; }

/* Switch Toggle */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255, 255, 255, 0.15); transition: .3s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

/* Security Center Badges & Logs */
.security-badges-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.sec-badge { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--card-border); border-radius: 6px; padding: 6px 8px; font-size: 0.75rem; }
.sec-dot { width: 6px; height: 6px; border-radius: 50%; }
.sec-dot.green { background: var(--success); box-shadow: 0 0 6px var(--success); }
.security-logs-container { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 12px; }
.log-box-title { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.logs-scroll { max-height: 180px; overflow-y: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: #a5b4fc; }
.log-item { padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); white-space: pre-wrap; word-break: break-all; }
.empty-log, .empty-state-text { color: var(--text-sub); font-style: italic; text-align: center; padding: 20px; }

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card { max-width: 480px; width: 100%; animation: modalScale 0.25s ease; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--card-border); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; }
.modal-close:hover { color: #fff; }
.modal-tip { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e1b4b;
  color: #fff;
  border: 1px solid var(--primary);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-size: 0.88rem;
  z-index: 9000;
  display: none;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Light Theme Enhancements for Broadcaster */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .glass-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] th {
  background: #f1f5f9 !important;
  color: #334155 !important;
}

[data-theme="light"] td {
  color: #0f172a !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .btn-secondary {
  background: #f8fafc !important;
  color: #1e293b !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .modal-card {
  background: #ffffff !important;
  color: #0f172a !important;
}

