:root {
    --platform-bg: #07111f;
    --platform-surface: #0f1d2e;
    --platform-panel: #13243a;
    --platform-line: rgba(148, 163, 184, .2);
    --platform-primary: #22c55e;
    --platform-primary-dark: #16a34a;
    --platform-accent: #38bdf8;
    --platform-text: #e5edf7;
    --platform-muted: #94a3b8;
}

html[data-theme="dark"] {
    --platform-page-bg: #0a1220;
    --platform-card-bg: #111d2d;
    --platform-card-soft: #172538;
    --platform-border: #304258;
    --platform-body-text: #e5edf7;
    --platform-body-muted: #9fb0c3;
}

html[data-theme="dark"] body {
    background: var(--platform-page-bg) !important;
    color: var(--platform-body-text) !important;
}

html[data-theme="dark"] :is(
    .card, .panel, .sidebar, .content, .setting-card, .stat,
    .modal-content, .dialog-content, .instance-editor, .tool-section, .image-panel,
    .annotation-panel, .loss-chart-card, .task-center, .preflight-card,
    .progress-card, .result-card, .table-wrap, .file-manager
) {
    border-color: var(--platform-border) !important;
    background-color: var(--platform-card-bg) !important;
    color: var(--platform-body-text) !important;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .24) !important;
}

html[data-theme="dark"] :is(
    .shortcut-row, .category, .project, .dataset-item, .balance-item,
    .flow li, .content-head, .side-head, .pagination, .inspection-footer,
    .panel-header, .panel-body, .toolbar, .status-bar, .tab-nav,
    .api-config-section, .progress-section, .result-area
) {
    border-color: var(--platform-border) !important;
    background-color: var(--platform-card-soft) !important;
    color: var(--platform-body-text) !important;
}

html[data-theme="dark"] :is(input, select, textarea) {
    border-color: #40546c !important;
    background-color: #0d1928 !important;
    color: #eef6ff !important;
}

