:root {
    --bg: #fbf7f1;
    --bg-accent: #fffdf9;
    --panel: rgba(255, 255, 255, 0.82);
    --text: #221d1a;
    --muted: #7b7267;
    --line: rgba(104, 84, 65, 0.14);
    --shadow: 0 18px 45px rgba(128, 98, 52, 0.12);
    --radius: 24px;
    --radius-sm: 16px;
    --brand: #5a5cf1;
    --coral: linear-gradient(135deg, #ffe0d6 0%, #fff2ec 100%);
    --sky: linear-gradient(135deg, #d9efff 0%, #edf7ff 100%);
    --sand: linear-gradient(135deg, #ffefcc 0%, #fff7e6 100%);
    --mist: linear-gradient(135deg, #e4e7f6 0%, #f5f7fb 100%);
    --accent: linear-gradient(135deg, #fffbef 0%, #fef5dd 100%);
}

/* Creator monitoring */
.nav-section-label {
    margin: 16px 14px 5px;
    color: rgba(88, 66, 48, 0.48);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.nav-link-child {
    margin-left: 12px;
    padding-left: 22px;
    font-size: 13px;
}

.monitor-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 28px;
    align-items: center;
    margin-bottom: 18px;
    padding: 28px 32px;
    border: 1px solid rgba(106, 87, 67, 0.08);
    border-radius: 24px;
    background: linear-gradient(120deg, #fffaf3 0%, #f1f8f6 58%, #eaf5f4 100%);
    box-shadow: 0 18px 45px rgba(75, 58, 40, 0.06);
}

.monitor-hero h2 {
    margin: 7px 0 10px;
    max-width: 850px;
    color: #14272a;
    font-family: "Noto Sans SC", sans-serif;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.25;
}

.monitor-hero p { margin: 0; color: #68787a; line-height: 1.8; }

.monitor-service-card {
    display: flex;
    min-height: 128px;
    padding: 20px 22px;
    border-radius: 20px;
    color: #fff;
    background: #0f4d47;
    flex-direction: column;
    justify-content: center;
}

.monitor-service-card span { color: rgba(255,255,255,.7); font-size: 12px; font-weight: 700; }
.monitor-service-card strong { margin: 5px 0; font-size: 25px; }
.monitor-service-card small { color: rgba(255,255,255,.74); line-height: 1.55; }
.monitor-service-card.warning { background: #9a641d; }

.server-storage-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(420px, 1fr) auto;
    gap: 22px;
    align-items: center;
    margin-bottom: 18px;
    padding: 20px 24px;
}

.server-storage-panel h3 { margin: 5px 0 7px; color: #183638; font-size: 21px; }
.server-storage-panel p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.server-storage-panel.storage-warning { border-color: rgba(218, 76, 62, .36); box-shadow: 0 16px 36px rgba(218, 76, 62, .1); }
.server-storage-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.server-storage-metrics span { min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(246, 250, 248, .8); }
.server-storage-metrics small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.server-storage-metrics strong { display: block; overflow-wrap: anywhere; color: #143f3c; font-size: 16px; }
.server-storage-actions { display: flex; flex-direction: column; gap: 8px; }

.monitor-subnav {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 18px;
    padding: 5px;
    gap: 5px;
    overflow-x: auto;
    border: 1px solid rgba(106, 87, 67, 0.1);
    border-radius: 16px;
    background: rgba(255,255,255,.78);
}

.monitor-subnav a {
    padding: 10px 18px;
    border-radius: 11px;
    color: #617174;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.monitor-subnav a.active { color: #fff; background: #11796f; box-shadow: 0 7px 17px rgba(17,121,111,.2); }
.monitor-flow-panel {
    margin-bottom: 18px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(17, 121, 111, .12);
    border-radius: 22px;
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 14px 35px rgba(75, 58, 40, .05);
}

.monitor-flow-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 17px;
}

.monitor-flow-heading h3 { margin: 5px 0 0; color: #183436; font-size: 21px; }
.monitor-flow-heading small { max-width: 440px; color: #748183; line-height: 1.65; text-align: right; }
.monitor-flow-track {
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    width: 100%;
    overflow-x: auto;
    padding: 4px 2px 10px;
}

.monitor-flow-track > i {
    align-self: center;
    color: #b5c2c0;
    font-style: normal;
    font-size: 20px;
}

.monitor-flow-step {
    display: grid;
    flex: 1 0 118px;
    min-height: 106px;
    align-content: center;
    gap: 4px;
    padding: 14px;
    border: 1px solid rgba(17, 121, 111, .1);
    border-radius: 15px;
    background: linear-gradient(145deg, #f8fcfa, #fffaf4);
}

.monitor-flow-step b { color: #d69832; font-size: 11px; letter-spacing: .14em; }
.monitor-flow-step span { color: #183436; font-size: 13px; font-weight: 900; white-space: nowrap; }
.monitor-flow-step small { color: #7e8a8b; font-size: 11px; line-height: 1.45; }
.monitor-anchor-nav {
    position: sticky;
    z-index: 7;
    top: 12px;
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 18px;
    padding: 5px;
    gap: 5px;
    overflow-x: auto;
    border: 1px solid rgba(106, 87, 67, .1);
    border-radius: 16px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 28px rgba(75, 58, 40, .08);
    backdrop-filter: blur(12px);
}

.monitor-anchor-nav a {
    padding: 9px 14px;
    border-radius: 11px;
    color: #617174;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.monitor-anchor-nav a:hover { color: #fff; background: #11796f; }
.monitor-anchor-section { scroll-margin-top: 84px; }
.monitor-page-section { margin-top: 18px; }
.monitor-two-up { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); }
.monitor-form-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 15px; }

.monitor-fieldset {
    padding: 15px;
    border: 1px solid rgba(105, 86, 68, .12);
    border-radius: 16px;
    background: rgba(252, 250, 247, .72);
}

.monitor-fieldset legend { padding: 0 7px; color: #785f46; font-size: 12px; font-weight: 800; }
.monitor-mode-picker { margin-top: 14px; }
.monitor-mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.monitor-mode-option {
    display: flex;
    align-items: flex-start;
    min-height: 74px;
    padding: 14px;
    gap: 10px;
    border: 1px solid rgba(105, 86, 68, .14);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}
.monitor-mode-option:has(input:checked) { border-color: rgba(17, 121, 111, .52); background: rgba(17, 121, 111, .07); box-shadow: 0 0 0 2px rgba(17, 121, 111, .08); }
.monitor-mode-option input { width: 17px; height: 17px; margin-top: 2px; flex: 0 0 auto; accent-color: #11796f; }
.monitor-mode-option span, .monitor-mode-option strong, .monitor-mode-option small { display: block; }
.monitor-mode-option strong { color: #173f3c; font-size: 14px; }
.monitor-mode-option small { margin-top: 5px; color: #778482; line-height: 1.45; }
.monitor-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.monitor-option-grid label { display: flex; align-items: center; min-height: 36px; gap: 9px; font-size: 13px; font-weight: 700; }
.monitor-option-grid input, .monitor-authorization input, .monitor-target-option input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: #11796f; }
.monitor-language-field { margin-top: 13px; }
.monitor-language-field textarea { width: 100%; min-height: 86px; resize: vertical; }
.monitor-language-field small { display: block; margin-top: 6px; color: #7d8885; font-size: 12px; }
.monitor-bgm-upload {
    display: grid;
    margin-top: 13px;
    padding: 14px;
    gap: 10px;
    border: 1px dashed rgba(17, 121, 111, .28);
    border-radius: 14px;
    background: rgba(235, 248, 245, .56);
}
.monitor-bgm-upload-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.monitor-bgm-upload-heading > div { display: grid; gap: 4px; }
.monitor-bgm-upload-heading strong { color: #234b48; font-size: 13px; }
.monitor-bgm-upload-heading small { color: #718784; font-size: 12px; }
.monitor-bgm-file-list { display: grid; max-height: 190px; gap: 7px; overflow-y: auto; }
.monitor-bgm-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    gap: 10px;
    border: 1px solid rgba(17, 121, 111, .12);
    border-radius: 10px;
    background: #fff;
}
.monitor-bgm-file > span { display: grid; min-width: 0; gap: 3px; }
.monitor-bgm-file strong { overflow: hidden; color: #2e4a49; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.monitor-bgm-file small { color: #8a9795; font-size: 11px; }
.monitor-processing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-top: 14px; }
.monitor-processing-grid > label { display: grid; align-content: start; gap: 7px; min-width: 0; }
.monitor-inline-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 7px; }
.monitor-inline-range b { color: #85908c; font-weight: 700; }

.monitor-target-list {
    display: grid;
    max-height: 470px;
    padding: 4px;
    gap: 7px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-y: auto;
}

.monitor-target-option {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    padding: 11px 12px;
    gap: 7px;
    border: 1px solid rgba(105, 86, 68, .1);
    border-radius: 11px;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
}

.monitor-target-option input, .monitor-target-option .platform-dot { margin-top: 3px; }
.monitor-target-option-copy { display: grid; min-width: 0; gap: 4px; }
.monitor-target-option-copy strong { color: #233f40; font-size: 12px; overflow-wrap: anywhere; }
.monitor-target-option-copy small { color: #879294; font-size: 11px; font-weight: 500; line-height: 1.45; }

.platform-dot { width: 8px; height: 8px; border-radius: 99px; background: #ff4d70; }
.platform-dot.youtube { background: #e42121; }

.monitor-authorization {
    display: flex;
    align-items: flex-start;
    padding: 14px 15px;
    gap: 11px;
    border: 1px solid rgba(220, 143, 34, .22);
    border-radius: 14px;
    background: #fff8e9;
}

.monitor-authorization span { display: grid; gap: 4px; }
.monitor-authorization strong { color: #59472f; font-size: 13px; }
.monitor-authorization small { color: #8a775d; line-height: 1.5; }
.monitor-list-panel { margin-top: 18px; }
.monitor-table { min-width: 1080px; }
.monitor-table td { vertical-align: top; }
.monitor-table td > strong, .monitor-table td > small { display: block; }
.monitor-table td > small { max-width: 260px; margin-top: 5px; color: #889294; line-height: 1.45; }
.monitor-table a:not(.ghost-button) { color: #5b50dc; font-weight: 700; text-decoration: none; }
.monitor-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.monitor-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: #766b60;
    background: #f2efeb;
    font-size: 11px;
    font-weight: 800;
}

.monitor-status.completed { color: #0e7768; background: #e3f6f0; }
.monitor-status.published { color: #0e7768; background: #e3f6f0; }
.monitor-status.publish_pending, .monitor-status.publishing { color: #356a9c; background: #e6f2ff; }
.monitor-status.partial_published { color: #9a6418; background: #fff2d5; }
.monitor-status.publish_failed { color: #c63f39; background: #ffebe9; }
.monitor-status.failed { color: #c63f39; background: #ffebe9; }
.monitor-status.skipped { color: #9a6418; background: #fff2d5; }
.monitor-status.pending, .monitor-status.queued, .monitor-status.downloading, .monitor-status.processing, .monitor-status.uvr_pending, .monitor-status.uvr_processing { color: #356a9c; background: #e6f2ff; }
.monitor-status.baseline { color: #7955b5; background: #f0e9ff; }
.monitor-error { max-width: 260px; color: #c1534d !important; overflow-wrap: anywhere; }
.media-job-message {
    display: -webkit-box !important;
    max-width: 280px !important;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow-wrap: anywhere;
}
.media-job-table td:last-child { white-space: nowrap; }
.monitor-filter-row { justify-content: flex-end; margin-bottom: 12px; }
.monitor-filter-row select { width: min(220px, 100%); }
.creator-video-monitor-filter {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid rgba(12, 125, 112, .22);
    border-radius: 999px;
    background: rgba(19, 139, 124, .08);
    color: #0e7768;
    font-size: 12px;
    font-weight: 700;
}
.creator-video-monitor-filter[hidden] { display: none; }
#monitorSettingsDialog,
#monitorTargetsDialog,
#mediaJobLogDialog {
    width: calc(100vw - 40px);
    max-width: none;
    height: calc(100vh - 32px);
    max-height: none;
    margin: auto;
}
.monitor-settings-dialog {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    box-sizing: border-box;
    overflow: auto;
}
.monitor-settings-layout { display: grid; grid-template-columns: minmax(620px, 1.05fr) minmax(650px, .95fr); gap: 22px; align-items: start; }
.monitor-settings-main { display: grid; gap: 15px; }
.monitor-account-picker { min-height: 555px; }
.monitor-account-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 10px 0 12px; }
.monitor-account-search input { width: 100%; min-width: 0; }
.monitor-account-search span { color: #6f7c7d; font-size: 12px; font-weight: 800; white-space: nowrap; }
.monitor-target-option[hidden] { display: none; }
.monitor-targets-dialog {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    box-sizing: border-box;
    flex-direction: column;
    overflow: hidden;
}
.media-job-log-dialog {
    display: flex;
    width: min(1080px, 100%);
    height: min(820px, 100%);
    max-width: none;
    max-height: none;
    box-sizing: border-box;
    flex-direction: column;
    overflow: hidden;
}
.media-job-timeline { flex: 1; min-height: 0; padding: 6px 4px 6px 0; overflow: auto; }
.media-job-event { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; position: relative; padding: 10px 8px; }
.media-job-event::before { content: ""; position: absolute; left: 29px; top: 50px; bottom: -12px; width: 1px; background: #e1e7e5; }
.media-job-event:last-child::before { display: none; }
.media-job-event-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #14776d; background: #e2f4f0; font-size: 11px; font-weight: 900; }
.media-job-event.error .media-job-event-mark { color: #bd4742; background: #ffebe8; }
.media-job-event.warning .media-job-event-mark { color: #956216; background: #fff1d2; }
.media-job-event-body { min-width: 0; padding: 4px 0 14px; border-bottom: 1px solid #eef1ef; }
.media-job-event-heading { display: flex; justify-content: space-between; gap: 12px; }
.media-job-event-heading time { color: #879190; font-size: 12px; }
.media-job-event-body p { margin: 8px 0 0; color: #435052; line-height: 1.6; overflow-wrap: anywhere; }
.media-job-event-details { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.media-job-event-details span { display: inline-flex; gap: 5px; padding: 5px 8px; border-radius: 8px; color: #687475; background: #f3f6f5; font-size: 11px; overflow-wrap: anywhere; }
.monitor-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.monitor-auto-lock {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid rgba(17, 121, 111, .18);
    border-radius: 16px;
    color: #176a63;
    background: rgba(17, 121, 111, .08);
}
.monitor-auto-lock span { color: #66817e; font-size: 12px; }
.monitor-auto-lock.repost-mode { border-color: rgba(54, 104, 185, .2); color: #315f9f; background: rgba(54, 104, 185, .07); }
.monitor-auto-lock.repost-mode span { color: #687d9c; }

@media (max-width: 760px) {
    .monitor-mode-options { grid-template-columns: 1fr; }
}
.monitor-account-count, .monitor-transfer-count { white-space: nowrap; }
.monitor-auto-ready { color: #0e7768; }
.monitor-auto-missing { color: #bd6b22; }
.monitor-target-dialog-list { display: grid; flex: 1; min-height: 0; gap: 9px; overflow: hidden; }
.monitor-target-dialog-list > .table-wrap { flex: 1; min-height: 0; }
.monitor-target-dialog-footer { display: flex; justify-content: flex-end; margin-top: 14px; }
.monitor-target-data-table { width: 100%; min-width: 1460px; border-collapse: collapse; }
.monitor-target-data-table th, .monitor-target-data-table td { padding: 12px 10px; border-bottom: 1px solid rgba(24, 52, 54, .1); text-align: left; white-space: nowrap; vertical-align: middle; }
.monitor-target-data-table th { color: #786653; background: #fbf8f3; font-size: 11px; font-weight: 800; }
.monitor-target-data-table td { color: #30494a; font-size: 12px; }
.monitor-target-data-table td > strong, .monitor-target-data-table td > small { display: block; }
.monitor-target-data-table td > small { margin-top: 4px; color: #8c9697; }
.monitor-video-count-link { min-width: 54px; margin: 0; padding: 0; color: #6456df; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.monitor-target-dialog-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid rgba(24, 52, 54, .1);
    border-radius: 14px;
    background: #fbfcfa;
}
.monitor-target-dialog-item b { color: #d69832; font-size: 12px; }
.monitor-target-dialog-item span { color: #284547; font-weight: 800; }
.muted { color: #8c9697; font-size: 12px; }

@media (max-width: 1000px) {
    .server-storage-panel { grid-template-columns: 1fr; }
    .server-storage-actions { flex-direction: row; flex-wrap: wrap; }
    .monitor-hero, .monitor-two-up { grid-template-columns: 1fr; }
    .monitor-service-card { min-height: 100px; }
    .monitor-flow-heading { align-items: flex-start; flex-direction: column; }
    .monitor-flow-heading small { text-align: left; }
    .monitor-settings-layout { grid-template-columns: 1fr; }
    .monitor-account-picker { min-height: 0; }
    #monitorSettingsDialog, #monitorTargetsDialog { width: calc(100vw - 16px); height: calc(100vh - 16px); }
}

@media (max-width: 760px) {
    .monitor-hero { padding: 22px 20px; }
    .monitor-form-grid, .monitor-option-grid, .monitor-processing-grid, .monitor-target-list { grid-template-columns: 1fr; }
    .monitor-bgm-upload-heading { align-items: flex-start; flex-direction: column; }
    .monitor-account-search { grid-template-columns: 1fr; gap: 6px; }
    .monitor-table { min-width: 0; }
    .nav-section-label { margin-left: 8px; }
    .nav-link-child { margin-left: 0; }
}

.page-section-hidden {
    display: none !important;
}

.table-link-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: #5f55e8;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.account-video-cover {
    width: 88px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    background: #f0eee9;
}

.account-video-cover.placeholder {
    display: grid;
    place-items: center;
    color: #8f887f;
    font-size: 12px;
}

.content-type-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.content-type-badge.video { color: #285a91; background: #e6f0ff; }
.content-type-badge.shorts { color: #a62b45; background: #ffe8ee; }

.youtube-analytics-heading,
.youtube-revenue-summary,
.youtube-content-summary,
.youtube-chart-dates,
.youtube-monthly-revenue span {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.youtube-analytics-heading { gap: 16px; margin-bottom: 14px; }
.youtube-analytics-heading h4 { margin: 0 0 4px; }
.youtube-revenue-summary { gap: 10px; flex-wrap: wrap; }
.youtube-revenue-summary > div {
    flex: 1 1 150px;
    padding: 14px;
    border: 1px solid var(--line, #dde5e4);
    border-radius: 14px;
    background: #f8fbfa;
}
.youtube-revenue-summary span,
.youtube-content-summary dt { display: block; color: var(--muted, #6d7a7b); font-size: 12px; }
.youtube-revenue-summary strong { display: block; margin-top: 5px; font-size: 20px; }
.youtube-content-summary { align-items: stretch; gap: 12px; margin-top: 12px; }
.youtube-content-summary article {
    flex: 1 1 260px;
    padding: 14px;
    border: 1px solid var(--line, #dde5e4);
    border-radius: 14px;
}
.youtube-content-summary article > div { display: flex; align-items: center; justify-content: space-between; }
.youtube-content-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.youtube-content-summary dd { margin: 2px 0 0; font-weight: 700; }
.youtube-revenue-chart-card { margin-top: 14px; }
.youtube-revenue-chart-card h5, .youtube-analytics-section h5 { margin: 10px 0; }
.youtube-revenue-chart { position: relative; padding-left: 54px; }
.youtube-revenue-chart svg { display: block; width: 100%; height: 190px; border-bottom: 1px solid #dbe4e3; }
.youtube-chart-line { fill: none; stroke: #0a8a7d; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.youtube-chart-area { fill: rgba(10, 138, 125, .13); }
.youtube-chart-point {
    fill: #fff;
    stroke: #0a8a7d;
    stroke-width: 2;
    cursor: pointer;
    vector-effect: non-scaling-stroke;
}
.youtube-chart-point:hover { fill: #0a8a7d; }
.youtube-chart-tooltip {
    position: absolute;
    z-index: 3;
    display: grid;
    gap: 4px;
    min-width: 132px;
    padding: 9px 11px;
    border: 1px solid rgba(10, 138, 125, .18);
    border-radius: 10px;
    color: #29413e;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 10px 28px rgba(38, 67, 61, .16);
    font-size: 12px;
    pointer-events: none;
    transform: translateX(-50%);
}
.youtube-chart-tooltip[hidden] { display: none; }
.youtube-chart-tooltip span { color: var(--muted, #6d7a7b); }
.youtube-chart-axis { position: absolute; inset: 0 auto 20px 0; display: flex; flex-direction: column; justify-content: space-between; color: var(--muted, #6d7a7b); font-size: 11px; }
.youtube-chart-dates { margin-top: 6px; color: var(--muted, #6d7a7b); font-size: 11px; }
.youtube-monthly-revenue { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 8px; }
.youtube-monthly-revenue span { padding: 9px 11px; border-radius: 10px; background: #f4f7f6; }
.youtube-monthly-revenue b { color: var(--muted, #6d7a7b); font-weight: 500; }

.uploaded-video-panel {
    margin-top: 20px;
}

.uploaded-video-header {
    align-items: flex-start;
}

.uploaded-summary {
    padding: 11px 15px;
    border-radius: 999px;
    color: #6c5f54;
    background: linear-gradient(135deg, #fff1df, #eef6ff);
    border: 1px solid rgba(111, 90, 70, 0.1);
    white-space: nowrap;
}

.uploaded-summary strong {
    color: var(--text);
}

.upload-guide-panel {
    display: flex;
    min-height: 640px;
    flex-direction: column;
}

.upload-progress-panel {
    display: grid;
    flex: 1;
    min-height: 280px;
    margin-top: 24px;
    padding: 28px;
    align-content: center;
    gap: 22px;
    border: 1px solid rgba(111, 90, 70, 0.12);
    border-radius: 22px;
    background:
        radial-gradient(circle at 90% 12%, rgba(116, 111, 255, 0.14), transparent 30%),
        rgba(255, 255, 255, 0.58);
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.upload-progress-panel[data-state="uploading"],
.upload-progress-panel[data-state="processing"] {
    border-color: rgba(95, 85, 232, 0.3);
    background:
        radial-gradient(circle at 90% 12%, rgba(116, 111, 255, 0.2), transparent 34%),
        rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 40px rgba(90, 92, 241, 0.1);
}

.upload-progress-panel[data-state="success"] {
    border-color: rgba(40, 122, 71, 0.24);
    background: linear-gradient(145deg, rgba(239, 252, 243, 0.94), rgba(255, 255, 255, 0.8));
}

.upload-progress-panel[data-state="error"] {
    border-color: rgba(192, 73, 73, 0.28);
    background: linear-gradient(145deg, rgba(255, 241, 241, 0.94), rgba(255, 255, 255, 0.8));
}

.upload-progress-heading,
.upload-progress-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.upload-progress-heading > div {
    display: grid;
    gap: 7px;
}

.upload-progress-heading span,
.upload-progress-stat span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.upload-progress-heading strong {
    font-size: 20px;
}

.upload-progress-percent {
    color: #5f55e8;
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 800;
    line-height: 1;
}

.upload-progress-track {
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(100, 90, 80, 0.12);
    box-shadow: inset 0 1px 3px rgba(70, 55, 45, 0.08);
}

.upload-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff8b72, #7767f5 72%, #5a8df1);
    transition: width 180ms ease;
}

.upload-progress-panel[data-state="processing"] .upload-progress-bar {
    width: 100% !important;
    background-size: 200% 100%;
    animation: uploadProgressProcessing 1.2s linear infinite;
}

.upload-progress-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.upload-progress-stat {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
}

.upload-progress-stat strong {
    font-size: 14px;
    overflow-wrap: anywhere;
}

.upload-progress-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

@keyframes uploadProgressProcessing {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

.uploaded-video-filters {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.uploaded-video-table {
    min-width: 1500px;
}

.video-identity-code {
    display: inline-block;
    max-width: 230px;
    padding: 7px 9px;
    border-radius: 10px;
    color: #504875;
    background: #f3f1ff;
    font: 700 11px/1.5 "Cascadia Mono", Consolas, monospace;
    overflow-wrap: anywhere;
}

.uploaded-video-actions {
    min-width: 130px;
}

.uploaded-work-cell {
    min-width: 260px;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.uploaded-cover,
.uploaded-cover-placeholder {
    width: 74px;
    height: 82px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(145deg, #f1eee9, #e7edf6);
}

.uploaded-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploaded-cover-placeholder {
    color: var(--muted);
    font-size: 11px;
}

.compact-select {
    min-width: 128px;
    padding: 8px 10px;
}

.status-chip.permission-approved,
.status-chip.completed {
    background: #e3f5e9;
    color: #287a47;
}

.status-chip.permission-pending,
.status-chip.pending,
.status-chip.processing {
    background: #fff0d8;
    color: #a96400;
}

.status-chip.permission-unrequested,
.status-chip.permission-rejected,
.status-chip.cancelled {
    background: #f1efeb;
    color: #746e66;
}

.task-command-panel {
    background:
        radial-gradient(circle at 92% 8%, rgba(106, 95, 242, 0.14), transparent 30%),
        rgba(255, 255, 255, 0.84);
}

.compact-button {
    width: auto;
    min-width: 108px;
}

.task-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.task-summary-card {
    display: grid;
    gap: 8px;
    min-height: 100px;
    padding: 18px;
    text-align: left;
    color: var(--text);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line);
    border-radius: 18px;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.task-summary-card:hover,
.task-summary-card.active {
    transform: translateY(-2px);
    border-color: rgba(90, 92, 241, 0.45);
    box-shadow: 0 12px 24px rgba(90, 92, 241, 0.12);
}

.task-summary-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.task-summary-card strong {
    font-size: 30px;
    line-height: 1;
}

.task-summary-card.pending {
    background: linear-gradient(145deg, #fff8ea, #fffdf8);
}

.task-summary-card.processing {
    background: linear-gradient(145deg, #eaf4ff, #fbfdff);
}

.task-summary-card.completed {
    background: linear-gradient(145deg, #eaf8ee, #fcfffd);
}

.task-summary-card.failed {
    background: linear-gradient(145deg, #fff0ef, #fffdfd);
}

.task-summary-card.cancelled {
    background: linear-gradient(145deg, #f2f0ed, #fffdfb);
}

.task-list-tools,
.task-type-control,
.task-page-size-control,
.task-pagination-footer,
.pagination-row {
    display: flex;
    align-items: center;
}

.task-list-tools {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.task-type-control,
.task-page-size-control {
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.task-type-control select,
.task-page-size-control select {
    width: auto;
    min-width: 82px;
    min-height: 36px;
    padding: 6px 30px 6px 10px;
}

.task-type-control select {
    min-width: 190px;
}

.task-select-column {
    width: 46px;
    min-width: 46px;
    text-align: center;
}

.task-select-column input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
}

.task-pagination-footer {
    justify-content: space-between;
    gap: 16px;
}

.pagination-row {
    gap: 10px;
}

.task-message-cell {
    max-width: 220px;
    white-space: normal;
}

.task-detail-content {
    display: grid;
    gap: 10px;
}

.task-json-block {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.task-json-block > span {
    font-size: 13px;
    font-weight: 800;
}

.task-json-block pre {
    max-height: 220px;
    margin: 0;
    padding: 16px;
    overflow: auto;
    color: #f7f4ec;
    background: #292723;
    border-radius: 14px;
    font: 12px/1.6 "Cascadia Mono", Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.permission-panel {
    border-color: rgba(231, 159, 45, 0.32);
    background:
        radial-gradient(circle at 92% 12%, rgba(255, 190, 91, 0.18), transparent 30%),
        rgba(255, 252, 243, 0.92);
}

.permission-panel-summary {
    padding: 9px 14px;
    color: #9a5b00;
    background: #fff0d3;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 193, 165, 0.45), transparent 26%),
        radial-gradient(circle at top right, rgba(123, 181, 255, 0.28), transparent 22%),
        linear-gradient(180deg, #fffdf7 0%, #fbf7f1 100%);
    font-family: "Manrope", "Noto Sans SC", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

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

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 28px 22px;
    background: rgba(255, 255, 255, 0.55);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.brand-mark {
    width: 74px;
    flex: 0 0 74px;
}

.brand-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.brand-copy {
    min-width: 0;
}

.brand-title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
}

.brand-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.nav-list {
    display: grid;
    gap: 10px;
}

.nav-link {
    padding: 14px 16px;
    border-radius: 18px;
    color: #564d44;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(135deg, #7067f6 0%, #8c73f8 100%);
    color: white;
    box-shadow: 0 16px 28px rgba(112, 103, 246, 0.2);
}

.sidebar-card,
.panel,
.login-panel {
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: var(--panel);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.sidebar-card {
    margin-top: auto;
    border-radius: var(--radius);
    padding: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 244, 231, 0.92));
}

.sidebar-card-label {
    color: var(--muted);
    font-size: 13px;
}

.sidebar-card-value {
    margin-top: 8px;
    font-weight: 800;
    font-size: 18px;
}

.sidebar-card-tip {
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 13px;
}

.main-panel {
    padding: 26px;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-platform-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px;
    border: 1px solid rgba(111, 90, 70, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 10px 28px rgba(73, 58, 44, 0.07);
    backdrop-filter: blur(16px);
}

.dashboard-platform-switcher-label {
    padding-left: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.dashboard-platform-tabs {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.dashboard-platform-tab {
    min-width: 104px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #6e665f;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.dashboard-platform-tab span,
.dashboard-platform-tab strong {
    display: block;
    white-space: nowrap;
}

.dashboard-platform-tab span {
    font-size: 12px;
    font-weight: 800;
}

.dashboard-platform-tab strong {
    margin-top: 3px;
    color: #9a9087;
    font-size: 10px;
    font-weight: 700;
}

.dashboard-platform-tab:hover {
    transform: translateY(-1px);
    background: rgba(112, 103, 246, 0.07);
}

.dashboard-platform-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #6f67f6, #8b72f7);
    box-shadow: 0 8px 18px rgba(111, 103, 246, 0.22);
}

.dashboard-platform-tab.tiktok.active {
    background: linear-gradient(135deg, #17171b, #383443 58%, #ea4d72);
    box-shadow: 0 8px 18px rgba(31, 29, 38, 0.22);
}

.dashboard-platform-tab.youtube.active {
    background: linear-gradient(135deg, #e52626, #ff5b52);
    box-shadow: 0 8px 18px rgba(229, 38, 38, 0.2);
}

.dashboard-platform-tab.active strong {
    color: rgba(255, 255, 255, 0.78);
}

.inline-form {
    margin: 0;
}

.topbar h1,
.hero-copy h1 {
    margin: 8px 0 0;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.05;
}

.eyebrow,
.panel-eyebrow {
    color: #8b5b34;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 800;
}

.page-content {
    margin-top: 26px;
    display: grid;
    gap: 24px;
    min-width: 0;
}

.hero-banner,
.panel,
.stat-card {
    border-radius: var(--radius);
}

.hero-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 18px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(255, 245, 232, 0.95), rgba(255, 255, 255, 0.75));
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.86);
}

.hero-banner h2,
.panel h3 {
    margin: 8px 0 0;
    font-size: 28px;
}

.hero-banner p,
.feature-list,
.number-list,
.panel p {
    color: var(--muted);
    line-height: 1.75;
}

.hero-pill {
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    white-space: normal;
    max-width: 360px;
    margin-left: auto;
}

.command-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
    gap: 24px;
}

.executive-panel,
.mission-panel {
    padding: 28px;
}

.executive-panel {
    background:
        radial-gradient(circle at top right, rgba(111, 103, 246, 0.12), transparent 34%),
        linear-gradient(145deg, rgba(255, 251, 245, 0.98), rgba(255, 255, 255, 0.88));
}

.executive-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.executive-copy h2 {
    margin: 10px 0 0;
    font-size: clamp(30px, 3.4vw, 44px);
    line-height: 1.06;
}

.executive-copy p {
    margin: 16px 0 0;
    max-width: 780px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.9;
}

.hero-ribbon {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.hero-ribbon-item {
    padding: 18px 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(111, 90, 70, 0.08);
    box-shadow: 0 10px 25px rgba(111, 90, 70, 0.06);
}

.hero-ribbon-label {
    display: block;
    color: #8a7564;
    font-size: 13px;
    font-weight: 700;
}

.hero-ribbon-value {
    display: block;
    margin-top: 10px;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
}

.mission-panel {
    background:
        radial-gradient(circle at top left, rgba(255, 160, 120, 0.12), transparent 38%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 236, 0.92));
}

.panel-header.compact {
    margin-bottom: 16px;
}

.mission-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 124px;
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.mission-badge.stable {
    color: #23703a;
    background: rgba(88, 193, 117, 0.16);
    border-color: rgba(88, 193, 117, 0.2);
}

.mission-badge.warning {
    color: #9b6900;
    background: rgba(255, 176, 72, 0.16);
    border-color: rgba(255, 176, 72, 0.22);
}

.mission-badge.danger {
    color: #bf3d3d;
    background: rgba(255, 111, 111, 0.16);
    border-color: rgba(255, 111, 111, 0.22);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mission-tile {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(111, 90, 70, 0.08);
}

.mission-tile span,
.signal-card span {
    display: block;
    color: #8a7564;
    font-size: 13px;
    font-weight: 700;
}

.mission-tile strong,
.signal-card strong {
    display: block;
    margin-top: 10px;
    font-size: 28px;
    line-height: 1.1;
}

.mission-tile small,
.signal-card small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.mission-progress-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.mission-pressure-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.mission-pressure-item {
    padding: 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(111, 90, 70, 0.08);
}

.mission-pressure-item span {
    display: block;
    color: #8a7564;
    font-size: 12px;
    font-weight: 700;
}

.mission-pressure-item strong {
    display: block;
    margin-top: 7px;
    font-size: 22px;
}

.progress-item {
    display: grid;
    gap: 10px;
}

.progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #6e6356;
}

.progress-track {
    position: relative;
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: rgba(112, 103, 246, 0.08);
}

.progress-track span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #6f67f6 0%, #8d79fb 100%);
}

.progress-track.warm {
    background: rgba(255, 176, 72, 0.12);
}

.progress-track.warm span {
    background: linear-gradient(90deg, #f0a13f 0%, #ffc46d 100%);
}

.progress-track.danger {
    background: rgba(255, 111, 111, 0.12);
}

.progress-track.danger span {
    background: linear-gradient(90deg, #ff7f7f 0%, #f25f78 100%);
}

.dashboard-main-grid {
    grid-template-columns: minmax(0, 1fr);
}

.chart-leader-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: stretch;
}

.top-account-list {
    display: grid;
    gap: 12px;
}

.top-account-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(111, 90, 70, 0.08);
}

.top-account-rank {
    min-width: 58px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(112, 103, 246, 0.1);
    color: #5b53e5;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.top-account-body {
    min-width: 0;
}

.top-account-handle {
    display: block;
    font-size: 15px;
}

.top-account-meta {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.top-account-revenue {
    color: #1f2b45;
    font-weight: 800;
    white-space: nowrap;
}

.signal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.signal-card {
    padding: 18px;
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 240, 0.88));
    border: 1px solid rgba(111, 90, 70, 0.08);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.stats-grid-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-priority-stats {
    margin-bottom: 20px;
}

.platform-highlight-panel {
    display: grid;
    grid-template-columns: minmax(190px, 0.8fr) minmax(0, 3.2fr);
    align-items: stretch;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(111, 90, 70, 0.08);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0, rgba(111, 103, 246, 0.12), transparent 32%),
        rgba(255, 255, 255, 0.78);
    box-shadow: 0 16px 42px rgba(77, 61, 45, 0.07);
}

.platform-highlight-panel[data-platform="tiktok"] {
    background:
        radial-gradient(circle at 96% 0, rgba(238, 45, 94, 0.12), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(247, 246, 250, 0.9));
}

.platform-highlight-panel[data-platform="youtube"] {
    background:
        radial-gradient(circle at 96% 0, rgba(255, 0, 0, 0.11), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(255, 248, 246, 0.9));
}

.platform-highlight-heading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 10px 12px;
}

.platform-highlight-heading span,
.platform-highlight-heading strong,
.platform-highlight-heading small {
    display: block;
}

.platform-highlight-heading span {
    color: #8b5b34;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.platform-highlight-heading strong {
    margin-top: 7px;
    font-size: 20px;
}

.platform-highlight-heading small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.platform-highlight-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.platform-highlight-grid article {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid rgba(111, 90, 70, 0.07);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.72);
}

.platform-highlight-grid span,
.platform-highlight-grid strong,
.platform-highlight-grid small {
    display: block;
}

.platform-highlight-grid span {
    color: #85796e;
    font-size: 11px;
    font-weight: 700;
}

.platform-highlight-grid strong {
    margin-top: 7px;
    overflow-wrap: anywhere;
    font-size: 19px;
    line-height: 1.15;
}

.platform-highlight-grid small {
    margin-top: 6px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.announcement-content-cell {
    min-width: 280px;
    max-width: 520px;
    white-space: pre-wrap;
    line-height: 1.7;
}

.announcement-priority-important {
    color: #b54928;
    background: rgba(255, 138, 112, 0.18);
}

.announcement-audience-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
    padding: 16px 18px;
    border-radius: 18px;
    color: #5f4937;
    background: linear-gradient(135deg, rgba(255, 246, 229, 0.95), rgba(245, 249, 255, 0.95));
    border: 1px solid rgba(139, 91, 52, 0.12);
}

.announcement-audience-card div {
    display: grid;
    gap: 4px;
}

.announcement-audience-card span:last-child {
    color: var(--muted);
    font-size: 13px;
}

.announcement-audience-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff8b72, #ff657f);
    box-shadow: 0 10px 22px rgba(255, 101, 127, 0.22);
}

.notification-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 15px;
    color: #5f5148;
    background: rgba(255, 255, 255, 0.76);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.notification-button:hover {
    transform: translateY(-2px);
    color: #6d5af5;
    box-shadow: 0 10px 24px rgba(83, 71, 63, 0.12);
}

.notification-button.has-unread svg {
    animation: notificationBellRing 2.8s ease-in-out infinite;
}

.notification-button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform-origin: 50% 10%;
}

.notification-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    border: 2px solid #fffdf9;
    border-radius: 999px;
    color: #fff;
    background: #f05057;
    font-family: "Manrope", sans-serif;
    font-size: 10px;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 5px 14px rgba(240, 80, 87, 0.3);
}

.notification-badge[hidden] {
    display: none;
}

.announcement-center-card {
    width: 100%;
    max-width: 100%;
    max-height: min(780px, calc(100vh - 36px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.announcement-center-dialog {
    width: min(720px, calc(100vw - 24px));
    max-width: none;
}

.announcement-center-header {
    flex: 0 0 auto;
}

.announcement-center-summary {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.announcement-inbox-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-right: 4px;
    overflow-y: auto;
}

.announcement-inbox-item {
    position: relative;
    padding: 18px;
    border: 1px solid rgba(111, 90, 70, 0.1);
    border-radius: 20px;
    background: rgba(255, 253, 249, 0.92);
}

.announcement-inbox-item.is-unread {
    border-color: rgba(116, 111, 255, 0.24);
    background: linear-gradient(145deg, rgba(246, 245, 255, 0.98), rgba(255, 253, 249, 0.98));
    box-shadow: 0 10px 26px rgba(116, 111, 255, 0.08);
}

.announcement-inbox-item.is-important {
    border-color: rgba(240, 80, 87, 0.22);
    background: linear-gradient(145deg, rgba(255, 243, 240, 0.98), rgba(255, 253, 249, 0.98));
}

.announcement-inbox-meta,
.announcement-inbox-footer {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 12px;
}

.announcement-inbox-meta time {
    margin-left: auto;
}

.announcement-read-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c8c0ba;
}

.is-unread .announcement-read-dot {
    background: #7567ff;
    box-shadow: 0 0 0 5px rgba(117, 103, 255, 0.1);
}

.is-important .announcement-read-dot {
    background: #f05057;
    box-shadow: 0 0 0 5px rgba(240, 80, 87, 0.1);
}

.announcement-inbox-item h4 {
    margin: 13px 0 8px;
    font-size: 18px;
}

.announcement-inbox-content {
    color: #554a43;
    line-height: 1.75;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.announcement-inbox-footer {
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(111, 90, 70, 0.08);
}

.announcement-inbox-empty {
    padding: 44px 20px;
    border: 1px dashed rgba(111, 90, 70, 0.18);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
}

.announcement-center-actions {
    flex: 0 0 auto;
}

@keyframes notificationBellRing {
    0%, 82%, 100% { transform: rotate(0); }
    86% { transform: rotate(12deg); }
    90% { transform: rotate(-10deg); }
    94% { transform: rotate(7deg); }
    98% { transform: rotate(-4deg); }
}

@media (max-width: 1400px) {
    .stats-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .analytics-audience-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.stat-card {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow);
}

.stat-card.coral { background: var(--coral); }
.stat-card.sky { background: var(--sky); }
.stat-card.sand { background: var(--sand); }
.stat-card.mist { background: var(--mist); }

.stat-card.soft {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 245, 238, 0.95));
}

.stat-label {
    color: #85593d;
    font-weight: 700;
    font-size: 14px;
}

.stat-value {
    margin-top: 18px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
}

.stat-meta {
    margin-top: 10px;
    color: var(--muted);
}

.panel-grid.two-up {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.panel {
    padding: 24px;
    min-width: 0;
}

.chart-shell {
    position: relative;
    height: 320px;
    min-height: 320px;
}

.chart-shell canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.chart-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.chart-empty[hidden],
.revenue-trend-dates[hidden],
#groupComparisonPanel[hidden] {
    display: none !important;
}

.revenue-trend-panel {
    overflow: hidden;
}

.dashboard-hero-trend .revenue-trend-header {
    display: block;
}

.dashboard-hero-trend .revenue-trend-controls {
    justify-content: flex-start;
    margin-top: 16px;
}

.dashboard-hero-trend .revenue-trend-chart-shell {
    height: 285px;
}

.revenue-trend-header {
    align-items: flex-start;
    gap: 18px;
}

.revenue-trend-controls,
.revenue-trend-dates {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.revenue-trend-controls .compact-select {
    min-width: 132px;
}

#revenueTrendUser,
#revenueTrendAccount {
    min-width: 170px;
}

.revenue-trend-dates input {
    width: 154px;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.88);
}

.revenue-trend-chart-shell {
    position: relative;
    height: 320px;
    margin-top: 16px;
}

.revenue-trend-chart-shell canvas {
    width: 100% !important;
    height: 100% !important;
}

.current-group-member {
    background: linear-gradient(90deg, rgba(111, 92, 231, 0.09), rgba(255, 255, 255, 0));
}

.current-group-member .status-chip {
    margin-left: 8px;
}

.status-chip.grouped {
    color: #5b49c8;
    background: rgba(111, 92, 231, 0.12);
}

.accent-panel {
    background: var(--accent);
}

.danger-panel {
    border-color: rgba(255, 111, 111, 0.18);
    background: linear-gradient(135deg, rgba(255, 243, 243, 0.96), rgba(255, 250, 250, 0.88));
}

.danger-panel-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 111, 111, 0.12);
    color: #bf3d3d;
    font-size: 13px;
    font-weight: 800;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 18px;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.stack-form label,
.dialog-card label,
.login-form label {
    display: grid;
    gap: 8px;
}

.stack-form span,
.dialog-card span,
.login-form span {
    font-size: 13px;
    font-weight: 700;
    color: #6c645a;
}

.field-tip {
    color: var(--muted);
    font-size: 13px;
}

.api-key-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    overflow: hidden;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 82% 20%, rgba(255, 181, 83, 0.2), transparent 24%),
        radial-gradient(circle at 18% 90%, rgba(90, 92, 241, 0.14), transparent 30%),
        rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
}

.api-key-hero h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 44px);
}

.api-key-hero p {
    max-width: 780px;
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.api-key-badge {
    flex: 0 0 auto;
    padding: 12px 18px;
    border: 1px solid rgba(40, 122, 71, 0.18);
    border-radius: 999px;
    color: #287a47;
    background: #e8f7ed;
    font-size: 13px;
    font-weight: 800;
}

.api-key-badge.danger {
    border-color: rgba(191, 61, 61, 0.18);
    color: #bf3d3d;
    background: #fff0ef;
}

.api-key-layout {
    align-items: stretch;
}

.api-key-vault,
.api-key-guide {
    min-height: 460px;
}

.api-key-vault {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(246, 246, 255, 0.88));
}

.secret-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid rgba(90, 92, 241, 0.18);
    border-radius: 18px;
    color: #343052;
    background: #f7f6ff;
    font: 700 clamp(15px, 2vw, 19px)/1.5 "Cascadia Mono", Consolas, monospace;
    overflow-wrap: anywhere;
}

.secret-icon-button {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    color: #5a5cf1;
    background: white;
    cursor: pointer;
    font-weight: 800;
}

.api-key-password-field {
    display: grid;
    gap: 8px;
    margin-top: 24px;
}

.api-key-password-field span {
    color: #6c645a;
    font-size: 13px;
    font-weight: 700;
}

.api-key-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.api-key-actions .primary-button,
.api-key-actions .ghost-button {
    flex: 1;
}

.security-note {
    display: grid;
    gap: 6px;
    margin-top: 24px;
    padding: 16px 18px;
    border-radius: 16px;
    color: #675c50;
    background: #fff7e7;
}

.security-note span,
.api-key-warning p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.api-key-guide {
    background: linear-gradient(145deg, #fff9e9, #fffdf8);
}

.deepseek-key-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(246, 246, 255, 0.9));
}

.provider-key-panel {
    margin-top: 18px;
}

.tikhub-key-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 250, 247, 0.92));
}

.provider-key-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.provider-key-summary > div {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid rgba(17, 121, 111, 0.14);
    border-radius: 16px;
    background: rgba(242, 252, 249, 0.84);
}

.provider-key-summary span { color: var(--muted); font-size: 12px; }
.provider-key-summary strong { overflow-wrap: anywhere; }
.provider-balance-hint {
    margin-top: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: #68787a;
    background: rgba(24, 52, 54, .05);
    font-size: 12px;
    line-height: 1.55;
}

.deepseek-key-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.deepseek-key-summary > div {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid rgba(90, 92, 241, 0.12);
    border-radius: 16px;
    background: rgba(247, 246, 255, 0.8);
}

.deepseek-key-summary span {
    color: var(--muted);
    font-size: 12px;
}

.deepseek-key-summary strong {
    overflow-wrap: anywhere;
}

.api-endpoint-card {
    display: grid;
    gap: 10px;
    margin-top: 24px;
    padding: 18px;
    border: 1px solid rgba(113, 88, 56, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.api-endpoint-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.api-endpoint-card strong {
    overflow-wrap: anywhere;
}

.api-endpoint-card .ghost-button {
    justify-self: start;
}

.api-key-warning {
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 235, 231, 0.74);
}

.api-key-warning p {
    margin-bottom: 0;
}

.data-refresh-settings-panel {
    margin-top: 20px;
    background:
        radial-gradient(circle at 88% 16%, rgba(98, 126, 242, 0.13), transparent 28%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 237, 0.9));
}

.data-refresh-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(380px, 1.2fr);
    gap: 18px;
}

.data-refresh-countdown-card,
.data-refresh-control-card {
    padding: 22px;
    border: 1px solid rgba(111, 90, 70, 0.1);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
}

.data-refresh-countdown-card {
    display: grid;
    align-content: center;
    gap: 10px;
}

.data-refresh-countdown-card span,
.data-refresh-countdown-card small {
    color: var(--muted);
}

.data-refresh-countdown-card strong {
    color: #302957;
    font: 800 clamp(32px, 5vw, 54px)/1 "Manrope", sans-serif;
    letter-spacing: -0.04em;
}

.data-refresh-control-card {
    display: grid;
    gap: 16px;
}

.data-refresh-scope-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    padding: 14px 16px;
    border: 1px solid rgba(111, 90, 70, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.56);
}

.data-refresh-scope-picker legend {
    padding: 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.data-refresh-scope-picker label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
}

.data-refresh-scope-picker input {
    width: 17px;
    height: 17px;
}

.scheduled-refresh-account-picker {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(111, 90, 70, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.56);
}

.scheduled-refresh-picker-header,
.scheduled-refresh-picker-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.scheduled-refresh-picker-header > div {
    display: grid;
    gap: 3px;
}

.scheduled-refresh-user-picker {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid rgba(112, 91, 241, 0.14);
    border-radius: 14px;
    background: rgba(112, 91, 241, 0.035);
}

.scheduled-refresh-user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.scheduled-refresh-user-header > div {
    display: grid;
    gap: 2px;
}

.scheduled-refresh-user-header > span {
    flex: 0 0 auto;
    color: #6858c8;
    font-size: 12px;
    font-weight: 800;
}

.scheduled-refresh-user-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
    max-height: 156px;
    overflow: auto;
}

.scheduled-refresh-user-option {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(111, 90, 70, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.scheduled-refresh-user-option:hover,
.scheduled-refresh-user-option.selected {
    border-color: rgba(112, 91, 241, 0.46);
    background: rgba(112, 91, 241, 0.09);
}

.scheduled-refresh-user-option.partial {
    border-color: rgba(235, 161, 63, 0.54);
    background: rgba(255, 241, 212, 0.62);
}

.scheduled-refresh-user-option input {
    width: 17px;
    height: 17px;
}

.scheduled-refresh-user-option > span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.scheduled-refresh-user-option strong,
.scheduled-refresh-user-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheduled-refresh-user-option small,
.scheduled-refresh-user-option > b,
.scheduled-refresh-user-empty {
    color: var(--muted);
    font-size: 11px;
}

.scheduled-refresh-user-option > b {
    white-space: nowrap;
}

.scheduled-refresh-user-empty {
    grid-column: 1 / -1;
    padding: 12px;
    text-align: center;
}

.scheduled-refresh-picker-tools input {
    flex: 1 1 280px;
}

.scheduled-refresh-picker-tools .ghost-button {
    width: auto;
    white-space: nowrap;
}

.scheduled-refresh-table-wrap {
    max-height: 310px;
    overflow: auto;
    border: 1px solid rgba(111, 90, 70, 0.1);
    border-radius: 14px;
}

.scheduled-refresh-table {
    min-width: 680px;
}

.scheduled-refresh-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fffaf6;
}

.scheduled-refresh-table tr.selected-row td {
    background: rgba(112, 91, 241, 0.08);
}

.scheduled-refresh-table input[type="checkbox"] {
    width: 17px;
    height: 17px;
}

@media (max-width: 760px) {
    .scheduled-refresh-user-header,
    .scheduled-refresh-picker-header,
    .scheduled-refresh-picker-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .scheduled-refresh-user-list {
        grid-template-columns: 1fr;
    }
}

.permission-rejection-reason {
    display: block;
    max-width: 180px;
    margin-top: 5px;
    color: var(--danger);
    line-height: 1.45;
}

.single-account-refresh-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.single-account-refresh-control label {
    min-width: 0;
}

.single-account-refresh-control .ghost-button {
    width: auto;
    min-width: 150px;
    min-height: 46px;
}

.toggle-setting-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.toggle-setting-row input {
    width: 18px;
    height: 18px;
}

.data-refresh-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.data-refresh-stats span {
    display: grid;
    gap: 5px;
    padding: 13px 15px;
    border-radius: 15px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.68);
    font-size: 12px;
}

.data-refresh-stats strong {
    color: var(--text);
    font-size: 15px;
}

.video-meta-preview-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.video-meta-preview-item,
.video-meta-empty {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(111, 90, 70, 0.12);
}

.video-meta-empty {
    color: var(--muted);
    font-size: 13px;
}

.video-meta-preview-name {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.55;
    word-break: break-all;
}

.video-meta-preview-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.inline-tip {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    margin-top: -2px;
}

.form-divider {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 247, 231, 0.72);
    border: 1px solid rgba(215, 180, 128, 0.22);
}

.form-divider strong {
    font-size: 14px;
}

.form-divider span {
    color: var(--muted);
    font-size: 12px;
}

.quick-tag-panel {
    display: grid;
    gap: 12px;
    margin-top: -4px;
}

.account-target-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.account-upload-memory-field {
    display: grid;
    gap: 8px;
}

.account-upload-memory-field > label {
    color: #6c645a;
    font-size: 13px;
    font-weight: 700;
}

.movie-title-memory-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.movie-title-memory-row .ghost-button {
    min-width: 112px;
    white-space: nowrap;
}

.platform-fieldset {
    margin: 0;
    padding: 14px 16px 16px;
    border-radius: 18px;
    border: 1px solid rgba(111, 90, 70, 0.16);
    background: rgba(255, 255, 255, 0.78);
}

.platform-fieldset legend {
    padding: 0 6px;
    color: #6c645a;
    font-size: 13px;
    font-weight: 700;
}

.platform-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.platform-choice {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(111, 90, 70, 0.16);
    background: rgba(255, 255, 255, 0.92);
}

.platform-choice.unavailable {
    opacity: 0.42;
    cursor: not-allowed;
}

.platform-choice input {
    width: auto;
    margin: 0;
}

.platform-choice span {
    color: var(--text) !important;
}

.auto-card-red-option {
    display: grid !important;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 103, 122, 0.25);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 243, 239, 0.92), rgba(255, 247, 250, 0.9));
}

.auto-card-red-control {
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: var(--text) !important;
}

.auto-card-red-control input {
    width: auto;
    margin: 0;
}

.auto-card-red-option:has(input:disabled) {
    opacity: 0.55;
}

.quick-tag-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-tag-head > span {
    color: #6c645a;
    font-size: 13px;
    font-weight: 700;
}

.quick-tag-tools {
    display: flex;
    gap: 10px;
    flex: 1 1 360px;
    justify-content: flex-end;
}

.quick-tag-tools input {
    min-width: 220px;
}

.quick-tag-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(116, 111, 255, 0.08);
    border: 1px solid rgba(116, 111, 255, 0.12);
}

.quick-tag-button,
.quick-tag-remove {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.quick-tag-button {
    padding: 6px 10px;
    border-radius: 999px;
    color: #5a5cf1;
    font-size: 13px;
    font-weight: 800;
}

.quick-tag-button:hover,
.quick-tag-remove:hover {
    background: rgba(116, 111, 255, 0.08);
}

.quick-tag-remove {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #8a7df7;
    font-size: 18px;
    line-height: 1;
}

.platform-badge-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(90, 92, 241, 0.1);
    color: #4d52d9;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

input,
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(111, 90, 70, 0.16);
    background: rgba(255, 255, 255, 0.82);
    outline: none;
    transition: 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(112, 103, 246, 0.45);
    box-shadow: 0 0 0 4px rgba(112, 103, 246, 0.08);
}

.primary-button,
.ghost-button {
    border: 0;
    border-radius: 16px;
    padding: 13px 18px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button {
    background: linear-gradient(135deg, #ff8f72 0%, #ff6d86 100%);
    color: white;
    font-weight: 800;
    box-shadow: 0 18px 28px rgba(255, 122, 122, 0.24);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.primary-button.large {
    padding: 15px 18px;
    font-size: 16px;
}

.ghost-button {
    background: rgba(255, 255, 255, 0.7);
    color: #4f463d;
    border: 1px solid rgba(111, 90, 70, 0.14);
}

.ghost-button.small {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.ghost-button.danger {
    color: #c04949;
    border-color: rgba(192, 73, 73, 0.2);
    background: rgba(255, 240, 240, 0.78);
}

.ghost-button.danger:hover {
    background: rgba(255, 228, 228, 0.95);
}

.table-wrap {
    max-width: 100%;
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(111, 90, 70, 0.08);
    font-size: 14px;
}

th {
    color: #7b6d60;
    font-weight: 800;
}

td {
    vertical-align: middle;
}

.empty-cell,
.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 24px;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 18px;
}

.filter-field {
    display: grid;
    gap: 8px;
}

.filter-field span {
    font-size: 13px;
    font-weight: 700;
    color: #6c645a;
}

.filter-field-wide {
    grid-column: span 2;
}

.filter-actions {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-row select {
    width: auto;
    min-width: 160px;
}

.employee-list-filters,
.account-list-filters {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.employee-table {
    min-width: 1600px;
}

.account-list-table {
    min-width: 1620px;
}

.table-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.table-sort-button::after {
    content: "↕";
    color: #b6aa9d;
    font-size: 11px;
}

.table-sort-button.active {
    color: #5d4ee5;
}

.table-sort-button.active[data-direction="asc"]::after {
    content: "↑";
    color: currentColor;
}

.table-sort-button.active[data-direction="desc"]::after {
    content: "↓";
    color: currentColor;
}

input[readonly] {
    color: var(--muted);
    background: rgba(111, 90, 70, 0.05);
    cursor: not-allowed;
}

.muted-inline {
    color: var(--muted);
    font-size: 12px;
}

.video-parameter-cell {
    display: grid;
    gap: 6px;
    min-width: 130px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.video-duration-cell {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.video-parameter-cell span:first-child {
    color: var(--text);
    font-weight: 700;
}

.table-link {
    color: #5d4ee5;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(93, 78, 229, 0.28);
    text-underline-offset: 3px;
}

.table-link:hover {
    color: #4333df;
    text-decoration-color: rgba(67, 51, 223, 0.44);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(116, 111, 255, 0.12);
    color: #5d4ee5;
}

.status-chip.uploaded,
.status-chip.pending,
.status-chip.pulled {
    background: rgba(255, 176, 72, 0.18);
    color: #a66400;
}

.status-chip.published,
.status-chip.cached,
.status-chip.active,
.status-chip.processed,
.status-chip.profit,
.status-chip.completed {
    background: rgba(88, 193, 117, 0.16);
    color: #23703a;
}

.status-chip.starting {
    background: rgba(93, 78, 229, 0.14);
    color: #5d4ee5;
}

.status-chip.stopped,
.status-chip.banned,
.status-chip.expired,
.status-chip.failed {
    background: rgba(255, 111, 111, 0.16);
    color: #bf3d3d;
}

.status-chip.withdrawn {
    background: rgba(255, 176, 72, 0.18);
    color: #a66400;
}

.feature-list,
.number-list {
    margin: 0;
    padding-left: 18px;
}

.feature-list li,
.number-list li {
    margin: 10px 0;
}

.login-body {
    min-height: 100vh;
}

.login-scene {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(760px, 100%);
    padding: 36px;
    border-radius: 34px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}

.login-brand .brand-title {
    font-size: 20px;
}

.hero-copy {
    margin: 26px 0 18px;
}

.hero-copy p {
    margin-top: 14px;
    color: var(--muted);
    line-height: 1.8;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-tip {
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
}

.alert {
    margin-bottom: 18px;
    padding: 13px 16px;
    border-radius: 16px;
}

.alert.error {
    background: rgba(255, 111, 111, 0.12);
    color: #bf3d3d;
}

.toast-root {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: grid;
    gap: 10px;
    z-index: 50;
}

.toast {
    min-width: 220px;
    max-width: 320px;
    padding: 14px 16px;
    border-radius: 16px;
    color: white;
    box-shadow: 0 18px 30px rgba(59, 48, 27, 0.2);
    animation: slideIn 0.22s ease;
}

.toast.info {
    background: linear-gradient(135deg, #746fff 0%, #8b8afc 100%);
}

.toast.error {
    background: linear-gradient(135deg, #ff7f7f 0%, #f25f78 100%);
}

.inline-link {
    color: #5a5cf1;
    font-weight: 700;
}

.thumb-button {
    width: 96px;
    height: 64px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(111, 90, 70, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    cursor: pointer;
}

.video-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #f2f2f2 0%, #dfdfdf 100%);
}

.thumb-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 64px;
    padding: 0 12px;
    border-radius: 14px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed rgba(111, 90, 70, 0.14);
    font-size: 12px;
}

.list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.list-meta,
.pagination-text {
    color: var(--muted);
    font-size: 13px;
}

.pagination-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.account-list-pagination {
    justify-content: space-between;
    margin-top: 18px;
}

.pagination-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-row {
    background: rgba(116, 111, 255, 0.06);
    animation: pulseRow 2.5s ease;
}

.responsive-table td strong {
    font-size: 14px;
}

.dispatch-dialog {
    border: 0;
    padding: 0;
    background: transparent;
}

.dispatch-dialog::backdrop {
    background: rgba(34, 29, 26, 0.28);
    backdrop-filter: blur(4px);
}

.dialog-card {
    width: min(720px, calc(100vw - 24px));
    padding: 24px;
    border-radius: 28px;
    background: #fffefb;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* The monitor dialogs own a viewport-sized shell. Keep these rules after the
   generic dialog card so the content card cannot collapse into a left rail. */
#monitorSettingsDialog[open],
#monitorTargetsDialog[open],
#mediaJobLogDialog[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

#monitorSettingsDialog > .dialog-card.monitor-settings-dialog,
#monitorTargetsDialog > .dialog-card.monitor-targets-dialog,
#mediaJobLogDialog > .dialog-card.media-job-log-dialog {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    box-sizing: border-box;
}

#monitorSettingsDialog > .dialog-card.monitor-settings-dialog {
    overflow: auto;
}

#monitorTargetsDialog > .dialog-card.monitor-targets-dialog {
    overflow: hidden;
}

.account-edit-card {
    width: min(820px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    overflow: auto;
}

.account-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.account-edit-grid label {
    display: grid;
    gap: 8px;
}

.employee-accounts-card {
    display: flex;
    width: min(1280px, calc(100vw - 24px));
    max-height: calc(100vh - 40px);
    flex-direction: column;
    overflow: hidden;
}

.employee-accounts-card .table-wrap {
    flex: 1;
    min-height: 0;
    margin-top: 8px;
}

.employee-accounts-table {
    min-width: 1050px;
}

.employee-account-count {
    min-width: 42px;
    font-weight: 800;
}

.wide-dialog {
    width: min(1760px, calc(100vw - 24px));
    max-width: none;
}

.dialog-card.account-videos-card {
    display: flex;
    width: 100%;
    min-height: min(680px, calc(100vh - 48px));
    max-height: calc(100vh - 40px);
    flex-direction: column;
    overflow: hidden;
}

.account-videos-card .table-wrap {
    flex: 1;
    min-height: 0;
    margin-top: 8px;
}

.account-videos-card .responsive-table {
    min-width: 1540px;
}

.account-videos-card .responsive-table th {
    white-space: nowrap;
}

.account-videos-card .responsive-table th:nth-child(2),
.account-videos-card .responsive-table td:nth-child(2) {
    min-width: 260px;
}

.account-videos-card .responsive-table th:nth-child(7),
.account-videos-card .responsive-table td:nth-child(7),
.account-videos-card .responsive-table th:nth-child(8),
.account-videos-card .responsive-table td:nth-child(8) {
    min-width: 138px;
}

.dialog-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.settlement-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 30px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 90% 10%, rgba(98, 126, 242, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 244, 235, 0.96), rgba(255, 255, 255, 0.86));
    box-shadow: var(--shadow);
}

.settlement-hero h2 {
    margin: 8px 0 6px;
    font-size: clamp(26px, 3vw, 36px);
}

.settlement-hero p {
    margin: 0;
    color: var(--muted);
}

.settlement-money-value {
    font-size: clamp(22px, 2.5vw, 34px);
    overflow-wrap: anywhere;
}

.settlement-filter-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.settlement-table {
    min-width: 1740px;
}

.settlement-table th {
    white-space: nowrap;
}

.settlement-table td {
    line-height: 1.55;
}

.settlement-actions {
    min-width: 270px;
    flex-wrap: wrap;
}

.settlement-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.settlement-small-primary {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: none;
}

.status-chip.settlement-awaiting_confirmation {
    background: rgba(98, 126, 242, 0.14);
    color: #425fc9;
}

.status-chip.settlement-confirmed {
    background: rgba(88, 193, 117, 0.16);
    color: #23703a;
}

.status-chip.settlement-pending {
    background: rgba(255, 176, 72, 0.18);
    color: #a66400;
}

.settlement-history-table {
    min-width: 920px;
}

.settlement-create-card {
    width: min(920px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    overflow: auto;
}

.settlement-create-grid {
    margin-top: 16px;
}

.settlement-field-full {
    grid-column: 1 / -1;
}

.settlement-preview-card {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(228, 231, 246, 0.82), rgba(245, 247, 251, 0.9));
    border: 1px solid rgba(98, 126, 242, 0.12);
}

.settlement-preview-card > span {
    grid-column: 1 / -1;
}

.settlement-preview-card div {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.settlement-preview-card span {
    color: var(--muted);
    font-size: 12px;
}

.settlement-preview-card strong {
    overflow-wrap: anywhere;
    font-size: 14px;
}

.settlement-formula-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(255, 239, 204, 0.55);
    color: #6c5336;
}

.settlement-formula-card > span {
    color: #8b5b34;
}

.settlement-formula-card b {
    color: #d4554f;
    font-size: 17px;
}

@media (max-width: 1280px) {
    .settlement-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .settlement-preview-card {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .settlement-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .settlement-stats-grid,
    .settlement-filter-grid,
    .settlement-preview-card,
    .settlement-create-grid {
        grid-template-columns: 1fr;
    }

    .settlement-field-full {
        grid-column: auto;
    }

    .settlement-formula-card {
        grid-template-columns: 1fr;
    }
}

.agent-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 24px 28px;
    border: 1px solid rgba(111, 90, 70, 0.1);
    border-radius: 24px;
    background:
        radial-gradient(circle at 88% 16%, rgba(102, 133, 246, 0.18), transparent 30%),
        linear-gradient(135deg, rgba(255, 239, 225, 0.94), rgba(255, 255, 255, 0.94));
}

.agent-hero h2 {
    margin: 5px 0 7px;
    font-size: clamp(24px, 3vw, 36px);
}

.agent-hero p {
    margin: 0;
    color: var(--muted);
}

.agent-mode-badge {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid rgba(112, 91, 241, 0.18);
    border-radius: 999px;
    color: #5d52bd;
    background: rgba(255, 255, 255, 0.74);
    font-size: 12px;
    font-weight: 800;
}

.agent-stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.agent-money {
    font-size: clamp(18px, 2.2vw, 28px) !important;
}

.agent-admin-create-grid,
.agent-console-grid {
    margin-top: 18px;
}

.agent-create-form .account-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-formula-note {
    padding: 13px 15px;
    border-left: 4px solid #7067f6;
    border-radius: 12px;
    color: #5c548d;
    background: rgba(112, 103, 246, 0.08);
    font-size: 12px;
    line-height: 1.6;
}

.agent-table {
    min-width: 1540px;
}

.agent-table code {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 8px;
    color: #5c52c6;
    background: rgba(112, 91, 241, 0.08);
    font-size: 11px;
}

.agent-user-account-link {
    display: inline-flex;
    min-width: 76px;
    justify-content: flex-start;
    font-size: 13px;
    font-weight: 900;
}

.agent-users-detail-card {
    display: flex;
    flex-direction: column;
    width: min(1500px, calc(100vw - 32px));
    max-height: min(900px, calc(100vh - 32px));
    overflow: hidden;
}

.agent-detail-header {
    flex: 0 0 auto;
}

.agent-detail-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.agent-detail-summary-card {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 13px 15px;
    border: 1px solid #ede8e2;
    border-radius: 14px;
    background: linear-gradient(145deg, #fffaf6 0%, #ffffff 100%);
}

.agent-detail-summary-card span {
    color: var(--muted);
    font-size: 12px;
}

.agent-detail-summary-card strong {
    overflow: hidden;
    color: #25213f;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-users-detail-scroll {
    min-height: 0;
    padding-right: 4px;
    overflow: auto;
}

.agent-detail-section + .agent-detail-section {
    margin-top: 22px;
}

.agent-detail-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.agent-detail-section-title div {
    display: grid;
    gap: 3px;
}

.agent-detail-section-title span {
    color: #24202f;
    font-size: 16px;
    font-weight: 900;
}

.agent-detail-section-title small {
    color: var(--muted);
    font-size: 12px;
}

.agent-detail-section-title b {
    color: #6656cf;
    white-space: nowrap;
}

.agent-detail-user-table {
    min-width: 1080px;
}

.agent-detail-account-table {
    min-width: 1680px;
}

.shared-video-analytics-card {
    width: min(1040px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    overflow: auto;
}

.shared-video-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.shared-video-metric-section {
    margin-top: 22px;
}

.shared-video-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.shared-video-metric-grid > div {
    display: grid;
    gap: 7px;
    padding: 13px 15px;
    border: 1px solid #eee9e2;
    border-radius: 14px;
    background: #fffdfa;
}

.shared-video-metric-grid span {
    color: var(--muted);
    font-size: 12px;
}

.shared-video-metric-grid strong {
    color: #25213f;
    font-size: 17px;
}

.shared-video-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.shared-video-breakdown-grid > div {
    padding: 15px;
    border: 1px solid #eee9e2;
    border-radius: 16px;
    background: #fffdfa;
}

.shared-video-breakdown-grid h4 {
    margin: 0 0 10px;
}

.shared-video-breakdown-list {
    display: grid;
    gap: 7px;
}

.shared-video-breakdown-list > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 7px;
    border-bottom: 1px dashed #eee7df;
}

.shared-video-breakdown-list em {
    color: #6558c9;
    font-style: normal;
    font-weight: 800;
}

.agent-code-card {
    display: grid;
    gap: 7px;
    margin: 12px 0;
    padding: 18px;
    border: 1px solid rgba(112, 91, 241, 0.16);
    border-radius: 16px;
    background: rgba(112, 91, 241, 0.06);
}

.agent-code-card span {
    color: var(--muted);
    font-size: 12px;
}

.agent-code-card strong {
    color: #5146b8;
    font: 800 26px/1.2 "Manrope", sans-serif;
    letter-spacing: 0.06em;
}

.agent-invite-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.agent-invite-copy .primary-button {
    width: auto;
    white-space: nowrap;
}

.agent-inline-search {
    width: min(360px, 100%);
}

.agent-user-table,
.agent-settlement-table {
    min-width: 1480px;
}

.agent-account-table-wrap {
    max-height: 620px;
    overflow: auto;
}

.agent-account-table-wrap table {
    min-width: 1180px;
}

.agent-account-table-wrap thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fffaf6;
}

.agent-account-filters {
    display: flex;
    gap: 9px;
}

.agent-account-filters input {
    min-width: 260px;
}

.agent-assign-card {
    width: min(920px, calc(100vw - 32px));
}

.agent-assign-user-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    max-height: 52vh;
    overflow: auto;
    padding: 2px;
}

.agent-assign-user-option {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 9px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(111, 90, 70, 0.12);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.agent-assign-user-option:has(input:checked) {
    border-color: rgba(112, 91, 241, 0.42);
    background: rgba(112, 91, 241, 0.08);
}

.agent-assign-user-option input {
    width: 17px;
    height: 17px;
}

.agent-assign-user-option > span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.agent-assign-user-option small,
.agent-assign-user-option > b {
    color: var(--muted);
    font-size: 11px;
}

.agent-assign-user-option > b {
    grid-column: 2;
}

@media (max-width: 1280px) {
    .agent-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .agent-detail-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .agent-hero,
    .agent-invite-copy,
    .agent-account-filters {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .agent-stats-grid,
    .agent-detail-summary-grid,
    .shared-video-kpi-grid,
    .shared-video-metric-grid,
    .shared-video-breakdown-grid,
    .agent-create-form .account-edit-grid,
    .agent-assign-user-list {
        grid-template-columns: 1fr;
    }

    .agent-users-detail-card {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
    }

    .agent-account-filters input {
        min-width: 0;
    }
}

.preview-card {
    width: min(960px, calc(100vw - 24px));
}

.account-detail-card {
    width: min(860px, calc(100vw - 24px));
}

.analytics-dialog-card {
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.analytics-dialog {
    width: min(1480px, calc(100vw - 40px));
    max-width: none;
    overflow: hidden;
}

.analytics-range-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(111, 90, 70, 0.1);
    border-radius: 16px;
    background: rgba(248, 247, 255, 0.82);
}

.analytics-range-select {
    display: grid;
    gap: 6px;
    min-width: 160px;
}

.analytics-range-select > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.analytics-range-select .compact-select,
.analytics-custom-dates input {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 11px;
}

.analytics-custom-dates {
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-custom-dates[hidden] {
    display: none !important;
}

.analytics-custom-dates input {
    width: 154px;
}

.analytics-range-status {
    flex: 1 1 260px;
    align-self: center;
    color: var(--muted);
    font-size: 12px;
}

.analytics-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.analytics-identity {
    display: grid;
    gap: 7px;
    margin-top: 14px;
    padding: 13px 15px;
    border-radius: 15px;
    color: var(--muted);
    background: #f6f4ff;
    font-size: 12px;
}

.analytics-identity code {
    color: #4c4671;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.analytics-metric {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255, 246, 235, 0.9), rgba(241, 247, 255, 0.9));
    border: 1px solid rgba(111, 90, 70, 0.08);
}

.analytics-metric span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.analytics-metric strong {
    font-size: 20px;
}

.analytics-audience-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.analytics-block {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(111, 90, 70, 0.1);
    background: rgba(255, 255, 255, 0.75);
}

.analytics-block h4 {
    margin: 0 0 14px;
}

.analytics-bar-list,
.analytics-bar-row {
    display: grid;
    gap: 10px;
}

.analytics-bar-row > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.analytics-bar-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #eeece8;
}

.analytics-bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff8b72, #627ef2);
}

.analytics-extra-block {
    margin-top: 16px;
}

.analytics-extra-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.analytics-extra-grid > div {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-radius: 12px;
    background: #faf8f5;
    overflow-wrap: anywhere;
}

.analytics-extra-grid > .analytics-extra-trend {
    position: relative;
    grid-column: span 3;
    gap: 10px;
    padding: 16px 18px;
    background: linear-gradient(145deg, rgba(255, 246, 235, 0.72), rgba(241, 247, 255, 0.88));
}

.analytics-extra-trend-title,
.analytics-extra-trend-axis,
.analytics-extra-map-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.analytics-extra-trend-title span,
.analytics-extra-map b {
    color: var(--text);
    font-size: 13px;
}

.analytics-extra-trend svg {
    width: 100%;
    height: 128px;
    overflow: visible;
}

.analytics-trend-hit {
    cursor: crosshair;
    pointer-events: all;
}

.analytics-trend-tooltip {
    position: absolute;
    z-index: 3;
    transform: translateX(-50%);
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(35, 32, 43, 0.92);
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 8px 22px rgba(35, 32, 43, 0.2);
}

.analytics-extra-trend-axis {
    color: var(--muted);
    font-size: 11px;
}

.analytics-extra-map {
    align-content: start;
}

.analytics-extra-map-row {
    padding-top: 6px;
    border-top: 1px solid rgba(111, 90, 70, 0.08);
    font-size: 12px;
}

.analytics-extra-grid span {
    color: var(--muted);
    font-size: 11px;
}

.profile-avatar-field {
    display: grid;
    gap: 8px;
}

.field-label {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.profile-avatar-picker {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(111, 90, 70, 0.14);
    border-radius: 18px;
    background: rgba(255, 250, 245, 0.78);
}

.profile-avatar-preview {
    width: 104px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 24px;
    color: var(--muted);
    font-size: 12px;
    background: linear-gradient(145deg, #fff2e5, #edf5ff);
    border: 1px dashed rgba(111, 90, 70, 0.2);
}

.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-tools {
    display: grid;
    gap: 8px;
}

.account-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.account-detail-item {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 247, 238, 0.9);
    border: 1px solid rgba(111, 90, 70, 0.08);
}

.account-detail-item span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.account-detail-item strong {
    font-size: 16px;
    line-height: 1.5;
}

.account-detail-item.highlight {
    border-color: rgba(111, 92, 231, 0.2);
    background: linear-gradient(135deg, rgba(244, 241, 255, 0.96), rgba(255, 251, 244, 0.96));
}

.account-detail-item.highlight strong {
    color: #5b49c8;
}

.detail-section {
    margin-top: 20px;
    display: grid;
    gap: 12px;
}

.detail-section h4 {
    margin: 0;
    font-size: 15px;
}

.detail-stack {
    display: grid;
    gap: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(244, 246, 255, 0.72);
    border: 1px solid rgba(111, 90, 70, 0.08);
}

.detail-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.detail-row strong {
    text-align: right;
    word-break: break-all;
}

.detail-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(112, 103, 246, 0.08);
    color: #5349d8;
    font-size: 13px;
    font-weight: 700;
}

.detail-empty {
    color: var(--muted);
    font-size: 14px;
}

.preview-stage {
    overflow: hidden;
    border-radius: 22px;
    background: #111;
}

.preview-stage video {
    display: block;
    width: 100%;
    max-height: min(76vh, 720px);
    background: #111;
}

.checkbox-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.checkbox-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 246, 238, 0.8);
    border: 1px solid rgba(111, 90, 70, 0.08);
}

.checkbox-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
}

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

@keyframes pulseRow {
    0% {
        background: rgba(116, 111, 255, 0.16);
    }
    100% {
        background: rgba(116, 111, 255, 0.02);
    }
}

@media (max-width: 1100px) {
    .app-shell,
    .panel-grid.two-up,
    .stats-grid,
    .stats-grid-wide {
        grid-template-columns: 1fr;
    }

    .command-hero,
    .dashboard-main-grid,
    .chart-leader-layout {
        grid-template-columns: 1fr;
    }

    .mission-grid,
    .hero-ribbon,
    .signal-grid {
        grid-template-columns: 1fr;
    }

    .platform-highlight-panel {
        grid-template-columns: 1fr;
    }

    .platform-highlight-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }


    .mission-pressure-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        gap: 18px;
    }

    .topbar,
    .hero-banner,
    .api-key-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .main-panel {
        padding: 14px;
        width: 100%;
        min-width: 0;
    }

    .sidebar {
        gap: 12px;
        padding: 14px 16px 10px;
        width: 100%;
        min-width: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .brand {
        gap: 10px;
    }

    .brand-mark {
        width: 50px;
        flex-basis: 50px;
    }

    .brand-title {
        font-size: 15px;
    }

    .brand-subtitle,
    .sidebar-card {
        display: none;
    }

    .nav-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .nav-list::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        flex: 0 0 auto;
        padding: 10px 14px;
        border-radius: 14px;
        white-space: nowrap;
    }

    .topbar {
        flex-flow: row wrap;
        align-items: center;
        gap: 12px;
    }

    .topbar-actions {
        gap: 8px;
    }

    .dashboard-platform-switcher {
        order: 5;
        width: 100%;
        overflow-x: auto;
    }

    .dashboard-platform-tabs {
        flex: 1 0 auto;
    }

    .dashboard-platform-tab {
        min-width: 98px;
    }

    .platform-highlight-grid {
        grid-template-columns: 1fr 1fr;
    }

    .notification-button {
        width: 42px;
        height: 42px;
    }

    .announcement-center-card {
        max-height: calc(100vh - 20px);
        padding: 18px;
        border-radius: 22px;
    }

    .announcement-inbox-item {
        padding: 15px;
    }

    .announcement-inbox-meta {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .announcement-inbox-meta time {
        width: 100%;
        margin-left: 17px;
    }

    .announcement-inbox-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .panel,
    .stat-card,
    .hero-banner,
    .api-key-hero {
        padding: 18px;
    }

    .api-key-vault,
    .api-key-guide {
        min-height: 0;
    }

    .api-key-actions,
    .secret-display {
        align-items: stretch;
        flex-direction: column;
    }

    .task-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .login-panel {
        padding: 26px;
    }

    .chart-shell {
        height: 240px;
        min-height: 240px;
    }

    .executive-panel,
    .mission-panel {
        padding: 20px;
    }

    .executive-header {
        flex-direction: column;
    }

    .quick-tag-tools {
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
    }

    .quick-tag-tools input {
        min-width: 0;
    }

    .account-detail-grid {
        grid-template-columns: 1fr;
    }

    .profile-avatar-picker,
    .analytics-overview-grid,
    .analytics-audience-grid,
    .analytics-extra-grid,
    .data-refresh-layout,
    .data-refresh-stats {
        grid-template-columns: 1fr;
    }

    .analytics-range-toolbar,
    .analytics-custom-dates {
        align-items: stretch;
        flex-direction: column;
    }

    .analytics-range-select,
    .analytics-custom-dates input,
    .analytics-range-toolbar .ghost-button {
        width: 100%;
    }

    .single-account-refresh-control {
        grid-template-columns: 1fr;
    }

    .single-account-refresh-control .ghost-button {
        width: 100%;
    }

    .analytics-extra-grid > .analytics-extra-trend {
        grid-column: span 1;
    }

    .account-target-grid {
        grid-template-columns: 1fr;
    }

    .movie-title-memory-row,
    .deepseek-key-summary,
    .provider-key-summary {
        grid-template-columns: 1fr;
    }

    .detail-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-field-wide {
        grid-column: span 1;
    }

    .filter-actions,
    .list-footer,
    .pagination-row {
        width: 100%;
    }

    .filter-actions .ghost-button,
    .pagination-row .ghost-button {
        flex: 1 1 auto;
    }

    .revenue-trend-header,
    .revenue-trend-controls,
    .revenue-trend-dates {
        align-items: stretch;
        flex-direction: column;
    }

    .revenue-trend-controls .compact-select,
    .revenue-trend-dates input,
    .revenue-trend-controls .ghost-button {
        width: 100%;
    }

    .revenue-trend-chart-shell {
        height: 250px;
    }

    .mission-pressure-grid {
        grid-template-columns: 1fr 1fr;
    }

    .responsive-table {
        min-width: 0;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        padding: 14px 0;
        border-bottom: 1px solid rgba(111, 90, 70, 0.08);
    }

    .responsive-table td {
        border-bottom: 0;
        padding: 8px 0;
    }

    .responsive-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: #7b6d60;
        font-size: 12px;
        font-weight: 800;
    }

    .responsive-table td.empty-cell::before {
        display: none;
    }

    .wide-dialog {
        width: calc(100vw - 16px);
    }

    .account-edit-grid {
        grid-template-columns: 1fr;
    }

    .dialog-card.account-videos-card {
        min-height: 0;
        max-height: calc(100vh - 16px);
        overflow: auto;
    }

    .account-videos-card .table-wrap {
        flex: none;
    }

    .account-videos-card .responsive-table {
        min-width: 0;
    }

    .upload-guide-panel {
        min-height: auto;
    }

    .upload-progress-panel {
        min-height: 260px;
        padding: 20px;
    }

    .upload-progress-heading {
        align-items: flex-start;
    }

    .upload-progress-stats {
        grid-template-columns: 1fr;
    }
}
