:root {
  --bg: #f4f6f3;
  --panel: #ffffff;
  --text: #17211d;
  --muted: #66736b;
  --line: #dce3da;
  --soft: #eef2ed;
  --green: #15803d;
  --red: #c93a2f;
  --orange: #d97706;
  --blue: #1d6fb8;
  --purple: #7447a6;
  --slate: #475569;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(20, 30, 25, 0.08), 0 8px 28px rgba(20, 30, 25, 0.06);
}

/* Focused account, settings, and data-entry workspaces */
.account-section-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.account-section-card { grid-column: span 2; }
.account-section-card:nth-child(4),
.account-section-card:nth-child(5) { grid-column: span 3; }

.account-section-card {
  min-height: 88px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel, #fff);
  color: var(--text);
  text-align: right;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.account-section-card:hover,
.account-section-card:focus-visible {
  border-color: #6f8f82;
  box-shadow: 0 8px 22px rgba(26, 51, 42, 0.09);
  transform: translateY(-1px);
  outline: none;
}

.account-section-card > svg:first-child { color: #22654f; }
.account-section-card > svg:last-child { color: var(--muted); }
.account-section-card span { min-width: 0; display: grid; gap: 5px; }
.account-section-card strong { font-size: 15px; }
.account-section-card small { color: var(--muted); line-height: 1.7; }
.cell-note { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }

.count-badge {
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4f1;
  color: #225b49;
  font-weight: 700;
}

.workgroup-workspace .panel-body,
.invoicing-workspace .panel-body { min-width: 0; }

.billing-filters { max-width: 680px; }

.legal-document-list {
  display: grid;
  gap: 0;
}

.legal-document {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.legal-document:last-child { border-bottom: 0; }
.legal-document h3 { margin: 4px 0 8px; font-size: 16px; }
.legal-document p { margin: 0; color: var(--muted); line-height: 1.9; }
.legal-document > div > span { color: #8a5a18; font-size: 12px; font-weight: 700; }
.legal-document-action { display: grid; justify-items: end; gap: 6px; }
.legal-document-action small { color: var(--muted); }

.settings-focused > .panel,
.settings-focused > .wide { width: 100%; }

.scratchpad-shell {
  width: 100%;
  max-height: 58vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.scratchpad-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.scratchpad-table th,
.scratchpad-table td {
  height: 42px;
  padding: 0;
  border-inline-end: 1px solid #e2e7e4;
  border-bottom: 1px solid #e2e7e4;
  background: #fff;
  white-space: nowrap;
}

.scratchpad-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 44px;
  padding: 0 10px;
  background: #eef3f0;
  color: #253b33;
  text-align: right;
  font-size: 12px;
}

.scratchpad-table thead th b { color: #b42318; margin-inline-start: 3px; }
.scratchpad-table tbody th {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 48px;
  padding: 0 10px;
  background: #f7f9f8;
  color: var(--muted);
  text-align: center;
}

.scratchpad-table input {
  width: 164px;
  height: 41px;
  border: 0;
  border-radius: 0;
  padding: 0 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.scratchpad-table input:focus {
  outline: 2px solid #2e7d63;
  outline-offset: -2px;
  background: #f7fffb;
}

.scratchpad-table td:last-child {
  min-width: 56px;
  padding: 4px 8px;
  text-align: center;
}

@media (max-width: 820px) {
  .account-section-grid { grid-template-columns: 1fr; }
  .account-section-card,
  .account-section-card:nth-child(4),
  .account-section-card:nth-child(5) { grid-column: auto; }
  .legal-document { grid-template-columns: 1fr; gap: 12px; }
  .legal-document-action { justify-items: start; }
  .scratchpad-workspace .panel-head { align-items: flex-start; }
  .scratchpad-workspace .panel-head .actions { width: 100%; overflow-x: auto; padding-bottom: 4px; flex-wrap: nowrap; }
  .scratchpad-table input { width: 148px; }
}

.report-designer-workspace {
  align-items: start;
}

.report-layout-sheet .panel-body {
  gap: 14px;
}

.report-layout-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-height: 48px;
  padding: 10px 12px;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.report-layout-toolbar strong {
  color: var(--text);
}

.report-color-swatch {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid rgba(15, 23, 42, .18);
  border-radius: 4px;
  background: var(--swatch);
}

.report-preview-group {
  margin-block: 12px 18px;
}

.report-preview-group h4 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 13px;
}

.report-preview-group h4 span {
  color: var(--muted);
  font-weight: 400;
}

.pdf-preview-frame {
  display: block;
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  background: #fff;
}

.pdf-text-preview {
  max-width: 760px;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.9;
  text-align: start;
}

.wizard-presets {
  justify-content: flex-start;
}

@media (max-width: 760px) {
  .report-layout-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pdf-preview-frame {
    min-height: 440px;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IRANSans", Tahoma, Arial, sans-serif;
}

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

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  padding: 12px;
  overflow-x: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 520px) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px;
  box-shadow: var(--shadow);
}

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

.brand-mark,
.icon-square {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: #28323b;
  color: #fff;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.brand p,
.small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
  padding: 8px 10px;
}

.searchbox input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

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

.btn,
.icon-btn,
.chip {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  min-height: 36px;
  padding: 0 12px;
  font-weight: 800;
  transition: background 0.15s, border 0.15s, transform 0.15s;
}

.btn:hover,
.icon-btn:hover,
.chip:hover {
  background: var(--soft);
}

.btn.primary {
  border-color: #0f6b3b;
  background: #0f6b3b;
  color: #fff;
}

.btn.danger {
  border-color: #c93a2f;
  background: #c93a2f;
  color: #fff;
}

.btn.ghost {
  background: transparent;
}

.icon-btn {
  min-width: 38px;
  width: auto;
  padding: 0 11px;
}

.modules {
  display: grid;
  grid-template-columns: repeat(11, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #dfe5dd;
  padding: 8px;
  box-shadow: var(--shadow);
}

.module {
  min-height: 78px;
  border: 1px solid #c9d2c8;
  border-top: 5px solid var(--slate);
  border-radius: 7px;
  background: #fff;
  padding: 8px;
  text-align: right;
}

.module.active {
  outline: 2px solid #111827;
}

.module strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

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

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 8px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: end;
  margin-top: 12px;
  min-height: 240px;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(10, 18, 15, 0.95), rgba(10, 18, 15, 0.62)),
    url("./assets/images/concrete-lab-dashboard.png") center/cover;
  color: #fff;
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 42px);
  letter-spacing: 0;
}

.hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 2;
  font-size: 14px;
}

.hero-metrics {
  display: grid;
  gap: 10px;
}

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

.metric-card {
  color: var(--text);
  padding: 12px;
}

.metric-card label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-card b {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.workspace {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
  min-width: 0;
}

.panel-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.panel-head h3 {
  margin: 0;
  font-size: 15px;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.panel-body {
  padding: 12px;
  min-width: 0;
}

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

.record-card {
  width: 100%;
  padding: 10px;
  text-align: right;
}

.record-card.active {
  border-color: var(--green);
  background: #edf8f0;
}

.record-card strong {
  display: block;
  font-size: 13px;
}

.record-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

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

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

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

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.subhead {
  margin: 18px 0 8px;
  font-size: 14px;
}

.perm {
  display: inline-block;
  margin: 2px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.perm.on {
  background: #e7f5ed;
  color: #0f6b3b;
}

.perm.off {
  background: #f1f3f1;
  color: #7a837d;
}

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  padding: 10px;
  min-height: 92px;
}

.step strong,
.step span {
  display: block;
  line-height: 1.7;
}

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

.field {
  border: 1px solid #e7ece4;
  border-radius: 7px;
  background: #fbfcfb;
  padding: 10px;
}

.field label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.field div,
.field output {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 900;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 8px 12px;
  font-weight: 900;
}

.tab.active {
  border-color: #0f6b3b;
  background: #0f6b3b;
  color: #fff;
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid #edf0ea;
  padding: 9px;
  text-align: right;
  vertical-align: middle;
}

th {
  background: #eef2ed;
  color: #39423d;
  font-size: 12px;
  font-weight: 900;
}

.table-wrap select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cfd8cf;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 6px 8px;
}

tr:hover td {
  background: #fbfcfb;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 24px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
}

.ok {
  border-color: #b7dfc5;
  background: #edf8f0;
  color: #1f6b3c;
}

.warn {
  border-color: #ead79a;
  background: #fff8df;
  color: #7a5a11;
}

.bad {
  border-color: #efc0b7;
  background: #fff0ed;
  color: #9b2f20;
}

.info {
  border-color: #b9d6ee;
  background: #eef7ff;
  color: #24577d;
}

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

[hidden] {
  display: none !important;
}

.form-control {
  display: grid;
  gap: 6px;
}

.form-control label {
  color: #344039;
  font-size: 12px;
  font-weight: 900;
}

.form-control input,
.form-control select,
.form-control textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cfd8cf;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

.form-control textarea {
  min-height: 84px;
  resize: vertical;
}

.checkbox-group {
  grid-column: 1 / -1;
}

.checkbox-group > span {
  color: #344039;
  font-size: 12px;
  font-weight: 900;
}

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

.check-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid #d9e3d9;
  border-radius: 7px;
  padding: 7px 9px;
  background: #fbfdfb;
  font-size: 12px;
  font-weight: 800;
}

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

.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus {
  border-color: #0f6b3b;
  box-shadow: 0 0 0 3px rgba(15, 107, 59, 0.12);
}

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

.chart {
  width: 100%;
  height: 280px;
  border: 1px solid #e7ece4;
  border-radius: var(--radius);
  background: #fbfcfb;
}

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

.lane {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  padding: 10px;
}

.lane h4 {
  margin: 0 0 10px;
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.48);
  padding: 18px;
}

.modal {
  width: min(880px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
}

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

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

.modal-head h3 {
  margin: 0;
  font-size: 16px;
}

.empty {
  border: 1px dashed #cbd5c8;
  border-radius: var(--radius);
  background: #fbfcfb;
  color: var(--muted);
  padding: 20px;
  text-align: center;
  font-weight: 800;
}

.notice {
  border: 1px solid #b9d6ee;
  border-radius: var(--radius);
  background: #eef7ff;
  color: #24577d;
  padding: 10px;
  line-height: 1.9;
  font-size: 13px;
  font-weight: 700;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.file-link {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.file-link:hover {
  text-decoration: underline;
}

@media (max-width: 1180px) {
  .modules {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }

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

@media (max-width: 720px) {
  .app {
    padding: 8px;
  }

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

  .grid.two,
  .grid.three,
  .grid.four,
  .steps,
  .form-grid,
  .check-grid,
  .kanban {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 16px;
  }
}

/* Compatibility rules retained for the dense operational workspaces. */
:root {
  --bg: #eceeeb;
  --panel: #ffffff;
  --text: #202522;
  --muted: #68706b;
  --line: #c7cbc7;
  --soft: #e6e9e6;
  --radius: 2px;
  --shadow: 0 1px 2px rgba(20, 25, 22, 0.12);
}

body {
  background: #eceeeb;
}

.app {
  padding: 0;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  min-height: 44px;
  align-items: stretch;
  border: 0;
  border-bottom: 1px solid #6f7471;
  border-radius: 0;
  background: #858987;
  color: #fff;
  padding: 0 8px;
  box-shadow: none;
}

.brand {
  flex: 0 0 auto;
  min-width: 250px;
  padding: 5px 8px;
  color: #fff;
}

.brand-mark,
.icon-square {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: transparent;
}

.brand-mark img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.brand h1 {
  color: #fff;
  font-size: 14px;
}

.brand p,
.topbar .small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  line-height: 1.35;
}

.private-area,
.connection-state {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 10px;
  font-size: 11px;
}

.private-area strong {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: #dd5f27;
  padding: 4px 7px;
  font-size: 11px;
}

.connection-state i {
  width: 9px;
  height: 9px;
  border: 1px solid #b9f0c9;
  border-radius: 50%;
  background: #32a852;
  box-shadow: 0 0 0 2px rgba(50, 168, 82, 0.18);
}

.searchbox {
  flex: 1 1 220px;
  align-self: center;
  min-width: 180px;
  max-width: 480px;
  margin: 5px 10px;
  border-color: #707572;
  border-radius: 2px;
  background: #f8f9f8;
  padding: 4px 8px;
}

.searchbox input {
  min-height: 22px;
  font-size: 11px;
}

.toolbar {
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding: 5px 0;
}

.topbar .btn,
.topbar .icon-btn {
  min-height: 32px;
  border-color: #a3a7a4;
  border-radius: 1px;
  background: #727775;
  color: #fff;
  padding: 0 9px;
  font-size: 11px;
}

.topbar .btn.primary {
  border-color: #187739;
  background: #218642;
}

.topbar .settings-launch.active {
  border-color: #fff;
  background: #37413d;
}

.modules {
  display: flex;
  gap: 0;
  align-items: stretch;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #7e8380;
  padding: 0 8px;
  box-shadow: none;
  overflow-x: auto;
}

.module {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 38px;
  border: 0;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  color: #fff;
  padding: 0 13px;
  text-align: center;
  white-space: nowrap;
}

.module:hover {
  background: rgba(255, 255, 255, 0.12);
}

.module.active {
  outline: 0;
  background: var(--module-color);
}

.module strong {
  font-size: 12px;
  font-weight: 700;
}

.module span {
  display: none;
}

.module-ribbon {
  border-bottom: 1px solid #929692;
  background: var(--module-color);
  color: #fff;
}

.module-ribbon-title {
  display: flex;
  min-height: 29px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 13px;
}

.module-ribbon-title span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.subnav {
  justify-content: center;
  gap: 1px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 3px 8px 5px;
}

.subnav .chip {
  min-height: 29px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
}

.subnav .chip:hover {
  background: rgba(255, 255, 255, 0.18);
}

.subnav .chip.active {
  background: rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 -2px 0 #fff;
}

.operational-mode .workspace {
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 4px;
  align-items: start;
  margin-top: 0;
  background: #eceeeb;
  padding: 4px;
}

.operational-mode .panel,
.operational-mode .metric-card,
.operational-mode .record-card,
.dashboard-details .panel,
.dashboard-details .metric-card {
  border-radius: 0;
  box-shadow: none;
}

.panel-head {
  align-items: center;
  border-bottom-color: #c5c9c5;
  background: #f0f1f0;
  padding: 8px;
}

.panel-head h3 {
  font-size: 13px;
}

.panel-head p {
  font-size: 10px;
  line-height: 1.5;
}

.panel-body {
  padding: 8px;
}

.btn,
.icon-btn,
.chip,
.tab,
.form-control input,
.form-control select,
.form-control textarea,
.field,
.table-wrap,
.check-item,
.status {
  border-radius: 2px;
}

.btn,
.icon-btn {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 11px;
}

.record-card {
  padding: 8px;
}

.record-card strong,
table {
  font-size: 12px;
}

th,
td {
  padding: 7px;
}

.dashboard-mode {
  min-height: 100vh;
  background: #f3f5f4;
}

.dashboard-home {
  min-height: calc(100vh - 44px);
  padding: 8px;
}

.dashboard-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 1320px);
}

.dashboard-tile {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 178px;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 0;
  background-position: center;
  background-size: cover;
  color: #fff;
  padding: 15px;
  text-align: right;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.48);
}

.dashboard-tile:hover {
  border-color: #fff;
  filter: brightness(1.08);
}

.dashboard-tile > strong {
  display: block;
  font-size: 22px;
  line-height: 1.25;
}

.dashboard-tile > span {
  display: block;
  max-width: 88%;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.55;
}

.dashboard-tile dl {
  display: grid;
  gap: 2px;
  margin: auto 0 0;
}

.dashboard-tile dl div {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  font-size: 11px;
}

