:root {
    /* --- The DILSE Cinematic Palette --- */
    --bg-base: #050505;          /* Deepest Black */
    --bg-surface: #0a0b14;       /* Cinematic Dark Navy */
    --bg-surface-alt: #121421;   /* Elevated Navy */
    --bg-card: rgba(18, 20, 33, 0.7);
    --bg-glass: rgba(10, 11, 20, 0.85);

    --primary: #FF385C;          /* Dilse Premium Pink */
    --primary-alt: #e03150;
    --primary-glow: rgba(255, 56, 92, 0.35);
    --primary-faint: rgba(255, 56, 92, 0.08);

    --text-main: #f8fafc;        /* High Contrast White */
    --text-muted: #94a3b8;       /* Silver Gray */
    --text-dim: #475569;         /* Muted Slate */

    --border-light: rgba(255, 255, 255, 0.03);
    --border-soft: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);

    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* --- Studio Spacing & Scale --- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --sidebar-width: 260px;
    --header-height: 72px;

    /* --- OTT Grade Motion --- */
    --easing: cubic-bezier(0.2, 1, 0.3, 1);
    --transition: all 0.4s var(--easing);
}

/* --- Global Reset & Foundation --- */
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; margin: 0; padding: 0; }
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow: hidden; /* Controlled by Layout Scroll */
    line-height: 1.4;
}

/* --- Master Studio Layout --- */
.studio-shell {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(circle at 0% 0%, rgba(255, 56, 92, 0.03) 0%, transparent 40%);
}

/* --- Sidebar: Professional Studio Grade --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-header {
    padding: 32px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-box {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--primary-alt));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 56, 92, 0.4);
}

.sidebar-brand { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; }

.sidebar-scroll { flex: 1; overflow-y: auto; padding: 0 16px 40px; scrollbar-width: none; }
.sidebar-scroll::-webkit-scrollbar { display: none; }

.nav-group { margin-top: 24px; }
.nav-label {
    padding: 0 16px 12px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-item i { width: 18px; height: 18px; opacity: 0.6; }
.nav-item:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.02); }
.nav-item.active {
    background: var(--primary-faint);
    color: var(--primary);
    position: relative;
}
.nav-item.active::after {
    content: ''; position: absolute; left: 0; top: 25%; bottom: 25%; width: 3px;
    background: var(--primary); border-radius: 0 4px 4px 0;
}
.nav-item.active i { opacity: 1; transform: scale(1.1); }

.sidebar-footer { padding: 20px; border-top: 1px solid var(--border-soft); }
.admin-card {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-avatar { width: 38px; height: 38px; border-radius: 10px; background: #2c2e3e; }
.admin-meta { flex: 1; min-width: 0; }
.admin-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-role { font-size: 11px; color: var(--text-dim); font-weight: 700; }

/* --- Main Workspace --- */
.workspace { flex: 1; display: flex; flex-direction: column; height: 100vh; min-width: 0; }

.header {
    height: var(--header-height);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
}

.header-title-box { display: flex; flex-direction: column; }
.breadcrumb { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.view-title { font-size: 18px; font-weight: 800; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.content-scroll { flex: 1; overflow-y: auto; padding: 40px; background: var(--bg-base); }

/* --- Dashboard Composition --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 20px;
    transition: var(--transition);
}
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.stat-card-label { font-size: 11px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; margin-bottom: 8px; }
.stat-card-value { font-size: 26px; font-weight: 900; margin-bottom: 4px; }
.stat-card-trend { font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 4px; }

.dashboard-row { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 24px; }

.panel-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 24px;
}
.panel-title { font-size: 16px; font-weight: 800; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }

/* --- Modern OTT Tables --- */
.table-container {
    background: var(--bg-surface); border: 1px solid var(--border-soft);
    border-radius: 20px; overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left; padding: 16px 24px; background: rgba(255,255,255,0.01);
    font-size: 11px; font-weight: 800; color: var(--text-dim); text-transform: uppercase;
    border-bottom: 1px solid var(--border-soft);
}
td { padding: 16px 24px; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
tr:hover td { background: rgba(255,255,255,0.01); }

.user-row { display: flex; align-items: center; gap: 12px; }
.user-avatar-md { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: #1e202e; }

.badge {
    padding: 5px 12px; border-radius: 6px; font-size: 10px; font-weight: 800; text-transform: uppercase;
}
.badge-active { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-error { background: rgba(239,68,68,0.1); color: var(--error); }
.badge-gold { background: rgba(245,158,11,0.1); color: var(--warning); }

/* --- Forms & Controls --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 10px; font-weight: 700; font-size: 13px;
    cursor: pointer; transition: 0.2s; border: 1px solid transparent; font-family: inherit;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-alt); box-shadow: 0 0 20px var(--primary-glow); transform: scale(1.02); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text-main); }
.btn-outline:hover { background: rgba(255,255,255,0.03); }

/* --- Motion Helpers --- */
.animate-slide-up { animation: ottSlideUp 0.6s var(--easing) forwards; }
@keyframes ottSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* --- Empty State --- */
.empty-state {
    text-align: center; padding: 60px 20px;
}
.empty-state i { width: 64px; height: 64px; color: var(--text-dim); margin-bottom: 20px; }
.empty-state h3 { font-weight: 800; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 14px; }

/* --- Responsiveness --- */
@media (max-width: 1024px) {
    .sidebar { width: 80px; }
    .nav-item span, .nav-label, .sidebar-brand, .admin-info { display: none; }
    .sidebar-header { justify-content: center; padding: 24px 0; }
    .nav-item { justify-content: center; width: 44px; margin: 0 auto 8px; padding: 10px 0; }
}

@media (max-width: 768px) {
    .dashboard-row { grid-template-columns: 1fr; }
    .header { padding: 0 20px; }
    .content-scroll { padding: 20px; }
}
