﻿:root {
  --bg: #f6f7f4;
  --panel: #ffffff;
  --card: #ffffff;
  --panel-strong: #f0f3ef;
  --ink: #1b2328;
  --muted: #647076;
  --line: #d9ded8;
  --line-soft: #edf1ed;
  --surface: #fbfcfb;
  --teal: #0f766e;
  --blue: #345f9f;
  --green: #2f7d4d;
  --amber: #a66500;
  --red: #b42318;
  --violet: #7650a0;
  --shadow: 0 1px 2px rgba(21, 30, 35, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

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

button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

button:hover {
  border-color: #aeb8b2;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(21, 30, 35, 0.06);
}

button:disabled {
  color: var(--muted);
  background: #eef1ef;
  cursor: default;
}

.subtle-button {
  margin-top: 4px;
  padding: 3px 7px;
  min-height: 0;
  font-size: 11px;
}

button[data-quick-create="phase"],
button[data-quick-create="rfq"],
button[data-quick-create="quote"],
button[data-quick-create="po"],
button[data-quick-create="dropSchedule"],
button[data-generate-output],
button[data-generate-report],
button[data-approve-po],
button[data-audit-approve] {
  border-color: rgba(15, 118, 110, 0.28);
  background: #f4faf7;
  color: #173d3a;
  font-weight: 700;
}

button[data-quick-create="phase"]:hover,
button[data-quick-create="rfq"]:hover,
button[data-quick-create="quote"]:hover,
button[data-quick-create="po"]:hover,
button[data-quick-create="dropSchedule"]:hover,
button[data-generate-output]:hover,
button[data-generate-report]:hover,
button[data-approve-po]:hover,
button[data-audit-approve]:hover {
  border-color: rgba(15, 118, 110, 0.5);
  background: #eaf6f1;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.34);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

.sidebar {
  background: #172126;
  color: #f5f7f5;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  padding: 10px 4px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 124px;
  overflow: visible;
}

.sidebar-logo {
  display: block;
  width: 214px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 6px;
  font-weight: 700;
}

.brand p {
  margin: 0;
  color: #b8c2c0;
  font-size: 12px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border: 0;
  background: transparent;
  color: #dfe7e4;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  padding: 8px;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.review-target-row {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  max-width: 560px;
}

.review-target-row label {
  color: #5a6971;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 64px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 22px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.topbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.toolbar select {
  max-width: 190px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  background: var(--surface);
}

.save-status {
  min-width: 74px;
  height: 28px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.save-status.saving,
.save-status.unsaved {
  border-color: #d7b66b;
  background: #fff8e7;
  color: #7d5a12;
}

.save-status.failed {
  border-color: #e3a3a3;
  background: #fff1f1;
  color: #a33636;
}

.save-status.saved {
  border-color: #b9dbc1;
  background: #edf8ef;
  color: #2f6f3f;
}

.quiet-button {
  background: #fbfcfb;
  color: var(--muted);
}

.helper-text {
  color: var(--muted);
}

.smart-helper {
  color: #516166;
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.search {
  min-width: 280px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 11px;
  background: var(--surface);
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: 6px;
}

.content {
  padding: 18px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

[data-phase-section],
[data-drop-anchor],
[data-drop-detail-panel] {
  scroll-margin-top: 96px;
}

.jump-highlight {
  animation: jumpGlow 3.4s ease-out;
}

@keyframes jumpGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.38), var(--shadow);
    border-color: #0f766e;
  }
  18%, 68% {
    box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.24), 0 8px 22px rgba(15, 118, 110, 0.14);
    border-color: #0f766e;
  }
  100% {
    box-shadow: var(--shadow);
  }
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
  min-height: 88px;
  text-align: left;
  width: 100%;
  display: block;
}

.metric:hover,
.metric.active {
  border-color: #8fa69a;
  background: #fbfdfa;
}

.metric.active {
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.16), var(--shadow);
}

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

.metric strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.drilldown-panel {
  border-color: #c7d6cf;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.section-header {
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface) 100%);
}

.section-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.section-header span {
  color: var(--muted);
  font-size: 12px;
}

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

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.inline-toggle input {
  margin: 0;
}

.compact-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-control select {
  min-width: 128px;
  height: 34px;
}

.section-actions.quick-actions {
  flex-wrap: wrap;
}

