@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --bg: #050505;
    --surface: rgba(20, 20, 22, 0.85);
    --surface-2: rgba(30, 30, 34, 0.9);
    --glow: #00FF88;
    --glow-dim: rgba(0, 255, 136, 0.16);
    --text: #FFFFFF;
    --muted: #A0A0A8;
    --border: rgba(255, 255, 255, 0.09);
    --border-light: rgba(255, 255, 255, 0.16);
    --danger: #ff4d4f;
    --warn: #ffb020;
    --font-sans: 'Outfit', sans-serif;
    --font-display: 'Playfair Display', serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
}

.admin-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: rgba(10, 10, 12, 0.96);
    border-right: 1px solid var(--border);
    padding: 1.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-brand span { color: var(--glow); }
.admin-badge {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: var(--glow-dim);
    color: var(--glow);
    border: 1px solid rgba(0,255,136,0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    margin-left: auto;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.admin-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.2s ease;
}

.admin-nav a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

.admin-nav a.active {
    color: #050505;
    background: var(--glow);
    font-weight: 600;
}

.nav-pill {
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    color: var(--text);
}

.admin-nav a.active .nav-pill {
    background: rgba(0,0,0,0.2);
    color: #050505;
}

.admin-sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-main {
    padding: 2rem 2.5rem 4rem;
    max-width: 1400px;
    width: 100%;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.admin-topbar h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
}

.admin-topbar p {
    color: var(--muted);
    font-size: 0.95rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.4rem;
}

.stat-card .stat-label {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--glow);
    margin-top: 0.35rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.2s ease;
}

.btn-primary {
    background: var(--glow);
    color: #050505;
}
.btn-primary:hover { background: #fff; }

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border-light);
}
.btn-outline:hover { background: rgba(255,255,255,0.08); }

.btn-danger {
    background: rgba(255, 77, 79, 0.14);
    color: #ff6b6d;
    border-color: rgba(255, 77, 79, 0.35);
}
.btn-danger:hover { background: rgba(255, 77, 79, 0.28); }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.82rem; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem 1.25rem;
}

.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.72rem 0.95rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
}

.form-control:focus {
    border-color: var(--glow);
    box-shadow: 0 0 0 3px var(--glow-dim);
}

select.form-control option {
    background: #121214;
    color: #fff;
}

textarea.form-control { min-height: 95px; resize: vertical; }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    color: var(--text);
    font-size: 0.92rem;
}
.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--glow);
}

.alert {
    padding: 0.9rem 1.15rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}
.alert-success {
    background: rgba(0, 255, 136, 0.12);
    border: 1px solid rgba(0, 255, 136, 0.35);
    color: var(--glow);
}
.alert-error {
    background: rgba(255, 77, 79, 0.12);
    border: 1px solid rgba(255, 77, 79, 0.4);
    color: #ff7875;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
    text-align: left;
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 0.92rem;
}
th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge {
    display: inline-block;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-green { background: var(--glow-dim); color: var(--glow); }
.badge-muted { background: rgba(255,255,255,0.08); color: var(--muted); }
.badge-warn { background: rgba(255,176,32,0.16); color: var(--warn); }

.poster-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    flex-shrink: 0;
}

.poster-preview-box {
    width: 140px;
    height: 140px;
    border-radius: 14px;
    border: 1px dashed var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}
.poster-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-main { padding: 1.25rem; }
}
