/* =========================================================
   RadioAdmin - Sistema Administrativo para Rádios
   CSS Moderno com Temas Personalizáveis
   ========================================================= */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --accent: #06b6d4;

  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #27354f;
  --bg-light: #f8fafc;
  --bg-sidebar: #111827;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border: #334155;
  --border-light: #475569;

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -4px rgba(0,0,0,0.4);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea {
  font-family: inherit;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.2); }
textarea { resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* UTILITIES */
.hidden { display: none !important; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.w-100 { width: 100%; }

/* LOGIN */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 50%, var(--bg-dark) 100%);
  position: relative;
  overflow: hidden;
}
.login-screen::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  top: -200px; right: -200px;
}
.login-screen::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 70%);
  bottom: -100px; left: -100px;
}
.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo i {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 12px;
  display: block;
}
.login-logo h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-logo p { color: var(--text-secondary); margin-top: 4px; }
.login-hint { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 16px; }

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
  margin-top: 8px;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(99,102,241,0.4); }

/* APP LAYOUT */
.app {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}
.sidebar-header {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.sidebar-header i {
  font-size: 28px;
  color: var(--primary);
}
.logo-text {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn-close-sidebar { display: none; margin-left: auto; color: var(--text-secondary); font-size: 18px; }

.sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  margin-bottom: 4px;
}
.nav-item i { width: 20px; text-align: center; font-size: 16px; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.1));
  color: var(--primary);
  border-left: 3px solid var(--primary);
}
.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 12px;
}
.preview-link { color: var(--primary) !important; }
.preview-link:hover { background: rgba(99,102,241,0.1) !important; }

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-top: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-muted); }
.btn-logout { margin-left: auto; color: var(--danger); font-size: 14px; padding: 6px; }
.btn-logout:hover { background: rgba(239,68,68,0.1); border-radius: 6px; }

/* MAIN CONTENT */
.main-content {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOP BAR */
.top-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.btn-menu { display: none; font-size: 20px; color: var(--text-secondary); padding: 8px; }
.top-bar-title { flex: 1; }
.top-bar-title h2 { font-size: 22px; font-weight: 700; }
.top-bar-title p { font-size: 13px; color: var(--text-secondary); }

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  gap: 8px;
}
.search-box i { color: var(--text-muted); font-size: 14px; }
.search-box input {
  background: transparent;
  border: none;
  padding: 10px 0;
  width: 200px;
  font-size: 14px;
}
.search-box input:focus { box-shadow: none; }
.search-box.sm input { width: 140px; }

.btn-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  position: relative;
  transition: var(--transition);
}
.btn-icon:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-icon .dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
}

