/* ============================================================
   Timeline Radio Admin Panel - Main Stylesheet
   Colors inspired by timelineradio.co.za
   ============================================================ */

:root {
    --primary:       #e8001e;
    --primary-dark:  #b8001a;
    --primary-light: #ff1f3d;
    --accent:        #ff6b00;
    --accent-light:  #ff8c38;
    --bg-dark:       #0b0b0f;
    --bg-card:       #131318;
    --bg-sidebar:    #0d0d12;
    --bg-input:      #1a1a24;
    --border:        #2a2a38;
    --text-primary:  #f0f0f5;
    --text-secondary:#9494a8;
    --text-muted:    #5a5a72;
    --success:       #22c55e;
    --warning:       #f59e0b;
    --danger:        #ef4444;
    --info:          #3b82f6;
    --sidebar-width: 260px;
    --header-height: 65px;
    --radius:        10px;
    --radius-lg:     16px;
    --shadow:        0 4px 24px rgba(0,0,0,0.45);
    --shadow-lg:     0 8px 40px rgba(0,0,0,0.6);
    --glow-red:      0 0 20px rgba(232,0,30,0.3);
    --glow-orange:   0 0 20px rgba(255,107,0,0.3);
    --transition:    all 0.25s cubic-bezier(0.4,0,0.2,1);
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ══════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    background-image:
        radial-gradient(ellipse 800px 600px at 20% 50%, rgba(232,0,30,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 600px 500px at 80% 30%, rgba(255,107,0,0.05) 0%, transparent 60%);
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content:'';
    position:absolute;
    top:0; left:0; right:0;
    height:3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo .logo-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: var(--glow-red);
    font-size: 28px;
}

.login-logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

/* ── Form Controls ─────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.form-control, .form-select, textarea.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 11px 14px;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-control:focus, .form-select:focus, textarea.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232,0,30,0.15);
    background: #1e1e2a;
}

.form-control::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-card); }

textarea.form-control { resize: vertical; min-height: 90px; }

/* ── Buttons ──────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(232,0,30,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(232,0,30,0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(255,107,0,0.3);
}
.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,107,0,0.4);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, var(--success));
    color: #fff;
}
.btn-success:hover { transform: translateY(-1px); filter: brightness(1.1); }

.btn-danger {
    background: linear-gradient(135deg, #dc2626, var(--danger));
    color: #fff;
}
.btn-danger:hover { transform: translateY(-1px); filter: brightness(1.1); }

.btn-warning {
    background: linear-gradient(135deg, #d97706, var(--warning));
    color: #fff;
}
.btn-warning:hover { transform: translateY(-1px); filter: brightness(1.1); }

.btn-secondary {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--text-primary); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ══════════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════════ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 1000;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar-brand {
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--glow-red);
    flex-shrink: 0;
}

.brand-text h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-text span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }

.nav-section-label {
    padding: 8px 20px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.nav-item {
    margin: 2px 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: rgba(232,0,30,0.08);
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(232,0,30,0.2), rgba(255,107,0,0.1));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--primary);
}

.nav-link .nav-icon {
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-link .nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--bg-input);
    border: 1px solid var(--border);
}

.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-info .name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info .role { font-size: 11px; color: var(--text-muted); }

.logout-btn {
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.logout-btn:hover { color: var(--danger); }

/* ── Main Content ─────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Top Header ───────────────────────────────── */
.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.page-title-area h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-title-area .breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    list-style: none;
    margin-top: 2px;
    padding: 0;
}
.breadcrumb li + li::before { content: '/'; margin-right: 6px; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .active { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.header-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 12px;
    color: var(--text-secondary);
}

.live-dot {
    width: 8px; height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%,100% { opacity:1; transform: scale(1); }
    50%      { opacity:0.6; transform: scale(0.8); }
}

/* ── Page Content ─────────────────────────────── */
.page-content {
    padding: 28px;
    flex: 1;
}

/* ══════════════════════════════════════════════════
   STATS CARDS
══════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content:'';
    position:absolute;
    bottom:0; left:0; right:0;
    height:2px;
    opacity:0;
    transition: var(--transition);
}
.stat-card:hover { border-color: rgba(232,0,30,0.4); transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card:hover::after { opacity:1; }

.stat-card.red   .stat-icon { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: var(--glow-red); }
.stat-card.red::after   { background: var(--primary); }
.stat-card.orange .stat-icon { background: linear-gradient(135deg, var(--accent), #cc5500); box-shadow: var(--glow-orange); }
.stat-card.orange::after { background: var(--accent); }
.stat-card.green  .stat-icon { background: linear-gradient(135deg, #16a34a, var(--success)); box-shadow: 0 0 20px rgba(34,197,94,0.3); }
.stat-card.green::after  { background: var(--success); }
.stat-card.blue   .stat-icon { background: linear-gradient(135deg, #1d4ed8, var(--info)); box-shadow: 0 0 20px rgba(59,130,246,0.3); }
.stat-card.blue::after   { background: var(--info); }
.stat-card.purple .stat-icon { background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: 0 0 20px rgba(168,85,247,0.3); }
.stat-card.purple::after { background: #a855f7; }

.stat-icon {
    width: 54px; height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    color: #fff;
}

.stat-info { flex: 1; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-change { font-size: 11px; margin-top: 4px; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ══════════════════════════════════════════════════
   CARDS / PANELS
══════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 .card-icon {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.card-body { padding: 22px; }
.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.15);
}

/* ══════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

table.data-table thead tr {
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid var(--border);
}

table.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    white-space: nowrap;
}

table.data-table td {
    padding: 13px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(42,42,56,0.6);
    vertical-align: middle;
}

table.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
table.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Table Elements ──────────────────────────── */
.thumb-sm {
    width: 44px; height: 44px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.thumb-placeholder {
    width: 44px; height: 44px;
    border-radius: 8px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 18px;
    border: 1px solid var(--border);
}

.staff-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.staff-avatar-placeholder {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.name-cell { font-weight: 600; color: var(--text-primary); }
.sub-cell  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Badges ──────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success { background: rgba(34,197,94,0.15);  color: var(--success); }
.badge-danger  { background: rgba(239,68,68,0.15);   color: var(--danger);  }
.badge-warning { background: rgba(245,158,11,0.15);  color: var(--warning); }
.badge-info    { background: rgba(59,130,246,0.15);  color: var(--info);    }
.badge-primary { background: rgba(232,0,30,0.15);    color: var(--primary); }
.badge-accent  { background: rgba(255,107,0,0.15);   color: var(--accent);  }
.badge-purple  { background: rgba(168,85,247,0.15);  color: #a855f7;        }
.badge-gray    { background: rgba(148,148,168,0.15); color: var(--text-secondary); }

/* ── Action Buttons ──────────────────────────── */
.action-btns { display: flex; align-items: center; gap: 6px; }

.btn-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: var(--transition);
    background: var(--bg-input);
    color: var(--text-secondary);
    text-decoration: none;
}
.btn-icon:hover { color: var(--text-primary); }
.btn-icon.edit:hover  { border-color: var(--warning); color: var(--warning); background: rgba(245,158,11,0.1); }
.btn-icon.delete:hover{ border-color: var(--danger);  color: var(--danger);  background: rgba(239,68,68,0.1);  }
.btn-icon.view:hover  { border-color: var(--info);    color: var(--info);    background: rgba(59,130,246,0.1); }

/* ══════════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.97);
    transition: var(--transition);
    position: relative;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-lg { max-width: 750px; }
.modal-sm { max-width: 440px; }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}
.modal-header::before {
    content:'';
    position:absolute;
    top:0;left:0;right:0;
    height:2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}
.modal-close:hover { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,0.1); }

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(0,0,0,0.1);
}

/* ══════════════════════════════════════════════════
   FORM HELPERS
══════════════════════════════════════════════════ */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.col-full { grid-column: 1 / -1; }

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 5px; display: none; }
.form-error.show { display: block; }

/* File Upload */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: rgba(232,0,30,0.05);
}
.upload-area input[type="file"] { display: none; }
.upload-area .upload-icon { font-size: 32px; color: var(--text-muted); margin-bottom: 10px; }
.upload-area p { color: var(--text-muted); font-size: 13px; }
.upload-area strong { color: var(--primary); }
.upload-preview {
    margin-top: 12px;
    position: relative;
    display: inline-block;
}
.upload-preview img {
    max-width: 200px;
    max-height: 120px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
}
.upload-preview .remove-preview {
    position: absolute;
    top: -8px; right: -8px;
    width: 22px; height: 22px;
    background: var(--danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    border: none;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-chip input[type="checkbox"] { display: none; }
.checkbox-chip label {
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    user-select: none;
}
.checkbox-chip input:checked + label {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(232,0,30,0.3);
}

/* Multi-select hosts */
.hosts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
}

.host-chip { position: relative; }
.host-chip input[type="checkbox"] { display: none; }
.host-chip label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-input);
}
.host-chip input:checked + label {
    border-color: var(--primary);
    background: rgba(232,0,30,0.12);
    box-shadow: 0 0 0 2px rgba(232,0,30,0.2);
}
.host-chip label .check-mark {
    position: absolute;
    top: -4px; right: -4px;
    width: 18px; height: 18px;
    background: var(--primary);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
}
.host-chip input:checked ~ .check-mark { display: flex; }
.host-chip .host-name { font-size: 12px; font-weight: 500; color: var(--text-primary); }
.host-chip .host-role { font-size: 11px; color: var(--text-muted); }

