/* ================================================================
   KICKAN STREAM ANALYTICS STUDIO — Ultra-Clean Top-Tier CSS
   Paleta: #06b6d4 (cyan), #53fc18 (green), #9333ea (violet), #f59e0b (amber), #ec4899 (pink), #ef4444 (red)
   Usklađeno sa: Kickot & Kickaj ekosistemom
   ================================================================ */

/* ── CSS Variables ── */
:root {
  --an-bg:           #07070D;
  --an-bg2:          #0A0A16;
  --an-surface:      #12121E;
  --an-surface-card: #12121E;
  --an-surface2:     #171728;
  --an-border:       rgba(255, 255, 255, 0.06);
  --an-border-h:     rgba(83, 252, 24, 0.4);
  --an-cyan:         #06b6d4;
  --an-green:        #53fc18;
  --an-violet:       #8B5CF6;
  --an-amber:        #f59e0b;
  --an-pink:         #ec4899;
  --an-red:          #ef4444;
  --an-blue:         #3b82f6;
  --an-text:         #ffffff;
  --an-muted:        #94a3b8;
  --an-muted2:       #64748b;
  --an-blur:         blur(18px);
  --an-r-xl:         20px;
  --an-r-lg:         16px;
  --an-r-md:         12px;
  --an-r-sm:         8px;
  --an-r-xs:         6px;
  --an-ease:         all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w:       240px;

  /* Global compatibility (Kickaj & Kickot identično) */
  --bg-base:         #07070D;
  --bg-surface:      #0D0D17;
  --bg-elevated:     #12121E;
  --bg-card:         #171728;
  --bg-sidebar:      #0A0A16;
  --bg-overlay:      rgba(7, 7, 13, 0.95);
  --border-subtle:   rgba(255, 255, 255, 0.04);
  --border-normal:   rgba(139, 92, 246, 0.15);
  --border-accent:   rgba(139, 92, 246, 0.4);
  --app-primary:     #8B5CF6;
  --app-primary-dim: rgba(139, 92, 246, 0.1);
  --app-secondary:   #6366F1;
  --app-gradient:    linear-gradient(90deg, #8B5CF6 0%, #6366F1 60%, #4F46E5 100%);
  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       18px;
  --radius-xl:       24px;
  --radius-full:     9999px;
  --color-bg-dark:   #07070D;
  --color-text:      #ffffff;
  --color-text-muted:#94a3b8;
  --text-muted:      #94a3b8;
  --color-green:     #53fc18;
  --font-heading:    'Space Grotesk', sans-serif;
  --font-body:       'Space Grotesk', 'Inter', system-ui, sans-serif;
  --transition-fast: 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-expo:       cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* ── Skip to Content Link (WCAG 2.2 SC 2.4.1 Bypass Blocks) ── */
.skip-link {
  position: absolute;
  top: -120px;
  left: 20px;
  z-index: 99999;
  padding: 10px 18px;
  background: var(--an-bg2, #0d0a1e);
  color: var(--an-green, #53fc18);
  border: 2px solid var(--an-green, #53fc18);
  border-radius: var(--an-r-sm, 8px);
  font-weight: 700;
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  text-decoration: none;
  transition: top 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(83, 252, 24, 0.4);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 20px;
  width: auto;
  height: auto;
  clip: auto;
  overflow: visible;
  white-space: normal;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Global Custom Scrollbars ── */
.kickan-body *::-webkit-scrollbar,
.kickan-body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.kickan-body *::-webkit-scrollbar-track,
.kickan-body::-webkit-scrollbar-track {
  background: rgba(10, 7, 24, 0.6);
  border-radius: 4px;
}

.kickan-body *::-webkit-scrollbar-thumb,
.kickan-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--an-cyan), var(--an-purple));
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.25);
}

.kickan-body *::-webkit-scrollbar-thumb:hover,
.kickan-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #22d3ee, #c084fc);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

.kickan-body *::-webkit-scrollbar-corner,
.kickan-body::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox standard scrollbar support */
.kickan-body,
.kickan-body * {
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 182, 212, 0.4) rgba(10, 7, 24, 0.6);
}

/* ── Body ── */
body.kickan-body {
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background: var(--an-bg, #07070D);
  background-image:
    radial-gradient(ellipse at 80% 10%, rgba(83, 252, 24, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 80%, rgba(147, 51, 234, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
  color: var(--an-text, #ffffff);
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

/* ── Mobile Sidebar Drawer & Backdrop ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 5, 15, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 990;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.sidebar-open .sidebar-backdrop {
  display: block;
  opacity: 1;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-sm);
  color: var(--an-cyan);
  cursor: pointer;
  transition: var(--an-ease);
}

.mobile-menu-toggle:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
}

.sidebar-mobile-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-sm);
  color: var(--an-muted);
  cursor: pointer;
  transition: var(--an-ease);
}

.sidebar-mobile-close:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

/* ── Auth Gate ── */
.auth-gate {
  position: fixed;
  inset: 0;
  background: var(--an-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease-out;
}

.auth-gate.fade-out {
  opacity: 0;
  pointer-events: none;
}

.auth-gate-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.auth-gate-logo img,
.auth-logo-img {
  height: 52px !important;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.auth-gate-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #8B5CF6 !important;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.auth-gate-msg {
  font-size: 0.9rem;
  color: var(--an-muted);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── App Layout ── */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease-in;
}

.app.fade-in {
  opacity: 1;
}

/* ══════════ SIDEBAR ══════════ */
.sidebar {
  background: #0A0A16;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: width var(--transition-base, all 0.2s ease);
  position: relative;
  z-index: 100;
  flex-shrink: 0;
  width: var(--sidebar-w);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  flex-shrink: 0;
  gap: 8px;
  border-bottom: none;
}

.sidebar-header-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--an-r-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--an-muted);
  text-decoration: none;
  transition: var(--an-ease);
}

.sidebar-header-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-header-btn.coffee-btn:hover {
  color: #F59E0B;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.sidebar-logo img,
.sidebar-logo .logo-img {
  height: 40px;
  max-height: 42px;
  width: auto;
  object-fit: contain;
}

/* Sidebar Title Bar - 1:1 sa Kickaj */
.sidebar-title-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--an-cyan);
  text-align: center;
  flex-shrink: 0;
}

.sidebar-title-bar svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
}

.sidebar-title-bar span {
  width: 100%;
  text-align: center;
  display: block;
}

.sidebar-config {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar-config::-webkit-scrollbar {
  width: 4px;
}
.sidebar-config::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Collapsible Accordions in Sidebar - Bez pozadine i bordera kao u Kickaj */
.sc-accordion {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
  background: transparent;
}

.sc-accordion[open] {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.05);
}

.sc-accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 6px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--an-r-xs);
  transition: var(--an-ease);
  user-select: none;
}

.sc-accordion-head::-webkit-details-marker,
.sc-accordion-head::marker {
  display: none;
}

.sc-accordion-head:hover {
  background: rgba(255, 255, 255, 0.03);
}

.sc-accordion-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--an-muted);
}