.dashboard-tile dt,
.dashboard-tile dd {
  margin: 0;
}

.dashboard-tile dd {
  font-weight: 900;
}

.tile-materials {
  background: #fff;
}

.tile-mixes {
  background: #fff;
}

.tile-lab {
  background: #fff;
}

.tile-qaqc {
  background: #fff;
}

.tile-american {
  background: #fff;
  background-position: 12% center;
  background-size: cover, auto 78%;
  background-repeat: no-repeat;
}

.tile-uk {
  background: #fff;
}

.tile-global {
  background: #fff;
}

.tile-import {
  background: #fff;
}

.tile-account {
  background: #fff;
}

.dashboard-details {
  width: min(100%, 1320px);
  margin-top: 18px;
  border-top: 5px solid #7c817e;
  background: rgba(246, 247, 246, 0.96);
  padding: 8px;
}

.dashboard-details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -8px -8px 8px;
  border-bottom: 1px solid #c7cbc7;
  background: #e5e7e5;
  padding: 8px 10px;
  font-size: 12px;
}

.dashboard-details-head span {
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 1080px) {
  .dashboard-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .private-area,
  .connection-state {
    display: none;
  }

  .operational-mode .workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 4px;
  }

  .brand {
    min-width: 0;
    flex: 1 1 220px;
  }

  .searchbox {
    order: 3;
    max-width: none;
    flex-basis: 100%;
    margin: 3px 0;
  }

  .toolbar {
    overflow-x: auto;
  }

  .operational-mode .workspace,
  .dashboard-tiles {
    grid-template-columns: 1fr;
  }

  .dashboard-tile {
    min-height: 160px;
  }

  .module-ribbon-title {
    justify-content: flex-start;
    padding-inline: 10px;
  }

  .subnav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

.grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid.six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.statistics-workspace,
.global-pivot-workspace {
  grid-template-columns: 300px minmax(0, 1fr);
}

.project-report-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  margin-top: 0;
}

.project-report-shell > aside {
  align-self: start;
  max-height: calc(100vh - 190px);
  overflow: auto;
}

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

.section-band {
  min-width: 0;
  border: 1px solid #c7cbc7;
  background: #f8f9f8;
  padding: 8px;
}

.section-band > h3 {
  margin: 0 0 8px;
  color: #3d4540;
  font-size: 11px;
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  align-items: center;
}

.segmented-control .btn {
  border-radius: 0;
}

.plant-submittals-workspace > .panel,
.plant-submittals-workspace > .tabs,
.project-reports-workspace > .tabs {
  margin: 0;
}

.plant-submittals-workspace .auditing-workspace {
  margin-top: 0;
}

.material-test-history-shell {
  grid-template-columns: 250px minmax(0, 1fr);
  margin-top: 0;
}

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

.schedule-band {
  min-width: 0;
  border: 2px solid #c7cbc7;
  background: #fff;
}

.schedule-band.overdue {
  border-color: #d44757;
}

.schedule-band.compliant {
  border-color: #27935a;
}

.schedule-band > .table-wrap,
.schedule-band > .empty {
  margin: 8px;
}

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

@media (max-width: 760px) {
  .project-report-shell {
    grid-template-columns: 1fr;
  }

  .material-test-history-shell,
  .compact-list {
    grid-template-columns: 1fr;
  }

  .project-report-shell > aside {
    max-height: none;
  }
}

.cq-options-panel {
  align-self: stretch;
  background: #ebedeb;
}

.cq-options-panel .panel-body {
  align-content: start;
}

.option-block,
.document-bin {
  display: grid;
  gap: 7px;
  border: 1px solid #c7cbc7;
  background: #f5f6f5;
  padding: 8px;
}

.option-block > strong,
.document-bin > h3 {
  margin: 0;
  font-size: 11px;
}

.compact-tabs {
  gap: 1px;
  margin: 0;
  border-bottom: 1px solid #aeb3af;
  background: #dfe2df;
}

.compact-tabs .tab,
.chart-tabs .tab {
  min-height: 30px;
  border-radius: 0;
  background: #8b908d;
  color: #fff;
  padding: 6px 12px;
  font-size: 11px;
}

.compact-tabs .tab.active,
.chart-tabs .tab.active {
  border-color: var(--module-color, #0f6b3b);
  background: var(--module-color, #0f6b3b);
}

.stats-filter-band .panel-body {
  align-items: end;
}

.inline-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #3f4641;
  font-size: 10px;
  font-weight: 700;
}

.inline-control input {
  width: 128px;
  min-height: 30px;
  border: 1px solid #b8bdb9;
  background: #fff;
  padding: 5px 7px;
}

.standard-tag {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid #adb3af;
  background: #e7e9e7;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
}

.chart-tall {
  height: 360px;
}

.chart-legend,
.chart-toggle-row,
.period-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: #4b544e;
  font-size: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend i {
  width: 16px;
  height: 3px;
}

.pivot-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border: 1px solid #bec3bf;
  background: #e5e7e5;
  padding: 6px;
}

.pivot-fields span {
  border: 1px solid #aeb3af;
  background: #f9faf9;
  padding: 5px 9px;
  color: #343b36;
  font-size: 10px;
  font-weight: 700;
}

.batch-books-workspace,
.auditing-workspace {
  grid-template-columns: 275px minmax(0, 1fr);
}

.batch-books-workspace .record-card .btn {
  margin-top: 7px;
}

.document-bin {
  min-height: 260px;
  align-content: start;
  overflow: auto;
}

.command-board-workspace {
  grid-template-columns: 170px minmax(0, 1fr);
}

.command-board-nav .panel-body {
  display: grid;
  gap: 1px;
  padding: 0;
}

.command-section {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid #aeb3af;
  background: #8a8f8b;
  color: #fff;
  padding: 8px 10px;
  text-align: right;
}

