:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --page-bg: #F4F7FB;
  --sidebar-bg: #0F2B5B;
  --sidebar-active: #1E40AF;
  --card-bg: #FFFFFF;
  --border: #E2E8F0;
  --text: #1E293B;
  --text-sub: #64748B;
  --danger: #DC2626;
  --success: #16A34A;
  --warning: #D97706;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif; color: var(--text); background: var(--page-bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; }
.muted, .card-desc { color: var(--text-sub); font-size: 12px; }
.card-desc { margin: 6px 0 0; }
.grow { flex: 1; min-width: 0; }
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0F2B5B 0%, #1E40AF 100%); }
.login-card { width: 360px; max-width: calc(100vw - 48px); background: #fff; border-radius: 14px; box-shadow: 0 16px 48px rgba(2,12,32,.35); padding: 32px 28px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 18px; font-weight: 600; }
.login-brand svg { width: 24px; height: 24px; color: var(--primary); }
.login-sub { text-align: center; font-size: 12px; color: var(--text-sub); margin: 8px 0 18px; }
.login-error { margin-bottom: 12px; padding: 9px 12px; border-radius: 8px; background: #FEF2F2; border: 1px solid #FECACA; color: var(--danger); font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 8px; }
.login-form label { font-size: 13px; color: var(--text-sub); }
.login-form .text-input { height: 38px; margin-top: 2px; }
.login-btn { margin-top: 10px; justify-content: center; height: 40px; }
.login-foot { margin-top: 16px; text-align: center; font-size: 12px; color: var(--text-sub); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 220px; background: var(--sidebar-bg); color: #fff; display: flex; flex-direction: column; z-index: 20; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; font-size: 16px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar-brand svg { width: 22px; height: 22px; }
.sidebar-nav { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,.82); text-decoration: none; transition: background .12s ease; }
.nav-item svg { width: 20px; height: 20px; flex: none; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.sidebar-foot { margin-top: auto; padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.62); font-size: 12px; }
.logout-link { display: inline-flex; align-items: center; gap: 5px; color: rgba(255,255,255,.78); text-decoration: none; margin-bottom: 6px; }
.logout-link:hover { color: #fff; }
.main { margin-left: 220px; min-height: 100vh; padding: 24px; }
.main > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.main > * + * { margin-top: 16px; }
.page-header { display: flex; align-items: center; justify-content: space-between; }
.page-header h1 { margin: 0; font-size: 24px; line-height: 1.3; }
.page-header-note { color: var(--text-sub); font-size: 12px; }
.system-banner { display: flex; align-items: center; gap: 18px; padding: 9px 14px; border: 1px solid #D8E5F5; border-radius: 8px; background: #EDF4FC; color: #527095; font-size: 12px; }
.system-banner span + span { position: relative; }
.system-banner span + span::before { content: "·"; margin-right: 18px; color: #A0B5CD; }
.system-banner .local-note { margin-left: auto; color: var(--primary); }
.system-banner .local-note::before { display: none; }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 3px rgba(15,43,91,.08); overflow: hidden; }
.card + .card { margin-top: 16px; }
.card-block { padding: 20px 24px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { margin: 0; font-size: 15px; font-weight: 600; }
.section-title { margin: 18px 0 10px; font-size: 13px; }
.autosave-note { color: var(--text-sub); font-size: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 14px; cursor: pointer; transition: all .12s ease; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #B91C1C; border-color: #B91C1C; color: #fff; }
.icon-btn { width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--text-sub); font-size: 20px; }
.icon-btn:hover { background: var(--primary-light); color: var(--primary); }
.text-input { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); outline: none; }
.text-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
textarea.text-input { resize: vertical; line-height: 1.6; }
.number-input { max-width: 92px; }
.inline-field { display: inline-flex; align-items: center; gap: 7px; color: var(--text-sub); font-size: 12px; }
.form-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.form-row > label { width: 110px; color: var(--text-sub); flex: none; }
.form-row.top-aligned { align-items: flex-start; }
.form-row.top-aligned > label { padding-top: 8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.sub-toolbar { margin-top: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { padding: 7px 16px; border-radius: 8px; background: var(--card-bg); border: 1px solid var(--border); color: var(--text); }
.tab:hover { border-color: var(--primary); color: var(--primary); }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.check-label { display: inline-flex; align-items: center; gap: 7px; }
.check-label input, .compose-talks input, .material-select input, .style-enabled input { width: 15px; height: 15px; accent-color: var(--primary); }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-ui { position: absolute; inset: 0; border-radius: 999px; background: #CBD5E1; transition: background .12s ease; cursor: pointer; }
.switch-ui::before { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .12s ease; box-shadow: 0 1px 2px rgba(15,43,91,.2); }
.switch input:checked + .switch-ui { background: var(--primary); }
.switch input:checked + .switch-ui::before { transform: translateX(18px); }
.setting-row { display: flex; align-items: flex-start; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: 0; }
.setting-row strong { font-weight: 600; }
.badge, .badge-muted, .badge-success, .badge-warning { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--primary-light); color: var(--primary); font-size: 11px; font-weight: 600; }
.badge-success { background: #F0FDF4; color: var(--success); border: 1px solid #BBF7D0; }
.badge-warning { background: #FFF7ED; color: var(--warning); border: 1px solid #FED7AA; }
.badge-muted { background: #F1F5F9; color: var(--text-sub); }
.material-list { display: flex; flex-direction: column; gap: 8px; }
.material-row { display: grid; grid-template-columns: auto 64px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.material-row:hover { background: #F8FAFE; }
.material-thumb { width: 64px; height: 82px; object-fit: cover; border-radius: 6px; background: #E7EDF5; }
.material-main { min-width: 0; }
.material-name { display: flex; align-items: center; gap: 8px; }
.material-name .text-input { height: 30px; min-height: 30px; padding: 3px 7px; border-color: transparent; background: transparent; font-weight: 600; }
.material-name .text-input:focus { border-color: var(--border); background: #fff; box-shadow: none; }
.material-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; color: var(--text-sub); font-size: 12px; }
.material-actions { display: flex; align-items: center; gap: 6px; }
.material-select { display: flex; align-items: center; justify-content: center; }
.clip-card { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.clip-card .material-select { position: absolute; top: 7px; left: 7px; width: 22px; height: 22px; border-radius: 5px; background: rgba(255,255,255,.9); }
.clip-card img { display: block; width: 100%; height: 150px; object-fit: cover; background: #E7EDF5; }
.clip-card-body { padding: 7px 8px; }
.clip-card-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.clip-card-meta { color: var(--text-sub); font-size: 11px; margin-top: 2px; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.28); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: 560px; max-width: 92vw; display: flex; flex-direction: column; background: #fff; box-shadow: -12px 0 36px rgba(15,23,42,.16); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.drawer-header h2 { margin: 0; font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.drawer-footer { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--border); }
.slot-card { padding: 12px 0; border-bottom: 1px solid var(--border); }
.slot-card:last-child { border-bottom: 0; }
.slot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.slot-time { color: var(--text-sub); font: 12px Consolas, monospace; }
.slot-text { margin: 7px 0; line-height: 1.65; }
.slot-card select { max-width: 150px; }
.timeline-drawer { width: min(1180px, 96vw); }
.drawer-player { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #0F172A; }
.drawer-player video { display: block; width: 100%; max-height: 310px; margin: 0 auto; border-radius: 8px; background: #0F172A; }
.timeline-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 14px 0 10px; color: var(--text-sub); font-size: 12px; }
.timeline-toolbar .inline-field { min-width: 210px; }
.timeline-toolbar .text-input { width: 130px; min-height: 30px; height: 30px; padding: 3px 7px; font-size: 12px; }
.timeline-editor { border: 1px solid var(--border); border-radius: 10px; background: #F8FAFE; overflow: hidden; }
.time-ruler { position: relative; height: 30px; margin-left: 76px; border-bottom: 1px solid var(--border); background: #fff; }
.time-mark { position: absolute; top: 0; bottom: 0; color: var(--text-sub); font: 10px Consolas, monospace; }
.time-mark i { display: block; width: 1px; height: 8px; background: #B7C5D8; }
.time-mark em { display: block; margin-top: 2px; margin-left: 3px; font-style: normal; }
.timeline-row { display: grid; grid-template-columns: 76px 1fr; border-bottom: 1px solid var(--border); }
.timeline-row:last-child { border-bottom: 0; }
.track-name { display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--border); background: #fff; color: var(--text-sub); font-size: 12px; font-weight: 600; }
.track { position: relative; height: 58px; background: #fff; overflow: hidden; }
.patch-track { height: 112px; cursor: copy; }
.sentence-segment { position: absolute; top: 11px; height: 36px; min-width: 3px; padding: 4px 5px; border: 1px solid #BFDBFE; border-radius: 6px; background: var(--primary-light); color: var(--primary); overflow: hidden; font-size: 10px; line-height: 1.3; }
.sentence-segment.empty { border-color: #D9E2EC; background: #EDF1F5; color: #8392A5; }
.sentence-segment span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-block { position: absolute; top: 9px; height: 92px; z-index: 3; min-width: 34px; padding: 8px 10px; border: 2px solid #1D4ED8; border-radius: 8px; background: #2563EB; color: #fff; box-shadow: 0 3px 10px rgba(37,99,235,.22); cursor: grab; user-select: none; overflow: visible; }
.slot-block:active { cursor: grabbing; }
.slot-block.playing { border-color: #F59E0B; background: #D97706; box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.slot-block.warning { border-color: #D97706; background: #F59E0B; color: #422006; }
.slot-title { width: max-content; min-width: 170px; padding-right: 22px; overflow: visible; white-space: nowrap; font-size: 11px; font-weight: 700; pointer-events: auto; cursor: text; }
.slot-source { width: max-content; min-width: 170px; margin-top: 3px; overflow: visible; white-space: nowrap; font-size: 10px; opacity: .88; pointer-events: none; }
.slot-delete { position: absolute; top: 3px; right: 4px; z-index: 5; width: 19px; height: 19px; border: 0; border-radius: 50%; background: rgba(255,255,255,.24); color: #fff; line-height: 17px; cursor: pointer; }
.slot-delete:hover { background: rgba(220,38,38,.9); }
.slot-handle { position: absolute; top: 0; bottom: 0; z-index: 4; width: 8px; cursor: ew-resize; }
.slot-handle.left { left: 0; border-radius: 6px 0 0 6px; }
.slot-handle.right { right: 0; border-radius: 0 6px 6px 0; }
.slot-handle:hover { background: rgba(255,255,255,.22); }
.slot-hover-preview { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; display: none; width: 132px; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-sub); box-shadow: 0 10px 28px rgba(15,43,91,.18); overflow: hidden; }
.slot-hover-preview img { width: 100%; height: 148px; object-fit: cover; }
.slot-hover-empty { display: grid; place-items: center; width: 100%; height: 148px; font-size: 11px; }
.slot-hover-reason { padding: 6px 8px; color: var(--text); font-size: 10px; line-height: 1.45; word-break: break-all; }
.slot-block:hover .slot-hover-preview { display: flex; }
.playhead { position: absolute; top: 0; bottom: 0; z-index: 8; width: 2px; margin-left: -1px; background: #EF4444; pointer-events: none; }
.playhead::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: #EF4444; }
.range-ghost { position: absolute; top: 8px; height: 94px; z-index: 2; border: 1px dashed var(--primary); border-radius: 8px; background: rgba(37,99,235,.16); pointer-events: none; }
.pool-modal-card { width: min(720px, 94vw); }
.slot-advanced { margin: 10px 0; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 8px; }
.slot-advanced summary { color: var(--text-sub); font-size: 12px; cursor: pointer; }
.slot-advanced .form-row { margin: 8px 0 2px; }
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 10px; margin-top: 12px; }
.clip-search { width: 220px; height: 32px; min-height: 32px; padding: 3px 8px; font-size: 12px; }
.clip-thumb-empty { display: block; width: 100%; height: 150px; background: #E7EDF5; }
.clip-card-body input.text-input { width: 100%; min-height: 26px; height: 26px; padding: 2px 6px; font-size: 11px; }
.clip-edit-desc { width: 100%; min-height: 44px; margin-top: 5px; padding: 3px 6px; font-size: 11px; line-height: 1.5; resize: vertical; }
.clip-pool { display: grid; grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); gap: 8px; max-height: 320px; margin: 4px 0 8px; padding: 2px; overflow-y: auto; }
.pool-clip { display: flex; flex-direction: column; padding: 0; border: 2px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; text-align: left; cursor: pointer; }
.pool-clip:hover { border-color: var(--primary); }
.pool-clip.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.pool-clip img, .pool-clip .clip-thumb-empty { width: 100%; height: 110px; object-fit: cover; }
.pool-clip-name { padding: 5px 7px 0; font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-clip-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding: 0 7px 6px; color: var(--text-sub); font-size: 10px; overflow: hidden; }
.pool-empty { grid-column: 1 / -1; padding: 24px; }
.record-skip { color: var(--warning); font-weight: 600; }
.empty-card { padding: 42px 20px; text-align: center; color: var(--text-sub); border: 1px dashed var(--border); border-radius: 8px; }
.compose-talks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.compose-talk { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; }
.compose-talk.disabled { opacity: .5; }
.compose-talk span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-talk small { color: var(--text-sub); }
.batch-progress { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 30px; }
.progress { height: 8px; margin-top: 8px; border-radius: 999px; background: var(--primary-light); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 999px; background: var(--primary); transition: width .25s ease; }
.batch-current { margin-top: 10px; padding: 9px 11px; border-radius: 8px; background: #F6F9FD; color: var(--text-sub); font-size: 12px; }
.batch-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 10px 0; }
.batch-stat { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #FAFCFF; }
.batch-stat span { display: block; color: var(--text-sub); font-size: 11px; }
.batch-stat strong { display: block; margin-top: 2px; font-size: 13px; }
.batch-items { display: flex; flex-direction: column; gap: 7px; max-height: 320px; overflow-y: auto; }
.batch-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: start; padding: 8px 9px; border: 1px solid var(--border); border-radius: 8px; }
.batch-item-name { font-size: 12px; }
.batch-item-summary { color: var(--text-sub); font-size: 11px; margin-top: 2px; }
.batch-item-error { color: var(--danger); font-size: 11px; margin-top: 3px; }
.status-text-success { color: var(--success); }
.status-text-pending { color: var(--primary); }
.status-text-error { color: var(--danger); }
.settings-card { overflow: visible; }
.settings-summary { display: flex; align-items: center; gap: 10px; padding: 16px 24px; cursor: pointer; list-style: none; user-select: none; }
.settings-summary::-webkit-details-marker { display: none; }
.settings-summary::before { content: "›"; color: var(--text-sub); font-size: 22px; line-height: 1; transition: transform .12s ease; }
.settings-card[open] .settings-summary::before { transform: rotate(90deg); }
.settings-card[open] .settings-summary { border-bottom: 1px solid var(--border); }
.settings-summary .autosave-note { margin-left: auto; }
.style-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.style-card { padding: 11px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.style-card.disabled { background: #F8FAFC; opacity: .68; }
.style-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.style-card-head strong { font-size: 13px; }
.style-enabled { display: inline-flex; align-items: center; gap: 5px; color: var(--text-sub); font-size: 11px; }
.style-preview { display: grid; place-items: center; height: 56px; margin-bottom: 9px; border-radius: 6px; background: #172C49; overflow: hidden; text-align: center; padding: 6px; }
.style-preview.overlay { background: #EEF2F6; }
.style-basic-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.style-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 8px; }
.style-field { display: flex; align-items: center; gap: 5px; color: var(--text-sub); font-size: 11px; min-width: 0; }
.style-field > span { flex: none; }
.style-field.full { grid-column: 1 / -1; }
.style-field .text-input { min-height: 28px; height: 28px; padding: 3px 6px; font-size: 11px; }
.color-control { display: flex; align-items: center; gap: 5px; min-width: 0; }
.color-swatch { width: 30px; height: 28px; flex: none; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; }
.color-control .color-hex { width: 74px; min-width: 0; font-family: Consolas, monospace; text-transform: uppercase; }
.color-suffix { color: var(--text-sub); font-size: 10px; }
.style-advanced { margin-top: 9px; }
.style-advanced > summary { width: max-content; color: var(--text-sub); font-size: 11px; cursor: pointer; }
.style-advanced > summary:hover { color: var(--primary); }
.disclaimer-row { margin-top: 14px; }
.disclaimer-row .inline-field { margin-top: 6px; }
.asr-config { margin-bottom: 14px; padding: 10px 12px; border: 1px solid #D8E5F5; border-radius: 8px; background: #F5F9FE; color: var(--text-sub); font-size: 12px; word-break: break-all; }
.clip-delete { position: absolute; top: 6px; right: 6px; z-index: 2; width: 25px; height: 25px; border-radius: 5px; background: rgba(255,255,255,.92); font-size: 16px; }
.delete-card { width: min(600px,94vw); }
.delete-summary { margin: 0 0 10px; font-weight: 600; }
.delete-history { max-height: 180px; overflow-y: auto; margin-bottom: 12px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; background: #F8FAFC; color: var(--text-sub); font-size: 12px; }
.delete-history-row { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.delete-history-row span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delete-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.delete-default { border-color: var(--primary); color: var(--primary); }
.records-toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.record-item.file-deleted { background: #F8FAFC; }
.record-item.file-deleted .record-thumb { background: #EDF1F5; box-shadow: inset 0 0 0 1px var(--border); }
.record-item.file-deleted .record-title, .record-item.file-deleted .record-meta, .record-item.file-deleted .record-recipe { color: #94A3B8; }
.record-deleted-note { color: var(--text-sub); font-weight: 600; }
.record-group { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 3px rgba(15,43,91,.08); overflow: hidden; }
.record-group + .record-group { margin-top: 16px; }
.record-group-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--border); background: #F8FAFE; }
.record-group-head h2 { margin: 0; font-size: 15px; }
.record-group-head span { color: var(--text-sub); font-size: 12px; }
.record-list { display: flex; flex-direction: column; }
.record-item { display: grid; grid-template-columns: 86px 1fr auto; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.record-item:last-child { border-bottom: 0; }
.record-thumb { width: 86px; height: 118px; object-fit: cover; border-radius: 6px; background: #E7EDF5; }
.record-title { font-weight: 600; }
.record-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 5px; color: var(--text-sub); font-size: 12px; }
.record-recipe { margin-top: 6px; color: var(--text-sub); font-size: 12px; line-height: 1.65; }
.record-actions { display: flex; align-items: center; gap: 6px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; background: rgba(15,23,42,.42); }
.modal-card { width: min(680px,94vw); max-height: 90vh; overflow: auto; padding: 18px; border-radius: 10px; background: #fff; box-shadow: 0 18px 54px rgba(15,23,42,.25); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-header h2 { margin: 0; font-size: 17px; }
.player-card video { display: block; width: 100%; max-height: 66vh; background: #0F172A; border-radius: 8px; }
.log-card { width: min(980px,95vw); }
.log-card pre { max-height: 66vh; overflow: auto; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #F8FAFC; color: var(--text); font: 11px/1.65 Consolas,monospace; white-space: pre-wrap; word-break: break-all; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translateX(-50%); max-width: 72vw; padding: 10px 16px; border: 1px solid #BFDBFE; border-radius: 8px; background: #EFF6FF; color: var(--primary); box-shadow: 0 6px 20px rgba(15,43,91,.14); font-size: 13px; }
.toast.error { border-color: #FECACA; background: #FEF2F2; color: var(--danger); }
@media (max-width: 1100px) {
  .sidebar { width: 190px; }
  .main { margin-left: 190px; padding: 18px; }
  .style-grid { grid-template-columns: 1fr; }
  .compose-talks { grid-template-columns: 1fr; }
  .record-item { grid-template-columns: 72px 1fr; }
  .record-thumb { width: 72px; height: 100px; }
  .record-actions { grid-column: 2; }
}

/* 标签分组（切片库分类体系） */
.tag-group { margin-bottom: 18px; }
.tag-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; margin-bottom: 8px;
  background: #f1f5fb; border: 1px solid #dbe4f0; border-radius: 10px;
  font-weight: 600; color: #1f3b63;
}
.tag-group-header.warning { background: #fff8e1; border-color: #f0d98c; color: #8a6d1a; }
.tag-group-title { display: flex; align-items: center; gap: 8px; }
.tag-count { font-size: 12px; font-weight: 400; color: #7a8aa0; }
.tag-src-badge {
  font-size: 11px; font-weight: 400; padding: 1px 7px; border-radius: 8px;
  background: #e3edff; color: #2f5fb3; border: 1px solid #c4d8f7;
}
.tag-missing {
  font-size: 11px; padding: 1px 7px; border-radius: 8px;
  background: #ffe9a8; color: #8a6d1a; border: 1px solid #f0d98c;
}
.tag-group-actions { display: flex; gap: 6px; }
.btn-small { padding: 2px 10px; font-size: 12px; }
.clip-tag-select { margin-top: 6px; font-size: 12px; padding: 3px 6px; }
.clip-card[draggable="true"] { cursor: grab; }
.drop-highlight { outline: 2px dashed #2f6fed; outline-offset: 2px; background: #eaf1ff; border-radius: 10px; }

/* A版半自动定稿：剪映式时间轴 */
.timeline-editor { overflow-x: auto; overflow-y: hidden; position: relative; }
.time-ruler, .sentence-track, .patch-track { position: relative; min-width: 100%; }
.slot-block.selected { outline: 2px solid #2f6fed; outline-offset: 1px; z-index: 3; }
.slot-upload {
  position: absolute; top: 2px; right: 22px; width: 18px; height: 18px;
  border: none; border-radius: 4px; background: #2f6fed; color: #fff;
  font-size: 12px; line-height: 18px; cursor: pointer; padding: 0;
}
.slot-tag-input { width: 90px; font-size: 12px; padding: 1px 4px; }
.slot-tag-text { font-weight: 600; }

/* 公共库与上传入口 */
.pool-section { margin-bottom: 18px; }
.pool-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; margin-bottom: 8px;
  background: #eef3fa; border: 1px solid #d5e0ef; border-radius: 10px;
  font-weight: 600; color: #1f3b63;
}
.pool-title { display: flex; align-items: center; gap: 10px; }
.drop-zone {
  border: 2px dashed #9db8dd; border-radius: 12px; background: #f6f9fe;
  padding: 26px 18px; text-align: center; color: #31527e;
  display: flex; flex-direction: column; gap: 6px;
}
.drop-zone.drop-highlight { background: #e4efff; border-color: #2f6fed; }
.upload-progress {
  background: #f4f8ff; border: 1px solid #cfdef5; border-radius: 10px;
  padding: 8px 12px; margin-bottom: 12px; font-size: 13px; color: #2b4a74;
  display: flex; flex-direction: column; gap: 3px;
}

/* 归库询问卡 */
.inquiry-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fffaf0; border: 1px solid #f0d98c; border-radius: 12px;
  padding: 10px 12px; margin-bottom: 10px;
}
.inquiry-card img { width: 72px; height: 128px; object-fit: cover; border-radius: 8px; }
.inquiry-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.inquiry-name { font-weight: 600; color: #1f3b63; }
.inquiry-headline { font-size: 13px; color: #7a5b12; }
.inquiry-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* 标签管理弹窗 */
.similar-hint {
  background: #fff8e1; border: 1px solid #f0d98c; border-radius: 8px;
  padding: 8px 10px; margin: 8px 0; font-size: 13px; color: #8a6d1a;
}
.merge-source-list {
  display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 180px; overflow-y: auto;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 8px 10px;
}
.merge-source-item { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.merge-ai { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.merge-ai-group {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #f4f8ff; border: 1px solid #cfdef5; border-radius: 8px;
  padding: 6px 10px; margin-bottom: 6px; font-size: 13px;
}

/* A版定稿V3：中央弹窗详情 */
body.modal-open { overflow: hidden; }
.drawer-dim { position: fixed; inset: 0; background: rgba(10, 24, 48, .55); z-index: 60; display: flex; align-items: center; justify-content: center; }
.talk-modal {
  width: 88vw; max-width: 1400px; max-height: 88vh;
  background: #fff; border-radius: 14px; box-shadow: 0 18px 60px rgba(8, 20, 45, .35);
  display: flex; flex-direction: column; overflow: hidden;
}
.talk-modal .drawer-body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.talk-modal .drawer-player video { max-height: 46vh; }
@media (max-width: 900px) {
  .talk-modal { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; }
}

/* 口播脚本轨道（只读台词） */
.script-track { height: 44px; position: relative; background: #fff; }
.script-segment {
  position: absolute; top: 5px; height: 34px; padding: 0 6px;
  background: #EAF2FF; border: 1px solid #C7DBFB; border-radius: 6px;
  font-size: 11px; color: #2B4A74; line-height: 32px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer;
}
.script-segment:hover { background: #D8E8FF; }
.script-segment.playing { background: #2F6FED; color: #fff; border-color: #2F6FED; }
.script-empty { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #B45309; font-size: 12px; }

/* 素材库左右结构 */
.clips-layout { display: flex; gap: 14px; align-items: flex-start; }
.clip-sidebar {
  width: 168px; flex-shrink: 0; max-height: 62vh; overflow-y: auto;
  background: #F4F8FF; border: 1px solid #D5E0EF; border-radius: 10px; padding: 6px;
  display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0;
}
.sidebar-item {
  display: flex; align-items: center; gap: 6px; padding: 7px 10px;
  border: none; border-radius: 8px; background: transparent; cursor: pointer;
  font-size: 13px; color: #31527E; text-align: left;
}
.sidebar-item:hover { background: #E4EFFF; }
.sidebar-item.active { background: #2F6FED; color: #fff; }
.sidebar-item.active .sidebar-count { color: #D8E8FF; }
.sidebar-item.warning { color: #8A6D1A; }
.sidebar-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-count { font-size: 11px; color: #7A8AA0; }
.clip-content { flex: 1; min-width: 0; }
.clip-detail-head { display: flex; align-items: center; gap: 10px; padding: 6px 2px 10px; }
.clip-detail-head strong { color: #1F3B63; }
.clip-list-mode { display: flex; flex-direction: column; gap: 6px; }
.clip-list-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.clip-list-row .clip-row-thumb { width: 40px; height: 64px; object-fit: cover; border-radius: 6px; background: #E8EEF7; flex-shrink: 0; }
.clip-list-row .clip-row-name { flex: 1; min-width: 120px; }
.clip-list-row .clip-row-meta { font-size: 12px; color: #7A8AA0; white-space: nowrap; }
.clip-list-row .clip-row-tag { width: 110px; }

/* 口播宫格 */
.material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.material-card { border: 1px solid #D5E0EF; border-radius: 12px; overflow: hidden; background: #fff; position: relative; }
.material-card .material-card-thumb { width: 100%; aspect-ratio: 9/12; object-fit: cover; background: #E8EEF7; display: block; }
.material-card-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.material-card .material-select { position: absolute; top: 8px; left: 8px; z-index: 2; }

/* A版V4：状态点、缺素材圆点、批量管理、公共库工具栏 */
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 2px; }
.status-dot.ok { background: #16A34A; box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.status-dot.bad { background: #DC2626; box-shadow: 0 0 0 3px rgba(220,38,38,.18); }
.missing-dot { width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; flex-shrink: 0; }
.sidebar-item.manage { cursor: default; }
.sidebar-item.manage input { margin: 0; }
.sidebar-manage { margin-bottom: 4px; width: 100%; }
.sidebar-actionbar {
  display: flex; flex-direction: column; gap: 4px; margin-top: 6px;
  border-top: 1px solid #D5E0EF; padding-top: 6px; font-size: 12px; color: #31527E;
}
.sidebar-actionbar .btn-small { width: 100%; text-align: center; }
.pool-toolbar { display: flex; align-items: center; gap: 12px; }

/* A版V5：全局上传面板 / 记忆存档 / 脚本轨道静音段 */
.upload-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  width: 320px; background: #fff; border: 1px solid #C7DBFB; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(8,20,45,.2); overflow: hidden;
}
.upload-panel-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: #2F6FED; color: #fff; cursor: default;
}
.upload-panel-head strong { flex: 0 0 auto; }
.upload-panel-head .muted { flex: 1; font-size: 11px; color: #D8E8FF; }
.upload-panel-head .icon-btn { color: #fff; }
.upload-panel-body { max-height: 40vh; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.upload-task { border: 1px solid #E3ECF8; border-radius: 8px; padding: 6px 8px; }
.upload-task-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.upload-task-name { font-weight: 600; color: #1F3B63; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upload-task-target { color: #7A8AA0; font-size: 11px; white-space: nowrap; }
.upload-task-bar { height: 5px; background: #EAF1FB; border-radius: 3px; margin: 5px 0; overflow: hidden; }
.upload-task-bar i { display: block; height: 100%; background: #2F6FED; transition: width .2s; }
.upload-task-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #31527E; }

.script-segment.silence { background: #F1F5F9; border-color: #D5E0EF; color: #94A3B8; font-style: italic; cursor: default; }
.script-segment.unclear { background: #FFF7E6; border-color: #F0D98C; color: #B45309; }
.modal-card-mini { max-width: 360px; }
.memory-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.memory-row { border: 1px solid #E3ECF8; border-radius: 8px; padding: 8px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.memory-time { color: #94A3B8; font-size: 11px; }
.memory-diff { color: #2B4A74; }

/* A版V6：挨个归库行 */
.manual-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.manual-thumb { width: 40px; height: 64px; object-fit: cover; border-radius: 6px; }
.manual-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* 我的记忆（账号记忆库 V1） */
.memory-page .tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.memory-page .tab { border: 1px solid #D7E4F5; background: #F4F8FD; color: #2B4A74; border-radius: 8px; padding: 6px 18px; cursor: pointer; font-size: 13px; }
.memory-page .tab.active { background: #2F6FED; border-color: #2F6FED; color: #fff; }
.memory-record-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.memory-record-meta { color: #64748B; font-size: 11px; }
.memory-record-sentence { color: #475569; font-size: 12px; background: #F4F8FD; border-radius: 6px; padding: 4px 8px; }
.memory-record-actions { display: flex; gap: 6px; margin-top: 4px; }
.memory-record-detail { border-top: 1px dashed #D7E4F5; margin-top: 6px; padding-top: 6px; }
.memory-result { font-size: 11px; border-radius: 10px; padding: 1px 8px; }
.memory-result-adopt { background: #E3F5E9; color: #17713A; }
.memory-result-modified { background: #FFF3D6; color: #96660A; }
.memory-result-reject { background: #FDE3E3; color: #B3261E; }
.memory-result-manual { background: #E3ECF8; color: #2B4A74; }
.memory-disabled-tag { font-size: 11px; color: #94A3B8; border: 1px dashed #CBD5E1; border-radius: 10px; padding: 1px 8px; }
.memory-diff-full { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0; }
.memory-diff-full > div { background: #F4F8FD; border-radius: 8px; padding: 8px 10px; }
.memory-diff-full p { margin: 4px 0 0; color: #2B4A74; word-break: break-all; }

/* 识别召回提升：详情面板三组清单 */
.recog-panel { border-top: 1px solid #E3ECF8; padding: 10px 18px 16px; max-height: 34vh; overflow-y: auto; }
.recog-metrics { font-size: 12px; color: #2B4A74; background: #F4F8FD; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; }
.recog-columns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.recog-col h3, .recog-panel h3 { font-size: 13px; color: #2B4A74; margin: 8px 0 6px; }
.recog-list { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.recog-item { border: 1px solid #E3ECF8; border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; gap: 3px; }
.recog-actions { display: flex; gap: 6px; margin-top: 2px; }

/* AI 纠偏教练 */
.coach-tab { position: absolute; right: 0; top: 46%; z-index: 5; writing-mode: vertical-lr; padding: 10px 5px; border: 1px solid #D7E4F5; border-right: none; border-radius: 8px 0 0 8px; background: #2F6FED; color: #fff; cursor: pointer; font-size: 12px; }
.coach-panel { position: absolute; right: 0; top: 0; bottom: 0; width: 300px; z-index: 6; background: #F8FBFF; border-left: 1px solid #D7E4F5; padding: 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.coach-panel-head { display: flex; justify-content: space-between; align-items: center; }
.coach-context { font-size: 12px; color: #2B4A74; background: #EAF2FD; border-radius: 8px; padding: 6px 8px; word-break: break-all; }
.coach-actions { display: flex; flex-direction: column; gap: 6px; }
.coach-status { font-size: 12px; }
.talk-modal { position: relative; }
.script-segment.selected { outline: 2px solid #2F6FED; outline-offset: -1px; }
.coach-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.coach-col { background: #F4F8FD; border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.coach-col h4 { margin: 0 0 4px; color: #2B4A74; font-size: 12px; }
.coach-col p { margin: 0; word-break: break-all; }
.coach-impact { grid-column: 1 / -1; font-size: 12px; color: #96660A; background: #FFF3D6; border-radius: 8px; padding: 5px 10px; }
.coach-reason { font-size: 12px; color: #334155; border-top: 1px dashed #D7E4F5; padding-top: 8px; line-height: 1.7; }
.coach-edit { border-top: 1px dashed #D7E4F5; margin-top: 8px; padding-top: 8px; }
