:root {
  --bg: #08111d;
  --bg-2: #0d1828;
  --panel: rgba(15, 28, 45, 0.92);
  --panel-strong: rgba(18, 34, 53, 0.98);
  --panel-soft: rgba(20, 36, 56, 0.78);
  --line: rgba(122, 154, 191, 0.16);
  --line-strong: rgba(122, 154, 191, 0.3);
  --text: #edf6ff;
  --muted: #8aa2be;
  --accent: #00b4e6;
  --accent-2: #3f86ff;
  --accent-soft: rgba(0, 180, 230, 0.14);
  --danger-soft: rgba(239, 91, 91, 0.16);
  --warning-soft: rgba(245, 158, 11, 0.16);
  --success-soft: rgba(46, 204, 113, 0.16);
  --shadow: 0 20px 50px rgba(0, 8, 20, 0.42);
  --status-neutral: #61748a;
  --status-todo: #ef5b5b;
  --status-doing: #f59e0b;
  --status-hold: #eab308;
  --status-done: #22c55e;
  --status-removed: #fb923c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(0, 180, 230, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(63, 134, 255, 0.14), transparent 22%),
    linear-gradient(180deg, #091321, var(--bg) 18%, var(--bg-2) 100%);
}

body.modal-open {
  overflow: hidden;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 17, 29, 0.86);
  backdrop-filter: blur(12px);
}

.app-topbar-left,
.app-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

body.logged-out .app-topbar {
  display: none;
}

.app-topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.app-topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease;
}

.app-topbar-help-link {
  justify-content: center;
  min-width: 34px;
  padding: 7px 0;
  font-weight: 700;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: #c64b42;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.nav-badge.hidden {
  display: none;
}

.app-topbar-link.is-active {
  border-color: rgba(0, 180, 230, 0.32);
  background: rgba(0, 180, 230, 0.12);
  color: var(--accent);
}

.app-topbar-link:hover {
  border-color: rgba(122, 154, 191, 0.24);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.app-topbar-user {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.app-topbar-user-button {
  border: 1px solid rgba(122, 154, 191, 0.18);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.app-topbar-user-button:hover {
  border-color: rgba(122, 154, 191, 0.28);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.app-topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-project-select {
  min-width: 220px;
  font-size: 13px;
  padding: 7px 10px;
}

.topbar-logout-button {
  width: 40px;
  min-width: 40px;
  padding: 8px;
  font-size: 18px;
  line-height: 1;
}

.topbar-note {
  margin-bottom: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 58px);
}

.shell.has-scene-sidebar {
  grid-template-columns: minmax(250px, 280px) minmax(0, 1fr);
}

body.logged-out .shell {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(54, 214, 232, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(7, 14, 24, 0.96), rgba(4, 9, 17, 1));
}

.login-screen.hidden {
  display: none;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(16, 28, 44, 0.95), rgba(10, 20, 33, 0.94));
  box-shadow: 0 24px 70px rgba(0, 8, 20, 0.5);
  position: relative;
  overflow: hidden;
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 224, 255, 0.55), transparent);
}

.login-brand {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.login-brand-compact {
  grid-template-columns: 72px minmax(0, 1fr);
}

.login-brand-icon {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(147, 169, 201, 0.28);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  background: rgba(7, 14, 24, 0.9);
}

.login-brand-compact .login-brand-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.login-brand-copy {
  min-width: 0;
}

.login-brand-copy h1 {
  margin: 2px 0 0;
}

.login-brand-copy .muted {
  margin: 8px 0 0;
}

.login-totp-step {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sidebar {
  display: none;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: rgba(10, 18, 29, 0.82);
  backdrop-filter: blur(10px);
  align-content: start;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
}

.shell.has-scene-sidebar .sidebar {
  display: grid;
}

.sidebar-section > button:only-child {
  width: 100%;
}

.content {
  padding: 20px;
  min-width: 0;
}

.sidebar .panel,
.timeline-track-sidebar .panel,
.sidebar-section,
.timeline-track-sidebar section {
  min-width: 0;
  overflow: hidden;
}

.sidebar form,
.timeline-track-sidebar form {
  min-width: 0;
}

.sidebar input,
.sidebar select,
.sidebar textarea,
.timeline-track-sidebar input,
.timeline-track-sidebar select,
.timeline-track-sidebar textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.sidebar .checksum-row,
.timeline-track-sidebar .checksum-row {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar input[type="file"],
.timeline-track-sidebar input[type="file"] {
  font-size: 12px;
}

.view {
  display: none;
}

.view.is-active {
  display: grid;
  gap: 18px;
}

.help-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.help-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.help-hero-panel {
  display: grid;
  gap: 18px;
}

.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.help-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.help-nav-link:hover,
.help-nav-link:focus-visible {
  border-color: rgba(0, 180, 230, 0.3);
  background: rgba(0, 180, 230, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.help-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.help-quick-card {
  display: grid;
  gap: 10px;
  min-height: 168px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 24, 40, 0.72);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.help-quick-card:hover,
.help-quick-card:focus-visible {
  border-color: rgba(0, 180, 230, 0.3);
  background: rgba(18, 34, 53, 0.98);
  transform: translateY(-2px);
  outline: none;
}

.help-quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(122, 154, 191, 0.2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 18px;
}

.help-quick-card strong {
  font-size: 16px;
}

.help-quick-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.help-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.help-flow-step {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 22, 36, 0.7);
}

.help-flow-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0, 180, 230, 0.28);
  background: rgba(0, 180, 230, 0.14);
  color: var(--accent);
  font-weight: 700;
}

.help-flow-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.help-accordion {
  display: grid;
  gap: 16px;
}

.help-accordion-item {
  padding: 0;
  overflow: hidden;
}

.help-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

.help-accordion-summary::-webkit-details-marker {
  display: none;
}

.help-accordion-summary::after {
  content: "+";
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.help-accordion-item[open] .help-accordion-summary {
  border-bottom: 1px solid var(--line);
}

.help-accordion-item[open] .help-accordion-summary::after {
  content: "−";
  color: var(--accent);
}

.help-accordion-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.help-subsection {
  display: grid;
  gap: 14px;
}

.help-subsection + .help-subsection {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.help-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.help-do,
.help-system {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.help-do h3,
.help-do h4,
.help-system h3,
.help-system h4,
.help-subsection h3 {
  margin-bottom: 0;
}

.help-do {
  border-color: rgba(0, 180, 230, 0.18);
  background: rgba(0, 180, 230, 0.08);
}

.help-system {
  border-color: rgba(122, 154, 191, 0.18);
  background: rgba(122, 154, 191, 0.07);
}

.help-example-box,
.help-warning-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
}

.help-example-box {
  border: 1px solid var(--line);
  background: rgba(4, 12, 24, 0.58);
}

.help-warning-box {
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.12);
}

.help-warning-box p,
.help-example-box p {
  margin: 0;
}

.help-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.help-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.help-role-card,
.help-checklist-card,
.help-trouble-card,
.help-glossary-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 22, 36, 0.7);
}

.help-role-meta {
  color: var(--muted);
  font-size: 13px;
}

.help-role-card p,
.help-trouble-card p,
.help-glossary-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.help-checklist-grid,
.help-troubleshooting-grid,
.help-glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.help-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.help-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
}

.help-checklist input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
  flex: 0 0 18px;
  border-radius: 5px;
  border: 1px solid rgba(122, 154, 191, 0.34);
  background: rgba(7, 16, 28, 0.98);
  box-shadow: none;
  vertical-align: top;
  margin-top: 2px;
  accent-color: var(--accent);
}

.help-checklist span {
  display: block;
  line-height: 1.45;
}

.help-callout-info,
.help-callout-warning,
.help-callout-success {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 8px;
}

.help-callout-info {
  border: 1px solid rgba(0, 180, 230, 0.26);
  background: rgba(0, 180, 230, 0.1);
}

.help-callout-warning {
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.12);
}

.help-callout-success {
  border: 1px solid rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.12);
}

.help-callout-info p,
.help-callout-warning p,
.help-callout-success p {
  margin: 0;
}

.help-rule-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 22, 36, 0.7);
}

.help-code-example {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 12, 24, 0.62);
}

.help-code-example code {
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(0, 180, 230, 0.1);
  color: var(--accent);
  font-size: 13px;
}

.help-example {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(4, 12, 24, 0.58);
}

.help-example code {
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(0, 180, 230, 0.1);
  color: var(--accent);
  font-size: 13px;
}

.help-shortcuts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: center;
}

@media (max-width: 980px) {
  .help-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .help-quick-grid,
  .help-flow,
  .help-two-col,
  .help-role-grid,
  .help-checklist-grid,
  .help-troubleshooting-grid,
  .help-glossary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .help-hero-grid {
    grid-template-columns: 1fr;
  }

  .help-nav,
  .help-quick-grid,
  .help-flow,
  .help-two-col,
  .help-role-grid,
  .help-checklist-grid,
  .help-troubleshooting-grid,
  .help-glossary-grid {
    grid-template-columns: 1fr;
  }

  .help-quick-grid,
  .help-flow,
  .help-role-grid,
  .help-checklist-grid,
  .help-troubleshooting-grid,
  .help-glossary-grid {
    display: grid;
  }

  .help-nav {
    display: grid;
  }
}

.view-switch-bar {
  display: flex;
  justify-content: center;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: -4px;
  margin-bottom: -2px;
  padding: 0 16px 4px;
  scrollbar-width: thin;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.02;
  margin-bottom: 12px;
}

h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

.lede,
.muted,
.meta-line {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.signature-note {
  margin-top: 18px;
  text-align: center;
  line-height: 1.5;
}

.panel-copy {
  margin: -4px 0 12px;
  line-height: 1.45;
}

.hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric,
.panel,
.task-card,
.calendar-item,
.upload-card,
.scene-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 20px;
}

