:root{--bg:#0a0b0e;--panel:#17191f;--line:#2b2f39;--text:#f6f7fa;--muted:#9299a8;--accent:#ff315c}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,Arial;display:grid;grid-template-columns:250px 1fr;min-height:100vh}aside{background:#0e1014;border-right:1px solid var(--line);padding:18px 10px;position:sticky;top:0;height:100vh}aside a,aside button{display:flex;gap:12px;align-items:center;width:100%;padding:13px;border-radius:9px;color:#d5d8e0;text-decoration:none;background:none;border:0;text-align:left;cursor:pointer}.admin-brand{font-size:20px;font-weight:900;margin-bottom:18px}.active,aside a:hover{background:#ff315c1b;color:#ff5075}main{min-width:0}header{height:64px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px;padding:0 24px;background:#0e1014;position:sticky;top:0;z-index:20}.sidebar-toggle{display:none}.content{padding:24px}.panel,.simple-grid article,.media-card,.list-row,.episode-grid article{background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:20px}.stats{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;margin-bottom:20px}.stats article{background:linear-gradient(145deg,#191c24,#111318);border:1px solid var(--line);border-radius:14px;padding:22px}.stats span{color:var(--muted)}.stats strong{font-size:36px;display:block;margin-top:8px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-grid h2,.form-grid button{grid-column:1/-1}label{display:grid;gap:7px;color:#d9dce5;font-weight:600}input,textarea,select{width:100%;background:#24272f;color:white;border:1px solid #353a46;border-radius:8px;padding:12px}textarea{min-height:110px}.primary,button{border:0;border-radius:8px;padding:11px 15px;background:#303440;color:white;font-weight:700;cursor:pointer}.primary{background:linear-gradient(135deg,#ff315c,#ff7836);display:inline-block;text-decoration:none}.danger{background:#d6404f}.green{background:#18a968}.muted{background:#5b6170}.toolbar{display:flex;justify-content:flex-end;margin-bottom:18px}.media-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}.media-card{padding:0;overflow:hidden}.media-card img{width:100%;aspect-ratio:2/3;object-fit:cover}.media-card>div{padding:14px}.media-card h3{font-size:15px}.actions{display:flex;gap:7px;margin-top:12px}.simple-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:20px}.two-col{display:grid;grid-template-columns:1fr 1.4fr;gap:20px}.list-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.list-row small,.episode-grid small{display:block;color:var(--muted);margin-top:5px}.episode-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.episode-grid article{padding:0;overflow:hidden}.episode-grid img{width:100%;aspect-ratio:16/9;object-fit:cover}.episode-grid article>div{padding:14px}.inline-form{display:flex;gap:12px;margin-bottom:20px}.alert{background:#123d2b;border:1px solid #237f55;padding:12px;border-radius:9px;margin-bottom:15px}.error{background:#4d1820;border:1px solid #a63b49;padding:12px;border-radius:9px;margin-bottom:15px}.hint{color:var(--muted);font-size:13px}.login{display:grid;place-items:center;grid-template-columns:1fr}.login-card{width:min(420px,calc(100% - 30px));background:var(--panel);padding:35px;border:1px solid var(--line);border-radius:16px;display:grid;gap:15px}.import-box{max-width:800px}.import-box input{margin:15px 0}@media(max-width:1000px){body{grid-template-columns:75px 1fr}aside a{font-size:0}aside a i{font-size:17px}.admin-brand{font-size:0}.admin-brand:first-letter{font-size:22px}.media-grid{grid-template-columns:repeat(3,1fr)}.stats{grid-template-columns:repeat(2,1fr)}.two-col{grid-template-columns:1fr}}@media(max-width:650px){body{display:block}aside{display:none}.sidebar-open aside{display:block;position:fixed;z-index:50;width:250px}.sidebar-open aside a{font-size:14px}.sidebar-toggle{display:block}.content{padding:12px}.media-grid{grid-template-columns:repeat(2,1fr);gap:10px}.form-grid{grid-template-columns:1fr}.stats,.simple-grid,.episode-grid{grid-template-columns:1fr 1fr}.inline-form{display:grid}}

/* TMDB/IMDb import form */
.import-box { max-width: 900px; }
.import-box label { display:block; margin:18px 0 8px; font-weight:700; }
.import-box input { width:100%; min-height:48px; padding:0 14px; border:1px solid #3a3f4b; border-radius:10px; background:#24272d; color:#fff; }
.import-box input:focus { outline:2px solid rgba(36,196,118,.35); border-color:#24c476; }
.import-examples { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:14px 0 20px; color:#aab1bd; }
.import-examples code { padding:6px 9px; border-radius:7px; background:#111318; color:#d7dde7; overflow-wrap:anywhere; }
.alert.error { margin-top:10px; padding:10px 12px; border-radius:8px; background:rgba(255,72,72,.13); color:#ff9090; border:1px solid rgba(255,72,72,.3); }
.admin-list-head{display:flex;justify-content:space-between;gap:15px;margin-bottom:18px}.search-form{display:flex;max-width:420px;width:100%}.search-form input{border-radius:30px 0 0 30px}.search-form button{border-radius:0 30px 30px 0}.cinematic-admin-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.cinematic-admin-card .admin-poster-wrap{position:relative}.lang-badge{position:absolute;bottom:10px;left:10px;right:10px;text-align:center;background:#08090dcc;padding:6px;border-radius:5px;font-size:12px}.edit-btn{background:#16b978;padding:11px 13px;border-radius:8px;font-weight:700}.movie-editor{display:grid;gap:18px}.import-panel{max-width:1100px}.import-line{display:flex;gap:12px}.editor-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(320px,.7fr);gap:20px}.seo-section{grid-column:1/-1}.field-row{display:grid;gap:12px}.field-row.three{grid-template-columns:repeat(3,1fr)}.form-section,.media-section,.seo-section{display:grid;gap:16px;align-content:start}.preview{width:100%;object-fit:cover;border-radius:10px;border:1px solid var(--line)}.poster-preview{max-height:420px;object-fit:contain;background:#0c0d11}.backdrop-preview{aspect-ratio:16/9}.switch-row{display:flex;gap:30px}.sticky-save{grid-column:1/-1;position:sticky;bottom:12px;text-align:right}.genre-tools{display:flex;justify-content:space-between;gap:15px}.full{grid-column:1/-1}.back-link{display:inline-block;color:#ff5075;font-weight:800}@media(max-width:950px){.editor-grid{grid-template-columns:1fr}.cinematic-admin-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:650px){.cinematic-admin-grid{grid-template-columns:repeat(2,1fr)}.field-row.three{grid-template-columns:1fr}.import-line,.admin-list-head,.genre-tools{display:grid}.switch-row{display:grid;gap:10px}}

/* Movie editor layout repair */
.movie-editor{width:min(1480px,100%);margin:0 auto}.movie-editor .panel{padding:24px}.movie-editor h2{margin:0 0 4px;font-size:20px}.editor-grid{grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr);align-items:start}.form-section{min-width:0}.media-section{position:sticky;top:88px}.movie-editor label{font-size:13px;line-height:1.35}.movie-editor input,.movie-editor textarea,.movie-editor select{font-size:14px;min-height:44px}.movie-editor textarea.rich-editor{min-height:190px;resize:vertical}.movie-editor select[multiple]{min-height:230px;padding:8px}.movie-editor select[multiple] option{padding:9px 10px;border-radius:6px}.movie-editor .poster-preview{max-height:520px}.movie-editor .backdrop-preview{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}.sticky-save{z-index:10;padding:12px 0;background:linear-gradient(transparent,rgba(10,11,14,.96) 35%)}.sticky-save .primary{min-width:180px;padding:14px 20px;font-size:15px}.import-panel{width:min(100%,980px)}
@media(max-width:1150px){.editor-grid{grid-template-columns:1fr}.media-section{position:static}.seo-section,.sticky-save{grid-column:1}.movie-editor .poster-preview{max-height:430px}}
@media(max-width:760px){.movie-editor .panel{padding:16px}.field-row.three{grid-template-columns:1fr}.switch-row{flex-direction:column;gap:12px}.sticky-save .primary{width:100%}}

/* Premium admin library redesign */
.premium-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:20px;padding:4px 2px}.premium-page-head h1{margin:4px 0 7px;font-size:clamp(26px,3vw,38px);line-height:1}.premium-page-head p{margin:0;color:var(--muted);max-width:680px}.eyebrow{font-size:11px;font-weight:900;letter-spacing:2px;color:#ff4d74}.premium-toolbar,.premium-import-bar{background:linear-gradient(145deg,#181b22,#111318);border:1px solid #2e3340;border-radius:16px;padding:13px;display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px;box-shadow:0 14px 35px rgba(0,0,0,.18)}.premium-import-bar{display:grid;grid-template-columns:minmax(250px,1fr) 170px auto}.premium-search{display:flex;align-items:center;gap:10px;flex:1;max-width:620px;background:#0d0f14;border:1px solid #303642;border-radius:12px;padding-left:14px;overflow:hidden}.premium-search>i{color:#7f8797}.premium-search input{border:0;background:transparent;border-radius:0;padding-left:0;min-width:0}.premium-search input:focus{outline:0}.premium-search a{color:#9ca3b2;padding:8px}.premium-search button{border-radius:10px;margin:4px;background:linear-gradient(135deg,#ff315c,#ff7638);padding:10px 18px}.result-count{color:#a4aab6;font-size:13px;white-space:nowrap}.result-count strong{color:#fff;font-size:16px}.premium-admin-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:15px}.premium-content-card{min-width:0;overflow:hidden;border:1px solid #2d323d;border-radius:16px;background:linear-gradient(160deg,#1b1e25,#111318);box-shadow:0 12px 30px rgba(0,0,0,.25);transition:transform .24s ease,border-color .24s ease,box-shadow .24s ease}.premium-content-card:hover{transform:translateY(-5px);border-color:#545c6d;box-shadow:0 18px 42px rgba(0,0,0,.38)}.premium-poster,.episode-thumb{position:relative;overflow:hidden;background:#090a0d}.premium-poster{aspect-ratio:2/3}.episode-thumb{aspect-ratio:16/9}.premium-poster img,.episode-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .45s ease}.premium-content-card:hover img{transform:scale(1.035)}.poster-shade{position:absolute;inset:0;background:linear-gradient(180deg,transparent 50%,rgba(4,5,8,.88) 100%);pointer-events:none}.status-pill,.type-pill{position:absolute;top:10px;padding:6px 8px;border-radius:999px;font-size:9px;font-weight:900;letter-spacing:.5px;backdrop-filter:blur(8px)}.status-pill{left:9px}.status-pill.is-live{background:rgba(10,175,109,.88);color:#fff}.status-pill.is-off{background:rgba(94,99,113,.9);color:#fff}.type-pill{right:9px;background:rgba(10,12,17,.82);border:1px solid rgba(255,255,255,.17);color:#fff}.premium-card-body{padding:13px}.premium-card-body h3{font-size:14px;line-height:1.35;margin:0 0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.meta-row,.id-row{display:flex;justify-content:space-between;gap:7px;color:#9fa6b5;font-size:10px;line-height:1.4}.meta-row span,.id-row span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.id-row{margin-top:8px;padding-top:8px;border-top:1px solid #292e38;color:#747d8f}.show-name{margin:0 0 9px;color:#b6bdc9;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.premium-card-actions{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px;margin-top:13px}.premium-card-actions form{margin:0}.premium-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;border:1px solid transparent;border-radius:10px;padding:9px 12px;font-size:11px;font-weight:900;text-decoration:none;color:#fff;cursor:pointer;transition:transform .18s ease,filter .18s ease,border-color .18s ease}.premium-btn:hover{transform:translateY(-1px);filter:brightness(1.12)}.premium-btn-primary{background:linear-gradient(135deg,#ff315c,#ff7836);box-shadow:0 8px 20px rgba(255,49,92,.25)}.premium-btn-edit{background:linear-gradient(135deg,#146cff,#6a5cff)}.premium-btn-view{background:linear-gradient(135deg,#5c667a,#313745)}.premium-btn-live{background:linear-gradient(135deg,#0ebf77,#07945c)}.premium-btn-muted{background:linear-gradient(135deg,#666d7c,#454b58)}.premium-btn-delete{background:linear-gradient(135deg,#ff3c58,#c8203c)}.premium-card-actions .premium-btn{width:100%;padding-inline:10px}.premium-empty{grid-column:1/-1;min-height:260px;display:grid;place-items:center;align-content:center;text-align:center;border:1px dashed #343a47;border-radius:16px;color:#8f97a7}.premium-empty i{font-size:34px;margin-bottom:10px;color:#ff4167}.premium-empty h3,.premium-empty p{margin:4px}.premium-episode-grid .premium-card-body{padding-top:12px}.premium-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:7px;margin:28px 0 6px}.premium-pagination a,.premium-pagination span{min-width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;border:1px solid #303643;background:#171a20;color:#dce0e8;text-decoration:none;font-size:12px;font-weight:800}.premium-pagination a:hover{border-color:#ff466d;color:#fff;transform:translateY(-1px)}.premium-pagination .current{background:linear-gradient(135deg,#ff315c,#ff7638);border-color:transparent;box-shadow:0 7px 18px rgba(255,49,92,.25)}.premium-pagination .disabled{opacity:.35}.premium-pagination .dots{border:0;background:transparent}.premium-import-bar select,.premium-import-bar input{min-height:44px}
@media(max-width:1500px){.premium-admin-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:1250px){.premium-admin-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1000px){.premium-admin-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.premium-import-bar{grid-template-columns:1fr 150px}.premium-import-bar .premium-btn{grid-column:1/-1}}
@media(max-width:700px){.premium-page-head,.premium-toolbar{align-items:stretch;display:grid}.premium-page-head .premium-btn{width:100%}.premium-search{max-width:none}.premium-import-bar{grid-template-columns:1fr}.premium-import-bar .premium-btn{grid-column:auto}.premium-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.premium-card-body{padding:11px}.premium-card-actions{grid-template-columns:1fr auto auto}.premium-btn{font-size:10px;padding:8px}.result-count{text-align:right}}
@media(max-width:420px){.premium-admin-grid{grid-template-columns:1fr 1fr}.premium-card-actions{gap:5px}.premium-card-actions .premium-btn{padding-inline:7px}.premium-card-actions .premium-btn i+span{display:none}}

/* TMDB bulk importer */
.tmdb-bulk-card{margin:0 0 22px;padding:22px;border:1px solid rgba(100,116,139,.28);border-radius:18px;background:linear-gradient(135deg,rgba(15,23,42,.98),rgba(30,41,59,.92));box-shadow:0 18px 45px rgba(2,6,23,.22);display:grid;grid-template-columns:minmax(250px,1fr) minmax(430px,1.2fr);gap:22px;align-items:center}.tmdb-bulk-copy h2{margin:5px 0 7px;font-size:22px;color:#f8fafc}.tmdb-bulk-copy p{margin:0;color:#94a3b8;line-height:1.65}.tmdb-bulk-controls{display:flex;gap:10px;align-items:end;justify-content:flex-end;flex-wrap:wrap}.tmdb-bulk-controls label{display:grid;gap:6px;min-width:145px}.tmdb-bulk-controls label span{font-size:12px;font-weight:800;color:#94a3b8;text-transform:uppercase;letter-spacing:.06em}.tmdb-bulk-controls select{height:42px;padding:0 34px 0 12px;border-radius:10px;border:1px solid #334155;background:#0f172a;color:#f8fafc;outline:none}.tmdb-bulk-progress{grid-column:1/-1;padding-top:18px;border-top:1px solid rgba(148,163,184,.18)}.tmdb-progress-top,.tmdb-progress-stats{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;color:#cbd5e1}.tmdb-progress-track{height:12px;margin:11px 0;background:#020617;border-radius:999px;overflow:hidden;border:1px solid #334155}.tmdb-progress-track span{display:block;width:0;height:100%;background:linear-gradient(90deg,#2563eb,#06b6d4);transition:width .25s ease}.tmdb-progress-stats{justify-content:flex-start;font-size:13px}.tmdb-progress-stats span{padding:6px 10px;border-radius:999px;background:rgba(148,163,184,.1)}.tmdb-import-log{max-height:175px;overflow:auto;margin-top:13px;padding:10px;border:1px solid rgba(148,163,184,.15);border-radius:12px;background:rgba(2,6,23,.56);font-size:12px;color:#cbd5e1}.tmdb-import-log div{padding:6px 4px;border-bottom:1px dashed rgba(148,163,184,.12)}.tmdb-import-log .success,.tmdb-progress-stats .success{color:#86efac}.tmdb-import-log .updated{color:#7dd3fc}.tmdb-import-log .danger,.tmdb-progress-stats .danger{color:#fca5a5}@media(max-width:900px){.tmdb-bulk-card{grid-template-columns:1fr}.tmdb-bulk-controls{justify-content:flex-start}.tmdb-bulk-progress{grid-column:auto}}@media(max-width:560px){.tmdb-bulk-card{padding:16px}.tmdb-bulk-controls{display:grid;grid-template-columns:1fr 1fr}.tmdb-bulk-controls label{min-width:0}.tmdb-bulk-controls .premium-btn{grid-column:1/-1;justify-content:center}}
.tmdb-bulk-page{max-width:1180px}.tmdb-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:22px 0}.tmdb-filter-grid label{display:flex;flex-direction:column;gap:8px}.tmdb-filter-grid label>span{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#64748b}.tmdb-filter-grid select,.tmdb-filter-grid input{width:100%;min-height:46px;border:1px solid #dbe3ef;border-radius:12px;padding:0 13px;background:#fff;color:#0f172a}.tmdb-filter-grid select:focus,.tmdb-filter-grid input:focus{outline:2px solid rgba(37,99,235,.18);border-color:#2563eb}@media(max-width:900px){.tmdb-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.tmdb-filter-grid{grid-template-columns:1fr}}
