/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bg: #eef2f5;
  --panel: #ffffff;
  --ink: #15202b;
  --muted: #6d7885;
  --line: #d9e1e8;
  --blue: #205f9f;
  --blue-strong: #164b80;
  --green: #287a55;
  --amber: #9b6b16;
  --red: #b84432;
  --soft-blue: #e8f1fb;
  --soft-green: #e7f4ee;
  --soft-amber: #fbf2dc;
  --soft-red: #fae9e6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

button {
  cursor: default;
}

.app-shell {
  min-height: 100vh;
}

.flash-message {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(420px, calc(100vw - 32px));
  margin: 0;
  border-radius: 8px;
  padding: 12px 12px 12px 14px;
  font-weight: 750;
  box-shadow: 0 14px 32px rgba(21, 32, 43, 0.16);
}

.flash-message span {
  min-width: 0;
}

.flash-dismiss {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.flash-dismiss:hover {
  background: rgba(21, 32, 43, 0.08);
}

.flash-alert {
  border: 1px solid #e8c1ba;
  background: var(--soft-red);
  color: var(--red);
}

.flash-notice {
  border: 1px solid #bddfce;
  background: var(--soft-green);
  color: var(--green);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--bg);
}

.auth-card {
  width: min(100%, 430px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 28px;
  box-shadow: 0 18px 44px rgba(21, 32, 43, 0.08);
}

.auth-brand {
  margin-bottom: 26px;
  color: var(--ink);
}

.auth-brand span {
  color: var(--muted);
}

.auth-card h1 {
  margin-bottom: 22px;
  font-size: 1.55rem;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
  text-transform: none;
}

.auth-form input[type="submit"] {
  margin-top: 4px;
  border: 0;
  background: var(--blue);
  color: #ffffff;
  font-weight: 850;
  cursor: pointer;
}

.auth-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 800;
}

.dashboard-page {
  --sidebar-width: 280px;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 160ms ease;
}

.dashboard-page.sidebar-collapsed {
  --sidebar-width: 88px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  background: #172436;
  color: #f7fafc;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow: hidden;
  transition: padding 160ms ease;
}

.sidebar-actions {
  display: flex;
  justify-content: flex-end;
  min-height: 34px;
}

.sidebar-icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #f7fafc;
  padding: 0;
  display: grid;
  place-items: center;
}

.sidebar-icon-button:hover {
  background: #24364c;
}

.sidebar-resize-button::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 3px solid currentColor;
  border-left: 3px solid currentColor;
  transform: translateX(2px) rotate(-45deg);
}

.sidebar-collapsed .sidebar-resize-button::before {
  transform: translateX(-2px) rotate(135deg);
}

.dashboard-page.sidebar-collapsed .sidebar {
  padding: 20px 14px;
  gap: 24px;
}

.dashboard-page.sidebar-collapsed .sidebar-actions {
  flex-direction: column;
  align-items: center;
  min-height: 76px;
}

.dashboard-page.sidebar-collapsed .brand {
  justify-content: center;
}

.dashboard-page.sidebar-collapsed .brand-copy,
.dashboard-page.sidebar-collapsed .nav-label,
.dashboard-page.sidebar-collapsed .role-panel {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f2c14e;
  color: #172436;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: #b7c3cf;
  font-size: 0.84rem;
}

.nav-list,
.role-panel,
.alert-list,
.region-list {
  display: grid;
  gap: 8px;
}

.nav-item,
.role-button {
  border-radius: 8px;
  color: #c9d4df;
  padding: 11px 12px;
}

.nav-item {
  display: block;
  cursor: pointer;
}

.nav-icon {
  display: none;
}

.nav-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.dashboard-page.sidebar-collapsed .nav-list {
  gap: 10px;
}

.dashboard-page.sidebar-collapsed .nav-item {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 0.74rem;
  font-weight: 900;
}

.dashboard-page.sidebar-collapsed .nav-icon {
  display: grid;
  place-items: center;
}

.nav-item:hover {
  background: #24364c;
  color: #ffffff;
}

.nav-item.is-active {
  background: #24364c;
  color: #ffffff;
}

