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

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

  /* Global compatibility */
  --bg-base:         #07070D;
  --border-normal:   rgba(255, 255, 255, 0.09);
  --app-primary:     #53fc18;
  --app-gradient:    linear-gradient(135deg, #53fc18, #9333ea);
  --radius-md:       8px;
  --radius-lg:       12px;
  --color-bg-dark:   #07070D;
  --color-text:      #ffffff;
  --color-text-muted:#94a3b8;
  --text-muted:      #94a3b8;
  --font-body:       'Space Grotesk', 'Inter', system-ui, sans-serif;
}

/* ── 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; }
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(--ov-bg2, #0d0a1e);
  color: var(--ov-green, #53fc18);
  border: 2px solid var(--ov-green, #53fc18);
  border-radius: var(--ov-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;
}

/* ── Body ── */
body.kickov-body {
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background: var(--ov-bg);
  color: var(--ov-text);
  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(--ov-border);
  border-radius: var(--ov-r-sm);
  color: var(--ov-green);
  cursor: pointer;
  transition: var(--ov-ease);
}

.mobile-menu-toggle:hover {
  background: rgba(83, 252, 24, 0.12);
  border-color: rgba(83, 252, 24, 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(--ov-border);
  border-radius: var(--ov-r-sm);
  color: var(--ov-muted);
  cursor: pointer;
  transition: var(--ov-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(--ov-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(139, 92, 246, 0.15);
  border-top-color: #8B5CF6;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

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

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

/* ── App Shell ── */
.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.06);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  z-index: 50;
}

.sidebar-header {
  height: 64px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-header-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--ov-r-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ov-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ov-muted);
  text-decoration: none;
  transition: var(--ov-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 {
  color: var(--ov-muted);
}

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

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

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

/* Sidebar Title Bar - savršeno centriran tekst nezavisno od ikonice kao na KickAJ / Kickot */
.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(--ov-green);
  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 - scrollable nav area */
.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: #8B5CF6 transparent;
}

.sidebar-config::-webkit-scrollbar {
  width: 4px;
}
.sidebar-config::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-config::-webkit-scrollbar-thumb {
  background: #8B5CF6;
  border-radius: 4px;
}
.sidebar-config::-webkit-scrollbar-thumb:hover {
  background: #A78BFA;
}

/* Collapsible Accordions in Sidebar - elegantan list stil bez teških okvira */
.sc-accordion {
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
  background: transparent;
  padding-bottom: 6px;
  transition: var(--ov-ease);
}

.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(--ov-r-xs);
  transition: var(--ov-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(--ov-muted);
}

.sc-accordion[open] .sc-accordion-title {
  color: #ffffff;
}

.sc-chevron {
  color: #64748b;
  transition: transform 0.25s var(--ov-ease);
  flex-shrink: 0;
}

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

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

/* Form Controls - čiste bele labele i tamni inputi */
.sc-form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sc-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.sc-input:focus {
  border-color: var(--ov-green);
  box-shadow: 0 0 0 3px rgba(83, 252, 24, 0.1);
}

.sc-select {
  cursor: pointer;
}

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

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

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

.sc-toggle-title {
  font-size: 0.8rem;
  color: #cbd5e1;
  font-weight: 600;
}

.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(--ov-green);
}

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

/* ── Action Buttons - fiksirani na dnu sidebara - identicno sa Kickaj / Kickot ── */
.sc-section-actions {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0A0A16;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  z-index: 10;
}

.sc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.2s var(--ov-ease);
  width: 100%;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  user-select: none;
}