.metric span {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.metric strong {
  font-size: 36px;
  font-weight: 700;
}

.metric-mini-list {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.metric-link,
.text-link,
.nav-link {
  color: inherit;
  text-decoration: none;
}

.metric-link {
  display: block;
}

.text-link {
  color: var(--accent-2);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.36);
}

.nav-link.is-active {
  border-color: rgba(187, 77, 45, 0.28);
  background: rgba(187, 77, 45, 0.1);
  color: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.7fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.dashboard-bottom-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.dashboard-secondary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 18px;
}

.panel-separator {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

.wide {
  min-width: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.section-action-button {
  width: auto;
  flex: 0 0 auto;
  align-self: center;
  padding: 8px 13px;
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
}

.planning-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.planning-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.view-switch {
  padding: 6px;
  border-color: rgba(53, 35, 20, 0.16);
  background: rgba(255, 248, 240, 0.92);
  box-shadow: 0 10px 24px rgba(71, 47, 24, 0.08);
}

.planning-switch-button {
  width: auto;
  min-width: 138px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
}

.workflow-switch {
  max-width: min(100%, calc(100vw - 56px));
  overflow-x: auto;
  overflow-y: hidden;
  justify-content: flex-start;
  scrollbar-width: thin;
}

.workflow-switch .workflow-tab-button {
  min-width: 0;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.planning-switch-button.is-active {
  background: rgba(49, 95, 114, 0.1);
  border-color: rgba(49, 95, 114, 0.18);
  color: var(--accent-2);
}

.section-split {
  display: grid;
  gap: 18px;
}

.bulk-phase-panel {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(49, 95, 114, 0.16);
  border-radius: 8px;
  background: rgba(49, 95, 114, 0.06);
}

.scene-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 220px));
  gap: 10px;
}

.bulk-phase-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.phase-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.phase-summary-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.phase-summary-short {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
}

.phase-summary-card strong {
  font-size: 28px;
}

.workflow-summary-grid,
.workflow-department-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.workflow-department-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.workflow-summary-card,
.workflow-card,
.workflow-row {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
}

.workflow-summary-card {
  padding: 14px;
}

.workflow-summary-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.workflow-summary-card span {
  color: var(--muted);
  font-size: 14px;
}

.workflow-panel {
  margin-top: 18px;
}

.workflow-section-card {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(63, 155, 229, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(10, 27, 44, 0.72), rgba(15, 36, 57, 0.54));
}

.workflow-setup-summary-grid {
  display: grid;
  grid-template-columns: minmax(320px, 2fr) minmax(180px, 1fr);
  gap: 12px;
}

.workflow-setup-tech-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.workflow-card {
  padding: 14px;
  min-height: 180px;
}

.workflow-department-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  padding: 16px;
  border-color: rgba(63, 155, 229, 0.28);
  background:
    linear-gradient(135deg, rgba(11, 33, 53, 0.96), rgba(13, 23, 38, 0.98)),
    var(--panel);
}

.workflow-department-card-top,
.workflow-department-actions,
.workflow-department-item-main,
.workflow-department-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workflow-department-card-top {
  justify-content: space-between;
  align-items: flex-start;
}

.workflow-department-card h3 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.05;
}

.workflow-department-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.workflow-department-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(0, 153, 255, 0.12);
  border: 1px solid rgba(0, 153, 255, 0.22);
  font-size: 18px;
  font-weight: 800;
}

.workflow-department-type-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workflow-department-type-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workflow-department-type-strip strong {
  color: var(--text);
}

.workflow-department-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.workflow-department-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(4, 16, 29, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.workflow-department-item strong {
  line-height: 1.25;
}

.workflow-department-item small {
  color: var(--muted);
  line-height: 1.35;
}

.workflow-department-item-type {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workflow-department-footer {
  justify-content: space-between;
  min-height: 34px;
}

.workflow-setup-card {
  min-height: 0;
}

.workflow-setup-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.workflow-setup-naming code {
  font-size: 12px;
}

.workflow-setup-template {
  color: var(--text);
  line-height: 1.5;
  white-space: normal;
}

.workflow-setup-admin {
  border-color: rgba(0, 138, 214, 0.34);
  background: linear-gradient(180deg, rgba(228, 246, 255, 0.78), rgba(255, 255, 255, 0.72));
}

.workflow-setup-form {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.workflow-setup-film-title-field {
  grid-column: 1 / span 2;
}

.workflow-setup-film-code-field {
  grid-column: 3;
}

.workflow-setup-technical-row,
.workflow-setup-responsibles,
.workflow-setup-template-field {
  grid-column: 1 / -1;
}

.workflow-setup-technical-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.workflow-setup-responsibles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.workflow-setup-readonly-note {
  padding: 12px 2px 0;
}

.workflow-card-head,
.workflow-mini-row,
.workflow-row {
  display: flex;
  gap: 12px;
}

.workflow-card-head {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.workflow-card-list,
.workflow-list {
  display: grid;
  gap: 10px;
}

.workflow-mini-row {
  align-items: flex-start;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.workflow-mini-row small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.workflow-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--status-neutral);
}

.workflow-status-to-upload,
.workflow-status-waiting,
.workflow-status-todo {
  background: var(--status-todo);
}

.workflow-status-partial,
.workflow-status-in-progress,
.workflow-status-review,
.workflow-status-uploading,
.workflow-status-issue,
.workflow-status-removed,
.workflow-status-rejected {
  background: var(--status-doing);
}

.workflow-status-complete,
.workflow-status-done,
.workflow-status-uploaded,
.workflow-status-downloaded,
.workflow-status-approved {
  background: var(--status-done);
}

.workflow-row {
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px;
}

.workflow-shot-thumb {
  flex: 0 0 88px;
  width: 88px;
  height: 66px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 180, 230, 0.18);
  background: rgba(4, 18, 28, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.workflow-shot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.workflow-shot-thumb.is-empty {
  display: grid;
  place-items: center;
}

.workflow-shot-thumb.is-empty span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.workflow-row-main {
  min-width: 0;
  flex: 1 1 auto;
}

.workflow-row-main strong,
.workflow-row-main span,
.workflow-row-main p {
  display: block;
}

.workflow-row-main p {
  margin: 6px 0 0;
  color: var(--text);
}

.workflow-row-main .workflow-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.workflow-row-main .workflow-row-title strong,
.workflow-row-main .workflow-row-title span,
.workflow-row-main .workflow-dialogue-line strong {
  display: inline;
}

.workflow-row-title-separator {
  color: var(--text-muted);
  opacity: 0.7;
}

.workflow-dialogue-line strong {
  font-weight: 800;
}

.workflow-inline-form {
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: min(560px, 100%);
  justify-content: end;
}

.workflow-inline-form-wide {
  grid-template-columns: minmax(130px, 160px) auto auto minmax(140px, 1fr) minmax(140px, 1fr) minmax(160px, 1fr) auto;
}

.workflow-inline-form-ingest {
  grid-template-columns: minmax(130px, 160px) minmax(180px, 1fr) auto auto auto;
}

.workflow-inline-form-export {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: min(100%, 820px);
  margin-left: auto;
}

.workflow-inline-form-export select[name="status"] {
  flex: 0 0 160px;
  width: 160px;
}

.workflow-inline-form-export input[name="notes"] {
  flex: 0 1 260px;
  min-width: 220px;
}

.workflow-inline-form input,
.workflow-inline-form select {
  width: 100%;
}

.workflow-row-export-transfer {
  grid-column: 1 / -1;
  margin-top: 6px;
}

.workflow-panel .workflow-row-export-transfer {
  display: none;
}

.workflow-export-download-meta {
  margin-top: 4px;
}

.turnover-panel {
  display: grid;
  gap: 14px;
}

.turnover-create-form {
  grid-template-columns: minmax(150px, 220px) minmax(180px, 1fr) minmax(180px, 1fr) max-content max-content;
}

.turnover-create-actions {
  justify-content: flex-start;
}

.turnover-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.avid-backup-form .upload-transfer,
.avid-backup-form .button-row {
  grid-column: 1 / -1;
}

.turnover-column,
.turnover-session-detail,
.turnover-file-list {
  display: grid;
  gap: 8px;
}

.turnover-column {
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 13, 23, 0.34);
}

.turnover-file-list {
  max-height: 180px;
  overflow: auto;
  font-size: 12px;
}

.turnover-server-destinations {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.turnover-destination-levels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  gap: 10px;
}

.turnover-destination-levels label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.turnover-destination-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(20, 157, 219, 0.28);
  border-radius: 8px;
  background: rgba(8, 22, 37, 0.72);
}

.turnover-destination-preview small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.turnover-destination-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px;
  border: 1px solid rgba(63, 155, 229, 0.2);
  border-radius: 8px;
  background: rgba(8, 22, 37, 0.72);
  cursor: pointer;
}

.turnover-destination-row.is-selected {
  border-color: rgba(20, 157, 219, 0.76);
  box-shadow: 0 0 0 1px rgba(20, 157, 219, 0.28);
}

.turnover-destination-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.turnover-destination-row small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.turnover-file-list span {
  overflow-wrap: anywhere;
}

.turnover-actions {
  justify-content: flex-end;
}

.turnover-table-head {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.turnover-table-head label {
  display: grid;
  gap: 5px;
  min-width: 180px;
}

.turnover-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.turnover-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.turnover-table th,
.turnover-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(63, 155, 229, 0.14);
  text-align: left;
  vertical-align: top;
}

.turnover-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(4, 13, 23, 0.32);
}

.turnover-table tr.is-selected td {
  background: rgba(20, 157, 219, 0.1);
}

.turnover-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.export-references-panel {
  display: grid;
  gap: 14px;
}

.export-references-group {
  display: grid;
  gap: 8px;
}

.export-references-group strong {
  font-size: 13px;
}

.export-reference-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.export-reference-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(49, 95, 114, 0.18);
  background: rgba(49, 95, 114, 0.08);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
}

.export-reference-card.is-roll {
  border-color: rgba(216, 107, 66, 0.28);
  background: rgba(216, 107, 66, 0.1);
  color: var(--accent);
}

.workflow-ingest-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.workflow-notification-row {
  justify-content: flex-start;
}

.workflow-row-editing {
  grid-template-columns: minmax(0, 1fr) auto;
}

.workflow-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-left: auto;
  flex: 0 0 auto;
}

.workflow-turnover-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 0 0 2px rgba(2, 6, 23, 0.3);
}

.workflow-turnover-dot.is-sent {
  border-color: rgba(34, 197, 94, 0.75);
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16), 0 0 14px rgba(34, 197, 94, 0.35);
}

.workflow-panel-head {
  align-items: center;
}

.workflow-head-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.workflow-head-separator {
  color: var(--text-muted);
  opacity: 0.45;
  font-weight: 700;
  line-height: 1;
  padding: 0 2px;
}

.workflow-inline-select {
  display: inline-grid;
  gap: 4px;
  min-width: 180px;
}

.workflow-inline-select span {
  font-size: 12px;
}

.workflow-inline-select select {
  min-width: 180px;
}

.workflow-panel-head .workflow-inline-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.workflow-panel-head .workflow-inline-select span {
  flex: 0 0 auto;
  line-height: 1;
}

.workflow-panel-head .workflow-inline-select select {
  min-width: 160px;
}

.workflow-shot-status-control {
  display: inline-grid;
  gap: 2px;
  min-width: 145px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
}

.workflow-shot-status-control span {
  font-size: 11px;
  line-height: 1;
  opacity: 0.82;
}