.role-panel {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-label,
.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.role-panel .panel-label {
  color: #9eacba;
}

.role-panel strong,
.role-panel span {
  display: block;
}

.role-panel strong {
  color: #ffffff;
  font-size: 0.95rem;
}

.role-panel span {
  color: #b7c3cf;
  font-size: 0.84rem;
  line-height: 1.45;
}

.role-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  text-align: left;
  cursor: default;
}

.role-button.is-active {
  background: #f2c14e;
  border-color: #f2c14e;
  color: #172436;
  font-weight: 800;
}

.role-panel form {
  margin: 8px 0 0;
}

.logout-button {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: transparent;
  color: #f7fafc;
  padding: 9px 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.85rem, 2.4vw, 2.45rem);
  line-height: 1.08;
}

h2 {
  font-size: 1.05rem;
  line-height: 1.25;
}

.sync-status {
  min-width: 210px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: right;
}

.sync-status span,
.sync-status strong,
.sync-status small {
  display: block;
}

.sync-status span,
.sync-status small {
  color: var(--muted);
  font-size: 0.75rem;
}

.sync-status strong {
  margin: 2px 0;
  font-size: 0.9rem;
}

.workspace-panel {
  scroll-margin-top: 24px;
  margin-bottom: 26px;
  display: none;
}

.workspace-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.workspace-heading h2 {
  font-size: 1.38rem;
  line-height: 1.2;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin-bottom: 18px;
}

.filter-bar label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  padding: 10px 12px;
  text-transform: none;
  font-weight: 650;
}

.filter-bar button {
  align-self: end;
  min-height: 43px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 850;
}

.kpi-grid,
.content-grid {
  display: grid;
  gap: 18px;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.kpi-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  min-width: 0;
}

.kpi-card {
  padding: 18px;
  min-height: 146px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-top: 4px solid var(--blue);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.kpi-card:hover {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.kpi-card.green {
  border-top-color: var(--green);
}

.kpi-card.amber {
  border-top-color: var(--amber);
}

.kpi-card.red {
  border-top-color: var(--red);
}

.kpi-card p,
.kpi-card span,
.kpi-card small {
  margin: 0;
  color: var(--muted);
}

.kpi-card p {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi-card strong {
  font-size: 1.72rem;
  line-height: 1.1;
}

.kpi-card small {
  margin-top: auto;
  font-weight: 750;
}

.term-abbr {
  position: relative;
  display: inline-flex;
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.term-abbr::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 20;
  width: max-content;
  max-width: 220px;
  transform: translateX(-50%) translateY(4px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
  color: #ffffff;
  padding: 7px 9px;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  text-transform: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.term-abbr::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  z-index: 21;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.term-abbr:hover::after,
.term-abbr:hover::before,
.term-abbr:focus::after,
.term-abbr:focus::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty-state {
  color: var(--muted);
  font-weight: 750;
  padding: 12px 0;
}

.content-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  margin-bottom: 18px;
}

.panel {
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading a {
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
}

.section-heading .workflow-create-action {
  color: #ffffff;
}

.section-heading .toolbar-action {
  color: #ffffff;
}

.region-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) 92px minmax(140px, 1fr) 92px;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.region-row:first-child {
  border-top: 0;
}

.region-row strong,
.region-row span,
.region-metric span,
td strong,
td span {
  display: block;
}

.region-row span,
.region-metric span,
td span {
  color: var(--muted);
  font-size: 0.82rem;
}

.region-metric {
  font-weight: 850;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e7edf3;
  overflow: hidden;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #48a9a6);
}

.alert-card {
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--soft-blue);
  padding: 13px 14px;
}

.alert-card.critical {
  border-left-color: var(--red);
  background: var(--soft-red);
}

.alert-card.warning {
  border-left-color: var(--amber);
  background: var(--soft-amber);
}

.alert-card strong,
.alert-card span {
  display: block;
}

.alert-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 750;
}

.alert-card p {
  margin: 8px 0 0;
  color: #3c4652;
  font-size: 0.9rem;
}

.planning-panel {
  margin-bottom: 18px;
}

.legend {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.legend span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--blue);
  margin-right: 6px;
}

.planning-board {
  display: grid;
  grid-template-columns: 210px repeat(6, minmax(112px, 1fr));
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.planning-header,
.seller-cell,
.week-cell {
  min-height: 58px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px;
}

.planning-header {
  min-height: 44px;
  background: #f4f7fa;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.seller-cell span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.week-cell {
  background: #fbfcfd;
}

.week-cell.is-booked span {
  display: block;
  border-radius: 6px;
  background: var(--soft-blue);
  border: 1px solid #c9def2;
  color: var(--blue-strong);
  padding: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

/* overflow-x on .table-wrap clips upward tooltips; show them below headers instead */
.table-wrap th:has(.term-abbr:hover),
.table-wrap th:has(.term-abbr:focus) {
  z-index: 5;
}

.table-wrap .term-abbr::after {
  top: calc(100% + 9px);
  bottom: auto;
  z-index: 25;
  transform: translateX(-50%) translateY(-4px);
}

.table-wrap .term-abbr::before {
  top: calc(100% + 4px);
  bottom: auto;
  z-index: 26;
  border-top-color: transparent;
  border-bottom-color: var(--ink);
  transform: translateX(-50%) translateY(-4px);
}

.table-wrap .term-abbr:hover::after,
.table-wrap .term-abbr:hover::before,
.table-wrap .term-abbr:focus::after,
.table-wrap .term-abbr:focus::before {
  transform: translateX(-50%) translateY(0);
}

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

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

th {
  color: var(--muted);
  background: #f6f8fa;
  font-size: 0.73rem;
  font-weight: 850;
  text-transform: uppercase;
}

.ofg-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 50px;
  border-radius: 999px;
  background: var(--soft-green);
  color: var(--green);
  padding: 5px 8px;
  font-weight: 850;
}

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

.field-cloud span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  padding: 7px 10px;
  color: #3e4a57;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.compact-panel {
  align-self: start;
}

.compact-region-list {
  margin-bottom: 16px;
}

.compact-region-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(72px, 0.7fr) minmax(70px, auto);
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.compact-region-row:first-child {
  border-top: 0;
}

.compact-region-row strong,
.compact-region-row span {
  display: block;
}

.compact-region-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

.compact-region-row > strong {
  text-align: right;
}

.compact-alerts {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.production-toolbar {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin-bottom: 14px;
}

.production-toolbar-main {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.production-toolbar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.production-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.production-toolbar label {
  color: var(--muted);
  display: grid;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.production-department-form {
  margin: 0;
}

.production-department-form label {
  min-width: 170px;
}

.production-toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  min-height: 34px;
  padding: 7px 10px;
  text-transform: none;
  font-weight: 650;
}

.assignment-editor {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.6fr);
  align-items: end;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin-bottom: 18px;
}

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

.assignment-editor span {
  color: var(--muted);
  font-size: 0.82rem;
}

.assignment-editor-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.assignment-editor-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin: 0;
}

.assignment-editor-form label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.assignment-editor-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  padding: 10px 12px;
  text-transform: none;
  font-weight: 650;
}

