:root {
  --bg: #f6f7f8;
  --panel: #ffffff;
  --ink: #17201c;
  --muted: #65716c;
  --line: #dfe5e2;
  --top-soft: #e8f7ee;
  --top-soft-strong: #d2efdf;
  --brand: #00796b;
  --brand-strong: #005d52;
  --accent: #f1c232;
  --job-number-orange: #f57c00;
  --progress-light: #8ed99c;
  --danger: #c0392b;
  --warning: #9b6a00;
  --success: #217a3f;
  --info: #2d6a8e;
  --shadow: 0 12px 30px rgba(23, 32, 28, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

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

.is-locked .tabs,
.is-locked .user-switcher {
  display: none;
}

.is-locked .topbar {
  justify-content: flex-start;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(16px, 4vw, 48px);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

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

.brand-logo-frame {
  display: block;
  width: min(280px, 52vw);
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  transform: translateX(-20px);
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-copy h1 {
  margin: 0;
  color: var(--brand-strong);
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.08;
}

.brand-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.user-switcher {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 220px) auto;
  align-items: center;
  justify-content: end;
  gap: 8px 10px;
  min-width: min(520px, 100%);
}

.preview-switcher {
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  justify-self: end;
}

.preview-switcher[hidden] {
  display: none;
}

.user-switcher label,
.field label,
.checkbox-group legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.user-switcher > label[for="currentUser"] {
  white-space: nowrap;
}

.user-switcher #currentUser {
  min-width: 0;
}

.user-switcher .ghost-button {
  justify-self: start;
  white-space: nowrap;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.14);
}

.role-pill,
.status-pill,
.tiny-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.role-pill {
  padding: 7px 10px;
  background: #e5f3ef;
  color: var(--brand-strong);
  font-size: 0.78rem;
}

.role-pill.is-preview {
  background: #fff6d8;
  color: var(--warning);
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px clamp(16px, 4vw, 48px);
  background: var(--top-soft);
  border-bottom: 1px solid #bee5cf;
}

.tab,
.button,
.ghost-button,
.danger-button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
}

.tab {
  background: rgba(255, 255, 255, 0.5);
  color: var(--brand-strong);
}

.tab[data-tab="users"] {
  margin-left: auto;
}

.tab.is-active {
  background: var(--brand-strong);
  color: #ffffff;
}

main {
  padding: 16px clamp(16px, 4vw, 48px) 48px;
}

.login-panel {
  width: min(440px, 100%);
  margin: 28px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(18, 38, 32, 0.08);
  padding: clamp(20px, 4vw, 32px);
}

.login-panel h2 {
  margin: 0;
  color: var(--brand-strong);
}