.workflow-shot-status-control select {
  min-width: 0;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.workflow-shot-status-control select:focus {
  outline: none;
}

.workflow-shot-status-control option {
  color: #0f172a;
}

.workflow-inline-form-sync-bulk {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(150px, 190px) auto;
  margin-bottom: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: center;
}

.workflow-inline-form-sync-bulk input[name="scene_codes"] {
  min-width: 320px;
}

.workflow-inline-form-sync-bulk select[name="status"] {
  max-width: 190px;
}

.project-purge-dialog {
  width: min(980px, calc(100vw - 36px));
}

.purge-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.purge-summary-grid > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.purge-summary-grid strong,
.purge-summary-grid span {
  display: block;
}

.purge-summary-grid strong {
  font-size: 18px;
}

.purge-summary-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.purge-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.purge-preview-grid h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.purge-preview-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
}

.purge-preview-item {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.purge-preview-item:last-child {
  border-bottom: 0;
}

.purge-preview-item span,
.purge-preview-item small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.workflow-editing-thumb {
  display: block;
  width: 120px;
  height: 80px;
  object-fit: cover;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.editing-upload-preview {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.editing-preview-dialog {
  width: min(1100px, 94vw);
}

.editing-preview-content {
  min-height: 420px;
}

.editing-preview-media,
.editing-preview-frame {
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.editing-preview-media {
  object-fit: contain;
}

.editing-preview-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.editing-preview-card small {
  color: var(--muted);
}

.scene-editing-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.upload-dropzone {
  display: grid;
  place-items: center;
  min-height: 108px;
  padding: 14px;
  border: 1px dashed rgba(85, 59, 37, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--muted);
  text-align: center;
}

.upload-dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(217, 122, 69, 0.08);
  color: var(--text);
}

.folder-browser-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.folder-browser-row {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.folder-browser-row:hover {
  border-color: var(--accent);
  background: #fff;
}

.folder-browser-row span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.stack {
  display: grid;
  gap: 10px;
}

.compact {
  gap: 8px;
}

input,
select,
textarea,
button,
summary {
  width: 100%;
  border-radius: 8px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 16, 28, 0.9);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.inline-check input {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.inline-check span {
  line-height: 1.25;
}

.checksum-toggle,
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 16, 28, 0.9);
  color: var(--muted);
  font-size: 12px;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.checksum-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  width: 100%;
  position: relative;
  isolation: isolate;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 18, 31, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.checksum-profile-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.checksum-toggle input,
.checkbox-row input {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.checksum-toggle span,
.checkbox-row span {
  line-height: 1.25;
}

.timeline-picture-lock-toggle {
  border-color: rgba(63, 155, 229, 0.28);
  background:
    linear-gradient(135deg, rgba(18, 42, 73, 0.92), rgba(20, 29, 50, 0.88));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(94, 184, 255, 0.08);
}

.timeline-picture-lock-toggle span {
  color: inherit;
}

.checksum-profile-select {
  width: 100%;
  min-width: 0;
  font-size: 12px;
  padding: 8px 10px;
  position: relative;
  z-index: 1;
}

.checksum-profile-select:disabled {
  opacity: 0.6;
}

.checksum-profile-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.checksum-row.is-disabled .checksum-profile-note {
  color: var(--muted);
}

.scene-create-form .checksum-toggle {
  display: flex;
}

.scene-create-form .checksum-row {
  grid-column: 1 / -1;
}

button {
  border: 0;
  padding: 11px 14px;
  background: linear-gradient(135deg, var(--accent), #d86b42);
  color: #fff8f3;
  cursor: pointer;
}

.ghost-button {
  width: auto;
  background: rgba(32, 21, 13, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
}

.danger-button {
  color: #9b2f27;
  border-color: rgba(198, 75, 66, 0.28);
  background: rgba(198, 75, 66, 0.08);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(49, 95, 114, 0.1);
  border: 1px solid rgba(49, 95, 114, 0.18);
}

.table-wrap {
  overflow-x: auto;
}

.editing-online-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}

.editing-online-list,
.editing-online-day-card {
  gap: 12px;
}

.editing-online-day-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: start;
  padding: 12px;
}

.editing-online-day-card.is-selected {
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2) inset;
}

.editing-online-day-button {
  width: 100%;
  display: grid;
  gap: 4px;
  align-self: start;
  padding: 2px 0;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.editing-online-day-scenes {
  display: grid;
  gap: 8px;
  align-content: start;
}

.editing-online-scene-chip {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  background: rgba(15, 23, 42, 0.38);
  color: #e2e8f0;
  cursor: pointer;
}

.editing-online-scene-chip-files {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #93c5fd;
}

.editing-online-scene-chip.is-active {
  border-color: rgba(56, 189, 248, 0.44);
  background: rgba(8, 47, 73, 0.68);
}

.editing-online-scene-chip-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  margin-left: auto;
}

.editing-online-sheet-card {
  gap: 14px;
}

.editing-online-sheet-dialog {
  width: calc(100vw - 4px);
  max-width: calc(100vw - 4px);
  min-height: calc(100vh - 4px);
  max-height: calc(100vh - 4px);
  padding: 10px;
}

.editing-online-sheet-fullscreen {
  display: grid;
  gap: 12px;
  min-height: calc(100vh - 72px);
}

.editing-online-sheet-fullscreen-head {
  align-items: end;
}

.editing-online-sheet-summary textarea,
.editing-online-table textarea {
  min-height: 56px;
}

.editing-online-table input,
.editing-online-table select,
.editing-online-table textarea {
  min-width: 100%;
  font-size: 0.78rem;
  padding: 8px 9px;
}

.editing-online-input {
  width: 100%;
}

.editing-online-input-short {
  width: 9ch;
  min-width: 9ch !important;
  max-width: 9ch;
}

.editing-online-input-scene {
  width: 12ch;
  min-width: 12ch !important;
  max-width: 12ch;
}

.editing-online-input-mini {
  width: 6ch;
  min-width: 6ch !important;
  max-width: 6ch;
}

.editing-online-input-sync {
  width: 10ch;
  min-width: 10ch !important;
  max-width: 10ch;
}

.editing-online-input-rating {
  width: 8ch;
  min-width: 8ch !important;
  max-width: 8ch;
}

.editing-online-input-time {
  width: 11ch;
  min-width: 11ch !important;
  max-width: 11ch;
}

.editing-online-table-wrap {
  overflow: auto;
}

.editing-online-table th {
  white-space: nowrap;
  font-size: 0.68rem;
  padding: 6px 4px;
}

.editing-online-table td {
  padding: 6px 4px;
}

.editing-online-table td:nth-child(1),
.editing-online-table td:nth-child(2),
.editing-online-table td:nth-child(4),
.editing-online-table td:nth-child(5),
.editing-online-table td:nth-child(6),
.editing-online-table td:nth-child(7),
.editing-online-table td:nth-child(10),
.editing-online-table td:nth-child(11),
.editing-online-table td:nth-child(12) {
  min-width: 82px;
}

.editing-online-table td:nth-child(3) {
  min-width: 104px;
}

.editing-online-table td:nth-child(8),
.editing-online-table td:nth-child(9) {
  min-width: 180px;
}

.editing-online-controls {
  display: grid;
  gap: 6px;
  min-width: 162px;
}

.editing-online-controls .ghost-button,
.editing-online-sheet-actions .ghost-button,
.editing-online-sheet-actions .section-action-button,
.editing-online-sheet-fullscreen-head .ghost-button,
.editing-online-sheet-fullscreen-head .section-action-button {
  min-height: 38px;
}

.editing-online-controls-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.editing-online-controls-row:first-child {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editing-online-sheet-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.editing-online-empty-sheet {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.editing-online-timer-dialog {
  width: min(100vw - 40px, 860px);
  max-width: min(100vw - 40px, 860px);
}

.editing-online-files-dialog {
  width: min(100vw - 40px, 860px);
  max-width: min(100vw - 40px, 860px);
}

.editing-online-timer-shell {
  display: grid;
  gap: 16px;
}

.editing-online-timer-hero {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: rgba(127, 29, 29, 0.08);
}

.editing-online-timer-big {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1;
  font-weight: 700;
  color: #fecaca;
}

.editing-online-running-dot.is-large {
  width: 18px;
  height: 18px;
}

.editing-online-timer-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.editing-online-timer-note-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.editing-online-note-text-label {
  min-width: 0;
}

.editing-online-running-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #fda4af;
  padding: 4px 2px 0;
}

.editing-online-running-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: editing-online-pulse 1.2s infinite;
}

.editing-online-table tr.is-running {
  background: rgba(127, 29, 29, 0.08);
}

@keyframes editing-online-pulse {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

@media (max-width: 1180px) {
  .editing-online-layout {
    grid-template-columns: 1fr;
  }

  .editing-online-day-card {
    grid-template-columns: 1fr;
  }
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.admin-row-button {
  min-width: 96px;
}

.admin-test-suite-status {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.5);
}

.admin-test-suite-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-test-suite-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: #e2e8f0;
  background: rgba(71, 85, 105, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.admin-test-suite-badge.is-good {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.admin-test-suite-badge.is-slow {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(234, 179, 8, 0.35);
  color: #fde68a;
}

.admin-test-suite-badge.is-critical {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.admin-test-suite-output {
  margin: 10px 0 0;
  padding: 12px;
  max-height: 280px;
  overflow: auto;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.project-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.project-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.project-check-item input {
  width: auto;
  margin: 0;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.timeline-subview-panel {
  display: grid;
  gap: 14px;
}

.view[data-view="timeline"] .view-switch-bar {
  margin-bottom: 14px;
}

.timeline-subview-panel.hidden {
  display: none;
}

.timeline-track-shell {
  display: grid;
  grid-template-columns: minmax(250px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.timeline-track-shell.hidden {
  display: none;
}

.timeline-track-sidebar {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  overflow: hidden;
}

.timeline-track-main {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.timeline-board-copy {
  margin-top: -2px;
}

.montage-board-section {
  display: grid;
  gap: 10px;
}

.montage-board-shell {
  --montage-board-zoom: 1;
}

.montage-board-toolbar {
  align-items: center;
  gap: 14px;
}

.montage-board-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.montage-board-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.montage-board-zoom-controls .ghost-button,
.montage-board-upload-button {
  min-height: 34px;
  padding: 8px 12px;
}

.timeline-board-copy.is-success {
  color: var(--accent-2);
}

.montage-board-copy-extra {
  color: var(--muted);
}

.montage-board-section-removed {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.montage-board-removed-head {
  margin-bottom: 0;
}

.montage-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(108px, calc(260px * var(--montage-board-zoom, 1)), 320px), 1fr));
  gap: 14px;
  min-height: 72px;
  padding: 4px;
  border: 1px dashed transparent;
  border-radius: 12px;
  transition: border-color 140ms ease, background 140ms ease;
}

.montage-board-grid.is-drop-target {
  border-color: rgba(0, 180, 230, 0.34);
  background: rgba(0, 180, 230, 0.08);
}

.montage-board-card {
  position: relative;
  user-select: none;
  display: grid;
  gap: calc(8px * var(--montage-board-zoom, 1));
  padding-top: calc(28px + 16px * var(--montage-board-zoom, 1));
  min-height: clamp(124px, calc(240px * var(--montage-board-zoom, 1)), 320px);
  grid-column: span var(--montage-card-span, 1);
}

.montage-board-card[draggable="true"] {
  cursor: grab;
}

.montage-board-card.is-dragging {
  opacity: 0.4;
  transform: scale(0.98);
}

.montage-board-card.is-drop-target {
  border-color: rgba(0, 180, 230, 0.42);
  box-shadow: 0 0 0 2px rgba(0, 180, 230, 0.14);
}

.montage-board-card.is-removed {
  opacity: 0.86;
}

.montage-board-card-action {
  position: absolute;
  top: calc(6px + 4px * var(--montage-board-zoom, 1));
  right: calc(6px + 4px * var(--montage-board-zoom, 1));
  z-index: 1;
}

.montage-board-card-action.is-symbol {
  min-width: 32px;
  min-height: 32px;
  padding: 6px 10px;
  line-height: 1;
}

.montage-board-image-strip {
  display: flex;
  gap: 6px;
  align-items: stretch;
  overflow: hidden;
  min-height: clamp(58px, calc(96px * var(--montage-board-zoom, 1)), 132px);
}

.montage-board-card.has-multiple-images .montage-board-image-strip {
  min-height: clamp(62px, calc(104px * var(--montage-board-zoom, 1)), 140px);
}

.montage-board-image {
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0, 180, 230, 0.18);
  background: rgba(4, 18, 28, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.montage-board-card.is-compact .scene-tile-title {
  font-size: 13px;
  line-height: 1.2;
}

.montage-board-card.is-minimal {
  gap: 6px;
}

.montage-board-card.is-minimal .scene-tile-top {
  min-height: auto;
}

.montage-board-card.is-minimal .scene-code {
  font-size: 11px;
}

.montage-board-empty {
  min-height: 72px;
  display: grid;
  place-items: center;
}

@media (max-width: 1080px) {
  .timeline-track-shell {
    grid-template-columns: 1fr;
  }

  .montage-board-toolbar {
    align-items: start;
  }

  .montage-board-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .montage-board-card {
    grid-column: span 1;
  }
}

.scene-tile {
  padding: 14px;
  text-align: left;
  display: grid;
  gap: 10px;
  min-height: 210px;
}

.scene-tile.is-selected {
  border-color: rgba(49, 95, 114, 0.35);
  box-shadow: 0 18px 38px rgba(49, 95, 114, 0.16);
}

.scene-tile.is-unassigned {
  opacity: 0.54;
}

.scene-tile.is-assigned {
  opacity: 1;
}

.scene-tile.has-timeline-alert {
  border-color: rgba(204, 119, 35, 0.78);
  background: linear-gradient(180deg, rgba(255, 244, 226, 0.96), rgba(255, 252, 248, 0.96));
  box-shadow: 0 14px 28px rgba(204, 119, 35, 0.16);
}

.scene-tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.scene-code {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin-bottom: 4px;
}

.timeline-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #d4792f;
  color: #fffaf3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.scene-heading-block {
  display: grid;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(49, 95, 114, 0.08);
  border: 1px solid rgba(49, 95, 114, 0.14);
}

.scene-heading-block.is-sync-done {
  background: rgba(216, 137, 50, 0.22);
  border-color: rgba(216, 137, 50, 0.4);
}

.scene-heading-block.is-montaggio-done {
  background: rgba(45, 132, 86, 0.2);
  border-color: rgba(45, 132, 86, 0.36);
}

.scene-tile-title {
  font-size: 17px;
  line-height: 1.2;
  margin-bottom: 0;
  color: #000;
}

.scene-tile-summary {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  min-height: 56px;
}

.phase-legend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.phase-pill-full {
  grid-column: 1 / -1;
  min-height: 34px;
}

.phase-pill,
.legend-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scene-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(32, 21, 13, 0.38);
  backdrop-filter: blur(5px);
}

.scene-editor-overlay.hidden {
  display: none;
}

#folder-browser-overlay {
  z-index: 1200;
}

#asset-upload-finalizing-overlay {
  z-index: 1300;
}

#export-create-overlay,
#shooting-day-create-overlay,
#editing-upload-overlay,
#ingest-upload-overlay {
  z-index: 1000;
}

#editing-online-sheet-overlay {
  z-index: 900;
}

#editing-online-files-overlay,
#editing-online-timer-overlay,
#editing-online-rating-overlay,
#editing-online-scene-switch-overlay {
  z-index: 1100;
}

#editing-preview-overlay,
#download-status-overlay {
  z-index: 1200;
}

.scene-editor-dialog {
  width: min(1120px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 20px;
  background: rgba(255, 251, 245, 0.98);
  border: 1px solid rgba(53, 35, 20, 0.18);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(32, 21, 13, 0.28);
}

.account-panel-dialog {
  width: min(1080px, 100%);
}

.account-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.account-profile-form {
  gap: 14px;
}

.account-profile-form input[readonly],
.account-profile-form input:disabled {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(122, 154, 191, 0.22);
  color: rgba(237, 246, 255, 0.92);
  -webkit-text-fill-color: rgba(237, 246, 255, 0.92);
  opacity: 1;
  cursor: not-allowed;
}

#editing-online-sheet-overlay {
  padding: 2px;
  place-items: stretch;
}

#editing-online-sheet-overlay .editing-online-sheet-dialog {
  width: calc(100vw - 4px);
  max-width: calc(100vw - 4px);
  min-height: calc(100vh - 4px);
  max-height: calc(100vh - 4px);
  margin: 2px;
  padding: 10px;
  overflow: hidden;
}

#editing-online-sheet-overlay #editing-online-sheet-content {
  min-height: 100%;
}

#editing-online-sheet-overlay .editing-online-sheet-fullscreen {
  min-height: calc(100vh - 28px);
}

#editing-online-sheet-overlay .editing-online-table-wrap {
  overflow: auto;
}