.assignment-editor-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  padding: 10px 12px;
  text-transform: none;
  font-weight: 650;
}

.assignment-editor-form button,
.toolbar-action {
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  padding: 11px 13px;
}

.assignment-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 10px;
  margin: 0;
}

.assignment-detail-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 9px 10px;
}

.assignment-detail-grid .full-span {
  grid-column: 1 / -1;
}

.assignment-detail-grid dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.assignment-detail-grid dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 750;
}

.danger-action {
  min-height: 40px;
  border: 1px solid #e8c1ba;
  border-radius: 6px;
  background: var(--soft-red);
  color: var(--red);
  font-weight: 850;
  padding: 10px 12px;
  white-space: nowrap;
}

.assignment-time-tracking {
  margin-bottom: 18px;
}

.status-time-table {
  min-width: 760px;
}

.status-time-table td {
  vertical-align: top;
}

.status-time-table td:nth-child(4) {
  white-space: nowrap;
}

.toolbar-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  white-space: nowrap;
}

.secondary-action {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #415064;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 10px;
}

.new-project-form {
  grid-template-columns: repeat(6, minmax(100px, 1fr)) auto auto;
}

.production-tabs-panel {
  margin-bottom: 18px;
}

.production-tabs-header {
  margin-bottom: 16px;
}

.production-tab-list {
  grid-template-columns: repeat(2, auto);
}

.production-tab-panel {
  margin-bottom: 0;
}

.production-tab-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.assignment-mask {
  margin-bottom: 18px;
}