.sc-chevron {
  color: var(--an-muted);
  transition: transform 0.25s var(--an-ease);
  flex-shrink: 0;
}

.sc-accordion[open] .sc-chevron {
  transform: rotate(180deg);
  color: var(--an-cyan);
}

.sc-accordion-body {
  padding: 8px 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Form Controls - 1:1 sa Kickaj */
.sc-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sc-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: none;
  letter-spacing: normal;
}

.sc-input,
.sc-select {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--an-r-sm);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--an-border);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--an-ease);
  box-sizing: border-box;
}

.sc-input:focus,
.sc-select:focus {
  outline: none;
  border-color: var(--an-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.sc-input-suffix-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.sc-input-suffix-wrap .sc-input {
  padding-right: 95px;
}

.sc-input-suffix {
  position: absolute;
  right: 12px;
  color: var(--an-muted, #94a3b8);
  font-size: 0.78rem;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}

.sc-select {
  cursor: pointer;
}

.sc-select option {
  background: #0d0a1e;
  color: #fff;
}

.sc-slider {
  width: 100%;
  height: 6px;
  accent-color: var(--an-cyan);
  cursor: pointer;
}

.sc-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sc-toggle-title {
  font-size: 0.86rem;
  color: #fff;
  font-weight: 700;
}

.sc-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.sc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.sc-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.2s;
  border-radius: 20px;
}

.sc-toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.sc-toggle input:checked + .sc-toggle-slider {
  background-color: var(--an-cyan);
}

.sc-toggle input:checked + .sc-toggle-slider:before {
  transform: translateX(16px);
  background-color: #000;
}

/* Sidebar Actions / Tracking Status - 1:1 sa Kickaj & Kickot */
.sc-section-actions {
  padding: 10px 12px;
  background: #0A0A16;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.sc-tracking-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  border-radius: var(--an-r-sm, 8px);
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  user-select: none;
  cursor: default;
  pointer-events: none;
  box-sizing: border-box;
}

.sc-tracking-status svg {
  color: #4ade80;
  flex-shrink: 0;
}

.sc-btn-export-full,
.sc-btn-copy-summary {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--an-border);
  color: #fff;
  font-size: 0.8rem;
  border-radius: var(--an-r-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  transition: var(--an-ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sc-btn-export-full:hover,
.sc-btn-copy-summary:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--an-cyan);
  color: var(--an-cyan);
}

.danger-btn {
  background: var(--an-red);
  color: #fff;
}
.danger-btn:hover {
  background: #dc2626;
}

/* Sidebar Footer & User Pill - 1:1 sa Kickot i Kickaj */
.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  position: relative;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #0A0A16;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--an-ease);
  position: relative;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
}

.user-pill:hover,
.user-pill:has(.user-menu-sm.open) {
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 60%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.user-display-name {
  font-size: 0.85rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.user-plan {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.plan-badge,
.role-badge,
.user-plan .plan-badge,
.user-plan .role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
}

.role-badge,
.user-plan .role-badge {
  gap: 4px;
}

.role-badge svg,
.user-plan .role-badge svg {
  display: block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  margin: 0;
}

.role-badge span,
.user-plan .role-badge span {
  display: inline-block;
  line-height: 1;
}

.role-badge-managed {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.15);
}

.role-badge-owner {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.12);
}

.plan-badge-free {
  background: rgba(148, 163, 184, 0.12);
  color: #CBD5E1;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.08);
}

.plan-badge-pro {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(99, 102, 241, 0.15));
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.plan-badge-elite {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(236, 72, 153, 0.18));
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
}

.user-menu-sm {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #0e0a20;
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-md);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  z-index: 100;
}

.user-menu-sm.open {
  display: flex;
}

.dropdown-notice-item {
  padding: 8px;
  font-size: 0.72rem;
  color: var(--an-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--an-r-sm);
}

.user-menu-notice {
  padding: 10px 12px;
  margin-bottom: 4px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-menu-notice-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #a78bfa;
}

.user-menu-notice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 8px;
  color: #c4b5fd;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.user-menu-notice-btn:hover {
  background: rgba(139, 92, 246, 0.35);
  color: #ffffff;
  border-color: rgba(139, 92, 246, 0.6);
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--an-r-sm);
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--an-ease);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dropdown-item.danger {
  color: var(--an-red);
}

.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* ══════════ MAIN CONTENT ══════════ */
.main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
  background: var(--bg-base, #07070D);
}

.main-topbar {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: #07070D;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
  gap: 16px;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-channel-wrap {
  position: relative;
}

.topbar-channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--an-ease);
}

.topbar-channel-pill:hover {
  background: rgba(6, 182, 212, 0.16);
  border-color: var(--an-cyan);
}

.channel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--an-muted, #64748b);
  transition: all 0.3s ease;
}

.channel-dot.is-live,
.channel-dot.online {
  background: var(--an-green, #53fc18);
  box-shadow: 0 0 8px var(--an-green, #53fc18);
}

/* Channel Dropdown Menu */
.channel-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: #0d0a1e;
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}

.channel-dropdown-menu.open {
  display: flex;
}

.cdm-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--an-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cdm-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.cdm-count-badge {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
  color: var(--an-cyan);
}

.cdm-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cdm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--an-r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: var(--an-ease);
  width: 100%;
}

.cdm-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.cdm-item.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.35);
  color: #fff;
}

.cdm-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cdm-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #082f49, #0c4a6e);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.cdm-name-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.cdm-name {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.cdm-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
  line-height: 1.3;
}

.cdm-role-owner {
  background: rgba(83, 252, 24, 0.12);
  color: var(--an-green);
  border: 1px solid rgba(83, 252, 24, 0.3);
}