#editing-online-sheet-overlay .editing-online-table {
  width: max-content;
  min-width: 100%;
}

#editing-online-sheet-overlay .editing-online-controls .ghost-button,
#editing-online-sheet-overlay .editing-online-sheet-actions .ghost-button,
#editing-online-sheet-overlay .editing-online-sheet-actions .section-action-button,
#editing-online-sheet-overlay .editing-online-sheet-fullscreen-head .ghost-button,
#editing-online-sheet-overlay .editing-online-sheet-fullscreen-head .section-action-button {
  min-height: 40px;
  height: 40px;
  padding-top: 0;
  padding-bottom: 0;
}

.asset-upload-finalizing-dialog {
  width: min(460px, 100%);
  max-height: none;
  text-align: center;
}

.finalizing-activity {
  position: relative;
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  margin: 4px auto 0;
}

.finalizing-spinner {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 4px solid rgba(187, 77, 45, 0.18);
  border-top-color: var(--accent);
  border-right-color: rgba(49, 95, 114, 0.75);
  animation: finalizing-spin 1.1s linear infinite;
}

.finalizing-pulse {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(187, 77, 45, 0.24);
  border-radius: 999px;
  animation: finalizing-pulse 2.6s ease-out infinite;
}

.finalizing-pulse-2 {
  animation-delay: 0.85s;
}

.finalizing-pulse-3 {
  animation-delay: 1.7s;
}

.finalizing-status-line {
  min-height: 24px;
  margin: 0;
  font-size: 11px;
  color: var(--text);
}

.finalizing-meta {
  min-height: 19px;
  margin: 0;
  font-size: 11px;
}

@keyframes finalizing-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes finalizing-pulse {
  0% {
    transform: scale(0.72);
    opacity: 0.68;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.scene-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 14px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(14, 24, 39, 0.98), rgba(10, 18, 29, 0.96));
  border-bottom: 1px solid var(--line);
}

.scene-editor-toolbar h2 {
  margin-bottom: 4px;
}

.scene-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.scene-editor-actions .ghost-button {
  min-width: 116px;
}

.status-not-required {
  background: var(--status-neutral);
}

.status-todo {
  background: var(--status-todo);
}

.status-doing {
  background: var(--status-doing);
}

.status-hold {
  background: var(--status-hold);
}

.status-done {
  background: var(--status-done);
}

.status-removed {
  background: var(--status-removed);
}

