/* ============================================================
   GMV LIVES VPS — Dark Futuristic UI
   ============================================================ */

:root {
  --bg-base:       #060810;
  --bg-surface:    #0d0f1a;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border:        rgba(255,255,255,0.08);
  --border-glow:   rgba(99,102,241,0.5);

  --accent:        #6366f1;
  --accent-glow:   rgba(99,102,241,0.35);
  --accent-alt:    #a78bfa;
  --danger:        #ef4444;
  --success:       #22c55e;
  --warning:       #f59e0b;
  --live-red:      #fe2c55;

  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;

  --font-sans:     'Inter', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --sidebar-w:   240px;
  --topbar-h:    60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* ── SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,.4); border-radius: 99px; }

/* ── PARTICLE CANVAS ─────────────────────────────────── */
#particleCanvas {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .45;
}

/* ── GLASS CARD ──────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color .25s, box-shadow .25s;
}
.glass-card:hover { border-color: rgba(99,102,241,.25); }

/* ── SCREENS ─────────────────────────────────────────── */
.screen { position: fixed; inset: 0; z-index: 10; display: none; }
.screen.active { display: flex; }

/* ── LOGIN ───────────────────────────────────────────── */
#loginScreen, #registerScreen {
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,.15) 0%, transparent 70%),
              var(--bg-base);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  position: relative;
  z-index: 1;
  animation: slideUp .4s ease;
}

@keyframes slideUp {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}

.brand-logo {
  text-align: center;
  margin-bottom: 32px;
}
.logo-icon {
  font-size: 40px;
  display: inline-block;
  animation: pulse 2.5s ease-in-out infinite;
}
.logo-icon.small { font-size: 22px; }
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.brand-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-top: 6px;
}
.accent { color: var(--accent); }
.brand-sub { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }

/* ── FORMS ───────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 11.5px; }
.form-group input[type=text], .form-group input[type=email], .form-group input[type=password] {
  -webkit-appearance: none;
}
.form-group input::placeholder { color: var(--text-muted); }

.form-grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } }

.input-with-toggle { display: flex; gap: 8px; }
.input-with-toggle input { flex: 1; }
.btn-eye {
  padding: 0 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 16px;
  transition: background .2s;
}
.btn-eye:hover { background: rgba(255,255,255,.1); }

.select-field {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  cursor: pointer;
}
.select-field option { background: #1e2030; }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn-primary, .btn-danger, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all .2s; outline: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(99,102,241,.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(99,102,241,.5); }
.btn-primary:active { transform: translateY(0); }

.btn-danger {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.4);
  color: #fca5a5;
}
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-danger:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--text-primary); }
.btn-logout {
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: var(--text-muted); padding: 4px;
  transition: color .2s;
}
.btn-logout:hover { color: var(--danger); }

.btn-full { width: 100%; }
.btn-live { background: linear-gradient(135deg, var(--live-red) 0%, #ff6b6b 100%); box-shadow: 0 4px 18px rgba(254,44,85,.4); }
.btn-live:hover { box-shadow: 0 6px 28px rgba(254,44,85,.6); }
.btn-loader { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.small { padding: 6px 14px; font-size: 12px; }

/* ── ALERTS ──────────────────────────────────────────── */
.alert-error {
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: #fca5a5; font-size: 13px; margin-bottom: 14px;
}
.alert-success {
  background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: #86efac; font-size: 13px; margin-top: 12px;
}
.alert-warning {
  background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: #fcd34d; font-size: 13px; margin-top: 12px;
}
.hidden { display: none !important; }

/* ── LOGIN FOOTER ─────────────────────────────────────── */
.login-footer { text-align: center; margin-top: 20px; color: var(--text-secondary); font-size: 13px; }
.login-footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
.login-footer a:hover { text-decoration: underline; }

/* ── DASHBOARD LAYOUT ────────────────────────────────── */
#dashScreen {
  display: none; flex-direction: row;
  width: 100%; height: 100%;
  position: fixed; inset: 0; z-index: 10;
}
#dashScreen.active { display: flex; }

/* ── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  border-radius: 0;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 20px;
  font-size: 16px; font-weight: 700;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: none; border: none; border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: all .18s;
}
.nav-btn:hover { background: rgba(255,255,255,.05); color: var(--text-primary); }
.nav-btn.active {
  background: rgba(99,102,241,.15);
  color: var(--accent-alt);
  border: 1px solid rgba(99,102,241,.25);
}
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex; align-items: center; gap: 10px;
}
.user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 11px; color: var(--text-muted); }

/* ── MAIN CONTENT ────────────────────────────────────── */
.main-content {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; position: relative; z-index: 1;
}

/* ── TOPBAR ──────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.topbar h2 { font-size: 18px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-live-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
}

.btn-live-top {
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(99,102,241,.3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 13px; font-weight: 500;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.status-dot.idle    { background: var(--text-muted); }
.status-dot.live    { background: var(--live-red); animation: blinkDot 1.2s infinite; }
.status-dot.stopped { background: var(--warning); }
@keyframes blinkDot { 0%,100%{opacity:1} 50%{opacity:.3} }

.license-badge {
  padding: 4px 12px;
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 99px;
  font-size: 11px; font-weight: 600; color: var(--accent-alt);
  font-family: var(--font-mono);
}

/* ── TAB PANES ───────────────────────────────────────── */
.tab-pane { display: none; padding: 24px 28px; overflow-y: auto; flex: 1; animation: fadeIn .3s ease; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ── STATS GRID ──────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 20px;
}
.stat-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px;
}
.stat-icon { font-size: 28px; }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 22px; font-weight: 700; margin-top: 2px; }

/* ── CONTROL CARD ────────────────────────────────────── */
.control-card { padding: 24px; margin-bottom: 20px; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.card-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.control-row { display: flex; gap: 12px; flex-wrap: wrap; }
.live-alert { margin-top: 16px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; }

/* ── SESSIONS LIST ───────────────────────────────────── */
.glass-card { padding: 24px; margin-bottom: 20px; }
.sessions-list { display: flex; flex-direction: column; gap: 8px; }
.session-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.session-badge {
  padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600;
}
.badge-live    { background: rgba(254,44,85,.2); color: #ff8fa3; border: 1px solid rgba(254,44,85,.3); }
.badge-stopped { background: rgba(71,85,105,.2); color: var(--text-muted); border: 1px solid var(--border); }
.empty-state { color: var(--text-muted); font-size: 13px; text-align: center; padding: 20px; }

/* ── TOGGLES ─────────────────────────────────────────── */
.toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.toggle-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13px;
  transition: border-color .2s, background .2s;
}
.toggle-item:hover { border-color: rgba(99,102,241,.3); background: rgba(99,102,241,.06); }
.toggle-item input[type=checkbox] { display: none; }
.toggle-switch {
  width: 34px; height: 18px; border-radius: 99px;
  background: rgba(255,255,255,.1); position: relative;
  flex-shrink: 0; transition: background .2s;
}
.toggle-switch::after {
  content: ''; position: absolute;
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  top: 3px; left: 3px; transition: transform .2s;
}
.toggle-item input:checked + .toggle-switch { background: var(--accent); }
.toggle-item input:checked + .toggle-switch::after { transform: translateX(16px); }

.section-label {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent-alt);
  margin: 20px 0 10px;
}
.section-label:first-child { margin-top: 0; }

/* ── SLIDERS ─────────────────────────────────────────── */
.slider-row { margin-bottom: 16px; }
.slider-row label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.slider-row input[type=range] {
  width: 100%; accent-color: var(--accent); height: 4px;
  -webkit-appearance: none; background: rgba(255,255,255,.1); border-radius: 99px;
}

/* ── PRESETS ─────────────────────────────────────────── */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.preset-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 20px 16px;
  background: rgba(255,255,255,.03);
  border: 2px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; transition: all .2s;
}
.preset-card input { display: none; }
.preset-card:has(input:checked) { border-color: var(--accent); background: rgba(99,102,241,.1); }
.preset-card:hover { border-color: rgba(99,102,241,.4); }
.preset-icon { font-size: 28px; }
.preset-card strong { font-size: 14px; }
.preset-card small { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }

/* ── INFO STEPS ──────────────────────────────────────── */
.info-card { background: rgba(99,102,241,.05); border-color: rgba(99,102,241,.2); }
.info-steps { padding-left: 20px; color: var(--text-secondary); font-size: 14px; line-height: 2; }
.info-steps code {
  background: rgba(255,255,255,.08); padding: 2px 7px;
  border-radius: 4px; font-family: var(--font-mono); font-size: 12px;
}

/* ── LOGS ────────────────────────────────────────────── */
.logs-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.logs-header .card-title { margin-bottom: 0; }
.logs-actions { display: flex; gap: 8px; }
.logs-container {
  background: rgba(0,0,0,.3); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 460px; overflow-y: auto;
  padding: 4px;
}
.log-entry {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 8px 12px; font-size: 12.5px;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.log-entry:last-child { border-bottom: none; }
.log-time { color: var(--text-muted); font-family: var(--font-mono); white-space: nowrap; }
.log-type {
  padding: 1px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}
.type-live_start  { background: rgba(34,197,94,.15); color: #86efac; }
.type-live_stop   { background: rgba(71,85,105,.2); color: var(--text-secondary); }
.type-violation   { background: rgba(239,68,68,.15); color: #fca5a5; }
.type-force_reset { background: rgba(245,158,11,.15); color: #fcd34d; }
.type-info, .type-heartbeat { background: rgba(99,102,241,.12); color: var(--accent-alt); }
.log-msg { color: var(--text-primary); flex: 1; }

/* ── PREVIEW CARD & MONITOR ──────────────────────────── */
.preview-card { position: relative; margin-bottom: 20px; }
.preview-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.preview-header .card-title { margin-bottom: 0; }
.preview-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.preview-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.preview-dot.active { background: var(--success); box-shadow: 0 0 10px var(--success); }

.preview-viewport {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-width: 320px;
  max-height: 480px;
  margin: 0 auto 16px;
  background: rgba(0,0,0,.6);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.preview-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; color: var(--text-secondary);
}
.preview-icon { font-size: 40px; margin-bottom: 10px; opacity: .7; }
.preview-placeholder p { font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.preview-viewport video, .preview-viewport img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.preview-actions { display: flex; gap: 10px; justify-content: center; }

/* ── UPLOAD GRID & DROPZONES ─────────────────────────── */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 16px;
}
.upload-box {
  background: rgba(255,255,255,.02);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .2s;
}
.upload-box:hover { border-color: var(--accent); }
.upload-box-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.upload-box-desc { font-size: 11.5px; color: var(--text-muted); }
.file-input-hidden { display: none; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 24px 12px;
  background: rgba(99,102,241,.04);
  border-radius: var(--radius-sm);
  cursor: pointer; text-align: center;
  font-size: 13px; color: var(--text-secondary);
  transition: background .2s;
}
.dropzone:hover { background: rgba(99,102,241,.12); color: var(--text-primary); }
.dz-icon { font-size: 28px; }
.dropzone small { font-size: 11px; color: var(--text-muted); }

/* ── MEDIA LIST ──────────────────────────────────────── */
.media-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}
.media-list-container::-webkit-scrollbar {
  width: 6px;
}
.media-list-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.media-list-container::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 4px;
}
.media-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}
.media-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.media-item-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.media-item-icon { font-size: 22px; flex-shrink: 0; }
.media-item-details { min-width: 0; }
.media-item-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.media-item-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.media-preview-player { max-width: 140px; height: 32px; border-radius: 4px; }


/* ── CONFIGURAR LIVE — SPLIT LAYOUT ──────────────────── */
.config-split-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .config-split-layout {
    grid-template-columns: 1fr;
  }
}

.config-left-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.subnav-bar {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 4px;
  overflow-x: auto;
}

.subnav-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}

.subnav-btn:hover {
  background: rgba(255,255,255,.05);
  color: var(--text-primary);
}

.subnav-btn.active {
  background: rgba(99,102,241,.18);
  color: #fff;
  border-color: rgba(99,102,241,.4);
}

.subtab-pane {
  display: none;
  animation: fadeIn .25s ease;
}