.cdm-role-managed {
  background: rgba(6, 182, 212, 0.12);
  color: var(--an-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.cdm-role-custom {
  background: rgba(147, 51, 234, 0.12);
  color: #c084fc;
  border: 1px solid rgba(147, 51, 234, 0.3);
}

.cdm-active-check {
  color: var(--an-cyan);
  flex-shrink: 0;
}

.cdm-empty {
  padding: 12px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--an-muted);
}

.cdm-footer {
  padding: 8px;
  border-top: 1px solid var(--an-border);
  background: rgba(0, 0, 0, 0.3);
}

.cdm-custom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  border-radius: var(--an-r-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--an-border);
  color: var(--an-cyan);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: var(--an-ease);
}

.cdm-custom-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--an-cyan);
}

/* Topbar Status & Widgets */
.topbar-live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--an-border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--an-muted);
}

.topbar-live-status-pill.live {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.stream-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--an-red);
  box-shadow: 0 0 8px var(--an-red);
  animation: pulseDot 1.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.stream-uptime {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #fff;
}

.topbar-velocity-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fde68a;
}

.topbar-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--an-r-md);
  background: var(--an-surface2);
  border: 1px solid var(--an-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--an-muted);
  cursor: pointer;
  transition: var(--an-ease);
}

.topbar-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.topbar-refresh-btn {
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-refresh-btn:hover {
  color: #53fc18;
  border-color: rgba(83, 252, 24, 0.4);
  background: rgba(83, 252, 24, 0.08);
}

.topbar-refresh-btn:hover .refresh-icon {
  transform: none;
  transition: none;
}

.topbar-refresh-btn.is-success {
  border-color: rgba(83, 252, 24, 0.5) !important;
  background: rgba(83, 252, 24, 0.15) !important;
  color: #53fc18 !important;
  box-shadow: 0 0 14px rgba(83, 252, 24, 0.35);
}

@keyframes checkPop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Notification Center Popover */
.notif-badge {
  display: none;
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #EF4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 10px;
  border: 2px solid #0D091A;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 10;
  box-sizing: border-box;
  text-align: center;
  pointer-events: none;
}

.notif-badge.active {
  display: flex;
}

/* Notifications Popover - 1:1 sa Kickaj */
.notif-popover {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  background: rgba(13, 9, 26, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  z-index: 1010;
  overflow: hidden;
  font-family: inherit;
}

.notif-popover.open {
  display: block;
}

.notif-popover-head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(139, 92, 246, 0.06);
}

.notif-popover-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: normal;
}

.notif-popover-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #8B5CF6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-mark-read {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #a78bfa;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notif-mark-read:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #fff;
}

.notif-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 5px;
  gap: 6px;
}

.notif-tab {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: var(--an-muted, #94A3B8);
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-align: center;
}

.notif-tab:hover {
  color: #fff;
}

.notif-tab.active,
.notif-tab.notif-tab-active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.notif-content-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #8B5CF6 transparent;
}

.notif-content-list::-webkit-scrollbar {
  width: 4px;
}

.notif-content-list::-webkit-scrollbar-track {
  background: transparent;
}

.notif-content-list::-webkit-scrollbar-thumb {
  background: #8B5CF6;
  border-radius: 4px;
}

.notif-content-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #22d3ee, #c084fc);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

.notif-item {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--an-r-sm);
  font-size: 0.8rem;
}

.notif-empty {
  padding: 18px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--an-muted);
}

/* ══════════ MAIN SCROLL AREA ══════════ */
.main-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 26px 40px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
  scrollbar-color: #8B5CF6 transparent;
}

.main-scroll::-webkit-scrollbar {
  width: 6px;
}
.main-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.main-scroll::-webkit-scrollbar-thumb {
  background: #8B5CF6;
  border-radius: 4px;
}
.main-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #8B5CF6, #6366F1);
}

/* ══════════ PANEL HEADER & BADGES (1:1 with Kickaj) ══════════ */
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0;
  gap: 1rem;
  flex-shrink: 0;
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.panel-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--an-r-md, 12px);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.26) 0%, rgba(59, 130, 246, 0.15) 55%, rgba(139, 92, 246, 0.08) 100%);
  color: var(--an-cyan, #06b6d4);
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 22px rgba(6, 182, 212, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.2), inset 0 -1px 2px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s ease, color 0.22s ease;
}

.panel-icon-box:hover {
  transform: none;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  border-color: rgba(6, 182, 212, 0.65);
  color: #FFFFFF;
}

.panel-heading-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  line-height: 1;
}

.panel-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #FFFFFF;
  line-height: 1.15;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  background: linear-gradient(180deg, #FFFFFF 30%, #E2E8F0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(255, 255, 255, 0.1));
}

.hero-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  position: relative;
  top: 1px;
  flex-shrink: 0;
}

.hero-plan-badge.plan-free {
  background: rgba(148, 163, 184, 0.12);
  color: #CBD5E1;
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.08);
}

.hero-plan-badge.plan-pro {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(99, 102, 241, 0.16));
  color: #93C5FD;
  border: 1px solid rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  text-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}

.hero-plan-badge.plan-elite {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.2));
  color: #F0ABFC;
  border: 1px solid rgba(216, 180, 254, 0.6);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  text-shadow: 0 0 10px rgba(216, 180, 254, 0.6);
}

.panel-desc {
  font-size: 0.88rem;
  color: #94A3B8;
  margin-top: 0.35rem;
  line-height: 1.45;
  letter-spacing: 0.005em;
}

/* ══════════ 1. LIVE TELEMETRY BANNER (Celom dužinom, podaci u nizu) ══════════ */
.live-telemetry-banner {
  background: var(--an-surface-card, #12121E);
  border: 1px solid var(--an-border, rgba(255, 255, 255, 0.06));
  border-radius: var(--an-r-lg, 16px);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(12px);
  position: relative;
  transition: var(--an-ease);
}

.live-telemetry-banner:hover {
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.ltb-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ltb-channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ltb-channel-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ltb-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ltb-channel-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0;
}

.ltb-stream-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  flex-wrap: wrap;
}

.ltb-stream-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--an-muted, #94a3b8);
}

.ltb-stream-title {
  color: #f1f5f9;
  font-weight: 700;
}

.ltb-extra-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lts-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
}

.lts-live-badge.is-live {
  background: rgba(83, 252, 24, 0.15);
  border-color: rgba(83, 252, 24, 0.45);
  color: #53fc18;
  box-shadow: 0 0 12px rgba(83, 252, 24, 0.25);
}

.lts-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.3s ease;
}