html[data-theme="dark"] :is(input, textarea)::placeholder { color: #7f93a9 !important; }
html[data-theme="dark"] :is(h1, h2, h3, h4, label, th, td, .value, .card-name) { color: var(--platform-body-text) !important; }
html[data-theme="dark"] :is(.muted, .subtitle, .company, .title p, .setting-card p, .card-subtitle, small) { color: var(--platform-body-muted) !important; }
html[data-theme="dark"] :is(table, th, td) { border-color: var(--platform-border) !important; }
html[data-theme="dark"] :is(.image-grid, .inspection-layout, .main-content, .training-container) { background-color: var(--platform-page-bg) !important; }
html[data-theme="dark"] .platform-dropdown-menu { border-color: var(--platform-border); background: var(--platform-card-bg); }
html[data-theme="dark"] .platform-dropdown-menu :is(a, button) { color: var(--platform-body-text) !important; }
html[data-theme="dark"] .platform-dropdown-menu :is(a, button):hover { background: #1c3b55 !important; color: #7dd3fc !important; }
html[data-theme="dark"] .category.active { background: #123b42 !important; }
html[data-theme="dark"] .inspection-card { background: #1b2a3a; }
html[data-theme="dark"] .inspection-footer { background: #111d2d !important; }
html[data-theme="dark"] .setup { background: #3b2b17 !important; color: #fdba74 !important; }

body {
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif !important;
    background: #eef3f8;
    position: relative;
    isolation: isolate;
}

.platform-watermark {
    position: fixed;
    inset: -18vh -12vw;
    z-index: 2147480000;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    grid-auto-rows: 92px;
    align-items: center;
    justify-items: center;
    overflow: hidden;
    transform: rotate(-18deg) scale(1.06);
    transform-origin: center;
    color: #1d5f91;
    opacity: .075;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
    mix-blend-mode: multiply;
    pointer-events: none;
    user-select: none;
}

.platform-watermark span {
    white-space: nowrap;
}

html[data-theme="dark"] .platform-watermark {
    color: #7dd3fc;
    opacity: .11;
    mix-blend-mode: screen;
}

.navbar,
body > header {
    background: linear-gradient(110deg, var(--platform-bg), #102844) !important;
    border-bottom: 1px solid rgba(56, 189, 248, .2);
    box-shadow: 0 8px 28px rgba(7, 17, 31, .18) !important;
}

.logo h1,
body > header .platform-current-project-static strong {
    color: #f8fafc !important;
    font-size: 20px !important;
    letter-spacing: .04em;
}

.logo h1::before,
body > header .platform-current-project-static strong::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--platform-primary);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .15);
    vertical-align: 2px;
}

.version {
    color: var(--platform-muted) !important;
    font-size: 11px !important;
}

.platform-header {
    width: 100% !important;
    min-height: 58px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 8px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    color: #f8fafc !important;
}

.platform-header-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.platform-header-main { position: relative; min-height: 60px; }

.platform-current-project-static {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: min(34vw, 520px);
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.platform-current-project-static span,
.platform-current-project-static strong { display: block; }
.platform-current-project-static span { margin-bottom: 3px; color: #8ea7bf; font-size: 10px; font-weight: 700; }
.platform-current-project-static strong { overflow: hidden; color: #f8fafc; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }

.platform-account { position: relative; z-index: 1500; flex: 0 0 auto; }
.platform-account > summary { min-width: 112px; padding-inline: 13px !important; list-style: none; }
.platform-account > summary::-webkit-details-marker { display: none; }
.platform-account-chevron { margin-left: 2px; font-size: 9px; transition: transform .15s ease; }
.platform-account[open] .platform-account-chevron { transform: rotate(180deg); }
.platform-account-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(290px, calc(100vw - 24px));
    padding: 8px;
    border: 1px solid #31506f;
    border-radius: 10px;
    background: #0b1d30;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .45);
}
.platform-account-summary { padding: 8px 9px 11px; border-bottom: 1px solid #29425b; }
.platform-account-summary small,
.platform-account-summary strong,
.platform-account-summary span { display: block; }
.platform-account-summary small { color: #8ea7bf; font-size: 10px; }
.platform-account-summary strong { margin: 3px 0; overflow-wrap: anywhere; color: white; }
.platform-account-summary span { color: #a9bdd0; font-size: 11px; }
.platform-account-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 9px; color: #9fb4c8; font-size: 11px; }
.platform-account-row strong { max-width: 150px; overflow-wrap: anywhere; color: #e5edf7; font-size: 11px; font-weight: 700; letter-spacing: normal; text-align: right; }
.platform-account-row strong::before { content: none; }
.platform-account-authorization-row { align-items: center; }
.platform-account-authorization-row strong { max-width: 190px; overflow-wrap: normal; color: #bae6fd; font-variant-numeric: tabular-nums; line-height: 1.55; white-space: nowrap; }
.platform-account-menu a,
.platform-account-menu button {
    width: 100%;
    min-height: 36px;
    padding: 0 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #dbeafe !important;
    font: 700 12px "Microsoft YaHei", sans-serif;
    text-decoration: none;
    cursor: pointer;
}
.platform-account-menu a:hover,
.platform-account-menu button:hover { background: #163853 !important; color: white !important; }
.platform-account-menu .platform-account-logout { color: #fca5a5 !important; }
.platform-account > summary #platformAccountDisplayName {
    min-width: 3em;
    max-width: min(240px, 32vw);
    overflow: hidden;
    font-size: 14px;
    letter-spacing: .025em;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-fullscreen-shell {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--platform-body-bg, #eef3f8);
}
.platform-fullscreen-shell iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--platform-body-bg, #eef3f8);
}
.platform-fullscreen-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: none;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: var(--platform-body-text, #24364b);
    background: var(--platform-body-bg, #eef3f8);
    font-size: 15px;
    font-weight: 700;
}
.platform-fullscreen-shell.is-loading .platform-fullscreen-loading { display: grid; }
.platform-fullscreen-shell.is-loading iframe { visibility: hidden; }
.platform-display-name-editor {
    margin: 2px 0 6px;
    padding: 10px 9px;
    border-top: 1px solid #29425b;
    border-bottom: 1px solid #29425b;
}
.platform-display-name-editor > label {
    display: block;
    margin-bottom: 6px;
    color: #9fb4c8;
    font-size: 11px;
    font-weight: 700;
}
.platform-display-name-editor > div { display: flex; align-items: stretch; gap: 6px; }
.platform-display-name-editor input {
    min-width: 0;
    height: 34px;
    flex: 1 1 auto;
    padding: 0 9px;
    border: 1px solid #31506f;
    border-radius: 7px;
    outline: none;
    background: #071727;
    color: #f8fafc;
    font: 600 12px "Microsoft YaHei", sans-serif;
}
.platform-display-name-editor input:focus { border-color: #38bdf8; box-shadow: 0 0 0 2px rgba(56, 189, 248, .14); }
.platform-account-menu .platform-display-name-editor button {
    width: auto;
    min-height: 34px;
    flex: 0 0 auto;
    padding: 0 12px;
    background: #0284c7 !important;
    color: white !important;
}
.platform-account-menu .platform-display-name-editor button:disabled { opacity: .6; cursor: wait; }
.platform-display-name-editor > small { display: block; min-height: 15px; margin-top: 5px; color: #7f98af; font-size: 10px; }
.platform-display-name-editor > small.error { color: #fca5a5; }
.platform-display-name-editor > small.success { color: #86efac; }

.platform-help-dialog {
    width: min(1320px, calc(100vw - 32px));
    max-width: none;
    max-height: min(860px, calc(100vh - 24px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #294c69;
    border-radius: 18px;
    background: #f7fafc;
    color: #203248;
    box-shadow: 0 28px 80px rgba(2, 10, 20, .55);
}
.platform-help-dialog::backdrop { background: rgba(2, 10, 20, .68); backdrop-filter: blur(4px); }
.platform-help-shell { position: relative; display: flex; height: min(860px, calc(100vh - 26px)); min-height: 0; flex-direction: column; }
.platform-help-head { position: relative; padding: 22px 28px 17px; color: #e8f3fc; background: radial-gradient(circle at 83% 0, rgba(56, 189, 248, .22), transparent 30%), linear-gradient(135deg, #071a2c, #0d3651 64%, #075985); }
.platform-help-heading { display: flex; align-items: center; gap: 14px; padding-right: 45px; }
.platform-help-symbol { width: 52px; height: 52px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid rgba(125, 211, 252, .35); border-radius: 14px; background: rgba(14, 165, 233, .16); color: #7dd3fc; font-size: 24px; }
.platform-help-heading small { color: #7dd3fc; font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.platform-help-heading h2 { margin: 2px 0 3px; color: #fff; font-size: 28px; }
.platform-help-heading p { margin: 0; color: #c4d6e6; font-size: 14px; }
.platform-help-heading-meta { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 7px; }
.platform-help-heading-meta span { padding: 4px 8px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(125, 211, 252, .22); border-radius: 999px; background: rgba(2, 18, 32, .28); color: #c5e8fb; font-size: 11px; font-weight: 700; }
.platform-help-heading-meta i { color: #7dd3fc; }
.platform-help-close { position: absolute; top: 20px; right: 22px; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; background: rgba(255, 255, 255, .07); color: #dbeafe; font-size: 15px; cursor: pointer; }
.platform-help-close:hover { border-color: #7dd3fc; background: rgba(56, 189, 248, .18); color: #fff; }
.platform-help-search { height: 50px; margin-top: 18px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(125, 211, 252, .45); border-radius: 11px; background: rgba(3, 17, 30, .5); color: #7dd3fc; }
.platform-help-search:focus-within { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, .14); }
.platform-help-search input { min-width: 0; flex: 1; border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; color: #fff !important; font: 14px "Microsoft YaHei", sans-serif; }
.platform-help-search input::placeholder { color: #91a9bf; }
.platform-help-search button { width: 27px; height: 27px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 7px; background: rgba(255, 255, 255, .08); color: #b7cbe0; cursor: pointer; }
.platform-help-search button:hover { background: rgba(125, 211, 252, .18); color: #fff; }
.platform-help-search button[hidden] { display: none; }
.platform-help-font-controls { padding-left: 10px; display: flex; align-items: center; gap: 5px; border-left: 1px solid rgba(148, 190, 219, .28); white-space: nowrap; }
.platform-help-font-controls span { color: #9fb9cf; font-size: 12px; }
.platform-help-search .platform-help-font-controls button { width: auto; min-width: 42px; height: 30px; padding: 0 8px; font: 700 12px "Microsoft YaHei", sans-serif; }
.platform-help-search .platform-help-font-controls button.is-active { background: #0ea5e9; color: #fff; }
.platform-help-search kbd, .platform-help-tip kbd { padding: 3px 7px; border: 1px solid #45647e; border-radius: 5px; background: rgba(4, 19, 33, .58); color: #c8d8e7; font: 11px Consolas, monospace; }
.platform-help-categories { margin-top: 13px; display: flex; align-items: center; gap: 7px; }
.platform-help-categories button { min-width: 68px; padding: 8px 14px; border: 1px solid rgba(148, 190, 219, .32); border-radius: 999px; background: transparent; color: #c4d6e6; font: 700 13px "Microsoft YaHei", sans-serif; cursor: pointer; }
.platform-help-categories button:hover, .platform-help-categories button.is-active { border-color: #38bdf8; background: #0ea5e9; color: #fff; }
#platformHelpMatchCount { margin-left: auto; color: #b7d4e6; font-size: 12px; white-space: nowrap; }
.platform-help-content { min-height: 0; display: grid; flex: 1; grid-template-columns: 264px minmax(0, 1fr); background: #f7fafc; }
.platform-help-route { min-height: 0; padding: 24px 24px 36px; overflow-y: auto; border-right: 1px solid #d3e0ea; background: #eef4f8; scrollbar-width: thin; }
.platform-help-route > strong { display: block; margin-bottom: 16px; color: #172b40; font-size: 16px; }
.platform-help-route ol { margin: 0; padding: 0; list-style: none; counter-reset: help-route; }
.platform-help-route li { position: relative; min-height: 38px; padding: 1px 0 14px 34px; color: #405b73; font-size: 14px; line-height: 1.5; counter-increment: help-route; }
.platform-help-route li::before { content: counter(help-route); position: absolute; left: 0; top: -3px; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; background: #d6e7f4; color: #0875b4; font-size: 10px; font-weight: 800; }
.platform-help-route li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 19px; width: 1px; height: 15px; background: #bdd3e3; }
.platform-help-route p { margin: 14px 0 0; padding: 13px; border-radius: 9px; background: #dff2fd; color: #174d6b; font-size: 13px; line-height: 1.7; }
.platform-help-legend { margin-top: 18px; display: grid; gap: 9px; color: #4e687f; font-size: 12px; }
.platform-help-legend span { display: flex; align-items: center; gap: 7px; }
.platform-help-legend i { width: 15px; color: #1683c5; text-align: center; }
.platform-help-results { min-height: 0; padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 12px; overflow: auto; scroll-behavior: smooth; }
.platform-help-card { min-width: 0; flex: 0 0 auto; overflow: hidden; border: 1px solid #dbe5ee; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(15, 39, 61, .04); }
.platform-help-card[hidden] { display: none; }
.platform-help-card[open] { border-color: #8eccec; box-shadow: 0 8px 24px rgba(14, 116, 178, .09); }
.platform-help-card > summary { padding: 15px 17px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; align-items: center; gap: 12px; list-style: none; cursor: pointer; }
.platform-help-card > summary::-webkit-details-marker { display: none; }
.platform-help-card > summary:hover { background: #f5faff; }
.platform-help-card > summary > span:nth-child(2) { min-width: 0; }
.platform-help-card > summary strong, .platform-help-card > summary small { display: block; }
.platform-help-card > summary strong { overflow: hidden; color: #172f46; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.platform-help-card > summary strong i { width: 24px; color: #087fc0; }
.platform-help-card > summary small { margin-top: 4px; overflow: hidden; color: #657b8e; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.platform-help-card > summary > i { color: #6f879b; font-size: 12px; transition: transform .18s ease; }
.platform-help-card[open] > summary > i { transform: rotate(180deg); }
.platform-help-step { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #dff2fd; color: #0875b4; font: 800 12px Consolas, monospace; }
.platform-help-card-body { padding: 6px 20px 20px 63px; border-top: 1px solid #e4edf3; }
.platform-help-card-body > p { margin: 13px 0; color: #405b72; font-size: 14px; line-height: 1.8; }
.platform-help-card-body h4 { margin: 17px 0 9px; color: #183f5d; font-size: 14px; }
.platform-help-figure { width: 100%; margin: 14px 0 4px; padding: 0; position: relative; display: grid; overflow: hidden; border: 1px solid #c8dfed; border-radius: 12px; background: #0b2134; box-shadow: 0 7px 20px rgba(17, 65, 96, .11); color: #fff; cursor: zoom-in; text-align: left; }
.platform-help-figure::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(255, 255, 255, .09); border-radius: inherit; }
.platform-help-figure > img { width: 100%; height: clamp(150px, 24vw, 245px); display: block; object-fit: cover; object-position: center; transition: transform .25s ease, filter .25s ease; }
.platform-help-figure > span { position: absolute; right: 0; bottom: 0; left: 0; min-width: 0; padding: 28px 54px 13px 15px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; background: linear-gradient(transparent, rgba(2, 15, 27, .92)); }
.platform-help-figure > span b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.platform-help-figure > span small { color: #b8daed; font-size: 11px; white-space: nowrap; }
.platform-help-figure > i { position: absolute; right: 14px; bottom: 14px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; background: rgba(7, 27, 43, .72); color: #fff; }
.platform-help-figure:hover { border-color: #38bdf8; box-shadow: 0 10px 28px rgba(14, 116, 178, .2); }
.platform-help-figure:hover > img { transform: scale(1.018); filter: brightness(1.06); }
.platform-help-figure:focus-visible { outline: 3px solid rgba(14, 165, 233, .3); outline-offset: 2px; }
.platform-help-entry, .platform-help-result, .platform-help-note { margin-top: 13px; padding: 11px 13px; display: flex; align-items: flex-start; gap: 9px; border-radius: 9px; font-size: 13px; line-height: 1.7; }
.platform-help-entry { background: #eff7fd; color: #315a78; }
.platform-help-result { border: 1px solid #a7e3bf; background: #effcf4; color: #25633e; }
.platform-help-note { border: 1px solid #f4d48a; background: #fff9e9; color: #7a5816; }
.platform-help-entry i, .platform-help-result i, .platform-help-note i { margin-top: 2px; flex: 0 0 auto; }
.platform-help-entry i { color: #1683c5; }
.platform-help-result i { color: #16a34a; }
.platform-help-note i { color: #d38b0d; }
.platform-help-steps { margin: 0; padding: 0; list-style: none; counter-reset: manual-step; }
.platform-help-steps li { position: relative; min-height: 31px; padding: 4px 0 9px 36px; color: #405b72; font-size: 14px; line-height: 1.7; counter-increment: manual-step; }
.platform-help-steps li::before { content: counter(manual-step); position: absolute; left: 0; top: 3px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: #dff2fd; color: #0875b4; font-size: 11px; font-weight: 800; }
.platform-help-role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.platform-help-role-grid div { padding: 10px; border: 1px solid #dce8f1; border-radius: 8px; background: #f8fbfd; }
.platform-help-role-grid b, .platform-help-role-grid span { display: block; }
.platform-help-role-grid b { margin-bottom: 6px; color: #1f4663; font-size: 13px; }
.platform-help-role-grid span { color: #536b80; font-size: 13px; line-height: 1.7; }
.platform-help-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 10px; }
.platform-help-faq div { padding: 10px 11px; border: 1px solid #dce8f1; border-radius: 8px; background: #f8fbfd; }
.platform-help-faq b, .platform-help-faq span { display: block; }
.platform-help-faq b { margin-bottom: 6px; color: #1f4663; font-size: 13px; }
.platform-help-faq span { color: #536b80; font-size: 13px; line-height: 1.7; }
.platform-help-jump { margin-top: 13px; display: inline-flex; align-items: center; gap: 6px; color: #087bbd; font-size: 13px; font-weight: 800; text-decoration: none; }
.platform-help-tip { margin-top: 12px; display: block; color: #526a7f; font-size: 13px; line-height: 2.2; }
.platform-help-tip kbd { border-color: #c5d3df; background: #eff4f7; color: #3c5164; }
.platform-help-empty { grid-column: 1 / -1; min-height: 250px; display: grid; place-items: center; align-content: center; gap: 8px; color: #8092a4; text-align: center; }
.platform-help-empty[hidden] { display: none; }
.platform-help-empty i { color: #a9bac8; font-size: 30px; }
.platform-help-empty strong { color: #394f63; font-size: 17px; }
.platform-help-empty span { font-size: 14px; }
.platform-help-footer { min-height: 64px; padding: 11px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #d3e0ea; background: #fff; color: #4f687e; font-size: 13px; }
.platform-help-footer i { color: #0d91d6; }
.platform-help-footer button { min-width: 100px; padding: 10px 20px; border: 0; border-radius: 8px; background: #087fbd; color: #fff; font: 800 14px "Microsoft YaHei", sans-serif; cursor: pointer; }
.platform-help-footer button:hover { background: #036b9f; }

.platform-help-image-viewer { position: absolute; inset: 0; z-index: 30; display: grid; min-width: 0; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; border-radius: inherit; background: rgba(3, 13, 24, .97); color: #e5f2fb; }
.platform-help-image-viewer[hidden] { display: none; }
.platform-help-image-viewer > header { min-height: 68px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #27465e; background: #0b2133; }
.platform-help-image-viewer > header small, .platform-help-image-viewer > header strong { display: block; }
.platform-help-image-viewer > header small { margin-bottom: 3px; color: #69c7f2; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.platform-help-image-viewer > header strong { overflow: hidden; color: #f3f9fd; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.platform-help-image-tools { display: flex; align-items: center; gap: 7px; }
.platform-help-image-tools button, .platform-help-image-viewer > footer button { height: 38px; min-width: 38px; padding: 0 11px; display: inline-grid; place-items: center; border: 1px solid #355b75; border-radius: 9px; background: #102e45; color: #d7ebf7; font: 700 12px "Microsoft YaHei", sans-serif; cursor: pointer; }
.platform-help-image-tools button:hover, .platform-help-image-viewer > footer button:hover { border-color: #38bdf8; background: #164461; color: #fff; }
.platform-help-image-tools button:disabled { opacity: .42; cursor: not-allowed; }
.platform-help-image-tools #platformHelpImageReset { min-width: 66px; }
.platform-help-image-tools .platform-help-image-close { margin-left: 5px; border-color: #6e3c47; background: #3c2029; color: #fecdd3; }
.platform-help-image-viewport { min-width: 0; min-height: 0; position: relative; overflow: hidden; touch-action: none; cursor: grab; background-color: #06111d; background-image: linear-gradient(45deg, rgba(125, 211, 252, .035) 25%, transparent 25%), linear-gradient(-45deg, rgba(125, 211, 252, .035) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(125, 211, 252, .035) 75%), linear-gradient(-45deg, transparent 75%, rgba(125, 211, 252, .035) 75%); background-position: 0 0, 0 12px, 12px -12px, -12px 0; background-size: 24px 24px; }
.platform-help-image-viewport.is-dragging { cursor: grabbing; }
.platform-help-image-viewport img { position: absolute; top: 50%; left: 50%; width: min(92%, 1280px); max-width: none; height: auto; display: block; user-select: none; transform-origin: center; will-change: transform; filter: drop-shadow(0 18px 38px rgba(0, 0, 0, .34)); }
.platform-help-image-viewer > footer { min-height: 58px; padding: 9px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #27465e; background: #0b2133; color: #aac1d1; font-size: 12px; }
.platform-help-image-viewer > footer i { margin-right: 5px; color: #38bdf8; }

/* 大字模式只放大阅读内容, 保持工具栏和按钮在小屏上可用. */
.platform-help-dialog[data-help-font-size="large"] .platform-help-route > strong { font-size: 18px; }
.platform-help-dialog[data-help-font-size="large"] .platform-help-route li,
.platform-help-dialog[data-help-font-size="large"] .platform-help-card-body > p,
.platform-help-dialog[data-help-font-size="large"] .platform-help-steps li { font-size: 16px; }
.platform-help-dialog[data-help-font-size="large"] .platform-help-route p,
.platform-help-dialog[data-help-font-size="large"] .platform-help-entry,
.platform-help-dialog[data-help-font-size="large"] .platform-help-result,
.platform-help-dialog[data-help-font-size="large"] .platform-help-note,
.platform-help-dialog[data-help-font-size="large"] :is(.platform-help-role-grid b, .platform-help-role-grid span, .platform-help-faq b, .platform-help-faq span),
.platform-help-dialog[data-help-font-size="large"] .platform-help-jump,
.platform-help-dialog[data-help-font-size="large"] .platform-help-tip { font-size: 15px; }
.platform-help-dialog[data-help-font-size="large"] .platform-help-card > summary strong { font-size: 18px; }
.platform-help-dialog[data-help-font-size="large"] .platform-help-card > summary small { font-size: 14px; }
.platform-help-dialog[data-help-font-size="large"] .platform-help-card-body h4 { font-size: 16px; }

/* 浅色主题使用独立的高对比度配色, 不依赖浏览器默认 dialog 样式. */
html:not([data-theme="dark"]) .platform-help-dialog { color-scheme: light; border-color: #b9d0e1; background: #f7fafc; color: #172f46; }
html:not([data-theme="dark"]) .platform-help-dialog::backdrop { background: rgba(15, 35, 52, .42); }
html:not([data-theme="dark"]) .platform-help-content { background: #f7fafc; }
html:not([data-theme="dark"]) .platform-help-route { border-color: #cbdce8; background: #edf4f8; }
html:not([data-theme="dark"]) .platform-help-card { border-color: #cadbe7; background: #fff; }
html:not([data-theme="dark"]) .platform-help-card > summary:hover { background: #eff8fd; }
html:not([data-theme="dark"]) .platform-help-card-body { border-color: #dbe7ef; }
html:not([data-theme="dark"]) :is(.platform-help-role-grid div, .platform-help-faq div) { border-color: #cadce8; background: #f7fafc; }
html:not([data-theme="dark"]) .platform-help-footer { border-color: #cadce8; background: #fff; }

html[data-theme="dark"] .platform-help-dialog { color-scheme: dark; border-color: #31516c; background: #0b1825; color: #e4edf5; }
html[data-theme="dark"] .platform-help-content { background: #0b1825; }
html[data-theme="dark"] .platform-help-route { border-color: #263d52; background: #0e1d2c; }
html[data-theme="dark"] .platform-help-route > strong, html[data-theme="dark"] .platform-help-card h3 { color: #e5f0f8; }
html[data-theme="dark"] .platform-help-route li, html[data-theme="dark"] .platform-help-card p { color: #9eb2c4; }
html[data-theme="dark"] .platform-help-route li::before { background: #123b56; color: #7dd3fc; }
html[data-theme="dark"] .platform-help-route li:not(:last-child)::after { background: #31516c; }
html[data-theme="dark"] .platform-help-route p { background: #0d3148; color: #a7d8f4; }
html[data-theme="dark"] .platform-help-card { border-color: #263d52; background: #112131; box-shadow: none; }
html[data-theme="dark"] .platform-help-card:hover { border-color: #38bdf8; }
html[data-theme="dark"] .platform-help-card[open] { border-color: #2f91c2; }
html[data-theme="dark"] .platform-help-card > summary:hover { background: #14283a; }
html[data-theme="dark"] .platform-help-card > summary strong { color: #e5f0f8; }
html[data-theme="dark"] .platform-help-card > summary small,
html[data-theme="dark"] .platform-help-card-body > p,
html[data-theme="dark"] .platform-help-steps li { color: #9eb2c4; }
html[data-theme="dark"] .platform-help-card-body { border-color: #263d52; }
html[data-theme="dark"] .platform-help-step { background: #123b56; color: #7dd3fc; }
html[data-theme="dark"] .platform-help-card-body h4,
html[data-theme="dark"] :is(.platform-help-role-grid b, .platform-help-faq b) { color: #c7dfef; }
html[data-theme="dark"] .platform-help-entry { background: #102d43; color: #add5ed; }
html[data-theme="dark"] .platform-help-result { border-color: #245f3d; background: #112e22; color: #9de7b6; }
html[data-theme="dark"] .platform-help-note { border-color: #665020; background: #312912; color: #f0d58f; }
html[data-theme="dark"] .platform-help-steps li::before { background: #123b56; color: #7dd3fc; }
html[data-theme="dark"] :is(.platform-help-role-grid div, .platform-help-faq div) { border-color: #263d52; background: #0e1d2c; }
html[data-theme="dark"] :is(.platform-help-role-grid span, .platform-help-faq span, .platform-help-legend) { color: #91a7ba; }
html[data-theme="dark"] .platform-help-tip kbd { border-color: #3c5368; background: #0b1926; color: #c0d1df; }
html[data-theme="dark"] .platform-help-empty strong { color: #d1deea; }
html[data-theme="dark"] .platform-help-footer { border-color: #263d52; background: #0e1d2c; color: #9eb2c4; }

.platform-global-actions {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center !important;
    gap: 6px !important;
}

.platform-global-actions { margin-left: auto; }

.project-workflow-drawer {
    position: fixed;
    z-index: 1350;
    top: 78px;
    bottom: 16px;
    left: 0;
    width: min(390px, calc(100vw - 38px));
    padding-right: 20px;
    transform: translateX(calc(-100% + 20px));
    transition: transform .2s ease;
    filter: drop-shadow(10px 8px 20px rgba(15, 23, 42, .2));
}

.project-workflow-drawer:hover,
.project-workflow-drawer:focus-within,
.project-workflow-drawer.is-open {
    transform: translateX(0);
}

.project-workflow-handle {
    position: absolute;
    top: 50%;
    right: 0;
    width: 30px;
    min-height: 122px;
    padding: 12px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transform: translateY(-50%);
    border: 1px solid #1683d8 !important;
    border-left: 0 !important;
    border-radius: 0 9px 9px 0 !important;
    background: #1683d8 !important;
    color: white !important;
    cursor: pointer;
    writing-mode: vertical-rl;
    font: 700 12px "Microsoft YaHei", sans-serif;
    letter-spacing: 2px;
}

.project-workflow-drawer:hover .project-workflow-handle,
.project-workflow-drawer.is-open .project-workflow-handle {
    background: #0f6fae !important;
}

.project-workflow-panel {
    height: 100%;
    padding: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #dbe4ee;
    border-left: 0;
    border-radius: 0 12px 12px 0;
    background: #fff;
}

.project-workflow-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dbe4ee;
}

.project-workflow-head > div { min-width: 0; }
.project-workflow-head small,
.project-workflow-head strong { display: block; }
.project-workflow-head small { margin-bottom: 3px; color: #718096; font-size: 11px; }
.project-workflow-head strong { overflow: hidden; color: #24364b; text-overflow: ellipsis; white-space: nowrap; }
.project-workflow-head button {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #dbe4ee;
    background: #f8fafc;
    color: #52657a;
    cursor: pointer;
}

.project-workflow-project-switcher { position: relative; min-width: 0; flex: 1; }
.project-workflow-project-switcher > summary {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    list-style: none;
    cursor: pointer;
}
.project-workflow-project-switcher > summary::-webkit-details-marker { display: none; }
.project-workflow-project-switcher > summary > span { min-width: 0; }
.project-workflow-project-switcher > summary small,
.project-workflow-project-switcher > summary strong { display: block; }
.project-workflow-project-switcher > summary small { margin-bottom: 3px; color: #718096; font-size: 11px; }
.project-workflow-project-switcher > summary strong { overflow: hidden; color: #24364b; text-overflow: ellipsis; white-space: nowrap; }
.project-workflow-project-switcher > summary > i { color: #1683d8; font-size: 11px; transition: transform .15s ease; }
.project-workflow-project-switcher[open] > summary > i { transform: rotate(180deg); }
.project-workflow-project-menu {
    position: absolute;
    z-index: 3;
    top: calc(100% + 10px);
    left: -7px;
    width: min(320px, calc(100vw - 82px));
    max-height: 290px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid #dbe4ee;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .24);
}
.project-workflow-project-menu button,
.project-workflow-project-menu a {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #334155 !important;
    font: 700 12px "Microsoft YaHei", sans-serif;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.project-workflow-project-menu button:hover,
.project-workflow-project-menu a:hover,
.project-workflow-project-menu button.is-active { border-color: #bae6fd !important; background: #eaf5ff !important; color: #0369a1 !important; }

.project-workflow-notice {
    margin: 12px 0 10px;
    padding: 10px;
    border: 1px solid #f5d779;
    border-radius: 8px;
    background: #fff7df;
    color: #8a5b00;
    font-size: 12px;
}

.project-workflow-notice.ready {
    border-color: #86efac;
    background: #ecfdf3;
    color: #166534;
}

.project-workflow-list { display: grid; gap: 8px; }
.project-workflow-link {
    width: 100%;
    min-width: 0;
    min-height: 62px;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 10px;
    border: 1px solid #dbe4ee !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #24364b !important;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.project-workflow-link:hover,
.project-workflow-link.is-active {
    border-color: #38bdf8 !important;
    background: #eef8ff !important;
}

.project-workflow-link.locked {
    opacity: .48;
    cursor: not-allowed;
}

.project-workflow-link > span:nth-child(2) { min-width: 0; }
.project-workflow-link strong,
.project-workflow-link small { display: block; }
.project-workflow-link strong { margin-bottom: 2px; font-size: 14px; }
.project-workflow-link small { overflow: hidden; color: #718096; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-workflow-icon {
    width: 36px;
    height: 36px;
    display: grid !important;
    place-items: center;
    border-radius: 8px;
    background: #eaf5ff;
    color: #1683d8;
}

html[data-theme="dark"] .project-workflow-panel {
    border-color: var(--platform-border);
    background: var(--platform-card-bg);
    color: var(--platform-body-text);
}

html[data-theme="dark"] .project-workflow-head { border-color: var(--platform-border); }
html[data-theme="dark"] .project-workflow-head strong { color: var(--platform-body-text); }
html[data-theme="dark"] .project-workflow-head button,
html[data-theme="dark"] .project-workflow-link {
    border-color: var(--platform-border) !important;
    background: var(--platform-card-soft) !important;
    color: var(--platform-body-text) !important;
}
html[data-theme="dark"] .project-workflow-link:hover,
html[data-theme="dark"] .project-workflow-link.is-active { border-color: #38bdf8 !important; background: #163853 !important; }
html[data-theme="dark"] .project-workflow-icon { background: #123b55; color: #7dd3fc; }
html[data-theme="dark"] .project-workflow-notice { border-color: #8a6821; background: #3b2b17; color: #fdba74; }
html[data-theme="dark"] .project-workflow-notice.ready { border-color: #1f6f4a; background: #12382b; color: #86efac; }
html[data-theme="dark"] .project-workflow-project-switcher > summary strong { color: var(--platform-body-text); }
html[data-theme="dark"] .project-workflow-project-menu { border-color: var(--platform-border); background: var(--platform-card-bg); }
html[data-theme="dark"] .project-workflow-project-menu :is(button, a) { color: var(--platform-body-text) !important; }
html[data-theme="dark"] .project-workflow-project-menu :is(button, a):hover,
html[data-theme="dark"] .project-workflow-project-menu button.is-active { border-color: #2b6385 !important; background: #163853 !important; color: #7dd3fc !important; }

.project-split-dialog {
    width: min(650px, calc(100vw - 28px));
    max-height: calc(100dvh - 28px);
    padding: 0;
    border: 1px solid #dbe4ee;
    border-radius: 13px;
    background: #fff;
    color: #24364b;
    box-shadow: 0 24px 72px rgba(0, 0, 0, .38);
}
.project-split-dialog::backdrop { background: rgba(4, 13, 24, .72); backdrop-filter: blur(2px); }
.project-split-dialog form { margin: 0; }
.project-split-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 17px 18px; border-bottom: 1px solid #dbe4ee; }
.project-split-head h2 { margin: 0 0 5px; font-size: 18px; }
.project-split-head p { margin: 0; color: #718096; font-size: 12px; }
.project-split-head button { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.project-split-body { max-height: calc(100dvh - 175px); padding: 16px 18px; overflow-y: auto; }
.project-split-ratio { display: grid; grid-template-columns: 4fr 1fr; gap: 8px; margin-bottom: 14px; }
.project-split-ratio div { padding: 11px 13px; border: 1px solid #dbe4ee; border-radius: 8px; background: #f8fafc; }
.project-split-ratio span,
.project-split-ratio strong { display: block; }
.project-split-ratio span { color: #718096; font-size: 11px; }
.project-split-ratio strong { margin-top: 2px; color: #1683d8; font-size: 19px; }
.project-split-dialog fieldset { margin: 0 0 13px; padding: 10px 12px 12px; border: 1px solid #dbe4ee; border-radius: 8px; }
.project-split-dialog legend { padding: 0 5px; color: #52657a; font-size: 12px; font-weight: 800; }
.project-split-dialog fieldset > label { display: inline-flex; align-items: center; gap: 6px; margin: 5px 14px 0 0; font-size: 12px; cursor: pointer; }
.project-split-classes { display: flex; flex-wrap: wrap; gap: 7px; }
.project-split-classes label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #dbe4ee; border-radius: 7px; font-size: 12px; cursor: pointer; }
.project-split-classes label:has(input:checked) { border-color: #38bdf8; background: #eef8ff; }
.project-split-classes i { width: 10px; height: 10px; border-radius: 3px; }
.project-split-muted { color: #718096; font-size: 12px; }
.project-split-prefix span { display: block; margin-bottom: 5px; color: #52657a; font-size: 12px; font-weight: 800; }
.project-split-prefix input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; }
.project-split-status { min-height: 19px; margin-top: 9px; color: #52657a; font-size: 12px; }
.project-split-status.error { color: #dc2626; }
.project-split-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid #dbe4ee; }
.project-split-actions button { min-height: 36px; padding: 0 12px; border: 1px solid #cbd5e1; background: #f8fafc; color: #334155; cursor: pointer; }
.project-split-actions button.primary { border-color: #1683d8 !important; background: #1683d8 !important; color: #fff !important; }
.project-split-actions button:disabled { opacity: .5; cursor: wait; }
html[data-theme="dark"] .project-split-dialog { border-color: var(--platform-border); background: var(--platform-card-bg); color: var(--platform-body-text); }
html[data-theme="dark"] :is(.project-split-head, .project-split-actions) { border-color: var(--platform-border); }
html[data-theme="dark"] .project-split-head p,
html[data-theme="dark"] .project-split-muted,
html[data-theme="dark"] .project-split-status { color: var(--platform-body-muted); }
html[data-theme="dark"] :is(.project-split-ratio div, .project-split-dialog fieldset, .project-split-classes label, .project-split-actions button) { border-color: var(--platform-border); background: var(--platform-card-soft); color: var(--platform-body-text); }
html[data-theme="dark"] .project-split-classes label:has(input:checked) { border-color: #38bdf8; background: #163853; }

@media (max-width: 600px) {
    .project-workflow-drawer { top: 138px; width: calc(100vw - 18px); }
    .project-split-actions { flex-wrap: wrap; }
    .project-split-actions button { flex: 1; }
}

.platform-current-project {
    width: min(310px, 28vw);
    min-width: 170px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #31506f;
    border-radius: 8px;
    background: #102a43;
    color: #f8fafc;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.platform-current-project:hover,
.platform-current-project.is-active {
    border-color: #38bdf8;
    background: #17486a;
}

.platform-current-project i { flex: 0 0 auto; color: #38bdf8; }
.platform-current-project .platform-project-viewport { min-width: 0; overflow: hidden; white-space: nowrap; }
.platform-current-project.is-overflowing .platform-project-marquee {
    animation: platform-project-scroll var(--project-scroll-duration, 6s) ease-in-out 1s infinite alternate;
}
.platform-current-project:hover .platform-project-marquee,
.platform-current-project:focus-visible .platform-project-marquee { animation-play-state: paused; }

.platform-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    color: #f8fafc !important;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.platform-brand-logo {
    width: 90px;
    height: 60px;
    flex: 0 0 90px;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    background: transparent;
    padding: 0;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .95)) drop-shadow(0 0 2px rgba(15, 93, 139, .4));
}

.platform-brand small {
    margin-left: 3px;
    color: var(--platform-muted);
    font-size: 11px;
    font-weight: 500;
}

.platform-actions {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center !important;
    justify-content: flex-end;
    gap: 6px !important;
}

.platform-project-switcher {
    position: relative;
    flex: 0 0 180px;
    width: 180px;
    height: 36px;
    border: 1px solid #31506f;
    border-radius: 7px;
    background: #102a43;
    color: #fff;
    font: inherit;
    z-index: 30;
}

.platform-project-switcher:hover,
.platform-project-switcher:focus-within,
.platform-project-switcher[open] {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, .13);
}

.platform-project-trigger {
    width: 100%;
    height: 100%;
    padding: 0 28px 0 10px;
    display: flex;
    align-items: center;
    color: #f8fafc;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.platform-project-trigger::-webkit-details-marker { display: none; }
.platform-project-trigger::marker { content: ""; }

.platform-project-viewport {
    min-width: 0;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.platform-project-marquee {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

.platform-project-switcher.is-overflowing .platform-project-marquee {
    animation: platform-project-scroll var(--project-scroll-duration, 6s) ease-in-out 1s infinite alternate;
}

.platform-project-switcher:hover .platform-project-marquee,
.platform-project-switcher:focus-within .platform-project-marquee {
    animation-play-state: paused;
}

@keyframes platform-project-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(var(--project-scroll-distance, 0)); }
}

.platform-project-chevron {
    position: absolute;
    right: 10px;
    font-size: 10px;
    pointer-events: none;
    transition: transform .16s ease;
}

.platform-project-switcher[open] .platform-project-chevron { transform: rotate(180deg); }

.platform-project-menu {
    position: absolute;
    top: calc(100% + 7px);
    left: -1px;
    width: max(100%, 250px);
    max-width: min(360px, calc(100vw - 24px));
    max-height: min(340px, calc(100vh - 90px));
    padding: 6px;
    overflow-y: auto;
    border: 1px solid #31506f;
    border-radius: 9px;
    background: #0b1d30;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .42);
}

.platform-project-option {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #dbeafe;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.platform-project-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-project-option:hover,
.platform-project-option:focus-visible {
    border-color: rgba(56, 189, 248, .38);
    outline: none;
    background: #163853;
    color: #fff;
}

.platform-project-option.is-active {
    border-color: rgba(56, 189, 248, .56);
    background: #17486a;
    color: #fff;
    font-weight: 700;
}

.platform-project-option i {
    flex: 0 0 auto;
    color: #38bdf8;
    font-size: 11px;
}

.platform-button {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 11px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center;
    gap: 7px;
    border: 1px solid #2b506f !important;
    border-radius: 8px !important;
    background: #142c43 !important;
    color: #dbeafe !important;
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.platform-button:hover,
.platform-button.is-active {
    border-color: #38bdf8 !important;
    background: #17486a !important;
    color: white !important;
}

.platform-button:hover { transform: translateY(-1px); }
.platform-button-primary { border-color: #159447 !important; background: #16a34a !important; color: white !important; }
.platform-button-primary:hover { border-color: #22c55e !important; background: #15803d !important; }
.platform-button-danger { border-color: #7f3340 !important; background: #2b2636 !important; }
.platform-button-danger:hover { border-color: #ef4444 !important; background: #7f1d1d !important; }

.platform-balance-alert {
    min-height: 38px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #f87171;
    border-radius: 8px;
    background: #7f1d1d;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    animation: platform-balance-pulse 1.8s ease-in-out infinite;
}

.platform-balance-alert[hidden] { display: none !important; }
.platform-authorization{display:inline-flex;align-items:center;gap:6px;max-width:190px;padding:6px 10px;border:1px solid rgba(56,189,248,.38);border-radius:999px;background:rgba(8,127,165,.14);color:#bcecff;font-size:11px;font-weight:700;white-space:nowrap}.platform-authorization.is-permanent{border-color:rgba(52,211,153,.35);background:rgba(7,148,85,.13);color:#b7f7d7}.platform-authorization.is-expiring{border-color:rgba(251,113,133,.58);background:rgba(190,24,93,.2);color:#fecdd3}
@media(max-width:1050px){.platform-authorization{display:none}}
@keyframes platform-balance-pulse {
    50% { border-color: #fecaca; box-shadow: 0 0 0 4px rgba(248, 113, 113, .18); }
}

.platform-dropdown {
    position: relative;
    flex: 0 0 auto;
    z-index: 1400;
}

.platform-dropdown > summary {
    list-style: none;
    user-select: none;
}

.platform-dropdown > summary::-webkit-details-marker { display: none; }
.platform-chevron { margin-left: 2px; font-size: 9px; transition: transform .15s ease; }
.platform-dropdown[open] .platform-chevron { transform: rotate(180deg); }

.platform-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1200;
    min-width: 190px;
    padding: 7px;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    background: white;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .2);
}

.platform-dropdown-menu a,
.platform-dropdown-menu button {
    width: 100%;
    min-height: 36px;
    height: 36px !important;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 7px;
    color: #334155 !important;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    border: 0 !important;
    background: transparent !important;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.platform-dropdown-menu a:hover,
.platform-dropdown-menu button:hover { background: #e0f2fe !important; color: #0369a1 !important; }

.btn,
.nav-btn,
button {
    border-radius: 8px !important;
    white-space: nowrap;
}

.btn-primary,
.btn-success,
.primary {
    background: var(--platform-primary-dark) !important;
    border-color: var(--platform-primary-dark) !important;
}

.panel,
.card,
.tool-section,
.image-panel,
.annotation-panel {
    border-color: #dbe4ee !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--platform-accent) !important;
    outline: 3px solid rgba(56, 189, 248, .14) !important;
}

.platform-nav-link {
    color: #dbeafe;
    text-decoration: none;
}

.platform-nav-link:hover {
    color: white;
}

@media (max-width: 1200px) {
    .platform-current-project-static { display: none; }
}

@media (max-width: 900px) {
    .platform-header-main { align-items: flex-start; flex-wrap: wrap; }
    .platform-global-actions { margin-left: 0; flex-wrap: wrap; }
    .platform-help-dialog { width: calc(100vw - 24px); }
    .platform-help-content { grid-template-columns: 1fr; }
    .platform-help-route { display: none; }
}

@media (max-width: 640px) {
    .platform-help-dialog { width: calc(100vw - 12px); max-height: calc(100vh - 12px); border-radius: 13px; }
    .platform-help-shell { height: calc(100vh - 14px); min-height: 0; }
    .platform-help-head { padding: 18px 16px 14px; }
    .platform-help-symbol, .platform-help-heading p, .platform-help-heading-meta, .platform-help-search > kbd { display: none; }
    .platform-help-heading h2 { font-size: 24px; }
    .platform-help-heading small { font-size: 11px; }
    .platform-help-search { height: 46px; padding: 0 9px; gap: 7px; }
    .platform-help-search input { font-size: 14px; }
    .platform-help-font-controls { padding-left: 7px; }
    .platform-help-font-controls span { display: none; }
    .platform-help-categories { padding-bottom: 3px; overflow-x: auto; scrollbar-width: thin; }
    .platform-help-categories button { min-width: 64px; flex: 0 0 auto; }
    #platformHelpMatchCount { display: none; }
    .platform-help-results { padding: 12px; gap: 10px; }
    .platform-help-card > summary { padding: 13px; grid-template-columns: 32px minmax(0, 1fr) 14px; gap: 10px; }
    .platform-help-card > summary small { display: none; }
    .platform-help-card-body { padding: 5px 14px 16px; }
    .platform-help-figure > img { height: clamp(145px, 45vw, 210px); }
    .platform-help-figure > span { padding: 24px 48px 11px 12px; }
    .platform-help-figure > span small { display: none; }
    .platform-help-figure > i { right: 11px; bottom: 11px; }
    .platform-help-role-grid, .platform-help-faq { grid-template-columns: 1fr; }
    .platform-help-image-viewer > header { min-height: 62px; padding: 9px 10px; }
    .platform-help-image-viewer > header > div:first-child { min-width: 0; }
    .platform-help-image-viewer > header strong { font-size: 14px; }
    .platform-help-image-tools { gap: 4px; }
    .platform-help-image-tools button { height: 36px; min-width: 34px; padding: 0 8px; }
    .platform-help-image-tools #platformHelpImageReset { min-width: 56px; }
    .platform-help-image-viewer > footer { padding: 8px 10px; }
    .platform-help-image-viewer > footer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .platform-help-image-viewer > footer button { flex: 0 0 auto; }
    .platform-help-footer { padding: 9px 13px; }
    .platform-help-footer span { display: none; }
    .platform-help-footer button { width: 100%; }
}

@media (max-width: 420px) {
    .platform-help-close { top: 14px; right: 13px; width: 38px; height: 38px; }
    .platform-help-heading { padding-right: 40px; }
    .platform-help-heading h2 { font-size: 22px; }
    .platform-help-search .platform-help-font-controls button { min-width: 34px; padding: 0 5px; font-size: 11px; }
    .platform-help-search input::placeholder { font-size: 12px; }
    .platform-help-categories button { min-width: 60px; padding-inline: 11px; }
    .platform-help-image-viewer > header > div:first-child { display: none; }
    .platform-help-image-tools { width: 100%; justify-content: center; }
    .platform-help-image-tools .platform-help-image-close { margin-left: auto; }
    .platform-help-image-viewer > footer span { display: none; }
    .platform-help-image-viewer > footer button { width: 100%; }
}

@media (max-height: 700px) {
    .platform-help-dialog { max-height: calc(100vh - 12px); }
    .platform-help-shell { height: calc(100vh - 14px); min-height: 0; }
    .platform-help-head { padding-top: 14px; padding-bottom: 11px; }
    .platform-help-symbol { width: 44px; height: 44px; }
    .platform-help-heading h2 { font-size: 24px; }
    .platform-help-search { height: 44px; margin-top: 11px; }
    .platform-help-categories { margin-top: 9px; }
    .platform-help-footer { min-height: 56px; }
}

/* 深色主题最终覆盖层. 放在全部基础样式之后, 消除各旧页面内联浅色背景. */
html[data-theme="dark"] :is(.platform-brand-logo, .brand-logo) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .95)) drop-shadow(0 0 2px rgba(125, 211, 252, .7)) !important;
}

html[data-theme="dark"] :is(
    .container, .image-container, .image-list, .annotation-list, .class-list,
    .label-list, .annotation-table-head, .drawing-tools, .image-toolbar,
    .dataset-tabs, .tab-content, .tab-pane, .sample-selection,
    .label-selection-section, .export-type-selection, .upload-area,
    .prompt-section, .api-config-content, .modal-header, .modal-body,
    .modal-footer, .dialog-header, .dialog-body, .dialog-footer,
    .file-grid, .path-nav, .auto-label-container
) {
    border-color: var(--platform-border) !important;
    background: var(--platform-card-bg) !important;
    color: var(--platform-body-text) !important;
}

html[data-theme="dark"] :is(
    .setting-icon, .theme-option, .shortcut-row, .secondary,
    .metric, .dataset-list, .upload-zone, .training-status,
    .table-scroll, .compact-btn, .refresh-balance, .note,
    .balance-card, .model-config-item, .mode-card, .mode-panel,
    .drawing-tools, .tool-btn, .zoom-btn, .class-item,
    .annotation-item, .label-item, .test-result-canvas,
    .test-detection-row, .btn-secondary, .btn-small.btn-danger,
    .class-controls, .class-checkbox-container, .loading-indicator,
    .checkbox-group, .checkbox-group label, .sample-selection label,
    .export-type-selection label, .class-checkbox-label, .image-list li,
    .permission-panel, .permission-row, .model-repository .artifact-link,
    .model-repository .model-status, .pro-item, .pro-item-actions button,
    .compute-access, .compute-list, .gpu-monitor-card
) {
    border-color: var(--platform-border) !important;
    background: var(--platform-card-soft) !important;
    color: var(--platform-body-text) !important;
}

html[data-theme="dark"] .gpu-memory-bar { background: #29394d !important; }

html[data-theme="dark"] #modelArgsSection {
    border-color: var(--platform-border) !important;
    background: var(--platform-card-soft) !important;
    color: var(--platform-body-text) !important;
}

html[data-theme="dark"] .theme-option.active {
    border-color: #38bdf8 !important;
    background: #12384e !important;
    color: #bae6fd !important;
}

html[data-theme="dark"] :is(.tool-btn:hover, .zoom-btn:hover, .class-item:hover, .annotation-item:hover, .label-item:hover) {
    border-color: #38bdf8 !important;
    background: #1a354a !important;
}

/* 有类别和图片数据后由脚本动态生成的控件. */
html[data-theme="dark"] :is(.class-checkbox-label:hover, .image-list li:hover) {
    border-color: #38bdf8 !important;
    background: #1a354a !important;
    color: #ffffff !important;
}

html[data-theme="dark"] :is(.image-list li.selected, .image-list li.active, .image-list li.selected:hover) {
    border-color: #38bdf8 !important;
    background: #17486a !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .image-list li :is(.image-index, .image-name) {
    color: #dce8f5 !important;
}

html[data-theme="dark"] .image-list li :is(.delete-image-btn, .image-checkbox-input) {
    color-scheme: dark;
    accent-color: #22c55e;
}

html[data-theme="dark"] .image-list li .delete-image-btn:hover {
    background: #3a2028 !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] #deleteSelectedBtn {
    background: rgba(127, 29, 29, 0.18) !important;
    border-color: #7f3a43 !important;
    color: #fda4af !important;
}

html[data-theme="dark"] #deleteSelectedBtn:hover:not(:disabled) {
    background: rgba(190, 24, 93, 0.24) !important;
    border-color: #be5a67 !important;
    color: #fecdd3 !important;
}

html[data-theme="dark"] #deleteSelectedBtn:disabled {
    background: var(--platform-card-soft) !important;
    border-color: var(--platform-border) !important;
    color: #64748b !important;
}

html[data-theme="dark"] .class-checkbox-label input[type="checkbox"] {
    color-scheme: dark;
    accent-color: #22c55e;
}
html[data-theme="dark"] :is(.tool-btn.active, .class-item.selected, .annotation-item.selected, .label-item.selected) {
    border-color: #38bdf8 !important;
    background: #17486a !important;
    color: #ffffff !important;
}

html[data-theme="dark"] :is(.theme-option small, .setting-icon) { color: #8ed8f8 !important; }
html[data-theme="dark"] :is(.progress, .progress-bar-container, .progress-bar, .zoom-divider) { background: #29394d !important; }
html[data-theme="dark"] .class-edit-btn { background: #17384a !important; color: #67d4ef !important; }
html[data-theme="dark"] .class-delete-btn { background: #3a2028 !important; color: #fda4af !important; }
html[data-theme="dark"] .mode-card:has(input:checked) { border-color: #38bdf8 !important; background: #17486a !important; }
html[data-theme="dark"] .pro-item.selected { border-color: #38bdf8 !important; background: #173a52 !important; }
html[data-theme="dark"] .instance-editor :is(.editor-head button, .secret-state) { color: #dce8f5 !important; }
html[data-theme="dark"] :is(.instance-editor, .permission-panel) input[type="checkbox"] { color-scheme: dark; accent-color: #22c55e; }
html[data-theme="dark"] :is(.row-select, .model-row-select, .task-row-select) { color-scheme: dark; accent-color: #38bdf8; }
html[data-theme="dark"] .model-name-input {
    border-color: #51647a !important;
    background: #0f1b2a !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] :is(.badge.all, .badge.assigned) { border: 1px solid #28719a; background: #163d55 !important; color: #bae6fd !important; }
html[data-theme="dark"] .badge.none { border: 1px solid #9a6235; background: #3b2b17 !important; color: #fdba74 !important; }
html[data-theme="dark"] :is(.mode-card small, .mode-help) { color: #b6c8dc !important; }
html[data-theme="dark"] :is(th, .data-table th) { background: #172538 !important; color: #dce8f5 !important; }
html[data-theme="dark"] :is(td, .data-table td) { background: #111d2d !important; color: #dce8f5 !important; }
html[data-theme="dark"] :is(.pagination button, .delete-selected) {
    border-color: #51647a !important;
    background: #18283a !important;
    color: #dce8f5 !important;
}
html[data-theme="dark"] .delete-selected:not(:disabled) { border-color: #f87171 !important; color: #fca5a5 !important; }
html[data-theme="dark"] .yolo-status.installed {
    border-color: #26734b !important;
    background: #123727 !important;
    color: #d1fae5 !important;
}
html[data-theme="dark"] .yolo-status.installed .status-text,
html[data-theme="dark"] .yolo-status.installed .status-text span {
    color: #d1fae5 !important;
}
html[data-theme="dark"] .yolo-status.installed .status-text i {
    color: #4ade80 !important;
}
html[data-theme="dark"] .balance-item small {
    color: #a8bed8 !important;
}
html[data-theme="dark"] .balance-item strong {
    color: #f8fafc !important;
}
html[data-theme="dark"] .balance-status {
    color: #b6c8dc !important;
}
html[data-theme="dark"] .balance-card.low {
    border-color: #b45353 !important;
    background: #351b25 !important;
}
html[data-theme="dark"] .balance-card.low .balance-current strong {
    color: #fecaca !important;
}
html[data-theme="dark"] :is(.yolo-status.not-installed, .status-badge.error, #message.error) {
    border-color: #7f1d1d !important;
    background: #351b25 !important;
    color: #fca5a5 !important;
}
html[data-theme="dark"] :is(.note, .status-strip) { color: #a5d8f3 !important; }

html[data-theme="dark"] .annotation-progress-status {
    border-top-color: #2a3c50 !important;
    background: rgba(17, 29, 45, 0.98) !important;
    color: #b6c8dc !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.24) !important;
}
html[data-theme="dark"] .annotation-progress-track { background: #29394d !important; }
html[data-theme="dark"] .annotation-progress-summary strong { color: #5ee7a0 !important; }