.live-indicator {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border-color: rgba(239,68,68,0.3);
  width: auto;
  padding: 0 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  display: flex; align-items: center;
}
.live-indicator i { font-size: 10px; animation: pulse 1.5s infinite; }
.live-indicator.active { background: rgba(34,197,94,0.15); color: var(--success); border-color: rgba(34,197,94,0.3); }
.live-indicator.active i { animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* CONTENT AREA */
.content-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* SECTIONS */
.section { display: none; animation: fadeIn 0.3s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.page-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

/* BUTTONS */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(99,102,241,0.3); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}
.btn-sm:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-sm.success { background: rgba(34,197,94,0.15); color: var(--success); border-color: rgba(34,197,94,0.3); }
.btn-sm.danger { background: rgba(239,68,68,0.15); color: var(--danger); border-color: rgba(239,68,68,0.3); }

.btn-icon-sm { width: 32px; height: 32px; border-radius: 6px; color: var(--text-muted); }
.btn-icon-sm:hover { background: var(--bg-dark); color: var(--text-primary); }
.btn-icon-xs { width: 28px; height: 28px; border-radius: 50%; color: var(--text-muted); font-size: 11px; }
.btn-icon-xs:hover { background: var(--primary); color: white; }

.link-sm { font-size: 13px; color: var(--primary); }
.link-sm:hover { text-decoration: underline; }

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-light); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: white;
}
.stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.stat-icon.green { background: linear-gradient(135deg, #22c55e, #4ade80); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.stat-icon.purple { background: linear-gradient(135deg, #a855f7, #c084fc); }
.stat-info h3 { font-size: 24px; font-weight: 700; }
.stat-info p { font-size: 13px; color: var(--text-secondary); }
.stat-change {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 4px;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stat-change.neutral { color: var(--text-muted); }

/* CARDS */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card.large { grid-column: 1; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.card-header h3 i { color: var(--primary); }

/* NOW PLAYING */
.now-playing {
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.album-art {
  width: 80px; height: 80px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  color: white;
  position: relative;
  flex-shrink: 0;
}
.playing-animation {
  position: absolute;
  bottom: 8px; right: 8px;
  display: flex; align-items: flex-end; gap: 2px;
}
.playing-animation span {
  width: 3px;
  background: white;
  border-radius: 2px;
  animation: sound 1s ease-in-out infinite;
}
.playing-animation span:nth-child(1) { height: 8px; animation-delay: 0s; }
.playing-animation span:nth-child(2) { height: 14px; animation-delay: 0.2s; }
.playing-animation span:nth-child(3) { height: 10px; animation-delay: 0.4s; }
@keyframes sound { 0%, 100% { height: 6px; } 50% { height: 16px; } }

.track-info h4 { font-size: 16px; font-weight: 600; }
.track-info p { font-size: 13px; color: var(--text-secondary); }
.progress-bar {
  height: 4px;
  background: var(--bg-dark);
  border-radius: 2px;
  margin: 10px 0 6px;
  overflow: hidden;
}
.progress { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 2px; }
.track-time { font-size: 11px; color: var(--text-muted); }

.playlist-queue { padding: 0 20px 20px; }
.playlist-queue h5 { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.queue-item:last-child { border-bottom: none; }
.queue-num { color: var(--text-muted); width: 16px; font-size: 12px; }
.queue-title { flex: 1; color: var(--text-primary); }
.queue-artist { color: var(--text-secondary); font-size: 12px; }
.queue-time { color: var(--text-muted); font-size: 12px; }

/* SCHEDULE */
.schedule-today { padding: 0 20px 16px; }
.schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.schedule-item:last-child { border-bottom: none; }
.schedule-item .time { color: var(--text-muted); min-width: 90px; font-size: 12px; }
.schedule-item .name { flex: 1; font-weight: 600; }
.schedule-item .host { color: var(--text-secondary); min-width: 100px; text-align: right; }
.schedule-item .status {
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 700;
}
.schedule-item.done .status { color: var(--success); background: rgba(34,197,94,0.1); }
.schedule-item.active { background: rgba(99,102,241,0.05); margin: 0 -20px; padding: 12px 20px; border-radius: var(--radius-sm); }
.schedule-item.active .name { color: var(--primary); }
.schedule-item .status.live { color: var(--danger); background: rgba(239,68,68,0.1); animation: pulse 2s infinite; }

/* INTERACTIONS */
.interactions-list { padding: 0 20px 16px; }
.interaction-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.interaction-item:last-child { border-bottom: none; }
.interaction-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  flex-shrink: 0;
}
.interaction-content { flex: 1; }
.interaction-content p { font-size: 13px; }
.interaction-content p strong { color: var(--text-primary); }
.interaction-content em { color: var(--primary); }
.interaction-time { font-size: 11px; color: var(--text-muted); }
.interaction-type {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.interaction-type.music { background: rgba(99,102,241,0.15); color: var(--primary); }
.interaction-type.msg { background: rgba(59,130,246,0.15); color: var(--info); }
.interaction-type.poll { background: rgba(245,158,11,0.15); color: var(--warning); }

/* QUICK ACTIONS */
.quick-actions { padding: 0 20px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  transition: var(--transition);
}
.qa-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--primary); }
.qa-btn i { color: var(--primary); }

/* SCHEDULE TABLE */
.schedule-table-container { padding: 0 20px 20px; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left;
  padding: 12px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 8px; vertical-align: top; }
.time-col {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  padding-top: 16px !important;
}
.program-block {
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.program-block small { font-weight: 400; opacity: 0.8; display: block; margin-top: 2px; }
.program-block:hover { transform: scale(1.02); }
.program-block.morning { background: rgba(245,158,11,0.15); color: #fbbf24; }
.program-block.pop { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.program-block.classic { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.program-block.mix { background: rgba(236,72,153,0.15); color: #f9a8d4; }
.program-block.rock { background: rgba(239,68,68,0.15); color: #fca5a5; }
.program-block.sertanejo { background: rgba(249,115,22,0.15); color: #fdba74; }
.program-block.weekend { background: rgba(6,182,212,0.15); color: #67e8f9; }

/* FILTER TABS */
.filter-tabs { display: flex; gap: 4px; }
.tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  transition: var(--transition);
}
.tab.active { background: var(--primary); color: white; }
.tab:hover:not(.active) { background: rgba(255,255,255,0.05); color: var(--text-primary); }

/* PLAYLISTS */
.playlists-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0 20px 20px;
}
.playlist-card {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
}
.playlist-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow); }
.playlist-card.add-new { border-style: dashed; text-align: center; }
.playlist-card.add-new:hover { border-color: var(--primary); }
.playlist-cover {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  color: white;
  margin-bottom: 12px;
}
.playlist-card.add-new .playlist-cover { background: transparent; color: var(--text-muted); font-size: 32px; }
.playlist-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.playlist-card p { font-size: 12px; color: var(--text-muted); }

.songs-list { padding: 0 20px 20px; }
.song-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.song-item:last-child { border-bottom: none; }
.song-num { color: var(--text-muted); font-size: 12px; width: 20px; }
.song-info { flex: 1; }
.song-title { font-size: 13px; font-weight: 500; }
.song-artist { font-size: 12px; color: var(--text-muted); }
.song-duration { font-size: 12px; color: var(--text-muted); }

/* HOSTS */
.hosts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.host-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}
.host-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-light); }
.host-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  color: white;
  margin: 0 auto 12px;
}
.host-card h4 { font-size: 16px; font-weight: 600; }
.host-role { font-size: 13px; color: var(--primary); margin-top: 4px; }
.host-program { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.host-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.host-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

/* ADS */
.ads-list { padding: 0 20px 16px; }
.ad-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.ad-item:last-child { border-bottom: none; }
.ad-logo {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.ad-info { flex: 1; }
.ad-info h4 { font-size: 14px; font-weight: 600; }
.ad-info p { font-size: 12px; color: var(--text-secondary); }
.ad-status {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-top: 4px;
}
.ad-status.active { background: rgba(34,197,94,0.15); color: var(--success); }
.ad-status.pending { background: rgba(245,158,11,0.15); color: var(--warning); }
.ad-meta { text-align: right; }
.ad-meta p { font-size: 14px; font-weight: 600; }
.ad-meta span { font-size: 11px; color: var(--text-muted); }

/* REVENUE CHART */
.revenue-chart { padding: 20px; display: flex; align-items: center; gap: 24px; }
.donut-chart { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.donut-chart svg { width: 100%; height: 100%; }
.donut-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.donut-value { display: block; font-size: 16px; font-weight: 700; }
.donut-label { display: block; font-size: 11px; color: var(--text-muted); }
.revenue-legend { flex: 1; }
.rev-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.rev-item span { width: 12px; height: 12px; border-radius: 3px; }

/* NEWS */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card.add-new { border-style: dashed; cursor: pointer; }
.news-card.add-new:hover { border-color: var(--primary); }
.news-image {
  height: 140px;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 12px;
}
.news-category {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}
.news-content { padding: 16px; }
.news-content h4 { font-size: 15px; font-weight: 600; line-height: 1.4; }
.news-content p { font-size: 13px; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }
.news-meta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
}
.news-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

/* REQUESTS */
.requests-list { padding: 0 20px 16px; }
.request-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.request-item:last-child { border-bottom: none; }
.request-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  flex-shrink: 0;
}
.request-info { flex: 1; }
.request-info h4 { font-size: 14px; font-weight: 600; }
.request-info p { font-size: 13px; color: var(--text-secondary); }
.request-info p strong { color: var(--primary); }
.request-time { font-size: 11px; color: var(--text-muted); }
.request-actions { display: flex; gap: 8px; }
.badge-success {
  background: rgba(34,197,94,0.15);
  color: var(--success);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* POLL */
.poll-content { padding: 0 20px 20px; }
.poll-content h4 { font-size: 14px; margin-bottom: 16px; }
.poll-option {
  position: relative;
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  height: 36px;
  margin-bottom: 10px;
  overflow: hidden;
  display: flex; align-items: center;
}
.poll-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0.3;
  border-radius: var(--radius-sm);
}
.poll-label {
  position: relative;
  z-index: 1;
  padding: 0 14px;
  font-size: 13px;
  display: flex; justify-content: space-between; width: 100%;
}
.poll-label strong { color: var(--primary); }
.poll-total { font-size: 12px; color: var(--text-muted); margin-top: 12px; text-align: center; }

/* MESSAGES */
.messages-list { padding: 0 20px 16px; }
.message-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.message-item:last-child { border-bottom: none; }
.message-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  flex-shrink: 0;
}
.message-content h4 { font-size: 13px; font-weight: 600; }
.message-time { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-left: 8px; }
.message-content p { font-size: 13px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }

/* CHART BARS */
.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 20px;
  height: 220px;
  gap: 12px;
}
.bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.bar {
  width: 100%;
  max-width: 50px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 6px 6px 0 0;
  min-height: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  transition: var(--transition);
  position: relative;
}
.bar:hover { opacity: 0.85; }
.bar span {
  font-size: 10px;
  font-weight: 700;
  color: white;
}
.bar-group label { font-size: 11px; color: var(--text-muted); }

/* TOP SONGS */
.top-songs { padding: 0 20px 16px; }
.top-song {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.top-song:last-child { border-bottom: none; }
.rank {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--text-muted);
}
.top-song:nth-child(1) .rank { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; }
.top-song:nth-child(2) .rank { background: linear-gradient(135deg, #94a3b8, #64748b); color: white; }
.top-song:nth-child(3) .rank { background: linear-gradient(135deg, #cd7f32, #b87333); color: white; }
.top-song-info { flex: 1; }
.top-song-info p { font-size: 13px; font-weight: 500; }
.top-song-info small { font-size: 12px; color: var(--text-muted); }
.top-song-plays { font-size: 12px; color: var(--primary); font-weight: 600; }

/* THEME SETTINGS */
.theme-options { padding: 0 20px 20px; }
.theme-options h4 { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.color-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.color-preset {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}
.color-preset:hover { transform: scale(1.05); }
.color-preset.active { border-color: white; box-shadow: 0 0 0 2px var(--primary); }
.color-preset .check {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 16px;
  opacity: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.color-preset.active .check { opacity: 1; }

.color-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.color-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-dark);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.color-input-group label { font-size: 12px; color: var(--text-secondary); min-width: 80px; }
.color-input-group input[type="color"] {
  width: 36px; height: 36px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
  background: transparent;
}
.color-input-group input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input-group input[type="color"]::-webkit-color-swatch { border: none; border-radius: 4px; }
.color-input-group span { font-size: 12px; color: var(--text-muted); font-family: monospace; }

/* LOGO UPLOAD */
.logo-upload { padding: 0 20px 20px; }
.logo-upload input[type="file"] { display: none; }
.logo-preview {
  width: 100%;
  height: 180px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}
.logo-preview:hover { border-color: var(--primary); background: rgba(99,102,241,0.05); }
.logo-preview.has-logo { border-style: solid; border-color: var(--primary); }
.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 12px;
}
.logo-placeholder {
  text-align: center;
  color: var(--text-muted);
}
.logo-placeholder i { font-size: 36px; margin-bottom: 8px; display: block; color: var(--text-secondary); }
.logo-placeholder p { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.logo-placeholder span { font-size: 11px; }

/* FAVICON PREVIEW */
.favicon-preview {
  width: 100%;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}
.favicon-preview:hover { border-color: var(--primary); background: rgba(99,102,241,0.05); }
.favicon-preview.has-logo { border-style: solid; border-color: var(--primary); }
.favicon-preview img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  padding: 8px;
  border-radius: 8px;
  background: var(--bg-light);
}

.logo-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: center;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.sidebar-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}
.login-logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 12px;
}

/* SETTINGS */
.settings-list { padding: 0 20px 16px; }
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.setting-item:last-child { border-bottom: none; }
.setting-item h4 { font-size: 14px; font-weight: 600; }
.setting-item p { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.toggle {
  position: relative;
  width: 48px; height: 26px;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 26px;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px; width: 20px;
  left: 2px; bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--primary); border-color: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); background: white; }

/* USERS */
.users-list { padding: 0 20px 16px; }
.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.user-row:last-child { border-bottom: none; }
.user-info { flex: 1; }
.user-info h4 { font-size: 14px; font-weight: 600; }
.user-info p { font-size: 12px; color: var(--text-muted); }
.role-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(99,102,241,0.15);
  color: var(--primary);
  font-weight: 700;
  margin-top: 4px;
}
.role-badge.admin { background: rgba(245,158,11,0.15); color: var(--warning); }

/* FORMS */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text-secondary); }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form-section { padding: 0 20px 20px; }

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%; max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 201;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}
.modal.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.modal-header h3 i { color: var(--primary); }
.btn-close { color: var(--text-muted); font-size: 18px; padding: 4px; }
.btn-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast i { color: var(--success); font-size: 18px; }