.external-review-transition {
  border-color: rgba(15, 118, 110, 0.22);
  background: #fbfffd;
}

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

.mini-status-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px 12px;
  display: grid;
  gap: 3px;
}

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

.compact-review-note {
  width: min(320px, 100%);
  min-height: 58px;
  margin-bottom: 8px;
  resize: vertical;
}

.vendor-submission-controls {
  background: #fbfcfb;
}

.vendor-submission-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(320px, 1.4fr);
  gap: 14px;
  padding: 14px;
}

.always-on-list {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  display: flex;
  align-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.always-on-list label {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.pricing-action-context {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  max-width: 560px;
}

.pricing-action-context label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pricing-action-context select {
  min-width: 280px;
}

.quick-action-body {
  padding: 12px 14px 14px;
}

.primary-actions {
  justify-content: flex-start;
}

.quick-action-more {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 10px;
}

.quick-action-more summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  list-style: none;
  margin-bottom: 10px;
}

.quick-action-more summary::-webkit-details-marker {
  display: none;
}

.quick-action-more summary span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.quick-action-more summary small {
  color: var(--muted);
  font-size: 12px;
}

.quick-action-more summary::after {
  color: var(--muted);
  content: "+";
  font-weight: 900;
}

.quick-action-more[open] summary::after {
  content: "-";
}

.output-history-strip {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 14px;
}

.output-history-strip span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.output-history-strip small {
  font-size: 12px;
  text-align: right;
}

.readiness-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  padding: 12px 14px 14px;
}

.readiness-step {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 10px;
}

.readiness-step.clickable-readiness {
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.readiness-step.clickable-readiness:hover,
.readiness-step.clickable-readiness:focus-visible {
  border-color: #8fc6d8;
  box-shadow: 0 0 0 3px rgba(39, 160, 197, 0.14);
  outline: none;
  transform: translateY(-1px);
}

.readiness-step em {
  align-self: end;
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.readiness-step strong {
  color: var(--ink);
  font-size: 14px;
}

.readiness-step small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.packet-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  padding: 16px;
}

.operator-header {
  border-left: 4px solid var(--accent);
}

.operator-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 16px 18px 8px;
}

.operator-title h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.operator-title p {
  margin: 4px 0 0;
  color: var(--muted);
}

.operator-status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.workflow-progress {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  padding: 8px 16px 10px;
}

.workflow-step {
  align-items: center;
  background: #fbfcfb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 44px;
  padding: 8px 10px;
}

.workflow-step span {
  align-items: center;
  background: #edf1ed;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.workflow-step strong {
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-step.complete {
  background: #f3faf7;
  border-color: rgba(47, 125, 77, 0.2);
  color: var(--green);
}

.workflow-step.complete span {
  background: #dff0e6;
  color: var(--green);
}

.workflow-step.active {
  background: #eef8f6;
  border-color: rgba(15, 118, 110, 0.36);
  color: #173d3a;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.workflow-step.active span {
  background: var(--teal);
  color: #ffffff;
}

.operator-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  padding: 8px 16px 16px;
}

.operator-next {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.operator-next label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.operator-next strong {
  color: var(--ink);
  font-size: 15px;
}

.operator-next span {
  color: var(--muted);
  font-size: 12px;
}

.next-action-target {
  color: #516166;
  font-size: 12px;
  font-weight: 700;
}

.danger-text {
  color: var(--danger) !important;
}

.small-action {
  justify-self: start;
  margin-top: 4px;
  padding: 6px 9px;
  font-size: 12px;
}

.packet-item {
  background: #fbfcfb;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
}

.packet-item.wide {
  grid-column: 1 / -1;
}

.packet-item label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.packet-item strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

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

.orchestration-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  padding: 14px 14px 0;
}

.orchestration-summary {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.orchestration-summary-main {
  display: grid;
  gap: 4px;
}

.orchestration-summary-main strong {
  color: var(--ink);
}

.orchestration-summary-main span,
.orchestration-summary-main small,
.compact-note {
  color: var(--muted);
  font-size: 12px;
}

.compact-note {
  border-top: 1px solid var(--line);
  padding: 0 14px 14px;
}

.orchestration-grid {
  padding: 14px;
}

.orchestration-panel .table-wrap {
  margin: 0;
}

.calendar-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.calendar-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  overflow: hidden;
}

