:root {
    --pink-50: #fff7fb;
    --pink-100: #ffe8f3;
    --pink-200: #ffc9e1;
    --pink-400: #ee6ba6;
    --pink-600: #c8417d;
    --plum-900: #3b1730;
    --ink: #47293d;
    --muted: #866f7d;
    --line: #f0dbe6;
    --mint: #4da78b;
    --amber: #c98937;
    --danger: #c94f62;
    --shadow: 0 16px 38px rgba(117, 37, 83, .10);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, "Microsoft YaHei", sans-serif; color: var(--ink); background: linear-gradient(135deg, #fffafd 0%, #fff5fa 48%, #fdf0f7 100%); min-height: 100vh; }
a { color: inherit; }
.shell { max-width: 1400px; margin: 0 auto; padding: 26px 24px 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(145deg, var(--pink-400), #a956c9); color: white; font-size: 22px; box-shadow: 0 8px 20px rgba(200, 65, 125, .24); }
.brand h1 { margin: 0; font-size: 21px; letter-spacing: .1px; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.userbar { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.notification-wrap { position: relative; flex: 0 0 auto; }
.notification-trigger { position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--pink-200); border-radius: 50%; background: #fff; color: var(--pink-600); }
.notification-trigger:hover { background: var(--pink-50); box-shadow: 0 5px 14px rgba(200, 65, 125, .16); }
.notification-icon { display: grid; place-items: center; }
.notification-icon svg { width: 18px; height: 18px; }
.notification-badge { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid #fff; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10px; line-height: 1; font-weight: 800; }
.notification-badge[hidden] { display: none; }
.notification-panel { position: absolute; z-index: 30; top: calc(100% + 10px); right: 0; width: min(360px, calc(100vw - 28px)); padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 18px 42px rgba(117, 37, 83, .18); }
.notification-panel[hidden] { display: none; }
.notification-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); color: var(--plum-900); }
.notification-mark-all { margin-left: auto; padding: 4px 7px; border: 0; background: transparent; color: var(--pink-600); font-size: 12px; font-weight: 700; }
.notification-mark-all:hover { background: var(--pink-50); color: var(--plum-900); }
.notification-delete-all { padding: 4px 7px; border: 0; background: transparent; color: var(--danger); font-size: 12px; font-weight: 700; }
.notification-delete-all:hover { background: #fff0f2; color: #a93449; }
.notification-close { width: 28px; height: 28px; padding: 0; border-radius: 50%; background: var(--pink-50); color: var(--muted); font-size: 20px; font-weight: 400; line-height: 1; }
.notification-close:hover { color: var(--pink-600); background: var(--pink-100); }
.notification-list { max-height: 320px; overflow-y: auto; padding-top: 2px; }
.notification-item { display: grid; gap: 4px; padding: 10px 2px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.5; }
.notification-item:last-child { border-bottom: 0; }
.notification-item b { color: var(--plum-900); font-size: 13px; }
.notification-item small { color: var(--muted); font-size: 11px; }
.notification-empty { padding: 18px 2px 8px; color: var(--muted); font-size: 12px; text-align: center; }
.notification-load-more { width: 100%; margin-top: 6px; padding: 9px; border-radius: 6px; background: var(--pink-50); color: var(--pink-600); font-size: 11px; }
.notification-load-more:hover { transform: none; background: var(--pink-100); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--pink-200); color: var(--pink-600); font-weight: 700; }
.button, button { border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; font: inherit; font-weight: 700; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover, button:hover { transform: translateY(-1px); }
.primary { background: var(--pink-600); color: white; box-shadow: 0 8px 18px rgba(200, 65, 125, .20); }
.secondary { background: white; color: var(--pink-600); border: 1px solid var(--pink-200); }
.ghost { background: transparent; color: var(--muted); padding: 7px 10px; }
.clear-filter { background: var(--pink-50); color: var(--pink-600); border: 1px solid var(--pink-200); text-decoration: none; }
.clear-filter:hover { background: var(--pink-100); color: var(--plum-900); }
.danger { color: var(--danger); background: #fff0f2; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: rgba(255,255,255,.90); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 25px; font-weight: 800; margin-top: 7px; color: var(--plum-900); }
.layout { display: grid; grid-template-columns: minmax(300px, 390px) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 16px; padding: 19px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 14px; font-size: 17px; }
.panel h3 { margin: 20px 0 10px; font-size: 14px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: #68495c; }
.mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #fff6fa; }
.mode-switch-button { min-height: 42px; padding: 8px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mode-switch-button:hover { background: #fff; color: var(--pink-600); transform: none; }
.mode-switch-button.active { background: #fff; color: var(--pink-600); box-shadow: 0 1px 4px rgba(88, 35, 64, .12); }
.mode-switch-button:focus-visible { outline: 2px solid var(--pink-400); outline-offset: 1px; }
input, textarea, select { width: 100%; border: 1px solid var(--line); background: #fffafe; color: var(--ink); border-radius: 9px; padding: 10px 11px; font: inherit; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--pink-400); box-shadow: 0 0 0 3px rgba(238,107,166,.12); }
textarea { min-height: 78px; resize: vertical; }
.dropzone { border: 1.5px dashed var(--pink-400); background: var(--pink-50); border-radius: 12px; padding: 17px; text-align: center; color: var(--muted); cursor: pointer; }
.dropzone strong { display: block; color: var(--pink-600); margin-bottom: 5px; }
.dropzone input { display: none; }
.progress { height: 7px; border-radius: 99px; background: #f4e6ed; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--pink-400), #a956c9); border-radius: inherit; transition: width .25s; }
.upload-item { margin-top: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.task-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.task-list-head > .task-list-tools { flex: 1 0 100%; }
.task-list-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-filters { width: 100%; display: grid !important; grid-template-columns: minmax(220px, 1.8fr) repeat(4, minmax(120px, .8fr)) auto auto; align-items: center; }
.task-filters input, .task-filters select { min-width: 0; width: 100%; max-width: none; }
@media (max-width: 620px) { .task-list-head { align-items: stretch; flex-direction: column; } .task-list-head .history-bulk-actions { width: 100%; flex-wrap: wrap; } .task-list-tools, .task-list-tools .filters { width: 100%; align-items: stretch; flex-direction: column; } }
@media (max-width: 980px) { .task-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .task-filters input { grid-column: 1 / -1; } }
.toolbar .filters { display: flex; gap: 8px; flex: 0 1 auto; align-items: center; }
.toolbar .filters input { width: 230px; max-width: 230px; }
.toolbar .filters select { width: 140px; max-width: 140px; }
.toolbar .filters .button { white-space: nowrap; }
.job { border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: #fff; margin-bottom: 11px; }
.job-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; cursor: pointer; }
.job-head-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
.job-head-tools .button { padding: 6px 9px; font-size: 12px; white-space: nowrap; }
.job-title { font-size: 15px; font-weight: 800; word-break: break-word; }
.job-meta { color: var(--muted); font-size: 12px; margin-top: 5px; line-height: 1.55; }
.job-info-line { display: flex; flex-wrap: wrap; gap: 5px 7px; }
.job-info-line > span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; padding: 4px 8px; border: 1px solid #f3dbe6; border-radius: 6px; background: #fffafd; color: #715365; }
.job-info-line > .job-category-field { border-color: #efbfd7; background: #fff5fa; }
.inline-category-select { width: auto; min-width: 96px; max-width: 176px; padding: 0 18px 0 0; border: 0; border-radius: 0; outline: 0; background: transparent; color: var(--pink-600); font: inherit; font-weight: 700; line-height: 1.25; box-shadow: none; cursor: pointer; }
.inline-category-select:focus { border: 0; box-shadow: none; }
.job-info-line b, .job-note b { color: var(--pink-600); font-weight: 800; }
.job-info-line b::after, .job-note b::after { content: '：'; }
.job-note { display: inline-flex; align-items: baseline; gap: 5px; max-width: 100%; margin-top: 6px; padding: 4px 8px; border-left: 3px solid var(--pink-300); background: #fff7fa; color: var(--muted); font-size: 12px; line-height: 1.5; word-break: break-word; }
.job-expand-hint { margin-left: auto; color: var(--pink-600); font-size: 11px; white-space: nowrap; }
.job.job-collapsed > .notice, .job.job-collapsed > .urls, .job.job-collapsed > .job-actions { display: none; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-queued { background: #fff3d9; color: #9b6a13; }
.status-processing, .status-downloading, .status-analyzing { background: #e9f1ff; color: #4063a7; }
.status-completed { background: #e4f7ef; color: #2a7f62; }
.status-failed, .status-cancelled { background: #ffebee; color: #b44559; }
.job-progress { margin: 11px 0 9px; display: flex; align-items: center; gap: 10px; }
.job-progress .progress { flex: 1; }
.job-progress b { font-size: 12px; color: var(--pink-600); min-width: 42px; text-align: right; }
.job-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.history-bulk-actions { display: flex; align-items: center; gap: 8px; }
.history-select-all, .history-job-select { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; cursor: pointer; }
.history-job-select { flex: 0 0 auto; padding-top: 2px; }
.history-job-select input, .history-select-all input, .history-job-checkbox { accent-color: var(--pink-600); }
.history-bulk-actions[hidden] { display: none; }
.job-actions .button, .job-actions button { font-size: 12px; padding: 7px 9px; }
@media (max-width: 620px) { .job-head { flex-wrap: wrap; } .job-head-tools { width: 100%; justify-content: flex-start; margin-left: 30px; } }
.urls { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 10px; }
.url-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.urls > .url-row:first-child { grid-template-columns: 76px minmax(0, 1fr) auto auto; }
.url-row.url-row-tools { grid-template-columns: 96px minmax(0, 1fr) auto auto; }
.cover-preview { width: 150px; height: 106px; margin: 3px 0 5px 76px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #fff7fa; }
.cover-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.url-row .url-tool { min-height: 34px; padding: 7px 10px; border: 1px solid transparent; border-radius: 7px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 11px; font-weight: 800; box-shadow: none; }
.url-row .url-tool span { font-size: 15px; line-height: 1; }
.url-row .url-tool-hls { border-color: #b9ddd5; background: #edf9f6; color: #237063; }
.url-row .url-tool-hls:hover { border-color: #75b9aa; background: #dcf3ed; color: #15584d; }
.url-row .url-tool-code { border-color: #ead2a4; background: #fff8e8; color: #88601d; }
.url-row .url-tool-code:hover { border-color: #d5ae60; background: #fff0cd; color: #69470f; }
.url-row input { font-size: 11px; padding: 7px 8px; color: #6f4b62; }
@media (max-width: 620px) { .url-row, .url-row.url-row-tools { grid-template-columns: minmax(0, 1fr) auto auto; } .url-row > span { grid-column: 1 / -1; } }
.notice { padding: 10px 12px; border-radius: 10px; background: #fff4db; color: #805e22; font-size: 12px; margin-bottom: 10px; }
.notice.success { background: #e4f7ef; color: #286c56; }
.remote-preview-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(54, 23, 45, .38); backdrop-filter: blur(3px); }
.remote-preview-modal[hidden] { display: none; }
.remote-preview-dialog { width: min(760px, 100%); max-height: min(720px, calc(100vh - 40px)); display: flex; flex-direction: column; border: 1px solid var(--pink-200); border-radius: 14px; background: #fff; box-shadow: 0 28px 72px rgba(59, 23, 48, .25); overflow: hidden; }
.remote-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.remote-preview-head h2 { margin: 0; color: var(--plum-900); font-size: 18px; }
.remote-preview-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.remote-preview-list { display: grid; gap: 10px; padding: 14px 20px; overflow-y: auto; }
.remote-preview-item { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--pink-50); }
.remote-preview-item b { display: block; margin-bottom: 8px; color: var(--plum-900); font-size: 13px; }
.remote-preview-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; padding: 3px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.remote-preview-row input, .remote-preview-row select { min-width: 0; padding: 6px 8px; border-radius: 7px; background: #fff; color: var(--ink); font-size: 12px; }
.remote-preview-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fffafd; }
.empty { text-align: center; color: var(--muted); padding: 46px 20px; border: 1px dashed var(--line); border-radius: 12px; }
.login-shell { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card { width: min(420px, 100%); background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: 0 22px 60px rgba(117,37,83,.14); }
.login-card .brand { margin-bottom: 22px; }
.login-links { margin-top: 18px; text-align: center; font-size: 12px; color: var(--pink-600); }
.login-links a { text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.landing { max-width: 1240px; min-height: 100vh; margin: 0 auto; padding: 26px 24px 30px; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 70px; align-items: center; padding: 78px 0 68px; }
.landing-copy { max-width: 620px; }
.landing-eyebrow { color: var(--pink-600); font-size: 11px; font-weight: 800; letter-spacing: 1.8px; }
.landing-copy h2 { margin: 14px 0 18px; color: var(--plum-900); font-size: 52px; line-height: 1.12; letter-spacing: 0; }
.landing-copy h2 strong { color: var(--pink-600); font-weight: 800; }
.landing-copy p { max-width: 560px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.85; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.landing-actions .button { min-width: 126px; text-align: center; }
.landing-note { margin-top: 15px; color: var(--muted); font-size: 12px; }
.landing-preview { max-width: 470px; justify-self: end; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.7); box-shadow: 0 24px 60px rgba(117,37,83,.14); transform: rotate(1.5deg); }
.preview-top { display: flex; align-items: center; gap: 6px; padding: 7px 8px 13px; color: var(--muted); font-size: 11px; }
.preview-top span { width: 7px; height: 7px; border-radius: 50%; background: var(--pink-200); }
.preview-top span:first-child { background: var(--pink-400); }
.preview-top b { margin-left: auto; font-size: 11px; font-weight: 700; }
.preview-screen { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 14px; background: linear-gradient(145deg, #4d2648, #b95787 62%, #ed9dbd); overflow: hidden; position: relative; }
.preview-screen::before { content: ''; width: 170px; height: 170px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; position: absolute; }
.preview-play { display: grid; place-items: center; width: 54px; height: 54px; padding-left: 3px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--pink-600); font-size: 18px; z-index: 1; }
.preview-line { position: absolute; left: 20px; bottom: 31px; width: 27%; height: 5px; border-radius: 5px; background: rgba(255,255,255,.48); }
.preview-line.wide { bottom: 43px; width: 45%; background: rgba(255,255,255,.7); }
.preview-progress { position: absolute; left: 20px; right: 20px; bottom: 18px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); overflow: hidden; }
.preview-progress span { display: block; width: 68%; height: 100%; background: white; }
.preview-meta { display: flex; justify-content: space-between; padding: 13px 7px 3px; color: var(--muted); font-size: 12px; }
.preview-meta strong { color: var(--pink-600); }
.landing-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.landing-feature { padding: 19px 17px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.78); }
.feature-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 10px; background: var(--pink-100); color: var(--pink-600); font-weight: 800; }
.landing-feature h3 { margin: 0 0 8px; color: var(--plum-900); font-size: 14px; }
.landing-feature p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.landing-footer { padding-top: 34px; color: var(--muted); font-size: 11px; text-align: center; }
.landing .brand-mark { flex: 0 0 auto; }
@media (max-width: 980px) { .landing-hero { grid-template-columns: 1fr; gap: 34px; padding: 56px 0 45px; } .landing-preview { justify-self: start; max-width: 560px; } .landing-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .landing { padding: 18px 14px 24px; } .landing-nav .button { padding: 8px 10px; font-size: 12px; } .landing-nav .brand h1 { font-size: 17px; } .landing-nav .brand small { display: none; } .landing-hero { padding: 58px 0 42px; } .landing-copy h2 { font-size: 39px; } .landing-copy p { font-size: 14px; } .landing-preview { transform: none; } .landing-features { grid-template-columns: 1fr; } }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 10; padding: 12px 15px; border-radius: 10px; background: var(--plum-900); color: white; box-shadow: var(--shadow); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.admin-overview { margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.admin-overview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.admin-eyebrow { color: var(--pink-600); font-size: 11px; font-weight: 800; letter-spacing: 1.4px; }
.admin-overview h2 { margin: 5px 0 4px; color: var(--plum-900); font-size: 24px; }
.admin-overview p { margin: 0; color: var(--muted); font-size: 12px; }
.admin-overview-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.admin-stat-card { min-height: 116px; padding: 15px; border: 1px solid transparent; border-radius: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.admin-stat-card span { font-size: 12px; font-weight: 700; }
.admin-stat-card strong { margin-top: 8px; color: var(--plum-900); font-size: 27px; line-height: 1; }
.admin-stat-card small { margin-top: 8px; color: var(--muted); font-size: 11px; }
.admin-stat-pink { background: #fff0f7; border-color: #ffd2e6; }
.admin-stat-purple { background: #f5efff; border-color: #e0d2ff; }
.admin-stat-mint { background: #ecfbf5; border-color: #ccefe0; }
.admin-stat-amber { background: #fff8e9; border-color: #f6e3b1; }
.admin-stat-blue { background: #eef7ff; border-color: #d2e8ff; }
.admin-stat-red { background: #fff0f1; border-color: #f3c6cc; }
.admin-chart-panel { margin-top: 14px; padding: 17px 18px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.admin-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-chart-head h3 { margin: 0 0 4px; color: var(--plum-900); font-size: 14px; }
.admin-chart-head p { font-size: 11px; }
.chart-legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--pink-400); }
.admin-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; align-items: end; height: 144px; margin-top: 10px; padding-top: 12px; border-top: 1px solid #f8e9f1; }
.chart-column { display: grid; grid-template-rows: 18px 1fr 17px; gap: 4px; min-width: 0; height: 100%; text-align: center; }
.chart-count { color: var(--muted); font-size: 10px; }
.chart-track { display: flex; align-items: end; justify-content: center; height: 100%; }
.chart-bar { position: relative; width: min(32px, 64%); min-height: 4px; border-radius: 8px 8px 3px 3px; background: #f3d9e7; overflow: hidden; }
.chart-bar span { position: absolute; right: 0; bottom: 0; left: 0; border-radius: inherit; background: linear-gradient(180deg, var(--pink-400), var(--pink-600)); }
.chart-column small { color: var(--muted); font-size: 10px; }
.admin-tools-drawer, .admin-disclosure { border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); overflow: hidden; }
.admin-tools-drawer > summary, .admin-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; color: var(--plum-900); }
.admin-tools-drawer > summary::-webkit-details-marker, .admin-disclosure > summary::-webkit-details-marker { display: none; }
.admin-tools-drawer > summary > span, .admin-disclosure > summary > span { display: grid; gap: 4px; }
.admin-tools-drawer > summary b, .admin-disclosure > summary b { font-size: 15px; }
.admin-tools-drawer > summary small, .admin-disclosure > summary small { color: var(--muted); font-size: 11px; font-weight: 400; }
.admin-tools-drawer > summary > strong, .admin-disclosure > summary > strong { color: var(--pink-600); font-size: 18px; transition: transform .18s; }
.admin-tools-drawer[open] > summary > strong, .admin-disclosure[open] > summary > strong { transform: rotate(180deg); }
.admin-tools-body { display: grid; gap: 14px; padding: 0 12px 12px; }
.admin-tools-body .panel { box-shadow: none; }
.admin-disclosure-body { padding: 0 18px 16px; }
.admin-disclosure > .panel { margin: 0 !important; padding: 0 18px 16px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.admin-disclosure-body h2 { margin-top: 0; }
.admin-anchor { display: block; position: relative; top: -16px; }
.panel, .admin-overview, .admin-tools-drawer, .admin-disclosure { border-color: #efc8dc; background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,245,250,.96)); }
.job { border-color: #efc8dc; background: linear-gradient(180deg, #fffafd 0%, #fff7fb 100%); box-shadow: 0 8px 22px rgba(196, 65, 125, .06); }
.secondary { background: #fff7fb; border-color: #efb8d3; }
.ghost { color: var(--pink-600); }
.job-actions .ghost, .admin-tools-body .ghost { border: 1px solid #efbfd7; border-radius: 9px; background: #fff1f8; color: var(--pink-600); }
.admin-stat-purple { background: #faeff9; border-color: #eccde4; }
.admin-stat-amber { background: #fff1f4; border-color: #f4cbd8; }
.admin-stat-blue { background: #f8f0fb; border-color: #e8d2ed; }
.admin-chart-panel { border-color: #efc8dc; background: #fffafd; }
.admin-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 15px; padding-top: 12px; border-top: 1px solid #f5d8e6; color: var(--muted); font-size: 11px; }
.admin-pagination.compact { margin-top: 12px; }
.admin-page-size { margin-left: auto; }
.admin-page-size label { display: inline-flex; align-items: center; gap: 5px; }
.admin-page-size select { width: auto; min-width: 62px; padding: 5px 7px; border-radius: 8px; background: #fff7fb; font-size: 11px; }
.admin-pagination nav { display: inline-flex; align-items: center; gap: 4px; }
.admin-pagination nav a { min-width: 27px; padding: 5px 7px; border: 1px solid #efc8dc; border-radius: 8px; background: #fffafd; color: var(--pink-600); text-align: center; text-decoration: none; }
.admin-pagination nav a:hover, .admin-pagination nav a.active { border-color: var(--pink-400); background: var(--pink-100); color: var(--plum-900); }
.admin-view-panel[hidden] { display: none !important; }
.layout > #admin-tools { position: sticky; top: 18px; }
.admin-tree { padding: 17px 12px 13px; border: 1px solid #efc8dc; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,245,250,.96)); box-shadow: var(--shadow); }
.admin-tree-heading { display: grid; gap: 4px; padding: 3px 8px 16px; border-bottom: 1px solid #f5d8e6; color: var(--plum-900); }
.admin-tree-heading b { font-size: 17px; }
.admin-tree-heading small { color: var(--muted); font-size: 11px; }
.admin-tree-group { display: grid; gap: 4px; padding-top: 14px; }
.admin-tree-label { padding: 0 9px 5px; color: var(--pink-600); font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.admin-tree-item { display: grid; gap: 3px; width: 100%; padding: 10px 10px 10px 13px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; }
.admin-tree-item span { font-size: 13px; font-weight: 800; }
.admin-tree-item small { color: var(--muted); font-size: 10px; font-weight: 400; }
.admin-tree-item:hover { transform: none; border-color: #f1c4d9; background: #fff0f7; }
.admin-tree-item.active { border-color: #eca9c9; background: linear-gradient(90deg, #ffe5f1, #fff4fa); color: var(--pink-600); box-shadow: inset 3px 0 0 var(--pink-400); }
.admin-tree-item.active small { color: #9e5d7b; }
main > .admin-view-panel:not([hidden]) { margin-top: 0 !important; }
.admin-video-filters { display: grid; grid-template-columns: minmax(190px, 1.6fr) repeat(5, minmax(115px, 1fr)) auto auto; gap: 8px; align-items: center; margin: 14px 0 8px; }
.admin-video-filters input, .admin-video-filters select { min-width: 0; padding: 9px 10px; }
.admin-user-filters { display: grid; grid-template-columns: minmax(220px, 1fr) 150px auto auto; gap: 8px; align-items: center; margin: 14px 0; }
.admin-result-count { margin: 10px 0 12px; }
.admin-video-list { display: grid; gap: 10px; }
.admin-video-card { margin-bottom: 0; }
.admin-video-card .job-meta { line-height: 1.6; }
.domain-route-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 16px 0; }
.domain-route-field { margin: 0; padding: 13px; border: 1px solid #dfe8e5; border-radius: 7px; background: #f8faf9; }
.domain-route-field:first-child { grid-column: 1 / -1; }
.domain-route-field textarea { min-height: 86px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.55; }
.domain-route-field small { color: var(--muted); font-size: 10px; }
.admin-video-title-line { display: flex; gap: 8px; align-items: flex-start; min-width: 0; flex: 1; }
.admin-video-title-line > div { min-width: 0; }
.system-health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.system-health-item { min-height: 104px; padding: 14px; border: 1px solid #dce7e4; border-radius: 8px; background: #f7fbfa; display: grid; align-content: space-between; }
.system-health-item span { color: #55706a; font-size: 12px; font-weight: 700; }
.system-health-item strong { color: #173d35; font-size: 25px; }
.system-health-item small { color: var(--muted); font-size: 10px; }
.system-runtime-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.system-runtime-list > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: 12px; }
.system-runtime-list > div:last-child { border-bottom: 0; }
.system-runtime-list span { color: var(--muted); }
.system-runtime-list code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #325e55; }
.system-settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.system-settings-form .field { margin: 0; }
.system-settings-form .button { align-self: end; justify-self: start; }
.setting-toggle { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; cursor: pointer; }
.setting-toggle input { grid-row: 1 / span 2; width: 18px; height: 18px; accent-color: #277566; }
.setting-toggle span { font-size: 12px; font-weight: 800; }
.setting-toggle small { color: var(--muted); font-size: 10px; }
.history-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.history-summary > div { min-height: 88px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 6px 18px rgba(76, 38, 61, .05); }
.history-summary span { color: var(--muted); font-size: 11px; font-weight: 700; }
.history-summary strong { color: var(--plum-900); font-size: 24px; }
.history-panel .task-list-head { margin-bottom: 14px; }
.history-filters { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(120px, .75fr)) auto auto auto; gap: 8px; align-items: center; margin: 0 0 16px; }
.history-filters input, .history-filters select { min-width: 0; }
.history-pagination { display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(0, 1.7fr); align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.history-page-size { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 12px; }
.history-page-size label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.history-page-size select { width: auto; min-width: 78px; padding: 6px 8px; border-radius: 7px; font-size: 12px; }
.history-page-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; }
.history-page-links a, .history-page-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid #efc8dc; border-radius: 6px; background: #fffafd; color: var(--pink-600); font-size: 12px; font-weight: 700; line-height: 1; text-decoration: none; }
.history-page-links a:hover { border-color: var(--pink-400); background: #fff0f7; color: var(--plum-900); }
.history-page-links a.active { border-color: var(--pink-600); background: var(--pink-600); color: #fff; }
.history-page-links .history-page-control { min-width: 52px; }
.history-page-ellipsis { border-color: transparent; background: transparent; color: var(--muted); }
.history-export-fields { position: relative; }
.history-export-fields > summary { list-style: none; cursor: pointer; white-space: nowrap; }
.history-export-fields > summary::-webkit-details-marker { display: none; }
.history-export-menu { position: absolute; z-index: 20; top: calc(100% + 7px); right: 0; width: 310px; padding: 13px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 16px 36px rgba(55, 25, 44, .16); }
.history-export-menu strong { font-size: 12px; }
.history-export-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.history-export-menu label { display: flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; }
.history-export-menu input { width: 16px; height: 16px; accent-color: var(--pink-600); }
.history-export-move { display: inline-flex; gap: 2px; }
.history-export-move .icon-button { min-width: 24px; padding: 2px 5px; border-radius: 4px; background: #fff0f7; color: var(--plum-900); font-size: 13px; line-height: 1.2; }
.history-export-move .icon-button:hover { transform: none; background: #ffe2ef; }
.history-export-menu small { padding-top: 5px; border-top: 1px solid var(--line); color: var(--muted); }
.history-export-link-mode { display: grid !important; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); }
.history-export-link-mode select { min-width: 0; padding: 7px 8px; font-size: 11px; }
.history-export-formats { display: grid; gap: 7px; padding-top: 9px; border-top: 1px solid var(--line); }
.history-export-formats > div { display: flex; gap: 6px; }
.history-export-formats .button { flex: 1; padding: 7px 9px; text-align: center; }
.history-panel .job { border-radius: 8px; box-shadow: none; }
.history-panel .job-head > div { min-width: 0; flex: 1; }

.admin-page { background: #f4f7f6; color: #263a36; }
.admin-page .admin-shell { max-width: 1540px; }
.admin-page .topbar { margin-bottom: 16px; padding: 12px 16px; border: 1px solid #dce6e3; border-radius: 8px; background: #fff; }
.admin-page .brand-mark { border-radius: 7px; background: #277566; box-shadow: none; }
.admin-page .admin-overview { padding: 18px; border-color: #dce6e3; border-radius: 8px; background: #fff; box-shadow: none; }
.admin-page .admin-overview-head { margin-bottom: 14px; }
.admin-page .admin-eyebrow { color: #277566; letter-spacing: 0; }
.admin-page .admin-stat-card { min-height: 96px; border-radius: 7px; background: #f8faf9; border-color: #dfe8e5; }
.admin-page .admin-stat-card strong { color: #173d35; }
.admin-page .admin-chart-panel { border-color: #dfe8e5; border-radius: 7px; }
.admin-page .layout { grid-template-columns: 245px minmax(0, 1fr); gap: 14px; }
.admin-page .admin-tree { padding: 12px 8px; border-color: #dce6e3; border-radius: 8px; background: #fff; box-shadow: none; }
.admin-page .admin-tree-heading { border-color: #e6eeec; }
.admin-page .admin-tree-label { color: #648078; letter-spacing: 0; }
.admin-page .admin-tree-item { border-radius: 6px; }
.admin-page .admin-tree-item:hover { border-color: #c9ddd8; background: #f0f8f6; }
.admin-page .admin-tree-item.active { border-color: #9fc9bf; background: #e8f5f2; color: #1d6658; box-shadow: inset 3px 0 0 #277566; }
.admin-page .panel { padding: 18px; border-color: #dce6e3; border-radius: 8px; background: #fff; box-shadow: none; }
.admin-page .job { border-color: #dfe8e5; border-radius: 7px; background: #fff; }
.admin-page .admin-video-filters, .admin-page .admin-user-filters { padding: 12px; border: 1px solid #e1eae7; border-radius: 7px; background: #f8faf9; }
.admin-page .admin-pagination { border-color: #e1eae7; }
.admin-page .admin-pagination nav a { border-color: #cfded9; border-radius: 5px; background: #fff; color: #277566; }
.admin-page .admin-pagination nav a:hover, .admin-page .admin-pagination nav a.active { border-color: #88b9ae; background: #e8f5f2; color: #174f44; }
input, textarea, select { border-color: #efc8dc; background: #fff8fc; }
.login-card, .landing-preview, .landing-feature, .upload-item, .empty { border-color: #efc8dc; background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,245,250,.96)); }
.dropzone { border-color: #e978ad; background: #fff0f7; }
.url-row input { border-color: #efc8dc; background: #fff8fc; }
.admin-page input, .admin-page textarea, .admin-page select { border-color: #ceddd9; background: #fff; color: #263a36; }
.admin-page input:focus, .admin-page textarea:focus, .admin-page select:focus { border-color: #6eaa9d; box-shadow: 0 0 0 3px rgba(39, 117, 102, .12); }
@media (max-width: 1180px) { .admin-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .system-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) { .history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .history-filters > input:first-of-type { grid-column: 1 / -1; } .admin-page .layout { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .admin-overview { padding: 16px; } .admin-overview-head { flex-direction: column; } .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-chart { gap: 7px; } .admin-video-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .system-settings-form { grid-template-columns: 1fr; } .history-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .domain-route-grid { grid-template-columns: 1fr; } .domain-route-field:first-child { grid-column: auto; } }
@media (max-width: 480px) { .admin-stat-grid { grid-template-columns: 1fr; } .admin-chart-panel { padding-inline: 10px; } .admin-video-filters { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .history-pagination { grid-template-columns: 1fr; align-items: start; } .history-page-links { justify-content: flex-start; } }
@media (max-width: 620px) { .history-filters { grid-template-columns: 1fr; } .history-filters > input:first-of-type { grid-column: auto; } .history-filters .button { width: 100%; } .history-bulk-actions { width: 100%; justify-content: flex-start; } .history-export-menu { position: static; width: 100%; margin-top: 7px; } }
@media (max-width: 980px) { .layout > #admin-tools { position: static; } }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .shell { padding: 18px 13px 32px; } .topbar { align-items: flex-start; } .userbar > span { display: none; } .stats { gap: 9px; } .stat { padding: 13px; } .stat-value { font-size: 21px; } .toolbar, .toolbar .filters { align-items: stretch; flex-direction: column; } .toolbar .filters input, .toolbar .filters select { width: 100%; max-width: none; } .job-head { flex-direction: column; } .job-expand-hint { margin-left: 0; } .url-row { grid-template-columns: 62px minmax(0, 1fr); } .url-row button { grid-column: 2; justify-self: start; } }

/* Unified task and management layouts */
#jobsList, .admin-video-list, .user-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(390px, 100%), 1fr)); gap: 12px; align-items: start; }
#jobsList > .empty, .admin-video-list > .empty, .user-list > .empty { grid-column: 1 / -1; }
#jobsList > .job, .admin-video-list > .job, .user-list > .job { min-width: 0; margin: 0; }
.job.job-collapsed { min-height: 132px; display: grid; grid-template-rows: 1fr auto; align-content: space-between; }
.job.job-collapsed .job-title { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.job.job-collapsed .job-meta { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.job-head > div { min-width: 0; flex: 1; }
.job-head > .job-head-tools { flex: 0 0 auto; min-width: auto; }
.job-head > .status { flex: 0 0 auto; }

.bulk-action-bar { min-height: 44px; padding: 6px 7px 6px 10px; border: 1px solid #dce6e3; border-radius: 7px; background: #f8faf9; }
.bulk-action-bar.has-selection { border-color: #9fc9bf; background: #edf7f4; }
.bulk-selected-count { padding-left: 9px; border-left: 1px solid #d8e4e0; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.bulk-action-buttons { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; }
.bulk-action-bar .button { min-height: 32px; padding: 6px 10px; border-radius: 6px; font-size: 11px; }
.bulk-action-bar .button:disabled { cursor: not-allowed; opacity: .45; transform: none; box-shadow: none; }
.admin-page .bulk-action-bar { margin-left: auto; }
.task-list-tools { margin: 14px 0; }
.admin-video-filters { margin-bottom: 14px; }
.admin-result-count { display: flex; align-items: center; min-height: 28px; margin: 0 0 10px; }
.admin-page .user-list { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.admin-page .user-list .job { height: 100%; }
.admin-page .user-list .job-actions { margin-top: 14px; }
.management-list { display: grid; gap: 8px; margin-top: 13px; }
.management-row { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #dfe8e5; border-radius: 7px; background: #f8faf9; }
.management-edit-form { min-width: 0; flex: 1; display: grid; grid-template-columns: minmax(180px, 1fr) 92px auto auto; gap: 7px; align-items: center; }
.management-edit-form input, .management-edit-form select { min-width: 0; padding: 8px 9px; }
.domain-edit-form { grid-template-columns: 170px minmax(240px, 1fr) auto auto; }
.management-row-actions { display: flex; gap: 5px; align-items: center; padding-left: 8px; border-left: 1px solid #dce6e3; }
.management-row-actions form { margin: 0; }
.management-row .button { padding: 7px 9px; border-radius: 6px; font-size: 11px; white-space: nowrap; }

@media (min-width: 1700px) {
    .admin-page .admin-video-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    #jobsList, .admin-video-list, .user-list { grid-template-columns: 1fr; }
    .bulk-action-bar { width: 100%; align-items: center; }
    .bulk-action-buttons { width: 100%; margin: 2px 0 0; }
    .bulk-action-buttons .button { flex: 1; }
    .task-list-head { align-items: stretch; }
    .management-row { align-items: stretch; flex-direction: column; }
    .management-edit-form, .domain-edit-form { width: 100%; grid-template-columns: 1fr; }
    .management-row-actions { width: 100%; padding: 8px 0 0; border-top: 1px solid #dce6e3; border-left: 0; }
    .management-row-actions form, .management-row-actions .button { flex: 1; }
}
