/* 企业级工作区设计系统：只覆盖表现层，不更改业务状态和接口。 */
:root {
  --ink: #172033;
  --purple: #3458d6;
  --violet: #3458d6;
  --gold: #3458d6;
  --cream: #f5f7fa;
  --paper: #ffffff;
  --line: #e4e8ef;
  --muted: #687486;
  --brand: #3458d6;
  --surface: #ffffff;
  --surface-muted: #f8f9fb;
  --border: #e4e8ef;
  --shadow-1: 0 1px 2px rgba(18, 32, 54, .05);
  --shadow-2: 0 10px 28px rgba(18, 32, 54, .10);
  --radius: 10px;
}
html { color-scheme: light; }
body { background: var(--cream); color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 13px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { transition: background .15s, border-color .15s, color .15s; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

/* 入口页 */
.login-view { background: #f4f6f9; }
.login-card { min-height: 540px; border-radius: 12px; box-shadow: var(--shadow-2); }
.login-card:after { display: none; }
.login-card form { border-color: var(--border); border-radius: 10px; background: var(--surface-muted); }
.login-card input, .login-card form button { border-radius: 8px; }
 header em { color: var(--muted); letter-spacing: .09em; }
.brand>span, .brand-mark { border-radius: 9px; background: #1d2942; color: #fff; }

/* 导航与全局栏 */
.app { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { width: 224px; padding: 20px 12px 16px; background: #172238; border-right: 1px solid #202f49; color: #f6f8fc; }
.sidebar .brand.compact { margin: 0 8px 14px; min-height: 40px; }
.sidebar .brand strong { color: #f6f8fc; font-size: 15px; letter-spacing: -.02em; }
.sidebar .brand small { color: #94a2bb; font-size: 10px; }
.sidebar .brand.compact>span { background: #3458d6; border-radius: 9px; }
.sidebar-toggle { height: 32px; width: 32px; align-self: flex-end; margin: -44px 7px 16px 0; border: 1px solid #37445d; border-radius: 8px; background: #25324a; color: #bbc6d8; cursor: pointer; }
.sidebar-toggle:hover { background: #33435f; color: #fff; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #475470 transparent; }
.sidebar .nav-heading { margin-top: 15px; padding: 0 12px 7px; color: #7f8fa9; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.sidebar nav button, .sidebar .logout { position: relative; display: flex; align-items: center; gap: 11px; min-height: 34px; padding: 7px 11px; border-radius: 8px; color: #b4bfd2; font-size: 12px; font-weight: 500; box-shadow: none; }
.sidebar nav button[data-nav-icon]::before { content: attr(data-nav-icon); display: inline-grid; width: 18px; flex: 0 0 18px; place-items: center; color: #8e9bb3; font-size: 17px; font-weight: 400; }
.sidebar nav button[data-feature="edit"]::before { content: "▥"; display: inline-grid; width: 18px; flex: 0 0 18px; place-items: center; color: #8e9bb3; font-size: 17px; font-weight: 400; }
.sidebar nav button:hover, .sidebar .logout:hover { background: #26354e; color: #fff; }
.sidebar nav button.active, .sidebar .material-directory-nav [data-directory].active { background: #2d436d; color: #fff; box-shadow: none; }
.sidebar nav button.active::before { color: #dce6ff; }
.sidebar .material-directory-nav { gap: 2px; margin: 2px 0 4px; padding: 2px 0 2px 14px; border: 0; border-left: 1px solid #41506a; border-radius: 0; background: transparent; }
.sidebar .directory-nav-head small { color: #7f8fa9; }
.sidebar .directory-nav-head button { background: transparent; color: #aebcda; }
.sidebar .material-directory-nav [data-directory] { min-height: 30px; padding: 5px 8px !important; font-size: 11px; }
.sidebar .material-directory-nav [data-directory] small { color: #8290a7; }
.sidebar .upload-card { margin: 16px 4px 0; border: 1px solid #34435f; border-radius: 8px; background: #202d43; box-shadow: none; }
.sidebar .upload-card strong { color: #e6ecf7; }
.sidebar .upload-card small, .sidebar .upload-card span { color: #93a0b6; }
.sidebar .upload-card i { background: #3d4b64; }
.sidebar .upload-card b { background: #7ea0ff; }
.sidebar .logout { margin: 8px 4px 0; justify-content: center; border: 1px solid #34435f; }
.app.sidebar-collapsed { grid-template-columns: 64px minmax(0, 1fr); }
.sidebar-collapsed .sidebar { width: 64px; padding-inline: 8px; }
.sidebar-collapsed .sidebar .brand.compact { margin: 0 5px 16px; }
.sidebar-collapsed .sidebar .brand.compact>div, .sidebar-collapsed .sidebar .nav-heading, .sidebar-collapsed .sidebar .material-directory-nav, .sidebar-collapsed .sidebar .upload-card, .sidebar-collapsed .sidebar .logout { display: none; }
.sidebar-collapsed .sidebar-toggle { margin: 0 8px 16px; align-self: center; }
.sidebar-collapsed .sidebar nav button[data-nav-icon], .sidebar-collapsed .sidebar nav button[data-feature="edit"] { width: 44px; height: 40px; padding: 0; justify-content: center; overflow: hidden; font-size: 0; }
.sidebar-collapsed .sidebar nav button[data-nav-icon]::before, .sidebar-collapsed .sidebar nav button[data-feature="edit"]::before { font-size: 19px; }
.sidebar-collapsed .sidebar nav { overflow: visible; }

.app main { width: 100%; max-width: none; min-width: 0; margin: 0; padding: 0 32px 72px; }
.app .app-topbar { position: sticky; top: 0; z-index: 12; height: 64px; margin: 0 -32px; padding: 0 32px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-left { position: relative; }
.topbar-right { position: relative; margin-left: auto; }
.project-switch, .topbar-user, .topbar-search { display: inline-flex; align-items: center; gap: 9px; height: 36px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #354257; padding: 0 10px; font-size: 12px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.project-switch:hover, .topbar-user:hover, .topbar-search:hover { border-color: var(--border); background: var(--surface-muted); }
.project-switch-mark { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: #e9efff; color: var(--brand); }
.chevron { color: #8290a3; font-size: 15px; }
.topbar-divider { height: 18px; width: 1px; background: var(--border); }
.topbar-context { color: var(--muted); font-size: 12px; }
.topbar-search { min-width: 198px; justify-content: flex-start; border-color: var(--border); color: #7a8595; font-weight: 400; }
.topbar-search span { font-size: 19px; line-height: 1; }
.topbar-search kbd { margin-left: auto; padding: 1px 5px; border: 1px solid var(--border); border-radius: 4px; color: #9aa5b4; font-size: 10px; font-family: inherit; }
.topbar-user { padding-right: 6px; }
.topbar-user i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #dfe7f7; color: #24499c; font-size: 11px; font-style: normal; }
.topbar-user-menu, .project-switch-menu { position: absolute; top: 47px; z-index: 20; min-width: 180px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: var(--shadow-2); }
.project-switch-menu { left: 0; }
.topbar-user-menu { right: 0; }
.topbar-user-menu button, .project-switch-menu button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.topbar-user-menu button:hover, .project-switch-menu button:hover, .project-switch-menu button.active { background: #eef2fb; color: var(--brand); }
.top-actions { display: none; }
.topbar-right .helper-install { height: 34px; padding: 0 10px; border-color: var(--border); border-radius: 8px; background: #fff; color: #4b5a70; font-size: 11px; font-weight: 550; }
.topbar-right>.gold, .topbar-right>.primary { height: 34px; padding: 0 13px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: #334056; font-size: 11px; font-weight: 650; cursor: pointer; }
.topbar-right>.primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.topbar-right>.gold:hover, .topbar-right>.primary:hover { filter: brightness(.96); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 30px 0 24px; }
.page-eyebrow { color: #8190a3; font-size: 11px; }
.page-heading h1 { margin: 7px 0 3px; font-size: 26px; line-height: 1.25; letter-spacing: -.035em; font-weight: 700; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.page-workbench { height: 36px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: #435169; padding: 0 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.page-workbench:hover { border-color: #b6c6f1; color: var(--brand); }
.page-workbench span { margin-left: 7px; color: #8a98b0; }

/* 素材搜索与筛选 */
.service-notice { margin: 0 0 16px; padding: 10px 14px; border: 1px solid #d8e2f4; border-radius: 8px; background: #f1f5fc; color: #556781; font-size: 11px; }
.service-notice small { display: inline; margin-left: 8px; color: #8290a5; }
.search-panel { position: relative; padding: 16px; border-radius: 10px; box-shadow: var(--shadow-1); }
.search-panel form { height: 46px; border-color: #d9e1ec; border-radius: 8px; background: #fff; padding: 3px 4px 3px 14px; }
.search-panel form>span { color: #8795a9; font-size: 21px; }
.search-panel input { font-size: 13px; }
.search-panel form button { height: 36px; border-radius: 6px; padding: 0 18px; font-size: 12px; }
.filters { display: flex; gap: 8px; padding-top: 12px; flex-wrap: wrap; }
.filters select, .filters button { height: 34px; min-width: 0; margin: 0; padding: 0 11px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: #465368; font-size: 11px; }
.filters select { min-width: 125px; max-width: 170px; }
.filters button { cursor: pointer; }
.filters .more-filters-btn { margin-left: auto; }
.filters #refreshBtn { margin-left: 0; }
.more-filters-btn span:not([hidden]) { display: inline-grid; width: 17px; height: 17px; margin: 0 4px; place-items: center; border-radius: 50%; background: #e9efff; color: var(--brand); font-size: 10px; }
.more-filters-panel { position: absolute; z-index: 15; top: calc(100% - 2px); right: 16px; width: min(610px, calc(100vw - 64px)); padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: var(--shadow-2); }
.more-filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.more-filters-head strong { font-size: 13px; }
.more-filters-head button { width: 28px; height: 28px; border: 0; border-radius: 6px; background: #f2f4f7; color: #536176; cursor: pointer; }
.more-filters-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.more-filters-fields>label { display: grid; gap: 5px; color: #647286; font-size: 11px; }
.more-filters-fields select, .more-filters-fields .tag-filter-trigger { width: 100%; height: 36px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: #3c4a60; padding: 0 10px; font-size: 11px; }
.more-filters-fields .tag-filter { grid-column: 1 / -1; }
.more-filters-fields .tag-picker { top: auto; bottom: 40px; right: 0; }
.recent-searches:not(:empty) { margin-top: 10px; }
.recent-searches button { border-radius: 5px; background: #f1f3f7; color: #6b7789; }
.results-head { height: 64px; }
.results-head strong { font-size: 14px; font-weight: 650; }
.results-head span { color: #8995a6; font-size: 10px; }
.view-buttons { border-radius: 7px; box-shadow: var(--shadow-1); }
.view-buttons button.active { background: #e9efff; color: var(--brand); }

/* 素材卡：统一 16:10 封面比例，操作在悬停和键盘聚焦时浮现。 */
.asset-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.asset-grid.large { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.asset-card { border-radius: 10px; background: #fff; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.asset-card:hover, .asset-card:focus-within { transform: none; border-color: #c2cde0; box-shadow: var(--shadow-2); }
.asset-card.selected { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(52,88,214,.12); }
.media { width: 100%; height: auto; aspect-ratio: 16 / 10; background: #edf0f5; }
.media img { object-fit: cover; }
.media>span { left: 10px; bottom: 9px; padding: 3px 7px; border-radius: 5px; background: rgba(17,28,46,.75); font-size: 10px; }
.media .select-asset, .media .favorite { width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.45); border-radius: 7px; background: rgba(23,32,51,.68); color: #fff; box-shadow: none; }
.media .quick-jianying { right: 8px; bottom: 8px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.65); border-radius: 6px; background: rgba(23,32,51,.82); color: #fff; font-size: 10px; box-shadow: none; }
.media .quick-jianying:hover { background: var(--brand); }
.asset-card .media .select-asset, .asset-card .media .favorite, .asset-card .media .quick-jianying { opacity: 0; transition: opacity .15s; }
.asset-card:hover .media .select-asset, .asset-card:hover .media .favorite, .asset-card:hover .media .quick-jianying, .asset-card:focus-within .media .select-asset, .asset-card:focus-within .media .favorite, .asset-card:focus-within .media .quick-jianying, .asset-card.selected .media .select-asset, .asset-card .media .favorite.active { opacity: 1; }
.caption { padding: 12px; }
.caption h3 { margin: 5px 0 0; color: #172033; font-size: 13px; font-weight: 700; line-height: 1.4; }
.caption p { display: -webkit-box; height: 36px; margin: 7px 0 8px; overflow: hidden; color: #8a96a8; font-size: 11px; font-weight: 400; line-height: 18px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.caption .usage-badge { display: inline-block; padding: 2px 6px; border-radius: 4px; background: #f3f5f8; color: #8995a6; font-size: 9px; font-style: normal; font-weight: 500; }
.tags { height: 24px; white-space: nowrap; }
.tags button, .tags i { padding: 3px 6px; border-radius: 4px; background: #f3f5f8; color: #8792a0; font-size: 9px; }
.caption footer { margin-top: 6px; }
.caption footer span { font-size: 10px; }
.caption footer button { color: var(--brand); font-size: 10px; font-weight: 650; }
.media-wait { color: #8995a6; }
.media-wait span { color: #aeb9c8; }

/* 通用抽屉、对话框与控件 */
.feature-panel { padding: 16px; background: rgba(17,27,44,.44); backdrop-filter: none; }
.feature-shell, .feature-shell.wide, .feature-shell.editor { min-height: calc(100vh - 32px); border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow-2); }
.feature-shell>header:first-child { border-color: var(--border); background: rgba(255,255,255,.97); box-shadow: 0 1px 0 var(--border); backdrop-filter: none; }
.feature-shell header h2 { font-size: 22px; letter-spacing: -.025em; }
.feature-shell header p { color: var(--muted); font-size: 12px; }
.feature-shell header em { color: #8a97aa; letter-spacing: .1em; }
.panel-close, .close, .agent-floating-close { border: 1px solid var(--border); border-radius: 8px; background: #f8f9fb; color: #657389; box-shadow: none; }
.panel-back, .dialog-back, .detail-back { border-color: var(--border); border-radius: 8px; background: #fff; color: #455572; box-shadow: none; }
.primary, .gold, .feature-shell button.primary { border: 1px solid var(--brand); border-radius: 8px; background: var(--brand); color: #fff; box-shadow: none; }
.feature-shell input, .feature-shell select, .feature-shell textarea, .creative-toolbar input, .creative-toolbar select { border-color: var(--border); border-radius: 8px; background: #fff; box-shadow: none; }
.creative-grid>*, .people-grid button, .production-card, .capture-task-card, .capture-shot, .production-job, .workspace-assets-grid article { border-color: var(--border); border-radius: 10px; background: #fff; box-shadow: var(--shadow-1); }
.drop-zone { border-color: #b8c6db; border-radius: 10px; background: #f8faff; }
dialog { border-radius: 12px; box-shadow: var(--shadow-2); }
dialog::backdrop { background: rgba(17,27,44,.5); backdrop-filter: none; }
.toast { border-radius: 8px; }
.batch-tray { border: 1px solid #2f3d55; border-radius: 10px; background: #172238; box-shadow: var(--shadow-2); }
.batch-tray button, .batch-tray .jianying-action { border-radius: 7px; background: #fff; color: #253955; }
.release-notice, .import-note, .capture-task-toolbar, .production-boundary { border-color: #dbe4f1; border-radius: 8px; background: #f4f7fb; color: #58677e; }
.release-toolbar button, .directory-create-row button, .move-directory-dialog footer button:last-child, .capture-task-form button.primary { border-color: var(--brand); border-radius: 8px; background: var(--brand); color: #fff; }
.release-card, .release-steps, .creative-card, .creative-stats span, .production-history, .production-capability, .capture-shot, .capture-task-card { border-color: var(--border); border-radius: 10px; background: #fff; box-shadow: var(--shadow-1); }
.release-card b, .capture-card-tools span, .production-health span { border-radius: 5px; background: #f0f3f8; color: #65758a; }
.release-card b[data-state="complete"], .production-health span.online { background: #eaf6ef; color: #287346; }
.import-mode-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); }
.import-mode-tabs button, .import-mode-tabs button.active { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #6b788d; padding: 11px 4px; }
.import-mode-tabs button.active { border-bottom-color: var(--brand); color: var(--brand); }
.creative-toolbar button.primary, .directory-create-row button, .capture-actions .primary { border-radius: 8px; background: var(--brand); color: #fff; }
.creative-stats span, .tag-choice, .tag-category-tabs button, .production-health span { box-shadow: none; }
.tag-category-tabs button.active, .tag-choice.selected { border-color: #b9c9f2; background: #edf2ff; color: var(--brand); }
.detail-media { border-radius: 8px; }
.detail-actions button, .detail-actions a, .directory-manage-row button, .move-directory-dialog footer button:first-child { border-color: var(--border); border-radius: 7px; background: #fff; color: #4a5b76; }
.directory-dialog header>button, .move-directory-dialog header>button { border-radius: 7px; background: #f2f4f7; color: #526178; }
.agent-float, .agent-dialog, .feature-shell { font-size: 12px; }

/* 工作台：平面化、可扫描的生产流程。 */
.edit-workbench-shell { width: min(1640px, 100%) !important; background: #f8fafc; isolation: auto; }
.edit-workbench-shell::before, .smart-workflow-card::after { display: none; }
.edit-workbench-tabs { gap: 18px; margin: 12px 0 20px; }
.edit-workbench-tabs button { padding: 11px 3px; color: #758195; font-size: 12px; font-weight: 600; }
.edit-workbench-tabs button.active { border-color: var(--brand); color: var(--brand); }
.smart-workflow-card { padding: 24px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--ink); box-shadow: var(--shadow-1); backdrop-filter: none; }
.smart-workflow-intro small { color: #8390a2; letter-spacing: .1em; }
.smart-workflow-intro h3 { color: var(--ink); font-size: 20px; }
.smart-workflow-intro p { color: var(--muted); }
.workflow-runtime { border-color: var(--border); border-radius: 8px; background: #f8fafc; box-shadow: none; backdrop-filter: none; }
.workflow-runtime strong { color: var(--ink); }
.workflow-runtime small { color: var(--muted); }
.workflow-runtime button { border-color: var(--border); border-radius: 7px; background: #fff; color: #53627a; }
.smart-workflow-steps { gap: 7px; }
.smart-workflow-steps span { min-height: 66px; border-color: var(--border); border-radius: 8px; background: #fafbfc; color: #26354e; box-shadow: none; }
.smart-workflow-steps span:not(:last-child)::after { background: #cbd5e3; }
.smart-workflow-steps b { width: 28px; height: 28px; border-radius: 6px; background: #dfe8fb; color: #244bb8; box-shadow: none; font-size: 13px; font-weight: 750; }
.smart-workflow-steps em { color: #26354e; font-size: 12px; font-weight: 700; }
.smart-workflow-form label { color: #4e5d73; }
.smart-workflow-form input, .smart-workflow-form select, .smart-workflow-form textarea { border-color: var(--border); border-radius: 8px; background: #fff; box-shadow: none; }
.smart-workflow-form .workflow-switches label { display: inline-flex; align-items: center; gap: 6px; color: #536178; font-size: 11px; font-weight: 550; white-space: nowrap; }
.smart-workflow-form .workflow-switches input { width: auto; flex: 0 0 auto; }
.smart-workflow-form footer button { border-color: var(--brand); border-radius: 8px; background: var(--brand); box-shadow: none; }
.edit-task-layout>aside, .edit-task-detail, .workspace-source-summary, .edit-task-next, .edit-task-events { border-color: var(--border); border-radius: 8px; background: #fff; box-shadow: none; }

/* 助手：同一工作区体系，不再使用紫色渐变和毛玻璃。 */
.agent-float { border-radius: 8px; background: var(--brand); box-shadow: var(--shadow-2); }
.agent-float span { color: #fff; }
.agent-dialog { top: 16px; right: 16px; bottom: 16px; width: min(600px, calc(100vw - 32px)); border-color: var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow-2); backdrop-filter: none; isolation: auto; }
.agent-dialog::before, .agent-dialog::after { display: none; }
.agent-shell, .agent-dialog .agent-head, .agent-history, .agent-dock, .agent-script-board, .agent-edit-plan { background: #fff; box-shadow: none; backdrop-filter: none; }
.agent-dialog .agent-head { min-height: 68px; padding: 12px 18px; border-bottom-color: var(--border); }
.agent-title>span, .agent-avatar { border: 0; border-radius: 8px; background: #eaf0ff; color: var(--brand); box-shadow: none; }
.agent-title>span { width: 38px; height: 38px; flex-basis: 38px; }
.agent-title h2 { font-size: 15px; }
.agent-title p { color: var(--muted); }
.agent-nav-btn, .agent-new-chat, .agent-settings-trigger, .agent-model-control-dock .agent-model-trigger { border-color: var(--border); border-radius: 8px; background: #fff; color: #4b5971; box-shadow: none; backdrop-filter: none; }
.agent-mode { border-radius: 5px; border-color: #d9e5f3; background: #f1f5fa; color: #607086; box-shadow: none; }
.agent-message>div { border-color: var(--border); border-radius: 8px; background: #fff; box-shadow: none; backdrop-filter: none; }
.agent-message.user>div { border-color: var(--brand); border-radius: 8px; background: var(--brand); }
.agent-dock { padding: 12px 14px; border-top-color: var(--border); }
.agent-dock-toolbar .agent-mode-row select, .agent-compose textarea { border-color: var(--border); border-radius: 8px; background: #fff; color: var(--ink); box-shadow: none; backdrop-filter: none; }
.agent-compose textarea { min-height: 72px; }
.agent-compose button { border-radius: 7px; background: var(--brand); box-shadow: none; }
.agent-dialog .agent-suggestions button { border: 1px solid var(--border); border-radius: 6px; background: #f8f9fb; color: #718095; box-shadow: none; backdrop-filter: none; }
.agent-history-card, .agent-script-section, .agent-edit-shot, .agent-script-candidate, .agent-shot-picker, .agent-render-review, .agent-provider-row, .agent-budget-row { border-color: var(--border); border-radius: 8px; background: #fff; box-shadow: none; backdrop-filter: none; }
.agent-script-head, .agent-edit-head { border-bottom-color: var(--border); background: #fff; box-shadow: none; backdrop-filter: none; }
.agent-script-head button, .agent-script-actions button, .agent-edit-head button { border-color: var(--brand); border-radius: 7px; background: var(--brand); box-shadow: none; }
.agent-script-head button.ghost, .agent-script-actions button.ghost, .agent-edit-head button.ghost { border-color: var(--border); background: #fff; color: #4c5e7a; box-shadow: none; }
.agent-script-number { border-radius: 6px; background: var(--brand); box-shadow: none; }
.agent-script-category, .agent-script-count, .agent-edit-time { border-radius: 5px; background: #eef2fb; color: #516795; }
.agent-output-settings { border-top-color: var(--border); background: #fff; box-shadow: none; backdrop-filter: none; }
.agent-settings-page-head, .agent-dialog #agentSettings[open], .agent-dialog .agent-dock-toolbar .agent-settings[open] { border-color: var(--border); border-radius: 10px; background: #fff !important; box-shadow: var(--shadow-2); backdrop-filter: none; }
.agent-floating-close { top: 15px; right: 15px; border-radius: 8px; background: #fff; }

@media (max-width: 1660px) { .asset-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1820px) { .asset-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .asset-grid.large { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1250px) { .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .topbar-context, .topbar-right .helper-install { display: none; } }
@media (max-width: 980px) { .topbar-search { min-width: 36px; width: 36px; font-size: 0; padding: 0 8px; } .topbar-search kbd { display: none; } .topbar-search span { font-size: 20px; } .topbar-user>span:not(.chevron) { display: none; } }
@media (max-width: 760px) {
  .app, .app.sidebar-collapsed { display: block; }
  .sidebar, .sidebar-collapsed .sidebar { position: relative; width: 100%; height: auto; padding: 10px; }
  .sidebar .brand.compact { margin: 0 0 6px; }
  .sidebar-toggle, .sidebar-collapsed .sidebar-toggle { margin: -42px 4px 8px auto; }
  .sidebar nav { display: flex; flex-direction: row; overflow-x: auto; gap: 4px; }
  .sidebar nav button, .sidebar-collapsed .sidebar nav button[data-nav-icon] { flex: 0 0 auto; width: auto; height: 34px; padding: 5px 10px; font-size: 11px; }
  .sidebar .nav-heading, .sidebar .material-directory-nav, .sidebar .upload-card, .sidebar .logout { display: none; }
  .app main { padding: 0 14px 50px; }
  .app .app-topbar { height: 54px; margin: 0 -14px; padding: 0 14px; }
  .topbar-right .gold, .topbar-right .primary, .topbar-divider, .page-workbench { display: none; }
  .page-heading { padding: 22px 0 18px; }
  .page-heading h1 { font-size: 23px; }
  .service-notice small { display: block; margin: 3px 0 0; }
  .filters select { flex: 1 1 calc(50% - 4px); max-width: none; }
  .filters .more-filters-btn { margin-left: 0; flex: 1; }
  .more-filters-panel { right: 0; width: min(100%, 610px); }
  .asset-grid, .asset-grid.large { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .caption { padding: 9px; }
  .caption .tags { display: none; }
  .asset-card .media .select-asset, .asset-card .media .favorite, .asset-card .media .quick-jianying { opacity: 1; }
  .feature-panel { padding: 0; }
  .feature-shell, .feature-shell.wide, .feature-shell.editor { min-height: 100vh; border-radius: 0; }
  .agent-dialog { inset: 0; width: 100%; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* 管理员只读诊断与人工标签复核 */
.admin-shell { background: var(--color-cream); }
.admin-toolbar { display:flex; align-items:center; gap:var(--space-4); margin:var(--space-6) 0; color:var(--color-muted); }
.admin-toolbar button,.admin-review-card>button { border:1px solid var(--color-night); border-radius:var(--radius-sm); background:var(--color-night); color:var(--color-white); padding:10px 16px; cursor:pointer; }
.admin-toolbar button:disabled,.admin-review-card>button:disabled { opacity:.5; cursor:wait; }
.admin-service-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:var(--space-4); }
.admin-service-card,.admin-section,.admin-review-card { border:1px solid var(--color-line); border-radius:var(--radius-lg); background:var(--color-white); box-shadow:var(--shadow-card); }
.admin-service-card { padding:var(--space-5); display:flex; flex-direction:column; min-height:182px; }
.admin-service-card>div { display:flex; align-items:center; gap:var(--space-2); }
.admin-service-card h3 { margin:0; font-size:var(--text-md); color:var(--color-ink); }
.admin-service-card b { margin-left:auto; font-size:var(--text-sm); color:var(--color-muted); }
.admin-service-card p { flex:1; line-height:1.6; color:var(--color-copy); }
.admin-service-card footer { display:flex; justify-content:space-between; align-items:center; gap:var(--space-2); }
.admin-service-card footer small { color:var(--color-muted); }
.admin-service-card footer button { border:1px solid var(--color-line-strong); border-radius:var(--radius-sm); background:var(--color-white); color:var(--color-ink); padding:7px 10px; cursor:pointer; }
.admin-state-dot { width:10px; height:10px; flex:none; border-radius:50%; background:var(--color-muted); }
.admin-service-card[data-state="green"] .admin-state-dot { background:var(--color-success); }
.admin-service-card[data-state="yellow"] .admin-state-dot { background:var(--color-lime-hover); border:1px solid var(--color-night); }
.admin-service-card[data-state="red"] .admin-state-dot { background:var(--color-danger); }
.admin-service-card[data-state="red"] { border-color:#e7b7b0; }
.admin-service-card[data-state="green"] { border-color:#b9d9c1; }
.admin-missing { margin:0 0 var(--space-3); padding:8px 10px; border-radius:9px; background:#fff0ed; color:#9b372f; font-size:var(--text-sm); }
.admin-config-at { display:grid!important; align-items:start!important; gap:3px!important; margin:0 0 var(--space-3); padding:9px 10px; border-radius:9px; background:#f6f2f8; }
.admin-config-at strong { margin:0!important; color:var(--color-night); font-size:11px; }
.admin-config-at span { color:var(--color-copy); font-size:11px; line-height:1.5; }
.admin-queue-summary { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:var(--space-4); margin:0 0 var(--space-5); padding:14px 18px; border:1px solid var(--color-line); border-radius:var(--radius-md); background:var(--color-white); box-shadow:var(--shadow-card); }
.admin-queue-summary span { color:var(--color-ink); font-weight:800; }
.admin-queue-summary small { color:var(--color-muted); }
.admin-toolbar button.primary { background:var(--color-lime); color:var(--color-night); }
.admin-section h3 small { margin-left:8px; color:var(--color-muted); font-size:11px; font-weight:500; }
.admin-data-row[data-online="true"] strong { color:var(--color-success); }
.admin-data-row[data-online="false"] strong { color:var(--color-danger); }
.admin-config-form { margin-top:12px; padding:14px; border:1px solid var(--color-line); border-radius:var(--radius-md); background:#faf8fb; }
.admin-config-form>header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.admin-config-form>header div { display:grid; gap:3px; }
.admin-config-form>header small { color:var(--color-muted); }
.admin-config-form>header button { border:0; border-radius:9px; background:var(--color-night); color:white; padding:8px 12px; font-weight:800; cursor:pointer; }
.admin-config-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:12px; }
.admin-config-fields label { display:grid; gap:5px; color:var(--color-copy); font-size:11px; font-weight:800; }
.admin-config-fields input,.admin-config-fields select { min-width:0; height:40px; border:1px solid var(--color-line-strong); border-radius:9px; background:white; padding:0 10px; font:inherit; }
.admin-config-fields textarea{min-width:0;border:1px solid var(--color-line-strong);border-radius:9px;background:white;padding:10px;font:inherit;resize:vertical}.admin-config-fields .admin-config-wide{grid-column:1/-1}
.admin-section { margin-top:var(--space-6); padding:var(--space-5); }
.admin-section h3 { margin:0 0 var(--space-4); font-size:var(--text-lg); }
.admin-section>p { color:var(--color-muted); font-size:var(--text-sm); }
.admin-data-row { display:flex; justify-content:space-between; gap:var(--space-4); padding:var(--space-3) 0; border-top:1px solid var(--color-line); }
.admin-data-row span { color:var(--color-copy); text-align:right; }
.admin-review-notice { padding:var(--space-4); border:1px solid var(--color-line-strong); border-radius:var(--radius-sm); background:var(--color-lime-soft); color:var(--color-ink); line-height:1.6; }
.admin-review-list { display:grid; gap:var(--space-3); margin:var(--space-5) 0; }
.admin-review-card { display:grid; grid-template-columns:144px minmax(0,1fr) auto; gap:var(--space-4); align-items:center; padding:var(--space-3); }
.admin-review-thumb { width:144px; aspect-ratio:16/10; display:grid; place-items:center; overflow:hidden; border-radius:var(--radius-sm); background:var(--color-cream-deep); color:var(--color-muted); }
.admin-review-thumb img { width:100%; height:100%; object-fit:cover; }
.admin-review-card h3 { margin:0 0 var(--space-2); font-size:var(--text-md); overflow-wrap:anywhere; }
.admin-review-card p { margin:4px 0; color:var(--color-copy); }
.admin-review-card small { display:block; color:var(--color-muted); line-height:1.5; }
.tag-review-batch,.tag-review-history { margin-top:var(--space-4); padding:var(--space-4); }
.tag-review-batch h3,.tag-review-history h3 { margin:0 0 var(--space-3); }
.tag-review-batch h3 small { color:var(--color-muted); font-size:var(--text-sm); font-weight:400; }
.tag-review-batch>button { margin-top:var(--space-3); border:0; border-radius:var(--radius-sm); padding:10px 16px; background:var(--color-lime); color:var(--color-night); font-weight:800; cursor:pointer; }
.tag-review-batch>button:disabled { opacity:.45; cursor:not-allowed; }
.tag-review-batch>small { display:block; margin-top:var(--space-2); color:var(--color-muted); }
.tag-review-batch .admin-data-row button,.tag-review-history .admin-data-row button { border:1px solid var(--color-line-strong); border-radius:var(--radius-sm); padding:7px 10px; background:var(--color-white); color:var(--color-ink); cursor:pointer; }
.admin-review-actions button { border:1px solid var(--color-line-strong); border-radius:var(--radius-sm); padding:8px 10px; background:var(--color-white); color:var(--color-ink); cursor:pointer; }
.admin-review-actions button:last-child { background:var(--color-night); color:var(--color-lime); }
@media(max-width:760px){.admin-review-card{grid-template-columns:90px minmax(0,1fr)}.admin-review-thumb{width:90px}.admin-review-card>button{grid-column:1/-1}.admin-data-row{display:block}.admin-data-row span{display:block;text-align:left;margin-top:4px}.admin-config-fields{grid-template-columns:1fr}.admin-queue-summary{grid-template-columns:1fr}.admin-config-form>header{align-items:flex-start;flex-direction:column}.admin-config-form>header button{width:100%}}
.directory-tree-row{display:flex;align-items:center;padding-left:calc(var(--directory-depth,0)*16px)}
.directory-tree-row [data-directory]{flex:1;min-width:0}
.directory-tree-row .directory-tree-toggle{flex:0 0 24px;width:24px;padding:4px;background:transparent;color:inherit;border:0;cursor:pointer}
.directory-tree-children[hidden]{display:none}
.directory-tree-heading{display:block;padding:10px 12px 4px;color:var(--color-muted);font-size:11px}