.calendar-date {
  background: #f7faf8;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 12px;
}

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

.calendar-items {
  display: grid;
}

.calendar-item {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  justify-content: start;
  padding: 10px 12px;
  text-align: left;
}

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

.calendar-item span {
  display: block;
  font-weight: 750;
}

.data-overdue-row {
  box-shadow: inset 5px 0 0 var(--danger);
}

.data-watch-row {
  box-shadow: inset 5px 0 0 var(--amber);
}

.data-alert-pill {
  font-size: 13px;
  font-weight: 850;
  padding: 5px 9px;
}

.data-watch-pill {
  font-weight: 850;
}

.modal-context {
  background: #f7faf8;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  padding: 14px 18px;
}

.modal-context div {
  display: grid;
  gap: 4px;
}

.modal-context strong {
  color: var(--ink);
  font-size: 12px;
}

.modal-context span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.packet-item .document-tools {
  margin-top: 2px;
}

.table-wrap {
  overflow: auto;
  border-top: 1px solid var(--line-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.vendor-memory-table {
  min-width: 1180px;
  table-layout: fixed;
}

.vendor-memory-table th,
.vendor-memory-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.vendor-memory-table th:first-child,
.vendor-memory-table td:first-child {
  width: 210px;
}

.vendor-memory-table th:last-child,
.vendor-memory-table td:last-child {
  width: 96px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  background: var(--surface);
  position: sticky;
  top: 0;
}

tbody tr:nth-child(even) {
  background: rgba(246, 247, 244, 0.42);
}

tr.clickable {
  cursor: pointer;
}

tr.clickable:hover,
.lane-item.clickable:hover {
  background: #f8faf8;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pill.green {
  background: #e8f4ec;
  border-color: rgba(47, 125, 77, 0.18);
  color: var(--green);
}

.pill.blue {
  background: #e8eef8;
  border-color: rgba(52, 95, 159, 0.18);
  color: var(--blue);
}

.pill.amber {
  background: #fff2d7;
  border-color: rgba(166, 101, 0, 0.2);
  color: var(--amber);
}

.pill.red {
  background: #fde7e5;
  border-color: rgba(180, 35, 24, 0.18);
  color: var(--red);
}

.pill.violet {
  background: #f1eafa;
  border-color: rgba(118, 80, 160, 0.18);
  color: var(--violet);
}

.pill.gray {
  background: #edf0ee;
  border-color: rgba(82, 96, 105, 0.16);
  color: #526069;
}

.detail {
  padding: 14px;
}

.detail-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
}

.detail-title h3 {
  margin: 0;
  font-size: 18px;
}

.detail-title p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

.field-grid > label {
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  letter-spacing: 0.01em;
  min-width: 0;
}

.field-grid > label > input,
.field-grid > label > select,
.field-grid > label > textarea {
  margin: 0;
  min-width: 0;
  width: 100%;
}

.field-grid > label > input[type="checkbox"] {
  align-self: flex-start;
  width: auto;
}

.section > .field-grid,
.section > .checklist {
  padding: 14px 16px 16px;
}

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

.check-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
}

.check-item span {
  min-height: 28px;
  min-width: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.check-item.done span {
  background: rgba(34, 139, 91, 0.14);
  color: var(--green);
}

.check-item.open span {
  background: rgba(201, 120, 30, 0.14);
  color: var(--amber);
}

.check-item strong {
  display: block;
  line-height: 1.25;
}

.check-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.field {
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line-soft);
  min-width: 0;
  padding: 10px;
}

.field label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.field div {
  color: var(--ink);
  font-weight: 650;
}

.field div,
.field input,
.field select,
.field textarea {
  width: 100%;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: var(--surface);
  min-height: 35px;
}