.command-section.active {
  background: var(--module-color, #9f00c9);
}

.command-section strong,
.command-section span {
  font-size: 11px;
}

.period-switch label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

details > summary {
  cursor: pointer;
  color: #38423b;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .grid.five,
  .grid.six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .statistics-workspace,
  .global-pivot-workspace,
  .batch-books-workspace,
  .auditing-workspace,
  .command-board-workspace {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 700px) {
  .grid.five,
  .grid.six,
  .command-board-nav .panel-body {
    grid-template-columns: 1fr;
  }

  .chart-tall {
    height: 280px;
  }
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wizard-steps li {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  border: 1px solid #c7cbc7;
  background: #e7e9e7;
  color: #5d655f;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
}

.wizard-steps li b {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #9ca29e;
  border-radius: 50%;
  background: #fff;
}

.wizard-steps li.active {
  border-color: #159457;
  background: #e6f4eb;
  color: #155d38;
}

.wizard-steps li.active b,
.wizard-steps li.done b {
  border-color: #16834d;
  background: #16834d;
  color: #fff;
}

.wizard-steps li.done {
  color: #26734c;
}

.wizard-stage {
  display: grid;
  gap: 9px;
  border: 1px solid #c9cdca;
  background: #f7f8f7;
  padding: 8px;
}

.wizard-stage.active {
  border-top: 4px solid #16834d;
  background: #fff;
}

.wizard-stage.done {
  border-top: 3px solid #7a9b86;
}

.wizard-stage-head {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #d9ddda;
  padding-bottom: 7px;
}

.wizard-stage-head strong {
  font-size: 12px;
}

.wizard-stage-head > span {
  color: var(--muted);
  font-size: 10px;
}

.wizard-stage .subhead {
  margin: 6px 0;
}

.wizard-stage .table-wrap {
  border-radius: 0;
  background: #fff;
}

.wizard-stage table {
  font-family: "IRANSans", Tahoma, Arial, sans-serif;
  font-size: 11px;
}

.wizard-stage th {
  background: #e3e6e3;
}

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

.wizard-reference-summary .notice.warn {
  border-color: #e2c26e;
  background: #fff7d9;
  color: #72550a;
}

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

  .wizard-stage-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Independent Persian product design */
@font-face {
  font-family: "IRANSans";
  src: url("./assets/fonts/IRANSans.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("./assets/fonts/IRANSans-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("./assets/fonts/IRANSans-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
}

:root {
  --bg: #f3f5f4;
  --panel: #ffffff;
  --text: #1d2724;
  --muted: #65716d;
  --line: #d8dfdc;
  --line-strong: #bdc8c3;
  --soft: #eef2f0;
  --green: #08775b;
  --green-dark: #075c48;
  --red: #c84d42;
  --orange: #b86c18;
  --blue: #2f6fa3;
  --purple: #705a8c;
  --slate: #52605b;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(16, 35, 28, 0.05), 0 5px 18px rgba(16, 35, 28, 0.04);
}

html {
  background: var(--bg);
  color-scheme: light;
  letter-spacing: 0;
}

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "IRANSans", Tahoma, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

button,
input,
select,
textarea,
table {
  font-family: inherit;
  letter-spacing: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(8, 119, 91, 0.22);
  outline-offset: 2px;
}

.app {
  width: min(100%, 1800px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  padding: 10px 12px 28px;
}

.app .topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  min-height: 62px;
  grid-template-columns: minmax(225px, auto) auto minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  padding: 8px 10px;
  box-shadow: var(--shadow);
  color: var(--text);
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand h1 {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand p,
.small {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.private-area {
  display: grid;
  min-width: 95px;
  align-content: center;
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.private-area span {
  font-size: 9.5px;
}

.private-area strong {
  max-width: 120px;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchbox {
  display: flex;
  width: 100%;
  max-width: none;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
  padding: 0 10px;
  color: var(--muted);
}

.searchbox:focus-within {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(8, 119, 91, 0.1);
}

.searchbox input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.global-search-shell {
  position: relative;
  width: 100%;
  min-width: 0;
}

.global-search-results {
  position: absolute;
  z-index: 90;
  inset-block-start: calc(100% + 6px);
  inset-inline: 0;
  display: grid;
  max-height: min(430px, calc(100vh - 100px));
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  padding: 5px;
  box-shadow: 0 16px 38px rgba(23, 33, 29, 0.18);
}

.global-search-result {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid #edf1ee;
  border-radius: 4px;
  background: transparent;
  padding: 6px 8px;
  color: var(--text);
  text-align: start;
}

.global-search-result:last-child {
  border-bottom: 0;
}

.global-search-result:hover,
.global-search-result:focus-visible {
  background: #f0f7f4;
  outline: 0;
}

.global-search-result span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.global-search-result strong,
.global-search-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result strong {
  font-size: 11.5px;
}

.global-search-result small,
.global-search-empty {
  color: var(--muted);
  font-size: 10px;
}

.global-search-empty {
  padding: 13px 10px;
  text-align: center;
}

.connection-state {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #3d5a50;
  font-size: 10.5px;
  white-space: nowrap;
}

.connection-state i {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: #18a46f;
  box-shadow: 0 0 0 3px rgba(24, 164, 111, 0.12);
}

.billing-state {
  min-height: 34px;
  border: 0;
  background: transparent;
  padding: 0 5px;
  font-family: inherit;
  cursor: pointer;
}

.billing-state:hover,
.billing-state:focus-visible {
  color: var(--green);
  outline: 0;
}

.billing-state.expired {
  color: #9f2f2f;
}

.billing-state.expired i {
  background: #d64a4a;
  box-shadow: 0 0 0 3px rgba(214, 74, 74, 0.12);
}

.subscription-workspace {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.subscription-workspace > .notice {
  margin: 0;
}

.subscription-overview {
  display: flex;
  min-height: 132px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-block: 1px solid #cfdad6;
  background: #f3f7f5;
  padding: 20px clamp(14px, 3vw, 32px);
}

.subscription-overview > div:first-child > span,
.plan-head span {
  color: var(--muted);
  font-size: 10.5px;
}

.subscription-overview h2 {
  margin: 4px 0 3px;
  color: var(--text);
  font-size: 22px;
}

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

.subscription-meter {
  display: grid;
  width: min(240px, 36vw);
  min-width: 190px;
  min-height: 70px;
  align-content: center;
  border: 1px solid #b9ccc5;
  border-radius: 6px;
  background: linear-gradient(to left, rgba(8, 119, 91, 0.14) 0 var(--remaining), #fff var(--remaining) 100%);
  padding: 12px 16px;
}

.subscription-meter strong {
  color: #086c54;
  font-size: 18px;
}

.subscription-meter span {
  color: var(--muted);
  font-size: 10.5px;
}

.subscription-metrics {
  align-items: stretch;
}

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

.plan-card {
  display: flex;
  min-width: 0;
  min-height: 310px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 16px;
}

.plan-card.recommended {
  border-color: #79a99b;
  box-shadow: inset 0 3px 0 #08775b;
}

.plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: var(--green);
}

.plan-head h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 15px;
}

.plan-card > p {
  min-height: 38px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-block: 1px solid #e6ece9;
  padding: 11px 0;
}

.plan-price strong {
  color: var(--text);
  font-size: 20px;
}

.plan-price span {
  color: var(--muted);
  font-size: 10.5px;
}

.plan-card ul {
  display: grid;
  gap: 7px;
  margin: 13px 0 17px;
  padding: 0;
  list-style: none;
}

.plan-card li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #355048;
  font-size: 11px;
}

.plan-card li .ui-icon {
  flex: 0 0 auto;
  color: #08775b;
}

.plan-card > .btn {
  width: 100%;
  margin-top: auto;
}

.legal-billing-panel .field {
  min-width: 0;
}

.toolbar,
.actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.app .btn,
.app .icon-btn,
.app .chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: #2c3935;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.app .btn:hover,
.app .icon-btn:hover,
.app .chip:hover {
  border-color: #9fafaa;
  background: var(--soft);
  transform: none;
}

.app .btn.primary,
.app .icon-btn.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.app .btn.primary:hover,
.app .icon-btn.primary:hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.app .btn.danger {
  border-color: #e2b7b2;
  background: #fff7f6;
  color: #a63830;
}

.app .icon-btn {
  position: relative;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
}

.quick-create {
  padding-inline: 11px !important;
}

.ui-icon,
.ui-icon svg,
svg.lucide {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
}

.notification-count {
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  padding: 0 4px;
  font-size: 9px;
  font-weight: 900;
}

.notification-launch.has-alert {
  border-color: #e9b9b4;
  color: #a93d34;
}

.app .modules {
  display: flex;
  min-height: 48px;
  align-items: stretch;
  gap: 3px;
  margin: 8px 0 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 4px;
  box-shadow: none;
  scrollbar-width: thin;
}

.app .module {
  display: flex;
  min-width: 114px;
  min-height: 40px;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #52605b;
  padding: 6px 9px;
  text-align: center;
}

.app .module::before {
  display: none;
}

.app .module strong {
  color: inherit;
  font-size: 10.5px;
  line-height: 1.45;
}

.app .module > span {
  display: none;
}

.app .module:hover {
  border-color: var(--line);
  background: #f5f8f6;
  color: var(--text);
}

.app .module.active {
  border-color: color-mix(in srgb, var(--module-color) 35%, #d8dfdc);
  background: color-mix(in srgb, var(--module-color) 8%, #fff);
  color: var(--module-color);
  box-shadow: inset 0 -2px 0 var(--module-color);
}

.app .module-ribbon {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  margin: 6px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 5px 7px;
  box-shadow: none;
}

.module-ribbon-title {
  display: flex;
  min-width: 145px;
  align-items: center;
  gap: 8px;
  border-inline-end: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 3px 10px;
}

.module-ribbon-title strong {
  color: var(--module-color);
  font-size: 11.5px;
}

.module-ribbon-title span {
  display: none;
}

.subnav {
  display: flex;
  min-width: 0;
  flex: 1;
  gap: 3px;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: thin;
}

.app .chip {
  min-height: 32px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.app .chip.active {
  border-color: color-mix(in srgb, var(--module-color) 30%, var(--line));
  background: color-mix(in srgb, var(--module-color) 8%, #fff);
  color: var(--module-color);
}

.operational-mode > .grid,
.operational-mode > .workspace,
.operational-mode > section:not(.topbar):not(.modules):not(.module-ribbon),
.dashboard-home {
  margin-top: 10px;
}

.app .workspace,
.operational-mode .workspace {
  display: grid;
  grid-template-columns: minmax(235px, 285px) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 0;
}

.app .grid {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.app .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.app .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.app .grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.app .grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.app .panel,
.operational-mode .panel,
.dashboard-mode .panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.app .panel-head {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fafbfa;
  color: var(--text);
  padding: 8px 11px;
}

.app .panel-head h3,
.app .section-band h3,
.app .subhead {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.65;
}

.app .panel-head p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.app .panel-body {
  min-width: 0;
  background: #fff;
  padding: 10px;
}

.app .list {
  display: grid;
  gap: 5px;
}

.app .record-card {
  display: grid;
  width: 100%;
  min-height: 52px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  padding: 8px 9px;
  text-align: right;
}

.app .record-card:hover {
  border-color: #aebcb6;
  background: #f8faf9;
}

.app .record-card.active {
  border-color: rgba(8, 119, 91, 0.55);
  background: #edf7f3;
  color: #075c48;
  box-shadow: inset -3px 0 0 var(--green);
}

.record-card strong {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.record-card span {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
}

.app .metric-card {
  min-width: 0;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px 11px;
  box-shadow: none;
}

.metric-card label {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
}

.metric-card b {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.35;
}

.metric-card .small {
  margin-top: 2px;
  font-size: 9px;
}

.dashboard-home {
  display: grid;
  gap: 10px;
  width: 100%;
  min-height: 0;
  background: transparent;
  padding: 0;
}

.dashboard-banner {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #1d2d28;
}

.dashboard-banner::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 31, 27, 0.12) 0%, rgba(17, 31, 27, 0.32) 42%, rgba(17, 31, 27, 0.88) 100%);
  content: "";
}

.dashboard-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.dashboard-banner-content {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(440px, 58%);
  min-height: 170px;
  align-content: center;
  gap: 5px;
  margin-inline-start: auto;
  color: #fff;
  padding: 20px 24px;
}

.dashboard-banner-content span {
  color: #caeee1;
  font-size: 10px;
}

.dashboard-banner-content strong {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.55;
}

.dashboard-banner-content p {
  margin: 0;
  color: #eef7f4;
  font-size: 11px;
  line-height: 1.8;
}

.dashboard-tiles {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
}

.app .dashboard-tile {
  display: grid;
  min-width: 0;
  min-height: 132px;
  align-content: start;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 10px;
  text-align: right;
  box-shadow: var(--shadow);
}

.app .dashboard-tile::after {
  display: none;
}

.app .dashboard-tile:hover {
  border-color: #aab8b2;
  background: #fbfcfb;
  transform: none;
}

.dashboard-tile-icon {
  display: grid;
  width: 32px;
  height: 32px;
  grid-row: 1 / span 2;
  place-items: center;
  border-radius: 5px;
  background: #edf3f0;
  color: var(--green);
}

.tile-materials .dashboard-tile-icon { background: #f7eee9; color: #9b4c2f; }
.tile-mixes .dashboard-tile-icon { background: #eaf5ef; color: #16774d; }
.tile-lab .dashboard-tile-icon { background: #fbecef; color: #b43b58; }
.tile-qaqc .dashboard-tile-icon { background: #fff2e5; color: #ad6518; }
.tile-dispatch .dashboard-tile-icon { background: #e8f4f4; color: #19727a; }
.tile-american .dashboard-tile-icon { background: #eaf0fb; color: #3b61a0; }
.tile-uk .dashboard-tile-icon { background: #edf0f6; color: #53647f; }
.tile-global .dashboard-tile-icon { background: #f2ecf7; color: #70528a; }
.tile-import .dashboard-tile-icon { background: #e7f4ef; color: #28785c; }
.tile-account .dashboard-tile-icon { background: #f1eff7; color: #675b8b; }

.app .dashboard-tile > strong {
  align-self: center;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.55;
}

.app .dashboard-tile > span:not(.dashboard-tile-icon) {
  grid-column: 2;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.dashboard-tile dl {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 6px 0 0;
}

.dashboard-tile dl div {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.dashboard-tile dt {
  overflow: hidden;
  color: var(--muted);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-tile dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-details {
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.dashboard-details-head {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  border: 0;
  background: transparent;
  padding: 0 2px;
  font-size: 12px;
}

.dashboard-details-head span {
  color: var(--muted);
  font-size: 9.5px;
}

.app .tabs,
.app .segmented-control,
.app .period-switch {
  display: flex;
  min-width: 0;
  gap: 3px;
  overflow-x: auto;
  border: 0;
  border-radius: 5px;
  background: #f2f5f3;
  padding: 3px;
}

.app .tab,
.app .segmented-control button,
.app .period-switch button {
  min-height: 31px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  padding: 0 9px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.app .tab.active,
.app .segmented-control button.active,
.app .period-switch button.active {
  border-color: var(--line);
  background: #fff;
  color: var(--green-dark);
  box-shadow: 0 1px 2px rgba(16, 35, 28, 0.06);
}

.app .table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.app table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  color: var(--text);
  font-size: 10px;
}

.app th,
.app td {
  border: 0;
  border-bottom: 1px solid #e5e9e7;
  padding: 7px 8px;
  text-align: right;
  vertical-align: middle;
}

.app th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #f2f5f3;
  color: #485550;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.app tbody tr:nth-child(even) td {
  background: #fcfdfc;
}

.app tbody tr:hover td {
  background: #f3f8f5;
}

.app td .actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.app td .btn,
.app td .icon-btn {
  min-height: 29px;
  height: 29px;
  padding-inline: 7px;
  font-size: 9px;
}

.app td .icon-btn {
  width: 29px;
  min-width: 29px;
}

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

.app .form-control {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: #4f5b57;
  font-size: 9.5px;
  font-weight: 700;
}

.app .form-control input,
.app .form-control select,
.app .form-control textarea,
.app .inline-control input,
.app .inline-number {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  padding: 7px 9px;
  outline: 0;
}

.app .form-control textarea {
  min-height: 82px;
  resize: vertical;
  line-height: 1.9;
}

.app .form-control input:focus,
.app .form-control select:focus,
.app .form-control textarea:focus,
.app .inline-number:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8, 119, 91, 0.09);
}

.app .check-item {
  display: flex;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fafbfa;
  color: var(--text);
  padding: 7px 9px;
  font-size: 10px;
  line-height: 1.7;
}

.app .check-item input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  accent-color: var(--green);
}

.app .field,
.app .option-block,
.app .section-band,
.app .document-bin,
.app .wizard-stage {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fafbfa;
  padding: 9px;
}

.app .field label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.app .field > div {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.75;
}

.app .notice,
.app .empty {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7f9f8;
  color: #52605b;
  padding: 10px 11px;
  font-size: 10px;
  line-height: 1.9;
}

.app .notice.success,
.app .status.ok {
  border-color: #b8ddcc;
  background: #eef8f3;
  color: #136447;
}

.app .notice.warn,
.app .status.warn {
  border-color: #ead39e;
  background: #fff8e9;
  color: #8b5a11;
}

.app .notice.danger,
.app .status.bad {
  border-color: #edc2bd;
  background: #fff2f0;
  color: #a33931;
}

.app .status {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f3f5f4;
  color: #53605b;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.app .modal-backdrop,
#modal-root .modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(23, 32, 29, 0.52);
  padding: 18px;
  backdrop-filter: blur(4px);
}

.app .modal,
.modal {
  width: min(880px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 33, 27, 0.24);
}

.modal-head,
.modal-foot {
  position: sticky;
  z-index: 3;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-color: var(--line);
  background: #fafbfa;
  padding: 8px 12px;
}

.modal-head { top: 0; border-bottom: 1px solid var(--line); }
.modal-foot { bottom: 0; justify-content: flex-start; border-top: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 13px; }

.app .chart {
  width: 100%;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.app .chart-tall {
  height: 340px;
}

.wizard-steps li,
.app .wizard-stage,
.app .wizard-stage.active,
.app .wizard-stage.done {
  border-radius: 5px;
}

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

@media (max-width: 1260px) {
  .app .topbar {
    grid-template-columns: minmax(215px, auto) minmax(240px, 1fr) auto;
  }

  .private-area,
  .connection-state {
    display: none;
  }

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

  .app .grid.five,
  .app .grid.six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app .topbar {
    grid-template-columns: minmax(190px, 1fr) auto;
  }

  .searchbox {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .global-search-shell {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .toolbar {
    flex-wrap: nowrap;
  }

  .app .module-ribbon {
    display: grid;
    gap: 4px;
  }

  .module-ribbon-title {
    min-width: 0;
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }

  .app .workspace,
  .operational-mode .workspace,
  .statistics-workspace,
  .global-pivot-workspace,
  .batch-books-workspace,
  .auditing-workspace,
  .command-board-workspace {
    grid-template-columns: 1fr;
  }

  .app .grid.four,
  .app .grid.five,
  .app .grid.six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 620px) {
  .app {
    padding: 7px 7px 20px;
  }

  .app .topbar {
    min-height: 56px;
    gap: 7px;
    padding: 7px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .brand h1 {
    font-size: 12.5px;
  }

  .brand p {
    display: none;
  }

  .quick-create span {
    display: none;
  }

  .quick-create {
    width: 36px;
    min-width: 36px;
    padding: 0 !important;
  }

  .app .modules {
    margin-top: 7px;
  }

  .app .module {
    min-width: 104px;
    min-height: 38px;
  }

  .dashboard-banner,
  .dashboard-banner-content {
    min-height: 154px;
  }

  .dashboard-banner::after {
    background: rgba(17, 31, 27, 0.72);
  }

  .dashboard-banner-content {
    width: 100%;
    padding: 16px;
  }

  .dashboard-banner-content strong {
    font-size: 16px;
  }

  .dashboard-tiles {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .app .dashboard-tile {
    min-height: 126px;
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 8px;
  }

  .dashboard-tile-icon {
    width: 28px;
    height: 28px;
  }

  .app .dashboard-tile > span:not(.dashboard-tile-icon) {
    display: none;
  }

  .dashboard-tile dl {
    margin-top: 10px;
  }

  .app .grid.two,
  .app .grid.three,
  .app .grid.five,
  .app .grid.six,
  .app .form-grid,
  .app .check-grid,
  .project-relation-grid,
  .kanban {
    grid-template-columns: 1fr;
  }

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

  .app .metric-card {
    min-height: 76px;
    padding: 9px;
  }

  .metric-card b {
    font-size: 16px;
  }

  .app .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .app .panel-head > .actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .app .panel-body {
    padding: 8px;
  }

  .app table {
    min-width: 720px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 7px 7px 0 0;
  }

  .dashboard-details-head span {
    display: none;
  }

  .subscription-overview {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    padding: 14px 10px;
  }

  .subscription-overview h2 {
    font-size: 18px;
  }

  .subscription-meter {
    width: 100%;
    min-width: 0;
  }

  .subscription-metrics {
    grid-template-columns: 1fr 1fr !important;
  }

  .plan-card {
    min-height: 290px;
    padding: 13px;
  }
}

/* Secure account entry */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: #edf1ef;
}

.auth-panel {
  width: min(430px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(24, 38, 32, .12);
  overflow: hidden;
}

.auth-panel.auth-register-panel {
  width: min(760px, 100%);
}

.auth-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.auth-head > div {
  min-width: 0;
}

.auth-brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 7px;
  object-fit: cover;
}

.auth-head span,
.auth-user-summary span,
.auth-user-summary small,
.auth-loading span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.auth-head h1 {
  margin: 2px 0 3px;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0;
}

.auth-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.auth-user-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 22px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.auth-user-summary svg {
  flex: 0 0 auto;
  color: var(--green);
}

.auth-user-summary strong {
  display: block;
  margin-block: 1px;
  font-size: 13px;
}

.auth-form {
  display: grid;
  gap: 12px;
  padding: 20px 22px 22px;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 18px 22px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  padding: 3px;
}

.auth-mode-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-mode-switch button.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 4px rgba(24, 38, 32, .12);
}

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

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.9;
  cursor: pointer;
}

.auth-consent input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--green);
}

.auth-honeypot {
  position: fixed;
  inset-inline-start: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-form .form-control input {
  min-height: 44px;
  font-size: 14px;
}

.auth-password-rule,
.auth-help,
.form-hint {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.auth-error {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: transparent;
  font-size: 12px;
  line-height: 1.7;
  visibility: hidden;
}

.auth-success {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #b9dccd;
  border-radius: 6px;
  background: #f0faf5;
  padding: 8px 10px;
  color: #176447;
  font-size: 12px;
  line-height: 1.7;
}

.auth-success.show {
  display: flex;
}

.auth-error.show {
  border-color: #efc4bf;
  background: #fff5f4;
  color: var(--red);
  visibility: visible;
}

.auth-submit {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.auth-submit .lucide-loader-circle {
  animation: auth-spin 900ms linear infinite;
}

.auth-foot {
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: #f8faf9;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.auth-loading {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 42px 24px;
  text-align: center;
}

.auth-loading .auth-brand-mark {
  margin-bottom: 8px;
}

.auth-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: auth-spin 800ms linear infinite;
}

.account-security-panel .actions {
  flex-wrap: wrap;
}

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

@media (max-width: 560px) {
  .auth-shell {
    align-items: start;
    padding: 12px;
  }

  .auth-panel {
    margin-top: 7vh;
    box-shadow: 0 10px 30px rgba(24, 38, 32, .1);
  }

  .auth-head,
  .auth-form {
    padding-inline: 16px;
  }

  .auth-mode-switch {
    margin-inline: 16px;
  }

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

  .auth-user-summary {
    margin-inline: 16px;
  }
}

/* Focused operational interface */
:root {
  --bg: #f3f5f2;
  --panel: #ffffff;
  --text: #202824;
  --muted: #68746d;
  --line: #dfe5df;
  --line-strong: #c7d1ca;
  --soft: #eef2ef;
  --green: #256b52;
  --red: #b94339;
  --orange: #a66a24;
  --blue: #35697d;
  --purple: #675a84;
  --radius: 7px;
  --shadow: 0 1px 2px rgba(24, 35, 29, .05), 0 8px 22px rgba(24, 35, 29, .045);
}

body {
  background: #f3f5f2;
  letter-spacing: 0;
}

.app {
  width: min(100%, 1680px);
  padding: 8px 10px 24px;
}

.app .topbar {
  min-height: 60px;
  grid-template-columns: minmax(245px, auto) minmax(300px, 1fr) auto auto;
  gap: 8px;
  border-color: #d9e0da;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 4px 18px rgba(25, 39, 31, .055);
  padding: 7px 9px;
}

.private-area {
  display: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-color: #d9e1db;
}

.brand h1 {
  font-size: 14px;
  font-weight: 800;
}

.searchbox {
  min-height: 40px;
  border-color: #d9e1db;
  background: #f6f8f6;
  padding-inline: 11px 5px;
}

.searchbox input {
  min-height: 36px;
  font-size: 11.5px;
}

.search-clear {
  display: grid;
  width: 0;
  height: 28px;
  flex: 0 0 0;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 0;
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transition: width 140ms ease, opacity 140ms ease;
}

.search-clear.visible {
  width: 28px;
  flex-basis: 28px;
  opacity: 1;
  pointer-events: auto;
}

.search-clear:hover,
.search-clear:focus-visible {
  background: #e8eeea;
  color: var(--text);
}

.global-search-results {
  border-radius: 6px;
  box-shadow: 0 18px 44px rgba(26, 38, 31, .16);
}

.dashboard-home {
  gap: 12px;
  padding-top: 10px;
}

.dashboard-banner {
  min-height: 142px;
  border-color: #253b32;
  background: #1d3028;
  box-shadow: 0 8px 26px rgba(28, 43, 36, .09);
}

.dashboard-banner::after {
  background: rgba(20, 36, 30, .75);
}

.dashboard-banner img {
  object-position: center 52%;
}

.dashboard-banner-content {
  width: min(500px, 58%);
  min-height: 142px;
  align-content: center;
  gap: 4px;
  padding: 16px 22px;
}

.dashboard-banner-content span {
  color: #d0e2d9;
  font-size: 10px;
}

.dashboard-banner-content strong {
  font-size: 18px;
  font-weight: 800;
}

.dashboard-banner-content p {
  font-size: 10.5px;
}

.dashboard-status-action {
  width: fit-content;
  min-height: 34px;
  margin-top: 6px;
  border-color: rgba(255, 255, 255, .38) !important;
  background: rgba(255, 255, 255, .94) !important;
  color: #1f4f3e !important;
}

.dashboard-start,
.dashboard-command-strip {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  min-height: 34px;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.section-heading > div {
  display: grid;
  gap: 1px;
}

.section-heading strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.section-heading span,
.section-heading .section-count {
  color: var(--muted);
  font-size: 9.5px;
}

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

.workflow-step {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 84px;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  grid-template-rows: 30px auto;
  align-items: center;
  gap: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
  padding: 9px;
  color: var(--text);
  text-align: right;
}

.workflow-step:hover,
.workflow-step:focus-visible {
  border-color: #91aa9e;
  background: #f5f8f6;
  outline: 0;
}

.workflow-step-number {
  position: absolute;
  inset-block-start: 7px;
  inset-inline-start: 7px;
  color: #8a968f;
  font-size: 9px;
  font-weight: 700;
}

.workflow-step-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 5px;
  background: #e9f0ec;
  color: var(--green);
}

.workflow-step > strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 800;
}

.workflow-step-status {
  display: flex;
  min-width: 0;
  grid-column: 1 / -1;
  align-items: baseline;
  gap: 7px;
  border-top: 1px solid #e7ece8;
  padding-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.workflow-step-status b {
  color: var(--text);
  font-size: 14px;
}

.dashboard-command-strip {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.dashboard-quick-actions,
.dashboard-secondary {
  min-width: 0;
}

.dashboard-secondary {
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 18px;
}

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

.quick-action {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8faf8;
  padding: 7px 9px;
  color: var(--text);
  text-align: right;
}

.quick-action svg {
  color: var(--green);
}

.quick-action:hover,
.quick-action:focus-visible {
  border-color: #9fb2a8;
  background: #eff5f1;
  outline: 0;
}

.secondary-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.secondary-module {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: #f6f8f6;
  padding: 7px 9px;
  color: var(--text);
  text-align: right;
}

.secondary-module > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.secondary-module strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secondary-module b {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.secondary-module:hover,
.secondary-module:focus-visible {
  border-color: var(--line-strong);
  background: #fff;
  outline: 0;
}

.dashboard-details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.dashboard-details > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.dashboard-details > summary::-webkit-details-marker {
  display: none;
}

.dashboard-details > summary > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-details > summary strong {
  font-size: 11px;
}

.dashboard-details > summary small {
  color: var(--muted);
  font-size: 9px;
}

.dashboard-details[open] > summary {
  border-bottom: 1px solid var(--line);
}

.dashboard-details-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.calendar-form-control > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-form-control > span small {
  border-radius: 4px;
  background: #edf3ef;
  padding: 1px 5px;
  color: var(--green);
  font-size: 8px;
  font-weight: 700;
}

.date-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 5px;
}

[data-date-input] {
  direction: rtl;
  text-align: right;
}

[data-date-input].date-invalid {
  border-color: var(--red) !important;
  background: #fff6f5 !important;
  box-shadow: 0 0 0 3px rgba(185, 67, 57, .09) !important;
}

.date-picker-toggle {
  width: 34px;
  min-width: 34px;
  height: 100%;
  color: var(--green);
}

.calendar-picker {
  position: fixed;
  z-index: 520;
  width: min(318px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #cbd8d1;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(18, 39, 31, .2);
  color: #17211d;
  direction: rtl;
  font-family: "IRANSans", Tahoma, Arial, sans-serif;
}

.calendar-picker-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #e1e8e4;
  background: #f7faf8;
  padding: 8px;
}

.calendar-picker-head strong {
  overflow: hidden;
  color: #173d31;
  font-size: 11px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-picker-head .icon-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
}

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

.calendar-picker-weekdays {
  padding: 9px 10px 3px;
  color: #6a7771;
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.calendar-picker-days {
  padding: 4px 10px 10px;
}

.calendar-picker-days > span,
.calendar-picker-days > button {
  aspect-ratio: 1;
  min-width: 0;
}

.calendar-picker-days > button {
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #25332d;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
}

.calendar-picker-days > button:hover,
.calendar-picker-days > button:focus-visible {
  border-color: #a8c9bb;
  background: #edf6f1;
  outline: none;
}

.calendar-picker-days > button.today {
  border-color: #5aa899;
  color: #0d6868;
  font-weight: 800;
}

.calendar-picker-days > button.selected {
  border-color: #166534;
  background: #166534;
  color: #fff;
  font-weight: 800;
}

.calendar-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #e1e8e4;
  background: #fafcfb;
  padding: 8px 10px;
}

.calendar-picker-foot .btn {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 9px;
}

.calendar-picker-foot .btn.subtle {
  border-color: transparent;
  background: transparent;
  color: #68756f;
}

.view-tool-panel {
  display: grid;
  gap: 8px;
  border: 1px solid #cfdad3;
  border-radius: 6px;
  background: #f8faf8;
  padding: 9px;
}

.view-tool-panel > strong {
  font-size: 10px;
}

.view-field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.view-field-list span {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 3px 6px;
  color: var(--muted);
  font-size: 8.5px;
}

.btn.active {
  border-color: #8fa99d;
  background: #eaf2ed;
  color: #1f5b46;
}

.toast-root {
  position: fixed;
  z-index: 300;
  inset-inline-start: 18px;
  inset-block-end: 18px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.toast {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  border: 1px solid #b9cec2;
  border-radius: 6px;
  background: #f4faf6;
  padding: 10px 12px;
  color: #245b46;
  box-shadow: 0 14px 36px rgba(25, 38, 31, .16);
  font-size: 10.5px;
}

.toast.danger {
  border-color: #e2b6b1;
  background: #fff6f5;
  color: var(--red);
}

@media (max-width: 1180px) {
  .app .topbar {
    grid-template-columns: minmax(220px, auto) minmax(260px, 1fr) auto;
  }

  .connection-state {
    display: none;
  }

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

@media (max-width: 900px) {
  .app .topbar {
    grid-template-columns: minmax(190px, 1fr) auto;
  }

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

  .dashboard-command-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dashboard-secondary {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
    padding-block-start: 12px;
    padding-inline-start: 0;
  }
}

@media (max-width: 620px) {
  .app {
    padding: 6px 6px 18px;
  }

  .app .topbar {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 6px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .toolbar {
    display: grid;
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    overflow: visible;
    border-top: 1px solid var(--line);
    padding-top: 6px;
  }

  .toolbar > .btn,
  .toolbar > .icon-btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .notification-launch {
    overflow: visible;
  }

  .global-search-shell {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .dashboard-home {
    gap: 8px;
    padding-top: 7px;
  }

  .dashboard-banner,
  .dashboard-banner-content {
    min-height: 132px;
  }

  .dashboard-banner::after {
    background: rgba(20, 36, 30, .82);
  }

  .dashboard-banner-content {
    width: 100%;
    padding: 13px;
  }

  .dashboard-banner-content strong {
    font-size: 15px;
  }

  .dashboard-start,
  .dashboard-command-strip {
    padding: 9px;
  }

  .workflow-grid,
  .quick-action-grid,
  .secondary-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-step {
    min-height: 92px;
    grid-template-columns: 28px minmax(0, 1fr) 15px;
    padding: 8px;
  }

  .workflow-step-icon {
    width: 28px;
    height: 28px;
  }

  .workflow-step > strong {
    font-size: 9.5px;
  }

  .quick-action,
  .secondary-module {
    min-height: 40px;
  }

  .secondary-module strong {
    font-size: 9px;
  }

  .dashboard-details > summary {
    min-height: 44px;
  }

  .toast-root {
    inset-inline: 6px;
    inset-block-end: 8px;
    width: auto;
  }
}

@media (max-width: 420px) {
  .workflow-grid,
  .quick-action-grid,
  .secondary-module-grid {
    grid-template-columns: 1fr;
  }

  .workflow-step {
    min-height: 76px;
  }
}

@media (min-width: 981px) {
  .app .mobile-menu-button {
    display: none !important;
  }
}

/* Iran National Mix Design Method */
.method-source-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px 22px;
  border: 1px solid #cbd8d4;
  border-right: 4px solid #117a65;
  border-radius: 6px;
  background: #f7faf9;
}

.method-source-band h2 {
  margin: 4px 0 7px;
  color: #17221f;
  font-size: 20px;
  line-height: 1.45;
}

.method-source-band p {
  max-width: 850px;
  margin: 0;
  color: #53625e;
  font-size: 12px;
  line-height: 1.9;
}

.method-source-band .eyebrow {
  color: #0d6c5a;
  font-size: 10px;
  font-weight: 800;
}

.national-method-trace {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-block: 1px solid #dce4e1;
  background: #fbfcfc;
}

.national-method-trace > div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  min-height: 94px;
  padding: 13px;
  border-inline-end: 1px solid #e3e9e7;
}

.national-method-trace > div:last-child {
  border-inline-end: 0;
}

.national-method-trace b {
  color: #117a65;
  font-size: 10px;
}

.national-method-trace span {
  color: #26332f;
  font-size: 11px;
  font-weight: 800;
}

.national-method-trace small {
  color: #697773;
  font-size: 9px;
  line-height: 1.7;
}

.national-method-detail-grid {
  align-items: start;
}

.engineering-warning-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 13px 32px 13px 13px;
  border: 1px solid #e7c486;
  border-radius: 5px;
  background: #fffaf0;
  color: #735017;
  font-size: 11px;
  line-height: 1.8;
}

.engineering-decision-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 13px 32px 13px 13px;
  border: 1px solid #b8d8cd;
  border-radius: 5px;
  background: #f3faf7;
  color: #225a49;
  font-size: 11px;
  line-height: 1.8;
}

.method-details {
  border-block: 1px solid #dce4e1;
  padding-block: 10px;
}

.method-details summary {
  cursor: pointer;
  color: #31413c;
  font-size: 11px;
  font-weight: 800;
}

.method-details[open] summary {
  margin-bottom: 10px;
}

.national-method-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 220px;
  align-content: center;
  color: #687671;
  text-align: center;
}

.national-method-empty > span {
  color: #117a65;
}

.national-method-empty b {
  color: #26332f;
  font-size: 13px;
}

.national-method-empty p {
  max-width: 480px;
  margin: 0;
  font-size: 11px;
  line-height: 1.8;
}

.national-method-modal {
  width: min(1120px, calc(100vw - 34px));
  max-width: 1120px;
}

.national-method-form > .panel-body.form-grid {
  display: block;
  padding: 0;
}

.national-form-preamble {
  display: grid;
  gap: 0;
  border-bottom: 1px solid #dce4e1;
  background: #f8faf9;
}

.national-form-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid #dce4e1;
}

.national-form-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 8px 10px;
  border: 0;
  border-inline-end: 1px solid #e2e8e6;
  background: transparent;
  color: #67746f;
  font-family: inherit;
  cursor: pointer;
}

.national-form-tabs button:last-child {
  border-inline-end: 0;
}

.national-form-tabs button b {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #a9b8b3;
  border-radius: 50%;
  font-size: 9px;
}

.national-form-tabs button span {
  font-size: 10px;
  font-weight: 800;
}

.national-form-tabs button.active {
  background: #eef6f3;
  color: #0d6c5a;
}

.national-form-tabs button.active b {
  border-color: #117a65;
  background: #117a65;
  color: #fff;
}

.national-live-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 0;
  min-height: 58px;
  padding: 8px 14px;
}

.national-live-preview > div {
  display: grid;
  gap: 2px;
  padding-inline: 10px;
  border-inline-end: 1px solid #dde5e2;
}

.national-live-preview small {
  color: #75817d;
  font-size: 8px;
}

.national-live-preview b {
  color: #26332f;
  font-size: 11px;
}

.national-preview-state {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
}

.national-preview-state.ok {
  background: #e8f5ef;
  color: #0d6c5a;
}

.national-preview-state.warning,
.national-preview-error {
  color: #94621b;
}

.national-preview-state.warning {
  background: #fff3dc;
}

.national-form-step {
  display: grid;
}

.national-form-step[hidden] {
  display: none;
}

.national-form-step > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px 10px;
  border-bottom: 1px solid #e3e9e7;
}

.national-form-step > header > span {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 5px;
  background: #e8f2ef;
  color: #117a65;
}

.national-form-step > header > div {
  display: grid;
  gap: 3px;
}

.national-form-step > header b {
  color: #26332f;
  font-size: 12px;
}

.national-form-step > header small {
  color: #6f7c78;
  font-size: 9px;
  line-height: 1.7;
}

.national-step-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  padding: 16px 18px 22px;
}

.national-step-fields > .span-two,
.national-step-fields > .form-guidance {
  grid-column: 1 / -1;
}

.national-trial-modal {
  width: min(920px, calc(100vw - 34px));
  max-width: 920px;
}

.trial-scale-preview {
  overflow: auto;
  max-height: 260px;
  padding: 10px 12px;
  border: 1px solid #dce4e1;
  border-radius: 6px;
  background: #f8fbfa;
}

.trial-scale-preview table {
  margin: 0;
}

.trial-scale-preview th,
.trial-scale-preview td {
  padding-block: 7px;
  font-size: 11px;
}

@media (max-width: 860px) {
  .method-source-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .national-method-trace {
    grid-template-columns: 1fr 1fr;
  }

  .national-method-trace > div {
    min-height: 78px;
    border-bottom: 1px solid #e3e9e7;
  }

  .national-form-tabs button {
    gap: 4px;
    padding-inline: 4px;
  }

  .national-form-tabs button span {
    font-size: 8px;
  }

  .national-live-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .national-preview-state {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .method-source-band {
    padding: 15px;
  }

  .method-source-band h2 {
    font-size: 16px;
  }

  .national-method-trace,
  .national-step-fields,
  .national-live-preview {
    grid-template-columns: 1fr;
  }

  .national-form-tabs {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(92px, 1fr));
  }

  .national-form-tabs button span {
    font-size: 8px;
  }

  .national-live-preview > div {
    grid-template-columns: 88px 1fr;
    border-inline-end: 0;
    border-bottom: 1px solid #e2e8e6;
    padding-block: 5px;
  }

  .national-form-step > header,
  .national-step-fields {
    padding-inline: 12px;
  }
}

/* Guided engineering forms: explicit choices, readable help, and safe disabled states. */
.equipment-form-modal,
.mix-form-modal {
  width: min(920px, calc(100vw - 28px));
}

.equipment-form > .panel-body.form-grid,
.mix-form > .panel-body.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field-help {
  display: block;
  color: #607069;
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.75;
}

.form-guidance {
  border-inline-start: 3px solid #2f8a68;
  background: #f1f7f4;
  padding: 9px 11px;
  color: #38574b;
  font-size: 9px;
  line-height: 1.85;
}

.boolean-form-control {
  display: flex;
  min-height: 72px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--product-line);
  padding: 10px 11px;
}

.boolean-form-control > span:first-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.boolean-switch {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  grid-template-columns: 38px auto;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.boolean-switch input {
  position: absolute;
  z-index: 2;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 38px !important;
  height: 22px !important;
  opacity: 0;
  cursor: pointer;
}

.boolean-switch > span {
  position: relative;
  width: 38px;
  height: 22px;
  border: 1px solid #a8b8b1;
  border-radius: 12px;
  background: #dfe6e2;
  transition: background-color .16s ease, border-color .16s ease;
}

.boolean-switch > span::after {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(18, 42, 32, .22);
  content: "";
  transition: transform .16s ease;
}

.boolean-switch input:checked + span {
  border-color: #267a5b;
  background: #267a5b;
}

.boolean-switch input:checked + span::after {
  transform: translateX(-16px);
}

.boolean-switch input:focus-visible + span {
  outline: 3px solid rgba(36, 130, 93, .18);
  outline-offset: 2px;
}

.boolean-switch b {
  min-width: 42px;
  color: #52645c;
  font-size: 8.5px;
}

.form-control:has(input:disabled),
.form-control:has(select:disabled) {
  opacity: .62;
}

.form-control input:disabled,
.form-control select:disabled,
.form-control textarea:disabled {
  cursor: not-allowed;
  background: #eef2f0;
}

@media (max-width: 760px) {
  .equipment-form-modal,
  .mix-form-modal {
    width: 100%;
  }

  .equipment-form > .panel-body.form-grid,
  .mix-form > .panel-body.form-grid {
    grid-template-columns: 1fr;
  }

  .boolean-form-control {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Form clarity layer: consistent scan order, larger controls, and restrained grouping. */
.modal #modal-form > .panel-body.form-grid {
  gap: 13px 14px;
  padding: 15px 16px 20px;
}

.modal .form-control {
  gap: 6px;
}

.modal .form-control > span {
  color: #34443d;
  font-size: 10.5px;
  font-weight: 750;
}

.modal .form-control input,
.modal .form-control select {
  min-height: 42px;
  padding-inline: 11px;
  font-size: 11px;
}

.modal .form-control textarea {
  min-height: 88px;
  padding: 10px 11px;
  font-size: 11px;
  line-height: 1.8;
  resize: vertical;
}

.modal .form-control input:focus,
.modal .form-control select:focus,
.modal .form-control textarea:focus {
  border-color: #4a9a7d;
  outline: none;
  box-shadow: 0 0 0 3px rgba(36, 130, 93, .1);
}

.modal .form-section-heading {
  margin-top: 14px;
  padding-block: 10px;
}

.modal .form-section-heading:first-child {
  margin-top: 0;
}

.modal .form-section-heading strong {
  font-size: 11px;
}

.modal .form-section-heading small {
  font-size: 9px;
  line-height: 1.75;
}

.material-form-modal {
  width: min(980px, 100%) !important;
}

.material-form-intro {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #dce7e1;
  background: #f5faf7;
  padding: 12px 16px;
}

.material-form-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #c8ddd2;
  border-radius: 7px;
  background: #fff;
  color: #17643e;
}

.material-form-intro > div {
  min-width: 0;
}

.material-form-intro strong {
  display: block;
  color: #183a2f;
  font-size: 11.5px;
}

.material-form-intro p {
  margin: 3px 0 0;
  color: #5e6f67;
  font-size: 9px;
  line-height: 1.8;
}

.material-profile-badge {
  border: 1px solid #bfd8cb;
  border-radius: 5px;
  background: #fff;
  color: #17643e;
  padding: 5px 8px;
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}

.material-form > .panel-body.form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.material-form .form-control:has(textarea) {
  grid-column: span 2;
}

.material-form .form-section-heading + .form-control {
  scroll-margin-top: 68px;
}

@media (max-width: 760px) {
  .modal #modal-form > .panel-body.form-grid,
  .material-form > .panel-body.form-grid {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 13px 12px 18px;
  }

  .material-form .form-control:has(textarea) {
    grid-column: 1;
  }

  .material-form-intro {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    padding: 11px 12px;
  }

  .material-form-icon {
    width: 36px;
    height: 36px;
  }

  .material-profile-badge {
    grid-column: 2;
    justify-self: start;
  }

  .calendar-picker {
    width: min(318px, calc(100vw - 16px));
  }
}

/* Visual identity v2: stronger hierarchy, larger type, and a quieter operations shell. */
:root {
  --product-navy: #193c50;
  --product-navy-strong: #102f40;
  --product-teal: #0d7d72;
  --product-teal-soft: #e4f3ef;
  --product-red: #b93844;
  --product-red-soft: #fff0f1;
  --product-amber: #a9650a;
  --product-amber-soft: #fff5df;
  --product-green: #24734f;
  --product-green-soft: #eaf6ef;
  --product-ink: #14252e;
  --product-muted: #60717a;
  --product-line: #d6e1df;
  --product-line-strong: #bacbc8;
  --product-canvas: #eef3f2;
  --product-surface: #ffffff;
  --sidebar-width: 252px;
  --topbar-height: 70px;
}

html,
body {
  background: var(--product-canvas);
  color: var(--product-ink);
  font-size: 14px;
}

.product-sidebar {
  border-inline-start: 1px solid var(--product-line);
  background: #fbfdfc;
  color: var(--product-ink);
}

.sidebar-brand {
  min-height: var(--topbar-height);
  border-bottom-color: var(--product-line);
  padding: 12px 14px;
}

.sidebar-brand img {
  border: 1px solid var(--product-line);
  background: #fff;
}

.sidebar-brand strong {
  color: var(--product-ink);
  font-size: 13px;
}

.sidebar-brand small,
.sidebar-footer small {
  color: var(--product-muted);
  font-size: 10px;
}

.product-sidebar .icon-btn {
  border-color: var(--product-line);
  background: #fff;
  color: var(--product-muted);
}

.sidebar-navigation {
  gap: 4px;
  padding: 14px 10px 20px;
}

.sidebar-group {
  gap: 3px;
}

.sidebar-item,
.sidebar-child {
  min-height: 44px;
  gap: 11px;
  border-radius: 6px;
  color: #52656e;
  padding: 9px 11px;
}

.sidebar-item span,
.sidebar-child span {
  font-size: 12px;
  font-weight: 650;
}

.sidebar-item:hover,
.sidebar-child:hover {
  background: #eff5f3;
  color: var(--product-ink);
}

.sidebar-item.active {
  background: var(--product-teal-soft);
  color: #075f57;
  box-shadow: inset -3px 0 0 var(--product-teal);
}

.sidebar-children {
  margin: 3px 19px 8px 0;
  border-right-color: #c8d7d4;
  padding-right: 9px;
}

.sidebar-child {
  min-height: 38px;
}

.sidebar-child.active {
  background: #edf7f4;
  color: #075f57;
}

.sidebar-footer {
  min-height: 64px;
  border-top-color: var(--product-line);
  background: #f2f7f5;
  padding: 11px 16px;
}

.sidebar-footer strong {
  color: var(--product-ink);
  font-size: 11px;
}

.app .product-topbar {
  grid-template-columns: minmax(190px, auto) minmax(320px, 1fr) auto auto;
  gap: 18px;
  min-height: var(--topbar-height);
  border-bottom-color: var(--product-line);
  background: #fff;
  padding: 10px 28px;
}

.page-identity {
  gap: 2px;
}

.page-identity > span {
  font-size: 10px;
}

.page-identity h1 {
  font-size: 18px;
  line-height: 1.35;
}

.page-identity p {
  font-size: 10px;
}

.global-search-shell {
  max-width: 720px;
}

.searchbox {
  min-height: 44px;
  border-color: var(--product-line);
  border-radius: 8px;
  background: #f5f8f7;
  padding-inline: 13px;
}

.searchbox input {
  font-size: 12px;
}

.searchbox kbd {
  font-size: 9px;
}

.context-filters select {
  min-width: 150px;
  height: 42px;
  border-color: var(--product-line);
  border-radius: 7px;
  font-size: 11px;
}

.profile-copy strong {
  font-size: 11px;
}

.profile-copy small {
  font-size: 9px;
}

.page-context-bar {
  min-height: 70px;
  border-bottom-color: var(--product-line);
  background: #fff;
  padding: 9px 28px 8px;
}

.breadcrumbs {
  font-size: 10px;
}

.context-tabs .chip {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 10px;
}

.page-content {
  padding: 24px 28px 52px;
}

.page-content > section,
.dashboard-home {
  max-width: 1600px;
}

.app .btn {
  min-height: 40px;
  border-color: var(--product-line-strong);
  border-radius: 7px;
  padding: 8px 13px;
  font-size: 11px;
}

.app .btn.small {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 10px;
}

.app .icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 7px;
}

.app .panel {
  border-color: var(--product-line);
  border-radius: 8px;
  box-shadow: none;
}

.app .panel-head {
  min-height: 64px;
  padding: 13px 17px;
}

.app .panel-head h3,
.app .panel-head strong {
  font-size: 14px;
}

.app .panel-head p {
  margin-top: 3px;
  font-size: 10px;
}

.app .panel-body {
  padding: 17px;
}

.page-header,
.detail-header {
  min-height: 78px;
}

.page-header h2,
.detail-title h2 {
  font-size: 21px;
}

.page-header p,
.detail-title p {
  font-size: 11px;
}

.page-header-icon {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 8px;
}

.dashboard-home {
  gap: 18px;
}

.dashboard-welcome {
  min-height: 126px;
  align-items: center;
  border: 1px solid #193f51;
  border-radius: 8px;
  background: #143747;
  padding: 22px 24px;
}

.dashboard-welcome > div:first-child > span {
  color: #83d9cf;
  font-size: 11px;
}

.dashboard-welcome h2 {
  color: #fff;
  font-size: 24px;
  line-height: 1.55;
}

.dashboard-welcome p {
  color: #c7d7dc;
  font-size: 11px;
}

.dashboard-welcome .btn.primary {
  border-color: #15998c;
  background: #15998c;
}

.dashboard-welcome .btn:not(.primary) {
  border-color: rgba(255, 255, 255, .42);
  background: transparent;
  color: #fff;
}

.dashboard-welcome .btn:not(.primary):hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .08);
}

.role-focus-bar {
  display: grid;
  grid-template-columns: minmax(170px, auto) repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  min-height: 56px;
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: 8px;
  background: #fff;
  padding: 0;
}

.role-focus-bar > strong {
  display: flex;
  align-items: center;
  border-left: 1px solid var(--product-line);
  background: #f1f6f4;
  padding: 12px 16px;
  color: #2d494f;
  font-size: 11px;
}

.role-focus-bar > button {
  min-height: 56px;
  justify-content: center;
  border: 0;
  border-left: 1px solid #e4ebe9;
  border-radius: 0;
  background: #fff;
  color: #465b64;
  padding: 10px 13px;
  font-size: 11px;
}

.role-focus-bar > button:last-child {
  border-left: 0;
}

.role-focus-bar > button:hover {
  background: var(--product-teal-soft);
  color: #075f57;
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-kpi {
  min-height: 116px;
  border: 0;
  border-left: 1px solid #e3eae8;
  border-radius: 0;
  background: #fff;
  padding: 15px 14px;
  box-shadow: inset 0 3px 0 transparent;
}

.dashboard-kpi:last-child {
  border-left: 0;
}

.dashboard-kpi:hover {
  border-color: #e3eae8;
  background: #f6faf8;
  box-shadow: inset 0 3px 0 var(--product-teal);
}

.dashboard-kpi.warning {
  box-shadow: inset 0 3px 0 #c88222;
}

.dashboard-kpi.danger {
  box-shadow: inset 0 3px 0 var(--product-red);
}

.dashboard-kpi.success {
  box-shadow: inset 0 3px 0 var(--product-green);
}

.dashboard-kpi > span:nth-child(2) {
  gap: 4px;
}

.dashboard-kpi small,
.dashboard-kpi em {
  font-size: 10px;
}

.dashboard-kpi strong {
  font-size: 19px;
  line-height: 1.35;
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background: #edf3f2;
}

.dashboard-layout,
.dashboard-analytics {
  gap: 18px;
}

.dashboard-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, .65fr);
}

.action-list {
  padding-block: 4px !important;
}

.action-row {
  min-height: 66px;
  border-right: 3px solid transparent;
  padding: 10px 14px;
}

.action-row.priority-0 {
  border-right-color: var(--product-red);
}

.action-row.priority-1 {
  border-right-color: var(--product-amber);
}

.action-row:hover {
  background: #f5f9f7;
}

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

.action-row small {
  font-size: 10px;
}

.action-row em {
  padding: 4px 7px;
  font-size: 9px;
}

.empty-state strong {
  font-size: 13px;
}

.empty-state span {
  font-size: 10px;
  line-height: 1.8;
}

.dashboard-chart {
  height: 255px;
}

.dashboard-shortcuts {
  gap: 4px;
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: 8px;
  background: #f7faf9;
  padding: 7px;
}

.dashboard-shortcuts button {
  min-height: 48px;
  border: 0;
  border-left: 1px solid #dce6e3;
  border-radius: 6px;
  background: transparent;
  font-size: 10px;
}

.dashboard-shortcuts button:last-child {
  border-left: 0;
}

.dashboard-shortcuts button:hover {
  border-color: #dce6e3;
  background: var(--product-teal-soft);
  color: #075f57;
}

.sample-list-toolbar {
  gap: 14px;
}

.local-search {
  min-height: 44px;
  border-radius: 7px;
}

.local-search input {
  font-size: 11px;
}

.segmented {
  border-radius: 7px;
  padding: 4px;
}

.segmented button {
  min-height: 34px;
  font-size: 10px;
}

.app table {
  font-size: 11px;
}

.app table th {
  height: 42px;
  background: #f1f5f4;
  font-size: 10px;
}

.app table td {
  height: 50px;
}

.app table td small,
.record-link small {
  font-size: 9px;
}

.workflow-status {
  min-height: 26px;
  font-size: 9px;
}

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 228px;
  }

  .app .product-topbar {
    grid-template-columns: minmax(160px, auto) minmax(240px, 1fr) auto;
  }

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

  .dashboard-kpi:nth-child(3) {
    border-left: 0;
  }

  .dashboard-kpi:nth-child(-n + 3) {
    border-bottom: 1px solid #e3eae8;
  }
}

@media (max-width: 980px) {
  .product-sidebar {
    border-inline-start-color: var(--product-line);
    box-shadow: -18px 0 42px rgba(23, 45, 55, .16);
  }

  .app .product-topbar {
    padding-inline: 16px;
  }

  .page-content {
    padding-inline: 16px;
  }

  .dashboard-layout,
  .dashboard-analytics {
    grid-template-columns: 1fr;
  }

  .mobile-bottom-nav {
    min-height: 64px;
    background: #fff;
  }

  .mobile-bottom-nav button {
    font-size: 8px;
  }
}

@media (max-width: 720px) {
  .page-content {
    padding: 12px 10px 32px;
  }

  .dashboard-home {
    gap: 12px;
  }

  .dashboard-welcome {
    min-height: 156px;
    padding: 18px;
  }

  .dashboard-welcome h2 {
    font-size: 19px;
  }

  .dashboard-welcome p {
    font-size: 10px;
  }

  .role-focus-bar {
    grid-template-columns: 170px repeat(3, 150px);
    overflow-x: auto;
  }

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

  .dashboard-kpi {
    min-height: 96px;
    padding: 11px 10px;
  }

  .dashboard-kpi:nth-child(2n) {
    border-left: 0;
  }

  .dashboard-kpi:nth-child(3) {
    border-left: 1px solid #e3eae8;
  }

  .dashboard-kpi:nth-child(-n + 4) {
    border-bottom: 1px solid #e3eae8;
  }

  .dashboard-kpi strong {
    font-size: 16px;
  }

  .dashboard-shortcuts {
    overflow-x: auto;
  }

  .dashboard-shortcuts button {
    flex-basis: 140px;
  }
}

@media (max-width: 420px) {
  .dashboard-welcome {
    min-height: 170px;
  }

  .dashboard-kpi {
    min-height: 92px;
  }

  .dashboard-kpi small,
  .dashboard-kpi em {
    font-size: 9px;
  }

  .kpi-icon {
    width: 34px;
    height: 34px;
  }
}

/* Final product system: calm operational workspaces */
:focus-visible {
  outline: 3px solid rgba(22, 138, 138, .28);
  outline-offset: 2px;
}

.app .btn,
.app .icon-btn,
.modal .btn,
.modal .icon-btn {
  border-radius: 6px;
}

.app .btn.primary,
.modal .btn.primary {
  border-color: var(--product-teal);
  background: var(--product-teal);
}

.app .btn.primary:hover,
.modal .btn.primary:hover {
  border-color: #106f70;
  background: #106f70;
}

.product-sidebar {
  background: var(--product-navy-strong);
}

.sidebar-child.active {
  background: rgba(60, 202, 192, .14);
  color: #93ebe4;
}

.app .product-topbar {
  border-bottom-color: #d7e0e5;
  background: #fff;
}

.density-compact .page-content {
  --row-height: 36px;
}

.density-compact .panel-head,
.density-compact .panel-body {
  padding-block: 9px;
}

.density-compact table th,
.density-compact table td {
  height: 34px;
  padding-block: 5px;
}

.density-comfortable .page-content {
  --row-height: 44px;
}

.role-focus-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  overflow-x: auto;
  border-block: 1px solid var(--product-line);
  padding: 6px 0;
  scrollbar-width: thin;
}

.role-focus-bar > strong {
  flex: 0 0 auto;
  color: var(--product-muted);
  font-size: 10px;
}

.role-focus-bar > button {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  background: #edf3f6;
  color: var(--product-navy);
  padding: 5px 10px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.role-focus-bar > button:hover {
  background: #e2eef2;
  color: #123b59;
}

.data-workspace-toolbar {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid var(--product-line);
  border-radius: 7px;
  background: #fff;
  padding: 7px 9px;
}

.workspace-search {
  width: min(520px, 100%);
}

.workspace-tools,
.workspace-pagination,
.workspace-pagination > div,
.saved-view-row,
.modal-submit-actions,
.modal-foot-start,
.wizard-foot-start,
.section-band-head,
.calibration-counts {
  display: flex;
  align-items: center;
}

.workspace-tools {
  justify-content: flex-end;
  gap: 5px;
}

.workspace-menu {
  position: relative;
}

.workspace-menu > summary {
  list-style: none;
}

.workspace-menu > summary::-webkit-details-marker {
  display: none;
}

.workspace-menu-popover {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  z-index: 70;
  display: grid;
  width: 260px;
  max-height: 320px;
  overflow-y: auto;
  gap: 6px;
  border: 1px solid var(--product-line-strong);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 12px 30px rgba(24, 45, 58, .14);
}

.workspace-menu-popover.compact {
  width: 220px;
}

.workspace-menu-popover > strong,
.workspace-menu-empty {
  color: var(--product-muted);
  font-size: 9px;
}

.saved-view-row {
  gap: 4px;
}

.saved-view-row > button:first-child,
.column-toggle {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: #f5f7f8;
  color: var(--product-ink);
  padding: 6px 8px;
  text-align: right;
  cursor: pointer;
}

.column-toggle.active {
  border-color: #b8d8d6;
  background: var(--product-teal-soft);
  color: #0e6868;
}

.sample-filters,
.schedule-filters {
  width: 100%;
  overflow-x: auto;
  border-bottom: 1px solid var(--product-line);
  padding-bottom: 5px;
  scrollbar-width: thin;
}

.sample-filters button,
.schedule-filters button {
  flex: 0 0 auto;
}

.sample-table-panel .table-wrap,
.crushing-workspace .table-wrap {
  max-height: min(62vh, 680px);
  overflow: auto;
}

.sample-table-panel table thead,
.crushing-workspace table thead,
.app .table-wrap table thead {
  position: sticky;
  top: 0;
  z-index: 4;
}

.sample-table-panel table thead th,
.crushing-workspace table thead th,
.app .table-wrap table thead th {
  background: #eef3f5;
  box-shadow: inset 0 -1px #d8e1e5;
}

.workspace-pagination {
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  border-top: 1px solid var(--product-line);
  padding: 8px 4px 0;
  color: var(--product-muted);
  font-size: 9px;
}

.workspace-pagination > div {
  gap: 8px;
}

.workspace-pagination strong {
  color: var(--product-ink);
  font-size: 9px;
}

.responsive-data-table td strong,
.responsive-data-table td small {
  display: block;
}

.responsive-data-table td small {
  margin-top: 3px;
  color: var(--product-muted);
  font-size: 8px;
}

.custody-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: 7px;
  background: #fff;
}

.custody-strip > div {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 2px 8px;
  min-height: 60px;
  border-inline-end: 1px solid var(--product-line);
  padding: 8px 10px;
}

.custody-strip > div:last-child {
  border-inline-end: 0;
}

.custody-strip > div > span {
  grid-row: span 2;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #bdcbd2;
  border-radius: 50%;
  color: var(--product-muted);
  font-size: 8px;
}

.custody-strip > div.done > span {
  border-color: #7db7ae;
  background: #e9f6f2;
  color: #176c59;
}

.custody-strip strong {
  font-size: 9px;
}

.custody-strip small {
  overflow: hidden;
  color: var(--product-muted);
  font-size: 7.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.detail-tabs,
.mix-detail-tabs {
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}

.detail-tabs .tab,
.mix-detail-tabs .tab {
  flex: 0 0 auto;
  min-width: max-content;
}

.section-band-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.result-summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: 7px;
  background: var(--product-line);
}

.result-summary-band .metric-card,
.result-summary-band .metric {
  min-height: 76px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.compliance-overview,
.calibration-interlock {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  border: 1px solid #b7d8cc;
  border-inline-start-width: 4px;
  border-radius: 7px;
  background: #f3faf7;
  padding: 10px 13px;
}

.compliance-overview.danger,
.calibration-interlock.danger {
  border-color: #e6bfc2;
  background: #fff5f5;
  color: #94343d;
}

.compliance-overview.warning {
  border-color: #e5cf9f;
  background: #fffaf0;
  color: #76530f;
}

.compliance-overview > div,
.calibration-interlock > div {
  display: grid;
  gap: 4px;
}

.compliance-overview strong,
.calibration-interlock strong {
  font-size: 11px;
}

.compliance-overview span,
.calibration-interlock span {
  color: var(--product-muted);
  font-size: 8.5px;
}

.calibration-counts {
  gap: 6px;
}

.calibration-counts > span {
  display: grid;
  min-width: 68px;
  gap: 2px;
  border: 1px solid var(--product-line);
  border-radius: 5px;
  background: #fff;
  padding: 5px 8px;
}

.activity-log {
  display: grid;
}

.activity-log article {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--product-line);
  padding: 12px 2px;
}

.activity-log article:last-child {
  border-bottom: 0;
}

.activity-log article > div {
  display: grid;
  gap: 4px;
}

.activity-log p {
  margin: 0;
  color: var(--product-muted);
}

.activity-log small {
  color: var(--product-muted);
  font-size: 8px;
}

.mix-compare-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 7px;
}

.mix-compare-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: #fff;
  color: var(--product-ink);
  padding: 7px 10px;
  text-align: right;
  cursor: pointer;
}

.mix-compare-option.selected {
  border-color: #8fc3bf;
  background: var(--product-teal-soft);
  color: #0d6868;
}

.mix-compare-option span {
  display: grid;
  gap: 3px;
}

.mix-compare-option small {
  color: var(--product-muted);
  font-size: 8px;
}

.ncr-mini-progress {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
}

.ncr-mini-progress > span {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #e5eaed;
}

.ncr-mini-progress > span::after {
  content: "";
  display: block;
  width: 11.111%;
  height: 100%;
  border-radius: inherit;
  background: var(--product-teal);
}

.ncr-mini-progress.progress-2 > span::after { width: 22.222%; }
.ncr-mini-progress.progress-3 > span::after { width: 33.333%; }
.ncr-mini-progress.progress-4 > span::after { width: 44.444%; }
.ncr-mini-progress.progress-5 > span::after { width: 55.555%; }
.ncr-mini-progress.progress-6 > span::after { width: 66.666%; }
.ncr-mini-progress.progress-7 > span::after { width: 77.777%; }
.ncr-mini-progress.progress-8 > span::after { width: 88.888%; }
.ncr-mini-progress.progress-9 > span::after { width: 100%; }

.ncr-mini-progress small {
  color: var(--product-muted);
  font-size: 7.5px;
  white-space: nowrap;
}

.ncr-workflow-strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(72px, 1fr));
  overflow-x: auto;
  border-bottom: 1px solid var(--product-line);
  padding: 9px 14px;
  scrollbar-width: thin;
}

.ncr-workflow-strip > span {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--product-muted);
  font-size: 7.5px;
  text-align: center;
}

.ncr-workflow-strip b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #c7d1d7;
  border-radius: 50%;
  background: #fff;
}

.ncr-workflow-strip > span.done {
  color: #0d6868;
}

.ncr-workflow-strip > span.done b {
  border-color: #80bab5;
  background: var(--product-teal-soft);
}

.modal-head p {
  margin: 3px 0 0;
  color: var(--product-muted);
  font-size: 8.5px;
}

.modal-foot {
  justify-content: space-between;
  gap: 10px;
}

.modal-form-error {
  margin: 0 20px 10px;
  border: 1px solid #e2b6b1;
  border-radius: 4px;
  background: #fff6f5;
  padding: 9px 11px;
  color: var(--red);
  font-size: 10.5px;
  line-height: 1.8;
}

.modal-foot-start,
.modal-submit-actions,
.wizard-foot-start {
  gap: 7px;
}

.form-section-heading {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin: 8px -2px 0;
  border-bottom: 1px solid var(--product-line);
  padding: 8px 2px;
  color: var(--product-navy);
}

.form-section-heading > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  background: #edf3f6;
}

.form-section-heading > div {
  display: grid;
  gap: 2px;
}

.form-section-heading strong {
  font-size: 10px;
}

.form-section-heading small {
  color: var(--product-muted);
  font-size: 8px;
}

.focus-result-backdrop {
  z-index: 220;
  background: rgba(16, 36, 48, .42);
}

.modal.focus-result-modal {
  width: min(1080px, calc(100vw - 32px));
  max-width: 1080px;
  height: min(860px, calc(100dvh - 28px));
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.focus-result-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: calc(100% - 61px);
}

.focus-result-form > .panel-body {
  overflow-y: auto;
  align-content: start;
  padding: 13px 18px 24px;
}

.result-focus-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--product-line);
  background: var(--product-line);
}

.result-focus-summary > div {
  display: grid;
  min-height: 66px;
  align-content: center;
  gap: 3px;
  background: #f7f9fa;
  padding: 9px 13px;
}

.result-focus-summary span,
.result-focus-summary small {
  color: var(--product-muted);
  font-size: 8px;
}

.result-focus-summary strong {
  font-size: 11px;
}

.result-focus-summary .equipment-state.danger {
  background: #fff1f1;
  color: #96323a;
}

.result-focus-summary .equipment-state.warning {
  background: #fff8e9;
  color: #87570f;
}

.wizard-save-state {
  display: block;
  margin-top: 3px;
  color: var(--product-muted);
  font-size: 7.5px;
}

.wizard-save-state.saved,
.wizard-save-state.restored {
  color: #226e56;
}

.wizard-save-state.saving {
  color: #8a611c;
}

.attachment-dropzone {
  min-height: 150px;
  align-content: center;
  border: 1px dashed #95b8c3;
  border-radius: 7px;
  background: #f7fafb;
  padding: 18px;
}

.attachment-dropzone > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--product-navy);
}

.attachment-dropzone small {
  color: var(--product-muted);
  text-align: center;
}

.existing-attachments {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.existing-attachments > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--product-line);
  border-radius: 5px;
  background: #fff;
  padding: 5px 8px;
  font-size: 8px;
}