.lts-live-badge.is-live .lts-live-dot {
  background: #53fc18;
  box-shadow: 0 0 8px #53fc18;
  animation: ltsDotPulse 1.4s ease-in-out infinite;
}

@keyframes ltsDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.lts-meta-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 2px 7px;
  border-radius: 6px;
}

.lts-meta-pill strong {
  color: #e2e8f0;
}

/* 12 Metrika Kartica Grid raspoređen u 2 reda (Red 1: 6 metrika, Red 2: 6 metrika) */
.ltb-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.ltb-stats-row {
  display: grid;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.ltb-row-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 1300px) and (min-width: 850px) {
  .ltb-row-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 849px) and (min-width: 550px) {
  .ltb-row-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 549px) {
  .ltb-row-6 {
    grid-template-columns: 1fr;
  }
}

.lts-stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--an-r-md, 12px);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  min-width: 0;
}

.lts-stat-box:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.lts-stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lts-stat-green .lts-stat-icon { background: rgba(83, 252, 24, 0.12); color: #53fc18; border: 1px solid rgba(83, 252, 24, 0.25); }
.lts-stat-violet .lts-stat-icon { background: rgba(139, 92, 246, 0.12); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.25); }
.lts-stat-cyan .lts-stat-icon { background: rgba(6, 182, 212, 0.12); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.25); }
.lts-stat-pink .lts-stat-icon { background: rgba(236, 72, 153, 0.12); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.25); }
.lts-stat-amber .lts-stat-icon { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.25); }
.lts-stat-blue .lts-stat-icon { background: rgba(59, 130, 246, 0.12); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.25); }
.lts-stat-yellow .lts-stat-icon { background: rgba(234, 179, 8, 0.12); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.25); }
.lts-stat-emerald .lts-stat-icon { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }
.lts-stat-red .lts-stat-icon { background: rgba(239, 68, 68, 0.12); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.25); }
.lts-stat-purple .lts-stat-icon { background: rgba(168, 85, 247, 0.12); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.25); }
.lts-stat-indigo .lts-stat-icon { background: rgba(99, 102, 241, 0.12); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.25); }
.lts-stat-teal .lts-stat-icon { background: rgba(20, 184, 166, 0.12); color: #14b8a6; border: 1px solid rgba(20, 184, 166, 0.25); }

.lts-stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lts-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--an-muted, #94a3b8);
  white-space: nowrap;
}

.lts-stat-val {
  font-size: 1.18rem;
  font-weight: 800;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════ KCIP COMPACT CARD ══════════ */
.kcip-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ksc-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(83, 252, 24, 0.12);
  color: var(--an-green);
  border: 1px solid rgba(83, 252, 24, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kcip-content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0;
}

@media (max-width: 600px) {
  .kcip-content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kcip-mini-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kcip-mini-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--an-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kcip-mini-val {
  font-size: 0.96rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kcip-mini-val.val-green { color: var(--an-green, #53fc18); }
.kcip-mini-val.val-cyan { color: var(--an-cyan, #06b6d4); }
.kcip-mini-val.val-amber { color: var(--an-amber, #fbbf24); }
.kcip-mini-val.val-purple { color: #c084fc; }

.kcip-footer-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.74rem;
}

.kcip-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--an-muted, #94a3b8);
  font-weight: 600;
}

.ksc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
}

.ksc-dot.status-qualified { background: var(--an-green); box-shadow: 0 0 6px var(--an-green); }
.ksc-dot.status-aspiring { background: var(--an-amber); box-shadow: 0 0 6px var(--an-amber); }
.ksc-dot.status-community { background: var(--an-cyan); box-shadow: 0 0 6px var(--an-cyan); }
.ksc-dot.status-offline { background: #64748b; }

.kcip-base-rate {
  font-size: 0.72rem;
  color: var(--an-muted2, #64748b);
  font-family: 'JetBrains Mono', monospace;
}

/* ══════════ 2. 2-COLUMN SECTION: AKTIVNOST PO SATIMA + DESNE KARTICE ══════════ */
.analytics-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .analytics-main-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-main-grid > .chart-card,
.analytics-main-grid > .table-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ══════════ 2. CAROUSEL ISTORIJE PROŠLIH STRIMOVA (Celom dužinom) ══════════ */
.past-streams-carousel-section {
  background: var(--an-surface-card, #12121E);
  border: 1px solid var(--an-border, rgba(255, 255, 255, 0.06));
  border-radius: var(--an-r-lg, 16px);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(12px);
}

.psc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.psc-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.psc-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--an-cyan, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.psc-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.psc-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--an-cyan, #06b6d4);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 2px 7px;
  border-radius: 999px;
}

.psc-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.psc-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.psc-nav-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: #fff;
}

.psc-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.psc-view-all-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--an-cyan, #06b6d4);
}

.psc-track-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 182, 212, 0.4) transparent;
}

.psc-track-container::-webkit-scrollbar {
  height: 4px;
}

.psc-track-container::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.4);
  border-radius: 4px;
}

.psc-empty {
  padding: 24px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--an-muted, #94a3b8);
  width: 100%;
}

.psc-card {
  flex: 0 0 260px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.psc-card:hover {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.35);
  transform: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.psc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.psc-card-date {
  font-size: 0.72rem;
  color: var(--an-muted, #94a3b8);
  font-weight: 600;
}

.psc-card-duration {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.psc-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.psc-card-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--an-muted, #94a3b8);
}

.psc-card-metrics strong {
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
}

.telemetry-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #082f49, #0c4a6e);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.2);
}

.telemetry-channel-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.telemetry-channel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.telemetry-channel-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.telemetry-kick-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--an-cyan);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(6, 182, 212, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(6, 182, 212, 0.2);
  transition: var(--an-ease);
}

.telemetry-kick-link:hover {
  background: rgba(6, 182, 212, 0.18);
  border-color: var(--an-cyan);
}

.telemetry-stream-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--an-muted);
}

.telemetry-stream-title {
  color: #e2e8f0;
  font-weight: 600;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.telemetry-category-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
}

.telemetry-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.telemetry-stat-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
}

.tsc-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--an-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tsc-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
}

/* ── 3. 8 BENTO METRICS GRID (Luxury styling) ── */
.metrics-grid-8 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metric-card {
  background: var(--an-surface-card);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--an-ease);
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--an-blur);
}

.metric-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--an-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--an-r-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-value {
  font-size: 1.7rem;
  font-weight: 900;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}

.metric-footer {
  font-size: 0.74rem;
  color: var(--an-muted2);
  font-weight: 500;
}