.field select,
.modal-field select,
.drop-control-field select,
.inline-select,
.toolbar select,
.queue-owner select {
  min-width: 0;
  overflow: hidden;
  padding-right: 34px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field textarea {
  resize: vertical;
  min-height: 72px;
}

.wide {
  grid-column: 1 / -1;
}

.check-stack {
  display: grid;
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.check-row input {
  width: auto;
  min-height: auto;
}

.postage-status-checks {
  background: #f7fbf8;
  border-color: rgba(34, 139, 91, 0.18);
}

.postage-status-checks small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.postage-panel-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fbfcfb;
}

.mini-heading {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.postage-collapse {
  margin-top: 10px;
}

.postage-detail-row > td {
  background: #fbfcfb;
  padding: 0;
}

.postage-job-details {
  border-top: 1px solid var(--line-soft);
}

.postage-job-details summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 16px;
}

.postage-job-details summary::-webkit-details-marker {
  display: none;
}

.postage-job-details summary::after {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  content: "+";
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.postage-job-details[open] summary::after {
  content: "-";
}

.postage-job-details summary span {
  font-weight: 800;
}

.postage-job-details summary small {
  color: var(--muted);
}

.postage-job-detail-grid {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.postage-job-detail-grid h4 {
  font-size: 13px;
  margin: 0 0 8px;
}

.nested-table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  margin: 0;
}

.red {
  color: var(--red);
}

.green {
  color: var(--green);
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 8px 8px 0;
  background: var(--panel);
  overflow-x: auto;
}

.tabs button {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  white-space: nowrap;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.tabs button.active {
  color: var(--teal);
  border-color: var(--line);
  border-bottom-color: var(--panel);
  font-weight: 700;
}

.tabs button span {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #edf0ee;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tabs button.active span {
  background: #e3f4ef;
  color: var(--teal);
}

.sub-tabs {
  margin: -4px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  box-shadow: var(--shadow);
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  overflow: auto;
  padding-bottom: 4px;
}

.production-board {
  grid-template-columns: repeat(5, minmax(210px, 1fr));
}

.lane-compact {
  opacity: 0.72;
}

.compact-empty {
  padding: 12px;
}

.lane {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 260px;
}

.lane h3 {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.lane-item {
  margin: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.lane-item strong {
  display: block;
  margin-bottom: 6px;
}

.lane-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.day {
  min-height: 122px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
}

.day:nth-child(7n) {
  border-right: 0;
}

.day .date {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.event {
  border-left: 3px solid var(--teal);
  background: #eef8f5;
  padding: 6px;
  margin-bottom: 6px;
  border-radius: 4px;
  font-size: 12px;
}

.event.warn {
  border-left-color: var(--amber);
  background: #fff7e6;
}

.event.risk {
  border-left-color: var(--red);
  background: #fdecea;
}

.event.selected {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.operational-timeline {
  display: grid;
  gap: 8px;
  padding: 4px 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: start;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  margin-top: 11px;
  box-shadow: 0 0 0 3px #eef8f5;
}

.timeline-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

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

.timeline-card p {
  margin: 5px 0;
  color: var(--text);
}

.readiness-validation {
  margin-top: 14px;
}

.empty-state {
  padding: 20px 22px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
  margin: 12px 14px;
  line-height: 1.45;
}

.role-landing {
  border-left: 4px solid var(--teal);
}

.role-landing-grid {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1.2fr) repeat(2, minmax(220px, 1fr));
  padding: 14px 16px;
}

.role-landing h3 {
  font-size: 16px;
  margin: 8px 0 4px;
}

.role-landing p {
  color: var(--muted);
  margin: 0;
}

.role-landing-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.role-landing-card label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.role-landing-card strong {
  font-size: 13px;
  line-height: 1.35;
}

.role-guardrail {
  cursor: pointer;
}

.role-guardrail summary {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  list-style: none;
  text-transform: uppercase;
}

.role-guardrail summary::-webkit-details-marker {
  display: none;
}

.role-guardrail summary::after {
  content: "Show";
  float: right;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

.role-guardrail[open] summary::after {
  content: "Hide";
}

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

.queue-item {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(260px, 1.4fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
}

.queue-group {
  align-items: start;
}

.queue-details {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.queue-detail-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.queue-item.priority-1 {
  border-left-color: var(--red);
}

.queue-item.priority-2 {
  border-left-color: var(--amber);
}

.queue-item p,
.queue-item small {
  margin: 3px 0 0;
  color: var(--muted);
}

.queue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.setup-needed {
  border-left: 4px solid var(--amber);
}

.compact-metrics {
  padding: 12px 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.section-subcard {
  margin: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  overflow: hidden;
}

.section-header.compact {
  padding: 10px 12px;
}

.section-header.compact h4 {
  margin: 0;
  font-size: 14px;
}

.compact-signal .compact-metrics {
  padding-top: 8px;
}

.currency-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.currency-input span {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 10px;
  color: var(--muted);
  background: #f7f9fa;
  border-right: 1px solid var(--line);
  font-weight: 700;
}

.currency-input input {
  border: 0;
  border-radius: 0;
  min-width: 0;
}

.currency-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(17, 126, 166, 0.16);
}

.table-note {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.queue-owner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.queue-owner select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 3px 6px;
}

.queue-coverage-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.queue-coverage-panel strong {
  align-self: center;
  margin-right: 4px;
}

.queue-coverage-panel label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
}

.queue-coverage-panel select,
.queue-coverage-panel input {
  min-height: 32px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 4px 30px 4px 8px;
}

.queue-coverage-panel small {
  flex-basis: 100%;
  color: var(--muted);
}

.coverage-active-list {
  flex-basis: 100%;
  display: grid;
  gap: 6px;
}

.coverage-active-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 9px;
  border: 1px solid #dce8e4;
  border-radius: 6px;
  background: #f5fbf8;
}

.coverage-active-item > div {
  display: grid;
  gap: 2px;
}

.coverage-active-item strong,
.coverage-active-item small {
  flex-basis: auto;
  margin: 0;
}

.coverage-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted);
}

.coverage-load-warning {
  color: #7a4a00;
}

.coverage-role-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.operational-notes {
  border-left: 4px solid var(--teal);
}

.note-form {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.section-subhead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 0;
  color: var(--muted);
  font-size: 12px;
}

.muted-row {
  color: var(--muted);
  background: #f7f8f7;
}

.po-line-detail-row > td {
  background: #fbfcfb;
  border-top: 0;
}

.po-line-detail {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

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

.nested-table th,
.nested-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  vertical-align: middle;
}

.po-instructions {
  display: grid;
  gap: 6px;
}

.po-instructions label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.po-instructions textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  background: #fbfcfb;
}

.bulk-toolbar {
  border-left: 4px solid var(--teal);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(18, 26, 30, 0.42);
  z-index: 40;
  padding: 18px;
}

.modal {
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(21, 30, 35, 0.24);
}

.modal-header,
.modal-actions {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 17px;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.modal-field span {
  color: var(--muted);
  font-size: 12px;
}

.modal-field input,
.modal-field select,
.modal-field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  background: var(--surface);
}

.modal-field select {
  padding-right: 34px;
}

.modal-field textarea {
  min-height: 86px;
  resize: vertical;
}

.locked-field {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  background: #eef3f4;
  color: var(--text);
  font-weight: 600;
}

.modal-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  background: #fbfcfb;
  color: var(--text) !important;
}

.modal-check input {
  width: auto;
  min-height: auto;
}

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

.portal-stack div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
}

.portal-stack strong {
  display: block;
  margin-bottom: 4px;
}

.portal-stack p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.report-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding: 14px;
}

.report-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: var(--shadow);
}