@media (max-width: 980px) {
  .data-workspace-toolbar {
    grid-template-columns: 1fr;
  }

  .workspace-tools {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .result-summary-band,
  .result-focus-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .custody-strip {
    grid-template-columns: repeat(5, minmax(128px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 680px) {
  .role-focus-bar > strong {
    display: none;
  }

  .data-workspace-toolbar {
    border-inline: 0;
    border-radius: 0;
    margin-inline: -9px;
  }

  .workspace-menu-popover {
    position: fixed;
    inset: auto 10px 74px 10px;
    width: auto;
    max-height: 52vh;
  }

  .workspace-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-pagination > div {
    width: 100%;
    justify-content: space-between;
  }

  .compliance-overview,
  .calibration-interlock {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .compliance-overview > .btn,
  .calibration-counts {
    grid-column: 1 / -1;
  }

  .calibration-counts > span {
    flex: 1;
  }

  .result-summary-band,
  .result-focus-summary {
    grid-template-columns: 1fr 1fr;
  }

  .result-summary-band .metric-card,
  .result-summary-band .metric {
    min-height: 68px;
  }

  .modal.focus-result-modal {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .focus-result-form {
    height: calc(100dvh - 58px);
  }

  .focus-result-form > .panel-body {
    grid-template-columns: 1fr;
    padding: 12px 10px 90px;
  }

  .focus-result-form .modal-foot {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr;
    background: #fff;
    padding: 8px 10px;
  }

  .focus-result-form .modal-foot-start {
    display: none;
  }

  .focus-result-form .modal-submit-actions,
  .focus-result-form .modal-submit-actions .btn {
    width: 100%;
  }

  .focus-result-form .modal-submit-actions {
    display: grid;
    grid-template-columns: 1fr 1.45fr;
  }

  .wizard-steps {
    grid-template-columns: repeat(6, minmax(58px, 1fr));
  }

  .wizard-foot {
    gap: 6px;
  }

  .wizard-foot-start [data-modal-close] {
    display: none;
  }

  .wizard-foot-start,
  .wizard-foot > div:last-child {
    width: 100%;
  }

  .wizard-final-submit {
    max-width: 210px;
  }
}

@media (max-width: 420px) {
  .data-workspace-toolbar {
    min-height: 48px;
  }

  .workspace-tools .btn span {
    display: none;
  }

  .custody-strip {
    grid-template-columns: repeat(5, minmax(116px, 1fr));
  }

  .result-focus-summary > div {
    min-height: 58px;
    padding: 7px 9px;
  }

  .result-focus-summary strong {
    font-size: 9.5px;
  }

  .focus-result-form .modal-submit-actions {
    grid-template-columns: 1fr;
  }

  .focus-result-form .modal-submit-actions .btn:first-child {
    display: inline-flex;
  }
}

/* Product redesign: operations cockpit */
:root {
  --product-navy: #1f4b6e;
  --product-navy-strong: #17384f;
  --product-teal: #168a8a;
  --product-teal-soft: #e8f5f4;
  --product-red: #ba3f48;
  --product-red-soft: #fff0f1;
  --product-amber: #a96914;
  --product-amber-soft: #fff7e8;
  --product-green: #287052;
  --product-green-soft: #edf7f1;
  --product-ink: #17242d;
  --product-muted: #64727c;
  --product-line: #dce4e8;
  --product-line-strong: #c5d1d7;
  --product-canvas: #f5f7f8;
  --product-surface: #ffffff;
  --sidebar-width: 272px;
  --topbar-height: 76px;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--product-canvas);
  color: var(--product-ink);
  font-family: IRANSans, Tahoma, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  letter-spacing: 0;
}

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

.app.product-shell {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  grid-template-areas: "main sidebar";
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: var(--product-canvas);
}

.app.product-shell.sidebar-collapsed {
  --sidebar-width: 78px;
}

.product-main {
  grid-area: main;
  direction: rtl;
  min-width: 0;
  width: 100%;
}

.product-sidebar {
  grid-area: sidebar;
  direction: rtl;
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: var(--sidebar-width);
  height: 100vh;
  overflow: hidden;
  border-inline-start: 1px solid #254258;
  background: var(--product-navy-strong);
  color: #fff;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  padding: 12px 14px;
}

.sidebar-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
}

.sidebar-brand > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.sidebar-brand strong {
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-brand small,
.sidebar-footer small {
  color: #b8c8d4;
  font-size: 9px;
}

.product-sidebar .icon-btn {
  border-color: rgba(255, 255, 255, .16);
  background: transparent;
  color: #dfe9ef;
}

.sidebar-navigation {
  display: grid;
  align-content: start;
  gap: 2px;
  overflow-y: auto;
  padding: 10px 8px 18px;
  scrollbar-width: thin;
}

.sidebar-group {
  display: grid;
  gap: 2px;
}

.sidebar-item,
.sidebar-child {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 39px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #c8d5de;
  padding: 8px 10px;
  text-align: right;
  cursor: pointer;
}

.sidebar-item span,
.sidebar-child span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-item:hover,
.sidebar-child:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sidebar-item.active {
  background: #fff;
  color: var(--product-navy-strong);
}

.sidebar-children {
  display: grid;
  gap: 1px;
  margin: 2px 17px 6px 0;
  border-right: 1px solid rgba(255, 255, 255, .18);
  padding-right: 8px;
}

.sidebar-child {
  min-height: 33px;
  padding-block: 6px;
}

.sidebar-child.active {
  background: rgba(35, 196, 184, .14);
  color: #7ee6df;
}

.sidebar-footer {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 58px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 10px 16px;
}

.sidebar-footer > span:last-child {
  display: grid;
  gap: 1px;
}

.sidebar-footer strong {
  font-size: 9.5px;
}

.subscription-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4bd19d;
}

.subscription-dot.expired {
  background: #f27676;
}

.sidebar-collapsed .sidebar-brand {
  grid-template-columns: 1fr;
  justify-items: center;
  padding-inline: 8px;
}

.sidebar-collapsed .sidebar-brand > span,
.sidebar-collapsed .sidebar-collapse,
.sidebar-collapsed .sidebar-item span,
.sidebar-collapsed .sidebar-child span,
.sidebar-collapsed .sidebar-children,
.sidebar-collapsed .sidebar-footer > span:last-child {
  display: none;
}

.sidebar-collapsed .sidebar-item {
  grid-template-columns: 1fr;
  justify-items: center;
}

.sidebar-collapsed .sidebar-footer {
  grid-template-columns: 1fr;
  justify-items: center;
}

.app .product-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(170px, auto) minmax(280px, 1fr) auto auto;
  grid-template-areas: "identity search filters toolbar";
  align-items: center;
  gap: 14px;
  min-height: var(--topbar-height);
  border: 0;
  border-bottom: 1px solid var(--product-line);
  border-radius: 0;
  background: rgba(255, 255, 255, .97);
  padding: 9px 22px;
  box-shadow: none;
}

.page-identity {
  grid-area: identity;
  display: grid;
  min-width: 0;
  gap: 1px;
}

.page-identity > span {
  color: var(--product-teal);
  font-size: 8.5px;
  font-weight: 700;
}

.page-identity h1 {
  overflow: hidden;
  margin: 0;
  color: var(--product-ink);
  font-size: 15px;
  line-height: 1.5;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-identity p {
  overflow: hidden;
  margin: 0;
  color: var(--product-muted);
  font-size: 8.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.global-search-shell {
  grid-area: search;
  position: relative;
  width: 100%;
  max-width: 650px;
  justify-self: center;
}

.searchbox {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid var(--product-line-strong);
  border-radius: 7px;
  background: #f8fafb;
  padding: 0 11px;
}

.searchbox:focus-within {
  border-color: var(--product-teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(8, 127, 121, .1);
}

.searchbox input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--product-ink);
  font-size: 10.5px;
}

.searchbox kbd {
  border: 1px solid var(--product-line);
  border-bottom-color: #b8c3ca;
  border-radius: 4px;
  background: #fff;
  padding: 2px 5px;
  color: #77838d;
  font-family: inherit;
  font-size: 8px;
  direction: ltr;
}

.search-clear {
  display: none;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--product-muted);
  cursor: pointer;
}

.search-clear.visible {
  display: grid;
}

.global-search-results {
  position: absolute;
  inset: calc(100% + 6px) 0 auto;
  z-index: 80;
  display: grid;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--product-line);
  border-radius: 7px;
  background: #fff;
  padding: 5px;
  box-shadow: 0 18px 40px rgba(22, 39, 52, .16);
}

.global-search-result {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  min-height: 49px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: var(--product-ink);
  padding: 7px 9px;
  text-align: right;
  cursor: pointer;
}

.global-search-result:hover,
.global-search-result:focus {
  outline: none;
  background: var(--product-teal-soft);
}

.global-search-result > span {
  display: grid;
  gap: 2px;
}

.global-search-result strong {
  font-size: 10px;
}

.global-search-result small,
.global-search-empty {
  color: var(--product-muted);
  font-size: 8.5px;
}

.global-search-empty {
  padding: 16px;
  text-align: center;
}

.context-filters {
  grid-area: filters;
}

.context-filters select {
  min-width: 142px;
  height: 38px;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: #fff;
  padding: 0 9px;
  color: var(--product-ink);
  font-size: 9px;
}

.product-toolbar {
  grid-area: toolbar;
  display: flex;
  align-items: center;
  gap: 7px;
}

.app .mobile-menu-button {
  display: none;
}

.quick-actions-popover,
.profile-popover {
  position: relative;
}

.quick-actions-popover > summary,
.profile-popover > summary {
  list-style: none;
  cursor: pointer;
}

.quick-actions-popover > summary::-webkit-details-marker,
.profile-popover > summary::-webkit-details-marker {
  display: none;
}

.quick-actions-menu,
.profile-menu {
  position: absolute;
  inset: calc(100% + 8px) auto auto 0;
  z-index: 90;
  display: grid;
  width: 270px;
  border: 1px solid var(--product-line);
  border-radius: 7px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 18px 40px rgba(22, 39, 52, .17);
}

.quick-actions-menu button,
.profile-menu button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: var(--product-ink);
  padding: 7px 9px;
  text-align: right;
  cursor: pointer;
}

.quick-actions-menu button:hover,
.profile-menu button:hover {
  background: var(--product-teal-soft);
}

.quick-actions-menu button > span {
  display: grid;
  gap: 1px;
}

.quick-actions-menu strong {
  font-size: 9.5px;
}

.quick-actions-menu small {
  color: var(--product-muted);
  font-size: 8px;
}

.profile-popover > summary {
  display: grid;
  grid-template-columns: 32px minmax(0, auto) 14px;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border-radius: 6px;
  padding: 3px 5px;
}

.profile-popover > summary:hover {
  background: #f4f7f8;
}

.user-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--product-navy);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.profile-copy {
  display: grid;
  gap: 0;
}