/* CHART CONTAINER */
.chart-container { padding: 16px 20px 20px; }
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.dot-primary, .dot-secondary {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot-primary { background: var(--primary); }
.dot-secondary { background: var(--secondary); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .card.large { grid-column: auto; }
  .playlists-grid, .hosts-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .btn-menu { display: block; }
  .btn-close-sidebar { display: block; }
  .stats-grid { grid-template-columns: 1fr; }
  .playlists-grid, .hosts-grid, .news-grid { grid-template-columns: 1fr; }
  .search-box { display: none; }
  .top-bar-title h2 { font-size: 18px; }
  .form-row { grid-template-columns: 1fr; }
  .color-presets { grid-template-columns: repeat(3, 1fr); }
  .color-custom { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-sidebar: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #cbd5e1;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.06);
}

[data-theme="light"] body {
  background: var(--bg-dark);
  color: var(--text-primary);
}

[data-theme="light"] .sidebar,
[data-theme="light"] .mobile-menu {
  background: var(--bg-sidebar);
  box-shadow: 4px 0 15px rgba(0,0,0,0.06);
}

[data-theme="light"] .nav-item:hover,
[data-theme="light"] .mobile-menu-item:hover {
  background: rgba(99,102,241,0.06);
}

[data-theme="light"] .stat-card,
[data-theme="light"] .card,
[data-theme="light"] .login-box,
[data-theme="light"] .search-box,
[data-theme="light"] .modal,
[data-theme="light"] .player-bar,
[data-theme="light"] .program-guide,
[data-theme="light"] .chat-container {
  background: var(--bg-card);
}

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: var(--text-muted);
}

[data-theme="light"] .table-header {
  background: var(--bg-dark);
}

[data-theme="light"] .table-row:hover {
  background: rgba(99,102,241,0.04);
}

[data-theme="light"] .logo-preview,
[data-theme="light"] .favicon-preview,
[data-theme="light"] .color-input-group,
[data-theme="light"] .qa-btn,
[data-theme="light"] .poll-option,
[data-theme="light"] .rank,
[data-theme="light"] .search-box {
  background: var(--bg-dark);
}

[data-theme="light"] .toggle-slider {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

[data-theme="light"] .login-screen {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
}

[data-theme="light"] .login-screen::before {
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
}

/* ===== THEME MODE OPTIONS ===== */
.theme-mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px 20px;
}

.theme-mode-option {
  cursor: pointer;
}

.theme-mode-option input {
  display: none;
}

.mode-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  transition: var(--transition);
  text-align: center;
}

