:root {
  --ink: #1b2421;
  --ink-soft: #52605a;
  --muted: #87918c;
  --paper: #f5f7f3;
  --surface: #ffffff;
  --line: #e2e7e1;
  --dark: #18211f;
  --dark-2: #24302c;
  --coral: #e77258;
  --coral-soft: #fbe8e1;
  --teal: #2c8273;
  --teal-soft: #dff0eb;
  --yellow: #efbd55;
  --yellow-soft: #fff3d7;
  --shadow: 0 12px 32px rgba(20, 36, 31, .06);
  --radius: 10px;
  --sans: "Manrope", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); font-family: var(--sans); }
body { font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 15% 10%, #344840 0, #18211f 44%, #101715 100%); color: #edf3ee; }
.auth-screen[hidden] { display: none; }
.auth-card { width: min(410px, 100%); padding: 31px; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; background: rgba(255,255,255,.06); box-shadow: 0 28px 90px rgba(0,0,0,.28); backdrop-filter: blur(10px); }
.auth-brand { padding: 0 0 42px; }
.auth-kicker { color: #7bc5a8; font-family: var(--mono); letter-spacing: .13em; font-size: 9px; }
.auth-card h1 { font-size: 29px; margin-top: 12px; color: #f7faf8; }
.auth-card > p { color: #a9b8af; font-size: 11px; margin-top: 9px; }
.auth-form { display: grid; gap: 13px; margin-top: 28px; }
.auth-form .field-label { color: #aebcb3; }
.auth-form .field-label input { min-height: 42px; border-color: rgba(255,255,255,.17); background: rgba(0,0,0,.14); color: #fff; }
.auth-form .field-label input::placeholder { color: #7e9086; }
.auth-form .btn { min-height: 42px; }
.login-error { color: #f3a38c; font-size: 10px; }
.auth-foot { display: flex; align-items: center; gap: 7px; margin-top: 28px; color: #81948a; font-size: 9px; }
.icon { width: 18px; height: 18px; stroke-width: 1.8; flex: 0 0 auto; }
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.mono { font-family: var(--mono); letter-spacing: .01em; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 244px; flex: 0 0 244px; background: var(--dark); color: #e9eeea; padding: 26px 14px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30; }
.sidebar-scrim { display: none; }
.brand-lockup { display: flex; gap: 11px; align-items: center; padding: 0 10px 28px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: var(--coral); color: #fff8f4; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.brand-name { font-weight: 800; font-size: 15px; letter-spacing: 0; }
.brand-caption { margin-top: 3px; color: #8f9c96; font-size: 9px; letter-spacing: .16em; font-family: var(--mono); }
.workspace-switcher { position: relative; padding: 0 7px 24px; border-bottom: 1px solid rgba(255,255,255,.09); }
.eyebrow, .section-kicker, .overline { color: #96a39d; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.workspace-select { width: 100%; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.06); color: #eef2ef; display: flex; align-items: center; gap: 9px; padding: 10px 9px; border-radius: 8px; margin-top: 8px; text-align: left; }
.workspace-select:hover { background: rgba(255,255,255,.1); }
.company-avatar, .profile-avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; font-weight: 800; font-size: 13px; flex: 0 0 auto; }
.company-avatar { background: #e7b85a; color: #38270f; }
.workspace-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.workspace-copy strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy small { color: #96a39d; font-size: 10px; }
.workspace-menu { display: none; position: absolute; z-index: 12; left: 7px; right: 7px; top: 80px; background: #2a3631; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 6px; box-shadow: 0 20px 40px rgba(0,0,0,.28); }
.workspace-menu.open { display: block; }
.workspace-option { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: #e7eeea; padding: 9px; border-radius: 6px; text-align: left; }
.workspace-option:hover, .workspace-option.current { background: rgba(255,255,255,.09); }
.workspace-option small { display: block; color: #97a59e; font-size: 10px; margin-top: 2px; }
.workspace-option.add-company { border-top: 1px solid rgba(255,255,255,.1); margin-top: 5px; padding-top: 12px; color: #f3bc69; }
.main-nav { padding: 24px 0; flex: 1; }
.nav-label { color: #73817b; font-family: var(--mono); font-size: 9px; letter-spacing: .16em; padding: 0 12px 8px; }
.nav-label-spaced { margin-top: 25px; }
.nav-item { position: relative; width: 100%; display: flex; align-items: center; gap: 11px; border: 0; color: #a9b3ae; background: transparent; padding: 10px 12px; border-radius: 7px; margin: 2px 0; text-align: left; font-size: 12px; }
.nav-item:hover { color: #f0f4f1; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: #2b3833; }
.nav-item.active::before { content: ""; position: absolute; left: -14px; width: 3px; height: 22px; background: var(--coral); border-radius: 0 3px 3px 0; }
.nav-item kbd { margin-left: auto; color: #75837c; font-family: var(--mono); font-size: 9px; }
.nav-count { margin-left: auto; background: var(--coral); color: #fff; border-radius: 10px; padding: 2px 6px; font-family: var(--mono); font-size: 9px; }
.sidebar-foot { display: grid; gap: 14px; }
.local-status { display: flex; align-items: center; gap: 7px; color: #91a098; font-size: 10px; padding: 0 9px; }
.status-dot { width: 6px; height: 6px; background: #53c09a; border-radius: 50%; box-shadow: 0 0 0 3px rgba(83,192,154,.13); display: inline-block; }
.profile-chip { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; border-top: 1px solid rgba(255,255,255,.09); padding: 15px 8px 0; color: #e8eee9; background: transparent; text-align: left; }
.profile-avatar { background: #44554d; color: #d5e8df; font-size: 10px; }
.profile-chip strong { display: block; font-size: 11px; }
.profile-chip small { display: block; color: #87958e; font-size: 10px; margin-top: 2px; }
.profile-chip .icon { margin-left: auto; color: #77857e; }

.main-area { min-width: 0; flex: 1; }
.topbar { height: 69px; background: rgba(255,255,255,.8); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 38px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: #89938e; font-size: 12px; }
.breadcrumb strong { color: var(--ink); font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.sync-pill { display: flex; align-items: center; gap: 7px; color: #6d7972; font-size: 10px; padding-right: 9px; border-right: 1px solid var(--line); }
.sync-pill .mono { font-size: 9px; color: #a0aaa5; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid transparent; background: transparent; color: #65736c; border-radius: 7px; position: relative; }
.icon-btn:hover { border-color: var(--line); background: #fff; color: var(--ink); }
.icon-btn.small { width: 29px; height: 29px; }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; background: var(--coral); border: 1px solid #fff; border-radius: 50%; }
.mobile-menu-btn { display: none; }
.page-wrap { max-width: 1500px; margin: 0 auto; padding: 34px 38px 60px; }
.view { display: none; animation: appear .25s ease both; }
.view.active { display: block; }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.page-heading.compact { align-items: center; }
.overline { display: flex; align-items: center; gap: 8px; color: var(--teal); margin-bottom: 8px; }
.live-line { width: 18px; height: 1px; background: var(--teal); display: inline-block; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 38px; line-height: 1.15; letter-spacing: 0; font-weight: 800; }
.page-heading p { margin-top: 10px; color: var(--ink-soft); font-size: 13px; }
h2 { font-size: 18px; line-height: 1.2; letter-spacing: 0; }
h3 { font-size: 14px; }
.heading-actions, .production-actions { display: flex; gap: 9px; align-items: center; }
.btn { border: 1px solid var(--line); border-radius: 7px; min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.btn:hover { border-color: #c5d0ca; transform: translateY(-1px); box-shadow: 0 5px 13px rgba(20,36,31,.06); }
.btn-primary { background: var(--coral); color: #fff; border-color: var(--coral); box-shadow: 0 6px 15px rgba(231,114,88,.2); }
.btn-primary:hover { background: #d9644b; border-color: #d9644b; }
.btn-quiet { background: transparent; }
.btn-small { min-height: 30px; padding: 0 10px; font-size: 11px; }
.text-btn { border: 0; background: transparent; color: var(--teal); font-size: 11px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; padding: 4px; }
.text-btn:hover { color: #1f655a; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { min-height: 128px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 17px 14px; box-shadow: var(--shadow); }
.stat-card-dark { background: var(--dark); color: #f2f5f1; border-color: var(--dark); }
.stat-card-warm { background: #fff8e9; border-color: #f4e2b9; }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: #75817b; font-size: 11px; }
.stat-card-dark .stat-top { color: #aab7b0; }
.stat-card-warm .stat-top { color: #91754a; }
.stat-top .icon { width: 16px; height: 16px; }
.stat-card strong { display: block; font-size: 31px; line-height: 1; letter-spacing: 0; margin: 17px 0 10px; font-family: var(--mono); font-weight: 500; }
.stat-foot { color: #829089; font-size: 10px; }
.stat-card-dark .stat-foot { color: #a1ada6; }
.stat-card-warm .stat-foot { color: #9a8059; }
.trend-up, .accent-text { color: var(--teal); font-weight: 700; }
.stat-card-dark .trend-up { color: #6ed1ae; }
.warning-text { color: #bc7f20; font-weight: 700; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(390px, .9fr); gap: 20px; align-items: stretch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.references-panel, .director-panel { min-height: 544px; padding: 21px; }
.references-panel { max-height: 760px; overflow: auto; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel-heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.section-kicker { color: #9ca7a1; margin-bottom: 7px; font-size: 9px; }
.references-list { display: grid; gap: 10px; margin-top: 19px; }
.reference-item { display: grid; grid-template-columns: 88px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 9px; border: 1px solid #e7ebe7; border-radius: 8px; transition: .2s ease; }
.reference-item:hover, .reference-item.selected { border-color: #bed7d0; background: #fbfdfb; }
.reference-thumb { width: 88px; height: 58px; border-radius: 5px; overflow: hidden; background-size: cover; background-position: center; position: relative; }
.reference-thumb video { width: 100%; height: 100%; display: block; object-fit: cover; }
.media-kind, .asset-media-icon { position: absolute; right: 6px; bottom: 6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(18,31,27,.72); backdrop-filter: blur(4px); z-index: 2; }
.media-kind .icon, .asset-media-icon .icon { width: 11px; height: 11px; }
.reference-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(13,35,31,.05), rgba(13,35,31,.28)); }
.thumb-1 { background-image: url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=280&q=78"); }
.thumb-2 { background-image: url("https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=280&q=78"); }
.thumb-3 { background-image: url("https://images.unsplash.com/photo-1564501049412-61c2a3083791?auto=format&fit=crop&w=280&q=78"); }
.thumb-4 { background-image: url("https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=280&q=78"); }
.thumb-5 { background-image: url("https://images.unsplash.com/photo-1511285560929-80b456fea0bc?auto=format&fit=crop&w=280&q=78"); }
.mini-thumb { width: 36px; height: 36px; border-radius: 5px; background-size: cover; background-position: center; }
.thumb-tropical { background-image: url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=120&q=78"); }
.reference-meta { min-width: 0; }
.reference-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.reference-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.platform-mark { color: #9a6e51; font-size: 9px; font-family: var(--mono); text-transform: uppercase; }
.rights-chip { display: inline-flex; align-items: center; flex: 0 0 auto; border: 1px solid #dce5df; border-radius: 4px; padding: 2px 5px; color: #68776f; background: #f5f8f6; font-size: 7px; line-height: 1.2; white-space: nowrap; }
.rights-chip.rights-owned, .rights-chip.rights-licensed { color: #287663; border-color: #c9e1d8; background: #edf7f3; }
.rights-chip.rights-platform-permitted { color: #4a6e91; border-color: #d0ddeb; background: #eff5fa; }
.rights-chip.rights-analysis-only, .rights-chip.rights-unknown { color: #816a4c; border-color: #e7dac6; background: #faf5eb; }
.reference-meta p { color: #829089; font-size: 10px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reference-score { text-align: right; }
.score-value { font-family: var(--mono); font-size: 16px; font-weight: 500; }
.score-label { color: #a0aaa5; font-size: 9px; display: block; margin-top: 2px; }
.ref-status { display: inline-flex; align-items: center; gap: 5px; color: #728079; font-size: 9px; margin-top: 7px; }
.ref-status .status-dot { width: 5px; height: 5px; box-shadow: none; }
.ref-status.ready .status-dot { background: var(--teal); }
.ref-status.analysis-only { color: #6d7891; }
.ref-status.analysis-only .status-dot { background: #7f91b6; }
.ref-status.pending .status-dot { background: var(--yellow); }
.ref-status.analyzing .status-dot { background: var(--coral); animation: pulse 1.2s infinite; }
.ref-status.preprocessing { color: #a06c27; }
.ref-status.preprocessing .status-dot { background: var(--yellow); animation: pulse 1.2s infinite; }
.ref-status.cancelled, .ref-status.failed { color: #b35c4b; }
.ref-status.queued, .ref-status.paused { color: #a47b42; }
.ref-status.cancelled .status-dot, .ref-status.failed .status-dot { background: var(--coral); }
.ref-status.queued .status-dot, .ref-status.paused .status-dot { background: var(--yellow); }
@keyframes pulse { 50% { opacity: .35; } }
.reference-analysis-card { margin-top: 14px; border: 1px solid #dfe7e1; border-radius: 8px; background: #fbfcfb; padding: 14px; }
.analysis-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.analysis-head-actions { display: flex; align-items: center; gap: 8px; }
.analysis-card-head .section-kicker { display: block; margin-bottom: 5px; }
.analysis-card-head h3 { font-size: 12px; }
.analysis-state { display: inline-flex; align-items: center; gap: 5px; color: #68766f; font-size: 9px; white-space: nowrap; }
.analysis-state .status-dot { width: 5px; height: 5px; box-shadow: none; }
.analysis-state.preprocessing .status-dot, .analysis-state.running .status-dot { background: var(--coral); animation: pulse 1.2s infinite; }
.analysis-state.analysis-only .status-dot, .analysis-state.done .status-dot { background: var(--teal); }
.analysis-state.cancelled .status-dot, .analysis-state.failed .status-dot { background: var(--coral); }
.analysis-rights { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; border: 1px solid #e1e8e3; border-radius: 6px; padding: 8px 9px; background: #fff; color: #748179; }
.analysis-rights > .icon { width: 15px; height: 15px; color: var(--teal); flex: 0 0 auto; }
.analysis-rights strong { display: block; color: var(--ink); font-size: 9px; }
.analysis-rights span { display: block; margin-top: 2px; font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.analysis-facts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; margin-top: 12px; }
.analysis-facts span { min-width: 0; border: 1px solid #e5eae6; border-radius: 6px; background: #fff; padding: 7px; color: #97a19b; font-size: 8px; }
.analysis-facts b { display: block; color: var(--ink); font-family: var(--mono); font-size: 9px; font-weight: 500; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evidence-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(112px, 1fr); gap: 7px; overflow-x: auto; padding: 10px 0 3px; }
.evidence-strip figure { margin: 0; min-width: 0; border: 1px solid #e2e7e3; border-radius: 6px; overflow: hidden; background: #fff; }
.evidence-strip img { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; background: #edf1ee; }
.evidence-strip figcaption { color: #929d97; font-size: 7px; line-height: 1.35; padding: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evidence-strip figcaption span { color: var(--teal); font-family: var(--mono); margin-right: 5px; }
.analysis-placeholder, .analysis-empty { min-height: 92px; display: grid; place-items: center; align-content: center; gap: 5px; text-align: center; color: #8d9992; padding: 14px 8px 3px; }
.analysis-placeholder .icon, .analysis-empty .icon { width: 18px; color: #8dafaa; }
.analysis-placeholder strong, .analysis-empty strong { color: var(--ink); font-size: 10px; }
.analysis-placeholder p, .analysis-empty p { max-width: 360px; font-size: 8px; line-height: 1.55; }
.analysis-placeholder.cancelled .icon, .analysis-placeholder.failed .icon { color: var(--coral); }
.analysis-progress { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 9px; align-items: center; margin-top: 12px; border-top: 1px solid #e6ebe7; padding-top: 12px; }
.analysis-progress > .icon { width: 18px; color: var(--coral); }
.analysis-progress strong { display: block; font-size: 10px; }
.analysis-progress p { color: #88948d; font-size: 8px; margin-top: 3px; line-height: 1.45; }
.analysis-markdown { color: #5d6963; font-size: 9px; line-height: 1.65; margin-top: 13px; overflow-wrap: anywhere; }
.analysis-markdown h2, .analysis-markdown h3, .analysis-markdown h4 { color: var(--ink); letter-spacing: 0; margin: 13px 0 5px; }
.analysis-markdown h2 { font-size: 12px; }
.analysis-markdown h3 { font-size: 11px; }
.analysis-markdown h4 { font-size: 10px; }
.analysis-markdown p { margin: 5px 0; }
.analysis-markdown ul { margin: 5px 0; padding-left: 17px; }
.analysis-markdown li { margin: 3px 0; }
.analysis-markdown code { border-radius: 3px; background: #edf2ef; color: #356c60; padding: 1px 3px; font-family: var(--mono); font-size: .95em; }
.analysis-markdown hr { border: 0; border-top: 1px solid #e2e7e3; margin: 13px 0; }
.add-row-btn { width: 100%; border: 1px dashed #cbd6cf; border-radius: 7px; color: #6d7b74; background: #fcfdfc; min-height: 39px; margin-top: 12px; font-size: 11px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.add-row-btn:hover { border-color: var(--teal); color: var(--teal); background: #f4fbf8; }
.empty-state { min-height: 164px; border: 1px dashed #d4ddd7; border-radius: 8px; background: #fbfcfb; color: #87928c; display: grid; place-items: center; align-content: center; gap: 7px; padding: 24px; text-align: center; }
.empty-state .icon { width: 20px; height: 20px; color: #8fb4a8; }
.empty-state strong { color: var(--ink); font-size: 11px; }
.empty-state p { max-width: 330px; font-size: 9px; line-height: 1.6; }

.proposal-panel { margin-top: 20px; padding: 21px; overflow: hidden; }
.proposal-empty { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; color: #87928c; }
.proposal-empty .icon { width: 25px; height: 25px; color: var(--teal); }
.proposal-empty strong { color: var(--ink); font-size: 13px; }
.proposal-empty p { max-width: 510px; font-size: 10px; line-height: 1.65; }
.proposal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.proposal-head h2 { font-size: 20px; }
.proposal-subtitle { color: #8b978f; font-size: 9px; line-height: 1.5; margin-top: 7px; }
.proposal-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.proposal-status { display: inline-flex; align-items: center; gap: 6px; border-radius: 14px; padding: 6px 9px; font-size: 9px; white-space: nowrap; }
.proposal-status.review { color: #9a6d2a; background: var(--yellow-soft); }
.proposal-status.approved { color: #2d7c69; background: var(--teal-soft); }
.proposal-status .status-dot { width: 5px; height: 5px; box-shadow: none; background: currentColor; }
.proposal-thesis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 17px; }
.proposal-thesis > div { border-left: 3px solid var(--teal); background: #f5faf7; padding: 12px 13px; }
.proposal-thesis > div:nth-child(2) { border-left-color: var(--coral); background: #fff8f5; }
.proposal-label { color: var(--teal); display: block; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.proposal-thesis p, .proposal-foot p { color: #5f6d65; font-size: 10px; line-height: 1.65; margin-top: 6px; }
.proposal-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 12px; margin-top: 12px; }
.proposal-block { border: 1px solid #e5ebe6; border-radius: 8px; padding: 13px; min-width: 0; }
.proposal-block-head, .proposal-shot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.proposal-block-head h3, .proposal-shot-head h3 { font-size: 11px; }
.proposal-block-head > span { color: #9aa49f; font-family: var(--mono); font-size: 8px; }
.proposal-score-list, .asset-match-list, .gap-list, .hook-list { display: grid; gap: 7px; margin-top: 10px; }
.proposal-score-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; border-top: 1px solid #eef1ed; padding-top: 8px; }
.proposal-score-row:first-child { border-top: 0; padding-top: 0; }
.proposal-score-row strong, .asset-match strong, .gap-row strong { display: block; font-size: 10px; }
.proposal-score-row small, .asset-match small, .gap-row small { display: block; color: #929e97; font-size: 8px; margin-top: 3px; line-height: 1.45; }
.proposal-score-row > p { grid-column: 1 / -1; color: #6e7b73; font-size: 8px; line-height: 1.5; }
.score-band { min-width: 43px; border-radius: 5px; padding: 5px 6px; text-align: center; color: #fff; background: var(--teal); font-family: var(--mono); font-size: 10px; }
.score-band.a { background: #7e9c88; }.score-band.b { background: #b48b51; }.score-band.c, .score-band.证据不足 { background: #9ca7a1; }
.score-band small { display: block; color: rgba(255,255,255,.8); font-family: var(--sans); font-size: 7px; margin-top: 1px; }
.hook-option { display: grid; grid-template-columns: 23px minmax(0,1fr); gap: 8px; align-items: start; border: 1px solid #e8ece8; border-radius: 6px; padding: 8px; }
.hook-option.selected { border-color: #a6cec1; background: #f4faf7; }
.hook-option > span { color: var(--coral); font-family: var(--mono); font-size: 9px; }
.hook-option p { color: #5f6d65; font-size: 9px; line-height: 1.5; }
.proposal-callout { border-top: 1px solid #eef1ed; margin-top: 10px; padding-top: 9px; }
.proposal-callout span { color: #9aa49f; font-size: 8px; }.proposal-callout strong { display: block; color: var(--ink); font-size: 10px; line-height: 1.5; margin-top: 4px; }
.asset-match { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 7px; align-items: center; border-top: 1px solid #eef1ed; padding-top: 8px; }
.asset-match:first-child, .gap-row:first-child { border-top: 0; padding-top: 0; }
.asset-match > .icon { width: 15px; color: var(--teal); }
.asset-match > span { color: #6b8278; background: #eef6f2; border-radius: 4px; padding: 4px 5px; font-size: 8px; white-space: nowrap; }
.gap-row { display: grid; grid-template-columns: 27px minmax(0,1fr); gap: 8px; align-items: start; border-top: 1px solid #eef1ed; padding-top: 8px; }
.gap-priority { border-radius: 4px; padding: 4px 0; text-align: center; font-size: 8px; }.gap-priority.high { color: #a45443; background: #fbe9e3; }.gap-priority.medium { color: #9b732d; background: #fff2d4; }
.proposal-shot-head { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 15px; }.proposal-shot-head p { color: #8b978f; font-size: 9px; margin-top: 4px; }.proposal-budget { color: #317867; background: #eaf5f0; border-radius: 5px; padding: 6px 8px; font-family: var(--mono); font-size: 9px; white-space: nowrap; }
.proposal-shot-list { margin-top: 9px; border: 1px solid #e5ebe6; border-radius: 7px; overflow: hidden; }
.proposal-shot-row { display: grid; grid-template-columns: 27px minmax(0, 1.5fr) minmax(150px, .8fr) 83px; gap: 10px; align-items: start; padding: 10px; border-bottom: 1px solid #eef1ed; }.proposal-shot-row:last-child { border-bottom: 0; }
.proposal-shot-no { color: #a2ada6; font-family: var(--mono); font-size: 10px; }.proposal-shot-main { min-width: 0; }.proposal-shot-main strong { display: block; font-size: 10px; }.proposal-shot-main small { display: block; color: #849188; font-size: 8px; margin-top: 3px; line-height: 1.45; }.proposal-shot-main p { color: #6e7c73; font-size: 8px; line-height: 1.45; margin-top: 5px; }
.proposal-route { display: grid; grid-template-columns: 8px minmax(0,1fr); gap: 5px; align-items: center; color: #5e7369; font-size: 8px; }.proposal-route .route-dot { width: 6px; height: 6px; }.proposal-route small { grid-column: 2; color: #9aa49f; font-size: 7px; line-height: 1.35; }.proposal-shot-time { color: #7f8d85; font-family: var(--mono); font-size: 8px; white-space: nowrap; }
.proposal-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 13px; }.proposal-foot > div { border-top: 1px solid #eef1ed; padding-top: 10px; }.danger-label { color: #b16151; }
.proposal-approve { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; border: 1px solid #c9ded5; border-radius: 8px; padding: 12px; background: #f2faf6; }.proposal-approve strong { display: block; font-size: 10px; }.proposal-approve small { display: block; color: #78877e; font-size: 8px; line-height: 1.5; margin-top: 4px; }
.proposal-muted { color: #929e97; font-size: 9px; padding: 12px 0; }.approval-note { display: flex; gap: 9px; align-items: flex-start; border: 1px solid #cfe2d9; border-radius: 7px; background: #f3faf7; padding: 11px; }.approval-note > .icon { color: var(--teal); width: 18px; }.approval-note strong { font-size: 10px; }.approval-note p { color: #74857b; font-size: 9px; line-height: 1.55; margin-top: 4px; }

.director-panel { background: var(--dark); color: #edf3ee; border-color: var(--dark); display: flex; flex-direction: column; }
.director-panel .section-kicker { color: #7f9289; }
.director-panel h2 { color: #f4f8f5; }
.director-heading { align-items: center; }
.ai-badge { color: #78d2b3; font-family: var(--mono); font-size: 9px; display: inline-flex; gap: 6px; align-items: center; letter-spacing: .1em; }
.ai-badge span { width: 6px; height: 6px; background: #64c4a6; border-radius: 50%; box-shadow: 0 0 0 3px rgba(100,196,166,.13); }
.director-context { display: flex; gap: 7px; flex-wrap: wrap; padding: 15px 0 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.context-tag { display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(255,255,255,.13); color: #a7b5ae; border-radius: 5px; padding: 5px 7px; font-size: 9px; }
.context-tag .icon { width: 12px; height: 12px; color: #d7a461; }
.chat-thread { flex: 1; overflow: auto; padding: 16px 1px 4px; display: grid; align-content: start; gap: 16px; max-height: 362px; }
.chat-row { display: flex; gap: 9px; align-items: flex-start; }
.chat-row.user { flex-direction: row-reverse; }
.chat-avatar { width: 25px; height: 25px; border-radius: 7px; flex: 0 0 auto; display: grid; place-items: center; background: #31413a; color: #9bd2bd; font-family: var(--mono); font-size: 10px; font-weight: 500; }
.user-avatar { background: #d98b72; color: #fff; }
.chat-bubble { max-width: 88%; color: #b7c2bb; font-size: 11px; line-height: 1.6; }
.chat-row.user .chat-bubble { text-align: right; color: #e9eeeb; }
.chat-meta { color: #6f8177; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; margin-bottom: 4px; }
.chat-row.user .chat-meta { color: #a5b3ab; }
.chat-meta span { margin-left: 7px; color: #54645c; }
.chat-bubble p strong { color: #e5bd7c; font-weight: 600; }
.chat-attachment { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 7px; padding: 7px; margin-top: 9px; text-align: left; }
.chat-attachment > div:nth-child(2) { min-width: 0; flex: 1; }
.chat-attachment strong { display: block; color: #edf3ef; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attachment small { color: #8fa097; font-size: 9px; display: block; margin-top: 2px; }
.chat-attachment .icon { color: #75c9aa; width: 15px; }
.chat-action-row { display: flex; gap: 6px; margin-top: 9px; }
.chip-btn { border: 1px solid rgba(255,255,255,.15); color: #a5bbb0; background: transparent; border-radius: 5px; font-size: 9px; padding: 5px 7px; display: inline-flex; gap: 5px; align-items: center; }
.chip-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.chip-btn .icon { width: 12px; height: 12px; }
.chat-composer { display: flex; gap: 7px; align-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; background: rgba(255,255,255,.06); padding: 5px 6px 5px 9px; margin-top: 13px; }
.composer-icon { border: 0; background: transparent; color: #8ea198; width: 23px; height: 25px; display: grid; place-items: center; }
.chat-composer input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #eef5f0; font-size: 11px; }
.chat-composer input::placeholder { color: #72847b; }
.send-btn { border: 0; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 5px; background: var(--coral); color: #fff; }
.send-btn:hover { background: #d9644b; }
.send-btn .icon { width: 15px; height: 15px; }
.composer-hint { display: flex; justify-content: space-between; padding: 8px 1px 0; color: #63746b; font-size: 9px; }
.composer-hint kbd { border: 1px solid rgba(255,255,255,.15); border-radius: 3px; padding: 1px 3px; color: #9eafa7; font-family: var(--mono); }
.chat-attachment-tray { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat-attachment-tray[hidden] { display: none; }
.chat-attachment-tray button { min-width: 0; max-width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 5px; background: rgba(255,255,255,.06); color: #aebcb4; padding: 5px 7px; display: inline-flex; align-items: center; gap: 5px; font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attachment-tray button:hover { color: #fff; background: rgba(255,255,255,.1); }
.chat-attachment-tray .icon { width: 11px; height: 11px; flex: 0 0 auto; }
.chat-attached-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.chat-attached-list span { display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; background: rgba(255,255,255,.07); color: #9dafA6; padding: 4px 6px; font-size: 8px; }
.chat-attached-list .icon { width: 10px; height: 10px; }

.production-panel { margin-top: 20px; padding: 21px; }
.production-heading { align-items: center; }
.btn-accent { color: #fff; border-color: #d96f56; background: #d96f56; }
.btn-accent:hover { border-color: #c95e47; background: #c95e47; }
.pipeline-banner { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px 18px; align-items: center; margin-top: 14px; border: 1px solid #d8e5de; border-radius: 8px; background: #f7faf8; padding: 12px; overflow: hidden; }
.pipeline-banner[hidden] { display: none; }
.pipeline-state { min-width: 0; display: grid; grid-template-columns: 8px minmax(0,1fr); gap: 9px; align-items: start; }
.pipeline-state > .status-dot { margin-top: 4px; }
.pipeline-state.running > .status-dot, .pipeline-state.queued > .status-dot { background: var(--coral); animation: pulse 1.2s infinite; }
.pipeline-state.done > .status-dot { background: var(--teal); }
.pipeline-state.failed > .status-dot { background: #ba5d4b; }
.pipeline-state strong { display: block; font-size: 10px; }
.pipeline-state p { color: #7f8d85; font-size: 9px; line-height: 1.5; margin-top: 3px; }
.pipeline-facts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.pipeline-facts span { color: #697a71; border: 1px solid #e0e8e3; border-radius: 4px; background: #fff; padding: 4px 6px; font-family: var(--mono); font-size: 8px; }
.pipeline-progress { grid-column: 1 / -1; height: 3px; border-radius: 3px; overflow: hidden; background: #e4ebe7; }
.pipeline-progress span { display: block; height: 100%; border-radius: 3px; background: var(--coral); transition: width .35s ease; }
.board-toolbar { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); margin-top: 16px; }
.board-tabs { display: flex; gap: 19px; }
.board-tab, .asset-tab { border: 0; background: transparent; color: #89958e; padding: 0 0 11px; font-size: 10px; position: relative; }
.board-tab span, .asset-tab span { color: #b0b9b4; font-family: var(--mono); font-size: 9px; margin-left: 4px; }
.board-tab.active, .asset-tab.active { color: var(--ink); font-weight: 700; }
.board-tab.active::after, .asset-tab.active::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--coral); }
.warning-count { color: #bd8424 !important; }
.board-filter { display: flex; align-items: center; gap: 10px; padding-bottom: 9px; color: #a3ada7; font-size: 9px; }
.board-filter button { border: 0; background: transparent; color: #67756e; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; }
.board-filter .icon { width: 12px; }
.execution-strip { display: grid; grid-template-columns: minmax(155px, 1fr) auto 105px auto; gap: 14px; align-items: center; background: #f8faf8; border: 1px solid #e5ebe6; border-radius: 8px; padding: 11px 12px; margin-top: 14px; }
.execution-copy { min-width: 0; display: grid; gap: 2px; }
.execution-copy .section-kicker { margin: 0; color: var(--teal); }
.execution-copy strong { font-size: 11px; }
.execution-copy small { color: #8d9992; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.execution-modes { display: flex; border: 1px solid #dbe3dd; border-radius: 6px; padding: 2px; background: #fff; }
.execution-mode { border: 0; background: transparent; color: #89958e; padding: 6px 8px; border-radius: 4px; font-size: 9px; white-space: nowrap; }
.execution-mode.active { background: var(--dark); color: #fff; }
.budget-field { display: grid; gap: 3px; color: #8b978f; font-size: 8px; }
.budget-field div { display: flex; align-items: center; border: 1px solid #dbe3dd; background: #fff; border-radius: 5px; height: 28px; padding: 0 6px; color: #8c9991; }
.budget-field b { font-family: var(--mono); font-size: 10px; font-weight: 500; }
.budget-field input { width: 65px; border: 0; outline: 0; padding: 0 0 0 3px; color: var(--ink); font-family: var(--mono); font-size: 10px; background: transparent; }
.auto-toggle { border: 0; background: transparent; color: #7a8880; display: inline-flex; align-items: center; gap: 6px; font-size: 9px; padding: 4px 0; white-space: nowrap; }
.auto-toggle-track { display: inline-flex; align-items: center; width: 27px; height: 16px; border-radius: 9px; padding: 2px; background: #cad4ce; transition: .2s; }
.auto-toggle-track span { display: block; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.auto-toggle.on { color: var(--teal); }
.auto-toggle.on .auto-toggle-track { background: var(--teal); justify-content: flex-end; }
.shot-table { margin-top: 4px; }
.shot-version-summary { display: flex; align-items: center; gap: 4px; color: #5f8a7d; font-size: 8px; margin-top: 6px; }
.shot-version-summary .icon { width: 11px; height: 11px; }
.shot-version-summary.muted { color: #a1aaa4; }
.modal-wide { width: min(1040px, 100%); }
.shot-workbench { gap: 14px; }
.shot-workbench-grid { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); gap: 14px; }
.shot-brief-panel, .shot-versions-panel, .shot-feedback-panel, .shot-action-box { min-width: 0; border: 1px solid #e4ebe6; border-radius: 8px; background: #fbfcfb; padding: 13px; }
.shot-brief-panel { background: #fff; }
.shot-workbench-kicker { color: #8a9890; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.shot-versions-panel { display: flex; flex-direction: column; min-height: 380px; }
.shot-workbench-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #e8ede9; }
.shot-workbench-head h3 { font-size: 13px; }
.shot-route-pill { max-width: 45%; border-radius: 5px; background: #edf5f1; color: #4d7d70; padding: 5px 7px; font-size: 8px; line-height: 1.35; text-align: right; }
.shot-version-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; overflow: auto; padding-top: 10px; }
.shot-version-card { min-width: 0; border: 1px solid #e3eae5; border-radius: 7px; background: #fff; padding: 9px; }
.shot-version-card.approved { border-color: #b9d9cd; background: #f7fcf9; }
.shot-version-card.rejected, .shot-version-card.needs-retake, .shot-version-card.failed { border-color: #efd2c9; background: #fffaf8; }
.shot-version-card.selected { border-color: #73ad9c; box-shadow: 0 0 0 2px rgba(115, 173, 156, .16); }
.shot-version-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.shot-version-card-head strong { display: inline-block; font-size: 10px; margin-left: 5px; }
.shot-version-card-head small { display: block; color: #909b95; font-size: 8px; margin-top: 4px; }
.version-number { color: var(--coral); font-family: var(--mono); font-size: 9px; }
.version-status { display: inline-flex; align-items: center; gap: 4px; border-radius: 10px; padding: 4px 6px; font-size: 8px; white-space: nowrap; background: #edf1ee; color: #708078; }
.version-status.review, .version-status.queued, .version-status.generating { background: #fff1dc; color: #9c6a27; }
.version-status.approved { background: #e5f4ed; color: #2e7966; }
.version-status.rejected, .version-status.needs-retake, .version-status.failed { background: #fbe9e3; color: #a65e4b; }
.version-status.superseded { background: #f1f2f1; color: #8b9690; }
.version-status .status-dot { width: 5px; height: 5px; box-shadow: none; background: currentColor; }
.shot-version-preview { margin-top: 9px; border-radius: 6px; overflow: hidden; background: #eef2ef; min-height: 106px; }
.shot-version-media { width: 100%; max-height: 260px; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #edf1ee; }
.shot-version-placeholder { min-height: 106px; display: grid; place-items: center; align-content: center; gap: 6px; color: #929e97; font-size: 9px; text-align: center; padding: 12px; }
.shot-version-placeholder .icon { width: 19px; color: var(--coral); }
.shot-version-audio { min-height: 106px; display: grid; place-items: center; gap: 8px; padding: 10px; color: var(--teal); }
.shot-version-audio .icon { width: 22px; }
.shot-version-audio audio { width: 100%; }
.shot-version-meta { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; color: #9aa49e; font-size: 8px; margin-top: 7px; }
.approved-mark { display: inline-flex; align-items: center; gap: 3px; color: #2f806a; }
.approved-mark .icon { width: 11px; height: 11px; }
.shot-version-note { color: #66766d; font-size: 9px; line-height: 1.5; margin-top: 7px; }
.version-feedback-list { display: grid; gap: 5px; border-top: 1px solid #edf1ee; margin-top: 8px; padding-top: 7px; }
.version-feedback-list div { color: #7c8981; font-size: 8px; line-height: 1.45; }
.version-feedback-list span { color: #b16c52; margin-right: 4px; }
.version-card-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.version-card-actions .btn { min-height: 29px; padding: 5px 7px; font-size: 8px; }
.version-card-actions .btn.selected { background: #e5f4ed; color: #2e7966; border-color: #b9d9cd; }
.version-card-actions .icon { width: 12px; height: 12px; }
.version-review-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.version-review-actions .btn { min-height: 30px; padding: 5px 7px; font-size: 8px; }
.version-review-actions .icon { width: 12px; height: 12px; }
.shot-version-empty { min-height: 230px; display: grid; place-items: center; align-content: center; gap: 7px; color: #8f9a94; text-align: center; padding: 22px; }
.shot-version-empty .icon { width: 25px; color: var(--teal); }
.shot-version-empty strong { color: var(--ink); font-size: 11px; }
.shot-version-empty p { max-width: 280px; font-size: 9px; line-height: 1.55; }
.shot-brief-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.shot-brief-facts span { flex: 1 1 75px; min-width: 0; border: 1px solid #e6ebe7; border-radius: 5px; padding: 7px; color: #829088; font-size: 8px; }
.shot-brief-facts b { display: block; color: #a0aaa4; font-size: 7px; margin-bottom: 3px; }
.shot-feedback-panel { background: #f6faf8; }
.shot-feedback-target { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; align-items: baseline; margin-bottom: 9px; }
.shot-feedback-target span { color: #91a099; font-size: 8px; }
.shot-feedback-target strong { color: var(--teal); font-size: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-feedback-target small { grid-column: 1 / -1; color: #9aa59f; font-size: 8px; line-height: 1.45; }
.shot-feedback-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; }
.shot-feedback-row textarea { min-height: 57px; resize: vertical; }
.shot-feedback-actions { display: flex; flex-direction: column; gap: 6px; }
.shot-feedback-actions .btn { min-height: 32px; white-space: nowrap; }
.shot-production-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shot-action-box { background: #fff; }
.shot-action-box p { color: #7e8b83; font-size: 9px; line-height: 1.5; margin-bottom: 10px; }
.shot-action-context { border-left: 2px solid #b9d9cd; color: #5f8175; background: #f4faf7; padding: 6px 8px; margin: 0 0 10px; font-size: 8px; line-height: 1.45; }
.shot-action-box .form-row { margin-bottom: 10px; }
.shot-action-box .btn { margin-top: 3px; }
.shot-generation-note { display: block; color: #9aa49e; font-size: 8px; line-height: 1.45; margin-top: 8px; }
.shot-upload-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: center; margin-top: 9px; }
.shot-upload-progress[hidden] { display: none; }
.shot-upload-progress::before { content: ""; grid-column: 1; grid-row: 1; height: 4px; border-radius: 4px; background: #e4ebe7; }
.shot-upload-progress span { grid-column: 1; grid-row: 1; display: block; height: 4px; border-radius: 4px; background: var(--teal); transition: width .2s ease; }
.shot-upload-progress small { color: #7d8a82; font-size: 8px; }
.table-empty { min-height: 132px; margin: 12px 0 4px; }
.shot-row { display: grid; grid-template-columns: 39px minmax(180px, 1.5fr) minmax(160px, 1fr) 112px 98px; gap: 13px; align-items: center; min-height: 60px; border-bottom: 1px solid #eef1ed; }
.shot-row:last-child { border-bottom: 0; }
.shot-edit-row { width: 100%; border-left: 0; border-right: 0; border-top: 0; background: transparent; color: inherit; padding: 0; text-align: left; border-radius: 0; }
.shot-edit-row:hover { background: #f8faf8; }
.shot-edit-row:focus-visible { outline: 2px solid #8fc4b5; outline-offset: -2px; }
.shot-head { min-height: 34px; color: #9ca7a1; font-family: var(--mono); font-size: 9px; }
.shot-num { color: #a4afa9; font-family: var(--mono); font-size: 11px; }
.shot-title { font-size: 11px; font-weight: 700; }
.shot-sub { color: #8c9891; font-size: 9px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-cell { display: flex; align-items: center; gap: 6px; color: #69776f; font-size: 9px; }
.route-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--teal); }
.route-ai .route-dot { background: #9b7cc4; }
.route-shoot .route-dot { background: #da9a4b; }
.route-edit .route-dot { background: #7095b7; }
.shot-time { font-family: var(--mono); font-size: 10px; color: #7f8d85; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 12px; padding: 5px 8px; font-size: 9px; white-space: nowrap; }
.status-pill.done { color: #287a68; background: var(--teal-soft); }
.status-pill.progress { color: #a06927; background: var(--yellow-soft); }
.status-pill.wait { color: #8b644a; background: #f8ebe4; }
.status-pill .status-dot { width: 5px; height: 5px; box-shadow: none; background: currentColor; }
.board-gap-list { display: grid; gap: 8px; padding: 13px 0 3px; }
.board-gap { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; align-items: start; border: 1px solid #e6ebe7; border-radius: 7px; padding: 11px; background: #fcfdfc; }
.board-gap strong { display: block; font-size: 10px; }
.board-gap p { color: #87948c; font-size: 9px; line-height: 1.5; margin-top: 4px; }
.board-director-card { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; padding: 13px 0 3px; }
.board-director-card > div { min-width: 0; border: 1px solid #e4eae5; border-radius: 7px; background: #fbfcfb; padding: 11px; }
.board-director-card p { color: #637168; font-size: 9px; line-height: 1.6; margin-top: 6px; overflow-wrap: anywhere; }
.board-director-card .btn { grid-column: 1 / -1; justify-self: start; }

.lower-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.company-card, .queue-card { padding: 21px; min-height: 225px; }
.company-summary { display: flex; gap: 14px; align-items: flex-start; margin-top: 19px; }
.company-emblem { width: 54px; height: 54px; display: grid; place-items: center; align-content: center; background: #e6f0ea; color: #2f7567; border-radius: 8px; line-height: 1.15; font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.company-emblem span { font-size: 10px; font-weight: 500; }
.company-summary h3 { margin-top: 2px; }
.company-summary p { color: #829089; font-size: 10px; line-height: 1.55; margin-top: 6px; max-width: 390px; }
.tag-row { display: flex; gap: 5px; margin-top: 9px; flex-wrap: wrap; }
.tag-row span { background: #f1f4f1; color: #6f7c75; border-radius: 4px; padding: 4px 6px; font-size: 9px; }
.memory-progress { margin-top: 20px; }
.memory-progress > div:first-child { display: flex; justify-content: space-between; color: #7e8b84; font-size: 10px; }
.memory-progress strong { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.progress-track { height: 5px; background: #edf1ed; border-radius: 5px; margin-top: 8px; overflow: hidden; }
.progress-track span { height: 100%; display: block; border-radius: 5px; background: var(--teal); }
.memory-progress small { color: #a2aca6; font-size: 9px; display: block; margin-top: 7px; }
.live-task { display: grid; grid-template-columns: 31px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid #eef1ed; }
.live-task:last-child { border-bottom: 0; }
.queue-empty { min-height: 132px; display: grid; place-items: center; align-content: center; gap: 7px; color: #99a49e; text-align: center; }
.queue-empty .icon { width: 20px; height: 20px; }
.queue-empty strong { color: var(--ink); font-size: 11px; }
.queue-empty span { font-size: 9px; }
.task-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 6px; }
.task-icon .icon { width: 14px; height: 14px; }
.image-task { background: #ede7f4; color: #8167a8; }
.video-task { background: #fbe9df; color: #c06d51; }
.cut-task { background: #e3f0ed; color: #3b8879; }
.task-copy { min-width: 0; }
.task-copy strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.task-copy small { color: #98a29d; font-size: 9px; display: block; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-progress { display: block; width: min(180px, 100%); height: 3px; border-radius: 3px; overflow: hidden; background: #e9eeeb; margin-top: 7px; }
.task-progress span { display: block; height: 100%; border-radius: 3px; background: var(--coral); }
.task-status { font-size: 9px; white-space: nowrap; }
.task-status.running { color: #bb7e25; }
.task-status.running span { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-right: 4px; animation: pulse 1.2s infinite; }
.task-status.queued { color: #88968e; }
.task-status.paused { color: #b0836a; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.project-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; box-shadow: var(--shadow); min-height: 185px; display: flex; flex-direction: column; }
.project-card[data-project] { cursor: pointer; }
.project-card[data-project]:hover, .project-card.current { border-color: #b5d3c8; box-shadow: 0 14px 32px rgba(40,92,78,.1); }
.project-card.current .project-card-foot strong { color: var(--coral); }
.project-add-card { align-items: center; justify-content: center; gap: 8px; color: #829089; border-style: dashed; background: #fbfdfb; }
.project-add-card .icon { color: var(--teal); }
.project-add-card strong { color: var(--ink); font-size: 12px; }
.project-add-card span { font-size: 10px; }
.project-card-cover { height: 76px; border-radius: 7px; background-size: cover; background-position: center; margin-bottom: 15px; position: relative; overflow: hidden; }
.project-card-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(15,29,25,.42), transparent 70%); }
.project-card-cover span { position: absolute; bottom: 8px; left: 9px; z-index: 1; color: #fff; font-family: var(--mono); font-size: 9px; }
.project-card h3 { font-size: 13px; }
.project-card p { color: #8a968f; font-size: 10px; margin-top: 5px; }
.project-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 16px; color: #8b978f; font-size: 9px; }
.project-card-foot strong { color: var(--teal); font-weight: 700; }

.asset-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); margin-bottom: 17px; }
.asset-tabs { display: flex; gap: 19px; overflow-x: auto; }
.search-field { width: 220px; display: flex; gap: 7px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; margin-bottom: 9px; background: #fff; }
.search-field .icon { width: 14px; color: #9ca8a1; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; font-size: 10px; color: var(--ink); background: transparent; }
.asset-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.asset-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); color: inherit; text-align: left; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.asset-card:hover { border-color: #b9d3c9; box-shadow: 0 14px 30px rgba(32,73,61,.09); transform: translateY(-1px); }
.asset-card:focus-visible { outline: 3px solid rgba(44,130,115,.2); outline-offset: 2px; }
.asset-cover { aspect-ratio: 1.35; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.asset-cover.asset-real img, .asset-cover.asset-real video { width: 100%; height: 100%; display: block; object-fit: cover; }
.asset-audio { display: grid; place-items: center; align-content: center; gap: 9px; color: #4d7c70; background: #e8f1ed; }
.asset-audio > .icon { width: 28px; height: 28px; }
.asset-audio audio { width: calc(100% - 20px); height: 28px; }
.asset-card-body { padding: 11px; }
.asset-card-body strong { font-size: 11px; display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.asset-empty { grid-column: 1 / -1; min-height: 230px; }
.asset-card-body p { color: #8b978f; font-size: 9px; margin-top: 4px; }
.asset-tags { min-height: 19px; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.asset-tags span { color: #66796f; background: #eef4f1; border-radius: 4px; padding: 3px 5px; font-size: 7px; }
.asset-card-status { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 8px; color: #8a968f; font-size: 8px; }
.asset-state { display: inline-flex; align-items: center; gap: 4px; }
.asset-state .status-dot { width: 5px; height: 5px; box-shadow: none; background: #9aa69f; }
.asset-state.queued .status-dot, .asset-state.running .status-dot { background: var(--coral); animation: pulse 1.2s infinite; }
.asset-state.done .status-dot { background: var(--teal); }
.asset-state.failed .status-dot { background: #b95d4c; }
.asset-card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; }
.asset-type { color: #6e7d75; background: #f1f4f1; border-radius: 4px; padding: 3px 5px; font-size: 8px; }
.asset-card-meta .icon { width: 13px; color: #9da8a2; }
.chatcut-mini { color: #98a39d; font-size: 8px; }
.chatcut-mini.ready { color: var(--teal); }

.task-summary-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.task-summary { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 15px; }
.summary-label { color: #8b978f; font-size: 10px; display: block; }
.task-summary strong { font-family: var(--mono); font-size: 25px; font-weight: 500; display: block; margin-top: 9px; }
.task-summary small { color: #a1aaa5; font-size: 9px; }
.full-task-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 18px; }
.full-task { display: grid; grid-template-columns: 34px minmax(0,1.4fr) 160px 95px 92px; gap: 13px; align-items: center; min-height: 70px; border-bottom: 1px solid #eef1ed; }
.full-task:last-child { border-bottom: 0; }
.full-task .task-copy strong { font-size: 11px; }
.task-provider { color: #7e8b84; font-family: var(--mono); font-size: 9px; }
.task-cost { color: #53625a; font-family: var(--mono); font-size: 10px; text-align: right; }
.task-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.task-detail-trigger { min-width: 0; border: 0; background: transparent; padding: 0; text-align: left; color: inherit; }
.task-detail-trigger:hover strong { color: var(--teal); }
.task-cancel { color: #aa6656; }
.btn-danger { background: #fff4f1; border-color: #efc8bd; color: #a74f3e; }
.btn-danger:hover { background: #fce7e1; border-color: #e7aa9b; }
.task-detail { margin-top: 18px; max-height: min(62vh, 620px); overflow: auto; }
.task-detail-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.task-detail-meta span { border-radius: 4px; background: #f0f3f1; color: #718078; padding: 4px 6px; font-family: var(--mono); font-size: 8px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.provider-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.provider-head { display: flex; align-items: center; gap: 10px; }
.provider-logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; font-family: var(--mono); font-size: 11px; }
.provider-logo.openai { background: #e5f1eb; color: #287b68; }
.provider-logo.seedance { background: #e9e6f5; color: #6857a0; }
.provider-logo.kling { background: #fbe8e0; color: #c3694e; }
.provider-logo.hailuo { background: #fff0d3; color: #ab7727; }
.provider-logo.chatcut { background: #e2eef5; color: #4a7898; }
.provider-head h3 { font-size: 12px; }
.provider-head p { color: #9aa49f; font-size: 9px; margin-top: 3px; }
.connection-state { margin-left: auto; color: var(--teal); font-size: 9px; display: flex; gap: 5px; align-items: center; }
.provider-form { display: grid; gap: 11px; margin-top: 17px; }
.field-label { color: #7a8880; font-size: 9px; display: grid; gap: 5px; }
.field-label input, .field-label select { border: 1px solid var(--line); border-radius: 6px; min-height: 34px; padding: 0 9px; outline: 0; color: var(--ink); background: #fbfcfb; font-size: 10px; }
.field-label input:focus, .field-label select:focus { border-color: #9bc8bb; box-shadow: 0 0 0 3px rgba(44,130,115,.1); }
.provider-foot { margin-top: 13px; display: flex; justify-content: space-between; align-items: center; color: #9ba59f; font-size: 9px; }
.provider-foot > span { min-width: 0; line-height: 1.5; overflow-wrap: anywhere; }
.provider-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.toggle { width: 34px; height: 19px; border: 0; border-radius: 12px; padding: 2px; background: #c8d0ca; display: flex; justify-content: flex-start; transition: .2s; }
.toggle span { width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: .2s; }
.toggle.on { background: var(--teal); justify-content: flex-end; }
.provider-unavailable { border-color: #ead3ca; background: #fffcfb; }
.provider-unavailable .connection-state { color: #a96654; }

.guide-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; }
.guide-feature { grid-row: span 2; background: var(--dark); color: #eaf0eb; border-radius: var(--radius); padding: 27px; min-height: 300px; position: relative; overflow: hidden; }
.guide-feature::before { content: ""; position: absolute; right: -40px; bottom: -65px; width: 190px; height: 190px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 25px rgba(255,255,255,.025), 0 0 0 52px rgba(255,255,255,.02); }
.guide-number { color: #e7a66f; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; }
.guide-feature h2 { font-size: 27px; max-width: 300px; margin-top: 60px; }
.guide-feature p { color: #aebbb3; line-height: 1.7; font-size: 11px; max-width: 390px; margin-top: 14px; }
.guide-rule { display: flex; gap: 8px; align-items: center; margin-top: 31px; color: #7bc2a8; font-size: 10px; }
.guide-rule .icon { width: 15px; }
.guide-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-height: 143px; box-shadow: var(--shadow); }
.guide-card .icon { color: var(--coral); }
.guide-card h3 { margin-top: 16px; }
.guide-card p { color: #87928c; font-size: 10px; line-height: 1.6; margin-top: 6px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(20,32,28,.44); z-index: 100; display: grid; place-items: center; padding: 20px; backdrop-filter: blur(5px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(510px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; background: #fff; border-radius: 12px; box-shadow: 0 25px 80px rgba(11,24,19,.28); padding: 21px; }
.modal.modal-wide { width: min(1040px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; }
.modal-head h2 { margin-top: 4px; }
.modal-form { display: grid; gap: 14px; margin-top: 22px; }
.modal-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.modal-form textarea { min-height: 84px; resize: vertical; padding: 9px; border: 1px solid var(--line); border-radius: 6px; outline: 0; font-size: 11px; }
.modal-form textarea:focus { border-color: #9bc8bb; box-shadow: 0 0 0 3px rgba(44,130,115,.1); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 5px; }
.drop-zone { border: 1px dashed #bdcec5; background: #f8fbf9; border-radius: 8px; padding: 25px 17px; text-align: center; color: #76847c; position: relative; overflow: hidden; cursor: pointer; }
.drop-zone.dragging { border-color: var(--teal); background: #eef8f4; box-shadow: 0 0 0 3px rgba(44,130,115,.08); }
.drop-zone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-zone .icon { color: var(--teal); width: 24px; height: 24px; margin-bottom: 8px; }
.drop-zone strong { display: block; font-size: 12px; color: var(--ink); }
.drop-zone p { font-size: 10px; margin-top: 5px; }
.rights-help { display: flex; gap: 8px; align-items: flex-start; border: 1px solid #dfe8e2; border-radius: 6px; padding: 9px; background: #f5f9f7; color: #708078; font-size: 9px; line-height: 1.5; }
.rights-help .icon { width: 15px; height: 15px; color: var(--teal); flex: 0 0 auto; }
.asset-picker { min-width: 0; max-height: 250px; overflow: auto; margin: 0; border: 1px solid var(--line); border-radius: 7px; padding: 10px; display: grid; gap: 6px; }
.asset-picker legend { color: #79877f; font-size: 9px; padding: 0 5px; }
.asset-picker > label { min-width: 0; display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 2px 7px; align-items: center; border-radius: 5px; padding: 7px; background: #f8faf8; cursor: pointer; }
.asset-picker > label:hover { background: #f1f6f3; }
.asset-picker input { grid-row: 1 / span 2; accent-color: var(--teal); }
.asset-picker span { min-width: 0; color: var(--ink); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-picker small { color: #929e97; font-size: 8px; }
.asset-picker > p { color: #8d9892; font-size: 9px; padding: 8px; }
.asset-detail-preview { width: 100%; max-height: 42vh; display: block; object-fit: contain; border: 1px solid var(--line); border-radius: 7px; background: #edf1ee; }
.asset-detail-audio { min-height: 105px; display: grid; place-items: center; align-content: center; gap: 10px; border: 1px solid var(--line); border-radius: 7px; background: #edf5f1; color: var(--teal); }
.asset-detail-audio .icon { width: 24px; height: 24px; }
.asset-detail-audio audio { width: calc(100% - 24px); }
.asset-detail-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.asset-detail-facts span { border-radius: 4px; background: #eef2ef; color: #748078; padding: 4px 6px; font-family: var(--mono); font-size: 8px; }
.global-search { display: grid; gap: 12px; margin-top: 18px; }
.global-search .search-field { width: 100%; margin: 0; min-height: 42px; }
#globalSearchResults, .notification-list { display: grid; gap: 6px; max-height: min(58vh, 520px); overflow: auto; }
#globalSearchResults > button { width: 100%; display: grid; grid-template-columns: 43px minmax(0,1fr) 18px; gap: 9px; align-items: center; border: 1px solid #e6ebe7; border-radius: 6px; background: #fbfcfb; color: inherit; padding: 9px; text-align: left; }
#globalSearchResults > button:hover, .notification-list > button:hover { border-color: #bad2c8; background: #f5faf7; }
#globalSearchResults > button > span { color: var(--teal); font-family: var(--mono); font-size: 8px; }
#globalSearchResults strong, .notification-list strong { display: block; font-size: 10px; }
#globalSearchResults small, .notification-list small { display: block; color: #919d96; font-size: 8px; margin-top: 3px; overflow-wrap: anywhere; }
#globalSearchResults .icon { width: 13px; color: #8f9b94; }
.notification-list { margin-top: 18px; }
.notification-list > button { width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: start; border: 1px solid #e6ebe7; border-radius: 6px; background: #fbfcfb; color: inherit; padding: 10px; text-align: left; }
.team-account-panel { display: grid; gap: 15px; margin-top: 20px; }
.team-account-summary { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 7px; background: #f7faf8; padding: 12px; }
.team-account-summary .profile-avatar { width: 38px; height: 38px; }
.team-account-summary strong { display: block; font-size: 12px; }
.team-account-summary small { display: block; color: #87938c; font-size: 9px; margin-top: 3px; }
.team-account-facts { display: grid; gap: 7px; color: #6f7d75; font-size: 9px; line-height: 1.5; }
.team-account-facts span { border-left: 2px solid #a5cdbf; padding-left: 8px; }
.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 8px; background: var(--dark); color: #eaf0ec; border-radius: 7px; padding: 11px 13px; font-size: 11px; box-shadow: 0 12px 30px rgba(17,31,26,.2); animation: toast-in .25s ease both; }
.toast .icon { color: #73c8aa; width: 15px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1180px) {
  .sidebar { width: 218px; flex-basis: 218px; }
  .topbar { padding-inline: 25px; }
  .page-wrap { padding-inline: 25px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .director-panel { min-height: 510px; }
  .asset-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 800px) {
  body.menu-open { overflow: hidden; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(282px, 82vw); flex-basis: min(282px, 82vw); height: 100dvh; padding-top: max(26px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-102%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; box-shadow: 20px 0 45px rgba(0,0,0,.18); }
  .sidebar.open { transform: translateX(0); visibility: visible; transition-delay: 0s; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 29; display: block; border: 0; padding: 0; background: rgba(15,24,21,.42); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .sidebar-scrim.open { opacity: 1; pointer-events: auto; }
  .mobile-menu-btn { display: grid; }
  .topbar { height: calc(69px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
  .topbar .icon-btn { width: 44px; height: 44px; }
  .breadcrumb span, .breadcrumb .icon { display: none; }
  .page-wrap { padding: 25px max(16px, env(safe-area-inset-right)) calc(45px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .nav-item, .workspace-select { min-height: 44px; }
  .page-heading, .page-heading.compact { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .btn { flex: 1; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .lower-grid, .settings-grid, .guide-grid { grid-template-columns: 1fr; }
  .guide-feature { grid-row: auto; min-height: 270px; }
  .guide-feature h2 { margin-top: 42px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .asset-toolbar { align-items: flex-start; flex-direction: column; border-bottom: 0; }
  .asset-tabs { width: 100%; border-bottom: 1px solid var(--line); }
  .search-field { width: 100%; margin-top: 1px; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .shot-row { grid-template-columns: 30px minmax(0,1fr) 90px; gap: 8px; }
  .shot-row > :nth-child(3), .shot-row > :nth-child(4) { display: none; }
  .shot-head { display: none; }
  .full-task { grid-template-columns: 34px minmax(0,1fr) 70px; }
  .full-task > :nth-child(3), .full-task > :nth-child(4) { display: none; }
  .sync-pill { display: none; }
  .execution-strip { grid-template-columns: 1fr auto; gap: 10px; }
  .execution-modes { grid-column: 1 / -1; justify-content: stretch; }
  .execution-mode { flex: 1; }
  .budget-field { justify-self: end; }
  .proposal-head, .proposal-approve { align-items: flex-start; flex-direction: column; }
  .pipeline-banner { grid-template-columns: 1fr; }
  .pipeline-facts { justify-content: flex-start; }
  .pipeline-progress { grid-column: 1; }
  .proposal-head-actions { width: 100%; justify-content: flex-start; }
  .proposal-grid, .proposal-thesis, .proposal-foot { grid-template-columns: 1fr; }
  .board-director-card { grid-template-columns: 1fr; }
  .proposal-shot-row { grid-template-columns: 27px minmax(0,1fr); }
  .proposal-route, .proposal-shot-time { grid-column: 2; }
  .proposal-shot-time { margin-top: 2px; }
  .modal-backdrop { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .modal { max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
  .modal-wide { width: 100%; }
  .shot-workbench-grid, .shot-production-actions { grid-template-columns: 1fr; }
  .shot-version-list { grid-template-columns: 1fr; max-height: none; overflow: visible; }
  .shot-versions-panel { min-height: 0; }
  .shot-feedback-row { grid-template-columns: 1fr; }
  .shot-feedback-actions { flex-direction: row; flex-wrap: wrap; }
  .shot-feedback-actions .btn { flex: 1; }
  .modal .icon-btn { width: 44px; height: 44px; }
  .toast-stack { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); }
  .toast { width: 100%; }
  .provider-foot { align-items: flex-start; gap: 10px; }
  .modal-actions { flex-wrap: wrap; }
}
@media (max-width: 470px) {
  h1 { font-size: 25px; }
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 116px; padding: 13px; }
  .stat-card strong { font-size: 26px; margin-top: 14px; }
  .references-panel, .director-panel, .production-panel, .company-card, .queue-card { padding: 16px; }
  .reference-item { grid-template-columns: 68px minmax(0,1fr); }
  .reference-thumb { width: 68px; height: 54px; }
  .reference-score { grid-column: 2; text-align: left; display: flex; gap: 7px; align-items: baseline; }
  .ref-status { margin-top: 0; }
  .analysis-facts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .analysis-progress { grid-template-columns: 20px minmax(0,1fr); }
  .analysis-progress .btn { grid-column: 1 / -1; width: 100%; }
  .project-grid { grid-template-columns: 1fr; }
  .asset-grid { gap: 9px; }
  .asset-grid { grid-template-columns: 1fr; }
  .asset-card-body { padding: 9px; }
  .production-actions { width: 100%; display: grid; grid-template-columns: 44px minmax(0,1fr) minmax(0,1fr); }
  .production-actions .btn { min-width: 0; min-height: 44px; padding-inline: 8px; white-space: normal; line-height: 1.25; }
  .production-actions .btn:first-child { font-size: 0; padding: 0; }
  .production-actions .btn:first-child .icon { margin: 0; }
  .composer-hint span:last-child { display: none; }
  .execution-strip { grid-template-columns: 1fr auto; }
  .execution-copy small { white-space: normal; }
  .execution-mode { padding-inline: 5px; font-size: 8px; }
  .panel-heading-actions { width: 100%; justify-content: flex-start; }
  .panel-heading-actions .text-btn { padding-left: 0; }
  .panel-heading-actions .btn, .heading-actions .btn, .add-row-btn, .chat-composer, .execution-mode { min-height: 44px; }
  .composer-icon, .send-btn { width: 38px; height: 38px; }
  .proposal-panel { padding: 16px; }
  .proposal-shot-head { align-items: flex-start; flex-direction: column; }
  .proposal-budget { align-self: flex-start; }
  .board-toolbar { align-items: flex-start; gap: 10px; flex-direction: column; border-bottom: 0; }
  .board-tabs { width: 100%; gap: 14px; overflow-x: auto; border-bottom: 1px solid var(--line); }
  .board-filter { padding-bottom: 0; }
  .execution-strip { grid-template-columns: 1fr; }
  .execution-modes { grid-column: 1; width: 100%; overflow-x: auto; }
  .budget-field { justify-self: stretch; }
  .budget-field div { height: 38px; }
  .budget-field input { width: 100%; }
  .auto-toggle { min-height: 40px; }
  .modal-form .form-row { grid-template-columns: 1fr; }
  .modal-actions { display: grid; grid-template-columns: 1fr; }
  .modal-actions .btn { width: 100%; min-height: 44px; }
  .shot-version-card-head { align-items: flex-start; }
  .version-review-actions .btn { flex: 1 1 30%; min-height: 40px; }
  .provider-foot { display: grid; }
  .provider-actions { width: 100%; justify-content: space-between; }
  .profile-chip { min-height: 52px; }
}