.assignment-mask-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.subsection-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.subsection-heading strong,
.subsection-heading span {
  display: block;
}

.subsection-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.incoming-project-table {
  min-width: 760px;
}

.incoming-project-table tr.is-selected td {
  background: var(--soft-blue);
}

.inline-action {
  color: var(--blue-strong);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.assignment-form-panel {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.assignment-mask-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.assignment-mask-form label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.assignment-mask-form input,
.assignment-mask-form select,
.assignment-mask-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  text-transform: none;
  font-weight: 650;
}

.assignment-mask-form textarea {
  min-height: 82px;
  resize: vertical;
}

.assignment-mask-form .full-span,
.assignment-mask-form .form-actions {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-actions button {
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  padding: 11px 13px;
}

.workflow-admin {
  margin-bottom: 18px;
}

.workspace-panel.is-visible {
  display: block;
}

.workflow-breadcrumb {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
}

.workflow-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 650;
}

.workflow-breadcrumb a:hover {
  text-decoration: underline;
}

.workflow-list-panel {
  margin-bottom: 18px;
}

.workflow-list-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  margin-bottom: 18px;
}

.workflow-list-controls .production-department-form label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-list-controls .production-department-form select {
  min-width: 240px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 12px;
  height: 38px;
  text-transform: none;
  font-weight: 650;
  font-size: 0.92rem;
}

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

.settings-tile {
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.settings-tile:hover {
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(18, 34, 53, 0.08);
}

.settings-tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #e8f1fb;
  color: var(--blue);
  display: grid;
  place-items: center;
}

.settings-tile-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.settings-tile strong,
.settings-tile small {
  display: block;
}

.settings-tile strong {
  margin-bottom: 6px;
  font-size: 1.06rem;
}

.settings-tile small {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.4;
}

.workflow-table th:last-child,
.workflow-table td:last-child {
  width: 120px;
}

.workflow-page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0;
}

.workflow-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.workflow-header h1 {
  font-size: 1.52rem;
}

.workflow-header span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

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

.workflow-create-action {
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 750;
  padding: 8px 12px;
  line-height: 1.2;
}

.workflow-header .production-department-form select {
  min-width: 165px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 12px;
  height: 36px;
  text-transform: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.workflow-edit-header,
.workflow-steps-head,
.workflow-step-row {
  display: grid;
  gap: 10px;
}

.workflow-admin-list {
  display: grid;
  gap: 14px;
}

.workflow-admin-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.workflow-edit-header {
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 1fr) minmax(100px, 0.35fr);
  align-items: end;
  margin-bottom: 18px;
}

