:root {
  color-scheme: light;
  --bg: #eef2f5;
  --bg-soft: #f7f9f8;
  --panel: #ffffff;
  --panel-soft: #f1f5f3;
  --ink: #13201c;
  --muted: #65736d;
  --line: #dce4df;
  --line-strong: #aebcb5;
  --accent: #007b83;
  --accent-dark: #005961;
  --accent-soft: #e6f6f7;
  --accent-ring: rgba(0, 123, 131, 0.18);
  --ok: #21815a;
  --ok-soft: #e4f4eb;
  --warn: #9f661c;
  --warn-soft: #fff2d3;
  --danger: #b6422b;
  --danger-soft: #ffe9e3;
  --violet: #5e58b8;
  --steel: #315f7d;
  --shadow: 0 18px 44px rgba(19, 32, 28, 0.09);
  --shadow-soft: 0 8px 22px rgba(19, 32, 28, 0.06);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

body.submitter-mode .admin-surface,
body.submitter-mode .admin-only,
body.submitter-mode .admin-field {
  display: none !important;
}

body.submitter-mode .workspace-grid {
  grid-template-columns: minmax(0, 760px);
}

body.submitter-mode .form-panel {
  width: 100%;
}

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

button {
  cursor: pointer;
}

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

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

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 24px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #17231f 0%, #20362f 100%);
  color: #f7faf7;
  box-shadow: 12px 0 34px rgba(19, 32, 28, 0.08);
}

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

.brand-mark {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: #cae95f;
  color: #16201b;
  font-size: 0.83rem;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.brand strong,
.brand span {
  display: block;
  min-width: 0;
}

.brand strong {
  font-size: 0.98rem;
}

.brand span {
  color: #afc2b8;
  font-size: 0.82rem;
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #cbdad1;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.nav-link.active {
  box-shadow: inset 3px 0 0 #cae95f;
}

.sidebar-status {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.075);
}

.sidebar-status strong {
  font-size: 0.96rem;
}

.sidebar-status span:last-child {
  color: #b7c6be;
  font-size: 0.82rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  min-width: 0;
  padding-bottom: 4px;
}

.topbar > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar h1,
.panel h2,
.board-lane h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  color: #10201b;
  font-size: clamp(1.9rem, 2.5vw, 2.8rem);
  font-weight: 850;
  line-height: 1.08;
}

.context-line {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.topbar-actions,
.form-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.admin-password {
  display: block;
  width: 148px;
}

.primary-button,
.secondary-button,
.icon-button,
.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.primary-button {
  gap: 8px;
  padding: 0 16px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 123, 131, 0.18);
}

.primary-button:hover {
  background: var(--accent-dark);
  box-shadow: 0 14px 28px rgba(0, 89, 97, 0.22);
}

.secondary-button,
.icon-button,
.row-action {
  background: #fbfdfc;
  border-color: var(--line);
  color: var(--ink);
}

.secondary-button:hover,
.icon-button:hover,
.row-action:hover {
  border-color: var(--line-strong);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.secondary-button {
  padding: 0 15px;
}

.icon-button,
.row-action {
  width: 40px;
  padding: 0;
}

.primary-button:active,
.secondary-button:active,
.icon-button:active,
.row-action:active {
  transform: translateY(1px);
}

.row-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
}

.metric-card {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.metric-card.risk {
  border-color: #f2b4a5;
  background: #fff8f6;
}

.metric-card.wide {
  min-width: 0;
}

.metric-label,
.metric-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.metric-card strong {
  align-self: center;
  color: #10201b;
  font-size: 2.05rem;
  line-height: 1;
}

.metric-progress {
  display: grid;
  align-items: end;
  gap: 12px;
}

.bar-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eeeb;
}

.bar-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  transition: width 240ms ease;
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(150px, 190px));
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.search-field,
.select-field,
.form-grid label,
.notes-field {
  display: grid;
  gap: 6px;
}

.search-field {
  position: relative;
}

.combo-field {
  position: relative;
  min-width: 0;
}