/* ── KICK PARTNER & KCIP MONETIZATION PANEL ── */
.kcip-monetization-card {
  background: linear-gradient(135deg, rgba(16, 12, 34, 0.95) 0%, rgba(10, 22, 18, 0.95) 100%);
  border: 1px solid rgba(83, 252, 24, 0.28);
  border-radius: var(--an-r-xl);
  padding: 24px 28px !important;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(83, 252, 24, 0.15);
  position: relative;
  overflow: hidden;
  flex-shrink: 0 !important;
  min-height: fit-content !important;
  height: auto !important;
}

.kcip-monetization-card::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -15%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(83, 252, 24, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.kcip-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  z-index: 1;
}

.kcip-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 680px;
}

.kcip-badge-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kcip-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #53fc18;
  background: rgba(83, 252, 24, 0.12);
  border: 1px solid rgba(83, 252, 24, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  width: fit-content;
}

.kcip-tier-pill {
  font-size: 0.7rem;
  font-weight: 800;
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.kcip-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #53fc18;
  box-shadow: 0 0 8px #53fc18;
  animation: pulseDot 1.8s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.kcip-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.kcip-subtext {
  font-size: 0.9rem;
  color: var(--an-muted);
  font-weight: 600;
}

.kcip-amount-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.kcip-amount {
  font-size: 2.3rem;
  font-weight: 900;
  font-family: 'Space Grotesk', sans-serif;
  color: #53fc18;
  text-shadow: 0 0 20px rgba(83, 252, 24, 0.4);
  line-height: 1;
  margin: 0;
}

.kcip-rate-chip {
  font-size: 0.82rem;
  font-weight: 700;
  color: #86efac;
  background: rgba(83, 252, 24, 0.12);
  border: 1px solid rgba(83, 252, 24, 0.25);
  padding: 3px 10px;
  border-radius: 14px;
}

.kcip-formula-note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
  margin: 0;
}

.kcip-right-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
  z-index: 1;
}

.kcip-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--an-border);
  font-size: 0.78rem;
  color: var(--an-muted);
  white-space: nowrap;
}

.kcip-status-chip strong {
  color: #fff;
}

.ksc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #53fc18;
  box-shadow: 0 0 8px #53fc18;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.ksc-dot.status-qualified {
  background: #53fc18;
  box-shadow: 0 0 8px #53fc18;
}

.ksc-dot.status-aspiring {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.ksc-dot.status-community {
  background: #06b6d4;
  box-shadow: 0 0 8px #06b6d4;
}

.ksc-dot.status-offline {
  background: #64748b;
  box-shadow: none;
}

.kcip-status-chip.chip-cyan {
  border-color: rgba(6, 182, 212, 0.3);
  color: #22d3ee;
}

.kcip-status-chip.chip-cyan strong {
  color: #22d3ee;
}

.kcip-status-chip.chip-amber {
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.kcip-status-chip.chip-amber strong {
  color: #fbbf24;
}

/* Factors Grid (6 boxes) */
.kcip-factors-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  z-index: 1;
}

.kcip-factor-box {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--an-r-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--an-ease);
}

.kcip-factor-box:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.kcip-factor-box.kfb-highlight {
  border-color: rgba(83, 252, 24, 0.3);
  background: rgba(83, 252, 24, 0.04);
}

.kcip-factor-box.kfb-highlight:hover {
  border-color: rgba(83, 252, 24, 0.6);
  background: rgba(83, 252, 24, 0.08);
}

.kfb-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kfb-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--an-r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kfb-cyan   { color: var(--an-cyan);   background: rgba(6, 182, 212, 0.12);   border: 1px solid rgba(6, 182, 212, 0.25); }
.kfb-violet { color: var(--an-violet); background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.25); }
.kfb-amber  { color: var(--an-amber);  background: rgba(245, 158, 11, 0.12);  border: 1px solid rgba(245, 158, 11, 0.25); }
.kfb-pink   { color: var(--an-pink);   background: rgba(236, 72, 153, 0.12);  border: 1px solid rgba(236, 72, 153, 0.25); }
.kfb-blue   { color: #60a5fa;          background: rgba(96, 165, 250, 0.12);  border: 1px solid rgba(96, 165, 250, 0.25); }
.kfb-green  { color: var(--an-green);  background: rgba(83, 252, 24, 0.12);   border: 1px solid rgba(83, 252, 24, 0.25); }

.kfb-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--an-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kfb-value {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  line-height: 1.15;
}

.kfb-sub {
  font-size: 0.72rem;
  color: var(--an-muted2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kfb-sub span {
  color: #fff;
  font-weight: 600;
}

@media (max-width: 1300px) {
  .kcip-factors-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .kcip-top-row {
    flex-direction: column;
    align-items: stretch;
  }
  .kcip-right-badges {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .kcip-factors-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .kcip-factors-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 4. CHARTS SECTION (2-COL) ── */
.charts-grid-2 {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
}

.chart-card {
  background: var(--an-surface-card);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: var(--an-blur);
  box-sizing: border-box;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
}

.chart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 800;
  color: #fff;
}

.chart-tag-info {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--an-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 3px 10px;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
}

.chart-viewport {
  height: 180px;
  min-height: 180px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 10px 0 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
}

.chart-bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

.chart-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--an-cyan), rgba(6, 182, 212, 0.2));
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.3s ease;
}

.chart-bar-fill.highlight {
  background: linear-gradient(180deg, var(--an-green), rgba(83, 252, 24, 0.3));
  box-shadow: 0 0 12px rgba(83, 252, 24, 0.4);
}

.chart-bar-label {
  position: absolute;
  bottom: -20px;
  font-size: 0.65rem;
  color: var(--an-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Emotes Progress List */
.progress-list-container {
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  padding-right: 4px;
}

.progress-item-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.progress-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
}

.progress-bar-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--an-amber), #f97316);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.empty-list-notice {
  padding: 28px 16px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--an-muted);
  line-height: 1.5;
}

/* ── 5. LIVE CHAT STREAM FEED SECTION ── */
.feed-card {
  background: var(--an-surface-card);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-lg);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: var(--an-blur);
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feed-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 800;
  color: #fff;
}

.feed-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--an-green);
  box-shadow: 0 0 8px var(--an-green);
}

.feed-filters {
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-filter-btn {
  padding: 5px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--an-border);
  color: var(--an-muted);
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: var(--an-ease);
}