.mode-box i {
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mode-box strong {
  font-size: 14px;
  color: var(--text-primary);
}

.mode-box small {
  font-size: 11px;
  color: var(--text-muted);
}

.theme-mode-option input:checked + .mode-box {
  border-color: var(--primary);
  background: rgba(99,102,241,0.08);
}

.theme-mode-option input:checked + .mode-box i {
  color: var(--primary);
}

/* ===== INPUT WITH BUTTON ===== */
.input-with-btn {
  display: flex;
  gap: 8px;
}

.input-with-btn input {
  flex: 1;
}

.input-with-btn .btn-primary {
  padding: 10px 16px;
  white-space: nowrap;
}

/* ===== VIDEO LIST ===== */
.video-list {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.video-item:hover {
  border-color: var(--border-light);
}

.video-thumb {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb i {
  font-size: 20px;
  color: var(--text-muted);
}

.video-info {
  flex: 1;
  min-width: 0;
}

.video-info p {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-info small {
  font-size: 11px;
  color: var(--text-muted);
}

.video-item .btn-icon-sm {
  flex-shrink: 0;
}

/* ===== BADGE MODULE ===== */
.badge-module {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-left: 8px;
}

.badge-module.on {
  background: rgba(34,197,94,0.15);
  color: var(--success);
}

.badge-module.off {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
}

/* ===== RESPONSIVE EXTRAS ===== */
@media (max-width: 768px) {
  .theme-mode-options {
    grid-template-columns: 1fr;
  }
  .video-thumb {
    width: 60px;
    height: 45px;
  }
}