.workflow-form-note {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.workflow-steps-editor {
  display: grid;
  gap: 12px;
}

.workflow-steps-head,
.workflow-step-row {
  grid-template-columns: 36px 56px minmax(160px, 1fr) minmax(112px, 0.45fr) auto;
  align-items: end;
}

.workflow-steps-head {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

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

.workflow-step-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: #fbfcfd;
}

.workflow-step-row.blue {
  border-left-color: var(--blue);
  background: var(--soft-blue);
}

.workflow-step-row.amber {
  border-left-color: var(--amber);
  background: var(--soft-amber);
}

.workflow-step-row.red {
  border-left-color: var(--red);
  background: var(--soft-red);
}

.workflow-step-row.green {
  border-left-color: var(--green);
  background: var(--soft-green);
}

.workflow-step-tone-select {
  width: 100%;
}

.workflow-step-row.is-dragging {
  opacity: 0.55;
}

.workflow-step-drag-handle {
  display: grid;
  place-items: center;
  width: 36px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 0.7;
  letter-spacing: -0.08em;
  cursor: grab;
}

.workflow-step-drag-handle:active {
  cursor: grabbing;
}

.workflow-step-position {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 6px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.workflow-steps-toolbar {
  display: flex;
  justify-content: flex-start;
}

.workflow-step-remove {
  display: grid;
  place-items: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid #e8c1ba;
  border-radius: 6px;
  background: var(--soft-red);
  color: var(--red);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.workflow-step-remove:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.workflow-form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 20px;
}

.workflow-edit-form label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-edit-form label span {
  position: fixed;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.workflow-edit-form input,
.workflow-edit-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  text-transform: none;
  font-weight: 650;
}

.workflow-edit-form button[type="submit"] {
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  padding: 11px 13px;
  white-space: nowrap;
  min-width: 150px;
}

.workflow-steps-toolbar .secondary-action {
  min-height: 42px;
  padding: 10px 14px;
  background: #ffffff;
}

.account-admin,
.account-list-panel {
  margin-bottom: 18px;
}

.account-admin,
.account-edit-panel {
  padding: 26px 28px;
}

.account-admin .section-heading,
.account-list-panel .section-heading {
  margin-bottom: 12px;
}

.account-admin .section-heading h2,
.account-list-panel .section-heading h2 {
  font-size: 0.98rem;
}

.account-form {
  display: grid;
  align-items: end;
  gap: 18px 22px;
}

.account-row,
.account-list-head {
  grid-template-columns:
    minmax(150px, 1.1fr)
    minmax(120px, 0.8fr)
    minmax(140px, 1fr)
    minmax(140px, 0.9fr)
    minmax(130px, 0.8fr)
    56px
    auto;
}

.account-form label {
  display: grid;
  gap: 7px;
}

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

.account-detail-form.project-domain-form {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.account-detail-form .account-active-field,
.account-detail-form .account-form-actions,
.account-detail-form .project-form-field-full {
  grid-column: 1 / -1;
}

.project-domain-form label {
  gap: 8px;
}

.project-domain-form .field-label {
  display: block;
  color: var(--text-muted, #6b7280);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
  white-space: nowrap;
}

.production-project-form .production-form-fields label {
  gap: 8px;
}

.sales-project-production-panel {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
}

.sales-project-production-panel--footer {
  margin-top: 32px;
  margin-bottom: 0;
  padding-top: 32px;
  padding-bottom: 0;
  border-bottom: none;
  border-top: 1px solid var(--border-subtle, #e5e7eb);
}

.production-assignment-show-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.sales-project-production-hint {
  margin: 0 0 12px;
  color: var(--text-muted, #6b7280);
}

.sales-project-production-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-show-page {
  max-width: 960px;
}

.project-show-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
}

.project-show-section:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.project-show-section > .eyebrow {
  margin: 0 0 16px;
}

.project-show-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.project-show-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 40px;
  margin: 0;
}

.project-show-grid > div {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  gap: 4px 12px;
  align-content: start;
}

.project-show-grid-full {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 19%) minmax(0, 1fr);
  gap: 4px 12px;
}

.project-show-grid dt {
  margin: 0;
  color: var(--text-muted, #6b7280);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  text-transform: none;
}

.project-show-grid dd {
  margin: 0;
  color: var(--ink, #111827);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}

.project-domain-nav {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle, #e5e7eb);
}

.project-cross-link-hint {
  margin: 0 0 12px;
  color: var(--text-muted, #6b7280);
}

.production-assignment-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.production-assignment-card {
  padding: 28px 32px;
  border: 1px solid var(--border-subtle, #e5e7eb);
  border-radius: 12px;
  background: var(--surface-muted, #f9fafb);
}

.production-assignment-card--standalone {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.production-assignment-card-header {
  margin-bottom: 24px;
}

.production-assignment-card-header h2,
.production-assignment-card-header h3 {
  margin: 6px 0 0;
  font-size: 1.125rem;
}

.assignment-meta {
  margin: 8px 0 0;
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
  line-height: 1.5;
}

.production-assignment-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 32px;
  margin: 0;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
  list-style: none;
}

.production-assignment-facts li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.production-assignment-facts-label {
  color: var(--text-muted, #6b7280);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
}

.production-assignment-facts-value {
  color: var(--ink, #111827);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.production-assignment-card .assignment-time-tracking {
  margin-top: 28px;
  margin-bottom: 0;
}

.production-assignment-card .assignment-time-tracking .status-time-table {
  min-width: 0;
  width: 100%;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

.production-assignment-card .status-time-table th,
.production-assignment-card .status-time-table td {
  padding: 14px 18px;
}

.production-assignment-card .status-time-table tbody tr:last-child td {
  border-bottom: none;
}

.status-time-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-time-label {
  color: var(--ink, #111827);
  line-height: 1.4;
}

.production-project-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  width: 100%;
  max-width: none;
  gap: 0;
}

.project-edit-page {
  padding: 26px 28px;
}

.project-edit-page .production-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.production-form-section {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
}

.production-form-section:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.production-form-section-label {
  margin: 0 0 18px;
}

.production-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  align-items: end;
}

.production-form-fields--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.production-form-field-full {
  grid-column: 1 / -1;
}

.production-assignment-edit-block {
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border-subtle, #e5e7eb);
  border-radius: 10px;
  background: var(--surface-muted, #f9fafb);
}

.production-assignment-edit-block:first-of-type {
  margin-top: 0;
}

.production-assignment-edit-block-header {
  margin-bottom: 16px;
}

.production-assignment-edit-block-header h3 {
  margin: 4px 0 0;
  font-size: 1.05rem;
}

.production-assignment-edit-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.production-assignment-delete-form {
  display: inline-flex;
  margin: 0;
}

.production-form-actions {
  margin-top: 28px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: color-mix(in srgb, var(--accent-soft, #eff6ff) 55%, transparent);
}

.account-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.field-setting-form {
  display: grid;
  gap: 20px;
}

.account-form.field-setting-form {
  gap: 20px 22px;
  align-items: start;
}

.field-setting-form > .account-form {
  gap: 20px 22px;
  align-items: start;
}

.field-setting-form .account-form-actions,
.field-setting-form .field-setting-form-actions {
  margin-top: 0;
}

.field-setting-form-actions .field-setting-delete-form {
  display: inline-flex;
  margin: 0 0 0 auto;
}

.danger-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
}

.danger-icon-action svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.danger-icon-action.is-disabled,
.danger-icon-action:disabled {
  background: #c8cfd6;
  color: #f8fafb;
  cursor: not-allowed;
}

.field-setting-delete-form-disabled {
  display: inline-flex;
  margin: 0 0 0 auto;
}

.account-form-actions button:not(.danger-icon-action),
.account-form-actions .secondary-action {
  min-width: 138px;
  justify-content: center;
}

.field-setting-form .account-form-actions button:not(.danger-icon-action),
.field-setting-form .field-setting-form-actions button:not(.danger-icon-action) {
  min-height: 34px;
  min-width: auto;
  padding: 7px 14px;
  font-size: 0.82rem;
}

.field-setting-form .account-form-actions .secondary-action,
.field-setting-form .field-setting-form-actions .secondary-action {
  min-width: auto;
  padding: 7px 12px;
}

.account-table {
  min-width: 760px;
}

.account-edit-page {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0;
}

.account-edit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.account-edit-header h1 {
  font-size: 1.52rem;
}

.account-list {
  display: grid;
  gap: 10px;
  overflow-x: auto;
}

.account-list-head {
  display: grid;
  gap: 10px;
  min-width: 900px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.account-row {
  min-width: 900px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.account-row:first-of-type {
  border-top: 0;
}

.account-form label {
  color: var(--muted);
  display: grid;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-row label > span {
  position: fixed;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.account-form input,
.account-form select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  padding: 7px 9px;
  font: inherit;
  font-size: 0.86rem;
  text-transform: none;
  font-weight: 650;
}

.account-form .checkbox-label {
  justify-items: start;
}

.account-form .checkbox-label input {
  width: 17px;
  height: 17px;
  min-height: 17px;
  padding: 0;
}

.account-form button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  padding: 8px 13px;
  white-space: nowrap;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.segmented-control a,
.segmented-control button,
.production-actions button,
.production-card button {
  border: 0;
  background: #f8fafc;
  color: #415064;
  font-weight: 800;
}

.segmented-control a,
.segmented-control button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-right: 1px solid var(--line);
  font-size: 0.82rem;
}

.segmented-control a:last-child,
.segmented-control button:last-child {
  border-right: 0;
}

.segmented-control a.is-active,
.segmented-control button.is-active {
  background: var(--blue);
  color: #ffffff;
}

.sleep-filter a.is-active {
  background: #415064;
}

.date-control {
  display: inline-grid;
  grid-template-columns: auto minmax(106px, auto) auto;
  align-items: center;
  justify-content: start;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.date-control a,
.date-control strong {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
}

.date-control a {
  background: #f8fafc;
  color: #415064;
  font-size: 0.8rem;
  font-weight: 800;
}

.date-control strong {
  justify-content: center;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 0.84rem;
}

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

.production-daily-panel {
  margin-bottom: 18px;
}

.daily-production-list {
  display: grid;
  gap: 16px;
}

.daily-employee-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.daily-employee-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: #f6f8fa;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}

.daily-employee-heading span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.daily-production-table {
  min-width: 1160px;
}

.daily-production-table th,
.daily-production-table td {
  padding: 7px 8px;
  font-size: 0.78rem;
}

.daily-production-table th {
  font-size: 0.66rem;
}

.daily-production-table td strong {
  font-size: inherit;
}

.daily-production-table .status-code-pill,
.daily-production-table .countdown-pill {
  min-width: 28px;
  padding: 3px 6px;
  font-size: 0.72rem;
}

.daily-production-table .production-status-select {
  min-width: 84px;
  max-width: 120px;
  padding: 3px 6px;
  font-size: 0.68rem;
}

.daily-production-table .done-label {
  padding: 3px 6px;
  font-size: 0.68rem;
}

.daily-production-table tbody tr.blue td {
  background: var(--soft-blue);
}

.daily-production-table tbody tr.amber td {
  background: var(--soft-amber);
}

.daily-production-table tbody tr.red td {
  background: var(--soft-red);
}

.daily-production-table tbody tr.green td {
  background: var(--soft-green);
}

.daily-production-table tbody tr.is-sleeping td {
  background: #eef1f4;
  color: #566474;
}

.status-code-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 34px;
  border-radius: 999px;
  background: #ffffff;
  padding: 5px 8px;
  font-weight: 900;
}

.status-code-pill.blue {
  color: var(--blue-strong);
}

.status-code-pill.amber {
  color: var(--amber);
}

.status-code-pill.red {
  color: var(--red);
}

.status-code-pill.green {
  color: var(--green);
}

.status-code-pill.sleep {
  color: #566474;
}

.status-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.production-card-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.production-status-form {
  margin: 0;
}

.production-status-select {
  min-width: 96px;
  max-width: 140px;
  border: 1px solid rgba(21, 32, 43, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #415064;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.production-card footer .production-status-select {
  max-width: 120px;
}

.countdown-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 38px;
  border-radius: 999px;
  background: #ffffff;
  padding: 5px 8px;
  font-weight: 900;
}

.countdown-pill.open,
.countdown-text.open {
  color: var(--blue-strong);
}

.countdown-pill.warning,
.countdown-text.warning {
  color: var(--amber);
}

.countdown-pill.exceeded,
.countdown-text.exceeded {
  color: var(--red);
}

.countdown-pill.done,
.countdown-text.done {
  color: var(--green);
}

.daily-actions {
  min-width: 120px;
}

.daily-actions .production-status-form {
  margin: 0;
}

.daily-actions button {
  border: 1px solid rgba(21, 32, 43, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #415064;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.production-actions button {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.production-board {
  display: grid;
  grid-template-columns: 150px repeat(var(--day-count), minmax(150px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: #ffffff;
}

.production-corner,
.production-day,
.employee-cell,
.production-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.production-corner,
.production-day {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 44px;
  background: #edf6e7;
  padding: 11px 10px;
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.production-corner {
  left: 0;
  z-index: 3;
  background: #f2c14e;
  color: #172436;
}

.employee-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  min-height: 132px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  text-align: center;
}

.employee-cell strong,
.employee-cell span {
  display: block;
}

.employee-cell span {
  color: var(--muted);
  font-size: 0.8rem;
}

.production-cell {
  min-height: 132px;
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 8px;
  background:
    linear-gradient(#f3f6f9 1px, transparent 1px) 0 0 / 100% 22px,
    #fbfcfd;
}

.production-cell.is-empty {
  background:
    linear-gradient(#edf1f5 1px, transparent 1px) 0 0 / 100% 22px,
    #fbfcfd;
}

.production-card {
  display: grid;
  gap: 6px;
  border: 1px solid #c9def2;
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  background: var(--soft-blue);
  padding: 9px;
  box-shadow: 0 1px 0 rgba(21, 32, 43, 0.04);
}

.production-card.green {
  border-color: #bddfce;
  border-left-color: var(--green);
  background: var(--soft-green);
}

.production-card.amber {
  border-color: #ecd7a5;
  border-left-color: var(--amber);
  background: var(--soft-amber);
}

.production-card.red {
  border-color: #e8c1ba;
  border-left-color: var(--red);
  background: var(--soft-red);
}

.production-card.is-sleeping {
  border-color: #cfd8e2;
  border-left-color: #6d7885;
  background: #eef1f4;
}

.production-card.is-selected {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.production-card-main {
  display: grid;
  gap: 6px;
  border-radius: 5px;
}

.production-card-main:focus-visible,
.project-detail-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.production-card strong,
.production-card span,
.production-card small {
  display: block;
}

.production-card strong {
  font-size: 0.86rem;
}

.production-card span,
.production-card small {
  color: var(--muted);
  font-size: 0.75rem;
}

.production-card p {
  margin: 0;
  color: #2e3b48;
  font-size: 0.82rem;
  font-weight: 850;
}

.production-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.production-card form {
  margin: 0;
}

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

.production-card button {
  border: 1px solid rgba(21, 32, 43, 0.12);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
}

.done-label {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--green);
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.production-card-link {
  width: max-content;
  color: var(--blue-strong);
  font-size: 0.72rem;
  font-weight: 800;
}

.project-detail-link {
  color: inherit;
}

.project-detail-link:hover,
.production-card-main:hover strong {
  color: var(--blue-strong);
}

.sleep-label {
  display: block;
  margin-top: 5px;
  color: #566474;
  font-size: 0.72rem;
  font-weight: 850;
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list,
  .role-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .role-panel {
    grid-template-columns: 1fr;
  }

  .kpi-grid,
  .content-grid,
  .settings-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-toolbar {
    align-items: stretch;
  }

  .production-toolbar-meta {
    display: grid;
    gap: 8px;
    justify-content: start;
  }

  .production-toolbar-actions {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .date-control {
    width: 100%;
    grid-template-columns: 1fr auto 1fr;
  }

  .date-control a:last-child {
    justify-content: flex-end;
  }

  .assignment-editor,
  .assignment-editor-actions,
  .assignment-detail-grid,
  .assignment-editor-form,
  .assignment-mask-grid,
  .assignment-mask-form,
  .workflow-edit-header,
  .account-detail-form,
  .production-form-fields,
  .production-form-fields--three,
  .project-show-grid,
  .production-assignment-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-steps-head {
    display: none;
  }

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

  .workflow-step-drag-handle {
    justify-self: start;
  }

  .workflow-step-field span {
    position: static;
    inline-size: auto;
    block-size: auto;
    opacity: 1;
    pointer-events: auto;
  }

  .workflow-step-remove {
    justify-self: end;
    width: 42px;
  }

  .project-show-grid > div {
    grid-template-columns: 1fr;
  }

  .assignment-form-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 18px;
  }
}

@media (max-width: 760px) {
  .sidebar {
    padding: 20px;
    gap: 20px;
  }

  .workspace {
    padding: 18px;
  }

  .section-heading {
    display: grid;
  }

  .sync-status {
    text-align: left;
  }

  .filter-bar,
  .kpi-grid,
  .content-grid,
  .settings-tile-grid,
  .account-detail-form,
  .account-detail-form.project-domain-form,
  .production-form-fields,
  .production-form-fields--three,
  .project-show-grid,
  .project-show-grid-full,
  .production-assignment-facts {
    grid-template-columns: 1fr;
  }

  .project-domain-form .field-label {
    white-space: normal;
  }

  .project-show-grid > div,
  .project-show-grid-full {
    grid-template-columns: 1fr;
  }

  .production-assignment-card {
    padding: 22px 20px;
  }

  .workspace-heading {
    display: grid;
  }

  .workflow-page,
  .account-edit-page {
    width: min(100% - 36px, 960px);
    padding: 22px 0;
  }

  .workflow-header,
  .account-edit-header {
    display: grid;
  }

  .nav-list,
  .role-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-panel {
    grid-template-columns: 1fr;
  }

  .role-panel .panel-label {
    grid-column: 1 / -1;
  }

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

  .planning-board {
    grid-template-columns: 170px repeat(6, 124px);
  }

  .production-board {
    grid-template-columns: 132px repeat(var(--day-count), 144px);
  }

  .account-list-head {
    display: none;
  }

  .account-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .account-row label > span {
    position: static;
    inline-size: auto;
    block-size: auto;
    opacity: 1;
    pointer-events: auto;
  }

  .account-form button {
    width: 100%;
  }

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