.feed-filter-btn:hover, .feed-filter-btn.active {
  background: rgba(6, 182, 212, 0.16);
  border-color: var(--an-cyan);
  color: #fff;
}

.feed-messages-container {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 6px;
}

.feed-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--an-r-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.84rem;
  animation: feedIn 0.2s ease-out;
}

@keyframes feedIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.feed-msg-time {
  font-size: 0.72rem;
  color: var(--an-muted2);
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
  margin-top: 2px;
}

.feed-msg-author {
  font-weight: 800;
  color: var(--an-cyan);
  flex-shrink: 0;
}

.feed-msg-content {
  color: #f1f5f9;
  word-break: break-word;
}

.feed-empty-state {
  padding: 24px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--an-muted);
}

/* ── 6. DATA TABLES SECTION (2-COL) ── */
.tables-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.table-card {
  background: var(--an-surface-card);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: var(--an-blur);
  box-sizing: border-box;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
}

.table-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 800;
  color: #fff;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-search-input {
  height: 28px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-sm);
  padding: 0 10px;
  color: #fff;
  font-size: 0.78rem;
  font-family: inherit;
  width: 130px;
  transition: width 0.2s ease, border-color 0.2s ease;
}

.table-search-input:focus {
  outline: none;
  border-color: var(--an-cyan);
  width: 160px;
}

.table-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--an-r-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--an-border);
  color: var(--an-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--an-ease);
}

.table-icon-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.table-responsive {
  height: 220px;
  min-height: 220px;
  max-height: 220px;
  overflow-y: auto;
  border-radius: var(--an-r-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--an-muted);
  border-bottom: 1px solid var(--an-border);
  position: sticky;
  top: 0;
  background: rgba(18, 14, 38, 0.98);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.data-table tr.empty-row td,
.data-table tr.empty-row:hover td,
.data-table tr:hover .table-empty-state,
.table-empty-state {
  text-align: center !important;
  vertical-align: middle !important;
  padding: 60px 16px !important;
  color: var(--an-muted, #94a3b8) !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  border-bottom: none !important;
  background: transparent !important;
  user-select: none;
}

.rank-badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
  color: var(--an-muted);
}

.rank-badge-pill.rank-1 {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.rank-badge-pill.rank-2 {
  background: rgba(203, 213, 225, 0.2);
  color: #e2e8f0;
  border: 1px solid rgba(203, 213, 225, 0.4);
}

.rank-badge-pill.rank-3 {
  background: rgba(180, 83, 9, 0.2);
  color: #d97706;
  border: 1px solid rgba(180, 83, 9, 0.4);
}

/* Table Status Pills */
.table-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-status-pill.pill-mod {
  background: rgba(83, 252, 24, 0.15);
  color: #53fc18;
  border: 1px solid rgba(83, 252, 24, 0.35);
  box-shadow: 0 0 6px rgba(83, 252, 24, 0.2);
}

.table-status-pill.pill-sub {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

.table-status-pill.pill-vip {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.table-status-pill.pill-viewer {
  background: rgba(255, 255, 255, 0.05);
  color: var(--an-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-status-pill.pill-ban {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.table-status-pill.pill-delete {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* ══════════ FULLSCREEN STUDIO HUD OVERLAY ══════════ */
.studio-overlay {
  position: fixed;
  inset: 0;
  background: #07050f;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  padding: 20px 28px;
  overflow: hidden;
}

.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--an-border);
  flex-shrink: 0;
}

.studio-header-left, .studio-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.studio-logo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--an-cyan);
}

.studio-uptime-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.86rem;
  color: #fca5a5;
}

.studio-uptime-val {
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
}

.studio-quick-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--an-border);
  padding: 6px 14px;
  border-radius: var(--an-r-md);
  font-size: 0.85rem;
}

.sqs-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.studio-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--an-r-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--an-border);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--an-ease);
}

.studio-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--an-red);
}

.studio-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  padding-top: 20px;
  overflow: hidden;
}

.studio-left-column, .studio-right-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.studio-chart-card, .studio-emotes-card, .studio-feed-card {
  background: rgba(18, 14, 38, 0.9);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-feed-card {
  flex: 1;
}

.studio-feed-stream {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.studio-stats-card {
  background: rgba(18, 14, 38, 0.9);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 150px;
}

.studio-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-stats-head h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.studio-stats-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--an-cyan);
}

.studio-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  flex: 1;
  align-content: stretch;
}

.studio-stat-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--an-r-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--an-ease);
}

.studio-stat-box:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.ssb-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--an-r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.ssb-cyan   { color: var(--an-cyan);   background: rgba(6, 182, 212, 0.12);   border-color: rgba(6, 182, 212, 0.3); }
.ssb-purple { color: var(--an-purple); background: rgba(168, 85, 247, 0.12); border-color: rgba(168, 85, 247, 0.3); }
.ssb-green  { color: var(--an-green);  background: rgba(83, 252, 24, 0.12);   border-color: rgba(83, 252, 24, 0.3); }
.ssb-amber  { color: var(--an-amber);  background: rgba(245, 158, 11, 0.12);  border-color: rgba(245, 158, 11, 0.3); }
.ssb-orange { color: #fb923c;          background: rgba(251, 146, 60, 0.12);  border-color: rgba(251, 146, 60, 0.3); }
.ssb-red    { color: #f87171;          background: rgba(239, 68, 68, 0.12);   border-color: rgba(239, 68, 68, 0.3); }

.ssb-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ssb-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--an-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ssb-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.ssb-kicks {
  color: var(--an-green);
  text-shadow: 0 0 12px rgba(83, 252, 24, 0.25);
}

/* ══════════ MODALS ══════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #0e0a20;
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--an-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--an-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--an-ease);
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
}

.modal-box.modal-box-lg {
  max-width: 840px;
}

.modal-box.modal-box-xl {
  max-width: 1060px;
}

/* ══════════ HELP MODAL (1:1 KICKAJ PARITET) ══════════ */
#helpModal .modal-box {
  background: #12121E;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 24px;
  padding: 28px 32px;
  width: min(520px, 92vw);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(139, 92, 246, 0.25);
  overflow: visible;
}

#helpModal .modal-head {
  padding: 0;
  border-bottom: none;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#helpModal .modal-head h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

#helpModal .modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--an-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#helpModal .modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  transform: scale(1.05);
}

#helpModal .modal-body {
  padding: 0;
}

