:root {
  color-scheme: light;
  --bg: #f3f4f2;
  --surface: #fff;
  --surface-2: #f7f8f6;
  --text: #171a18;
  --muted: #687069;
  --line: #d9ded8;
  --line-soft: #e9ece7;
  --accent: #1859d8;
  --accent-hover: #1049b9;
  --accent-soft: #e8efff;
  --danger: #b42318;
  --success: #087a55;
  --nav-h: 44px;
  --pnav-h: 46px;
  --shadow: 0 18px 50px rgba(16, 24, 20, .13);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111411;
  --surface: #191d1a;
  --surface-2: #202521;
  --text: #f0f3f0;
  --muted: #a5aea6;
  --line: #363d37;
  --line-soft: #2b312c;
  --accent: #6d9eff;
  --accent-hover: #87afff;
  --accent-soft: #1e3157;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--accent); }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 50% 15%, var(--surface) 0, var(--bg) 52%); }
.login-card { width: min(440px, 100%); padding: 46px 42px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow); text-align: center; }
.brand-mark { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 18px; background: var(--text); color: var(--surface); border-radius: 13px; font-size: 26px; font-weight: 800; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.login-card h1 { margin: 0; font-size: 40px; letter-spacing: -.04em; }
.login-copy { margin: 18px 0 26px; color: var(--muted); line-height: 1.7; }
.privacy-note { margin: 16px auto 0; max-width: 320px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.primary, .tool-button, .button-link, .table-footer button, .modal-dialog button, .floating-panel button { min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-decoration: none; font-weight: 650; }
.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-hover); }
.primary.large { min-width: 210px; min-height: 44px; font-size: 15px; }
.inline-status { min-height: 18px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.inline-status.error { color: var(--danger); }
.app-shell { min-height: 100vh; }
.global-nav, .project-nav { position: fixed; z-index: 200; left: 0; right: 0; display: flex; align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); }
.global-nav { top: 0; height: var(--nav-h); padding: 0 14px; gap: 4px; }
.project-nav { top: var(--nav-h); height: var(--pnav-h); padding: 0 14px; gap: 3px; overflow-x: auto; }
.logo-button { height: 32px; margin-right: 12px; border: 0; background: transparent; font-weight: 850; letter-spacing: -.03em; font-size: 16px; }
.nav-item, .project-tab, .project-manage, .icon-button, .text-button { border: 0; background: transparent; color: var(--muted); }
.nav-item { height: 32px; padding: 0 11px; border-radius: 5px; font-size: 12px; font-weight: 650; }
.nav-item.active, .nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-spacer, .toolbar-spacer { flex: 1 1 auto; }
.icon-button { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0; border-radius: 6px; font-size: 19px; }
.icon-button:hover { background: var(--surface-2); color: var(--text); }
.user-chip { display: flex; align-items: center; gap: 7px; max-width: 190px; margin: 0 5px 0 8px; color: var(--muted); font-size: 12px; }
.user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip img { width: 25px; height: 25px; border-radius: 50%; }
.current-project-name { flex: 0 0 auto; max-width: 240px; margin-right: 12px; overflow: hidden; color: var(--text); font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.project-tab, .project-manage { flex: 0 0 auto; height: 34px; padding: 0 11px; border-radius: 5px; font-size: 12px; font-weight: 650; }
.project-tab:hover, .project-tab.active { background: var(--surface-2); color: var(--text); }
.project-manage { margin-left: auto; color: var(--accent); }
.dashboard-project-actions { display: flex; align-items: center; gap: 8px; }
.project-gate-dialog { width: min(720px, calc(100vw - 30px)); }
.project-gate-dialog::backdrop { background: rgba(10, 13, 11, .72); backdrop-filter: blur(5px); }
.project-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 280px; padding: 14px 18px; overflow: auto; border-bottom: 1px solid var(--line); }
.project-choice { display: grid; min-height: 72px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); text-align: left; }
.project-choice:hover, .project-choice.remembered { border-color: var(--accent); }
.project-choice strong, .project-choice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-choice span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.project-create-section { gap: 14px; }
.project-create-intro h3 { margin: 7px 0 5px; font-size: 18px; letter-spacing: -.02em; }
.project-create-intro p, .project-create-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.onboarding-badge { display: inline-flex; padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); font-size: 10px; font-weight: 800; }
.project-create-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 11px; line-height: 1.4; }
.project-create-list li { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.project-create-list strong { color: var(--text); overflow-wrap: anywhere; }
.project-create-advanced { padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; }
.project-create-advanced summary { color: var(--muted); font-size: 11px; cursor: pointer; }
.project-create-advanced label { margin-top: 10px; }
@media (max-width: 560px) { .project-create-list { grid-template-columns: 1fr; } }
.create-project-button { min-height: 42px; font-weight: 800; }
.create-project-button:disabled { cursor: wait; opacity: .65; }
#mainContent { padding-top: calc(var(--nav-h) + var(--pnav-h)); min-height: 100vh; }
.view { min-height: calc(100vh - var(--nav-h) - var(--pnav-h)); padding: 24px 28px 38px; }
.view-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.view-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.button-link { display: inline-flex; align-items: center; color: var(--text); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; }
.metric-card { min-height: 106px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.metric-card p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
.metric-card strong { display: block; margin-top: 11px; font-size: 30px; letter-spacing: -.04em; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .7fr); gap: 14px; margin-top: 14px; }
.dashboard-parity-grid { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(420px, 1.55fr) minmax(290px, .92fr); gap: 12px; align-items: start; }
.dashboard-column { display: grid; gap: 12px; min-width: 0; }
.dashboard-widget { padding: 0; overflow: hidden; }
.dashboard-widget > .panel-heading { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dashboard-widget > .panel-heading h3 { margin: 0; }
.dashboard-widget > .panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.dashboard-heading-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 17px; }
.dashboard-heading-card h2 { margin: 2px 0 0; font-size: 18px; }
.dashboard-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.dashboard-stat { display: flex; min-height: 72px; flex-direction: column; align-items: flex-start; justify-content: center; padding: 10px 14px; border: 0; border-radius: 0; background: var(--surface); }
.dashboard-stat span { color: var(--muted); font-size: 10px; }
.dashboard-stat strong { margin-top: 4px; font-size: 22px; }
.dashboard-stat:hover { background: var(--surface-2); }
.dashboard-status-overview { padding: 13px 15px; }
.dashboard-feed { max-height: 690px; overflow: auto; }
.dashboard-feed-row { display: block; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; background: transparent; text-align: left; }
.dashboard-feed-row:hover { background: var(--surface-2); }
.dashboard-feed-row > span { color: var(--muted); font-size: 9px; }
.dashboard-feed-row > strong { display: block; margin-top: 4px; }
.dashboard-feed-row > p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.dashboard-ops { display: flex; flex-wrap: wrap; gap: 7px; padding: 13px 15px; }
.dashboard-ops button { min-height: 30px; padding: 5px 8px; font-size: 10px; }
#dashboardOpsStatus { display: block; padding: 0 15px 10px; }
.dashboard-proxy { padding: 0 15px 14px; }
.dashboard-proxy-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 9px; }
.dashboard-proxy-summary span { padding: 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 10px; }
.dashboard-proxy-summary strong { float: right; color: var(--text); }
.dashboard-proxy-row { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 10px; }
.dashboard-proxy-row span { color: var(--muted); }
.nav-link-item { display: inline-flex; align-items: center; text-decoration: none; }
.debug-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.debug-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.debug-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -16px -16px 13px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.debug-card h3 { margin: 0; font-size: 13px; }
.debug-badge { padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.debug-badge.pass { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.debug-badge.warn { background: color-mix(in srgb, #d97706 16%, transparent); color: #d97706; }
.debug-badge.fail { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.debug-card dl { display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; margin: 0; font-size: 11px; }
.debug-card dt { color: var(--muted); }
.debug-card dd { margin: 0; font-weight: 600; }
.debug-card pre { max-height: 250px; margin: 0; overflow: auto; font-size: 10px; white-space: pre-wrap; }
.debug-card p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.panel-card { min-height: 300px; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-heading h3 { margin: 0; font-size: 14px; }
.text-button { color: var(--accent); font-size: 12px; }
.status-overview { display: grid; gap: 11px; }
.status-row { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: 12px; }
.status-bar { height: 7px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.status-bar i { display: block; height: 100%; background: var(--accent); }
.quick-access { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-link { min-height: 74px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--surface-2); text-align: left; }
.quick-link strong, .quick-link span { display: block; }
.quick-link span { margin-top: 6px; color: var(--muted); font-size: 11px; }
.table-view { height: calc(100vh - var(--nav-h) - var(--pnav-h)); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.table-toolbar { position: relative; flex: 0 0 45px; display: flex; align-items: center; gap: 7px; padding: 5px 9px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table-toolbar select, .table-toolbar input, .schedule-controls input, .schedule-controls select { height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.tool-button { min-height: 32px; font-size: 12px; }
.search-input { min-width: 235px; }
.save-menu-wrap { position: relative; }
.save-menu { position: absolute; z-index: 450; top: calc(100% + 5px); left: 0; min-width: 180px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.save-menu button { display: block; width: 100%; min-height: 34px; padding: 0 12px; border: 0; background: transparent; text-align: left; }
.save-menu button:hover { background: var(--surface-2); }
.floating-panel { position: fixed; z-index: 400; top: calc(var(--nav-h) + var(--pnav-h) + 42px); left: 86px; width: min(560px, calc(100vw - 30px)); padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); }
.floating-panel label, .modal-dialog label, .schedule-controls label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.floating-panel:not(.fields-panel):not(.sort-panel):not(.filter-panel) { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.floating-panel:not([hidden]) { display: grid; }
.floating-panel select, .floating-panel input, .modal-dialog input, .modal-dialog textarea { width: 100%; min-height: 35px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.panel-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 7px; }
.fields-panel { left: 170px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-height: 65vh; overflow: auto; }
.fields-panel label { display: flex; align-items: center; gap: 7px; min-height: 31px; padding: 4px 7px; border-radius: 4px; color: var(--text); }
.fields-panel label:hover { background: var(--surface-2); }
.fields-panel input[type="checkbox"] { appearance: auto; flex: 0 0 14px; width: 14px !important; min-width: 14px; height: 14px !important; min-height: 14px; margin: 0; padding: 0; }
.table-scroller { flex: 1 1 auto; min-width: 0; min-height: 0; overflow-x: scroll; overflow-y: auto; scrollbar-gutter: stable; background: var(--surface); }
#coreTable { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: auto; font-size: 12px; }
#coreTable th, #coreTable td { padding: 5px 8px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); overflow: hidden; white-space: normal; word-break: break-word; text-align: left; }
#coreTable th { position: sticky; z-index: 5; top: 0; height: 32px; background: var(--surface-2); color: var(--muted); font-size: 11px; user-select: none; }
#coreTable th.sortable { cursor: pointer; }
#coreTable th.draggable { cursor: move; position: relative; }
.column-resizer { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; user-select: none; }
#coreTable th.sortable:hover { color: var(--text); }
#coreTable tbody tr { cursor: default; }
#coreTable tbody tr:hover { background: var(--accent-soft); }
#coreTable td.cell-id { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; background: var(--surface-2); font-size: 10px; font-weight: 700; }
.status-pill.completed, .status-pill.approved { background: #dff7ec; color: #087a55; }
.status-pill.in_progress, .status-pill.review { background: #fff0d6; color: #965f00; }
.cell-link { color: var(--accent); text-decoration: none; }
.entity-name-link { font-weight: 700; }
.link-chip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--accent); text-decoration: none; font-size: 11px; }
.table-shotview { display: grid; width: 144px; height: 82px; place-items: center; overflow: hidden; border-radius: 4px; background: #0b0d0c; color: #aeb7b0; font-size: 10px; }
.table-shotview[data-media-url] { cursor: zoom-in; }
.table-shotview img { width: 100%; height: 100%; object-fit: contain; }
.table-shotview .shotview-unavailable { color: #778078; }
#coreTable td:has(.table-shotview) { width: 164px; min-width: 164px; }
.editable-cell { cursor: cell; }
.editable-cell:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.editable-cell.is-editing { padding: 2px 4px !important; overflow: visible !important; }
.editable-cell.is-saving { color: var(--muted); }
.inline-cell-editor { width: 100%; min-width: 90px; height: 28px; margin: 0; padding: 3px 6px; border: 2px solid var(--accent); border-radius: 4px; background: var(--surface); outline: none; }
.table-footer { flex: 0 0 42px; display: flex; align-items: center; gap: 8px; padding: 4px 9px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 11px; }
.table-footer label { display: flex; align-items: center; gap: 5px; }
.table-footer select { height: 29px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.sort-panel { left: 110px; display: block; width: min(640px, calc(100vw - 30px)); }
.sort-panel[hidden] { display: none; }
.panel-title { padding-bottom: 7px; border-bottom: 1px dashed var(--line); font-weight: 750; }
.sort-rules { display: grid; gap: 6px; margin: 8px 0; }
.sort-rule { display: grid; grid-template-columns: 150px minmax(150px, 1fr) 65px 70px; gap: 7px; align-items: center; }
.sort-flags { display: flex; align-items: center; gap: 10px; }
.sort-rule label { display: flex; grid-auto-flow: column; justify-content: start; align-items: center; gap: 5px; }
.sort-rule input[type="checkbox"] { width: 14px; min-width: 14px; height: 14px; min-height: 14px; padding: 0; }
.filter-panel { left: 126px; width: min(760px, calc(100vw - 30px)); max-height: min(72vh, 720px); overflow: auto; display: block; }
.filter-groups { display: grid; gap: 10px; margin: 8px 0; }
.filter-group { padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.filter-group > header { display: grid; grid-template-columns: minmax(150px, 1fr) 78px 70px; gap: 7px; align-items: center; margin-bottom: 7px; }
.filter-rules { display: grid; gap: 6px; }
.filter-rule { display: grid; grid-template-columns: minmax(140px, 1fr) 110px minmax(160px, 1.25fr) 70px; gap: 7px; align-items: center; }
.filter-panel .panel-actions { position: sticky; bottom: -14px; margin: 10px -14px -14px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.filter-panel [data-filter-combine].active { color: var(--accent); border-color: var(--accent); }
.filter-no-value { display: flex; align-items: center; min-height: 35px; color: var(--muted); }
.filter-date-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 5px; }
.filter-choices { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 4px 8px; max-height: 145px; padding: 6px; overflow: auto; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.filter-choices label { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--text); }
.filter-choices input[type="checkbox"] { flex: 0 0 14px; width: 14px; min-width: 14px; height: 14px; min-height: 14px; padding: 0; }
.filter-choices span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-group-row td { position: sticky; left: 0; z-index: 1; padding: 7px 10px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 11px; }
.table-group-row td > span { display: inline-flex; gap: 5px; align-items: center; }
.table-group-row .group-separator { margin: 0 8px; color: var(--muted); }
.new-link-control { display: flex; align-items: center; gap: 9px; min-height: 35px; }
.new-link-control > button { flex: 0 0 auto; min-height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.new-link-control > span { min-width: 0; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.versions-cell { display: grid; gap: 5px; min-width: 0; }
.versions-upload-button { justify-self: start; min-height: 26px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 11px; cursor: pointer; }
.versions-upload-button:hover { color: var(--accent); border-color: var(--accent); }
.shotview-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.upload-dialog { width: min(620px, calc(100vw - 30px)); }
.upload-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.upload-meta > span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }
.upload-results { display: grid; gap: 5px; max-height: 180px; overflow: auto; }
.upload-results > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; }
.upload-results span { color: var(--muted); }
.modal-dialog .inline-check { display: flex; align-items: center; gap: 7px; color: var(--text); }
.modal-dialog .inline-check input[type="checkbox"] { flex: 0 0 14px; width: 14px; min-width: 14px; height: 14px; min-height: 14px; margin: 0; padding: 0; }
.empty-state { padding: 45px 20px; color: var(--muted); text-align: center; }
.detail-drawer { position: fixed; z-index: 500; top: var(--nav-h); right: 0; bottom: 0; width: min(570px, 96vw); border-left: 1px solid var(--line); background: var(--surface); box-shadow: -16px 0 42px rgba(12, 20, 16, .12); }
.detail-drawer > header { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.detail-drawer h2 { margin: 0; font-size: 19px; }
#detailForm { height: calc(100% - 72px); display: flex; flex-direction: column; }
.detail-fields { flex: 1 1 auto; overflow: auto; padding: 16px 18px 80px; }
.detail-field { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 12px; align-items: start; min-height: 44px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.detail-field > label { padding-top: 8px; color: var(--muted); font-size: 11px; font-weight: 650; }
.detail-field input, .detail-field select, .detail-field textarea { width: 100%; min-height: 34px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.detail-field textarea { min-height: 76px; resize: vertical; }
.readonly-value { min-height: 34px; padding: 8px 9px; border-radius: 5px; background: var(--surface-2); word-break: break-word; }
#detailForm > footer { flex: 0 0 57px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
#detailForm > footer .inline-status { margin: 0 auto 0 0; }
#detailForm > footer button { min-height: 35px; padding: 0 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
#detailForm > footer button.primary { background: var(--accent); color: #fff; }
.detail-page-view { padding: 0; overflow: auto; background: var(--bg); }
.detail-page-toolbar { position: sticky; z-index: 40; top: 0; display: flex; min-width: max-content; min-height: 32px; align-items: center; gap: 6px; padding: 3px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.detail-toolbar-left { display: flex; align-items: center; gap: 6px; }
.detail-toolbar-left strong { max-width: 260px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.detail-page-toolbar .tool-button, .detail-page-toolbar select { height: 26px; min-height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); font-size: 11px; }
.detail-mode-toggle.is-active { border-color: var(--accent); color: var(--accent); }
.detail-mode-badge { padding: 3px 7px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.detail-page-heading { display: none; }
.detail-grid { --detail-cols: 24; --detail-col-width: 100px; --detail-row-height: 12px; --detail-gap: 4px; display: grid; width: max-content; min-width: 0; padding: 8px 8px 42px; align-items: stretch; overflow: visible; }
.detail-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.detail-card > header { flex: 0 0 24px; display: flex; height: 24px; min-height: 24px; align-items: center; gap: 4px; padding: 2px 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 10px; font-weight: 700; user-select: none; }
.detail-card > header .detail-card-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-card > header button { flex: 0 0 auto; min-height: 18px; height: 18px; padding: 0 4px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: 9px; }
.detail-card > header button:hover { background: var(--surface); color: var(--text); }
.detail-card-reload { margin-left: auto; font-size: 13px !important; }
.detail-card-remove { color: var(--danger) !important; font-size: 14px !important; }
.detail-card-drag { flex: 0 0 auto; color: var(--muted); cursor: grab; font-size: 15px; line-height: 1; user-select: none; }
.detail-card-resizer { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--accent) 51%); }
.detail-grid.layout-editing .detail-card { position: relative; outline: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); }
.detail-grid.layout-editing .detail-card.dragging { z-index: 30; opacity: .78; box-shadow: var(--shadow); }
.detail-card-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0; }
.detail-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.detail-table th, .detail-table td { min-height: 22px; padding: 4px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.detail-table th { width: var(--thwpx, 100px); color: var(--muted); font-size: 10px; font-weight: 650; text-align: left; }
.detail-table td { word-break: break-word; }
.detail-value-label { color: var(--muted); font-size: 10px; font-weight: 650; }
.detail-value { min-width: 0; word-break: break-word; font-size: 11px; }
.detail-value .cell-link { display: inline-block; }
.shotview-card-body { display: flex; padding: 0; overflow: hidden; background: #0b0d0c; }
.shotview-media { position: relative; display: flex; width: 100%; min-height: 0; flex: 1 1 auto; flex-direction: column; }
.shotview-media iframe, .shotview-media img, .shotview-media video { flex: 1 1 auto; width: 100%; height: 100%; min-height: 0; border: 0; object-fit: contain !important; object-position: center; background: #0b0d0c; }
.shotview-loading { display: grid; flex: 1 1 auto; min-height: 80px; place-items: center; padding: 12px; color: #b9c2bb; font-size: 11px; text-align: center; }
.shotview-media > a { position: absolute; right: 10px; bottom: 10px; padding: 7px 10px; border-radius: 5px; background: rgba(0, 0, 0, .72); color: #fff; text-decoration: none; font-size: 11px; }
.shotview-empty { display: grid; place-content: center; width: 100%; min-height: 80px; gap: 9px; padding: 18px; color: #d8ded9; text-align: center; }
.shotview-empty span { color: #929b94; font-size: 11px; }
.shotview-empty a { color: #8db3ff; font-size: 12px; }
.detail-single-field { display: flex; width: 100%; height: 100%; min-height: 0; align-items: center; justify-content: center; padding: 8px; overflow: auto; }
.assigned-card-body { overflow: hidden; }
.assigned-tasks-wrap { display: flex; width: 100%; height: 100%; min-height: 0; flex-direction: column; }
.assigned-tasks-controls { display: flex; flex: 0 0 34px; align-items: center; justify-content: flex-end; gap: 8px; padding: 5px 8px; border-bottom: 1px solid var(--line); font-size: 10px; }
.assigned-tasks-controls label { display: inline-flex; align-items: center; gap: 5px; }
.assigned-tasks-controls input { width: 13px; height: 13px; margin: 0; }
.assigned-tasks-controls select { height: 24px; max-width: 150px; font-size: 10px; }
.assigned-tasks-table-host { flex: 1 1 auto; min-height: 0; overflow: auto; }
.assigned-tasks-table { width: max-content; min-width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10px; }
.assigned-tasks-table th, .assigned-tasks-table td { position: relative; padding: 4px 6px; overflow: hidden; border-bottom: 1px solid var(--line-soft); text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.assigned-tasks-table th { position: sticky; z-index: 2; top: 0; background: var(--surface-2); }
.assigned-tasks-table th > button:first-child { width: calc(100% - 18px); padding: 0; overflow: hidden; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.assigned-column-hide { position: absolute; top: 2px; right: 5px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.assigned-tasks-table th > i { position: absolute; z-index: 3; top: 0; right: 0; width: 4px; height: 100%; cursor: col-resize; }
.assigned-task-group td { position: sticky; left: 0; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.assigned-tasks-message { padding: 12px; color: var(--muted); font-size: 11px; }
.media-viewer-dialog { width: min(1180px, calc(100vw - 30px)); height: min(820px, calc(100vh - 30px)); padding: 0; overflow: hidden; border: 1px solid #303630; border-radius: 10px; background: #080a09; color: #fff; box-shadow: 0 30px 90px rgba(0, 0, 0, .55); }
.media-viewer-dialog::backdrop { background: rgba(0, 0, 0, .78); }
.media-viewer-dialog > header { display: flex; height: 44px; align-items: center; gap: 12px; padding: 0 10px 0 16px; background: #111411; }
.media-viewer-dialog > header strong { flex: 1 1 auto; font-size: 12px; }
.media-viewer-dialog .icon-button { color: #fff; }
.media-viewer-stage { display: grid; height: calc(100% - 44px); place-items: center; overflow: hidden; }
.media-viewer-stage img, .media-viewer-stage video { width: 100%; height: 100%; object-fit: contain !important; object-position: center; background: #000; }
.table-shotview img, .table-shotview video { object-fit: contain !important; object-position: center; }
.detail-card-dialog { width: min(640px, calc(100vw - 28px)); }
.detail-card-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.detail-card-field { display: flex !important; min-height: 35px; align-items: center; gap: 8px !important; padding: 6px 9px; border-bottom: 1px solid var(--line-soft); color: var(--text) !important; }
.detail-card-field input { flex: 0 0 14px; width: 14px; min-width: 14px; height: 14px; min-height: 14px; margin: 0; padding: 0; }
.detail-card-dialog > form > footer, #scheduleSaveAsForm > footer { display: flex; align-items: center; gap: 8px; padding: 11px 18px; border-top: 1px solid var(--line); }
.schedule-controls { display: flex; gap: 10px; margin-bottom: 14px; }
.schedule-controls label { display: flex; align-items: center; gap: 7px; }
body[data-route="schedule"] { overflow: hidden; }
body[data-route="schedule"] .global-nav,
body[data-route="schedule"] .project-nav { display: none; }
body[data-route="schedule"] #mainContent { min-height: 100vh; padding-top: 0; }
#scheduleView { --schedule-axis-w: 62px; --schedule-inspector-w: 340px; height: 100vh; padding: 0; overflow: hidden; background: #0e0e10; color: #e5e7eb; }
.schedule-toolbar { display: flex; height: 49px; min-height: 49px; align-items: center; gap: 8px; padding: 0 8px; border-bottom: 1px solid #2a2d35; background: #333; }
.schedule-brand { flex: 0 0 auto; padding: 0; border: 0; background: transparent; color: #fff; font-size: 13px; font-weight: 900; }
.schedule-brand span { color: #2563eb; }
.schedule-inp { height: 22px; padding: 3px 8px; border: 1px solid #3a3e49; border-radius: 5px; background: #0f1218; color: #fff; font-size: 11px; }
#scheduleViewPreset { width: 152px; }
.schedule-toolbar-control { display: inline-flex; align-items: center; gap: 5px; }
.schedule-toolbar-control > span, .schedule-toolbar-control > label { color: #9ca3af; font-size: 10px; }
.schedule-mode-switch { display: inline-flex; height: 26px; overflow: hidden; border: 1px solid #3a3e49; border-radius: 5px; }
.schedule-mode-seg { height: 24px; padding: 0 12px; border: 0; border-radius: 0; background: #23252d; color: #cbd5e1; font-size: 11px; line-height: 24px; }
.schedule-mode-seg.active { background: #2563eb; color: #fff; }
.schedule-zoom-control input[type="range"] { width: 90px; }
#scheduleZoomValue { width: 52px; text-align: center; }
#scheduleStatus { flex: 0 1 220px; min-width: 120px; margin: 0; overflow: hidden; color: #22c55e; font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.schedule-edit-actions { display: flex; gap: 5px; }
.schedule-button, .schedule-setting-actions button, .schedule-settings > .schedule-setting-actions button { min-height: 26px; padding: 4px 9px; border: 1px solid #3a3e49; border-radius: 5px; background: #23252d; color: #e5e7eb; font-size: 11px; }
.schedule-button:hover, .schedule-setting-actions button:hover { background: #323844; }
#scheduleView[data-schedule-surface="view"] .schedule-edit-actions { display: none; }
.schedule-locked { min-height: 30px; padding: 7px 12px; background: #7c2d12; color: #fff7ed; font-size: 11px; font-weight: 750; text-align: center; }
.scheduler-shell { display: grid; grid-template-columns: minmax(0, 1fr) var(--schedule-inspector-w); height: calc(100% - 49px); min-height: 0; }
#scheduleView:has(.schedule-locked:not([hidden])) .scheduler-shell { height: calc(100% - 79px); }
.schedule-grid-wrap { min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid #2a2d35; }
.schedule-board { position: relative; width: 100%; height: 100%; overflow: auto; border: 0; border-radius: 0; background: #0f1015; }
.schedule-canvas { position: relative; min-width: 100%; background: #0f1015; }
.schedule-lane-headers { position: sticky; z-index: 30; top: 0; display: flex; width: 100%; min-width: 100%; height: 36px; border-bottom: 1px solid #2a2d35; background: #17181c; }
.schedule-year-corner { position: sticky; z-index: 33; left: 0; display: flex; flex: 0 0 var(--schedule-axis-w); width: var(--schedule-axis-w); align-items: center; justify-content: center; border-right: 1px solid #2a2d35; background: #101117; color: #2563eb; font-size: 11px; font-weight: 700; }
.schedule-lane-header { display: flex; flex: 0 0 var(--schedule-lane-width, 150px); align-items: center; justify-content: center; overflow: hidden; padding: 0 8px; border-right: 1px solid #2a2d35; color: #d1d5db; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-grid-body { position: relative; margin-left: var(--schedule-axis-w); background-color: #0f1015; background-image: linear-gradient(to bottom, #3f3f46 1px, transparent 1px), linear-gradient(to bottom, #222225 1px, transparent 1px), repeating-linear-gradient(to right, transparent 0, transparent calc(var(--schedule-lane-width, 150px) - 1px), #2a2d35 calc(var(--schedule-lane-width, 150px) - 1px), #2a2d35 var(--schedule-lane-width, 150px)); }
.schedule-date-axis { position: absolute; z-index: 20; top: 0; left: calc(-1 * var(--schedule-axis-w)); width: var(--schedule-axis-w); border-right: 1px solid #2a2d35; background: #121214; }
.schedule-date-label { position: absolute; left: 0; display: flex; width: calc(var(--schedule-axis-w) - 1px); flex-direction: column; align-items: center; justify-content: center; border-top: 1px solid #3f3f46; background: #121214; color: #71717a; font-size: 10px; line-height: 1.1; }
.schedule-date-label .date-main { color: #e5e7eb; font-size: 13px; font-weight: 700; }
.schedule-date-label .date-sub { margin-top: 2px; font-size: 10px; }
.schedule-date-label.today { background: rgba(37,99,235,.08); color: #fff; }
.schedule-lane-column { position: absolute; top: 0; bottom: 0; border-right: 1px solid #2a2d35; pointer-events: none; }
.schedule-lane-column.schedule-assets-column { background: rgba(16,16,20,.95); }
.schedule-week-separator { position: absolute; z-index: 2; right: 0; left: 0; height: 2px; background: #4b5563; pointer-events: none; }
.schedule-today-line { position: absolute; z-index: 3; left: 0; right: 0; height: 2px; background: #ef4444; pointer-events: none; }
.schedule-gap-hitbox { position: absolute; z-index: 4; min-height: 8px; padding: 0; border: 1px dashed rgba(245,158,11,.18); border-radius: 3px; background: rgba(245,158,11,.02); cursor: pointer; }
.schedule-gap-hitbox:hover, .schedule-gap-hitbox.selected { border-color: rgba(245,158,11,.72); background: rgba(245,158,11,.12); }
.schedule-drop-slot-line { position: absolute; z-index: 19; height: 2px; background: #facc15; box-shadow: 0 0 0 1px rgba(0,0,0,.4); pointer-events: none; }
.schedule-card { position: absolute; z-index: 10; display: flex; min-height: 14px; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 3px 5px 7px; border: 1px solid rgba(255,255,255,.72); border-radius: 5px; background: #7c3aed; color: #fff; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 10px; text-align: center; }
.schedule-card:hover, .schedule-card.selected { z-index: 15; box-shadow: 0 0 0 1px #67e8f9, inset 0 0 0 1px rgba(255,255,255,.25); }
.schedule-card.status-not_started { background: #1d4ed8; }
.schedule-card.status-in_progress { background: #7c3aed; }
.schedule-card.status-review { background: #d97706; }
.schedule-card.status-approved { background: #0f766e; }
.schedule-card.status-done, .schedule-card.status-complete, .schedule-card.status-completed { background: #166534; }
.schedule-card.status-hold, .schedule-card.status-blocked { background: #b42318; }
.schedule-card-order { position: absolute; top: 4px; left: 5px; font-size: 10px; }
.schedule-card-main { max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.schedule-card-sub { max-width: 100%; margin-top: 4px; overflow: hidden; font-size: 9px; opacity: .9; text-overflow: ellipsis; white-space: nowrap; }
.schedule-card-resizer { position: absolute; right: 0; bottom: 0; left: 0; height: 7px; cursor: ns-resize; background: rgba(255,255,255,.12); }
.schedule-card.dragging { opacity: .55; }
.schedule-asset-cell { position: absolute; z-index: 11; box-sizing: border-box; overflow: hidden; padding: 0; border: 0; border-right: 1px solid #2a2a2e; border-bottom: 1px solid #2a2a2e; border-left: 1px solid #2a2a2e; border-radius: 0; background: rgba(20,20,26,.9); color: transparent; cursor: pointer; font-size: 0; line-height: 0; }
.schedule-asset-cell:hover { background: rgba(39,39,48,.9); }
.schedule-asset-cell.has-assets { background: rgba(37,99,235,.2); }
.schedule-asset-cell.has-assets:hover { background: rgba(37,99,235,.32); }
.schedule-asset-cell.over { border-color: #7f1d1d; background: rgba(127,29,29,.42); }
.schedule-asset-cell.over:hover { background: rgba(153,27,27,.56); }
.schedule-asset-cell.selected { z-index: 13; outline: 2px solid #fbbf24; outline-offset: -2px; }
.schedule-asset-token { position: absolute; z-index: 11; display: flex; min-height: 18px; align-items: flex-start; gap: 4px; overflow: hidden; padding: 2px 4px; border: 1px solid rgba(255,255,255,.16); border-radius: 4px; background: rgba(3,105,161,.42); color: #e5e7eb; font-size: 10px; line-height: 1.2; }
.schedule-asset-token .order { display: inline-flex; min-width: 16px; height: 14px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.2); border-radius: 3px; background: rgba(17,24,39,.55); color: #cbd5e1; font-size: 9px; font-weight: 700; }
.schedule-asset-token .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-inspector { min-width: 280px; overflow: hidden; border-left: 1px solid #2a2d35; background: #15161c; }
.schedule-inspector-tabs { display: flex; height: 32px; border-bottom: 1px solid #2a2d35; background: #12141a; }
.schedule-inspector-tabs > button { flex: 1 1 0; height: 32px; padding: 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #9ca3af; font-size: 11px; font-weight: 600; }
.schedule-inspector-tabs > button.active { border-bottom-color: #2563eb; background: #15161c; color: #fff; }
.schedule-inspector-tabs .schedule-inspector-close { display: none; flex: 0 0 30px; }
#scheduleView[data-schedule-surface="edit"] .schedule-inspector-tabs .schedule-inspector-close { display: block; }
.schedule-inspector-panel { height: calc(100% - 32px); overflow: auto; padding: 10px 10px 56px; }
.schedule-level-inspector { padding: 0; color: #d7e0e8; text-align: left; }
.schedule-read-group { display: grid; gap: 7px; margin-bottom: 10px; }
.schedule-read-group > label,
.schedule-read-grid label { color: #94a3b8; font-size: 10px; letter-spacing: .04em; }
.schedule-read-group > label { font-size: 11px; font-weight: 600; letter-spacing: .05em; }
.schedule-read-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.schedule-read-grid > div { display: grid; gap: 4px; }
.schedule-read-value { min-height: 30px; padding: 7px 8px; overflow: hidden; border: 1px solid #2d313a; border-radius: 3px; background: #101116; color: #d7e0e8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
#schedulePanelList { display: flex; flex-direction: column; gap: 8px; }
#schedulePanelList[hidden] { display: none; }
.schedule-panel-wide { width: 100%; }
.schedule-panel-search { flex: 0 0 27px; width: 100%; height: 27px; }
.schedule-list-heading { display: flex; align-items: center; justify-content: space-between; color: #9ca3af; font-size: 10px; }
#scheduleTaskList { display: flex; flex: 1 1 auto; flex-direction: column; gap: 6px; overflow: auto; }
.schedule-task-item { display: grid; gap: 3px; width: 100%; padding: 7px 8px; border: 1px solid #2f3440; border-radius: 6px; background: #10131a; color: #e5e7eb; text-align: left; }
.schedule-task-item:hover, .schedule-task-item.selected { border-color: #3b82f6; background: #1d2637; }
.schedule-task-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-task-item span { color: #9ca3af; font-size: 10px; }
.schedule-task-item.scheduled { opacity: .45; }
#scheduleCardForm { display: grid; gap: 8px; padding: 0; }
#scheduleViewInspector { display: flex; flex-direction: column; gap: 8px; }
#scheduleViewInspector[hidden] { display: none; }
.schedule-edit-inspector { display: flex; flex-direction: column; gap: 8px; }
.schedule-edit-inspector[hidden] { display: none; }
.schedule-edit-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px; border-radius: 4px; background: #222; font-weight: 700; }
.schedule-edit-title > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-edit-meta { display: flex; min-width: 0; flex-wrap: wrap; gap: 6px; }
.schedule-info-tag { display: inline-block; max-width: 100%; padding: 2px 6px; overflow: hidden; border: 1px solid #3a3f49; border-radius: 4px; color: #aab0ba; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-edit-mode { display: flex; align-items: center; gap: 6px; color: #aaa; font-size: 11px; }
.schedule-edit-mode select { height: 24px; padding: 2px 6px; }
.schedule-edit-field { display: flex; flex-direction: column; gap: 4px; user-select: text; }
.schedule-edit-field-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.schedule-edit-field label { color: #9ca3af; font-size: 10px; }
.schedule-edit-field .inp, .schedule-edit-field input, .schedule-edit-field select, .schedule-edit-field textarea { width: 100%; min-height: 30px; padding: 6px 8px; border: 1px solid #353a45; border-radius: 5px; background: #0f1218; color: #fff; font-size: 11px; }
.schedule-edit-field textarea { min-height: 58px; resize: vertical; }
.schedule-edit-date { display: flex; align-items: flex-start; gap: 4px; }
.schedule-edit-date input[type="date"] { flex: 1 1 auto; }
.schedule-edit-date input[type="number"] { flex: 0 0 60px; width: 60px; }
.schedule-edit-link { cursor: pointer; text-align: left; white-space: normal; line-height: 1.3; }
.schedule-edit-read { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.schedule-edit-asset-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.schedule-edit-asset-row.over { border-color: #ef4444; background: rgba(127,29,29,.25); color: #fecaca; }
.schedule-edit-error { min-height: 12px; color: #fca5a5; font-size: 9px; }
.schedule-view-inspector .inp-group { display: flex; flex-direction: column; gap: 4px; }
.schedule-view-inspector .inp-group label { color: #9ca3af; font-size: 10px; }
.schedule-view-inspector .inp-group input,
.schedule-view-inspector .inp-group select,
.schedule-view-inspector .inp-group textarea,
.schedule-view-inspector .inp-group button.inp {
  width: 100%; min-height: 30px; padding: 6px 8px; border: 1px solid #353a45;
  border-radius: 5px; background: #0f1218; color: #fff; font-size: 11px;
}
.schedule-view-inspector .inp-group button.inp { cursor: pointer; text-align: left; }
.schedule-view-inspector .inp-group textarea { min-height: 56px; resize: vertical; }
.schedule-view-inspector .meta { color: #8f96a3; font-size: 10px; }
.schedule-view-inspector .row2 { display: flex; gap: 8px; }
.schedule-view-inspector .row2 > .inp-group { flex: 1; }
.schedule-view-inspector .field-save-state { min-height: 12px; color: #8f96a3; font-size: 9px; }
.schedule-view-inspector .field-save-state.error { color: #fca5a5; }
#scheduleCardForm label, .schedule-settings label { display: grid; gap: 4px; color: #9ca3af; font-size: 10px; }
#scheduleCardForm input, #scheduleCardForm select, #scheduleCardForm textarea, .schedule-settings input, .schedule-settings select { width: 100%; min-height: 30px; padding: 6px 8px; border: 1px solid #353a45; border-radius: 5px; background: #0f1218; color: #fff; font-size: 11px; }
.schedule-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.schedule-inspector-actions, .schedule-setting-actions { display: flex; align-items: center; gap: 6px; }
.schedule-inspector-actions button { min-height: 30px; padding: 0 10px; border: 1px solid #3a3e49; border-radius: 5px; background: #23252d; }
.schedule-settings { display: flex; flex-direction: column; gap: 10px; }
.schedule-settings > section { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid #2d2d31; border-radius: 8px; background: #1c1c20; }
.schedule-settings h4 { margin: 0; color: #ddd; font-size: 12px; letter-spacing: .03em; }
.schedule-settings .inline-check { display: flex; align-items: center; gap: 7px; color: #e5e7eb; }
.schedule-settings .inline-check input { flex: 0 0 14px; width: 14px; min-width: 14px; height: 14px; min-height: 14px; }
.schedule-color-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.schedule-color-settings input[type="color"] { height: 30px; padding: 2px; }
.schedule-extra-field { flex: 1 1 auto; }
.schedule-display-chips { display: flex; min-height: 24px; flex-wrap: wrap; gap: 6px; }
.schedule-display-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid #374151; border-radius: 999px; background: #111827; color: #d1d5db; font-size: 10px; }
.schedule-display-chip button { padding: 0; border: 0; background: transparent; color: #fca5a5; font-size: 12px; }
.schedule-lane-settings { display: grid; gap: 5px; }
.schedule-lane-setting { display: grid; grid-template-columns: 20px 1fr auto auto; gap: 6px; align-items: center; padding: 5px; border: 1px solid #2d2d31; border-radius: 5px; }
.schedule-list-view { padding: 12px; }
.schedule-list-row { display: grid; grid-template-columns: 150px 1fr 110px 110px; gap: 10px; padding: 9px 10px; border-bottom: 1px solid #2a2d35; background: #15161c; color: #e5e7eb; font-size: 11px; }
@media (max-width: 1140px) { #scheduleView { --schedule-inspector-w: 300px; } .schedule-toolbar { gap: 5px; } #scheduleStatus { display: none; } }
@media (max-width: 1000px) { .scheduler-shell { grid-template-columns: 210px minmax(0, 1fr); } .schedule-inspector { position: fixed; z-index: 500; top: calc(var(--nav-h) + var(--pnav-h) + 46px); right: 0; bottom: 0; width: 300px; box-shadow: var(--shadow); } }
.forum-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; }
.forum-hero h2, .forum-thread-panel h3, .forum-main-panel h3, .forum-recent h3 { margin: 0; }
.forum-hero p, .forum-thread-panel header p, .forum-thread-heading p, .forum-recent header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.forum-hero-meta, .forum-thread-meta, .forum-thread-tags, .forum-post footer, .forum-recent-item footer { display: flex; flex-wrap: wrap; gap: 6px; }
.forum-hero-meta span, .forum-pill, .forum-tag, .forum-chip { min-height: 24px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 10px; line-height: 16px; }
.forum-tag, .forum-chip { cursor: pointer; }
.forum-tag:hover, .forum-tag.active, .forum-chip:hover { border-color: var(--accent); color: var(--accent); }
.forum-status { display: block; min-height: 20px; padding: 7px 2px 4px; }
.forum-layout { display: grid; grid-template-columns: minmax(300px, 390px) minmax(0, 1fr); align-items: start; gap: 14px; min-height: 610px; }
.forum-thread-panel, .forum-main-panel { overflow: hidden; }
.forum-thread-panel > header, .forum-thread-heading, .forum-recent > header { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.forum-field { display: grid; gap: 6px; padding: 12px 16px 0; color: var(--muted); font-size: 11px; }
.forum-field input { width: 100%; }
.forum-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.forum-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.thread-list { max-height: 640px; border-top: 1px solid var(--line); overflow: auto; }
.thread-item { width: 100%; padding: 13px 15px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; }
.thread-item:hover, .thread-item.active { background: var(--surface-2); }
.thread-item strong, .thread-item span { display: block; }
.thread-item span { margin-top: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-item .forum-thread-item-meta { margin: 0; font-size: 9px; letter-spacing: .02em; }
.thread-item .forum-thread-tags { display: flex; }
.thread-item .forum-tag { pointer-events: auto; }
.forum-thread-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.forum-thread-meta { margin-top: 10px; }
.forum-composer { display: grid; gap: 12px; margin: 16px; padding: 16px; }
.forum-composer label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.forum-composer textarea { resize: vertical; }
.forum-composer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.forum-composer .forum-toolbar { padding: 0; }
.forum-posts { padding: 0 18px; }
.forum-post { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.forum-post header { color: var(--muted); font-size: 10px; }
.forum-post > strong { display: block; margin-top: 7px; }
.forum-post p { margin: 0; line-height: 1.65; white-space: pre-wrap; }
.forum-post footer, .forum-recent-item footer { margin-top: 10px; }
.forum-recent { margin: 16px; }
.forum-recent-feed { padding: 0 16px; }
.forum-recent-item { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.forum-recent-item > span { color: var(--muted); font-size: 10px; }
.forum-recent-item > strong { display: block; margin-top: 5px; }
.forum-recent-item p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 14px; }
.setting-card { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.setting-card h3 { margin: 0 0 14px; font-size: 14px; }
.setting-card h4 { margin: 0 0 10px; font-size: 12px; }
.settings-wide { grid-column: 1 / -1; }
.setting-card-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin: -18px -18px 14px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.setting-card-head h3 { margin: 0; }
.setting-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.setting-pill { padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; }
.setting-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.setting-row span:first-child { color: var(--muted); }
.settings-table-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.settings-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.settings-table th { position: sticky; top: 0; z-index: 1; padding: 7px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--muted); text-align: left; white-space: nowrap; }
.settings-table td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.settings-table td small { display: block; margin-top: 3px; color: var(--muted); }
.settings-table input:not([type="checkbox"]), .settings-table select { min-width: 120px; width: 100%; height: 30px; padding: 4px 7px; }
.settings-meta-table td:nth-child(2) input { min-width: 260px; }
.settings-meta-table td:nth-child(4) input { min-width: 220px; }
.settings-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.settings-actions button { min-height: 30px; padding: 5px 9px; }
.settings-actions input[type="number"] { width: 90px; }
.settings-json { width: 100%; margin: 10px 0; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.settings-table input[type="checkbox"] { width: 14px; min-width: 14px; height: 14px; min-height: 14px; }
.settings-admin-list { display: grid; gap: 10px; margin-bottom: 14px; }
.settings-admin-list > div { display: flex; flex-wrap: wrap; gap: 7px; }
.setting-admin-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 5px 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 10px; }
.setting-admin-chip button { width: 20px; height: 20px; min-height: 20px; padding: 0; border: 0; background: transparent; }
.settings-access-actions { margin: 12px 0; }
.setting-state { white-space: nowrap; }
.setting-state.ok { color: var(--success); }
.setting-state.bad { color: var(--danger); }
.settings-proxy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-proxy-grid > section { min-width: 0; }
.modal-dialog { width: min(560px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.modal-dialog::backdrop { background: rgba(8, 12, 9, .48); }
.modal-dialog > form header { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.modal-dialog h2 { margin: 0; font-size: 19px; }
.dialog-tabs { display: flex; padding: 0 20px; border-bottom: 1px solid var(--line); }
.dialog-tabs button { min-height: 42px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); }
.dialog-tabs button.active { border-color: var(--accent); color: var(--text); }
.dialog-section { display: grid; gap: 13px; padding: 20px; }
.dialog-section p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.modal-dialog > .inline-status { margin: 0; padding: 0 20px 18px; }
.small-dialog { width: min(500px, calc(100vw - 28px)); }
.link-picker-dialog { width: min(900px, 92vw); min-width: min(900px, 92vw); max-height: 85vh; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: #151515; color: #eee; box-shadow: 0 18px 48px rgba(0,0,0,.35); }
.link-picker-dialog::backdrop { background: rgba(0,0,0,.4); }
.link-picker-hd { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.12); font-weight: 600; }
.link-picker-bd { display: grid; gap: 10px; padding: 12px 14px; }
.link-picker-q { width: 100%; padding: 10px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: #0f0f0f; color: #eee; }
.link-picker-msg { min-height: 0; color: #aab0ba; font-size: 11px; }
.link-picker-results { max-height: min(55vh, 520px); overflow: auto; border: 1px solid rgba(255,255,255,.10); border-radius: 10px; background: #0f0f0f; }
.link-picker-item { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); cursor: pointer; }
.link-picker-item:last-child { border-bottom: 0; }
.link-picker-item:hover { background: rgba(255,255,255,.06); }
.link-picker-item input { flex: 0 0 15px; width: 15px; height: 15px; }
.link-picker-item .txt { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.link-picker-dialog > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.12); }
.link-picker-btn { padding: 8px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(255,255,255,.06); color: #eee; cursor: pointer; }
.link-picker-btn:hover { background: rgba(255,255,255,.10); }
.link-picker-dialog.docked { position: static; display: flex; width: 100%; min-width: 0; max-width: none; max-height: min(58vh, 520px); margin: 0; overflow: hidden; flex-direction: column; transform: none; }
.link-picker-dialog.docked .link-picker-hd { display: none; }
.link-picker-dialog.docked .link-picker-bd { display: flex; min-height: 0; padding: 0; flex: 1 1 auto; flex-direction: column; }
.link-picker-dialog.docked .link-picker-results { min-height: 0; max-height: none; flex: 1 1 auto; overflow: auto; }
.link-picker-dialog.docked > footer { position: sticky; z-index: 2; bottom: 0; flex: 0 0 auto; margin: 0; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.12); background: #151515; box-shadow: 0 -5px 12px rgba(0,0,0,.2); }
.schedule-history-dialog, .schedule-confirm-dialog { width: 100vw; max-width: none; height: 100vh; max-height: none; padding: 16px; border: 0; background: rgba(0,0,0,.65); color: #e5e7eb; }
.schedule-history-dialog::backdrop, .schedule-confirm-dialog::backdrop { background: rgba(0,0,0,.65); }
.schedule-history-panel { display: flex; width: min(760px, 96vw); max-height: 90vh; margin: auto; flex-direction: column; overflow: hidden; border: 1px solid #333; border-radius: 10px; background: #17171a; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.schedule-history-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #2c2c30; background: #121214; font-size: 13px; }
.schedule-history-body { display: flex; min-height: 220px; flex-direction: column; gap: 8px; padding: 12px; }
.schedule-history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.schedule-history-list { min-height: 180px; max-height: 52vh; overflow: auto; border: 1px solid #2d2d31; border-radius: 8px; background: #101014; }
.schedule-history-item { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border: 0; border-bottom: 1px solid #202024; background: transparent; color: #e5e7eb; cursor: pointer; font-size: 11px; text-align: left; }
.schedule-history-item:hover { background: #1a1a1f; }
.schedule-history-item.active { outline: 1px solid #2563eb; background: #10263f; }
.schedule-history-item.named { background: #1a2a1a; }
.schedule-history-item span { color: #9ca3af; font-size: 10px; }
.schedule-history-panel > footer { display: flex; justify-content: flex-end; padding: 0 12px 12px; }
.schedule-confirm-panel { display: flex; width: min(420px, 96vw); margin: auto; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid #333; border-radius: 10px; background: #17171a; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.schedule-confirm-panel > strong { color: #fff; font-size: 13px; }
.schedule-confirm-panel > p { margin: 0; color: #aab0ba; font-size: 12px; line-height: 1.5; white-space: pre-line; }
.schedule-confirm-panel > footer { display: flex; justify-content: flex-end; gap: 8px; }
.schedule-timezone-dialog { background: rgba(0,0,0,.72); }
.schedule-timezone-dialog .schedule-confirm-panel { width: min(520px, 96vw); }
.toast { position: fixed; z-index: 1000; right: 18px; bottom: 18px; max-width: 360px; padding: 11px 15px; border-radius: 7px; background: var(--text); color: var(--surface); box-shadow: var(--shadow); font-size: 12px; }
@media (max-width: 980px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid, .forum-layout { grid-template-columns: 1fr; }
  .thread-list { max-height: 320px; border-right: 0; border-bottom: 1px solid var(--line); }
  .settings-grid { grid-template-columns: 1fr; }
  .project-picker span, .user-chip span { display: none; }
  .project-picker select { min-width: 140px; }
}
@media (max-width: 650px) {
  .global-nav { padding: 0 7px; }
  .global-nav .nav-item[data-route="settings"], .user-chip { display: none; }
  .project-nav { padding: 0 7px; }
  .view { padding: 18px 14px 30px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-field { grid-template-columns: 1fr; gap: 2px; }
  .search-input { min-width: 130px; }
  .table-toolbar #savePageButton, .table-toolbar #columnsButton { display: none; }
  .detail-edit-hint { display: none; }
  .detail-grid { min-width: 0; padding: 8px 8px 42px; }
}

/* GAS Scheduler/SchedView visual contract: dense, dark, fixed editing surface. */
#scheduleView .schedule-card.asset-conflict { box-shadow: 0 0 0 2px #ef4444, 0 2px 5px rgba(0,0,0,.4); }
#scheduleView .schedule-card-badge { position: relative; z-index: 2; display: inline-block; margin: 0 2px 2px; padding: 1px 4px; border-radius: 2px; background: rgba(0,0,0,.48); color: #fff; font-size: 7px; line-height: 1.4; }
#scheduleView .schedule-card-badge.conflict { background: #991b1b; }
#scheduleView .schedule-card-badge.camera { background: #1d4ed8; }
.schedule-task-editor { display: grid; gap: 8px; max-height: 34vh; overflow: auto; padding: 8px; border: 1px solid #263241; border-radius: 5px; background: #0b1118; }
.schedule-task-editor:empty { display: none; }
.schedule-task-field-control { display: flex; align-items: center; gap: 6px; color: #d7e0e8; }
.schedule-task-field-control > input:not([type="checkbox"]),
.schedule-task-field-control > select { min-width: 0; flex: 1 1 auto; }
.schedule-task-field-control > span { overflow: hidden; color: #8fa0b2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
#scheduleInspectorEmpty:has([data-schedule-close-gap]) { display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: left; }
#scheduleInspectorEmpty [data-schedule-close-gap] { border-color: #b45309; background: #78350f; color: #fef3c7; }
#scheduleView[data-schedule-surface="view"] #scheduleNewCard,
#scheduleView[data-schedule-surface="view"] #scheduleAuto { display: none; }
#scheduleView[data-schedule-surface="view"] .schedule-card { cursor: pointer; }
#scheduleView[data-schedule-surface="view"] .schedule-card-resizer { display: none; }
#scheduleView[data-schedule-surface="edit"] #scheduleQuickMode option[value="daily"] { display: none; }
.schedule-history-dialog { width: min(760px, calc(100vw - 28px)); }
.schedule-history-dialog > header { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.schedule-history-dialog > footer { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }
.schedule-history-list { display: grid; gap: 7px; min-height: 220px; max-height: 58vh; overflow: auto; padding: 12px; }
.schedule-history-local,
.schedule-history-item { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.schedule-history-local span { color: var(--muted); font-size: 11px; }
.schedule-history-item > div { display: grid; flex: 1 1 auto; gap: 3px; }
.schedule-history-item > div span { color: var(--muted); font-size: 10px; }
@media (max-width: 1240px) {
  .dashboard-parity-grid { grid-template-columns: minmax(210px, .7fr) minmax(420px, 1.4fr); }
  .dashboard-right-column { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .dashboard-parity-grid, .dashboard-right-column, .settings-proxy-grid, .debug-grid { grid-template-columns: 1fr; }
  .dashboard-right-column { grid-column: auto; }
  .forum-composer-grid { grid-template-columns: 1fr; }
}
