:root {
  --bg-main: #f4f5fa;
  --bg-sidebar: #12132b;
  --bg-card: #ffffff;
  --pink-accent: #ff2d75;
  --purple-accent: #7c3aed;
  --gradient-brand: linear-gradient(135deg, #7c3aed 0%, #ff2d75 100%);
  --text-main: #1a1b2e;
  --text-muted: #8b8da3;
  --border-soft: #eceef5;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }
body { background: var(--bg-main); color: var(--text-main); }
a { text-decoration: none; color: inherit; }

.admin-wrapper { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: 260px; background: var(--bg-sidebar); color: #fff; flex-shrink: 0;
  display: flex; flex-direction: column; padding: 1.5rem 1rem;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 0.5rem 1.5rem; }
.sidebar-brand .logo-icon {
  width: 38px; height: 38px; border-radius: 10px; background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; }
.brand-text .brand-name { font-size: 0.95rem; font-weight: 600; text-transform: uppercase; }
.brand-text .brand-name strong { color: var(--pink-accent); }
.brand-text small { color: var(--text-muted); font-size: 0.65rem; }

.user-profile {
  display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.05);
  border-radius: 12px; padding: 0.7rem; margin-bottom: 1.3rem;
}
.user-profile img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.user-profile h4 { font-size: 0.85rem; }
.status-online { font-size: 0.7rem; color: #4ade80; }
.profile-chevron { margin-left: auto; font-size: 0.7rem; color: var(--text-muted); }

.sidebar-menu { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sidebar-menu a {
  display: flex; align-items: center; gap: 10px; padding: 0.65rem 0.7rem; border-radius: 10px;
  font-size: 0.83rem; color: #c7c9dc; transition: 0.2s;
}
.sidebar-menu a i { width: 16px; text-align: center; font-size: 0.85rem; }
.sidebar-menu a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-menu a.active { background: var(--gradient-brand); color: #fff; }
.sidebar-menu a .badge {
  margin-left: auto; background: rgba(255,255,255,0.12); color: #fff; font-size: 0.65rem;
  padding: 2px 8px; border-radius: 10px; font-weight: 700;
}
.sidebar-menu a.active .badge { background: rgba(255,255,255,0.25); }
.menu-label { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 1px; margin: 0.9rem 0.7rem 0.3rem; }

.sidebar-footer { padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-footer a { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: #c7c9dc; padding: 0.5rem 0.7rem; }

/* MAIN AREA */
.main-body { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 1rem; background: #fff; padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; z-index: 10;
}
.topbar h2 { font-size: 1.05rem; }
.topbar-menu-btn { display: none; background: none; border: none; font-size: 1.2rem; cursor: pointer; }
.topbar-right { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.bell-wrapper { position: relative; }
.icon-bell { font-size: 1.1rem; color: var(--text-muted); }
.bell-count {
  position: absolute; top: -6px; right: -8px; background: var(--pink-accent); color: #fff;
  font-size: 0.6rem; font-weight: 700; padding: 1px 5px; border-radius: 8px;
}
.admin-name { font-size: 0.85rem; font-weight: 600; }
.admin-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.content { padding: 2rem; }
.page-title { font-size: 1.6rem; margin-bottom: 0.3rem; }
.page-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.6rem; }

/* KPI CARDS */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.kpi-card {
  background: var(--bg-card); border-radius: 14px; padding: 1.1rem; display: flex; gap: 12px;
  align-items: flex-start; box-shadow: 0 2px 10px rgba(20,20,60,0.04); border: 1px solid var(--border-soft);
}
.kpi-icon {
  width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem; flex-shrink: 0;
}
.kpi-icon.purple { background: #7c3aed; }
.kpi-icon.blue { background: #3b82f6; }
.kpi-icon.green { background: #22c55e; }
.kpi-icon.orange { background: #f97316; }
.kpi-icon.pink { background: #ff2d75; }
.kpi-body p { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.5px; margin-bottom: 4px; }
.kpi-body h3 { font-size: 1.35rem; }
.kpi-change { font-size: 0.72rem; font-weight: 600; }
.kpi-change.up { color: #22c55e; }
.kpi-change.up::before { content: "↑ "; }

/* DASHBOARD GRID */
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.2rem; margin-bottom: 1.2rem; }
.dashboard-grid-3 { grid-template-columns: 1.4fr 1fr; }
.card {
  background: var(--bg-card); border-radius: 14px; padding: 1.3rem; border: 1px solid var(--border-soft);
  box-shadow: 0 2px 10px rgba(20,20,60,0.04);
}
.card.full-width { grid-column: 1 / -1; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-header h3 { font-size: 0.95rem; }
.range-select { border: 1px solid var(--border-soft); border-radius: 8px; padding: 6px 10px; font-size: 0.78rem; color: var(--text-muted); }
.link-see-all-admin { font-size: 0.78rem; color: var(--pink-accent); font-weight: 600; }

.badge-live-tag { background: rgba(255, 45, 117, 0.12); color: var(--pink-accent); font-size: 0.68rem; font-weight: 700; padding: 4px 10px; border-radius: 12px; }
.stream-info { display: flex; gap: 12px; align-items: center; margin-bottom: 1rem; }
.stream-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.stream-info h4 { font-size: 0.95rem; }
.stream-info p { font-size: 0.8rem; color: var(--text-muted); }
.on-air-time { font-size: 0.72rem; color: var(--purple-accent); font-weight: 600; }
.stream-stats { display: flex; gap: 1.5rem; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1rem; }
.stream-stats strong { display: block; color: var(--text-main); font-size: 0.95rem; margin-top: 2px; }
.btn-action {
  width: 100%; background: var(--gradient-brand); color: #fff; border: none; padding: 10px;
  border-radius: 10px; font-weight: 700; font-size: 0.82rem; cursor: pointer;
}
.btn-danger {
  width: 100%; background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; padding: 10px;
  border-radius: 10px; font-weight: 700; font-size: 0.82rem; cursor: pointer; margin-top: 0.6rem;
}

/* ACTIVITÉS */
.activity-list { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 0.8rem; }
.activity-list li { display: flex; gap: 10px; align-items: flex-start; }
.activity-icon {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.8rem; flex-shrink: 0;
}
.activity-icon.purple { background: #7c3aed; }
.activity-icon.blue { background: #3b82f6; }
.activity-icon.pink { background: #ff2d75; }
.activity-icon.green { background: #22c55e; }
.activity-icon.orange { background: #f97316; }
.activity-text { font-size: 0.82rem; font-weight: 600; }
.activity-detail { font-size: 0.76rem; color: var(--text-muted); }
.activity-time { font-size: 0.7rem; color: var(--text-muted); margin-left: auto; white-space: nowrap; }

/* STATUS */
.status-details p { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-muted); padding: 0.5rem 0; border-bottom: 1px solid var(--border-soft); }
.status-details p strong { color: var(--text-main); }
.badge-status-online { background: #ecfdf3; color: #22c55e; font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 12px; }
.text-green { color: #22c55e; }

/* LISTS WITH ACTIONS (podcasts / articles) */
.list-with-actions { display: flex; flex-direction: column; gap: 0.7rem; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 0.5rem 0; border-bottom: 1px solid var(--border-soft); }
.list-row:last-child { border-bottom: none; }
.list-row img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.list-row-info { flex: 1; min-width: 0; }
.list-row-info h4 { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row-info span { font-size: 0.72rem; color: var(--text-muted); }
.list-row-meta { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.row-actions { display: flex; gap: 8px; }
.row-actions button { width: 28px; height: 28px; border-radius: 8px; border: none; cursor: pointer; font-size: 0.75rem; }
.row-actions .edit-btn { background: #eef2ff; color: #6366f1; }
.row-actions .delete-btn { background: #fef2f2; color: #ef4444; }

/* CALENDAR */
.week-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.8rem; }
.day-col { background: #fafafe; border-radius: 10px; padding: 0.8rem; border: 1px solid var(--border-soft); }
.day-col h5 { font-size: 0.78rem; margin-bottom: 0.6rem; }
.day-slot { font-size: 0.72rem; margin-bottom: 0.5rem; }
.day-slot .slot-time { color: var(--purple-accent); font-weight: 700; display: block; }
.day-slot .slot-title { display: flex; align-items: center; gap: 4px; }
.day-slot .slot-title::before { content: "●"; color: var(--pink-accent); font-size: 0.5rem; }
.day-slot .slot-host { color: var(--text-muted); }

.admin-footer { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.78rem; margin-top: 1.5rem; }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid, .dashboard-grid-3 { grid-template-columns: 1fr; }
  .week-calendar { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .sidebar { position: fixed; left: -280px; top: 0; bottom: 0; z-index: 50; transition: 0.3s; }
  .sidebar.open { left: 0; }
  .topbar-menu-btn { display: block; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .week-calendar { grid-template-columns: repeat(2, 1fr); }
}