#helpModal .help-modal-desc {
  color: var(--an-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

#helpModal .help-modal-email-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #53fc18 0%, #3de810 100%);
  color: #04030a;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(83, 252, 24, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

#helpModal .help-modal-email-btn svg {
  stroke: #04030a;
  flex-shrink: 0;
}

#helpModal .help-modal-email-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(83, 252, 24, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #04030a;
}

#helpModal .help-modal-email-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 12px rgba(83, 252, 24, 0.35);
}

/* ══════════ PAST STREAMS ARCHIVE STYLES ══════════ */
.sc-btn-history {
  background: rgba(147, 51, 234, 0.12);
  border: 1px solid rgba(147, 51, 234, 0.35);
  color: #c084fc;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--an-r-md);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: var(--an-ease);
  position: relative;
}

.sc-btn-history:hover {
  background: rgba(147, 51, 234, 0.22);
  border-color: rgba(147, 51, 234, 0.6);
  color: #fff;
}

.sc-btn-save-stream {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #22d3ee;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--an-r-md);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: var(--an-ease);
}

.sc-btn-save-stream:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: rgba(6, 182, 212, 0.6);
  color: #fff;
}

.sc-badge-count {
  margin-left: auto;
  background: rgba(147, 51, 234, 0.4);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
}

.past-streams-count-pill {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.past-streams-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.past-streams-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-sm);
  padding: 0 12px;
  height: 36px;
  flex: 1;
  min-width: 240px;
}

.past-streams-search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.84rem;
  font-family: inherit;
  width: 100%;
}

.past-streams-table-wrap {
  max-height: 440px;
  overflow-y: auto;
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-md);
  background: rgba(0, 0, 0, 0.25);
}

.past-streams-table th {
  padding: 12px 14px;
  font-size: 0.74rem;
}

.past-streams-table td {
  padding: 12px 14px;
  font-size: 0.85rem;
  vertical-align: middle;
}

.ps-action-btns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.ps-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--an-r-xs);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--an-ease);
}

.ps-btn-view {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
  color: #22d3ee;
}
.ps-btn-view:hover {
  background: rgba(6, 182, 212, 0.25);
  color: #fff;
}

.ps-btn-export {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}
.ps-btn-export:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #fff;
}

.ps-btn-delete {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0 7px;
}
.ps-btn-delete:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

/* Past Stream Detail Modal Content */
.ps-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.ps-detail-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-md);
  padding: 12px 14px;
}

.ps-detail-card-label {
  font-size: 0.72rem;
  color: var(--an-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}

.ps-detail-card-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
}

.ps-detail-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .ps-detail-sections {
    grid-template-columns: 1fr;
  }
}

.ps-section-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--an-border);
  border-radius: var(--an-r-md);
  padding: 14px;
}

.ps-section-head {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ps-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.ps-mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--an-r-xs);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE LAYOUT & BREAKPOINTS (identično Kickot / Kickaj)
   ════════════════════════════════════════════════════════════════ */

/* Tabular numbers za sprečavanje Layout Shift-a (CLS) */
.stat-val,
.metric-val,
.kfb-val,
.ps-detail-card-val,
.stream-uptime,
.topbar-velocity-pill strong,
.chart-bar-label {
  font-variant-numeric: tabular-nums;
}

/* Tablet & Laptop (<= 1024px) */
@media (max-width: 1024px) {
  .charts-grid-2 {
    grid-template-columns: 1fr;
  }

  .metrics-bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tables-grid-2,
  .layout-2col-tables {
    grid-template-columns: 1fr;
  }
}

/* Tablet & Mobile Drawer (<= 992px) */
@media (max-width: 992px) {
  .app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 85vw;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 14px 0 40px rgba(0, 0, 0, 0.85);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-mobile-close {
    display: inline-flex;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .main {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

/* Mobile & Mali Ekrani (<= 768px) */
@media (max-width: 768px) {
  .main-topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .topbar-channel-pill {
    font-size: 0.78rem;
    padding: 6px 10px;
    max-width: 170px;
  }

  .topbar-channel-pill .channel-pill-text {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-live-status-pill .stream-uptime {
    display: none !important;
  }

  .topbar-right {
    gap: 6px;
  }

  .main-scroll-content {
    padding: 14px;
    gap: 16px;
  }

  .overview-hero-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .metrics-bento-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .kcip-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .kcip-right-badges {
    flex-wrap: wrap;
    gap: 6px;
  }

  .kcip-factors-grid {
    grid-template-columns: 1fr 1fr;
  }

  .past-streams-table-wrap,
  .table-responsive-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .modal-box {
    width: 95vw;
    max-width: 95vw;
    padding: 16px;
  }

  .modal-box-xl,
  .modal-box-lg {
    max-width: 96vw;
  }

  /* Sprečavanje auto-zooma na iOS uređajima (font min 16px) */
  input[type="text"],
  input[type="number"],
  select {
    font-size: 16px !important;
  }
}

/* Ekstra mali ekrani (<= 480px) */
@media (max-width: 480px) {
  .topbar-channel-pill .cdm-role-badge {
    display: none;
  }

  .topbar-velocity-pill span {
    font-size: 0.72rem;
  }

  .kcip-factors-grid {
    grid-template-columns: 1fr;
  }

  .sc-btn {
    padding: 10px 14px;
  }
}

/* ════════════════════════════════════════════════════════════════
   ACCESSIBILITY & WCAG AA (Reduced Motion & Touch Targets)
   ════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .stream-pulse-dot,
  .ksc-dot,
  .auth-gate-spinner {
    animation: none !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  .topbar-btn,
  .sidebar-header-btn,
  .mobile-menu-toggle,
  .sidebar-mobile-close,
  .modal-close-btn,
  .sc-btn,
  .feed-filter-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ════════════════════════════════════════════════════════════════
   PAST STREAM DETAIL MODAL (psd-*)
   ════════════════════════════════════════════════════════════════ */

.modal-box-xl { max-width: 860px; width: 95%; }

/* Header */
.psd-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--an-border);
  flex-wrap: wrap;
}
.psd-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.psd-head-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(6,182,212,0.2), rgba(139,92,246,0.2));
  border: 1px solid rgba(6,182,212,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--an-cyan);
  flex-shrink: 0;
}
.psd-head-channel {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--an-cyan);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.psd-head-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psd-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.psd-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--an-border);
  color: var(--an-muted);
  cursor: pointer;
  transition: var(--an-ease);
}
.psd-export-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.15);
}

.psd-body { padding: 0; max-height: 72vh; overflow-y: auto; }