.profile-copy strong {
  font-size: 9px;
}

.profile-copy small {
  color: var(--product-muted);
  font-size: 7.5px;
}

.notification-launch {
  position: relative;
}

.notification-count {
  position: absolute;
  top: -5px;
  left: -5px;
  display: grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 9px;
  background: var(--product-red);
  color: #fff;
  padding-inline: 3px;
  font-size: 7px;
}

.page-context-bar {
  display: grid;
  gap: 7px;
  min-height: 66px;
  border: 0;
  border-bottom: 1px solid var(--product-line);
  border-radius: 0;
  background: #fff;
  padding: 8px 22px 7px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--product-muted);
  font-size: 8.5px;
}

.breadcrumbs button {
  border: 0;
  background: transparent;
  color: var(--product-teal);
  padding: 0;
  cursor: pointer;
}

.context-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: none;
}

.context-tabs .chip {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--product-muted);
  padding: 5px 9px;
  font-size: 8.5px;
  cursor: pointer;
}

.context-tabs .chip:hover {
  background: #f3f6f7;
  color: var(--product-ink);
}

.context-tabs .chip.active {
  border-color: #b8ddd9;
  background: var(--product-teal-soft);
  color: #075f5a;
  font-weight: 700;
}

.page-content {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 18px 22px 36px;
}

