@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #111c27;
  --muted: #738191;
  --soft: #98a5b3;
  --line: #dbe2e8;
  --line-light: #e8edf1;
  --paper: #ffffff;
  --workspace: #f3f6f8;
  --teal: #1abbb7;
  --teal-dark: #129996;
  --red: #d93652;
  --red-soft: #fff0f2;
  --green: #13895d;
  --green-soft: #edf9f3;
  font-family: 'DM Sans', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  background: var(--workspace);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--workspace); font-size: 13px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid #27aaa4; outline-offset: 2px; }

.site-header { position: sticky; top: 0; z-index: 6; height: 64px; display: flex; align-items: center; gap: 42px; padding: 0 max(32px, calc((100% - 1320px) / 2)); border-bottom: 1px solid var(--line); background: #fbfdfb; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; color: inherit; text-decoration: none; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px 10px 10px 3px; background: #1d4940; color: #fff; font-size: 14px; font-weight: 750; letter-spacing: 0; }
.brand-name { color: #182b2b; font-size: 15px; font-weight: 750; letter-spacing: 0; white-space: nowrap; }
.header-nav { display: flex; align-items: center; align-self: stretch; gap: 26px; min-width: 0; }
.nav-link { display: inline-flex; align-items: center; position: relative; color: #73817e; font-size: 12px; white-space: nowrap; text-decoration: none; }
.nav-link.active { color: #182b2b; font-weight: 650; }
.nav-link.active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; content: ""; background: #1d4940; }
.header-meta { display: flex; align-items: center; gap: 8px; margin-left: auto; color: #586969; font-size: 11px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #5da681; }
.user-menu { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 3px 4px; cursor: default; }
.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: #536572; background: #e9eff1; font-size: 11px; font-weight: 700; }
.chevron { color: #8895a0; font-size: 16px; margin-left: 1px; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #778694; cursor: pointer; }
.icon-button:hover { border-color: var(--line); background: #f8fafb; color: var(--ink); }
.icon-button svg, .button svg, .search-box svg, .link-cell svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.logout-button { border-color: var(--line-light); }

.workspace { display: grid; grid-template-columns: minmax(260px, 292px) minmax(0, 1fr); gap: 16px; padding: 18px 22px 60px; max-width: 1920px; margin: 0 auto; align-items: start; }
.panel { border: 1px solid #d8e0e6; border-radius: 7px; background: var(--paper); min-width: 0; }
.import-panel { min-height: min(720px, calc(100vh - 112px)); padding: 19px 18px 16px; display: flex; flex-direction: column; position: sticky; top: 80px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; }
.import-heading { margin-bottom: 25px; }
.eyebrow { margin-bottom: 6px; color: #8794a1; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.panel h2, .panel h1 { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 700; }
.textarea-label, .option-label { display: block; margin-bottom: 8px; color: #4e5d69; font-size: 12px; font-weight: 600; }
.import-panel textarea { flex: 1; min-height: 252px; resize: vertical; width: 100%; padding: 12px 13px; border: 1px solid #d9e1e7; border-radius: 4px; outline: none; background: #fbfcfd; color: #1f2a34; line-height: 1.8; font: 13px/1.8 'DM Sans', 'Noto Sans SC', 'Microsoft YaHei', sans-serif; }
.import-panel textarea::placeholder { color: #9eabb6; }
.import-panel textarea:focus { border-color: #44c2bd; box-shadow: 0 0 0 3px #e8f8f7; }
.input-meta { display: flex; justify-content: space-between; padding: 8px 1px 0; color: #94a0aa; font-size: 11px; }
.check-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 10px; margin: 14px 0 0; padding: 0; border: 0; }
.check-options legend { grid-column: 1 / -1; margin-bottom: 1px; padding: 0; color: #4e5d69; font-size: 12px; font-weight: 600; }
.check-option { display: flex; align-items: center; gap: 7px; min-width: 0; color: #586875; font-size: 11px; line-height: 1.35; cursor: pointer; }
.check-option:has(input:disabled) { opacity: .55; cursor: wait; }
.import-options { padding-top: 23px; }
.segmented { height: 37px; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid #e3e8ec; border-radius: 5px; background: #f5f7f8; }
.segment { border: 0; border-radius: 3px; color: #7d8a96; background: transparent; font-size: 11px; cursor: pointer; }
.segment.active { color: #273540; background: #fff; box-shadow: 0 1px 3px #17253212; font-weight: 600; }
.segment:disabled { cursor: not-allowed; color: #aab3bc; }
.provider-note { display: flex; align-items: flex-start; gap: 9px; margin: 18px 0 14px; padding: 11px 10px; border: 1px solid #e7ecef; border-radius: 4px; background: #fbfcfd; }
.provider-note p { margin: 0; color: #788693; font-size: 11px; line-height: 1.65; }
.note-icon { display: grid; flex: 0 0 auto; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid #96a6ad; color: #798890; font-size: 10px; font-weight: 700; }
.button { height: 37px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; white-space: nowrap; border: 1px solid #d8e0e6; border-radius: 5px; background: #fff; color: #273540; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.button:hover:not(:disabled) { border-color: #aebbc4; background: #f8fafb; }
.button:disabled { cursor: not-allowed; color: #aab4bd; background: #f7f8f9; }
.button.primary { border-color: #17232d; background: #17232d; color: #fff; }
.button.primary:hover:not(:disabled) { border-color: #263844; background: #263844; }
.button.primary svg { stroke: currentColor; }
.check-button { width: 100%; height: 43px; margin-top: auto; font-size: 13px; }
.check-button svg { width: 18px; height: 18px; }
.check-button.loading svg { animation: spin 1s linear infinite; }
.demo-button { width: 100%; border-color: transparent; color: #6d7b87; margin-top: 8px; }
.button.subtle:hover { border-color: transparent; background: #f5f7f8; }
@keyframes spin { to { transform: rotate(360deg); } }

.results-panel { overflow: hidden; }
.results-heading { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px 13px; }
.results-heading h1 { font-size: 17px; }
.results-heading p { margin: 5px 0 0; color: #758391; font-size: 11px; }
.result-actions { display: flex; align-items: center; gap: 8px; }
.result-actions .button { height: 35px; }
.result-actions .button svg { width: 16px; height: 16px; }
.export-normal { color: var(--green); border-color: #a8ddc4; }
.export-normal:hover:not(:disabled) { background: var(--green-soft); border-color: #66bd91; }
.export-selected { color: #778490; }
.progress-line { display: flex; align-items: center; gap: 14px; padding: 0 20px 18px; color: #1d2a32; font-size: 11px; font-weight: 600; }
.progress-track { height: 6px; flex: 1; overflow: hidden; border-radius: 5px; background: #e6ecee; }
.progress-track span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--teal); transition: width .35s ease; }
.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbfcfd; }
.summary-item { height: 81px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 7px; padding: 9px 13px 10px; text-align: left; border: 0; border-right: 1px solid var(--line); border-bottom: 3px solid transparent; background: transparent; cursor: pointer; }
.summary-item:last-child { border-right: 0; }
.summary-item span { color: #6e7d89; font-size: 11px; white-space: nowrap; }
.summary-item strong { color: #0f1c26; font-size: 21px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-item:hover { background: #f5f8f9; }
.summary-item.active { border-bottom-color: var(--red); background: #fff; }
.video-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 68px; padding: 11px 17px; border-bottom: 1px solid var(--line-light); background: #fff; }
.video-summary-heading { display: grid; gap: 5px; min-width: 0; }
.video-summary-heading strong { color: #33444f; font-size: 12px; font-weight: 600; }
.video-summary-heading span { color: #8a969f; font-size: 10px; line-height: 1.4; }
.video-summary-options { display: flex; flex: 0 0 auto; gap: 7px; }
.video-filter { min-width: 116px; height: 37px; display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px; border: 1px solid #dfe6e9; border-radius: 4px; background: #fff; color: #53636d; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.video-filter span { font-size: 11px; white-space: nowrap; }
.video-filter strong { color: #23313a; font-size: 15px; line-height: 1; font-weight: 650; font-variant-numeric: tabular-nums; }
.video-filter:hover:not(:disabled) { background: #f7faf9; border-color: #bacac8; }
.video-filter[data-filter="withVideos"].active { border-color: #addcc2; background: var(--green-soft); color: var(--green); }
.video-filter[data-filter="withVideos"].active strong { color: var(--green); }
.video-filter[data-filter="noVideos"].active { border-color: #a8dcd9; background: #edf8f7; color: var(--teal-dark); }
.video-filter[data-filter="noVideos"].active strong { color: var(--teal-dark); }
.video-filter:disabled { cursor: not-allowed; opacity: .56; }
.table-toolbar { min-height: 50px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 16px; }
.table-caption { color: #50606c; font-size: 12px; font-weight: 600; }
.search-box { display: flex; align-items: center; gap: 7px; width: 205px; height: 31px; padding: 0 8px; border: 1px solid #e0e6ea; border-radius: 4px; color: #8c99a4; }
.search-box svg { width: 15px; height: 15px; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); font-size: 11px; background: transparent; }
.search-box input::placeholder { color: #9aa6af; }
.search-box kbd { min-width: 17px; height: 18px; display: inline-grid; place-items: center; border: 1px solid #e2e7ea; border-radius: 3px; color: #a1adb5; background: #fbfcfd; font: 10px 'DM Sans', sans-serif; }
.table-scroll { overflow: auto; border-top: 1px solid var(--line-light); }
.results-table { width: 100%; min-width: 1050px; border-collapse: collapse; table-layout: fixed; }
.results-table th { height: 41px; padding: 0 9px; text-align: left; border-bottom: 1px solid var(--line); background: #f9fbfc; color: #52616c; font-size: 11px; font-weight: 600; white-space: nowrap; }
.results-table td { height: 73px; padding: 10px 9px; vertical-align: middle; border-bottom: 1px solid #e7ecef; color: #25333e; font-size: 11px; }
.results-table tbody tr:hover { background: #fbfdfd; }
.results-table th:nth-child(1), .results-table td:nth-child(1) { width: 43px; padding-left: 16px; }
.results-table th:nth-child(2), .results-table td:nth-child(2) { width: 128px; }
.results-table th:nth-child(3), .results-table td:nth-child(3) { width: 108px; }
.results-table th:nth-child(4), .results-table td:nth-child(4),
.results-table th:nth-child(5), .results-table td:nth-child(5),
.results-table th:nth-child(6), .results-table td:nth-child(6),
.results-table th:nth-child(7), .results-table td:nth-child(7) { width: 78px; }
.results-table th:nth-child(8), .results-table td:nth-child(8) { width: auto; min-width: 175px; }
.results-table th:nth-child(9), .results-table td:nth-child(9) { width: 54px; }
.results-table th:nth-child(10), .results-table td:nth-child(10) { width: 116px; }
.results-table th:nth-child(11), .results-table td:nth-child(11) { width: 30px; padding-right: 10px; }
input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: #169f9b; cursor: pointer; }
.account-cell strong { display: block; max-width: 112px; overflow-wrap: anywhere; color: #17232d; font-size: 12px; font-weight: 700; line-height: 1.35; }
.account-cell small { display: inline-block; margin-top: 4px; padding: 2px 4px; border: 1px solid #e6eaed; border-radius: 3px; color: #87939d; font-size: 9px; line-height: 1.2; }
.status { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border-radius: 3px; white-space: nowrap; font-size: 10px; font-weight: 600; }
.status.danger { color: var(--red); background: var(--red-soft); }
.status.success { color: #18855f; background: #eaf7f0; }
.status.pending { color: #8d6b27; background: #fff7e7; }
.muted-cell, .time-cell { color: #778590 !important; }
.description-cell { color: #657785 !important; line-height: 1.5; }
.http-cell { color: #273640 !important; font-variant-numeric: tabular-nums; }
.time-cell { line-height: 1.45; white-space: nowrap; font-variant-numeric: tabular-nums; }
.link-cell { text-align: center !important; }
.link-cell a { color: #8b99a4; }
.link-cell a:hover { color: #168e8b; }
.link-cell svg { width: 15px; height: 15px; vertical-align: middle; }
.empty-state { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #84919b; font-size: 12px; }
.empty-state strong { color: #45545f; font-size: 13px; }
.empty-mark { color: #8e9ba5; font-size: 25px; line-height: 1; }
.table-footer { min-height: 42px; display: flex; justify-content: space-between; align-items: center; padding: 0 16px; color: #8996a0; border-top: 1px solid var(--line-light); font-size: 10px; }

.users-panel { grid-column: 1 / -1; min-height: 540px; padding: 23px 24px; }
.users-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 23px; border-bottom: 1px solid var(--line-light); }
.users-heading h1 { font-size: 19px; }
.users-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.users-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 50px; color: #8996a0; font-size: 11px; }
.users-toolbar span:first-child { color: #52616c; font-weight: 600; }
.users-table-scroll { overflow-x: auto; }
.users-table { width: 100%; min-width: 680px; border-collapse: collapse; }
.users-table th { height: 40px; background: #f8fafb; color: #687782; text-align: left; font-size: 11px; font-weight: 600; }
.users-table td { height: 70px; border-bottom: 1px solid var(--line-light); color: #596873; font-size: 12px; }
.user-identity { display: flex; align-items: center; gap: 10px; }
.user-identity strong { display: block; color: #1d2a34; }
.user-identity small { display: block; margin-top: 3px; color: #96a1aa; font-size: 10px; }
.muted-avatar { width: 31px; height: 31px; }
.role-label { color: #61717d; }
.role-label.admin { color: #267c69; }
.active-label { display: inline-flex; align-items: center; gap: 6px; }
.active-label i { width: 7px; height: 7px; border-radius: 50%; background: #2fa873; }
.active-label.off i { background: #aab3bb; }
.user-actions { text-align: right; white-space: nowrap; }
.text-action { padding: 5px 7px; border: 0; background: transparent; color: #347c7a; font-size: 11px; cursor: pointer; }
.text-action:hover { text-decoration: underline; }
.text-action:disabled { color: #adb7bf; cursor: not-allowed; text-decoration: none; }
.danger-action { color: #bd4b5e; }
.nav-item { height: 34px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: #7c8994; font-size: 11px; cursor: pointer; }
.nav-item span { font-size: 14px; }
.nav-item.active { background: #edf6f5; color: #167d79; font-weight: 600; }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 64px; max-width: min(420px, calc(100vw - 32px)); padding: 11px 15px; border: 1px solid #d6e3dd; border-radius: 5px; background: #fff; color: #226e50; box-shadow: 0 5px 22px #15222b1c; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { color: #a43d50; border-color: #f0c5cc; }

.login-layout { width: min(1040px, calc(100% - 48px)); min-height: calc(100vh - 80px); display: grid; grid-template-columns: 1fr 420px; align-items: center; gap: 70px; margin: 0 auto; position: relative; }
.login-brand { display: flex; align-items: center; gap: 14px; align-self: start; margin-top: 48px; }
.brand-name { font-size: 14px; font-weight: 700; }
.brand-caption { margin-top: 4px; color: #8996a0; font-size: 9px; letter-spacing: 1px; }
.login-panel { padding: 34px 34px 38px; border: 1px solid #dce3e8; border-radius: 7px; background: #fff; box-shadow: 0 10px 32px #1827320b; }
.login-panel h1 { margin: 0; font-size: 22px; }
.login-panel .muted { margin: 8px 0 25px; color: #86929c; font-size: 12px; }
.form-stack { display: grid; gap: 16px; }
.form-stack label, .user-dialog label { display: grid; gap: 7px; color: #51606b; font-size: 11px; font-weight: 600; }
.form-stack input, .user-dialog input:not([type="checkbox"]), .user-dialog select { width: 100%; height: 39px; padding: 0 10px; border: 1px solid #d9e1e7; border-radius: 4px; background: #fff; color: #1e2a34; outline: 0; font-size: 12px; }
.form-stack input:focus, .user-dialog input:focus, .user-dialog select:focus { border-color: #43bdb7; box-shadow: 0 0 0 3px #eaf8f7; }
.login-submit { width: 100%; height: 42px; justify-content: space-between; margin-top: 4px; padding: 0 14px; }
.login-submit span { font-size: 17px; font-weight: 400; }
.form-error { min-height: 16px; color: #c0394f; font-size: 11px; }
.login-foot { position: absolute; bottom: 12px; left: 0; color: #9aa5ae; font-size: 11px; }
.user-dialog { width: min(460px, calc(100% - 28px)); max-width: 460px; padding: 0; border: 1px solid #d9e1e7; border-radius: 7px; color: var(--ink); box-shadow: 0 24px 80px #17242e36; }
.user-dialog::backdrop { background: #14212c5c; backdrop-filter: blur(2px); }
.user-dialog form { display: grid; gap: 16px; padding: 22px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 2px; }
.dialog-heading h2 { margin: 0; font-size: 18px; }
.user-dialog small { margin-top: -3px; color: #8b98a2; font-size: 10px; font-weight: 400; }
.user-dialog .toggle-row { display: flex; align-items: center; justify-content: space-between; }
.user-dialog .toggle-row input { width: 16px; height: 16px; accent-color: #168d88; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

@media (max-width: 1120px) {
  .site-header { gap: 28px; padding-inline: 22px; }
  .header-nav { gap: 20px; overflow-x: auto; scrollbar-width: none; }
  .header-nav::-webkit-scrollbar { display: none; }
  .workspace { grid-template-columns: 260px minmax(0, 1fr); padding-inline: 14px; gap: 12px; }
  .import-panel { padding-inline: 14px; }
  .results-heading { align-items: flex-start; flex-direction: column; gap: 11px; padding-top: 15px; }
  .result-actions { width: 100%; }
  .result-actions .button { flex: 1; padding-inline: 8px; }
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-item:nth-child(3) { border-right: 0; }
  .summary-item:nth-child(-n+3) { border-bottom-color: #e5eaee; }
  .summary-item.active { border-bottom-color: var(--red); }
  .video-summary { padding-inline: 14px; }
}
@media (max-width: 760px) {
  .site-header { height: auto; min-height: 61px; align-items: center; flex-wrap: wrap; gap: 0; padding: 12px 15px 0; }
  .brand { gap: 8px; }
  .brand-mark { width: 33px; height: 33px; border-radius: 9px 9px 9px 3px; font-size: 12px; }
  .brand-name { font-size: 13px; }
  .header-nav { width: 100%; height: 31px; flex: 0 0 100%; align-self: auto; gap: 17px; margin-top: 10px; overflow-x: auto; }
  .nav-link { font-size: 11px; }
  .header-meta { display: none; }
  .workspace { display: flex; flex-direction: column; gap: 12px; padding: 12px 10px 62px; }
  .import-panel, .results-panel, .users-panel { width: 100%; }
  .import-panel { min-height: initial; position: static; padding: 15px; }
  .import-heading { margin-bottom: 14px; }
  .import-panel textarea { min-height: 155px; max-height: 240px; resize: vertical; }
  .check-options { gap: 10px; margin-top: 12px; }
  .import-options { padding-top: 15px; }
  .check-button { margin-top: 5px; }
  .results-heading { padding: 14px 13px 11px; }
  .result-actions { gap: 5px; }
  .result-actions .button { font-size: 10px; gap: 5px; padding: 0 5px; }
  .result-actions .button svg { width: 14px; height: 14px; }
  .progress-line { padding-inline: 13px; }
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-item { height: 70px; padding-inline: 10px; }
  .summary-item span { font-size: 10px; }
  .summary-item strong { font-size: 19px; }
  .video-summary { align-items: flex-start; flex-direction: column; gap: 10px; padding: 12px 13px; }
  .video-summary-options { width: 100%; }
  .video-filter { flex: 1 1 0; min-width: 0; }
  .table-toolbar { padding-inline: 12px; }
  .search-box { width: 150px; }
  .table-footer { padding-inline: 12px; }
  .users-panel { padding: 17px 13px; }
  .users-heading { align-items: flex-start; }
  .users-heading .button { padding-inline: 9px; }
  .login-layout { width: min(440px, calc(100% - 28px)); min-height: 100vh; grid-template-columns: 1fr; align-content: center; gap: 28px; padding-bottom: 38px; }
  .login-brand { margin-top: 0; }
  .login-panel { padding: 25px 22px; }
  .login-foot { bottom: 11px; font-size: 10px; }
}