/* Meta strip */
.psd-meta-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--an-border);
  flex-wrap: wrap;
}
.psd-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.77rem;
  color: #cbd5e1;
}
.psd-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--an-muted2);
}

/* Stat cards grid */
.psd-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--an-border);
  border-bottom: 1px solid var(--an-border);
}
@media (max-width: 640px) {
  .psd-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
.psd-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 8px;
  background: var(--an-bg2);
  text-align: center;
  transition: background 0.15s;
}
.psd-stat-card:hover { background: rgba(255,255,255,0.03); }
.psd-stat-icon {
  opacity: 0.5;
  margin-bottom: 2px;
}
.psd-stat-viewers .psd-stat-icon { stroke: var(--an-green); }
.psd-stat-messages .psd-stat-icon { stroke: var(--an-cyan); }
.psd-stat-chatters .psd-stat-icon { stroke: #c084fc; }
.psd-stat-velocity .psd-stat-icon { stroke: var(--an-amber); }
.psd-stat-emotes .psd-stat-icon { stroke: #f472b6; }
.psd-stat-mod .psd-stat-icon { stroke: var(--an-red); }
.psd-stat-val {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}
.psd-stat-viewers .psd-stat-val { color: var(--an-green); }
.psd-stat-messages .psd-stat-val { color: var(--an-cyan); }
.psd-stat-chatters .psd-stat-val { color: #c084fc; }
.psd-stat-velocity .psd-stat-val { color: var(--an-amber); }
.psd-stat-emotes .psd-stat-val { color: #f472b6; }
.psd-stat-mod .psd-stat-val { color: var(--an-red); }
.psd-stat-label {
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--an-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Body columns */
.psd-body-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--an-border);
  padding: 0;
}
@media (max-width: 580px) { .psd-body-cols { grid-template-columns: 1fr; } }

.psd-col-box {
  background: var(--an-bg2);
  padding: 14px 16px;
}
.psd-col-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--an-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--an-border);
}

/* Leaderboard */
.psd-leaderboard { display: flex; flex-direction: column; gap: 4px; }
.psd-leaderboard-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  transition: background 0.15s;
}
.psd-leaderboard-row:hover { background: rgba(255,255,255,0.04); }
.psd-rank {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--an-muted2);
  min-width: 26px;
  text-align: center;
}
.psd-rank-gold  { color: #f59e0b; text-shadow: 0 0 8px rgba(245,158,11,0.5); }
.psd-rank-silver { color: #94a3b8; }
.psd-rank-bronze { color: #c2813a; }
.psd-leaderboard-name {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psd-leaderboard-val {
  font-size: 0.77rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--an-muted);
}
.psd-badge {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.psd-badge-sub { background: rgba(6,182,212,0.2); color: var(--an-cyan); }
.psd-badge-mod { background: rgba(83,252,24,0.15); color: var(--an-green); }
.psd-badge-vip { background: rgba(236,72,153,0.15); color: #f472b6; }

/* Emote list */
.psd-emote-list { display: flex; flex-direction: column; gap: 6px; }
.psd-emote-row {
  display: grid;
  grid-template-columns: 26px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.psd-emote-rank {
  font-size: 0.7rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--an-muted2);
  text-align: center;
}
.psd-emote-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psd-emote-bar {
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.psd-emote-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--an-green), var(--an-cyan));
  border-radius: 2px;
  transition: width 0.4s ease;
}
.psd-emote-count {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--an-green);
  min-width: 36px;
  text-align: right;
}

/* Ban list */
.psd-ban-list { display: flex; flex-direction: column; gap: 5px; }
.psd-ban-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(239,68,68,0.04);
  border: 1px solid rgba(239,68,68,0.1);
}
.psd-ban-type {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.psd-ban-type-ban { background: rgba(239,68,68,0.2); color: var(--an-red); }
.psd-ban-type-del { background: rgba(245,158,11,0.15); color: var(--an-amber); }
.psd-ban-user { font-size: 0.8rem; font-weight: 700; color: #fff; }
.psd-ban-reason { font-size: 0.75rem; color: var(--an-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psd-ban-time { font-size: 0.7rem; color: var(--an-muted2); white-space: nowrap; }

/* Hourly chart */
.psd-hourly-box {
  grid-column: 1 / -1;
  border-top: 1px solid var(--an-border);
}
.psd-hourly-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 64px;
  padding-bottom: 16px;
  position: relative;
}
.psd-hour-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
  cursor: default;
}
.psd-hour-bar::before {
  content: '';
  display: block;
  width: 100%;
  height: var(--psd-bar-h, 0%);
  background: linear-gradient(180deg, var(--an-cyan), rgba(6,182,212,0.3));
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
}
.psd-hour-bar:hover::before { background: linear-gradient(180deg, var(--an-green), rgba(83,252,24,0.3)); }
.psd-hour-label {
  position: absolute;
  bottom: -14px;
  font-size: 0.52rem;
  color: var(--an-muted2);
  font-family: 'JetBrains Mono', monospace;
  pointer-events: none;
}

.psd-empty-notice {
  color: var(--an-muted2);
  font-size: 0.78rem;
  padding: 10px 0;
  text-align: center;
}

/* ════════════════════════════════════════════════════════════════
   DELETE CONFIRM MODAL
   ════════════════════════════════════════════════════════════════ */
.modal-box-sm { max-width: 400px; width: 92%; }

.delete-confirm-box {
  text-align: center;
  padding: 32px 28px 28px;
  background: var(--an-surface);
  border: 1px solid rgba(239,68,68,0.2);
}
.delete-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(239,68,68,0.1);
  border: 2px solid rgba(239,68,68,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: var(--an-red);
  animation: deleteIconPulse 2s ease-in-out infinite;
}
@keyframes deleteIconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}
.delete-confirm-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
}
.delete-confirm-desc {
  font-size: 0.82rem;
  color: var(--an-muted);
  line-height: 1.55;
  margin: 0 0 24px;
}
.delete-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.delete-cancel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--an-border);
  color: var(--an-muted);
  cursor: pointer;
  transition: var(--an-ease);
}
.delete-cancel-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.delete-confirm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 700;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.4);
  color: var(--an-red);
  cursor: pointer;
  transition: var(--an-ease);
}
.delete-confirm-btn:hover {
  background: rgba(239,68,68,0.25);
  border-color: rgba(239,68,68,0.7);
  color: #ff6b6b;
  transform: scale(1.02);
}