.page-content > section,
.dashboard-home {
  width: 100%;
  max-width: 1540px;
  margin-inline: auto;
}

.app .btn,
.app .icon-btn {
  border-radius: 6px;
  font-weight: 650;
}

.app .btn {
  min-height: 34px;
  border: 1px solid var(--product-line-strong);
  background: #fff;
  color: var(--product-ink);
  padding: 6px 10px;
  font-size: 8.8px;
}

.app .btn:hover {
  border-color: #9bacb6;
  background: #f8fafb;
}

.app .btn.primary {
  border-color: var(--product-teal);
  background: var(--product-teal);
  color: #fff;
}

.app .btn.primary:hover {
  border-color: #066c67;
  background: #066c67;
}

.app .btn.danger {
  border-color: #e0a8ad;
  background: #fff;
  color: var(--product-red);
}

.app .btn.small {
  min-height: 29px;
  padding: 4px 8px;
  font-size: 8px;
}

.app .text-btn {
  border-color: transparent;
  background: transparent;
  color: var(--product-teal);
}

.app .icon-btn {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--product-line);
  background: #fff;
  color: var(--product-muted);
  padding: 0;
  cursor: pointer;
}

.app .panel {
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--product-line);
  border-radius: 7px;
  background: var(--product-surface);
  box-shadow: 0 1px 2px rgba(22, 39, 52, .035);
}

