/* ============================================================
   DoraBox — Admin Panel CSS
   Dark, professional admin interface
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Bebas+Neue&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --bg:           #0d0d14;
    --bg2:          #13131f;
    --bg3:          #1a1a2a;
    --surface:      #1f1f30;
    --surface2:     #272738;
    --border:       rgba(255,255,255,0.07);
    --accent:       #e8344a;
    --accent2:      #ff6b7a;
    --accent-glow:  rgba(232,52,74,0.3);
    --indigo:       #6366f1;
    --indigo-bg:    rgba(99,102,241,0.12);
    --green:        #22c55e;
    --green-bg:     rgba(34,197,94,0.1);
    --amber:        #f59e0b;
    --amber-bg:     rgba(245,158,11,0.1);
    --text:         #f0eef8;
    --text2:        #a09cb8;
    --text3:        #5a5675;
    --radius:       8px;
    --radius-lg:    14px;
    --sidebar-w:    240px;
    --topbar-h:     60px;
    --transition:   0.2s ease;
    --shadow:       0 4px 20px rgba(0,0,0,0.5);
    --font:         'DM Sans', sans-serif;
    --font-display: 'Bebas Neue', sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }

/* ── LOGIN PAGE ─────────────────────────────────────────────── */
.admin-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(232,52,74,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(99,102,241,0.06) 0%, transparent 50%);
}
.login-wrap { width: 100%; max-width: 420px; padding: 20px; }
.login-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.login-logo {
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 6px;
}
.logo-dora { color: var(--accent); text-shadow: 0 0 20px var(--accent-glow); }
.logo-box  { color: var(--text); }
.login-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text3);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
}
.login-form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 10px 14px;
    font-size: 14px;
    width: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea { min-height: 90px; resize: vertical; }
.form-group select option { background: var(--bg3); }

.input-icon-wrap { position: relative; }
.input-icon-wrap input { padding-right: 42px; }
.toggle-pwd {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none;
    color: var(--text3);
    padding: 4px;
    transition: color var(--transition);
}
.toggle-pwd:hover { color: var(--text2); }

.btn-login {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    margin-top: 4px;
}
.btn-login:hover {
    background: var(--accent2);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}
.login-links {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text3);
}
.login-links a { color: var(--text2); transition: color var(--transition); }
.login-links a:hover { color: var(--accent); }

/* ── FLASH MESSAGES ─────────────────────────────────────────── */
.flash {
    padding: 11px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.flash-success { background: var(--green-bg);  color: var(--green);  border: 1px solid rgba(34,197,94,0.25); }
.flash-error   { background: var(--accent-glow); color: var(--accent2); border: 1px solid rgba(232,52,74,0.3); }
.flash-warning { background: var(--amber-bg);  color: var(--amber);  border: 1px solid rgba(245,158,11,0.25); }
.flash-info    { background: var(--indigo-bg); color: #a5b4fc;       border: 1px solid rgba(99,102,241,0.25); }

/* ── ADMIN LAYOUT ───────────────────────────────────────────── */
.admin-body { display: flex; min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform var(--transition);
    overflow-y: auto;
    scrollbar-width: none;
}
.admin-sidebar::-webkit-scrollbar { display: none; }

.sidebar-logo {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-logo .logo-dora {
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--accent);
}
.sidebar-logo .logo-box {
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--text);
}
.logo-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text3);
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 4px;
    text-transform: uppercase;
}

.sidebar-nav {
    list-style: none;
    padding: 12px 0;
    flex: 1;
}
.nav-group-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text3);
    text-transform: uppercase;
    padding: 14px 20px 6px;
}
.sidebar-nav li a,
.sidebar-nav li button.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text2);
    border-radius: 0;
    transition: color var(--transition), background var(--transition);
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}
.sidebar-nav li a:hover,
.sidebar-nav li button.nav-btn:hover { color: var(--text); background: var(--surface); }
.sidebar-nav li a.active {
    color: var(--accent);
    background: rgba(232,52,74,0.1);
    border-right: 2px solid var(--accent);
}
.sidebar-nav li a svg,
.sidebar-nav li button.nav-btn svg { flex-shrink: 0; opacity: 0.7; }
.sidebar-nav li a.active svg { opacity: 1; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.su-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--accent);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.su-info { flex: 1; min-width: 0; }
.su-name { display: block; font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-role { display: block; font-size: 11px; color: var(--text3); }
.su-logout {
    color: var(--text3);
    padding: 6px;
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
}
.su-logout:hover { color: var(--accent); background: var(--accent-glow); }

/* Main content area */
.admin-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Topbar */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--topbar-h);
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 28px;
    backdrop-filter: blur(8px);
}
.topbar-toggle {
    display: none;
    background: none;
    color: var(--text2);
    padding: 6px;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
}
.topbar-toggle:hover { color: var(--text); background: var(--surface); }
.topbar-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-site-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.topbar-site-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