.subtab-pane.active {
  display: block;
}

/* ── STICKY PREVIEW CARD ────────────────────────────── */
.config-right-panel {
  position: sticky;
  top: 10px;
}

.sticky-preview-card {
  margin-bottom: 0;
  border-color: rgba(99,102,241,.3);
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
}

.preview-controls-row {
  margin-top: 14px;
}

.preview-volume-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.preview-note {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 14px;
}

/* ── DYNAMIC PREVIEW OVERLAYS (CSS SIMULATION) ───────── */
.preview-banner-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(254,44,85,.85);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 -4px 12px rgba(0,0,0,.5);
}

.preview-banner-overlay span {
  display: inline-block;
  animation: bannerMarquee 8s linear infinite;
}

@keyframes bannerMarquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.preview-scanlines-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 6px 100%;
}

.preview-vignette-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(0,0,0,.8);
}

.preview-timer-overlay {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  padding: 4px 8px;
  border-radius: 6px;
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  cursor: move;
  user-select: none;
  z-index: 10;
}

.preview-offer-timer-overlay {
  position: absolute;
  top: 40%; left: 35%;
  background: rgba(254, 44, 85, 0.85);
  backdrop-filter: blur(4px);
  padding: 5px 10px;
  border-radius: 6px;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 4px 12px rgba(254,44,85,.5);
  cursor: move;
  user-select: none;
  z-index: 11;
}

.preview-chroma-overlay {
  position: absolute;
  width: 50%; height: auto;
  pointer-events: none;
  z-index: 9;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.glass-card-nested {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 12px;
}

.nested-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.slider-row label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── PREVIEW CAMOUFLAGE OVERLAY LAYERS ───────────── */
.preview-grain-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 0);
  background-size: 4px 4px;
  opacity: 0.35;
  animation: grainJitter .15s steps(2) infinite;
}
@keyframes grainJitter {
  0% { transform: translate(0,0); }
  50% { transform: translate(1px, 1px); }
  100% { transform: translate(-1px, 0); }
}

.preview-diagonal-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden;
}
.preview-diagonal-sweep-line {
  position: absolute; pointer-events: none; z-index: 6;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
}

.preview-floating-icon {
  position: absolute;
  font-size: 20px;
  pointer-events: none;
  z-index: 12;
  opacity: 0;
  transition: opacity 0.6s ease-in-out, top 3s ease-in-out, left 3s ease-in-out, transform 3s ease-in-out;
  filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.4));
}

.preview-scanlines-container {
  position: absolute; inset: 0; pointer-events: none; z-index: 8; overflow: hidden;
}
.preview-scanlines-glitch-line {
  position: absolute; left: 0; right: 0; height: 1px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 2px rgba(255, 255, 255, 0.3), 0 0 4px rgba(0, 225, 255, 0.2);
  pointer-events: none;
}

.preview-ghost-overlay {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; z-index: 4;
  mix-blend-mode: screen;
  filter: blur(0.4px);
  transform-origin: center center;
}

.preview-shadow-people-container {
  position: absolute; inset: 0; pointer-events: none; z-index: 7; overflow: hidden;
}
.preview-shadow-person-silhouette {
  position: absolute;
  width: 140px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  filter: blur(18px);
  pointer-events: none;
  opacity: 0.15;
}

/* ── MODAL DE CONFIRMAÇÃO / ALERTA CUSTOMIZADO (GLASSMORPHISM) ──── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.2s ease forwards;
}

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

.modal-card {
  background: rgba(18, 18, 26, 0.94);
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 25px rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-icon {
  font-size: 42px;
  margin-bottom: 12px;
  line-height: 1;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.modal-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 24px;
  white-space: pre-line;
}

.modal-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.modal-actions button {
  flex: 1;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
}

.kenburns-anim {
  animation: kenBurnsZoom 12s ease-in-out infinite alternate !important;
}
@keyframes kenBurnsZoom {
  0%   { transform: scale(1); }
  100% { transform: scale(1.08) translate(-1%, -1%); }
}

.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 640px) {
  .sidebar { display: none; }
  .main-content { width: 100%; }
}