.report-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.report-card strong {
  display: block;
  font-size: 14px;
}

.report-card span,
.report-card p,
.report-card-meta,
.report-card-preview {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-card-preview {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px;
  font-weight: 650;
}

.report-card p {
  margin: 0;
}

.report-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}

.report-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-card-footnote {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}

.report-output-summary {
  padding: 14px;
  border-top: 1px solid var(--line-soft);
}

.paste-box {
  width: 100%;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
  resize: vertical;
}

.inline-select,
.inline-input {
  width: 100%;
  min-width: 146px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 4px 7px;
}

.inline-select {
  padding-right: 34px;
}

.inline-input.number {
  min-width: 92px;
  text-align: right;
}

.inline-input.vendor {
  min-width: 172px;
}

.vendor-select {
  min-width: 190px;
}

.vendor-match {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.vendor-match.ok {
  color: #107a43;
}

.vendor-match.warning {
  color: #a15c00;
}

.inline-input.notes {
  min-width: 220px;
}

.inline-input.date {
  min-width: 142px;
}

.inline-input.document-url {
  min-width: 240px;
}

.po-invoice-cell {
  display: grid;
  gap: 6px;
  min-width: 260px;
}

.mini-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 5px;
}

.mini-date-field {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
}

.document-tools {
  display: grid;
  gap: 6px;
  min-width: min(300px, 100%);
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.document-tools span {
  color: var(--muted);
  font-size: 12px;
}

.upload-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--panel);
  cursor: pointer;
  font-size: 13px;
}