.combo-field input {
  padding-right: 44px;
}

.combo-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 42px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #f7faf8;
  color: var(--muted);
}

.combo-toggle:hover {
  color: var(--ink);
}

.combo-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 278px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 20px 46px rgba(19, 32, 28, 0.16);
}

.combo-option {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.combo-option:last-child {
  border-bottom: 0;
}

.combo-option:hover,
.combo-option.active {
  background: var(--accent-soft);
}

.combo-option strong {
  font-size: 0.9rem;
}

.combo-option span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.combo-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-field input {
  padding-left: 42px;
}

.select-field span,
.form-grid span,
.notes-field span,
.checklist-fieldset legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fbfdfc;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(19, 32, 28, 0.03);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

input,
select {
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  padding: 11px 12px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #8b9892;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(0, 1.5fr);
  gap: 20px;
  align-items: start;
}

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

.form-panel {
  padding: 20px;
}

.account-panel {
  padding: 20px;
}

.password-form {
  display: grid;
  gap: 12px;
}

.tracker-panel {
  min-width: 0;
  overflow: hidden;
}

.approved-panel {
  padding: 20px;
}

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

.tracker-panel .panel-header {
  padding: 20px 20px 0;
}

.panel h2 {
  color: #10201b;
  font-size: 1.16rem;
  font-weight: 850;
}

.pill,
.status-pill,
.priority-pill,
.due-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 800;
}

.pill {
  border: 1px solid var(--line);
  background: #f7faf8;
  color: #3d4b45;
}

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

.equipment-search-field {
  grid-column: 1 / -1;
}

.checklist-fieldset {
  margin: 15px 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.checklist-fieldset legend {
  padding: 0 6px;
}

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

.step-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #33413b;
  font-size: 0.84rem;
  font-weight: 750;
}

.step-check input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--accent);
}