.sc-btn-start {
  background: linear-gradient(135deg, #53fc18 0%, #3de810 100%);
  color: #04030a;
  box-shadow: 0 4px 18px rgba(83, 252, 24, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.sc-btn-start:hover {
  box-shadow: 0 6px 26px rgba(83, 252, 24, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.sc-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sc-btn-save-all {
  background: rgba(83, 252, 24, 0.12);
  color: var(--ov-green);
  border: 1px solid rgba(83, 252, 24, 0.3);
  height: 38px;
  border-radius: 10px;
  font-size: 0.82rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sc-btn-save-all:hover {
  background: var(--ov-green);
  color: #000;
  box-shadow: 0 0 18px rgba(83, 252, 24, 0.35);
  transform: translateY(-1px);
}

.sc-btn-export {
  background: rgba(245, 158, 11, 0.12);
  color: var(--ov-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  height: 38px;
  border-radius: 10px;
  font-size: 0.82rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sc-btn-export:hover {
  background: var(--ov-amber);
  color: #000;
  transform: translateY(-1px);
}

.sc-btn-reset {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ov-muted);
  height: 38px;
  border-radius: 10px;
  font-size: 0.82rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sc-btn-reset:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ef4444;
  transform: translateY(-1px);
}

/* OBS copy + test alert buttons — violet secondary action */
.sc-btn-test-obs {
  background: rgba(147, 51, 234, 0.12);
  color: #c084fc;
  border: 1px solid rgba(147, 51, 234, 0.35);
  border-radius: 10px;
  width: auto;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sc-btn-test-obs:hover {
  background: rgba(147, 51, 234, 0.25);
  border-color: rgba(147, 51, 234, 0.6);
  color: #e9d5ff;
  box-shadow: 0 0 16px rgba(147, 51, 234, 0.3);
  transform: translateY(-1px);
}

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

.sc-btn-export-full:hover,
.sc-btn-copy-summary:hover {
  background: rgba(83, 252, 24, 0.15);
  border-color: var(--ov-green);
  color: var(--ov-green);
}

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

/* ── Sidebar Footer + User Pill - Identican sa Kickaj / Kickot ── */
.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(--ov-ease);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.user-pill:hover,
.user-pill:has(.user-menu-sm.open) {
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 60%, #4F46E5 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: none;
}

.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;
}

.plan-badge.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.plan-badge-pro {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(59, 130, 246, 0.18));
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.plan-badge.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);
}

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

.role-badge.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);
}

.role-badge.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.role-badge-custom {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
}

.user-menu-sm {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #0A0A16;
  border: 1px solid var(--ov-border);
  border-radius: var(--ov-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-divider {
  height: 1px;
  background: var(--ov-border);
  margin: 2px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--ov-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(--ov-ease);
}

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

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

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

/* ══════════ MAIN CONTENT ══════════ */
.main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: transparent;
}

.main-topbar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ov-border);
  background: rgba(7, 7, 13, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex-shrink: 0;
  z-index: 40;
}

.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(83, 252, 24, 0.08);
  border: 1px solid rgba(83, 252, 24, 0.3);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--ov-ease);
}

.topbar-channel-pill:hover {
  background: rgba(83, 252, 24, 0.16);
  border-color: var(--ov-green);
}

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

/* Channel Dropdown Menu */
.channel-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: #0A0A16;
  border: 1px solid var(--ov-border);
  border-radius: var(--ov-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(--ov-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(--ov-green);
}

.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(--ov-r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--ov-text);
  cursor: pointer;
  transition: var(--ov-ease);
  text-align: left;
  width: 100%;
  font-family: inherit;
}

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

.cdm-item.active {
  background: rgba(83, 252, 24, 0.12);
  border-color: rgba(83, 252, 24, 0.35);
  color: var(--ov-green);
}

.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, #1e1838, #2a2050);
  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;
  gap: 2px;
  min-width: 0;
}

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

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

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