.max-hosts-note { font-size: 11px; color: var(--accent); margin-top: 6px; }

/* ══════════════════════════════════════════════════
   SCHEDULE GRID
══════════════════════════════════════════════════ */
.schedule-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 6px;
}

.day-column {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.day-header {
    background: linear-gradient(135deg, rgba(232,0,30,0.2), rgba(255,107,0,0.1));
    padding: 10px 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.day-shows { padding: 8px; min-height: 120px; }

.schedule-slot {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 11px;
    transition: var(--transition);
    cursor: pointer;
}
.schedule-slot:hover { border-left-color: var(--accent); transform: translateX(2px); }
.schedule-slot .slot-show { font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-slot .slot-time { color: var(--text-muted); margin-top: 3px; }

.schedule-slot.color-1 { border-left-color: var(--primary);  }
.schedule-slot.color-2 { border-left-color: var(--accent);   }
.schedule-slot.color-3 { border-left-color: var(--success);  }
.schedule-slot.color-4 { border-left-color: var(--info);     }
.schedule-slot.color-5 { border-left-color: #a855f7;          }
.schedule-slot.color-6 { border-left-color: var(--warning);  }

.empty-day { color: var(--text-muted); font-size: 11px; text-align: center; padding: 20px 8px; }

/* ══════════════════════════════════════════════════
   EVENTS GRID
══════════════════════════════════════════════════ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}
.event-card:hover { border-color: rgba(232,0,30,0.4); transform: translateY(-3px); box-shadow: var(--shadow); }

.event-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.event-img-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, rgba(232,0,30,0.1), rgba(255,107,0,0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: var(--text-muted);
}

.event-card-body { padding: 16px; }
.event-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.event-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.event-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ══════════════════════════════════════════════════
   SETTINGS
══════════════════════════════════════════════════ */
.settings-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    padding-bottom: 0;
}

.settings-tab {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    transition: var(--transition);
    background: transparent;
    margin-bottom: -1px;
}
.settings-tab:hover { color: var(--text-primary); }
.settings-tab.active {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--primary);
    border-bottom-color: var(--bg-card);
}

.settings-panel { display: none; }
.settings-panel.active { display: block; }

.settings-section { margin-bottom: 28px; }
.settings-section h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.stream-type-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.stream-type-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-input);
}
.stream-type-btn.active {
    border-color: var(--primary);
    background: rgba(232,0,30,0.1);
    color: var(--primary);
}
.stream-type-btn .type-icon { font-size: 24px; margin-bottom: 6px; }
.stream-type-btn .type-name { font-weight: 700; font-size: 13px; }
.stream-type-btn .type-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ══════════════════════════════════════════════════
   ALERTS & TOASTS
