@charset "UTF-8";

:root {
  font-family: Inter, Geist, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #263247;
  background: #f5f7fb;
  font-synthesis: none;
  --accent: #3466e9;
  --accent-hover: #2455d4;
  --line: #e6eaf1;
  --muted: #69768d;
  --surface: #fff;
  --danger: #c54956;
  --sidebar: #191e2b;
  --sidebar-muted: #8e98ae;
  --shadow: 0 3px 14px #27395b04;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #9cb8ff; outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.35; letter-spacing: -.7px; font-weight: 680; color: #1a2539; }
h2 { font-size: 18px; font-weight: 650; color: #263247; letter-spacing: -.2px; }
h3 { font-size: 16px; font-weight: 600; color: #344057; }
small { font-size: 14px; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 14px; line-height: 1.65; margin-top: 7px; }
.hidden { display: none !important; }
.initial-loading { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); }
.shell { display: grid; grid-template-columns: 244px minmax(0,1fr); min-height: 100dvh; }
.sidebar { background: var(--sidebar); position: sticky; top: 0; height: 100dvh; padding: 30px 18px 20px; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 13px; padding: 0 10px 28px; flex: 0 0 auto; }
.brand-mark { width: 39px; height: 41px; position: relative; flex: 0 0 39px; }
.brand-mark span { position: absolute; width: 22px; height: 29px; border-radius: 5px; background: #85a3ff; top: 4px; left: 0; transform: rotate(-11deg); }
.brand-mark span:nth-child(2) { background: #5d86f9; left: 8px; top: 8px; transform: rotate(0); }
.brand-mark span:nth-child(3) { background: #b7e4f8; left: 16px; top: 4px; transform: rotate(11deg); box-shadow: -2px 0 3px #12275220; }
.brand-name { color: #f4f6ff; font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -.5px; }
.brand-sub { display: block; margin-top: 6px; color: #909bb3; font-size: 14px; letter-spacing: .6px; font-weight: 400; }
.nav { display: grid; gap: 6px; }
.nav-group-label { color: #8d99b0; font-size: 14px; padding: 13px 16px 7px; }
.nav-group-label:not(:first-child) { padding-top: 25px; }
.nav a { min-height: 48px; padding: 10px 15px; border-radius: 9px; color: #a9b2c5; display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; transition: background-color .15s, color .15s; }
.nav a:hover { background: #242b3d; color: #fff; }
.nav a.active { color: #fff; background: #3466e9; box-shadow: 0 5px 16px #0b1b532b; }
.nav-icon { width: 22px; height: 25px; display: grid; place-items: center; font-size: 22px; line-height: 1; opacity: .9; }
.nav-text { flex: 1; }
.nav-count { color: #a9b2c5; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 23px; text-align: center; }
.nav a.active .nav-count { color: #fff; background: #ffffff20; border-radius: 5px; padding: 0 5px; }
.sidebar-footer { margin-top: auto; padding: 25px 5px 0; }
.session-line { padding-top: 19px; border-top: 1px solid #303748; display: flex; align-items: center; gap: 11px; }
.session-user { flex: 1; min-width: 0; }
.session-user strong { display: block; font-size: 14px; color: #e9edf7; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-user > span { display: block; font-size: 14px; color: #7f8ba4; }
.sidebar-footer .button.ghost { padding: 6px 4px; color: #99a5be; font-size: 14px; }
.sidebar-footer .button.ghost:hover { color: #fff; background: #2a3348; }
.sidebar-backdrop { display: none; }
.main { min-width: 0; }
.topbar { height: 78px; padding: 0 36px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar-breadcrumb { display: flex; align-items: center; gap: 14px; font-size: 14px; white-space: nowrap; }
.topbar-label { color: #66748b; }
.breadcrumb-divider { color: #c2c9d5; }
#page-breadcrumb { color: #59657a; font-weight: 500; }
.topbar-tools { display: flex; align-items: center; gap: 18px; }
.topbar-timezone { color: #66748b; font-size: 14px; }
.mobile-menu { display: none !important; }
.content { max-width: 1740px; padding: 32px 36px 48px; margin: auto; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-header p { color: var(--muted); margin-top: 9px; font-size: 15px; max-width: 820px; }
.page-header > .actions { margin-top: 4px; flex-shrink: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.actions select { width: auto; max-width: 100%; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border: 1px solid #dce2ec; border-radius: 8px; background: #fff; color: #59657b; padding: 9px 16px; font-size: 14px; font-weight: 550; line-height: 1.5; white-space: nowrap; transition: background-color .16s, border-color .16s, box-shadow .16s, opacity .16s; }
.button:hover { background: #f6f8fc; border-color: #bfcbdf; color: #344564; }
.button.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 3px 7px #3466e91a; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 4px 10px #3466e926; }
.button-icon { font-size: 21px; line-height: .8; font-weight: 400; margin-right: 1px; }
.button.danger { color: var(--danger); }
.button.danger:hover { background: #fff1f3; border-color: #efc6cd; }
.button.ghost { background: transparent; border-color: transparent; padding: 6px 9px; min-height: 34px; }
.button.ghost:hover { background: #edf2fd; color: #3466e9; }
.button.ghost.danger:hover { background: #fff1f3; color: var(--danger); }
.button.small { padding: 6px 10px; min-height: 35px; font-size: 14px; }
.button.is-processing { opacity: .85; }
.processing-spinner { display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: processing-spin .7s linear infinite; }
.processing-status { color: var(--accent); font-size: 14px; animation: appear .16s ease-out; }
.modal-footer .processing-status { margin-right: auto; }
.login-card .processing-status { margin-top: 14px; text-align: center; }
.modal-body, .login-card form > .field { transition: opacity .16s; }
form.is-processing .modal-body, form.is-processing > .field { opacity: .7; }
form.is-processing input, form.is-processing select, form.is-processing textarea { cursor: wait; }
.card { border: 1px solid var(--line); background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.card-header { min-height: 78px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf0f6; gap: 15px; }
.card-body { padding: 24px; }
.section-description { margin-top: 5px; color: var(--muted); font-size: 14px; }
.text-link { color: #5e7dda; font-size: 14px; white-space: nowrap; }
.grid { display: grid; gap: 20px; }
.overview-date { color: #66748b; font-size: 14px; margin: -15px 0 23px; }
.stats-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 19px; margin-bottom: 25px; }
.stat { display: block; padding: 21px 23px 18px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 7px 22px #223b6b0c; }
.stat-top, .stat-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { color: #69778f; font-size: 14px; }
.stat-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 21px; font-weight: 500; background: #edf2ff; color: #5c80e5; }
.stat-cyan .stat-icon { color: #32a7b4; background: #eaf8f9; }
.stat-violet .stat-icon { color: #8a79dc; background: #f1edfd; }
.stat-orange .stat-icon { color: #da9b52; background: #fff5e9; }
.stat-value { font-size: 37px; line-height: 1.3; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.8px; margin: 6px 0 14px; color: #222f46; }
.stat-detail { font-size: 14px; color: #69778f; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 24px; align-items: start; }
.recent-jobs { min-height: 365px; }
.recent-jobs .empty { min-height: 325px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.status-card .card-header { min-height: 78px; }
.status-total { display: flex; align-items: baseline; gap: 9px; }
.status-total strong { color: #2f3e57; font-size: 32px; line-height: 1; font-weight: 650; font-variant-numeric: tabular-nums; }
.status-total > span { color: #66748b; font-size: 14px; }
.status-distribution { height: 10px; border-radius: 5px; display: flex; gap: 3px; margin: 23px 0 24px; background: #f0f3f8; overflow: hidden; }
.status-distribution > span { border-radius: 2px; min-width: 3px; }
.distribution-blue, .dot-blue { background: #5d85eb; }
.distribution-cyan, .dot-cyan { background: #48bdca; }
.distribution-green, .dot-green { background: #63bea3; }
.distribution-orange, .dot-orange { background: #e3af6c; }
.distribution-gray, .dot-gray { background: #c6cedc; }
.status-legend { display: grid; gap: 15px; }
.status-legend-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #66748b; }
.status-dot { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 8px; }
.status-legend-row strong { margin-left: auto; color: #596980; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.workspace-section { margin-top: 28px; }
.section-heading { margin-bottom: 16px; }
.resource-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.resource-card { display: flex; align-items: center; gap: 16px; padding: 23px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.resource-card:hover { border-color: #bbcdef; }
.resource-icon { display: grid; place-items: center; width: 43px; height: 45px; border-radius: 11px; color: #5e85e4; background: #eef3fe; font-size: 25px; flex: 0 0 43px; }
.resource-cyan { color: #3ba3b3; background: #eaf7f9; }
.resource-violet { color: #8d79d2; background: #f2eefb; }
.resource-text { min-width: 0; flex: 1; }
.resource-text h3 { font-size: 15px; }
.resource-text p { font-size: 14px; color: #66748b; margin-top: 5px; }
.resource-count { color: #536079; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.collection-summary { display: flex; align-items: center; gap: 30px; margin-bottom: 23px; color: #66748b; font-size: 14px; flex-wrap: wrap; }
.collection-summary > span { display: inline-flex; align-items: center; gap: 9px; }
.collection-summary strong { color: #53627c; font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.toolbar { padding: 20px 23px; min-height: 86px; border-bottom: 1px solid #edf0f6; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.toolbar-search { width: 325px; max-width: 100%; position: relative; }
.toolbar-search::before { content: ''; position: absolute; left: 15px; top: 15px; width: 12px; height: 12px; border: 1.6px solid #a3afc3; border-radius: 50%; pointer-events: none; }
.toolbar-search::after { content: ''; position: absolute; width: 6px; height: 1.6px; background: #a3afc3; left: 27px; top: 29px; transform: rotate(45deg); pointer-events: none; }
.toolbar-search input { padding-left: 39px !important; background: #fbfcfe !important; font-size: 14px !important; }
.count { color: #66748b; font-size: 14px; white-space: nowrap; }
.table-scroll { width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #cdd7e8 transparent; }
table { width: 100%; text-align: left; border-collapse: collapse; white-space: nowrap; }
th { padding: 15px 23px; color: #69778f; background: #fafbfd; border-bottom: 1px solid #edf0f6; font-size: 14px; font-weight: 500; }
td { padding: 19px 23px; border-bottom: 1px solid #edf0f6; font-size: 16px; vertical-align: middle; color: #5c6981; }
th:last-child, td:last-child { text-align: right; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfdff; }
.cell-primary { color: #394861; font-weight: 550; max-width: 235px; overflow: hidden; text-overflow: ellipsis; }
.cell-secondary { font-size: 14px; color: #6d7b93; margin-top: 5px; font-weight: 400; line-height: 1.45; }
.cell-wrap { white-space: normal; min-width: 140px; max-width: 330px; overflow-wrap: anywhere; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.identity-cell { display: flex; align-items: center; gap: 12px; text-align: left; }
.avatar { width: 41px; height: 41px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; font-weight: 600; font-size: 16px; flex: 0 0 41px; background: #eaf0fe; color: #5c7dcc; }
.avatar.tone-1 { color: #349f9a; background: #e4f5f0; }
.avatar.tone-2 { color: #9474b9; background: #f1eaf9; }
.avatar.tone-3 { color: #b58b52; background: #faf0de; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.small-avatar { width: 35px; height: 35px; flex-basis: 35px; font-size: 14px; border-radius: 10px; }
.sidebar .avatar { background: #303e62; color: #adbef1; }
.country-cell { display: flex; align-items: center; gap: 10px; }
.country-code { background: #f0f4fb; color: #4d668e; border: 1px solid #e4eaf6; border-radius: 7px; padding: 5px 6px; font-size: 14px; font-weight: 600; line-height: 1.3; min-width: 36px; text-align: center; }
.country-name { color: #5b6c87; font-size: 15px; }
.content-thumbnail { width: 39px; height: 51px; object-fit: cover; border-radius: 6px; background: #f0f3f8; flex: 0 0 39px; }
.empty-thumbnail { display: grid; place-items: center; font-size: 22px; color: #a2b2cf; }
.badge { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 5px; line-height: 1.5; font-weight: 500; color: #59687f; background: #f1f3f7; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.good { color: #287d5e; background: #edf8f2; }
.badge.pending { color: #315fa6; background: #eef3fe; }
.badge.warn { color: #976317; background: #fff7e9; }
.badge.bad { color: #a4404b; background: #fff0f2; }
.badge + .badge { margin-left: 5px; }
.empty { padding: 42px 26px; text-align: center; color: #8b97aa; }
.empty-symbol { display: flex; justify-content: center; align-items: center; gap: 0; height: 48px; margin: 0 auto 19px; }
.empty-symbol span { width: 29px; height: 36px; display: block; border: 2px solid #dbe3f1; border-radius: 7px; transform: rotate(-9deg); background: #f7f9fd; }
.empty-symbol span:last-child { margin-left: -12px; transform: rotate(8deg); background: #edf2fb; }
.empty h3 { color: #6a7891; font-size: 16px; margin-bottom: 8px; font-weight: 550; }
.empty p { margin: 0 auto 19px; max-width: 510px; color: #6d7b93; font-size: 14px; line-height: 1.75; }
.notice { padding: 15px 18px; border: 1px solid #d9e5ff; border-radius: 9px; color: #6d86b8; background: #f3f7ff; font-size: 14px; line-height: 1.7; margin-bottom: 22px; overflow-wrap: anywhere; }
.notice.warning { border-color: #eee2c7; color: #ab8b52; background: #fffbf2; }
.notice.error { border-color: #efcfd4; color: #bc626e; background: #fff4f5; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 22px; }
.asset-card { border: 1px solid var(--line); background: #fff; border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.asset-card > a { display: block; padding: 12px; background: #f0f3f8; }
.asset-card img { width: 100%; height: 255px; object-fit: contain; background: #f0f3f8; display: block; border-radius: 7px; }
.asset-info { padding: 16px; }
.asset-name { font-size: 15px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #596981; }
.asset-meta { color: #66748b; font-size: 14px; margin: 6px 0 14px; }
.asset-info .actions { justify-content: space-between; gap: 4px; }
.upload-zone { padding: 31px; background: #f9fbff; border: 1px dashed #bacbed; border-radius: 13px; margin-bottom: 25px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px 23px; transition: background-color .15s; }
.upload-zone p { font-size: 14px; color: #66748b; }
.upload-zone.dragging { background: #eaf1ff; border-color: #7096f0; }
dialog { width: min(760px,calc(100vw - 40px)); max-height: calc(100dvh - 56px); padding: 0; border: 1px solid #e1e6ef; border-radius: 17px; background: #fff; color: inherit; box-shadow: 0 28px 110px #17284532; overflow: auto; }
dialog::backdrop { background: #1421377a; backdrop-filter: blur(4px); }
dialog.wide { width: min(1120px,calc(100vw - 40px)); }
dialog.browser-modal { width: min(1540px,calc(100vw - 28px)); }
dialog[open] { animation: appear .18s ease-out; }
.modal-header { padding: 22px 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff; }
.modal-header h2 { font-size: 20px; font-weight: 650; }
.modal-header .button { font-size: 14px; }
.modal-body { padding: 27px 28px; max-height: calc(100dvh - 220px); overflow: auto; }
.modal-footer { padding: 19px 28px; border-top: 1px solid var(--line); background: #fafbfd; display: flex; justify-content: flex-end; align-items: center; gap: 11px; }
.form-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 23px 25px; }
.pipeline-fields { grid-column: 1/-1; border: 0; border-top: 1px solid var(--line); padding: 24px 0 0; margin: 3px 0 0; min-width: 0; }
.field { min-width: 0; display: block; }
.field.full { grid-column: 1/-1; }
.field-label { display: block; margin-bottom: 9px; font-size: 14px; font-weight: 550; color: #66748c; }
input:not([type=checkbox]):not([type=file]), select, textarea { width: 100%; min-width: 0; border: 1px solid #dae1ed; border-radius: 8px; padding: 11px 13px; background: #fff; color: #465673; font-size: 16px; line-height: 1.55; transition: border-color .15s, box-shadow .15s; }
input:not([type=checkbox]):not([type=file]):focus, select:focus, textarea:focus { border-color: #89a7ef; outline: 0; box-shadow: 0 0 0 3px #3466e90d; }
input[readonly] { color: #8996ad !important; background: #f7f9fd !important; }
input::placeholder, textarea::placeholder { color: #a8b2c3; }
textarea { min-height: 110px; resize: vertical; line-height: 1.8; }
textarea.code { min-height: 300px; font: 14px/1.8 "Cascadia Code", Consolas, monospace; color: #6b7f9d; background: #f9fbfe; tab-size: 2; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 18px; cursor: pointer; }
.checkbox { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 14px; color: #6d7b93; }
.checkbox .hint { margin: 0; }
.form-error { padding: 13px 16px; color: #bd616e; background: #fff3f5; border: 1px solid #f0cdd5; border-radius: 8px; font-size: 14px; line-height: 1.75; margin-top: 22px; overflow-wrap: anywhere; }
.asset-picker { max-height: 310px; padding: 13px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: #fafbfd; display: grid; grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); gap: 11px; }
.asset-choice { padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; position: relative; }
.asset-choice.selected { border-color: #8caaf4; box-shadow: 0 0 0 2px #dce7ff; background: #f5f8ff; }
.asset-choice img { display: block; width: 100%; height: 115px; object-fit: contain; margin-bottom: 8px; }
.asset-choice span { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-choice input { position: absolute; top: 8px; left: 8px; }
.selected-assets { display: grid; gap: 8px; margin-top: 15px; }
.selected-asset { padding: 9px 10px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.selected-asset img { width: 34px; height: 44px; object-fit: cover; border-radius: 5px; }
.asset-order-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #64738d; }
.selection-list { border: 1px solid var(--line); border-radius: 9px; max-height: 285px; overflow-y: auto; padding: 7px 15px; }
.selection-list label { padding: 13px 0; border-bottom: 1px solid #edf0f6; gap: 11px; }
.selection-list label:last-child { border-bottom: 0; }
.selection-list small { margin-left: auto; color: #a1adbf; }
.event-list { max-height: 420px; overflow: auto; display: grid; gap: 17px; }
.event { padding: 3px 0 3px 15px; border-left: 2px solid #a3c2f4; }
.event.error { border-color: #e2a0ad; }
.event-time { color: #9ba7bb; font-size: 14px; margin-bottom: 5px; }
.event-message { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.7; }
.detail-list { margin: 0 0 25px; display: grid; grid-template-columns: 130px 1fr; gap: 14px 20px; font-size: 15px; }
.detail-list dt { color: #9ba6b8; }
.detail-list dd { margin: 0; color: #667792; overflow-wrap: anywhere; }
.code-output { margin: 0; padding: 18px; color: #70829f; background: #f5f8fc; border: 1px solid var(--line); border-radius: 9px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; font: 14px/1.8 Consolas, monospace; }
.browser-toolbar { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 9px; background: #f9fbfe; }
.browser-toolbar input { flex: 1; min-width: 200px !important; font-size: 14px !important; }
.browser-toolbar .button { min-height: 44px; }
.browser-layout { display: grid; grid-template-columns: minmax(0,1fr) 265px; }
.browser-screen { min-height: 390px; max-height: 66vh; background: #e8edf6; display: flex; align-items: flex-start; justify-content: center; overflow: auto; position: relative; }
.browser-screen img { display: block; width: 100%; height: auto; cursor: crosshair; user-select: none; touch-action: none; }
.browser-screen[aria-busy=true]::after { content: '处理中…'; position: absolute; top: 15px; right: 15px; border-radius: 7px; padding: 8px 13px; color: #fff; background: #3563cce8; font-size: 14px; pointer-events: none; }
.browser-controls { padding: 21px 19px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 19px; }
.browser-controls textarea { min-height: 90px; }
.browser-controls .actions { gap: 6px; }
.browser-controls .button { padding: 7px 10px; min-height: 36px; font-size: 14px; }
.browser-controls .field-label { margin-bottom: 9px; }
.browser-status { padding: 13px 20px; border-top: 1px solid var(--line); color: #8b9ab3; font-size: 14px; overflow-wrap: anywhere; background: #f9fbfe; }
.browser-error { margin: 0; border-radius: 0; }
.notifications { position: fixed; right: 25px; bottom: 25px; z-index: 100; display: grid; gap: 11px; max-width: min(470px,calc(100vw - 36px)); pointer-events: none; }
.toast { padding: 14px 19px; color: #f6f8ff; background: #344768; border-radius: 10px; box-shadow: 0 8px 30px #24355029; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; pointer-events: auto; animation: appear .18s ease-out; }
.toast.error { background: #b26272; }
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 30px; background: radial-gradient(ellipse at 20% 10%,#eaf0ff,transparent 45%),radial-gradient(ellipse at 95% 80%,#eaf7f8,transparent 45%),#f5f7fb; }
.login-card { width: min(470px,100%); padding: 40px 42px; background: #fff; border: 1px solid #e3e9f3; border-radius: 20px; box-shadow: 0 18px 80px #314b7c0b; }
.login-card .brand { padding: 0 0 35px; }
.login-card .brand-name { color: #31466a; font-size: 24px; }
.login-card .brand-sub { color: #9ba9bf; }
.login-card h1 { font-size: 25px; }
.login-card p { margin: 10px 0 29px; color: #9aa6ba; font-size: 15px; }
.login-card .field { margin-bottom: 22px; }
.login-card .button.primary { width: 100%; min-height: 48px; font-size: 15px; margin-top: 5px; }

@keyframes processing-spin { to { transform: rotate(360deg); } }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Account onboarding and selection share the dashboard's spacing and surfaces. */
dialog.onboarding-modal { width: min(900px,calc(100vw - 40px)); }
.onboarding-body { max-height: calc(100dvh - 235px); overflow: auto; }
.onboarding-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); list-style: none; margin: 0; padding: 23px 28px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.onboarding-steps li { display: flex; align-items: center; gap: 9px; color: #8894a9; font-size: 14px; position: relative; min-width: 0; }
.onboarding-steps li:not(:last-child)::after { content: ''; height: 1px; background: #dfe5f0; flex: 1; margin: 0 13px 0 5px; }
.step-marker { display: inline-grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 50%; border: 1px solid #dce3ef; background: #fff; font-size: 13px; font-weight: 600; line-height: 1; }
.onboarding-steps .active { color: #2e5cc7; font-weight: 600; }
.onboarding-steps .active .step-marker { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px #3466e90c; }
.onboarding-steps .done { color: #648177; }
.onboarding-steps .done .step-marker { color: #287d5e; background: #edf8f2; border-color: #d8ecdf; }
.onboarding-step-content { padding: 27px 30px 30px; }
.wizard-intro { margin-bottom: 23px; }
.wizard-intro h3 { font-size: 18px; color: #2f3e57; }
.wizard-intro p { margin-top: 7px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.wizard-intro.centered { text-align: center; max-width: 560px; margin: 0 auto 24px; }
.onboarding-footer { justify-content: space-between; }
.onboarding-footer > .actions { justify-content: flex-end; margin-left: auto; }
.country-picker { margin-bottom: 24px; }
.country-picker > input[type=search] { padding: 12px 15px; background: #fbfcfe; }
.country-results-title { margin: 19px 0 11px; font-size: 13px; color: #7a879d; }
.country-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; max-height: 278px; overflow: auto; padding: 2px 3px 3px 1px; scrollbar-width: thin; scrollbar-color: #cdd7e8 transparent; }
.country-option { justify-content: flex-start; min-width: 0; padding: 10px; gap: 10px; min-height: 66px; text-align: left; white-space: normal; font-weight: 500; border-color: #e5eaf3; }
.country-option .country-code { font-size: 12px; flex: 0 0 34px; min-width: 34px; background: #f4f6fa; border-color: #e8edf5; }
.country-option-name { min-width: 0; color: #4a5b76; font-size: 14px; line-height: 1.5; }
.country-option-name small { display: block; color: #8994a7; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 155px; margin-top: 3px; }
.country-option.selected { border-color: #8caaf2; background: #f1f5ff; box-shadow: 0 0 0 1px #3466e90a; }
.country-option.selected .country-code { color: #3466e9; background: #e7efff; border-color: #d8e3ff; }
.country-no-results { grid-column: 1/-1; color: #7e8ba2; padding: 25px 10px; text-align: center; font-size: 14px; }
.country-picker > .button { margin-top: 11px; }
.country-selected { display: flex; align-items: center; gap: 12px; padding: 13px 15px; margin-top: 12px; background: #f3f7ff; border: 1px solid #dce6fc; border-radius: 9px; }
.country-selected strong { display: block; font-size: 14px; font-weight: 600; color: #3f5a88; }
.country-selected small { display: block; font-size: 12px; margin-top: 2px; color: #7d8fae; overflow-wrap: anywhere; }
.country-selected-mark { color: #527ad0; font-size: 12px; margin-left: auto; white-space: nowrap; }
.country-ambiguity { padding: 11px 13px; margin-top: 12px; border-radius: 8px; background: #fff8eb; color: #9b773e; font-size: 13px; }
.proxy-check-box { padding: 16px 18px; margin: 20px 0 14px; border: 1px solid #e1e8f4; border-radius: 10px; background: #f7f9fd; font-size: 14px; }
.proxy-check-box p { margin-top: 4px; font-size: 13px; overflow-wrap: anywhere; }
.proxy-check-box strong { font-size: 14px; font-weight: 600; }
.proxy-check-box.checking { display: flex; align-items: center; gap: 10px; color: #597ab9; }
.proxy-check-box.passed { border-color: #d7eadf; background: #f0f9f4; color: #468366; }
.proxy-check-box.failed { border-color: #efcfd4; background: #fff4f5; color: #ad5865; }
.qr-frame { width: 258px; min-height: 258px; margin: 0 auto; border: 1px solid #dfe6f1; border-radius: 16px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; padding: 22px; background: #fff; box-shadow: 0 7px 26px #2a42650a; text-align: center; }
.qr-frame img { display: block; width: 212px; max-width: 100%; height: auto; max-height: 250px; object-fit: contain; }
.qr-frame .processing-spinner { width: 29px; height: 29px; flex-basis: 29px; color: #6085df; }
.qr-frame p { color: #7d8ba2; font-size: 13px; }
.qr-frame strong { color: #7a879c; font-size: 16px; }
.qr-frame.expired { background: #fafbfd; border-style: dashed; box-shadow: none; }
.qr-expiry { text-align: center; font-size: 13px; color: #8793a7; margin-top: 14px; font-variant-numeric: tabular-nums; }
.qr-instruction { text-align: center; font-size: 14px; color: #60718e; margin: 18px auto 0; max-width: 420px; }
.onboarding-step-content > .notice { margin: 20px 0 0; }
.identity-review { padding: 22px 24px; border: 1px solid #e4eaf3; border-radius: 12px; background: #fcfdff; }
.identity-review-header { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid #e8edf5; }
.review-avatar { width: 60px; height: 60px; flex-basis: 60px; border-radius: 16px; font-size: 23px; }
.identity-review-header h3 { font-size: 18px; }
.identity-review-header p { font-size: 14px; color: #7b8ba4; margin-top: 3px; overflow-wrap: anywhere; }
.identity-review .detail-list { grid-template-columns: 135px minmax(0,1fr); gap: 12px 22px; font-size: 14px; margin-bottom: 0; }
.identity-review .detail-list dt { color: #8492a8; }
.identity-review .detail-list dd { color: #4e6282; }
.identity-review .notice { margin: 21px 0 14px; font-size: 13px; padding: 12px 15px; }
.partial-confirm { font-size: 13px; align-items: flex-start; line-height: 1.7; }
.partial-confirm input { margin-top: 2px; }
.onboarding-complete { text-align: center; padding: 12px 0; }
.completion-mark { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: #edf8f2; color: #40976f; font-size: 30px; margin: 0 auto 17px; }
.onboarding-complete > h3 { font-size: 21px; color: #30445e; }
.onboarding-complete .identity-review-header { display: inline-flex; text-align: left; margin: 25px 0 0; padding: 19px 24px; border: 1px solid #e5eaf3; border-radius: 12px; background: #fafcfe; }
.account-bulk { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 15px 23px; background: #f2f6ff; border-bottom: 1px solid #dfe8fa; }
.account-bulk > strong { font-size: 14px; font-weight: 550; color: #5274b3; }
.accounts-table th:first-child, .accounts-table td:first-child { width: 80px; padding-right: 12px; }
.select-all-label { white-space: nowrap; font-size: 13px; gap: 6px; }

@media (max-width: 700px) {
  dialog.onboarding-modal { width: calc(100vw - 20px); }
  .onboarding-body { max-height: calc(100dvh - 205px); }
  .onboarding-steps { padding: 18px 16px; gap: 4px; }
  .onboarding-steps li { flex-direction: column; gap: 8px; font-size: 11px; text-align: center; line-height: 1.3; }
  .onboarding-steps li:not(:last-child)::after { position: absolute; left: calc(50% + 21px); right: calc(-50% + 17px); top: 14px; margin: 0; }
  .onboarding-step-content { padding: 22px 20px; }
  .wizard-intro h3 { font-size: 17px; }
  .wizard-intro p { font-size: 13px; }
  .country-options { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 260px; gap: 7px; }
  .country-option { gap: 7px; padding: 9px 7px; }
  .country-option-name { font-size: 13px; }
  .country-option-name small { font-size: 10px; max-width: 95px; }
  .country-selected { padding: 11px; gap: 9px; }
  .country-selected-mark { font-size: 11px; }
  .country-selected small { font-size: 11px; }
  .identity-review { padding: 18px 15px; }
  .identity-review-header { gap: 12px; margin-bottom: 19px; padding-bottom: 17px; }
  .identity-review-header h3 { font-size: 16px; }
  .review-avatar { width: 49px; height: 49px; flex-basis: 49px; border-radius: 13px; }
  .identity-review .detail-list { grid-template-columns: 100px minmax(0,1fr); font-size: 13px; gap: 12px 10px; }
  .identity-review .badge { font-size: 12px; white-space: normal; }
  .onboarding-footer > .actions { flex: 1 1 auto; }
  .onboarding-footer > .actions .button { flex: 1; font-size: 13px; padding-left: 12px; padding-right: 12px; }
  .onboarding-footer > .button { flex: 0 0 auto; }
  .account-bulk { padding: 14px 17px; }
  .account-bulk > .actions { gap: 7px; }
  .account-bulk .button { font-size: 12px; padding: 7px 10px; }
  .accounts-table td:first-child { width: auto; padding: 0 0 10px; }
}
@media (min-width: 1700px) {
  .content { padding-top: 39px; }
  .stats-grid { gap: 24px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr) 350px; }
}
@media (max-width: 1350px) {
  .shell { grid-template-columns: 225px minmax(0,1fr); }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .content { padding: 28px; }
  .topbar { padding: 0 28px; }
  .stats-grid { gap: 14px; }
  .stat { padding: 17px; }
  .stat-detail { font-size: 14px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr) 285px; gap: 19px; }
  .resource-grid { gap: 16px; }
  .resource-card { padding: 17px; gap: 11px; }
  .resource-text p { font-size: 14px; }
  th, td { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 1150px) {
  .page-header { flex-wrap: wrap; }
  .page-header > .actions { margin-top: 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .status-card .card-body { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 0 28px; align-items: start; }
  .status-total { grid-column: 1; margin-top: 4px; flex-wrap: wrap; }
  .status-distribution { grid-column: 1; margin-top: 18px; }
  .status-legend { grid-column: 2; grid-row: 1 / 3; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card { padding: 20px 24px; }
  .topbar-timezone { display: none; }
}
@media (max-width: 820px) {
  .shell { display: block; }
  .sidebar { position: fixed; z-index: 30; width: 255px; transform: translateX(-100%); transition: transform .18s ease; box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: 10px 0 50px #111d3838; }
  .sidebar.open + .sidebar-backdrop { display: block; position: fixed; z-index: 25; inset: 0; border: 0; background: #17243c6b; }
  .mobile-menu { display: inline-flex !important; min-height: 36px; padding: 5px 10px; }
  .topbar { height: 66px; padding: 0 21px; }
  .topbar-breadcrumb { gap: 10px; }
  .topbar-label, .breadcrumb-divider { display: none; }
  .content { padding: 25px 21px 38px; }
  .page-header { gap: 18px; margin-bottom: 25px; }
  h1 { font-size: 27px; }
  .page-header p { font-size: 15px; }
  .stats-grid { gap: 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 32px; margin-bottom: 11px; }
  .stat-icon { width: 30px; height: 30px; font-size: 18px; }
  .stat-top { gap: 6px; }
  .resource-grid { grid-template-columns: 1fr; }
  .collection-summary { gap: 19px; }
  .form-grid { gap: 19px; }
}
@media (max-width: 620px) {
  .content { padding: 23px 16px 35px; }
  .topbar { padding: 0 16px; }
  h1 { font-size: 26px; }
  .page-header { margin-bottom: 22px; }
  .page-header p { margin-top: 7px; }
  .page-header > .actions { width: 100%; gap: 9px; }
  .page-header > .actions .button { flex: 1; }
  .overview-date { margin-top: -10px; }
  .stats-grid { gap: 11px; margin-bottom: 19px; }
  .stat { padding: 16px 14px 13px; border-radius: 11px; }
  .stat-label { font-size: 14px; }
  .stat-value { font-size: 29px; margin: 9px 0 12px; }
  .stat-icon { width: 25px; height: 25px; border-radius: 7px; font-size: 16px; }
  .stat-detail { font-size: 14px; }
  .stat-bottom { align-items: flex-start; }
  .stat-bottom > span { display: none; }
  .card { border-radius: 12px; }
  .card-header { padding: 18px; min-height: 72px; }
  .card-body { padding: 20px; }
  .section-description { font-size: 14px; }
  .dashboard-grid { gap: 18px; }
  .recent-jobs { min-height: auto; }
  .recent-jobs .empty { min-height: 250px; }
  .status-card .card-body { display: block; }
  .status-total { flex-wrap: nowrap; }
  .status-legend { grid-template-columns: 1fr; gap: 14px; }
  .resource-card { padding: 19px; }
  .resource-text p { font-size: 14px; }
  .resource-count { font-size: 22px; }
  .collection-summary { row-gap: 9px; column-gap: 21px; }
  .toolbar { padding: 16px; gap: 12px; }
  .toolbar-search { width: 100%; }
  .toolbar > .actions { width: 100%; align-items: stretch; flex-direction: column; }
  .toolbar .count { margin-left: auto; }
  .toolbar select { width: 100%; }
  .table-scroll { overflow: visible; }
  table, tbody { display: block; width: 100%; white-space: normal; }
  thead { display: none; }
  tbody tr { display: block; padding: 17px 18px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: grid; grid-template-columns: 94px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 0; border: 0; font-size: 15px; text-align: left !important; }
  td::before { content: attr(data-label); color: #66748b; font-size: 14px; }
  td:first-child { display: block; padding-top: 0; padding-bottom: 15px; }
  td:first-child::before { display: none; }
  td:last-child { display: block; padding-top: 14px; padding-bottom: 0; }
  td:last-child::before { display: none; }
  td:last-child > .button { width: 100%; border: 1px solid #e6ebf6; }
  .row-actions { justify-content: flex-start; flex-wrap: wrap; gap: 7px; }
  .row-actions .row-actions { display: contents; }
  .row-actions > .button:first-child { margin-right: auto; }
  .cell-primary { max-width: 100%; }
  .cell-wrap { max-width: none; min-width: 0; }
  .country-cell { gap: 9px; }
  .country-code { min-width: 34px; }
  .empty { padding: 36px 22px; }
  .empty p { font-size: 14px; }
  .notice { padding: 14px 16px; }
  .media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
  .asset-card > a { padding: 7px; }
  .asset-card img { height: 200px; }
  .asset-info { padding: 12px; }
  .asset-info .actions { flex-direction: column; align-items: stretch; }
  .asset-name, .asset-meta { font-size: 14px; }
  .upload-zone { padding: 24px 18px; gap: 14px; text-align: center; }
  .upload-zone .button { width: 100%; }
  dialog, dialog.wide { width: calc(100vw - 20px); max-height: calc(100dvh - 26px); border-radius: 13px; }
  .modal-header { padding: 18px 20px; }
  .modal-header h2 { font-size: 19px; }
  .modal-body { padding: 22px 20px; max-height: calc(100dvh - 190px); }
  .modal-footer { padding: 16px 20px; gap: 9px; flex-wrap: wrap; }
  .modal-footer .button { flex: 1; }
  .modal-footer .processing-status { flex-basis: 100%; margin-bottom: 4px; }
  .form-grid { grid-template-columns: 1fr; gap: 20px; }
  .field.full { grid-column: auto; }
  .pipeline-fields { grid-column: auto; padding-top: 21px; }
  .asset-picker { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 10px; }
  .selected-asset { gap: 7px; flex-wrap: wrap; }
  .selected-asset .asset-order-name { flex-basis: calc(100% - 50px); }
  .selected-asset .button { flex: 1; }
  .selection-list { padding-left: 12px; padding-right: 12px; }
  .selection-list label { flex-wrap: wrap; }
  .selection-list small { margin-left: 29px; }
  .detail-list { grid-template-columns: 90px 1fr; gap: 13px; }
  .browser-layout { grid-template-columns: 1fr; }
  .browser-controls { border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; padding: 18px; gap: 17px; }
  .browser-controls > .hint, .browser-controls > .checkbox { grid-column: 1/-1; }
  .browser-controls .actions { gap: 6px; }
  .browser-screen { min-height: 210px; max-height: 44vh; }
  .browser-toolbar { padding: 12px; }
  .browser-toolbar input { flex-basis: 100%; }
  .browser-toolbar .button { flex: 1; }
  .browser-status { padding: 12px 16px; }
  .login-page { padding: 20px; }
  .login-card { padding: 32px 26px; border-radius: 16px; }
  .notifications { right: 18px; left: 18px; bottom: 18px; max-width: none; }
}

.content-used td { color: #a4404b; background: #fff4f5; }
.content-used .cell-primary, .content-used .cell-secondary { color: #a4404b; }