.login-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.login-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.login-account-chip {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #cfe3d2;
  border-radius: 8px;
  background: linear-gradient(180deg, #f7fcf8, #edf8f0);
  color: var(--ink);
  box-shadow: none;
}

.login-account-chip strong {
  font-size: 0.92rem;
}

.login-account-chip span {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 700;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

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

.section-header h2,
.panel h2,
.job-card h3,
.empty-state h2 {
  margin: 0;
}

.section-header p,
.panel p,
.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.stat-card,
.panel,
.job-card,
.alert-item,
.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 92px;
  overflow: hidden;
  border: 0;
  padding: 12px;
  position: relative;
  text-align: left;
}

.stat-card span {
  display: block;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 1.42rem;
  line-height: 1;
}

.stat-card small {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.66rem;
  font-weight: 800;
}

.stat-card.is-active {
  box-shadow: 0 0 0 3px rgba(23, 32, 28, 0.14), 0 14px 34px rgba(23, 32, 28, 0.18);
  transform: translateY(-1px);
}

.stat-card.is-active small {
  color: #ffffff;
}

.stat-card.is-locked {
  background: linear-gradient(135deg, #6b7280, #374151);
}

.stat-card.is-locked strong {
  color: #ffffff;
  font-size: 1.05rem;
}

.stat-card[data-status="pending"] {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-card[data-status="inProgress"] {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
}

.stat-card[data-status="readyForInvoice"] {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.stat-card[data-status="complete"] {
  background: linear-gradient(135deg, #10b981, #047857);
}

.stat-card[data-status="overdue"] {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.stat-card[data-status="reports"] {
  background: linear-gradient(135deg, #ec4899, #be185d);
}

.stock-stat-card {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
}

.quote-stat-card {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.quote-stat-card.is-due {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.quote-stat-card.is-converted {
  background: linear-gradient(135deg, #10b981, #047857);
}

.quote-stat-card.is-total {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.quote-month-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  border-color: #cfe2d7;
  background: #ffffff;
}

.quote-month-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.quote-month-line {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #10b981, #f59e0b, #ef4444);
}

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

.quote-month-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 10px;
}

.quote-month-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-month-metric strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.quote-month-metric.is-converted {
  border-color: #bde6c8;
  background: #f0fbf3;
}

.quote-month-metric.is-lost {
  border-color: #f2c6bf;
  background: #fff4f2;
}

.quote-month-metric.is-invoice {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.quote-month-metric.is-open {
  border-color: #f4d47d;
  background: #fffaf0;
}

.dashboard-expanded-panel {
  margin-bottom: 20px;
}

.dashboard-expanded-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-expanded-header h2 {
  margin: 0;
}

.dashboard-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.dashboard-table.is-compact {
  min-width: 860px;
}

.dashboard-table th,
.dashboard-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  white-space: nowrap;
}

.dashboard-table th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-table td {
  font-weight: 700;
}

.dashboard-table.is-compact th,
.dashboard-table.is-compact td {
  padding: 8px 7px;
  font-size: 0.78rem;
}

.dashboard-table tr.is-expanded > td {
  background: #f8fbfa;
}

.dashboard-view-button {
  padding: 7px 10px;
  white-space: nowrap;
}

.dashboard-detail-row td {
  background: #fbfcfc;
  white-space: normal;
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 6px 0;
}

.dashboard-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-detail-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

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

.dashboard-empty-state {
  margin-top: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.design-correction-panel {
  margin-bottom: 20px;
  border-color: #cfe2d7;
}

.design-correction-panel.is-print {
  border-color: #cce3ef;
}

.design-correction-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.design-correction-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 12px;
  border: 1px solid #d9e7df;
  border-left: 5px solid var(--warning);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.design-correction-card.is-print {
  border-left-color: var(--info);
}

.design-correction-card.is-uploaded {
  border-left-color: var(--success);
  background: #fbfffc;
}

.design-correction-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-content: start;
}

.design-correction-main > div {
  min-width: 0;
}

.design-correction-main span,
.design-correction-note small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.design-correction-note {
  grid-column: 1 / -1;
  border: 1px solid #e2ebe7;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 8px;
}

.design-correction-note strong,
.design-correction-note p {
  overflow-wrap: anywhere;
}

.design-correction-note p {
  margin: 5px 0;
  font-size: 0.84rem;
  font-weight: 900;
}

.design-correction-side {
  display: grid;
  gap: 8px;
  align-content: start;
}

.correction-status-pill {
  justify-self: start;
  border-radius: 999px;
  background: #fff7df;
  color: var(--warning);
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 900;
}

.correction-status-pill.is-uploaded {
  background: #e8f5eb;
  color: var(--success);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 18px;
}

.panel {
  padding: 18px;
}

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

.accounts-summary {
  margin-top: 18px;
}

.accounts-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.accounts-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.accounts-table th,
.accounts-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  white-space: nowrap;
}

.accounts-table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.accounts-table td {
  font-weight: 700;
}

.accounts-table tfoot td {
  background: #ecfdf5;
  border-top: 2px solid var(--brand-strong);
  color: var(--brand-strong);
  font-weight: 900;
}

.quote-layout {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 14px;
}

.quote-layout > .panel {
  padding: 14px;
}

.quote-layout > aside.panel {
  padding: 12px;
  font-size: 0.82rem;
}

.quote-layout > aside.panel h2 {
  font-size: 1rem;
}

.quote-layout > aside.panel p {
  font-size: 0.78rem;
  line-height: 1.35;
}

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

.quote-form .compact-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.quote-form .field {
  gap: 5px;
  font-size: 0.76rem;
}

.quote-form input,
.quote-form textarea {
  padding: 8px 9px;
  font-size: 0.78rem;
}

.quote-form textarea {
  min-height: 58px;
}

.quote-form .helper {
  font-size: 0.7rem;
  line-height: 1.35;
}

.quote-form .button-row {
  margin-top: 4px;
}

.quote-form .button {
  width: 100%;
  padding: 9px 10px;
  font-size: 0.78rem;
}

.quote-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.quote-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.74rem;
}

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

.quote-table th {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.quote-table td strong,
.quote-table td span,
.quote-table td small {
  display: block;
}

.quote-table td span,
.quote-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
}

.quote-row.is-due td {
  background: #fffaf0;
}

.quote-row.is-converted td {
  background: #f0fbf3;
}

.quote-revision-row td {
  background: #fbfcfc;
}

.quote-revision-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #d9e7df;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.quote-revision-panel h3 {
  margin: 0;
  font-size: 0.92rem;
}

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

.quote-revision-form .field {
  gap: 5px;
  font-size: 0.74rem;
}

.quote-revision-form input {
  padding: 7px 8px;
  font-size: 0.76rem;
}

.quote-revision-history {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.quote-revision-history strong {
  color: var(--brand-strong);
  font-size: 0.76rem;
}

.quote-revision-history span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.quote-action-stack {
  display: grid;
  gap: 6px;
  min-width: 104px;
}

.quote-action-stack .ghost-button,
.quote-action-stack .danger-button {
  padding: 6px 8px;
  font-size: 0.68rem;
}

.ghost-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--brand-strong);
  font-weight: 900;
  text-decoration: none;
}

.ghost-link:hover,
.ghost-link:focus {
  text-decoration: underline;
}

.quote-status-open {
  background: #e8f2ff;
  color: #1d4ed8;
}

.quote-status-due {
  background: #fff2cc;
  color: var(--warning);
}

.quote-status-followed {
  background: #edf2f0;
  color: var(--muted);
}

.quote-status-converted {
  background: #e8f5eb;
  color: var(--success);
}

.quote-status-lost {
  background: #fbe9e7;
  color: var(--danger);
}

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.report-range-summary {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.report-filter-form,
.report-action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

.report-filter-form .field {
  gap: 4px;
  min-width: 148px;
}

.report-filter-form .field span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.report-filter-form input {
  min-width: 148px;
  padding: 9px 10px;
}

.report-action-buttons {
  justify-content: flex-end;
}

.report-client-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.report-client-card {
  --client-accent: var(--brand);
  --client-bg: #f0fdfa;
  border: 1px solid color-mix(in srgb, var(--client-accent) 32%, #ffffff);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.report-client-card:nth-child(4n + 1) {
  --client-accent: #00796b;
  --client-bg: #e6f7f2;
}

.report-client-card:nth-child(4n + 2) {
  --client-accent: #2563eb;
  --client-bg: #eff6ff;
}

.report-client-card:nth-child(4n + 3) {
  --client-accent: #b45309;
  --client-bg: #fff7ed;
}

.report-client-card:nth-child(4n + 4) {
  --client-accent: #7c3aed;
  --client-bg: #f5f3ff;
}

.report-client-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--client-bg);
  border-left: 6px solid var(--client-accent);
  padding: 10px 12px;
}

.report-client-head span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.report-client-head strong {
  color: var(--client-accent);
  font-size: 0.98rem;
}

.report-client-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.report-client-metrics span {
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  padding: 5px 8px;
  text-transform: none;
}

.report-client-metrics strong {
  color: var(--ink);
  font-size: 0.72rem;
}

.report-row {
  display: grid;
  grid-template-columns: 0.72fr 0.76fr 0.86fr 0.9fr 0.82fr 0.82fr 0.9fr 0.45fr;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding: 7px 8px;
  font-size: 0.7rem;
  font-weight: 800;
}

.report-row:nth-child(odd):not(.report-row-head) {
  background: #fbfdfc;
}

.report-row-head {
  background: #f5f7f6;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.report-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.report-row span:nth-child(5),
.report-row span:nth-child(6),
.report-row span:nth-child(7) {
  text-align: right;
}

.report-row span:nth-child(8) {
  text-align: center;
}

.report-paid-pill {
  justify-self: center;
  border-radius: 999px;
  min-width: 38px;
  padding: 4px 7px;
  font-size: 0.64rem;
}

.report-paid-pill.is-paid {
  background: #dcfce7;
  color: #166534;
}

.report-paid-pill.is-unpaid {
  background: #fee2e2;
  color: #991b1b;
}

.report-grand-total {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--brand-strong);
  border-radius: 8px;
  background: #ecfdf5;
  padding: 10px;
}

.report-grand-total div {
  display: grid;
  gap: 2px;
}

.report-grand-total span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.report-grand-total strong {
  color: var(--brand-strong);
  font-size: 0.84rem;
}

.alert-list,
.action-list,
.user-list,
.timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.alert-item {
  padding: 14px;
  border-left: 5px solid var(--warning);
  box-shadow: none;
}

.alert-item.is-overdue {
  border-left-color: var(--danger);
}

.alert-item.is-quote {
  border-left-color: #2563eb;
}

.alert-item.is-outsource {
  border-left-color: #0ea5e9;
}

.alert-item strong,
.action-item strong {
  display: block;
}

.alert-item span,
.action-item span,
.timeline span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.job-card-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px minmax(360px, auto);
  align-items: end;
  gap: 10px;
}

.job-cards-header {
  align-items: center;
  margin-bottom: 12px;
}

.job-cards-header h2 {
  flex: 0 0 auto;
}

.job-card-filter-row {
  min-width: min(980px, 100%);
}

.job-date-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
}

.job-date-filter-form .field {
  gap: 4px;
  min-width: 128px;
}

.job-date-filter-form .field span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.job-date-filter-form input {
  min-width: 128px;
  padding: 9px 10px;
}

.job-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.job-list-summary {
  display: grid;
  gap: 3px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.job-list-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.job-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.job-pagination.is-bottom {
  margin-top: 0;
}

.job-page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-page-button {
  min-width: 42px;
  padding: 8px 10px;
  font-size: 0.78rem;
}

.job-page-button.is-active {
  border-color: var(--brand-strong);
  background: #e7f6f2;
  color: var(--brand-strong);
}

.job-list-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 18px;
  padding-bottom: 8px;
}

.job-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.top-page-button {
  min-width: 72px;
}

.job-list {
  display: grid;
  gap: 24px;
}

.job-card {
  position: relative;
  overflow: hidden;
  border-color: #c8d5d0;
  border-bottom: 4px solid var(--brand);
  padding: 20px 18px 22px;
  box-shadow: 0 14px 34px rgba(23, 32, 28, 0.1);
}

.job-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--brand);
}

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

.job-card-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.job-print-button {
  padding: 7px 10px;
  font-size: 0.76rem;
}

.job-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.job-cancel-inline {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
}

.client-name,
.job-card h3 {
  color: var(--brand-strong);
  font-weight: 900;
}

.job-number {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  border-radius: 8px;
  background: var(--job-number-orange);
  color: #ffffff;
  padding: 7px 10px;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.dashboard-job-number {
  margin: 0;
  padding: 6px 9px;
  font-size: 0.76rem;
}

.dashboard-progress-cell {
  display: grid;
  gap: 5px;
  min-width: 120px;
}

.dashboard-progress-cell strong {
  color: var(--brand-strong);
  font-size: 0.82rem;
}

.dashboard-progress-cell .progress-track {
  height: 8px;
  margin-top: 0;
}

.complete-register {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.complete-register-card {
  display: grid;
  gap: 10px;
  border: 1px solid #c8d5d0;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  font-size: 0.78rem;
}

.complete-card-head,
.complete-card-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.complete-card-head {
  justify-content: space-between;
}

.complete-card-title > div {
  display: grid;
  gap: 5px;
}

.complete-save-button {
  padding: 8px 12px;
  font-size: 0.78rem;
}

.complete-description,
.complete-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.complete-description {
  padding: 9px 10px;
}

.complete-description span,
.complete-cell span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.complete-description p {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

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

.complete-cell {
  min-width: 0;
  padding: 8px;
}

.complete-cell strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.complete-cell input,
.complete-cell select {
  margin-top: 6px;
  border-radius: 6px;
  padding: 7px 8px;
  font-size: 0.78rem;
}

.complete-reminder-cell {
  display: grid;
  gap: 6px;
}

.complete-reminder-cell .ghost-button {
  padding: 7px 8px;
  font-size: 0.74rem;
}

.complete-reminder-log-cell {
  grid-column: 4 / 6;
}

.status-pill {
  padding: 8px 10px;
  font-size: 0.78rem;
}

.status-pending {
  background: #fff6d8;
  color: var(--warning);
}

.status-progress {
  background: #e5f3ef;
  color: var(--brand-strong);
}

.status-complete {
  background: #e8f5eb;
  color: var(--success);
}

.status-cancelled {
  background: #edf2f0;
  color: var(--muted);
}

.status-overdue {
  background: #fbe9e7;
  color: var(--danger);
}

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

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

.meta-item {
  min-width: 0;
}

.meta-item span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.meta-item strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.details {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.details summary {
  color: var(--brand-strong);
  cursor: pointer;
  font-weight: 800;
}

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

.workflow-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfc;
}

.workflow-step span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.workflow-step strong {
  display: block;
  margin-top: 6px;
}

.progress-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 14px;
}

.progress-header,
.department-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-header span,
.department-progress-top span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.progress-header strong {
  display: block;
  margin-top: 4px;
  font-size: 1.8rem;
}

.progress-track {
  height: 12px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eeeb;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--progress-light);
}

.department-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.department-progress-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.department-progress-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.department-progress-card p span {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
}

.department-progress-card .department-deadline {
  color: var(--ink);
  font-weight: 800;
}

.instruction-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.instruction-list > strong,
.instruction-form h4 {
  margin: 0;
}

.instruction-list > p {
  margin: 0;
}

.instruction-item {
  border-left: 4px solid var(--info);
  border-radius: 8px;
  background: #eef6fa;
  padding: 10px;
}

.instruction-item p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.instruction-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.instruction-form {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.instruction-form textarea {
  min-height: 88px;
}

.pm-private-panel {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

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

.pm-instruction-forms {
  margin-top: 12px;
}

.private-note-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.private-note-block h4 {
  margin: 0 0 10px;
}

.private-note-block > p {
  margin: 0;
  color: var(--muted);
}

.progress-history {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.progress-history h4 {
  margin: 0;
}

.progress-update-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.progress-update-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.progress-update-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.progress-update-item p {
  margin: 10px 0 0;
  color: var(--ink);
}

.artwork-gallery {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.artwork-gallery h4 {
  margin: 0;
}

.artwork-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

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

.artwork-thumb-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  align-content: start;
}

.artwork-thumb {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  text-align: left;
}

.artwork-thumb:hover,
.artwork-thumb:focus {
  border-color: var(--brand);
}

.artwork-thumb-preview {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #edf2f0;
  color: var(--brand-strong);
  font-weight: 900;
}

.artwork-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artwork-thumb strong,
.artwork-thumb small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artwork-thumb strong {
  margin-top: 8px;
  font-size: 0.88rem;
}

.artwork-thumb small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.artwork-remove {
  width: 100%;
  padding: 8px 10px;
}

.artwork-correction-note {
  border: 1px solid #d7e7df;
  border-radius: 8px;
  background: #f4fbf7;
  padding: 8px;
}

.artwork-correction-note strong {
  display: block;
  color: var(--brand-strong);
  font-size: 0.76rem;
}

.artwork-correction-note p {
  margin: 5px 0;
  font-size: 0.78rem;
  font-weight: 800;
}

.artwork-correction-note span,
.artwork-correction-empty {
  color: var(--muted);
  font-size: 0.68rem;
}

.artwork-revision-note {
  display: grid;
  gap: 4px;
  border: 1px solid #cce6d3;
  border-radius: 8px;
  background: #f0fbf3;
  padding: 8px;
}

.artwork-revision-note strong {
  color: var(--success);
  font-size: 0.76rem;
}

.artwork-revision-note span,
.artwork-revision-note small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.artwork-revision-note .ghost-button {
  justify-self: start;
  padding: 6px 8px;
  font-size: 0.72rem;
}

.artwork-instruction-form {
  display: grid;
  gap: 7px;
}

.artwork-instruction-form textarea {
  min-height: 58px;
}

.artwork-instruction-form .ghost-button {
  justify-self: start;
  padding: 7px 9px;
  font-size: 0.76rem;
}

.artwork-revision-form {
  display: grid;
  gap: 7px;
  border: 1px solid #f0dfb2;
  border-radius: 8px;
  background: #fffaf0;
  padding: 8px;
}

.artwork-revision-form .field {
  gap: 4px;
  font-size: 0.72rem;
}

.artwork-revision-form input {
  padding: 7px 8px;
  font-size: 0.76rem;
}

.artwork-revision-form .button {
  justify-self: start;
  padding: 7px 9px;
  font-size: 0.76rem;
}

.artwork-revision-form.is-dashboard {
  background: #ffffff;
}

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

.artwork-modal {
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto;
  width: min(980px, 100%);
  max-height: min(860px, 94vh);
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

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

.artwork-modal footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.artwork-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.artwork-modal h3 {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.export-modal {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  width: min(860px, 100%);
  max-height: min(760px, 92vh);
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

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

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

.export-modal h3 {
  margin: 4px 0 0;
}

.export-body {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 14px;
}

.export-json {
  min-height: 260px;
  resize: none;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.artwork-stage {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: auto;
  padding: 14px;
  background: #f6f7f8;
}

.artwork-preview-image {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

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

.artwork-preview-empty {
  display: grid;
  place-items: center;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 28px;
  text-align: center;
}

.artwork-preview-empty strong {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 8px;
  background: #edf2f0;
  color: var(--brand-strong);
}

.artwork-preview-empty h4 {
  margin: 14px 0 0;
  overflow-wrap: anywhere;
}

.artwork-preview-empty p,
.artwork-preview-empty span {
  color: var(--muted);
}

.department-assignment-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.department-assignment-card strong {
  display: block;
  margin-bottom: 4px;
}

.actions-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.action-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfc;
}

.action-box h4 {
  margin: 0 0 12px;
}

.action-box textarea {
  min-height: 88px;
}

.purchase-request-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

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

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

.purchase-request-head strong,
.purchase-request-head span {
  display: block;
}

.purchase-request-head > div > span,
.purchase-quote-summary,
.quote-file-list {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.purchase-quote-summary {
  display: grid;
  gap: 5px;
}

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

.supplier-comparison-card,
.supplier-quote-entry {
  display: grid;
  gap: 8px;
  border: 1px solid #dfe7e2;
  border-radius: 8px;
  background: #f9fcfb;
  padding: 10px;
}

.supplier-comparison-card strong,
.supplier-comparison-card span,
.supplier-quote-entry h5 {
  display: block;
}

.supplier-comparison-card strong,
.supplier-quote-entry h5 {
  margin: 0;
  color: var(--brand-strong);
  font-size: 0.86rem;
  font-weight: 900;
}

.supplier-comparison-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.supplier-comparison-card.is-approved {
  border-color: #8bd19e;
  background: #effaf1;
}

.quote-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-file-list a,
.quote-file-list span {
  border-radius: 999px;
  background: #edf2f0;
  color: var(--brand-strong);
  padding: 6px 8px;
  text-decoration: none;
}

.purchase-request-form {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.purchase-status-needs-quote {
  background: #fff6d8;
  color: var(--warning);
}

.purchase-status-quote-sent {
  background: #e6f0ff;
  color: var(--info);
}

.purchase-status-approved {
  background: #e8f5eb;
  color: var(--success);
}

.outsource-entry-panel {
  grid-column: 1 / -1;
  border: 1px solid #bfe8ce;
  border-radius: 8px;
  background: #effdf3;
  padding: 0;
  overflow: hidden;
}

.outsource-entry-panel summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
  cursor: pointer;
  color: var(--brand-strong);
  padding: 12px 14px;
  font-weight: 900;
  list-style: none;
}

.outsource-entry-panel summary::-webkit-details-marker {
  display: none;
}

.outsource-entry-panel summary::before {
  content: "›";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #d7f5df;
  color: var(--brand-strong);
  font-size: 1rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.18s ease;
}

.outsource-entry-panel[open] summary::before {
  transform: rotate(90deg);
}

.outsource-entry-panel summary small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.outsource-entry-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid #cdeed8;
  padding: 12px 14px 14px;
}

.outsource-entry-list,
.outsource-action-list,
.outsource-summary-list {
  display: grid;
  gap: 10px;
}

.outsource-entry-row,
.outsource-action-card,
.outsource-summary-card,
.outsource-inline-form {
  display: grid;
  gap: 10px;
  border: 1px solid #cfe8d8;
  border-radius: 8px;
  background: #fbfffc;
  padding: 12px;
}

.outsource-entry-head,
.outsource-summary-head,
.outsource-summary-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.outsource-summary {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.outsource-summary h4,
.outsource-inline-form h4 {
  margin: 0;
}

.outsource-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

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

.outsource-meta-item {
  display: grid;
  gap: 3px;
  border: 1px solid #e0ece8;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.outsource-meta-item span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.outsource-meta-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}

.outsource-status-quote-needed {
  background: #fff6d8;
  color: var(--warning);
}

.outsource-status-quote-uploaded {
  background: #e6f0ff;
  color: var(--info);
}

.outsource-status-approved,
.outsource-status-ordered,
.outsource-status-in-production {
  background: #e9f7ef;
  color: var(--success);
}

.outsource-status-received {
  background: #dff6e5;
  color: var(--success);
}

.outsource-status-cancelled {
  background: #f3e5e2;
  color: var(--danger);
}

.completion-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.completion-check {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.completion-check span {
  display: block;
  color: var(--warning);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.completion-check.is-complete span {
  color: var(--success);
}

.completion-check strong {
  display: block;
  margin-top: 4px;
}

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

.artwork-upload-status {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 10px;
}

.artwork-upload-status strong {
  color: var(--brand-strong);
  font-size: 0.82rem;
}

.artwork-upload-status div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.artwork-upload-status span {
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 8px;
}

.button {
  background: var(--brand);
  color: #ffffff;
}

.button:hover {
  background: var(--brand-strong);
}

.ghost-button {
  background: #edf2f0;
  color: var(--ink);
}

.danger-button {
  background: #fbe9e7;
  color: var(--danger);
}

.field {
  display: grid;
  gap: 7px;
}

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

.checkbox-group {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.material-section {
  --material-accent: #048a46;
  --material-bg: #f7fbf8;
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--material-accent) 24%, #dfe7e2);
  border-left: 6px solid var(--material-accent);
  border-radius: 8px;
  background: var(--material-bg);
  padding: 12px;
}

.material-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.material-section-header strong,
.material-section-header .helper {
  display: block;
}

.material-section-header strong {
  color: var(--material-accent);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.material-section-standard {
  --material-accent: #8b6a13;
  --material-bg: #fffaf0;
}

.material-section-production {
  --material-accent: #0f8a5f;
  --material-bg: #f0fbf6;
}

.material-section-fabrication {
  --material-accent: #6b7280;
  --material-bg: #f6f7f8;
}

.material-section-stamp {
  --material-accent: #7c3aed;
  --material-bg: #f6f0ff;
}

.material-section-laser {
  --material-accent: #be123c;
  --material-bg: #fff1f4;
}

.material-section-hardware {
  --material-accent: #d97706;
  --material-bg: #fff8ed;
}

.material-section-sublimation {
  --material-accent: #0d9488;
  --material-bg: #eefcf9;
}

.material-section-clothing {
  --material-accent: #b91c1c;
  --material-bg: #fff3f3;
}

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

.material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.simple-material-card {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 12px;
}

.simple-material-card strong,
.simple-material-card .helper {
  display: block;
}

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

.simple-material-grid .check-item {
  border: 1px solid color-mix(in srgb, var(--material-accent) 18%, #ffffff);
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  font-size: 0.84rem;
}

.material-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 10px;
}

.material-section .material-card {
  background: rgba(255, 255, 255, 0.88);
}

.material-main {
  font-size: 0.9rem;
}

.material-options {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.material-options summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

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

.material-option-group {
  display: grid;
  gap: 6px;
}

.material-option-title {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.material-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.material-input-grid {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.material-input-field {
  gap: 5px;
  margin-top: 0;
  font-size: 0.74rem;
}

.material-input-field input {
  padding: 8px;
  font-size: 0.82rem;
}

.material-option {
  font-size: 0.78rem;
  font-weight: 700;
}

.material-allocation-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.material-allocation-panel h3 {
  margin: 0;
  font-size: 0.98rem;
}

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

.material-allocation-row {
  display: none;
  grid-template-columns: minmax(170px, 1.1fr) minmax(120px, 0.55fr) minmax(0, 3fr) auto;
  align-items: end;
  gap: 8px;
  border: 1px solid #d9ebe6;
  border-radius: 8px;
  background: #f7fffb;
  padding: 10px;
}

.material-allocation-row.is-active {
  display: grid;
}

.material-allocation-name {
  min-width: 0;
}

.material-allocation-name strong,
.material-allocation-name span {
  display: block;
}

.material-allocation-name span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.material-allocation-row .field {
  gap: 4px;
  font-size: 0.72rem;
}

.material-allocation-row input,
.material-allocation-row select {
  padding: 8px;
  font-size: 0.8rem;
}

.material-stock-lines {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.material-stock-line {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(2, minmax(100px, 0.8fr)) auto;
  align-items: end;
  gap: 8px;
}

.material-stock-add,
.material-stock-remove {
  padding: 8px 10px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.material-summary {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.material-summary h4 {
  margin: 0 0 10px;
}

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

.material-summary-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 9px;
}

.material-summary-item strong,
.material-summary-item span {
  display: block;
}

.material-summary-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.check-item input {
  width: auto;
}

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

.stock-tools-panel {
  align-self: start;
}

.stock-report-launch-card {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid #bfe8ce;
  border-radius: 8px;
  background: linear-gradient(135deg, #f4fcf7 0%, #e7f7ed 100%);
  padding: 14px;
}

.stock-report-launch-card h3 {
  margin: 0;
  color: var(--brand-strong);
  font-size: 1rem;
}

.stock-report-launch-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.stock-report-launch-card .button {
  width: 100%;
}

.stock-search-box {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid #bfe8ce;
  border-radius: 8px;
  background: #effaf2;
  padding: 12px;
}

.stock-search-box h3 {
  margin: 0;
  color: var(--brand-strong);
  font-size: 0.95rem;
}

.stock-search-box p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.stock-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.stock-search-empty {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  border: 1px dashed #bfe8ce;
  border-radius: 8px;
  background: #f8fffa;
  padding: 14px;
  color: var(--brand-strong);
  font-size: 0.88rem;
}

.stock-search-empty span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.stock-variant-fields {
  display: grid;
  gap: 10px;
}

.stock-form textarea {
  min-height: 78px;
}

.stock-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.stock-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.stock-ledger-table {
  min-width: 720px;
}

.stock-table th,
.stock-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  white-space: nowrap;
}

.stock-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stock-table td {
  font-size: 0.84rem;
  font-weight: 700;
}

.stock-table td:nth-child(2) {
  max-width: 240px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.stock-table tr.is-inactive-stock td {
  background: #fafafa;
  color: var(--muted);
}

.stock-actions-cell {
  text-align: right;
}

.stock-action-button {
  padding: 7px 10px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.stock-manager-row td {
  background: #f8fbfa;
  padding: 12px;
  white-space: normal;
}

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

.stock-manager-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stock-manager-header h3,
.stock-manage-form h4 {
  margin: 0;
}

.stock-manager-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: normal;
}

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

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

.stock-manage-form textarea {
  min-height: 72px;
}

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

.stock-report-panel {
  display: grid;
  gap: 16px;
}

.stock-report-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.stock-report-page-header h2 {
  margin: 4px 0 0;
  color: var(--brand-strong);
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
}

.stock-report-page-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.stock-report-page-eyebrow {
  display: inline-block;
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stock-report-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.stock-report-note {
  display: grid;
  gap: 4px;
  border: 1px solid #d4eadc;
  border-radius: 8px;
  background: #f5fcf7;
  padding: 12px 14px;
}

.stock-report-note strong {
  color: var(--brand-strong);
  font-size: 0.82rem;
}

.stock-report-note span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.stock-report-section {
  display: grid;
  gap: 8px;
}

.stock-report-section h3 {
  margin: 0;
  color: var(--brand-strong);
  font-size: 0.98rem;
}

.stock-report-section p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.stock-report-table td:nth-child(2) {
  max-width: 280px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.stock-report-detail-table td:nth-child(4),
.stock-report-detail-table td:nth-child(5),
.stock-report-detail-table td:nth-child(6),
.stock-report-detail-table td:nth-child(7),
.stock-report-detail-table td:nth-child(8),
.stock-report-detail-table td:nth-child(9),
.stock-report-detail-table td:nth-child(10) {
  text-align: right;
}

.stock-delta-positive {
  color: var(--success);
  font-weight: 900;
}

.stock-delta-negative {
  color: var(--danger);
  font-weight: 900;
}

.stock-ledger-panel {
  margin-top: 18px;
}

.stock-status-ok {
  background: #e8f5eb;
  color: var(--success);
}

.stock-status-low {
  background: #fff6d8;
  color: var(--warning);
}

.stock-status-out {
  background: #fbe9e7;
  color: var(--danger);
}

.stock-status-inactive {
  background: #edf2f0;
  color: var(--muted);
}

.stock-qty-in {
  color: var(--success);
}

.stock-qty-out {
  color: var(--danger);
}

.helper {
  color: var(--muted);
  font-size: 0.86rem;
}

.notice {
  margin-bottom: 16px;
  border: 1px solid #f4d47d;
  border-radius: 8px;
  background: #fff8df;
  color: #6e4d00;
  padding: 12px 14px;
  font-weight: 700;
}

.toast-notice {
  position: fixed;
  z-index: 10000;
  top: 50%;
  left: 50%;
  width: min(420px, calc(100vw - 32px));
  margin: 0;
  border-color: rgba(4, 138, 70, 0.25);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 24px 56px rgba(23, 32, 28, 0.22);
  transform: translate(-50%, -50%);
  padding: 0;
}

.toast-title {
  display: block;
  border-bottom: 1px solid var(--line);
  background: #ecfdf5;
  color: var(--brand-strong);
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toast-message {
  margin: 0;
  padding: 16px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.4;
}

.toast-close {
  margin: 0 16px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  padding: 9px 14px;
  font-weight: 900;
}

.locked {
  color: var(--muted);
  font-weight: 800;
}

.tiny-pill {
  padding: 6px 8px;
  background: #edf2f0;
  color: var(--muted);
  font-size: 0.74rem;
}

.empty-state {
  padding: 36px 18px;
  text-align: center;
}

.user-item,
.action-item,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfc;
}

.user-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.user-main {
  min-width: 0;
}

.demo-password-box {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  border: 1px solid #f4d47d;
  border-radius: 8px;
  background: #fff8df;
  padding: 12px;
}

.demo-password-box p {
  margin: 0;
  font-size: 0.84rem;
}

.password-reset-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

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

.ai-chatbot {
  --chat-green: #048a46;
  --chat-green-dark: #052d1d;
  --chat-mustard: #f9a900;
  --chat-mustard-soft: #fff4c9;
  --chat-ink: #111813;
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  left: auto;
  top: auto;
  bottom: clamp(14px, 3vw, 30px);
  transform: none;
  z-index: 90;
  display: grid;
  justify-items: end;
  gap: 12px;
  pointer-events: none;
}

.ai-chatbot * {
  box-sizing: border-box;
}

.ai-chatbot-launcher,
.ai-chatbot-window {
  pointer-events: auto;
}

.ai-chatbot-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--chat-green), #0d6f3d);
  color: #ffffff;
  box-shadow: 0 18px 48px rgba(4, 138, 70, 0.28);
  padding: 10px 14px 10px 10px;
}

.ai-chatbot-launcher-mark {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--chat-mustard);
  color: #1f1f1f;
  padding: 0 8px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.ai-chatbot-launcher-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.ai-chatbot-launcher-copy strong,
.ai-chatbot-launcher-copy small {
  line-height: 1;
}

.ai-chatbot-launcher-copy strong {
  font-size: 0.9rem;
}

.ai-chatbot-launcher-copy small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  font-weight: 800;
}

.ai-chatbot-window {
  position: absolute;
  right: 0;
  left: auto;
  top: auto;
  bottom: calc(100% + 12px);
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto;
  width: min(410px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 160px));
  overflow: hidden;
  border: 1px solid rgba(4, 138, 70, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(5, 45, 29, 0.22);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.ai-chatbot.is-open .ai-chatbot-window {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.ai-chatbot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(249, 169, 0, 0.18), transparent 44%),
    linear-gradient(135deg, var(--chat-green-dark), #111813);
  color: #ffffff;
  padding: 16px;
}

.ai-chatbot-eyebrow {
  display: inline-block;
  color: var(--chat-mustard);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-chatbot-header h2 {
  margin: 4px 0 0;
  font-size: 1.22rem;
  line-height: 1.1;
}

.ai-chatbot-header p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 750;
}

.ai-chatbot-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-chatbot-icon-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 7px 9px;
  font-size: 0.76rem;
  font-weight: 900;
}

.ai-chatbot-messages {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(4, 138, 70, 0.06), transparent 160px),
    #fbfdfc;
  padding: 14px;
}

.ai-chatbot-message {
  display: grid;
  gap: 5px;
  max-width: 88%;
}

.ai-chatbot-message span {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-chatbot-message p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--chat-ink);
  padding: 10px 11px;
  font-size: 0.86rem;
  line-height: 1.45;
  box-shadow: 0 10px 24px rgba(17, 24, 19, 0.06);
}

.ai-chatbot-message.is-user {
  justify-self: end;
}

.ai-chatbot-message.is-user span {
  justify-self: end;
}

.ai-chatbot-message.is-user p {
  border-color: rgba(4, 138, 70, 0.24);
  background: #eaf7f0;
}

.ai-chatbot-message.is-assistant p strong {
  color: var(--chat-green);
}

.ai-chatbot-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 10px 12px;
}

.ai-chatbot-prompts button {
  flex: 0 0 auto;
  border: 1px solid rgba(4, 138, 70, 0.2);
  border-radius: 999px;
  background: #f6fbf8;
  color: var(--chat-green-dark);
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.ai-chatbot-prompts button.is-active {
  background: #dff5e7;
  border-color: rgba(4, 138, 70, 0.42);
  color: var(--chat-green-dark);
}

.ai-chatbot-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 12px;
}

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

.staff-chat-channel-field {
  display: none;
  grid-column: 1 / -1;
}

.staff-chat-channel-field span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-chatbot-form input,
.ai-chatbot-form select {
  min-width: 0;
  border-color: rgba(4, 138, 70, 0.22);
  background: #fbfffd;
}

.staff-chat-job-select {
  grid-column: 1 / -1;
}

.staff-chat-empty {
  border: 1px dashed #cbded4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 14px;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.ai-chatbot-form button {
  border: 0;
  border-radius: 8px;
  background: var(--chat-mustard);
  color: #1f1f1f;
  padding: 0 14px;
  font-weight: 950;
}

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

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

  .quote-layout {
    grid-template-columns: 1fr;
  }

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

  .design-correction-card {
    grid-template-columns: 1fr;
  }

  .workflow-strip,
  .department-progress-grid,
  .pm-private-grid,
  .pm-instruction-forms,
  .completion-checklist,
  .stock-manager-grid,
  .complete-card-grid,
  .dashboard-detail-grid,
  .design-correction-main,
  .artwork-thumbs,
  .outsource-meta-grid,
  .simple-material-grid,
  .material-grid,
  .material-allocation-row,
  .material-stock-line,
  .material-input-grid,
  .stock-variant-input-grid,
  .supplier-comparison-grid,
  .supplier-quote-entry-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .ai-chatbot {
    right: 10px;
    left: auto;
    top: auto;
    bottom: 10px;
    transform: none;
  }

  .ai-chatbot-window {
    right: 0;
    left: auto;
    top: auto;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 96px);
    bottom: 64px;
    transform-origin: bottom right;
  }

  .ai-chatbot-launcher-copy small {
    display: none;
  }

  .ai-chatbot-prompts {
    display: none;
  }

  .staff-chat-channel-field {
    display: block;
  }
}

@media (max-width: 680px) {
  .topbar,
  .section-header,
  .job-list-toolbar,
  .job-list-footer,
  .job-pagination,
  .purchase-request-head,
  .job-card header {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .user-switcher {
    grid-template-columns: 1fr;
    justify-content: stretch;
    min-width: 0;
  }

  .preview-switcher {
    justify-self: stretch;
  }

  main {
    padding-top: 18px;
  }

  .stats-grid,
  .quote-month-grid,
  .filters,
  .job-card-filter-row,
  .job-grid,
  .form-grid,
  .password-reset-form,
  .compact-grid,
  .stock-manager-grid,
  .workflow-strip,
  .department-progress-grid,
  .pm-private-grid,
  .pm-instruction-forms,
  .completion-checklist,
  .complete-card-grid,
  .dashboard-detail-grid,
  .design-correction-main,
  .artwork-thumbs,
  .outsource-meta-grid,
  .simple-material-grid,
  .material-grid,
  .material-allocation-row,
  .material-stock-line,
  .material-summary-grid,
  .material-option-grid,
  .material-input-grid,
  .stock-variant-input-grid,
  .supplier-comparison-grid,
  .supplier-quote-entry-grid,
  .checkboxes {
    grid-template-columns: 1fr;
  }

  .stat-card strong {
    font-size: 1.7rem;
  }

  .job-date-filter-form {
    justify-content: flex-start;
  }

  .job-date-filter-form .field {
    flex: 1 1 136px;
  }

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

  .stock-report-page-header,
  .stock-report-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .complete-reminder-log-cell {
    grid-column: auto;
  }
}

@media print {
  body.is-printing-report {
    background: #ffffff;
  }

  body.is-printing-report .topbar,
  body.is-printing-report .tabs,
  body.is-printing-report .section-header,
  body.is-printing-report .stats-grid,
  body.is-printing-report .content-grid,
  body.is-printing-report .dashboard-expanded-panel:not(.reports-panel),
  body.is-printing-report .report-toolbar,
  body.is-printing-report .ai-chatbot {
    display: none !important;
  }

  body.is-printing-report main {
    padding: 0;
  }

  body.is-printing-report .reports-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }

  body.is-printing-report .dashboard-expanded-header {
    margin-bottom: 10px;
  }

  body.is-printing-report .accounts-table-wrap {
    overflow: visible;
  }

  body.is-printing-report .report-client-list {
    gap: 8px;
  }

  body.is-printing-report .report-client-card {
    break-inside: avoid;
    box-shadow: none;
  }

  body.is-printing-report .report-client-head {
    padding: 6px 8px;
  }

  body.is-printing-report .report-row {
    grid-template-columns: 0.75fr 0.8fr 0.9fr 0.95fr 0.9fr 0.9fr 0.95fr 0.5fr;
    font-size: 8px;
    padding: 4px 3px;
  }

  body.is-printing-report .report-row-head {
    font-size: 7px;
  }

  body.is-printing-report .report-grand-total {
    break-inside: avoid;
    padding: 7px;
  }

  body.is-printing-stock-report {
    background: #ffffff;
  }

  body.is-printing-stock-report .topbar,
  body.is-printing-stock-report .tabs,
  body.is-printing-stock-report .section-header,
  body.is-printing-stock-report .stock-stats,
  body.is-printing-stock-report .content-grid,
  body.is-printing-stock-report .stock-ledger-panel,
  body.is-printing-stock-report .stock-report-page-header .header-actions,
  body.is-printing-stock-report .stock-report-header .report-toolbar,
  body.is-printing-stock-report .ai-chatbot {
    display: none !important;
  }

  body.is-printing-stock-report main {
    padding: 0;
  }

  body.is-printing-stock-report .stock-report-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }

  body.is-printing-stock-report .stock-report-stats {
    margin-bottom: 8px;
  }

  body.is-printing-stock-report .stock-report-table {
    min-width: 0;
  }

  body.is-printing-stock-report .stock-report-table th,
  body.is-printing-stock-report .stock-report-table td {
    padding: 4px 5px;
    font-size: 8px;
  }

  body.is-printing-stock-report .stock-report-note {
    break-inside: avoid;
  }

  body.is-printing-stock-report .stock-report-section {
    break-inside: avoid;
  }

  body.is-printing-job-card {
    background: #ffffff;
  }

  body.is-printing-job-card .topbar,
  body.is-printing-job-card .tabs,
  body.is-printing-job-card .section-header,
  body.is-printing-job-card .filters,
  body.is-printing-job-card .job-list-toolbar,
  body.is-printing-job-card .job-pagination,
  body.is-printing-job-card .job-card:not(.is-print-target),
  body.is-printing-job-card .job-card.is-print-target .job-card-header-actions button,
  body.is-printing-job-card .job-card.is-print-target > .action-box,
  body.is-printing-job-card .ai-chatbot {
    display: none !important;
  }

  body.is-printing-job-card main {
    padding: 0;
  }

  body.is-printing-job-card .job-list {
    display: block;
  }

  body.is-printing-job-card .job-card.is-print-target {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }

  body.is-printing-job-card .job-card.is-print-target::before {
    display: none;
  }

  body.is-printing-job-card .job-card.is-print-target .details {
    display: block;
  }
}