.app .panel-head {
  min-height: 54px;
  border-bottom: 1px solid var(--product-line);
  padding: 11px 14px;
}

.app .panel-head h3,
.app .panel-head strong {
  margin: 0;
  color: var(--product-ink);
  font-size: 11px;
}

.app .panel-head p {
  margin: 2px 0 0;
  color: var(--product-muted);
  font-size: 8.5px;
}

.app .panel-body {
  padding: 14px;
}

.app .grid {
  gap: 14px;
}

.app .grid.two,
.dashboard-analytics,
.dashboard-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.app .grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-header,
.detail-header,
.dashboard-welcome {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  border: 0;
  background: transparent;
}

.page-header > div:nth-child(2),
.detail-title,
.dashboard-welcome > div:first-child {
  min-width: 0;
  flex: 1;
}

.page-header h2,
.detail-title h2,
.dashboard-welcome h2 {
  margin: 0;
  color: var(--product-ink);
  font-size: 17px;
  line-height: 1.6;
}

.page-header p,
.detail-title p,
.dashboard-welcome p {
  margin: 1px 0 0;
  color: var(--product-muted);
  font-size: 9px;
}

.page-header-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid #b8ddd9;
  border-radius: 7px;
  background: var(--product-teal-soft);
  color: var(--product-teal);
}

.page-count {
  border: 1px solid var(--product-line);
  border-radius: 5px;
  background: #fff;
  padding: 5px 8px;
  color: var(--product-muted);
  font-size: 8px;
}

.page-header-actions > .actions {
  margin-inline-start: auto;
}

.dashboard-home {
  display: grid;
  gap: 16px;
}

.dashboard-welcome {
  min-height: 76px;
  border-bottom: 1px solid var(--product-line);
  padding-bottom: 13px;
}

.dashboard-welcome > div:first-child > span {
  color: var(--product-teal);
  font-size: 8.5px;
  font-weight: 750;
}

.dashboard-primary-actions {
  display: flex;
  gap: 7px;
}

.dashboard-kpi-grid,
.daily-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.daily-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-kpi {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 86px;
  border: 1px solid var(--product-line);
  border-radius: 7px;
  background: #fff;
  color: var(--product-ink);
  padding: 10px;
  text-align: right;
  cursor: pointer;
}

.dashboard-kpi:hover {
  border-color: #a8c4c3;
  box-shadow: 0 5px 14px rgba(22, 39, 52, .07);
}

.dashboard-kpi > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.dashboard-kpi small,
.dashboard-kpi em {
  overflow: hidden;
  color: var(--product-muted);
  font-size: 8.5px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dashboard-kpi strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.kpi-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: #edf2f5;
  color: var(--product-navy);
}

.dashboard-kpi.danger .kpi-icon {
  background: var(--product-red-soft);
  color: var(--product-red);
}

.dashboard-kpi.warning .kpi-icon {
  background: var(--product-amber-soft);
  color: var(--product-amber);
}

.dashboard-kpi.success .kpi-icon {
  background: var(--product-green-soft);
  color: var(--product-green);
}

.dashboard-layout,
.dashboard-analytics {
  display: grid;
  gap: 14px;
}

.dashboard-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
}

.action-list {
  display: grid;
  padding-block: 5px !important;
}

.action-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto 17px;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid #edf1f3;
  background: #fff;
  color: var(--product-ink);
  padding: 7px 10px;
  text-align: right;
  cursor: pointer;
}

.action-row:last-child {
  border-bottom: 0;
}

.action-row:hover {
  background: #f8fafb;
}

.action-row > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.action-row strong {
  overflow: hidden;
  font-size: 9.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.action-row small {
  overflow: hidden;
  color: var(--product-muted);
  font-size: 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.action-row em {
  border-radius: 4px;
  background: #f0f3f5;
  padding: 3px 6px;
  color: var(--product-muted);
  font-size: 7px;
  font-style: normal;
}

.priority-0 .action-priority,
.priority-0 > em {
  color: var(--product-red);
}

.priority-0 > em {
  background: var(--product-red-soft);
}

.priority-1 .action-priority,
.priority-1 > em {
  color: var(--product-amber);
}

.priority-1 > em {
  background: var(--product-amber-soft);
}

.dashboard-chart {
  height: 230px;
}

.large-chart {
  height: 360px;
}

.dashboard-shortcuts {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--product-line);
  padding-top: 14px;
}

.dashboard-shortcuts button {
  display: flex;
  flex: 1 0 132px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: #fff;
  color: var(--product-ink);
  font-size: 8.5px;
  cursor: pointer;
}

.dashboard-shortcuts button:hover {
  border-color: #a8c4c3;
  color: var(--product-teal);
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--product-muted);
  padding: 24px;
  text-align: center;
}

.empty-state.compact {
  min-height: 132px;
}

.empty-state strong {
  color: var(--product-ink);
  font-size: 10.5px;
}

.empty-state span {
  max-width: 480px;
  font-size: 8.5px;
}

.sample-list-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 380px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.local-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--product-line-strong);
  border-radius: 6px;
  background: #fff;
  padding: 0 10px;
}

.local-search:focus-within {
  border-color: var(--product-teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 121, .09);
}

.local-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 9.5px;
}

.segmented {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: #fff;
  padding: 3px;
  scrollbar-width: none;
}

.segmented button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--product-muted);
  padding: 5px 8px;
  font-size: 8px;
  cursor: pointer;
}

.segmented button.active {
  background: var(--product-navy);
  color: #fff;
}

.segmented button b {
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 9px;
  background: rgba(98, 112, 125, .12);
  font-size: 7px;
}

.segmented button.active b {
  background: rgba(255, 255, 255, .16);
}