.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-button.compact-upload {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
}

.upload-mini {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.upload-mini small {
  color: var(--muted);
  line-height: 1.3;
}

.data-list-detail-row > td {
  background: #f8fbfa;
  border-top: 0;
  padding: 0 12px 12px;
}

.line-item-receipt-detail {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.line-item-receipt-detail > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 10px 12px;
}

.line-item-receipt-detail > summary::-webkit-details-marker {
  display: none;
}

.line-item-receipt-detail > summary::after {
  color: var(--muted);
  content: "+";
  font-weight: 800;
}

.line-item-receipt-detail[open] > summary::after {
  content: "-";
}

.line-item-receipt-body {
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 12px;
  padding: 12px;
}

.nested-table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.data-readiness-meter {
  background: #eef3f3;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  height: 10px;
  margin-bottom: 5px;
  overflow: hidden;
  width: min(180px, 100%);
}

.data-readiness-meter span {
  background: linear-gradient(90deg, var(--teal), #3f9f7f);
  display: block;
  height: 100%;
  transition: width 180ms ease;
}

.data-readiness-inline {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.data-readiness-copy {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.data-readiness-copy small {
  color: var(--muted);
  flex-basis: 100%;
  line-height: 1.3;
}

.data-readiness-card .data-readiness-inline,
.data-progress-summary .data-readiness-inline {
  margin-top: 6px;
}

.external-work-grid {
  padding: 14px;
}

.external-work-card {
  padding: 14px;
}

.external-work-card .spread {
  margin-bottom: 10px;
}

.external-quote-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.external-quote-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.external-quote-card > summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(140px, 1fr) minmax(130px, 1fr) minmax(140px, 1.2fr) minmax(140px, 1fr) max-content;
  list-style: none;
  padding: 12px 14px;
}

.external-quote-card > summary::-webkit-details-marker {
  display: none;
}

.external-quote-card > summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.external-quote-card > summary small {
  color: var(--muted);
  font-size: 12px;
}

.external-quote-card-body {
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.external-quote-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.external-quote-form {
  display: grid;
  gap: 8px;
}

.external-quote-form label,
.external-component-grid label {
  color: var(--muted);
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
}

.external-quote-form .inline-input,
.external-quote-form .inline-select {
  color: var(--ink);
  font-weight: 500;
  min-width: 0;
  width: 100%;
}

.external-component-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.external-quote-upload {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 2fr) max-content;
  padding: 10px;
}

.external-quote-upload span {
  color: var(--muted);
}

.upload-button.disabled-upload {
  background: #eef1ef;
  color: var(--muted);
  cursor: default;
}

.daily-list-summary-stack {
  display: grid;
  gap: 12px;
}

.daily-list-summary-card {
  display: grid;
  gap: 12px;
}

.daily-list-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.daily-list-paste {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(260px, 1fr) max-content;
  align-items: end;
}

.daily-list-paste textarea {
  min-height: 86px;
  resize: vertical;
}

.spec-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 420px;
  padding-top: 6px;
}

.inline-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.modal-upload-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
}

.modal-upload-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.document-modal {
  width: min(1040px, 100%);
  height: min(820px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(21, 30, 35, 0.24);
}

.modal-header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.document-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fbfcfb;
}

.vendor-selection {
  display: grid;
  gap: 12px;
}

.selection-controls {
  max-width: 420px;
}

.selected-row {
  background: #d9f3dc;
}

.component-empty {
  padding: 12px;
  color: var(--muted);
}

.component-spec-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
}

.spec-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  padding: 5px 8px;
}

.spec-chip strong {
  color: var(--ink);
  margin-right: 4px;
}

.component-spec-row td {
  background: #fbfcfb;
  border-top: 0;
  color: var(--muted);
  font-size: 12px;
}

.component-spec-row details summary {
  cursor: pointer;
  font-weight: 700;
}

.mini-disclosure {
  margin-top: 8px;
}

.mini-disclosure summary {
  color: #2b5965;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.mini-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  margin-top: 8px;
}

.mini-grid label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  gap: 4px;
}

.mini-grid select {
  width: 100%;
}

.parsed-value-stack {
  display: grid;
  gap: 5px;
  min-width: 220px;
}