/* Admin content padding */
.admin-content { padding: 28px; flex: 1; }

/* ── STATS GRID ─────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color var(--transition);
}
.stat-card:hover { border-color: rgba(255,255,255,0.14); }
.stat-icon {
    width: 46px; height: 46px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.stat-info { min-width: 0; }
.stat-value { display: block; font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-label { display: block; font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ── CARDS / PANELS ─────────────────────────────────────────── */
.admin-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title svg { color: var(--accent); }
.card-body { padding: 22px; }

/* ── TWO-COLUMN GRID ────────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 24px; }
@media (max-width: 900px) { .two-col, .three-col { grid-template-columns: 1fr; } }

/* ── TABLES ─────────────────────────────────────────────────── */
.admin-table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.admin-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text3);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.admin-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text2);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); color: var(--text); }
.admin-table .td-title { color: var(--text); font-weight: 500; }
.admin-table .td-poster {
    width: 36px; height: 52px;
    object-fit: cover;
    border-radius: 5px;
}
.admin-table .td-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.badge-green   { background: var(--green-bg);  color: var(--green);  }
.badge-red     { background: var(--accent-glow); color: var(--accent2); }
.badge-amber   { background: var(--amber-bg);  color: var(--amber);  }
.badge-indigo  { background: var(--indigo-bg); color: #a5b4fc; }
.badge-gray    { background: var(--surface);   color: var(--text3); }
.badge-tv      { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.badge-movie   { background: rgba(245,158,11,0.15); color: #fcd34d; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary   { background: var(--accent);   color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); box-shadow: 0 4px 14px var(--accent-glow); }
.btn-secondary { background: var(--surface);  color: var(--text2); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface2); color: var(--text); }
.btn-success   { background: var(--green-bg); color: var(--green); border-color: rgba(34,197,94,0.25); }
.btn-success:hover { background: rgba(34,197,94,0.2); }
.btn-danger    { background: var(--accent-glow); color: var(--accent2); border-color: rgba(232,52,74,0.3); }
.btn-danger:hover { background: rgba(232,52,74,0.2); }
.btn-indigo    { background: var(--indigo-bg); color: #a5b4fc; border-color: rgba(99,102,241,0.25); }
.btn-indigo:hover { background: rgba(99,102,241,0.2); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-icon { padding: 7px; border-radius: 6px; }

/* ── FORMS ──────────────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.form-hint { font-size: 11px; color: var(--text3); margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type=checkbox] {
    width: 16px; height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}
.form-check label { font-size: 13px; color: var(--text2); cursor: pointer; }
.form-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text3);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* ── SEARCH BAR ─────────────────────────────────────────────── */
.admin-search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.admin-search-bar input {
    flex: 1;
    min-width: 200px;
    width: auto !important;
}
.admin-search-bar select {
    width: auto !important;
    min-width: 140px;
}

/* ── PAGINATION ─────────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    padding: 20px 0 4px;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 34px; height: 34px;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text2);
    text-decoration: none;
    transition: all var(--transition);
}
.page-btn:hover { background: var(--surface2); color: var(--text); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ── UPLOAD AREA ────────────────────────────────────────────── */
.upload-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    transition: border-color var(--transition), background var(--transition);
    cursor: pointer;
}
.upload-dropzone:hover, .upload-dropzone.drag-over {
    border-color: var(--accent);
    background: var(--accent-glow);
}
.upload-dropzone .dz-icon { font-size: 40px; color: var(--text3); margin-bottom: 12px; }
.upload-dropzone p { font-size: 14px; color: var(--text2); }
.upload-dropzone small { font-size: 12px; color: var(--text3); }

/* ── SYNC LOG ───────────────────────────────────────────────── */
.sync-log {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    max-height: 360px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 13px;
}
.sync-log .log-ok    { color: var(--green);  }
.sync-log .log-error { color: var(--accent2); }
.sync-log .log-info  { color: #a5b4fc; }
.sync-log .log-line  { padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }

/* ── CONTENT GRID (admin preview) ──────────────────────────── */
.content-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}
.content-mini-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    cursor: pointer;
    transition: transform var(--transition);
}
.content-mini-card:hover { transform: translateY(-2px); }
.content-mini-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.content-mini-card .cmc-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    padding: 18px 6px 6px;
    font-size: 11px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.content-mini-card .cmc-badge {
    position: absolute;
    top: 5px; left: 5px;
}

/* ── CREDITS WIDGET ─────────────────────────────────────────── */
.credits-display {
    background: linear-gradient(135deg, var(--bg3) 0%, var(--surface) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
}
.credits-value {
    font-family: var(--font-display);
    font-size: 48px;
    color: var(--amber);
    letter-spacing: 2px;
    line-height: 1;
    text-shadow: 0 0 20px rgba(245,158,11,0.3);
}
.credits-label { font-size: 12px; color: var(--text3); letter-spacing: 2px; text-transform: uppercase; margin-top: 6px; }

/* ── PLAN CARDS ─────────────────────────────────────────────── */
.plan-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.plan-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: border-color var(--transition), transform var(--transition);
}
.plan-card:hover { border-color: rgba(255,255,255,0.12); transform: translateY(-2px); }
.plan-card.featured { border-color: var(--accent); }
.plan-price {
    font-family: var(--font-display);
    font-size: 36px;
    color: var(--text);
    letter-spacing: 1px;
    margin: 8px 0 4px;
}
.plan-price small { font-size: 16px; color: var(--text3); font-family: var(--font); }
.plan-name { font-size: 16px; font-weight: 700; color: var(--text); }
.plan-desc { font-size: 12px; color: var(--text3); margin-top: 4px; margin-bottom: 16px; }
.plan-feature { font-size: 13px; color: var(--text2); padding: 4px 0; border-bottom: 1px solid var(--border); }
.plan-feature:last-child { border-bottom: none; }
.plan-actions { margin-top: 16px; display: flex; gap: 8px; }

/* ── TABS ───────────────────────────────────────────────────── */
.admin-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.tab-btn {
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text3);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text2); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── MODAL ──────────────────────────────────────────────────── */
.admin-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    display: none;
    place-items: center;
    backdrop-filter: blur(4px);
}
.admin-modal-backdrop.open { display: grid; }
.admin-modal {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: min(560px, 94vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
    animation: fadeUp 0.25s ease;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-header .close-btn {
    color: var(--text3);
    background: var(--surface);
    border: 1px solid var(--border);
    width: 30px; height: 30px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    transition: all var(--transition);
}
.modal-header .close-btn:hover { color: var(--text); background: var(--surface2); }
.modal-body { padding: 22px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid var(--border);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── EPISODE LIST ───────────────────────────────────────────── */
.ep-list { display: flex; flex-direction: column; gap: 6px; }
.ep-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    transition: border-color var(--transition);
}
.ep-list-item:hover { border-color: rgba(255,255,255,0.12); }
.ep-num { font-family: var(--font-display); font-size: 20px; color: var(--text3); width: 30px; }
.ep-info { flex: 1; min-width: 0; }
.ep-info .ep-name { font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-info .ep-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }
.ep-url-preview {
    font-size: 11px;
    color: var(--indigo);
    font-family: monospace;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── DASHBOARD SPECIFIC ─────────────────────────────────────── */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    margin-top: 4px;
}
.dash-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.dash-card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.dash-link {
    font-size: 12px;
    color: var(--text3);
    transition: color var(--transition);
}
.dash-link:hover { color: var(--accent); }

.content-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    padding: 16px;
}
.content-mini-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}
.content-mini-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.content-mini-blank {
    width: 100%;
    aspect-ratio: 2/3;
    background: var(--surface);
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: var(--text3);
    font-size: 24px;
    border: 1px solid var(--border);
}
.cmini-info { padding: 0 2px; }
.cmini-title {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cmini-type { display: block; font-size: 10px; color: var(--text3); }

.top-list { padding: 8px 0; }
.top-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background var(--transition);
}
.top-item:last-child { border-bottom: none; }
.top-item:hover { background: rgba(255,255,255,0.02); }
.top-rank {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--text3);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.top-item:nth-child(1) .top-rank { color: var(--amber); }
.top-item:nth-child(2) .top-rank { color: #9ca3af; }
.top-item:nth-child(3) .top-rank { color: #cd7f32; }
.top-info { flex: 1; min-width: 0; }
.top-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-type { display: block; font-size: 11px; color: var(--text3); margin-top: 1px; }
.top-views { font-size: 12px; color: var(--text3); white-space: nowrap; flex-shrink: 0; }

/* ── GLOBAL INPUT / SELECT / TEXTAREA ───────────────────────── */
.admin-body input[type="text"],
.admin-body input[type="email"],
.admin-body input[type="password"],
.admin-body input[type="number"],
.admin-body input[type="url"],
.admin-body input[type="search"],
.admin-body input[type="date"],
.admin-body select,
.admin-body textarea,
.admin-login-body input[type="text"],
.admin-login-body input[type="email"],
.admin-login-body input[type="password"],
.admin-login-body select {
    background: var(--bg3) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    color: var(--text) !important;
    padding: 9px 13px !important;
    font-size: 14px !important;
    font-family: var(--font) !important;
    outline: none !important;
    transition: border-color var(--transition), box-shadow var(--transition);
    box-sizing: border-box;
}
.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus,
.admin-login-body input:focus,
.admin-login-body select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
}
.admin-body input::placeholder,
.admin-login-body input::placeholder { color: var(--text3) !important; }
.admin-body select option,
.admin-login-body select option { background: var(--bg3); color: var(--text); }
.admin-body textarea { resize: vertical; min-height: 80px; }

/* ── EXPLICIT ADMIN-INPUT / ADMIN-SELECT CLASSES ────────────── */
/* Usadas em toolbars e formulários avulsos para garantir estilo */
.admin-input,
.admin-select {
    background: #1a1a2a !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 8px !important;
    color: #f0eef8 !important;
    padding: 9px 13px !important;
    font-size: 14px !important;
    font-family: 'DM Sans', sans-serif !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.admin-input:focus,
.admin-select:focus {
    border-color: #e8344a !important;
    box-shadow: 0 0 0 3px rgba(232,52,74,0.3) !important;
}
.admin-input::placeholder { color: #5a5675 !important; }
.admin-select option { background: #1a1a2a; color: #f0eef8; }

/* ── TOOLBAR (content.php, episodes.php) ────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.search-form-admin {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}
.search-form-admin input[type="text"],
.search-form-admin input[type="search"] {
    width: auto !important;
    flex: 1;
    min-width: 160px;
    max-width: 300px;
}
.search-form-admin select {
    width: auto !important;
    min-width: 140px;
    flex-shrink: 0;
}
.toolbar-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.table-total {
    font-size: 13px;
    color: var(--text3);
    margin-bottom: 12px;
}
.table-total strong { color: var(--text2); }

/* ── UPLOAD PAGE ────────────────────────────────────────────── */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) { .upload-grid { grid-template-columns: 1fr; } }

.tmdb-search-form {
    display: flex;
    gap: 8px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    align-items: center;
}
.tmdb-search-form input[type="text"] {
    flex: 1;
    min-width: 160px;
    width: auto !important;
}
.tmdb-search-form select {
    width: auto !important;
    min-width: 140px;
    flex-shrink: 0;
}

.tmdb-results {
    display: flex;
    flex-direction: column;
    max-height: 480px;
    overflow-y: auto;
}
.tmdb-result-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.tmdb-result-card:last-child { border-bottom: none; }
.tmdb-result-card:hover { background: rgba(255,255,255,0.02); }
.tmdb-result-card img {
    width: 40px;
    height: 58px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}
.trc-info {
    flex: 1;
    min-width: 0;
}
.trc-info strong {
    display: block;
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.trc-info small { font-size: 11px; color: var(--text3); }

/* ID form (Adicionar por ID TMDB) */
.id-form {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.id-form .form-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.id-form .form-row input { flex: 1; width: auto !important; }
.id-form .form-row select { width: auto !important; min-width: 120px; flex-shrink: 0; }
.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text2);
    cursor: pointer;
}
.check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0,0,0,0.5);
    }
    .admin-main { margin-left: 0; }
    .topbar-toggle { display: grid; }
    .admin-content { padding: 16px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .login-card { padding: 28px 20px; }
}

/* ── TOGGLE BUTTONS (content.php) ───────────────────────────── */
.toggle-btn {
    width: 32px; height: 32px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
    font-family: inherit;
}
.toggle-btn.on  { background: rgba(34,197,94,0.15);  color: #22c55e; }
.toggle-btn.off { background: rgba(255,255,255,0.05); color: #5a5675; }
.toggle-btn:hover { opacity: 0.75; }

/* ── EXTRA BADGES ────────────────────────────────────────────── */
.badge-blue   { background: rgba(59,130,246,0.15);  color: #60a5fa; }
.badge-purple { background: rgba(139,92,246,0.15);  color: #a78bfa; }
.badge-tv     { background: rgba(139,92,246,0.15);  color: #a78bfa; }
.badge-movie  { background: rgba(59,130,246,0.15);  color: #60a5fa; }