.scene-detail-head {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.detail-roll-box {
  min-width: 110px;
}

.scene-meta-form {
  display: grid;
  grid-template-columns: 160px minmax(240px, 1fr) minmax(260px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid rgba(53, 35, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.scene-meta-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.scene-meta-form input,
.scene-meta-form textarea {
  color: var(--text);
}

.scene-meta-form button {
  min-width: 120px;
}

.scene-create-dialog {
  max-width: 760px;
}

.scene-create-form {
  display: grid;
  grid-template-columns: 160px 110px minmax(260px, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(53, 35, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.scene-create-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.scene-create-heading,
.scene-create-summary,
.scene-create-actions {
  grid-column: 1 / -1;
}

.scene-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.scene-create-actions button {
  min-width: 120px;
}

.detail-roll-box label,
.phase-deadline label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.phase-table,
.task-list,
.calendar-list,
.upload-grid {
  display: grid;
  gap: 12px;
}

.task-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  align-items: stretch;
}

.phase-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(140px, 1fr) minmax(160px, 1.1fr) minmax(120px, 0.7fr) minmax(140px, 0.8fr);
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(53, 35, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.phase-name {
  display: grid;
  gap: 2px;
}

.phase-name strong {
  font-size: 13px;
}

.phase-meta {
  display: grid;
  gap: 2px;
}

.phase-meta-label {
  font-size: 12px;
  color: var(--muted);
}

.task-card {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(53, 35, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.task-grid .task-card {
  min-height: 260px;
}

.task-card-compact {
  min-height: 0;
}

.task-card.task-card-status-todo {
  border-color: rgba(198, 75, 66, 0.28);
  background: rgba(255, 244, 242, 0.96);
}

.task-card.task-card-status-doing {
  border-color: rgba(216, 137, 50, 0.3);
  background: rgba(255, 247, 236, 0.96);
}

.task-card.task-card-status-hold {
  border-color: rgba(184, 128, 34, 0.3);
  background: rgba(252, 246, 230, 0.96);
}

.task-card.task-card-status-done {
  border-color: rgba(45, 132, 86, 0.3);
  background: rgba(240, 251, 245, 0.96);
}

.task-card-top,
.task-card-footer,
.calendar-toolbar,
.calendar-item-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.task-card-footer {
  align-items: end;
}

.task-card-body {
  display: grid;
  align-content: start;
  gap: 8px;
}

.task-card-body h3,
.calendar-item-body h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.task-card-details {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.4;
}

.task-chip-row,
.task-card-meta,
.calendar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-chip,
.task-card-meta span,
.calendar-meta span,
.calendar-day-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(49, 95, 114, 0.08);
  border: 1px solid rgba(49, 95, 114, 0.12);
  color: var(--accent-2);
  font-size: 12px;
}

.task-inline-control {
  display: grid;
  gap: 6px;
  flex: 1;
  font-size: 12px;
  color: var(--muted);
}

.task-inline-control select {
  min-width: 0;
}

.task-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.calendar-shell {
  display: grid;
  gap: 16px;
}

.calendar-board {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.calendar-toolbar {
  align-items: center;
}

.calendar-toolbar-copy {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.calendar-toolbar-copy h3 {
  margin-bottom: 0;
  text-transform: capitalize;
}

.calendar-nav-button {
  width: auto;
  min-width: 150px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekdays span {
  padding: 0 4px;
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-day {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(53, 35, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 252, 248, 0.9);
  color: var(--text);
}

.calendar-day.is-outside {
  opacity: 0.48;
}

.calendar-day.has-events {
  border-color: rgba(187, 77, 45, 0.32);
  background: rgba(255, 245, 237, 0.98);
}

.calendar-day.is-selected {
  border-color: rgba(49, 95, 114, 0.38);
  box-shadow: 0 14px 30px rgba(49, 95, 114, 0.12);
}

.calendar-day-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.calendar-day-number {
  font-size: 18px;
  font-weight: 700;
}

.calendar-day-count {
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8f3;
  font-size: 11px;
  font-weight: 700;
}

.calendar-day-events {
  display: grid;
  gap: 6px;
}

.calendar-day-pill {
  max-width: 100%;
  justify-content: flex-start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
}

.calendar-item-compact {
  grid-template-columns: 1fr;
}

.calendar-item-date {
  display: grid;
  align-content: start;
  gap: 4px;
  padding-right: 8px;
  border-right: 1px solid rgba(53, 35, 20, 0.08);
}

.calendar-item-date strong {
  font-size: 17px;
}

.calendar-item-date span {
  color: var(--muted);
  font-size: 12px;
}

.calendar-item-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.calendar-item-copy {
  display: grid;
  gap: 8px;
}

.calendar-item-actions {
  align-items: center;
}

.upload-list {
  display: grid;
  gap: 10px;
}

.upload-row {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 251, 245, 0.88);
  box-shadow: var(--shadow);
}

.upload-row-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(120px, 0.7fr) minmax(150px, 0.9fr) minmax(110px, 0.7fr) auto;
  gap: 12px;
  align-items: center;
}

.upload-row-file {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.upload-row-file strong,
.upload-row-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-row-meta {
  font-size: 13px;
  color: var(--text);
}

.upload-row-actions {
  display: flex;
  justify-content: flex-end;
}

.upload-download-button {
  white-space: nowrap;
}

.upload-row-notes {
  padding-top: 2px;
}

.upload-row-transfer,
.upload-transfer {
  display: grid;
  gap: 6px;
}

.scene-editor-overlay .upload-transfer {
  grid-column: 1 / -1;
  width: 100%;
  align-self: stretch;
  gap: 10px;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(49, 95, 114, 0.08);
}

.scene-editor-overlay .upload-transfer .muted {
  display: block;
  min-height: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.scene-editor-overlay .upload-transfer .button-row {
  justify-content: flex-end;
  margin-top: 2px;
}

.download-strategy-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(49, 95, 114, 0.08);
}

.scene-editor-overlay .download-strategy-card {
  background: linear-gradient(180deg, rgba(9, 25, 40, 0.78), rgba(7, 17, 29, 0.86));
  border-color: rgba(0, 180, 230, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.download-strategy-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.download-strategy-card .button-row {
  justify-content: flex-end;
}

.upload-transfer-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(49, 95, 114, 0.12);
  overflow: hidden;
}

.scene-editor-overlay .upload-transfer-bar {
  height: 14px;
}

.upload-transfer-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #d86b42);
}

.chat-shell {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: 16px;
}

.chat-sidebar,
.chat-thread {
  min-width: 0;
  border: 1px solid rgba(53, 35, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 252, 248, 0.72);
}

.chat-sidebar {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.chat-new-form,
.chat-message-form {
  display: grid;
  gap: 8px;
}

.chat-new-form textarea,
.chat-message-form textarea {
  resize: vertical;
}

.chat-mention-field {
  position: relative;
  display: grid;
}

.chat-mention-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 30;
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(49, 95, 114, 0.22);
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 18px 44px rgba(52, 36, 23, 0.16);
}

.chat-mention-option {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  color: var(--text);
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.chat-mention-option:hover {
  background: rgba(236, 246, 247, 0.9);
}

.chat-mention-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.chat-participant-block {
  display: grid;
  gap: 6px;
}

.chat-participant-checklist {
  max-height: 132px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(53, 35, 20, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.chat-participant-checklist .project-check-item {
  align-items: center;
}

.chat-participant-checklist small {
  color: var(--muted);
}

.chat-form-note {
  line-height: 1.35;
}

.chat-discussions-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
}

.chat-discussion-item {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 11px;
  text-align: left;
  color: var(--text);
  border: 1px solid rgba(53, 35, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.chat-discussion-item:hover,
.chat-discussion-item.is-active {
  border-color: rgba(49, 95, 114, 0.28);
  background: rgba(236, 246, 247, 0.84);
}

.chat-discussion-item strong,
.chat-discussion-item span,
.chat-discussion-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-discussion-item span,
.chat-discussion-item small {
  color: var(--muted);
  font-size: 12px;
}

.chat-thread {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.communication-thread {
  grid-template-rows: 1fr;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(53, 35, 20, 0.1);
  border-radius: 8px;
}

.communication-detail {
  min-height: 280px;
  padding: 16px;
  overflow: auto;
}

.communication-card {
  display: grid;
  gap: 14px;
}

.communication-body {
  padding: 14px 16px;
  border: 1px solid rgba(53, 35, 20, 0.1);
  border-radius: 8px;
  background: #fffdfa;
  line-height: 1.5;
}

.videocall-embed-wrap {
  min-height: 520px;
  border: 1px solid rgba(53, 35, 20, 0.12);
  border-radius: 8px;
  overflow: hidden;
  background: #07111d;
}

.videocall-embed {
  display: block;
  width: 100%;
  height: min(68vh, 720px);
  min-height: 520px;
  border: 0;
}

.videocall-external-notice {
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(11, 27, 43, 0.86), rgba(13, 47, 63, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.videocall-external-notice p {
  max-width: 620px;
  margin: 0;
}

.videocall-external-notice h3 {
  color: var(--text);
}

.chat-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(53, 35, 20, 0.1);
}

.chat-thread-head h3 {
  margin-bottom: 4px;
}

.chat-thread-count {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(49, 95, 114, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.chat-thread-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.chat-thread-head-actions .ghost-button {
  padding: 8px 11px;
  font-size: 13px;
}

.chat-messages-list {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  overflow: auto;
}

.chat-message {
  max-width: min(680px, 88%);
  display: grid;
  gap: 5px;
}

.chat-message.is-own {
  justify-self: end;
}

.chat-message-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: var(--muted);
  font-size: 12px;
}

.chat-message.is-own .chat-message-meta {
  justify-content: flex-end;
}

.chat-bubble {
  padding: 11px 13px;
  border: 1px solid rgba(53, 35, 20, 0.1);
  border-radius: 8px;
  background: #fffdfa;
  line-height: 1.45;
  white-space: pre-wrap;
}

.chat-message.is-own .chat-bubble {
  border-color: rgba(49, 95, 114, 0.16);
  background: rgba(236, 246, 247, 0.9);
}

.chat-mention {
  color: var(--accent);
  font-weight: 700;
}

.chat-message-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  padding: 14px 16px;
  border-top: 1px solid rgba(53, 35, 20, 0.1);
  background: rgba(255, 248, 240, 0.6);
}

.chat-send-button {
  width: auto;
  height: 100%;
  padding: 8px 13px;
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
}

.chat-attachment-input {
  grid-column: 1 / -1;
  padding: 8px 10px;
  font-size: 13px;
}

.chat-attachment-list {
  display: grid;
  gap: 6px;
}

.chat-attachment-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(49, 95, 114, 0.14);
  border-radius: 8px;
  background: rgba(49, 95, 114, 0.07);
  color: var(--accent-2);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
}

.chat-attachment-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button-link {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.chat-attachments-panel {
  display: grid;
  gap: 10px;
}

.chat-attachment-row {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(53, 35, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.chat-attachment-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.chat-attachment-row-top strong,
.chat-attachment-row-top span,
.chat-attachment-row-top small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-row-meta {
  color: var(--muted);
  font-size: 13px;
}

.chat-message-form.is-disabled {
  opacity: 0.58;
  pointer-events: none;
}

.deadline-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.agenda-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.agenda-date {
  font-size: 15px;
}

.agenda-lines {
  display: grid;
  gap: 8px;
}

.agenda-line {
  display: grid;
  gap: 2px;
}

.agenda-phase {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-2);
}

.agenda-scenes {
  font-size: 14px;
  color: var(--text);
}

.timeline-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.timeline-summary-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.timeline-summary-card span {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-summary-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-info-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
}

.timeline-info-panel h3 {
  margin-bottom: 0;
  font-size: 16px;
}

.timeline-changes {
  display: grid;
  gap: 10px;
}

.timeline-version-list,
.timeline-change-list {
  display: grid;
  gap: 8px;
}

.timeline-version-list {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.timeline-version-card,
.timeline-change-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(53, 35, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 251, 245, 0.78);
}

.timeline-version-card span,
.timeline-change-card span {
  color: var(--muted);
  font-size: 12px;
}

.timeline-change-card.is-sync {
  border-color: rgba(45, 132, 86, 0.24);
  background: rgba(45, 132, 86, 0.08);
}

.timeline-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.timeline-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.timeline-filter-select {
  max-width: 240px;
}

.timeline-scroll-button {
  min-width: 104px;
  width: auto;
}

.timeline-track {
  overflow-x: scroll;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  padding: 10px 6px 14px;
  border: 1px solid rgba(49, 95, 114, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.46);
}

.timeline-ruler {
  min-width: max-content;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.timeline-scenes {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-width: max-content;
}

.timeline-roll-panel {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 116px;
  padding: 14px 10px;
  border: 1px dashed rgba(216, 107, 66, 0.45);
  border-radius: 8px;
  background: rgba(216, 107, 66, 0.08);
  color: var(--accent);
}

.timeline-roll-panel-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.timeline-roll-panel strong {
  font-size: 22px;
  color: var(--accent);
}

.timeline-roll-panel span:last-child {
  font-size: 12px;
  color: var(--text);
}

.timeline-scene {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  min-height: 300px;
  padding: 14px;
  border: 1px solid rgba(49, 95, 114, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 247, 238, 0.96));
  box-shadow: 0 12px 24px rgba(71, 47, 24, 0.08);
}

.timeline-scene.is-roll-start {
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

.timeline-scene-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(49, 95, 114, 0.12);
}

.timeline-scene-head-main {
  display: grid;
  gap: 6px;
}

.timeline-scene-head strong {
  color: #000;
  font-size: 18px;
}

.timeline-scene-head span,
.timeline-scene-meta {
  color: var(--muted);
  font-size: 12px;
}

.timeline-scene-head span {
  text-align: right;
}

.timeline-scene-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-scene-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(49, 95, 114, 0.08);
}

.timeline-roll-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(216, 107, 66, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.timeline-block {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.timeline-block-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-2);
}

.timeline-cuts,
.timeline-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: start;
  overflow: auto;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.timeline-cuts {
  max-height: 132px;
}

.timeline-markers {
  max-height: 96px;
}

.timeline-cuts span,
.timeline-marker {
  max-width: 100%;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-cuts span {
  border: 1px solid rgba(49, 95, 114, 0.2);
  background: rgba(49, 95, 114, 0.08);
  color: var(--accent-2);
}

.timeline-cuts em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.timeline-marker {
  color: #fff;
}

.timeline-marker-vfx {
  background: var(--status-done);
}

.timeline-marker-dub {
  background: var(--status-doing);
}

.timeline-marker-sfx {
  background: var(--accent-2);
}

.timeline-marker-note {
  background: var(--status-neutral);
}

.review-player-shell {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.review-video-sidebar {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.review-video-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.review-video-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.review-video-item.is-active {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.9);
}

.review-video-item span {
  font-size: 12px;
  color: var(--muted);
}

.review-video-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.review-video-item-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-video-delete {
  padding: 6px 8px;
  font-size: 12px;
}

.review-player-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.review-video-stage {
  position: relative;
  width: 100%;
}

.review-video-stage:fullscreen {
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  background: #000;
}

.review-video-stage:fullscreen .review-video-player {
  max-height: 100vh;
  height: auto;
}

.review-video-player {
  width: 100%;
  max-height: 66vh;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #050505;
}

.review-player-toolbar,
.review-marker-form {
  display: grid;
  gap: 10px;
  align-items: center;
}

.review-player-toolbar {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.review-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.review-section-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.review-section-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-panel-toggle {
  min-width: 132px;
}

.review-panel-toggle.is-active {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(49, 95, 114, 0.08);
}

.review-player-section {
  display: grid;
  gap: 12px;
}

.review-marker-form {
  grid-template-columns: 140px 150px minmax(0, 1fr) auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.review-marker-form.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.review-export-button.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.review-player-status {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.review-player-status strong,
.review-player-status span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-player-status span {
  color: var(--muted);
  font-size: 12px;
}

.review-player-sync-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.review-subtitle-strip-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.review-subtitle-strip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.review-subtitle-strip-scroll {
  margin-top: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}

.review-subtitle-strip {
  position: relative;
  height: 28px;
  min-width: 100%;
  border-radius: 8px;
  background: rgba(49, 95, 114, 0.08);
  overflow: hidden;
}

.review-subtitle-strip-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: rgba(187, 77, 45, 0.9);
  box-shadow: 0 0 0 1px rgba(187, 77, 45, 0.18);
  pointer-events: none;
  z-index: 3;
}

.review-subtitle-clip {
  position: absolute;
  top: 4px;
  bottom: 4px;
  min-width: 6px;
  border: 1px solid rgba(49, 95, 114, 0.38);
  border-radius: 6px;
  background: rgba(49, 95, 114, 0.24);
  cursor: pointer;
  z-index: 1;
}

.review-subtitle-clip.is-selected {
  border-color: rgba(187, 77, 45, 0.85);
  background: rgba(187, 77, 45, 0.22);
  z-index: 2;
}

.review-subtitle-clip.is-current {
  box-shadow: 0 0 0 1px rgba(45, 132, 86, 0.42);
  background: rgba(45, 132, 86, 0.18);
}

.review-subtitle-clip.is-selected.is-current {
  background: linear-gradient(90deg, rgba(187, 77, 45, 0.22), rgba(45, 132, 86, 0.18));
}

.review-subtitle-handle {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.88);
  cursor: ew-resize;
  z-index: 4;
}

.review-subtitle-handle[data-handle-side="start"] {
  left: -1px;
  border-radius: 6px 0 0 6px;
}

.review-subtitle-handle[data-handle-side="end"] {
  right: -1px;
  border-radius: 0 6px 6px 0;
}

.review-subtitle-display,
.review-subtitle-editor {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.review-subtitle-display {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  display: grid;
  gap: 8px;
  width: min(86%, 920px);
  transform: translateX(-50%);
  padding: 10px 16px 12px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
  pointer-events: none;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.review-subtitle-display-head,
.review-subtitle-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.review-subtitle-display-head span,
.review-subtitle-editor-head span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.review-subtitle-display-text {
  color: #fff;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.28;
  text-align: center;
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.95);
  word-break: break-word;
}

.review-subtitle-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 12px;
}

.review-subtitle-editor-main {
  display: grid;
  gap: 10px;
}

.review-subtitle-editor textarea {
  min-height: 108px;
  resize: vertical;
}

.review-subtitle-adjust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.review-subtitle-adjust-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(53, 35, 20, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.review-subtitle-adjust-card span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.review-subtitle-editor-actions {
  display: flex;
  justify-content: flex-end;
}

.review-subtitle-slide-card {
  grid-column: 1 / -1;
}

.review-subtitle-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.review-subtitle-row {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-align: left;
}

.review-subtitle-row strong {
  font-variant-numeric: tabular-nums;
}

.review-subtitle-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.review-subtitle-row.is-active {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px rgba(49, 95, 114, 0.08);
}

.review-subtitle-row.is-current {
  border-color: rgba(49, 95, 114, 0.34);
  background: rgba(49, 95, 114, 0.08);
}

.review-subtitle-row.is-active.is-current {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 1px rgba(49, 95, 114, 0.08),
    inset 4px 0 0 rgba(49, 95, 114, 0.9);
}

.review-player-progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(49, 95, 114, 0.12);
}

.review-player-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(49, 95, 114, 0.75), rgba(242, 127, 90, 0.9));
  transition: width 140ms linear;
}

.review-markers-list {
  display: grid;
  gap: 8px;
}

.review-player-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.review-nav-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.review-nav-panel-head {
  display: grid;
  gap: 2px;
}

.review-nav-panel-filters {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 8px;
}

.player-scene-nav-list,
.timeline-nav-markers-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.review-list-title {
  grid-column: 1 / -1;
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.player-scene-nav-card,
.timeline-nav-marker {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.player-scene-nav-card.is-active,
.timeline-nav-marker.is-active {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px rgba(49, 95, 114, 0.08);
}

.player-scene-nav-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.player-scene-nav-head span,
.player-scene-nav-heading,
.timeline-nav-marker span {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.player-scene-nav-heading {
  line-height: 1.35;
}

.player-scene-nav-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.player-scene-nav-meta span {
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(49, 95, 114, 0.08);
  color: var(--accent-2);
  font-size: 11px;
}

.timeline-nav-scene {
  border-color: rgba(17, 24, 39, 0.22);
}

.timeline-nav-vfx {
  border-color: var(--status-done);
}

.timeline-nav-dub {
  border-color: var(--status-doing);
}

.timeline-nav-sfx {
  border-color: var(--accent-2);
}

.timeline-nav-note {
  border-color: var(--status-neutral);
}

.review-marker-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--review-marker-color, var(--line-strong)) 44%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--review-marker-color, rgba(255, 255, 255, 0.55)) 12%, rgba(255, 255, 255, 0.55));
  box-shadow: inset 4px 0 0 var(--review-marker-color, transparent);
}

.review-marker-row.is-resolved {
  opacity: 0.9;
}

.review-marker-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.review-marker-row span {
  font-size: 12px;
  color: var(--muted);
}

.review-marker-task-link {
  font-weight: 600;
}

.review-marker-task-link.is-resolved {
  color: var(--status-done);
}

.review-marker-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.review-marker-time {
  border: 1px solid color-mix(in srgb, var(--review-marker-color, var(--line-strong)) 44%, var(--line));
  border-radius: 8px;
  padding: 8px;
  background: color-mix(in srgb, var(--review-marker-color, #111827) 14%, #111827);
  color: #fff;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.task-create-context {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(49, 95, 114, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.task-create-context strong,
.task-create-context span,
.task-create-context p {
  margin: 0;
}

.task-create-context strong {
  color: var(--text);
}

.task-create-context span,
.task-create-context p {
  margin: 0;
  color: var(--muted);
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.fatal {
  padding: 40px;
  white-space: pre-wrap;
}

details {
  margin-top: 12px;
}

summary {
  cursor: pointer;
  color: var(--accent-2);
}

@media (max-width: 1180px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }

  .bulk-phase-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-player-shell,
  .review-player-toolbar,
  .review-marker-form,
  .review-marker-row,
  .review-subtitle-editor,
  .review-subtitle-adjust-grid {
    grid-template-columns: 1fr;
  }

  .calendar-item {
    grid-template-columns: 1fr;
  }

  .calendar-item-date {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(53, 35, 20, 0.08);
    padding-bottom: 8px;
  }

  .upload-row-main {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 900px) {
  .app-topbar {
    padding: 10px 18px;
    display: grid;
    justify-content: stretch;
  }

  .app-topbar-left,
  .app-topbar-right,
  .app-topbar-controls {
    display: grid;
  }

  .topbar-project-select,
  .topbar-logout-button {
    width: 100%;
  }

  .app-topbar-user {
    white-space: normal;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .shell.has-scene-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .content {
    padding: 18px;
  }

  .phase-row {
    grid-template-columns: 1fr;
  }

  .scene-meta-form {
    grid-template-columns: 1fr;
  }

  .scene-create-form {
    grid-template-columns: 1fr;
  }

  .checksum-row {
    grid-template-columns: 1fr;
  }

  .scene-filters {
    grid-template-columns: 1fr;
  }

  .bulk-phase-form {
    grid-template-columns: 1fr;
  }

  .scene-detail-head {
    display: grid;
  }

  .scene-editor-overlay {
    align-items: stretch;
    padding: 12px;
  }

  .scene-editor-dialog {
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

  .scene-editor-toolbar {
    display: grid;
  }

  .scene-editor-actions {
    justify-content: stretch;
  }

  .scene-editor-actions .ghost-button {
    width: 100%;
  }

  .task-grid {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar,
  .task-card-footer,
  .calendar-item-actions {
    display: grid;
  }

  .calendar-nav-button,
  .task-card-actions .ghost-button,
  .calendar-item-actions .ghost-button {
    width: 100%;
  }

  .task-grid .task-card,
  .calendar-day {
    min-height: 0;
  }

  .calendar-board {
    overflow-x: auto;
  }

  .calendar-weekdays,
  .calendar-grid {
    min-width: 700px;
  }

  .chat-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .chat-sidebar,
  .chat-thread {
    min-height: 0;
  }

  .chat-messages-list {
    max-height: 520px;
  }

.chat-message {
    max-width: 100%;
  }
}

/* TrueNAS-inspired UI refresh */

::selection {
  background: rgba(0, 180, 230, 0.26);
  color: #fff;
}

.eyebrow,
.text-link,
.review-list-title,
.phase-summary-short,
.scene-code,
.timeline-roll-panel strong,
.timeline-scene-head strong {
  color: var(--accent);
}

.app-topbar-user,
.metric span,
.metric-mini-list,
.panel-copy,
.muted,
.meta-line,
.timeline-summary-card span,
.workflow-summary-card span,
.workflow-mini-row small,
.workflow-row-main p,
.timeline-scene-head span,
.timeline-scene-meta,
.review-video-item span,
.review-marker-row span,
.review-subtitle-row span,
.task-card-meta,
.task-card-details,
.calendar-item-meta,
.admin-table th,
.folder-browser-row span,
.editing-preview-card small,
.finalizing-meta,
.signature-note {
  color: var(--muted);
}

.metric,
.panel,
.task-card,
.calendar-item,
.upload-card,
.upload-row,
.scene-tile,
.workflow-summary-card,
.workflow-card,
.workflow-row,
.phase-summary-card,
.timeline-summary-card,
.timeline-info-panel,
.timeline-version-card,
.timeline-change-card,
.review-player-section,
.review-player-sync-card,
.review-nav-panel,
.review-video-item,
.editing-preview-card,
.purge-summary-grid > div,
.purge-preview-list,
.folder-browser-row,
.project-check-item,
.workflow-inline-form-sync-bulk,
.bulk-phase-panel,
.scene-editor-dialog,
.login-totp-step {
  background: linear-gradient(180deg, rgba(18, 31, 49, 0.96), rgba(13, 24, 39, 0.96));
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.panel,
.metric,
.workflow-summary-card,
.workflow-card,
.workflow-row,
.timeline-summary-card,
.timeline-info-panel,
.timeline-version-card,
.timeline-change-card,
.review-player-section,
.review-player-sync-card,
.review-nav-panel {
  backdrop-filter: blur(14px);
}

.hero {
  gap: 14px;
}

.metric {
  padding: 18px;
}

.metric strong,
.workflow-summary-card strong,
.timeline-summary-card strong {
  letter-spacing: 0;
  font-weight: 700;
}

.section-head {
  align-items: center;
}

.section-head h2,
.panel h2,
.workflow-card-head h3,
.timeline-info-panel h3 {
  font-weight: 650;
}

.planning-switch,
.view-switch,
.nav-link,
.checksum-toggle,
.scene-heading-block,
.project-check-item,
.folder-browser-row,
.purge-preview-list,
.editing-preview-media,
.editing-preview-frame,
.review-subtitle-row,
.review-subtitle-adjust-card,
.review-marker-row,
.player-scene-nav-card,
.timeline-nav-marker,
.upload-dropzone,
.task-card-compact,
.timeline-track,
.timeline-version-list,
.timeline-change-list,
.chat-sidebar,
.chat-thread,
.communication-thread,
.communication-body,
.chat-discussion-item,
.chat-participant-checklist,
.chat-bubble,
.chat-message-form,
.chat-attachment-row,
.agenda-card {
  background: rgba(12, 23, 38, 0.82);
  border-color: var(--line);
}

.view-switch {
  box-shadow: 0 16px 34px rgba(0, 8, 20, 0.34);
}

.planning-switch-button,
.app-topbar-link,
.ghost-button,
.timeline-scroll-button,
.timeline-filter-select,
.timeline-download-link,
.review-panel-toggle,
.review-subtitle-clip,
.timeline-nav-marker,
.scene-tile,
.review-video-item,
.folder-browser-row,
button,
input,
select,
textarea,
summary {
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

input,
select,
textarea {
  background: rgba(7, 16, 28, 0.9);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder,
textarea::placeholder {
  color: rgba(138, 162, 190, 0.78);
}

input[type="file"] {
  background: rgba(7, 16, 28, 0.92);
  color: var(--muted);
  color-scheme: dark;
  border-color: rgba(0, 180, 230, 0.18);
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid rgba(0, 180, 230, 0.22);
  border-radius: 7px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #009fd9, #2f6fff);
  color: #f3fbff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
  margin-right: 10px;
  border: 1px solid rgba(0, 180, 230, 0.22);
  border-radius: 7px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #009fd9, #2f6fff);
  color: #f3fbff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(0, 180, 230, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 180, 230, 0.14);
}

button {
  background: linear-gradient(135deg, #009fd9, #2f6fff);
  color: #f3fbff;
  border: 1px solid rgba(0, 180, 230, 0.22);
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 40, 88, 0.28);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 40, 88, 0.34);
}

.ghost-button,
.section-action-button,
.app-topbar-link,
.planning-switch-button,
.timeline-scroll-button,
.timeline-download-link,
.review-panel-toggle,
.review-export-button,
.timeline-filter-select {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.ghost-button:hover,
.section-action-button:hover,
.planning-switch-button:hover,
.timeline-scroll-button:hover,
.review-panel-toggle:hover,
.timeline-download-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
}

#workflow-shooting-panel [data-open-shooting-upload],
#workflow-editing-panel #workflow-open-editing-upload,
#workflow-editing-panel #editing-online-add-files,
#workflow-ingest-panel [data-ingest-upload-job],
#workflow-vfx-panel #open-vfx-images-upload,
#workflow-vfx-panel #open-vfx-bulk-upload,
#workflow-vfx-panel [data-upload-vfx-shot],
#workflow-sound-panel #open-sound-bulk-upload,
#workflow-sound-panel [data-upload-sound-roll],
#workflow-dub-panel #open-dub-bulk-upload,
#workflow-dub-panel [data-upload-dub-shot],
#workflow-lab-panel #open-lab-bulk-upload,
#workflow-lab-panel [data-upload-lab-roll],
#workflow-lab-panel #lab-color-upload-button,
#workflow-color-panel #open-color-bulk-upload,
#workflow-color-panel [data-upload-color-roll],
#workflow-mix-panel #open-mix-bulk-upload,
#workflow-mix-panel [data-upload-mix-roll],
#workflow-music-panel #open-music-upload,
#workflow-montaggio-panel #turnover-upload-button,
#workflow-montaggio-panel #open-montage-images-upload {
  background: rgba(56, 189, 248, 0.14);
  color: #d8f4ff;
  border-color: rgba(56, 189, 248, 0.36);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.12);
}

#workflow-shooting-panel [data-open-shooting-upload]:hover,
#workflow-editing-panel #workflow-open-editing-upload:hover,
#workflow-editing-panel #editing-online-add-files:hover,
#workflow-ingest-panel [data-ingest-upload-job]:hover,
#workflow-vfx-panel #open-vfx-images-upload:hover,
#workflow-vfx-panel #open-vfx-bulk-upload:hover,
#workflow-vfx-panel [data-upload-vfx-shot]:hover,
#workflow-sound-panel #open-sound-bulk-upload:hover,
#workflow-sound-panel [data-upload-sound-roll]:hover,
#workflow-dub-panel #open-dub-bulk-upload:hover,
#workflow-dub-panel [data-upload-dub-shot]:hover,
#workflow-lab-panel #open-lab-bulk-upload:hover,
#workflow-lab-panel [data-upload-lab-roll]:hover,
#workflow-lab-panel #lab-color-upload-button:hover,
#workflow-color-panel #open-color-bulk-upload:hover,
#workflow-color-panel [data-upload-color-roll]:hover,
#workflow-mix-panel #open-mix-bulk-upload:hover,
#workflow-mix-panel [data-upload-mix-roll]:hover,
#workflow-music-panel #open-music-upload:hover,
#workflow-montaggio-panel #turnover-upload-button:hover,
#workflow-montaggio-panel #open-montage-images-upload:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(125, 211, 252, 0.52);
}

.danger-button {
  color: #ffb4b4;
  border-color: rgba(239, 91, 91, 0.22);
  background: rgba(239, 91, 91, 0.1);
}

.danger-button:hover {
  background: rgba(239, 91, 91, 0.16);
}

.planning-switch-button.is-active,
.review-panel-toggle.is-active,
.app-topbar-link.is-active,
.nav-link.is-active,
.timeline-nav-marker.is-active,
.review-video-item.is-active,
.review-subtitle-row.is-active,
.player-scene-nav-card.is-active,
.folder-browser-row:hover {
  background: rgba(0, 180, 230, 0.12);
  border-color: rgba(0, 180, 230, 0.34);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(0, 180, 230, 0.1) inset;
}

.nav-badge {
  background: linear-gradient(135deg, #f15454, #ff8456);
  color: #fff;
}

.workflow-status,
.phase-pill,
.legend-dot {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.workflow-status-to-upload,
.workflow-status-waiting,
.workflow-status-todo {
  background: linear-gradient(135deg, rgba(239, 91, 91, 0.96), rgba(245, 107, 107, 0.96));
}

.workflow-status-partial,
.workflow-status-in-progress,
.workflow-status-review,
.workflow-status-uploading,
.workflow-status-issue,
.workflow-status-removed,
.workflow-status-rejected {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.96), rgba(251, 191, 36, 0.96));
  color: #201100;
}

.workflow-status-complete,
.workflow-status-done,
.workflow-status-uploaded,
.workflow-status-downloaded,
.workflow-status-approved {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.96), rgba(74, 222, 128, 0.96));
  color: #03210d;
}

/* Keep workflow phase-like statuses visually identical to the Scene legend. */
.workflow-status-todo {
  background: var(--status-todo);
  color: #fff;
}

.workflow-status-doing,
.workflow-status-review {
  background: var(--status-doing);
  color: #201100;
}

.workflow-status-hold {
  background: var(--status-hold);
  color: #201100;
}

.workflow-status-done {
  background: var(--status-done);
  color: #03210d;
}

.workflow-status-removed {
  background: var(--status-removed);
  color: #201100;
}

.scene-tile {
  min-height: 196px;
  gap: 8px;
}

.scene-tile.is-unassigned {
  opacity: 0.62;
}

.scene-tile.is-selected {
  border-color: rgba(0, 180, 230, 0.38);
  box-shadow: 0 16px 34px rgba(0, 30, 74, 0.34);
}

.scene-tile.has-timeline-alert {
  border-color: rgba(245, 158, 11, 0.48);
  background: linear-gradient(180deg, rgba(47, 31, 7, 0.95), rgba(20, 24, 33, 0.98));
  box-shadow: 0 16px 32px rgba(63, 37, 0, 0.24);
}

.scene-heading-block {
  background: rgba(63, 134, 255, 0.09);
  border-color: rgba(63, 134, 255, 0.16);
}

.scene-heading-block.is-sync-done {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.28);
}

.scene-heading-block.is-montaggio-done {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.28);
}

.scene-tile-title,
.task-card-body h3,
.review-video-item-head strong,
.timeline-scene-head strong,
.workflow-row-main strong {
  color: var(--text);
}

.scene-tile-summary {
  min-height: 52px;
}

.player-scene-nav-card,
.timeline-nav-marker,
.review-subtitle-adjust-card,
.review-marker-row,
.upload-row,
.chat-discussion-item,
.chat-attachment-row,
.chat-attachment-link,
.communication-body,
.agenda-card {
  background: rgba(255, 255, 255, 0.04);
}

.player-scene-nav-card:hover,
.timeline-nav-marker:hover,
.chat-discussion-item:hover,
.upload-row:hover,
.chat-attachment-row:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
}

.player-scene-nav-head span,
.player-scene-nav-heading,
.timeline-nav-marker span,
.chat-discussion-item span,
.chat-discussion-item small,
.chat-attachment-row-meta,
.upload-row-meta,
.upload-row-notes,
.agenda-phase {
  color: var(--muted);
}

.player-scene-nav-meta span,
.chat-thread-count,
.chat-attachment-link {
  background: rgba(63, 134, 255, 0.1);
  border: 1px solid rgba(63, 134, 255, 0.16);
  color: var(--accent);
}

.task-card.task-card-status-todo {
  background: linear-gradient(180deg, rgba(56, 18, 24, 0.96), rgba(20, 24, 33, 0.96));
  border-color: rgba(239, 91, 91, 0.26);
}

.task-card.task-card-status-doing {
  background: linear-gradient(180deg, rgba(66, 43, 8, 0.96), rgba(20, 24, 33, 0.96));
  border-color: rgba(245, 158, 11, 0.26);
}

.task-card.task-card-status-hold {
  background: linear-gradient(180deg, rgba(65, 56, 9, 0.96), rgba(20, 24, 33, 0.96));
  border-color: rgba(234, 179, 8, 0.24);
}

.task-card.task-card-status-done {
  background: linear-gradient(180deg, rgba(12, 51, 31, 0.96), rgba(20, 24, 33, 0.96));
  border-color: rgba(34, 197, 94, 0.24);
}

.timeline-track,
.review-video-sidebar,
.review-player-main {
  background: transparent;
}

.timeline-roll-panel {
  background: rgba(63, 134, 255, 0.08);
  border-color: rgba(63, 134, 255, 0.2);
}

.timeline-scene {
  background: linear-gradient(180deg, rgba(17, 31, 48, 0.98), rgba(10, 19, 31, 0.98));
  border-color: var(--line);
  box-shadow: 0 8px 18px rgba(0, 8, 20, 0.22);
}

.timeline-scene.is-roll-start {
  border-color: rgba(0, 180, 230, 0.3);
}

.timeline-cuts span,
.timeline-marker,
.timeline-roll-badge,
.chip {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

.timeline-marker-vfx {
  background: rgba(239, 91, 91, 0.2);
}

.timeline-marker-dub {
  background: rgba(245, 158, 11, 0.2);
}

.timeline-marker-sfx {
  background: rgba(63, 134, 255, 0.2);
}

.timeline-marker-note {
  background: rgba(34, 197, 94, 0.16);
}

.review-player-shell {
  gap: 14px;
}

.review-video-item {
  background: rgba(12, 23, 38, 0.92);
}

.review-video-item.is-active {
  box-shadow: 0 0 0 1px rgba(0, 180, 230, 0.14) inset, 0 14px 30px rgba(0, 23, 54, 0.3);
}

.review-player-toolbar,
.review-marker-form,
.review-subtitle-editor,
.review-subtitle-display,
.review-player-sync-card {
  background: linear-gradient(180deg, rgba(16, 30, 48, 0.96), rgba(11, 21, 34, 0.98));
  border-color: var(--line);
}

.review-subtitle-adjust-card {
  border-color: var(--line);
}

.review-subtitle-strip-scroll {
  background: rgba(8, 16, 28, 0.82);
  border-color: var(--line);
}

.review-subtitle-clip {
  background: rgba(63, 134, 255, 0.22);
  border-color: rgba(63, 134, 255, 0.44);
}

.review-subtitle-clip.is-selected {
  background: rgba(0, 180, 230, 0.24);
  border-color: rgba(0, 180, 230, 0.88);
}

.review-subtitle-clip.is-current {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.5);
}

.review-subtitle-clip.is-selected.is-current {
  background: linear-gradient(90deg, rgba(0, 180, 230, 0.26), rgba(34, 197, 94, 0.24));
}

.review-subtitle-row {
  background: rgba(255, 255, 255, 0.03);
}

.review-subtitle-row.is-current {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.1);
}

.review-subtitle-row.is-active,
.review-subtitle-row.is-active.is-current {
  border-color: rgba(0, 180, 230, 0.42);
  background: rgba(0, 180, 230, 0.12);
  color: var(--text);
  box-shadow:
    0 0 0 1px rgba(0, 180, 230, 0.1) inset,
    inset 4px 0 0 rgba(0, 180, 230, 0.9);
}

.review-subtitle-row.is-active strong,
.review-subtitle-row.is-active.is-current strong {
  color: #f4fbff;
}

.review-subtitle-row.is-active span,
.review-subtitle-row.is-active.is-current span {
  color: #c8def6;
}

.review-player-progress-track {
  background: rgba(255, 255, 255, 0.08);
}

.review-player-progress-bar {
  background: linear-gradient(90deg, #00b4e6, #3f86ff);
}

.review-subtitle-display {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.24));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

.scene-editor-overlay {
  background: rgba(4, 10, 18, 0.72);
}

.scene-editor-dialog,
.asset-upload-finalizing-dialog,
.editing-preview-dialog,
.project-purge-dialog {
  background: linear-gradient(180deg, rgba(14, 24, 39, 0.98), rgba(10, 18, 29, 0.98));
  border-color: var(--line-strong);
  color: var(--text);
}

.editing-preview-media,
.editing-preview-frame,
.review-video-player {
  background: #02060d;
}

.upload-dropzone {
  border-style: dashed;
  border-color: rgba(0, 180, 230, 0.24);
}

.upload-dropzone.is-dragover {
  border-color: rgba(0, 180, 230, 0.5);
  background: rgba(0, 180, 230, 0.08);
  color: var(--text);
}

.empty {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--muted);
}

.admin-table td,
.admin-table th {
  border-bottom-color: var(--line);
}

.scene-create-form,
.scene-meta-form,
.phase-row,
.calendar-board {
  background: linear-gradient(180deg, rgba(16, 30, 48, 0.96), rgba(11, 21, 34, 0.98));
  border-color: var(--line);
}

#shooting-day-create-overlay .scene-editor-dialog,
#shooting-day-create-overlay .scene-editor-toolbar,
#shooting-day-create-overlay .scene-create-form {
  background: linear-gradient(180deg, rgba(16, 30, 48, 0.98), rgba(11, 21, 34, 0.98));
  border-color: var(--line);
}

.chat-sidebar,
.chat-thread,
.communication-thread {
  border-color: var(--line);
}

.chat-mention-suggestions {
  border-color: var(--line-strong);
  background: rgba(10, 19, 31, 0.98);
  box-shadow: 0 20px 46px rgba(0, 8, 20, 0.46);
}

.chat-mention-option:hover {
  background: rgba(0, 180, 230, 0.12);
}

.chat-message.is-own .chat-bubble,
.communication-body,
.chat-attachment-row,
.chat-discussion-item.is-active {
  background: rgba(0, 180, 230, 0.1);
  border-color: rgba(0, 180, 230, 0.22);
}

.chat-bubble {
  border-color: var(--line);
}

.chat-message-form {
  border-top-color: var(--line);
}

.upload-row {
  box-shadow: 0 14px 28px rgba(0, 8, 20, 0.22);
}

.upload-transfer-bar {
  background: rgba(255, 255, 255, 0.08);
}

.scene-editor-overlay .upload-transfer {
  background: linear-gradient(180deg, rgba(9, 25, 40, 0.78), rgba(7, 17, 29, 0.86));
  border-color: rgba(0, 180, 230, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.upload-transfer-bar span {
  background: linear-gradient(90deg, #00b4e6, #3f86ff);
}

.calendar-board,
.calendar-weekdays,
.calendar-grid {
  background: transparent;
}

.calendar-day {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(16, 30, 48, 0.96), rgba(11, 21, 34, 0.98));
  color: var(--text);
  box-shadow: 0 10px 22px rgba(0, 8, 20, 0.22);
}

.calendar-day.has-events {
  border-color: rgba(0, 180, 230, 0.28);
  background: linear-gradient(180deg, rgba(11, 38, 56, 0.98), rgba(10, 23, 36, 0.98));
}

.calendar-day.is-selected {
  border-color: rgba(0, 180, 230, 0.42);
  box-shadow: 0 16px 34px rgba(0, 23, 54, 0.34);
}

.calendar-day-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
}

.calendar-item {
  background: linear-gradient(180deg, rgba(18, 31, 49, 0.96), rgba(13, 24, 39, 0.96));
  border-color: var(--line);
}

.calendar-item-date {
  border-right-color: var(--line);
}

.timeline-cuts,
.timeline-markers {
  background: rgba(8, 16, 28, 0.82);
  border: 1px solid var(--line);
}

.timeline-cuts span,
.timeline-marker {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.timeline-cuts span {
  border-color: rgba(63, 134, 255, 0.2);
  background: rgba(63, 134, 255, 0.1);
  color: #beddff;
}

@media (max-width: 1100px) {
  .workflow-setup-summary-grid {
    grid-template-columns: 1fr;
  }

  .workflow-setup-tech-grid,
  .workflow-setup-technical-row {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .workflow-setup-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .workflow-setup-film-title-field,
  .workflow-setup-film-code-field {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .workflow-setup-form,
  .workflow-setup-responsibles,
  .workflow-setup-tech-grid,
  .workflow-setup-technical-row,
  .workflow-setup-summary-grid {
    grid-template-columns: 1fr;
  }
}

.workflow-subtabs {
  margin-bottom: 0.35rem;
}

.music-cue-marker-item {
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.music-cue-marker-item span {
  opacity: 0.85;
  text-align: left;
  flex: 1;
}