.form-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.form-notice {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.form-notice:empty {
  display: none;
}

.form-notice[data-tone="success"] {
  color: var(--ok);
}

.form-notice[data-tone="error"] {
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
  scrollbar-color: var(--line-strong) transparent;
}

table {
  width: 100%;
  min-width: 850px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 13px 15px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #f8fbf9;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f8fbf9;
}

.equipment-cell {
  display: grid;
  gap: 3px;
  min-width: 170px;
}

.equipment-cell strong {
  font-size: 0.96rem;
}

.equipment-cell span,
.owner-cell span,
.next-step {
  color: var(--muted);
  font-size: 0.82rem;
}

.owner-cell {
  display: grid;
  gap: 3px;
  min-width: 118px;
}

.status-pill[data-status="Submitted"] {
  background: #edf2f7;
  color: #3e4c59;
}

.status-pill[data-status="In Review"] {
  background: #fff3d7;
  color: #8a5a12;
}

.status-pill[data-status="Forwarded"] {
  background: #e8f0ff;
  color: var(--steel);
}

.status-pill[data-status="In Progress"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.status-pill[data-status="Testing"] {
  background: #ecebff;
  color: var(--violet);
}

.status-pill[data-status="Blocked"] {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill[data-status="Complete"] {
  background: var(--ok-soft);
  color: var(--ok);
}

.priority-pill {
  margin-top: 6px;
}

.priority-pill[data-priority="Critical"] {
  background: var(--danger-soft);
  color: var(--danger);
}

.priority-pill[data-priority="High"] {
  background: var(--warn-soft);
  color: var(--warn);
}

.priority-pill[data-priority="Normal"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.priority-pill[data-priority="Low"] {
  background: var(--panel-soft);
  color: #4e5b55;
}

.due-pill {
  background: var(--panel-soft);
  color: #48554f;
}

.due-pill.overdue {
  background: var(--danger-soft);
  color: var(--danger);
}

.due-pill.soon {
  background: var(--warn-soft);
  color: var(--warn);
}

.progress-cell {
  display: grid;
  gap: 7px;
  min-width: 130px;
}

.progress-cell strong {
  font-size: 0.86rem;
}

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

.action-column {
  width: 172px;
  text-align: right;
}

.empty-state {
  display: grid;
  gap: 5px;
  margin: 18px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fbfdfc;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

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

.approved-card {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.approved-card header,
.approved-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.approved-card header {
  min-width: 0;
}

.approved-card h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.approved-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.approved-meta {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.status-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 10px;
}

.board-lane {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.lane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lane-header h2 {
  font-size: 1rem;
}

.lane-header span {
  min-width: 28px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

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

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

.lane-card strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.92rem;
}

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

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

  .sidebar {
    position: static;
    flex-direction: row;
    align-items: center;
    height: auto;
    padding: 12px 18px;
    box-shadow: none;
  }

  .nav-list {
    display: flex;
    flex-wrap: wrap;
    margin-left: auto;
  }

  .sidebar-status {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

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

  .tracker-panel {
    min-width: 0;
  }
}

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

  .sidebar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav-list {
    width: 100%;
    margin-left: 0;
    gap: 8px;
  }

  .nav-link {
    flex: 1 1 132px;
    min-height: 40px;
    padding: 9px 10px;
  }

  .topbar,
  .panel-header {
    flex-direction: column;
  }

  .topbar h1 {
    font-size: 2rem;
  }

  .topbar-actions,
  .form-actions {
    width: 100%;
    justify-content: stretch;
  }

  .admin-login {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
  }

  .admin-password {
    width: 100%;
  }

  .topbar-actions .primary-button,
  .topbar-actions .secondary-button,
  .form-actions .primary-button,
  .form-actions .secondary-button {
    flex: 1;
  }

  .metrics-grid,
  .control-strip,
  .form-grid,
  .step-checklist,
  .approved-list,
  .status-board {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 96px;
  }

  .form-panel,
  .account-panel,
  .approved-panel {
    padding: 16px;
  }

  .tracker-panel .panel-header {
    padding: 16px 16px 0;
  }

  .empty-state {
    margin: 14px;
    padding: 16px;
  }
}

@media (max-width: 440px) {
  .workspace {
    padding: 14px;
  }

  .brand {
    width: 100%;
  }

  .nav-link {
    flex-basis: 100%;
  }

  .admin-login {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

/* Industrial operations skin */
:root {
  --bg: #f3f5f7;
  --bg-soft: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --ink: #111827;
  --muted: #5f6874;
  --line: #d5dde5;
  --line-strong: #9aa8b7;
  --accent: #0f6f86;
  --accent-dark: #164e63;
  --accent-soft: #e7f3f7;
  --accent-ring: rgba(15, 111, 134, 0.16);
  --ok: #166534;
  --ok-soft: #e8f5ed;
  --warn: #9a6515;
  --warn-soft: #fff4d6;
  --danger: #b42318;
  --danger-soft: #fee8e6;
  --violet: #4f46a5;
  --steel: #334155;
  --shadow: none;
  --shadow-soft: none;
}

body {
  background: var(--bg);
}

.app-shell {
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  padding: 22px 16px;
  border-right: 1px solid #263241;
  background: #111827;
  box-shadow: none;
}

.brand-mark {
  border-color: #465465;
  background: #f2b84b;
  box-shadow: none;
  color: #111827;
}

.brand strong {
  font-size: 0.95rem;
}

.brand span,
.sidebar-status span:last-child {
  color: #a9b4c0;
}

.nav-link {
  min-height: 40px;
  border-radius: 6px;
  color: #cbd5e1;
}

.nav-link svg {
  color: #8ea0b2;
}

.nav-link:hover,
.nav-link.active {
  border-color: #384557;
  background: #1c2633;
}

.nav-link.active {
  box-shadow: inset 3px 0 0 #f2b84b;
}

.sidebar-status {
  border-color: #344153;
  background: #17212d;
}

.workspace {
  gap: 18px;
  padding: 26px;
}

.topbar {
  align-items: center;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  color: #111827;
  font-size: clamp(1.7rem, 2.1vw, 2.45rem);
  font-weight: 820;
}

.context-line {
  color: #647281;
}

.eyebrow {
  color: #446071;
  font-size: 0.71rem;
  letter-spacing: 0.1em;
}

.primary-button,
.secondary-button,
.icon-button,
.row-action {
  min-height: 40px;
  border-radius: 6px;
  box-shadow: none;
}

.primary-button {
  background: #0f6f86;
}

.primary-button:hover {
  background: #164e63;
  box-shadow: none;
}

.secondary-button,
.icon-button,
.row-action {
  background: #ffffff;
  border-color: #c9d3dd;
}

.secondary-button:hover,
.icon-button:hover,
.row-action:hover {
  border-color: #8fa0b2;
  background: #f8fafc;
  box-shadow: none;
}

.metrics-grid {
  gap: 12px;
}

.metric-card,
.panel,
.control-strip,
.board-lane,
.approved-card {
  border-color: var(--line);
  box-shadow: none;
}

.metric-card {
  min-height: 104px;
  padding: 15px;
}

.metric-card strong {
  color: #111827;
  font-size: 1.9rem;
  font-weight: 850;
}

.metric-label,
.metric-note {
  color: #647281;
}

.metric-card.risk {
  border-color: #efc4bc;
  background: #fffafa;
}

.control-strip {
  padding: 12px;
  background: #ffffff;
}

input,
select,
textarea {
  min-height: 42px;
  border-color: #aebdcc;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0f6f86;
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.combo-toggle {
  height: 40px;
  border-radius: 0 6px 6px 0;
  background: #f1f5f9;
}

.combo-menu {
  border-radius: 6px;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.combo-option {
  min-height: 50px;
}

.combo-option:hover,
.combo-option.active {
  background: #edf7fa;
}

.workspace-grid {
  gap: 18px;
}

.form-panel,
.account-panel,
.approved-panel {
  padding: 18px;
}

.panel {
  border-radius: 6px;
}

.form-panel {
  border-top: 3px solid #0f6f86;
}

.approved-panel {
  border-top: 3px solid #334155;
}

.tracker-panel {
  border-top: 3px solid #334155;
}

.panel-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.tracker-panel .panel-header {
  padding: 18px 18px 12px;
}

.panel h2 {
  color: #111827;
  font-size: 1.05rem;
  font-weight: 820;
}

.select-field span,
.form-grid span,
.notes-field span,
.checklist-fieldset legend {
  color: #596879;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill,
.status-pill,
.priority-pill,
.due-pill {
  min-height: 26px;
  border-radius: 4px;
  font-size: 0.72rem;
}

.pill {
  background: #f8fafc;
}

.checklist-fieldset,
.step-check,
.empty-state {
  border-radius: 6px;
}

.checklist-fieldset {
  background: #f8fafc;
}

.step-check {
  background: #ffffff;
}

table {
  min-width: 900px;
}

th,
td {
  padding: 11px 14px;
}

th {
  background: #f1f5f9;
  color: #526173;
  font-size: 0.7rem;
}

tbody tr:hover {
  background: #f8fafc;
}

.bar-track {
  height: 8px;
  background: #e2e8f0;
}

.bar-track span {
  background: #0f6f86;
}

.status-pill[data-status="Submitted"] {
  background: #eef2f7;
  color: #475569;
}

.status-pill[data-status="Forwarded"] {
  background: #e8f2ff;
  color: #24547a;
}

.status-pill[data-status="In Progress"],
.priority-pill[data-priority="Normal"] {
  background: #e7f3f7;
  color: #0f5d70;
}

.status-pill[data-status="Testing"] {
  background: #eeedff;
  color: #4f46a5;
}

.status-pill[data-status="Complete"] {
  background: #e8f5ed;
  color: #166534;
}

.priority-pill[data-priority="Low"],
.due-pill {
  background: #f1f5f9;
  color: #475569;
}

.empty-state {
  border-style: solid;
  background: #f8fafc;
}

.lane-header h2 {
  font-size: 0.96rem;
}

.lane-card {
  border-radius: 6px;
}

@media (max-width: 1320px) {
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #263241;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 14px;
  }

  .topbar {
    align-items: stretch;
  }

  .topbar h1 {
    font-size: 1.85rem;
  }

  .form-panel,
  .account-panel,
  .approved-panel {
    padding: 15px;
  }

  .panel-header {
    padding-bottom: 10px;
  }
}

.control-strip {
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 180px));
}

table {
  min-width: 1080px;
}

.action-column {
  width: 220px;
}

.row-actions {
  min-width: 210px;
}

.account-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line);
}

.compact-header {
  margin-bottom: 12px;
}

.ai-settings-form,
.notification-settings-form {
  gap: 14px;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 760;
}

.toggle-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.inline-toggle {
  align-self: end;
  min-height: 42px;
}

.pill[data-ai-state="enabled"] {
  background: #e8f5ed;
  color: #166534;
}

.pill[data-ai-state="stored"] {
  background: #e8f2ff;
  color: #24547a;
}

.pill[data-ai-state="missing"] {
  background: #f1f5f9;
  color: #475569;
}

.pill[data-notify-state="enabled"] {
  background: #e8f5ed;
  color: #166534;
}

.pill[data-notify-state="stored"] {
  background: #e8f2ff;
  color: #24547a;
}

.pill[data-notify-state="missing"] {
  background: #f1f5f9;
  color: #475569;
}

.settings-status-line {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.45;
}

.ai-cell {
  display: grid;
  gap: 5px;
  min-width: 160px;
}

.ai-cell span,
.ai-cell small {
  display: block;
}

.ai-cell > span:not(.ai-pill),
.ai-cell small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 720;
  line-height: 1.35;
}

.ai-cell small {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
}

.ai-pill[data-ai="verified"] {
  background: #e8f5ed;
  color: #166534;
}

.ai-pill[data-ai="review"] {
  background: #fff3d7;
  color: #8a5a12;
}

.ai-pill[data-ai="duplicate"] {
  background: #fef0e7;
  color: #a44611;
}

.ai-pill[data-ai="invalid"] {
  background: #fee8e8;
  color: #b42318;
}

.ai-pill[data-ai="incomplete"] {
  background: #eeedff;
  color: #4f46a5;
}

.ai-pill[data-ai="unavailable"],
.ai-pill[data-ai="off"] {
  background: #f1f5f9;
  color: #475569;
}

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

  .inline-toggle {
    align-self: start;
  }
}

.status-pill[data-status="Needs Info"] {
  background: #fef0e7;
  color: #a44611;
}

.status-pill[data-status="Ready to Pass"] {
  background: #e8f5ed;
  color: #166534;
}

.pill[data-automation-state="enabled"],
.pill[data-status-state="Forwarded"],
.pill[data-status-state="Complete"] {
  background: #e8f5ed;
  color: #166534;
}

.pill[data-automation-state="off"],
.pill[data-status-state="Needs Info"],
.pill[data-status-state="Blocked"] {
  background: #fee8e8;
  color: #b42318;
}

.pill[data-status-state="Ready to Pass"],
.pill[data-status-state="In Review"] {
  background: #fff3d7;
  color: #8a5a12;
}

.status-panel,
.audit-panel {
  padding: 20px;
}

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

.automation-settings-form input[readonly] {
  background: #f1f5f3;
  color: #475569;
  font-size: 0.78rem;
}

.status-lookup {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.status-lookup label,
.status-update-form label {
  display: grid;
  gap: 6px;
}

.status-lookup span,
.status-update-form span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-result {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.status-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.status-summary h3 {
  margin: 0;
  font-size: 1.22rem;
}

.status-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

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

.status-facts span,
.status-ai,
.status-audit {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.status-facts span {
  display: grid;
  gap: 4px;
  padding: 10px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
}

.status-facts strong {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.status-ai,
.status-audit {
  display: grid;
  gap: 8px;
  padding: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.status-ai p {
  margin: 0;
}

.status-audit span {
  display: block;
}

.status-update-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.status-update-form .notes-field {
  grid-column: 1 / -1;
}

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

.audit-entry {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.audit-entry:first-child {
  border-top: 0;
  padding-top: 0;
}

.audit-entry time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.audit-entry div {
  display: grid;
  gap: 3px;
}

.audit-entry strong {
  font-size: 0.92rem;
}

.audit-entry span,
.audit-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.reference-workspace {
  display: grid;
  gap: 18px;
}

.reference-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.reference-header h2 {
  margin: 0;
  font-size: 1.28rem;
}

.reference-header p:not(.eyebrow) {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.42;
}

.reference-layout {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.reference-sidebar,
.reference-detail-panel,
.reference-support-panel {
  padding: 16px;
}

.reference-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 36px);
  overflow: hidden;
}

.reference-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reference-list {
  display: grid;
  gap: 6px;
  overflow: auto;
  padding-right: 3px;
}

.reference-list-item {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 56px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.reference-list-item:hover,
.reference-list-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.reference-list-item strong {
  font-size: 0.9rem;
}

.reference-list-item span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.reference-detail {
  display: grid;
  gap: 14px;
}

.reference-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.reference-detail-hero h2 {
  margin: 0;
  font-size: 1.42rem;
}

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

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

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

.reference-fact-grid span {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
  font-size: 0.86rem;
  font-weight: 800;
}

.reference-fact-grid strong {
  color: var(--muted);
  font-size: 0.71rem;
  text-transform: uppercase;
}

.reference-info-block {
  display: grid;
  gap: 8px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.reference-info-block h3 {
  margin: 0;
  font-size: 0.96rem;
}

.reference-info-block p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.torque-empty {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.torque-empty span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 740;
}

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

.torque-table {
  min-width: 620px;
  border-spacing: 0;
}

.torque-table th,
.torque-table td {
  padding: 10px 11px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  vertical-align: top;
}

.torque-table thead th {
  border-top: 0;
}

.torque-table td:nth-child(4) {
  font-weight: 850;
  white-space: nowrap;
}

.reference-submittals {
  display: grid;
  gap: 8px;
}

.reference-submittal,
.reference-submittals-empty {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.reference-submittal {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.reference-submittal span,
.reference-submittal small,
.reference-submittals-empty span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 740;
}

.reference-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.spec-card-list,
.drawing-card-list {
  display: grid;
  gap: 9px;
}

.spec-card,
.drawing-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.spec-card header,
.drawing-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.spec-card header span,
.drawing-card header span,
.spec-card small,
.drawing-card small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
}

.spec-card p,
.drawing-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.row-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 270px;
}

.action-column {
  width: 286px;
}

table {
  min-width: 1240px;
}

@media (max-width: 900px) {
  .settings-toggle-grid,
  .status-facts,
  .reference-layout,
  .reference-support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-lookup {
    grid-template-columns: 1fr;
  }

  .reference-layout,
  .reference-support-grid {
    grid-template-columns: 1fr;
  }

  .reference-sidebar {
    position: static;
    max-height: none;
  }

  .reference-fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .settings-toggle-grid,
  .status-facts,
  .audit-entry,
  .reference-filters,
  .reference-fact-grid,
  .reference-submittal {
    grid-template-columns: 1fr;
  }

  .reference-detail-hero,
  .reference-header {
    display: grid;
  }
}

/* Mobile completion submittal refinements */
.submit-form-stack {
  display: grid;
  gap: 12px;
}

.submit-form-section {
  display: grid;
  gap: 11px;
  padding: 12px;
  border: 1px solid #d8e2eb;
  border-radius: 6px;
  background: #f8fafc;
}

.submit-equipment-section {
  border-color: #bfd6de;
  background: #f6fbfc;
}

.submit-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #435363;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.submit-section-title::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #0f6f86;
}

.form-panel .notes-field {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
    max-width: 100%;
    overflow-x: hidden;
  }

  .sidebar {
    position: static;
    flex-direction: column;
    height: auto;
    min-width: 0;
    max-width: 100%;
    border-right: 0;
    border-bottom: 1px solid #263241;
    overflow: hidden;
  }

  .workspace,
  .workspace-grid,
  .form-panel {
    min-width: 0;
    max-width: 100%;
  }

  body.submitter-mode .sidebar {
    position: sticky;
    z-index: 30;
    top: 0;
    gap: 10px;
    padding: 10px 12px;
  }

  body.submitter-mode .brand {
    gap: 10px;
  }

  body.submitter-mode .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  body.submitter-mode .brand strong {
    font-size: 0.9rem;
  }

  body.submitter-mode .brand span {
    display: none;
  }

  body.submitter-mode .nav-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.submitter-mode .nav-list::-webkit-scrollbar {
    display: none;
  }

  body.submitter-mode .nav-link {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 10px;
    white-space: nowrap;
  }

  body.submitter-mode .nav-link span {
    font-size: 0.78rem;
    font-weight: 780;
  }

  body.submitter-mode .workspace {
    gap: 12px;
    padding: 12px;
  }

  body.submitter-mode .topbar {
    gap: 10px;
    padding-bottom: 8px;
  }

  body.submitter-mode .topbar h1 {
    font-size: 1.25rem;
    line-height: 1.15;
  }

  body.submitter-mode .topbar .eyebrow,
  body.submitter-mode .topbar .context-line,
  body.submitter-mode .topbar-actions {
    display: none;
  }

  body.submitter-mode .workspace-grid {
    display: block;
  }

  .form-panel {
    overflow: hidden;
    padding: 0;
  }

  .form-panel .panel-header {
    flex-direction: row;
    align-items: center;
    margin: 0;
    padding: 14px 14px 12px;
    background: #ffffff;
  }

  .form-panel .panel-header h2 {
    font-size: 1.1rem;
  }

  .form-panel #formMode {
    min-height: 24px;
    padding-inline: 8px;
  }

  .form-panel form {
    padding: 12px;
  }

  .submit-form-stack {
    gap: 10px;
  }

  .submit-form-section {
    gap: 9px;
    padding: 11px;
  }

  .form-grid,
  .submit-request-grid,
  .submit-schedule-grid {
    gap: 10px;
  }

  .equipment-search-field {
    position: relative;
  }

  input,
  select,
  textarea {
    min-height: 48px;
    font-size: 16px;
  }

  input,
  select {
    padding-inline: 12px;
  }

  .combo-field input {
    padding-right: 52px;
  }

  .combo-toggle {
    width: 48px;
    height: 46px;
  }

  .combo-menu {
    top: calc(100% + 5px);
    max-height: min(390px, 48vh);
    border-color: #8ea5b5;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.2);
    overscroll-behavior: contain;
  }

  .combo-option {
    min-height: 62px;
    padding: 11px 12px;
  }

  .combo-option strong {
    font-size: 0.96rem;
  }

  .combo-option span {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .form-panel .notes-field {
    margin-top: 10px;
    padding: 11px;
    border: 1px solid #d8e2eb;
    border-radius: 6px;
    background: #f8fafc;
  }

  textarea {
    min-height: 118px;
  }

  .form-notice {
    margin: 10px 2px 0;
    line-height: 1.4;
  }

  .form-panel .form-actions {
    position: sticky;
    z-index: 12;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 12px -12px -12px;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
  }

  .form-panel .form-actions .primary-button {
    order: -1;
  }

  .form-panel .primary-button,
  .form-panel .secondary-button {
    min-height: 48px;
    width: 100%;
  }
}

@media (max-width: 440px) {
  body.submitter-mode .nav-link {
    flex-basis: auto;
  }

  body.submitter-mode .workspace {
    padding: 10px;
  }

  .form-panel .panel-header {
    padding: 12px;
  }

  .form-panel form {
    padding: 10px;
  }

  .submit-form-section,
  .form-panel .notes-field {
    padding: 10px;
  }

  .form-panel .form-actions {
    margin-right: -10px;
    margin-bottom: -10px;
    margin-left: -10px;
    padding: 10px;
  }
}