.cdm-role-managed {
  background: rgba(6, 182, 212, 0.12);
  color: var(--ov-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(--ov-green);
  flex-shrink: 0;
}

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

.cdm-footer {
  padding: 8px;
  border-top: 1px solid var(--ov-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(--ov-r-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--ov-border);
  color: var(--ov-green);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: var(--ov-ease);
}

.cdm-custom-btn:hover {
  background: rgba(83, 252, 24, 0.15);
  border-color: var(--ov-green);
}

/* 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(--ov-border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ov-muted);
}

.topbar-live-status-pill.live {
  background: rgba(83, 252, 24, 0.12);
  border-color: rgba(83, 252, 24, 0.4);
  color: #bbf7d0;
}

.stream-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ov-green);
  box-shadow: 0 0 8px var(--ov-green);
  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; }
}

.topbar-velocity-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(83, 252, 24, 0.08);
  border: 1px solid rgba(83, 252, 24, 0.25);
  font-size: 0.8rem;
  font-weight: 700;
  color: #86efac;
}

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

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

/* Mute Dugme - crveno i aktivno kad je zvuk isključen */
.topbar-mute-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-mute-btn.muted {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  background: rgba(239, 68, 68, 0.12) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.topbar-mute-btn.muted:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
}

/* Refresh Dugme - sa glatkom rotacijom, zelenim hoverom i uspehom */
.topbar-refresh-btn {
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-refresh-btn:hover {
  color: var(--ov-green) !important;
  border-color: rgba(83, 252, 24, 0.4) !important;
  background: rgba(83, 252, 24, 0.08) !important;
  box-shadow: 0 0 12px rgba(83, 252, 24, 0.15);
}

.topbar-refresh-btn .refresh-icon {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-refresh-btn:hover .refresh-icon {
  transform: rotate(180deg);
}

.topbar-refresh-btn.is-spinning .refresh-icon {
  animation: spin 0.8s linear infinite !important;
}

.topbar-refresh-btn.is-success {
  border-color: rgba(83, 252, 24, 0.5) !important;
  background: rgba(83, 252, 24, 0.16) !important;
  color: var(--ov-green) !important;
  box-shadow: 0 0 14px rgba(83, 252, 24, 0.35);
}

/* 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;
}

/* Notification Center Popover — 1:1 sa KickAN/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(--ov-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;
  font-family: inherit;
}

.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: 10px;
}

.notif-content-list::-webkit-scrollbar-thumb:hover {
  background: #A78BFA;
}

.notif-empty {
  padding: 18px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ov-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);
}

/* ── 1. PAGE HEADER — identican sa Kickan / 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: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28) 0%, rgba(168, 85, 247, 0.15) 55%, rgba(236, 72, 153, 0.08) 100%);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 0 22px rgba(139, 92, 246, 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);
}

.panel-icon-box:hover {
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  border-color: rgba(139, 92, 246, 0.65);
  color: #fff;
}

.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: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #fff;
  line-height: 1.15;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  background: linear-gradient(180deg, #fff 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;
}

/* Stats row ispod naslova */
.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 12px;
}


.hsc-card {
  background: #12121E;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--ov-r-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  align-items: center;
  transition: var(--ov-ease);
}

.hsc-card:hover {
  background: #1a1a2e;
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

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

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

/* ── 2. OBS QUICK CONNECT CARD ── */
.obs-url-card {
  background: var(--ov-surface-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--ov-r-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.obs-url-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.obs-url-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.obs-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(83, 252, 24, 0.12);
  border: 1px solid rgba(83, 252, 24, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.obs-url-header h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.obs-url-box {
  width: 100%;
}

.obs-url-input {
  width: 100%;
  height: 42px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--ov-border);
  border-radius: var(--ov-r-md);
  padding: 0 14px;
  color: var(--ov-green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 600;
}

.obs-steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.obs-step-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: var(--ov-r-md);
}

.obs-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(83, 252, 24, 0.18);
  border: 1px solid rgba(83, 252, 24, 0.4);
  color: var(--ov-green);
  font-weight: 900;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.obs-step-text {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
}

/* ── 3. ALERT STUDIO TABS BAR ── */
.kickov-tabs-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.kickov-tab-btn {
  background: var(--ov-surface-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--ov-r-md);
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--ov-ease);
  color: var(--ov-muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.kickov-tab-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.kickov-tab-btn.active {
  background: linear-gradient(135deg, rgba(83, 252, 24, 0.15), rgba(147, 51, 234, 0.15));
  border-color: var(--ov-green);
  color: #fff;
  box-shadow: 0 0 20px rgba(83, 252, 24, 0.2), 0 2px 12px rgba(0, 0, 0, 0.4);
}

.tab-btn-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-badge-active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ov-green);
  opacity: 0.45;
  transition: var(--ov-ease);
}

.kickov-tab-btn.active .tab-badge-active-dot {
  opacity: 1;
  box-shadow: 0 0 8px var(--ov-green);
}

/* Alert disabled / paused state */
.kickov-tab-btn.alert-disabled {
  opacity: 0.65;
}

.kickov-tab-btn.alert-disabled .tab-badge-active-dot {
  background: var(--ov-muted2, #64748b) !important;
  opacity: 0.4 !important;
  box-shadow: none !important;
}

.kickov-tab-btn.active.alert-disabled {
  border-color: rgba(239, 68, 68, 0.4);
}

.kickov-tab-btn.active.alert-disabled .tab-badge-active-dot {
  background: var(--ov-red, #ef4444) !important;
  opacity: 1 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6) !important;
}

/* ── 4. WORKSPACE 2-COL GRID ── */
.kickov-workspace-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
}

.preview-stage-card, .config-stage-card {
  background: var(--ov-surface-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--ov-r-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Inline header buttons must NOT stretch full-width */
.stage-header .sc-btn,
.feed-header .sc-btn {
  width: auto;
  flex-shrink: 0;
}

/* OBS card action buttons - compact row */
.obs-url-header .sc-btn {
  width: auto;
  height: 36px;
  padding: 0 14px;
  font-size: 0.8rem;
  flex-shrink: 0;
}

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

/* Interactive Preview Stage Box */
.preview-viewport {
  min-height: 380px;
  height: 380px;
  background: radial-gradient(circle at 50% 50%, rgba(20, 15, 42, 0.8) 0%, rgba(8, 6, 18, 0.95) 100%);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--ov-r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.stage-footer-note {
  font-size: 0.76rem;
  color: var(--ov-muted2);
  text-align: center;
}

/* Dynamic Alert Preview Box Inside Viewport */
.alert-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 32px;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90%;
  user-select: none;
}

.alert-preview-media {
  max-width: 220px;
  max-height: 180px;
  object-fit: contain;
  margin-bottom: 14px;
  border-radius: 10px;
}

.alert-preview-text {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.3;
}

.alert-preview-highlight {
  color: var(--ov-green);
  text-shadow: 0 0 12px rgba(83, 252, 24, 0.4);
}

/* Config Form Controls */
.kickov-config-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.kickov-config-panel::-webkit-scrollbar {
  width: 4px;
}
.kickov-config-panel::-webkit-scrollbar-track {
  background: transparent;
}
.kickov-config-panel::-webkit-scrollbar-thumb {
  background: #8B5CF6;
  border-radius: 4px;
}
.kickov-config-panel::-webkit-scrollbar-thumb:hover {
  background: #A78BFA;
}

.cfg-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cfg-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cfg-color-input {
  width: 38px;
  height: 38px;
  border-radius: var(--ov-r-sm);
  border: 1px solid var(--ov-border);
  background: none;
  cursor: pointer;
  padding: 0;
}

.cfg-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}
.cfg-color-input::-webkit-color-swatch {
  border: none;
  border-radius: var(--ov-r-sm);
}

/* ── 5. RECENT ALERTS FEED ── */
.feed-card {
  background: var(--ov-surface-card);
  border: 1px solid var(--ov-border);
  border-radius: var(--ov-r-lg);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: var(--ov-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(--ov-green);
  box-shadow: 0 0 8px var(--ov-green);
}

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

.feed-msg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: var(--ov-r-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.84rem;
}

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

/* ══════════ 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(--ov-border);
  border-radius: var(--ov-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(--ov-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(--ov-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--ov-ease);
}

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

.modal-body {
  padding: 20px;
}

/* ══════════ HELP MODAL (1:1 KICKAJ/KICKAN 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(--ov-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(--ov-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);
}

/* ══════════ RESPONSIVE ADAPTATIONS ══════════ */
@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;
  }
}

@media (max-width: 768px) {
  .main-topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .topbar-right {
    gap: 6px;
  }

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

  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .obs-url-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .obs-steps-container {
    grid-template-columns: 1fr;
  }

  .kickov-tabs-bar {
    grid-template-columns: repeat(3, 1fr);
  }

  .kickov-workspace-grid {
    grid-template-columns: 1fr;
  }

  .topbar-velocity-pill {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-stats-row {
    grid-template-columns: 1fr;
  }

  .kickov-tabs-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar-channel-pill {
    max-width: 150px;
  }

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

  .topbar-live-status-pill span:last-child {
    display: none;
  }
}

/* ══════════ ACCESSIBILITY: REDUCED MOTION ══════════ */
@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;
  }
}

/* ══════════ TOAST NOTIFICATIONS (Identičan sa Kickot / Kickaj / Kickan) ══════════ */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(18, 18, 30, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  max-width: calc(100vw - 32px);
  width: max-content;
  white-space: nowrap;
  pointer-events: all;
  position: relative;

  /* Inicijalno sakriveno stanje */
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  max-height: 0;
  padding: 0 18px;
  margin: 0;
  overflow: hidden;

  /* Exit tranzicija */
  transition:
    opacity 0.2s ease-in,
    transform 0.2s ease-in,
    max-height 0.25s ease,
    padding 0.25s ease,
    margin 0.25s ease,
    border-width 0.25s ease;
}

.toast.toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 160px;
  padding: 10px 18px;
  margin: 4px 0;
  border-width: 1px;

  /* Spring entry animacija */
  transition:
    opacity 0.35s ease-out,
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    max-height 0.3s ease-out,
    padding 0.3s ease-out,
    margin 0.3s ease-out,
    border-width 0.3s ease-out;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.toast.toast-success {
  border-color: rgba(83, 252, 24, 0.25);
  background: rgba(83, 252, 24, 0.07);
}
.toast.toast-error {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}
.toast.toast-warning {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.08);
}
.toast.toast-info {
  border-color: rgba(6, 182, 212, 0.25);
  background: rgba(6, 182, 212, 0.07);
}

.toast-icon-wrap,
.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon-wrap svg,
.toast-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.toast-msg,
.toast-message {
  font-size: 0.875rem;
  color: #ffffff;
  white-space: nowrap;
  word-break: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
}

.toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  margin-left: 0.5rem;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.toast-close:hover { color: #ffffff; }

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 0 0 30px 30px;
  opacity: 0.7;
  animation: toast-progress-bar linear forwards;
}

.toast.toast-success .toast-progress { background: #53fc18; }
.toast.toast-error   .toast-progress { background: #EF4444; }
.toast.toast-warning .toast-progress { background: #FBBF24; }
.toast.toast-info    .toast-progress { background: #06b6d4; }

@keyframes toast-progress-bar {
  from { width: 100%; }
  to   { width: 0%; }
}

.toast.toast-leaving {
  opacity: 0 !important;
  transform: translateY(20px) scale(0.85) !important;
  max-height: 0 !important;
  padding: 0 18px !important;
  margin: 0 !important;
  border-width: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 480px) {
  .toast-container { bottom: 1rem; left: 1rem; right: 1rem; transform: none; }
  .toast { max-width: 100%; width: 100%; white-space: normal; }
  .toast-msg, .toast-message { white-space: normal; }
}