══════════════════════════════════════════════════ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid;
}
.alert-success { background: rgba(34,197,94,0.1);  border-color: rgba(34,197,94,0.3);  color: var(--success); }
.alert-danger   { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3);  color: var(--danger);  }
.alert-warning  { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); color: var(--warning); }
.alert-info     { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: var(--info);    }

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
    border-left: 4px solid;
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger);  }
.toast.warning { border-left-color: var(--warning); }
.toast.info    { border-left-color: var(--info);    }

.toast-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--danger);  }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info    .toast-icon { color: var(--info);    }

.toast-body { flex: 1; }
.toast-title { font-weight: 700; font-size: 13px; color: var(--text-primary); margin-bottom: 2px; }
.toast-msg   { font-size: 12px; color: var(--text-secondary); }
.toast-close { cursor: pointer; color: var(--text-muted); font-size: 16px; flex-shrink: 0; margin-top:1px; border:none; background:none; }
.toast-close:hover { color: var(--text-primary); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(110%); opacity: 0; }
}

/* ══════════════════════════════════════════════════
   SEARCH & TOOLBAR
══════════════════════════════════════════════════ */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}
.search-box .search-icon {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}
.search-box input {
    padding-left: 36px;
}

/* ══════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════ */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 52px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 17px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; max-width: 300px; margin: 0 auto 20px; }

/* ══════════════════════════════════════════════════
   RECENT ACTIVITY
══════════════════════════════════════════════════ */
.activity-list { list-style: none; }
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(42,42,56,0.6);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.activity-info { flex: 1; }
.activity-info .action { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.activity-info .action strong { color: var(--primary); }
.activity-info .time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════════
   LOADING
══════════════════════════════════════════════════ */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════════ */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    padding-top: 16px;
}
.page-btn {
    width: 34px; height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.page-btn:hover     { border-color: var(--primary); color: var(--primary); }
.page-btn.active    { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled  { opacity: 0.4; cursor: not-allowed; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .schedule-week { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main-content { margin-left: 0; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .schedule-week { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .page-content { padding: 16px; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .schedule-week { grid-template-columns: 1fr; }
    .events-grid { grid-template-columns: 1fr; }
}

/* ── Utils ─────────────────────────────────────── */
.d-flex        { display: flex; }
.align-center  { align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-8         { gap: 8px; }
.gap-12        { gap: 12px; }
.mt-4          { margin-top: 4px; }
.mt-8          { margin-top: 8px; }
.mt-16         { margin-top: 16px; }
.mt-24         { margin-top: 24px; }
.mb-16         { margin-bottom: 16px; }
.mb-24         { margin-bottom: 24px; }
.text-primary  { color: var(--primary) !important; }
.text-muted    { color: var(--text-muted) !important; }
.text-success  { color: var(--success) !important; }
.text-danger   { color: var(--danger) !important; }
.fw-bold       { font-weight: 700; }
.text-center   { text-align: center; }
.w-100         { width: 100%; }