.parsed-value-row {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2px 8px;
  grid-template-columns: 86px minmax(110px, 1fr) auto;
  padding: 4px 0;
}

.parsed-value-row span {
  color: var(--muted);
  font-size: 11px;
}

.parsed-value-row strong {
  font-size: 12px;
}

.parsed-value-row small {
  color: var(--muted);
  font-size: 11px;
  grid-column: 2 / span 2;
}

.parsed-value-row em {
  align-self: center;
  background: #fff0d6;
  border-radius: 999px;
  color: #9a5a00;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  padding: 2px 6px;
}

.parsed-value-row.has-conflict strong {
  color: #9a3a00;
}

.parsed-components {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.parsed-components span {
  background: #f4f7f8;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  padding: 3px 7px;
}

.notice {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  padding: 10px 14px;
}

.amber-notice {
  background: #fff7e6;
}

.template-scope-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  padding: 14px;
}

.template-scope-card {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.template-scope-card span,
.template-scope-card small {
  color: var(--muted);
  font-size: 12px;
}

.intel-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  padding: 14px;
}

.reason-chip {
  min-height: 112px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 10px;
  background: #fbfcfb;
}

.reason-chip strong {
  line-height: 1.25;
}

.reason-chip small {
  color: var(--muted);
  line-height: 1.35;
}

.automation-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.automation-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
}

.automation-item strong {
  display: block;
  margin-bottom: 6px;
}

.automation-item p {
  margin: 4px 0;
  color: var(--muted);
  line-height: 1.35;
}

.lifecycle-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.lifecycle-bar span {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 32px;
  padding: 6px 7px;
  background: #fbfcfb;
}

.lifecycle-bar span.done {
  background: #edf7ee;
  border-color: #cfe9d4;
  color: #256a36;
}

.lifecycle-bar span.current {
  background: #eaf1ff;
  border-color: #c9dcff;
  color: #1f55a0;
}

.inline-check {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  font-weight: 700;
}

.collapsible-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.collapsible-section summary {
  align-items: center;
  cursor: default;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 14px 16px;
  background: var(--surface);
}

.collapsible-section:not([open]) summary {
  cursor: pointer;
}

.collapsible-section:not([open]) summary:hover {
  background: #f8fbfb;
}

.collapsible-section summary::-webkit-details-marker {
  display: none;
}

.collapsible-section summary span {
  color: var(--ink);
  font-weight: 800;
}

.collapsible-section summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.collapsible-section summary::after {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  content: "+";
  display: inline-flex;
  height: 24px;
  justify-content: center;
  font-weight: 900;
  margin-left: 10px;
  min-width: 24px;
  cursor: pointer;
}

.collapsible-section[open] summary {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.collapsible-section[open] summary::after {
  content: "-";
}

.collapsible-body {
  padding: 14px;
}

.mobile-toggle {
  display: none;
}

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 244px;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    z-index: 20;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-toggle {
    display: inline-flex;
  }

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

  .toolbar {
    grid-column: 1 / -1;
    width: 100%;
    flex-wrap: wrap;
  }

  .search {
    min-width: 0;
    width: 100%;
  }

  .toolbar select {
    max-width: none;
    flex: 1 1 160px;
  }

  .metrics,
  .grid-2,
  .board,
  .intel-strip,
  .operator-title,
  .operator-snapshot,
  .workflow-progress,
  .role-landing-grid,
  .readiness-strip,
  .packet-grid,
  .orchestration-metrics,
  .modal-context,
  .template-scope-grid {
    grid-template-columns: 1fr;
  }

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

  .queue-actions {
    justify-content: flex-start;
  }

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

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

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

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

  .day {
    min-height: 96px;
    border-right: 0;
  }
}

.event.clickable {
  cursor: pointer;
}

.event.selected {
  outline: 4px solid #0f766e;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18), 0 8px 18px rgba(15, 118, 110, 0.16);
  border-left-width: 7px;
  background: #dff7f0;
}

.drop-detail-panel {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.drop-execution-controls {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
}

.drop-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
}

.drop-control-field {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.drop-control-field span {
  font-weight: 700;
  color: var(--muted);
}

.drop-control-field input,
.drop-control-field select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 6px 8px;
}

.drop-control-field select {
  padding-right: 34px;
}

@media (max-width: 980px) {
  .drop-control-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

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