.sample-table-panel .panel-body {
  padding: 0;
}

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

.app table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5px;
}

.app table th {
  height: 38px;
  background: #f6f8f9;
  color: #57646f;
  padding: 7px 9px;
  font-size: 8.5px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.app table td {
  height: 46px;
  border-bottom: 1px solid #e9eef0;
  padding: 7px 9px;
  vertical-align: middle;
}

.app table tbody tr:hover {
  background: #fbfcfc;
}

.app table td small,
.record-link small {
  display: block;
  margin-top: 2px;
  color: var(--product-muted);
  font-size: 7.5px;
}

.record-link {
  display: grid;
  border: 0;
  background: transparent;
  color: var(--product-teal);
  padding: 0;
  text-align: right;
  cursor: pointer;
}

.workflow-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 4px;
  background: #eef2f4;
  color: #53616d;
  padding: 3px 7px;
  font-size: 7.5px;
  font-weight: 700;
  white-space: nowrap;
}

.workflow-status.danger {
  background: var(--product-red-soft);
  color: var(--product-red);
}

.workflow-status.warning {
  background: var(--product-amber-soft);
  color: var(--product-amber);
}

.workflow-status.success {
  background: var(--product-green-soft);
  color: var(--product-green);
}

.detail-header {
  min-height: 72px;
  border-bottom: 1px solid var(--product-line);
  padding-bottom: 12px;
}

.detail-title > span {
  color: var(--product-teal);
  font-size: 8px;
  font-weight: 700;
}

.sample-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: 7px;
  background: #fff;
}

.sample-progress > div {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 51px;
  border-inline-end: 1px solid var(--product-line);
  padding: 8px 10px;
  color: var(--product-muted);
}

.sample-progress > div:last-child {
  border-inline-end: 0;
}

.sample-progress span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 1px solid var(--product-line-strong);
  border-radius: 50%;
  font-size: 7.5px;
}

.sample-progress strong {
  font-size: 8px;
}

.sample-progress .done {
  color: var(--product-green);
}

.sample-progress .done span {
  border-color: #b8d6c5;
  background: var(--product-green-soft);
}

.sample-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 14px;
}

.detail-main {
  overflow: hidden !important;
}

.detail-tabs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  border-bottom: 1px solid var(--product-line);
  padding: 7px 10px 0;
  scrollbar-width: none;
}

.detail-tabs .tab {
  flex: 0 0 auto;
  min-height: 35px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--product-muted);
  padding: 6px 10px;
  font-size: 8.5px;
}

.detail-tabs .tab.active {
  border-bottom-color: var(--product-teal);
  background: transparent;
  color: var(--product-teal);
}

.detail-tab-body {
  min-height: 410px;
}

.sample-summary-sidebar {
  display: grid;
  gap: 14px;
}

.summary-list {
  display: grid;
  padding-block: 3px !important;
}

.summary-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 41px;
  border-bottom: 1px solid #edf1f3;
  padding: 7px 10px;
}

.summary-list > div:last-child {
  border-bottom: 0;
}

.summary-list span {
  color: var(--product-muted);
  font-size: 8px;
}

.summary-list strong {
  max-width: 155px;
  overflow-wrap: anywhere;
  font-size: 8.5px;
  text-align: left;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline > div:not(.empty) {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 48px;
  border-right: 1px solid #cbd7dc;
  padding: 2px 16px 12px 0;
}

.timeline > div > span {
  position: absolute;
  top: 4px;
  right: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--product-teal);
}

.timeline strong {
  font-size: 8.5px;
}

.timeline small {
  color: var(--product-muted);
  font-size: 7.5px;
}

.mobile-bottom-nav,
.sidebar-scrim {
  display: none;
}

.sample-wizard-backdrop {
  z-index: 200;
  padding: 18px;
}

.sample-wizard-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1080px, 96vw);
  max-width: 1080px;
  height: min(820px, 92vh);
  max-height: 92vh;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.sample-wizard-modal .modal-head {
  min-height: 66px;
  border-bottom: 1px solid var(--product-line);
  padding: 10px 16px;
}

.sample-wizard-modal .modal-head > div {
  display: grid;
  gap: 1px;
}

.sample-wizard-modal .modal-head span {
  color: var(--product-teal);
  font-size: 8px;
  font-weight: 700;
}

.sample-wizard-modal .modal-head h3 {
  margin: 0;
  font-size: 14px;
}

#sample-wizard-form {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.wizard-steps {
  grid-row: 1 / 3;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 4px;
  border-left: 1px solid var(--product-line);
  background: #f7f9fa;
  padding: 15px 10px;
}

.wizard-steps button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--product-muted);
  padding: 7px 8px;
  text-align: right;
  cursor: pointer;
}

.wizard-steps button > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  background: #e8eef1;
}

.wizard-steps button strong {
  font-size: 8.5px;
}

.wizard-steps button.active {
  border-color: #b8ddd9;
  background: #fff;
  color: var(--product-teal);
}

.wizard-steps button.active > span,
.wizard-steps button.done > span {
  background: var(--product-teal-soft);
  color: var(--product-teal);
}

.wizard-steps button:disabled {
  cursor: default;
  opacity: .58;
}

.wizard-body {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
}

.sample-wizard-modal .wizard-stage {
  display: none;
  gap: 18px;
}

.sample-wizard-modal .wizard-stage.active {
  display: grid;
}

.sample-wizard-modal .wizard-stage > header {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--product-line);
  padding-bottom: 12px;
}

.sample-wizard-modal .wizard-stage h4 {
  margin: 0;
  font-size: 13px;
}

.sample-wizard-modal .wizard-stage header p {
  margin: 0;
  color: var(--product-muted);
  font-size: 8.5px;
}

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

.sample-wizard-modal .form-control {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.sample-wizard-modal .form-control > span {
  color: #3e4b56;
  font-size: 8.5px;
  font-weight: 700;
}

.sample-wizard-modal input,
.sample-wizard-modal select,
.sample-wizard-modal textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--product-line-strong);
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: var(--product-ink);
  padding: 7px 9px;
  font-size: 9px;
}

.sample-wizard-modal textarea {
  min-height: 94px;
  resize: vertical;
}

.sample-wizard-modal input:focus,
.sample-wizard-modal select:focus,
.sample-wizard-modal textarea:focus {
  border-color: var(--product-teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 121, .09);
}

.span-two {
  grid-column: 1 / -1;
}

.wizard-foot {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border-top: 1px solid var(--product-line);
  background: #fff;
  padding: 10px 16px;
}

.wizard-foot > div {
  display: flex;
  gap: 7px;
}

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

.compliance-item {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 58px;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: #f8fafb;
  padding: 8px 10px;
}

.compliance-item > span {
  display: grid;
  gap: 2px;
}

.compliance-item strong {
  font-size: 9px;
}

.compliance-item small {
  color: var(--product-muted);
  font-size: 8px;
}

.compliance-item.success {
  border-color: #bbd8c8;
  background: var(--product-green-soft);
  color: var(--product-green);
}

.compliance-item.warning {
  border-color: #ecd49f;
  background: var(--product-amber-soft);
  color: var(--product-amber);
}

.compliance-item.danger {
  border-color: #e7b9bd;
  background: var(--product-red-soft);
  color: var(--product-red);
}

.specimen-preview {
  display: grid;
  gap: 4px;
  border: 1px solid #b8ddd9;
  border-radius: 6px;
  background: var(--product-teal-soft);
  padding: 12px;
  color: #075f5a;
}

.specimen-preview strong {
  font-size: 9.5px;
}

.specimen-preview span {
  font-size: 8px;
}

.specimen-preview em {
  color: var(--product-red);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.sampling-plan-band {
  display: grid;
  gap: 10px;
}

.sampling-plan-band .panel-head {
  margin: 0;
  padding: 0;
}

.stacked-action {
  display: grid;
  min-width: 180px;
  gap: 7px;
  line-height: 1.7;
}

.stacked-action .btn {
  justify-self: start;
}

.wizard-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: #fff;
  padding: 10px;
}

.wizard-check input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 1px 0 0;
}

.wizard-check > span {
  display: grid;
  gap: 2px;
}

.wizard-check strong {
  font-size: 8.5px;
}

.wizard-check small {
  color: var(--product-muted);
  font-size: 7.5px;
}

.wizard-review {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.wizard-review > div {
  display: grid;
  gap: 3px;
  min-height: 82px;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: #f8fafb;
  padding: 10px;
}

.wizard-review span,
.wizard-review small {
  color: var(--product-muted);
  font-size: 7.5px;
}

.wizard-review strong {
  font-size: 9px;
}

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 244px;
  }

  .app .product-topbar {
    grid-template-columns: minmax(145px, auto) minmax(230px, 1fr) auto;
    grid-template-areas: "identity search toolbar" "identity filters toolbar";
    gap: 6px 12px;
  }

  .context-filters {
    align-self: start;
  }

  .context-filters select {
    min-width: 130px;
    height: 25px;
    border: 0;
    background: transparent;
    padding: 0;
  }

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

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

@media (max-width: 980px) {
  .app.product-shell,
  .app.product-shell.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main";
    padding-bottom: 62px;
  }

  .product-sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 120;
    width: min(300px, 86vw);
    transform: translateX(105%);
    transition: transform .18s ease;
  }

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

  .sidebar-open .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: block;
    border: 0;
    background: rgba(13, 25, 35, .46);
  }

  .sidebar-collapsed .sidebar-brand {
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    justify-items: stretch;
    padding-inline: 14px;
  }

  .sidebar-collapsed .sidebar-brand > span,
  .sidebar-collapsed .sidebar-collapse,
  .sidebar-collapsed .sidebar-item span,
  .sidebar-collapsed .sidebar-children,
  .sidebar-collapsed .sidebar-footer > span:last-child {
    display: initial;
  }

  .sidebar-collapsed .sidebar-item {
    grid-template-columns: 22px minmax(0, 1fr);
    justify-items: stretch;
  }

  .app .product-topbar {
    grid-template-columns: 38px minmax(130px, auto) minmax(220px, 1fr) auto;
    grid-template-areas: "menu identity search toolbar";
    min-height: 70px;
    padding: 8px 14px;
  }

  .app .mobile-menu-button {
    grid-area: menu;
    display: inline-grid;
  }

  .context-filters,
  .profile-copy {
    display: none;
  }

  .profile-popover > summary {
    grid-template-columns: 32px;
  }

  .profile-popover > summary > svg:last-child {
    display: none;
  }

  .page-context-bar {
    padding-inline: 14px;
  }

  .page-content {
    padding: 14px 14px 28px;
  }

  .dashboard-layout,
  .dashboard-analytics,
  .sample-detail-layout {
    grid-template-columns: 1fr;
  }

  .sample-summary-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-bottom-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 95;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 58px;
    border-top: 1px solid var(--product-line);
    background: rgba(255, 255, 255, .98);
    padding: 4px max(5px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
    box-shadow: 0 -5px 18px rgba(22, 39, 52, .08);
  }

  .mobile-bottom-nav button {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--product-muted);
    font-size: 7px;
  }

  .mobile-bottom-nav button.active {
    background: var(--product-teal-soft);
    color: var(--product-teal);
  }
}

@media (max-width: 720px) {
  .app .product-topbar {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-areas: "menu identity toolbar" "search search search";
    gap: 6px 8px;
    min-height: 111px;
    padding: 7px 10px;
  }

  .global-search-shell {
    max-width: none;
  }

  .searchbox {
    min-height: 38px;
  }

  .searchbox kbd,
  .quick-actions-popover > summary span,
  .quick-actions-popover > summary svg:last-child,
  .profile-popover {
    display: none;
  }

  .page-identity h1 {
    font-size: 13px;
  }

  .page-context-bar {
    min-height: 49px;
    padding: 6px 10px;
  }

  .breadcrumbs {
    display: none;
  }

  .page-content {
    padding: 10px 9px 24px;
  }

  .page-header,
  .detail-header,
  .dashboard-welcome {
    align-items: flex-start;
    min-height: 58px;
    flex-wrap: wrap;
  }

  .page-header h2,
  .detail-title h2,
  .dashboard-welcome h2 {
    font-size: 14px;
  }

  .page-header > .actions,
  .detail-header > .actions,
  .dashboard-primary-actions {
    width: 100%;
  }

  .page-header > .actions .btn,
  .detail-header > .actions .btn,
  .dashboard-primary-actions .btn {
    flex: 1;
  }

  .dashboard-kpi-grid,
  .daily-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-kpi {
    min-height: 78px;
  }

  .dashboard-kpi strong {
    font-size: 11.5px;
  }

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

  .action-row {
    grid-template-columns: 24px minmax(0, 1fr) 15px;
  }

  .action-row > em {
    display: none;
  }

  .sample-list-toolbar {
    grid-template-columns: 1fr;
  }

  .sample-filters {
    margin-inline: -1px;
  }

  .responsive-data-table thead {
    display: none;
  }

  .responsive-data-table,
  .responsive-data-table tbody,
  .responsive-data-table tr,
  .responsive-data-table td {
    display: block;
    width: 100%;
  }

  .responsive-data-table tbody {
    display: grid;
    gap: 8px;
    padding: 8px;
  }

  .responsive-data-table tr {
    overflow: hidden;
    border: 1px solid var(--product-line);
    border-radius: 7px;
    background: #fff;
  }

  .responsive-data-table td {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    min-height: 36px;
    height: auto !important;
    border-bottom: 1px solid #edf1f3;
    padding: 6px 9px !important;
  }

  .responsive-data-table td::before {
    content: attr(data-label);
    color: var(--product-muted);
    font-size: 7.5px;
  }

  .responsive-data-table td:last-child {
    border-bottom: 0;
  }

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

  .sample-progress > div:nth-child(3) {
    border-inline-end: 0;
  }

  .sample-progress > div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--product-line);
  }

  .sample-summary-sidebar {
    grid-template-columns: 1fr;
  }

  .detail-tab-body {
    min-height: 300px;
  }

  .app .grid.two,
  .app .grid.three,
  .app .grid.four {
    grid-template-columns: 1fr;
  }

  .sample-wizard-backdrop {
    padding: 0;
  }

  .sample-wizard-modal {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  #sample-wizard-form {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .wizard-steps {
    grid-row: 1;
    grid-template-columns: repeat(6, minmax(58px, 1fr));
    overflow-x: auto;
    border-bottom: 1px solid var(--product-line);
    border-left: 0;
    padding: 6px;
  }

  .wizard-steps button {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 54px;
    gap: 3px;
    padding: 4px;
    text-align: center;
  }

  .wizard-steps button strong {
    font-size: 6.5px;
  }

  .wizard-steps button > span {
    width: 26px;
    height: 26px;
  }

  .wizard-body {
    grid-row: 2;
    padding: 15px 12px;
  }

  .sample-wizard-modal .form-grid,
  .fresh-compliance,
  .wizard-review {
    grid-template-columns: 1fr;
  }

  .wizard-foot {
    grid-column: 1;
    grid-row: 3;
    padding: 8px 10px;
  }

  .wizard-foot > div {
    flex: 1;
    justify-content: flex-end;
  }
}

@media (max-width: 420px) {
  .dashboard-kpi-grid,
  .daily-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-kpi {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 72px;
    padding: 8px;
  }

  .dashboard-kpi > svg:last-child {
    display: none;
  }

  .kpi-icon {
    width: 30px;
    height: 30px;
  }

  .sample-progress strong {
    font-size: 7px;
  }

  .sample-progress > div {
    gap: 4px;
    padding: 6px;
  }

  .wizard-foot > .btn:first-child {
    display: none;
  }

  .wizard-foot .btn {
    padding-inline: 8px;
  }
}

@media (min-width: 981px) {
  .app .mobile-menu-button {
    display: none !important;
  }
}
