/* ERP presentation system: restrained surfaces, dense records, clear hierarchy. */
:root {
  --ink: #202939;
  --muted: #64748b;
  --line: #e6e9f0;
  --paper: #f5f6fa;
  --navy: #101c32;
  --accent: #087f78;
  --tint: #e5f4f0;
  --brand-mint: #39ddb1;
  --radius: 10px;
}
body {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 13px;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
button:hover {
  background: #06665f;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #39ddb1;
  outline-offset: 2px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #a5eed9;
  outline-offset: 1px;
  border-color: #087f78;
}
input,
select,
textarea {
  color: var(--ink);
  border: 1px solid #dce1eb;
  border-radius: 6px;
  min-height: 38px;
  background: #fff;
  padding: 8px 10px;
  font-size: 12px;
}
input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: 0;
  accent-color: var(--accent);
}
input[readonly] {
  background: #f8f9fc;
  color: #637087;
}
textarea {
  resize: vertical;
}
label {
  font-size: 11px;
  font-weight: 600;
  color: #505e73;
  margin-top: 10px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 650;
  color: var(--muted);
}
/* Application rail */
.sidebar {
  width: 240px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  border-right: 1px solid var(--line);
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow: visible;
  scrollbar-gutter: auto;
}
.workspace-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  letter-spacing: -0.7px;
  color: var(--ink);
  font-weight: 750;
}
.sidebar > .workspace-brand {
  padding: 22px 22px 16px;
  margin: 0;
}
.workspace-brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0;
  font-weight: 450;
  color: #94a0b2;
  margin-top: 0;
}
.nasaq-wordmark {
  display: block;
  width: 172px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
.login-wordmark {
  width: 200px;
  margin-bottom: 20px;
}
.login-story img.brand-mark {
  width: 44px;
  height: 44px;
  background: var(--navy);
  box-shadow: none;
  object-fit: cover;
}
.brand-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--accent);
  color: white;
  font-size: 24px;
  font-weight: 800;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 3px 8px #4f46e51a;
}
.brand-mark > span {
  width: 5px;
  height: 5px;
  border-radius: 2px;
  position: absolute;
  right: 5px;
  top: 5px;
  background: #c4bfff;
}
.workspace-switcher {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: #fafbfe;
  margin: 4px 16px 14px;
  padding: 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 650;
}
.workspace-switcher > span:nth-child(2) {
  flex: 1;
}
.workspace-switcher small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  margin-top: 1px;
}
.company-icon {
  font-size: 23px;
  color: #8993a8;
}
.workspace-navigation {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #dfe3ed transparent;
  padding: 0 12px 20px;
  min-height: 0;
}
.nav-group-label {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.2px;
  color: #9aa3b4;
  padding: 18px 12px 7px;
}
.nav-group-label:first-child {
  padding-top: 4px;
}
.sidebar button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 35px;
  margin: 2px 0;
  padding: 8px 11px;
  width: 100%;
  background: transparent;
  color: #607086;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  border: 0;
  border-radius: 6px;
}
.sidebar button:hover {
  background: #f6f7fb;
  color: var(--ink);
}
.sidebar button[aria-current="page"] {
  background: var(--tint);
  color: #5146d6;
  font-weight: 650;
  box-shadow: inset 3px 0 #655aeb;
}
.nav-symbol {
  display: inline-flex;
  width: 17px;
  flex-shrink: 0;
}
.nav-symbol svg {
  width: 17px;
  height: 17px;
}
.sidebar-menu {
  background: transparent;
  margin: 2px 0;
}
.sidebar-menu summary {
  padding: 8px 11px;
  min-height: 35px;
  font-size: 11px;
  font-weight: 500;
  color: #607086;
}
.sidebar-menu summary:before {
  content: "▥";
  display: inline-block;
  font-size: 17px;
  width: 27px;
  vertical-align: middle;
  color: #8c97aa;
}
.sidebar-menu button {
  padding: 7px 12px 7px 28px;
  font-size: 10px;
}
.sidebar-menu .nav-symbol {
  width: 13px;
}
.sidebar-menu .nav-symbol svg {
  width: 13px;
  height: 13px;
}
.sidebar-account {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.user-badge {
  position: relative;
  flex: 1;
  padding: 0 0 0 37px;
  margin: 0;
  background: transparent;
  color: #3c475b;
  font-size: 11px;
  border: 0;
  border-radius: 0;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}
.user-badge:before {
  content: attr(data-initials);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  background: #eef0f6;
  color: #66738e;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 650;
}
.user-badge .badge {
  background: transparent;
  color: #98a2b3;
  padding: 0;
  font-size: 10px;
  font-weight: 400;
  margin: 0;
  text-transform: capitalize;
}
.sidebar-account > button {
  width: 28px;
  min-height: 28px;
  padding: 5px;
  flex-shrink: 0;
}
.sidebar-account svg {
  width: 18px;
  height: 18px;
}
/* Command bar and page context */
.app-main {
  margin-left: 240px;
  padding: 0 30px 40px;
  min-width: 0;
}
.workspace-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -30px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.workspace-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #929caf;
}
.workspace-breadcrumb strong {
  color: #526078;
  font-weight: 500;
}
.breadcrumb-slash {
  margin: 0 10px;
  color: #c7cdd7;
}
.workspace-tools {
  display: flex;
  gap: 16px;
  align-items: center;
}
.workspace-search-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fc;
  color: #a0a9b9;
  border: 1px solid #edf0f5;
  border-radius: 6px;
  min-width: 228px;
  font-size: 11px;
  font-weight: 400;
  padding: 7px 10px;
  text-align: left;
}
.workspace-search-button:hover {
  background: #f0f2f9;
}
.workspace-search-button svg {
  width: 14px;
  height: 14px;
}
.workspace-search-button > span {
  flex: 1;
}
kbd {
  font-family: inherit;
  font-size: 9px;
  border: 1px solid #dfe3ed;
  border-radius: 3px;
  padding: 1px 4px;
  background: #fff;
  color: #a0a9b9;
}
.toolbar-control {
  background: white;
  border: 1px solid var(--line);
  color: #78849a;
  font-size: 10px;
  padding: 6px 9px;
}
.toolbar-control:hover,
.toolbar-control[aria-pressed="true"] {
  background: var(--tint);
  color: var(--accent);
  border-color: #d9d5ff;
}
.workspace-avatar {
  width: 28px;
  height: 28px;
  background: #eeeaff;
  color: #7660b9;
  border: 1px solid #e4dbfb;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 650;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 28px 0 22px;
}
.page-heading h1 {
  font-size: 25px;
  letter-spacing: -0.7px;
  font-weight: 650;
  line-height: 1.3;
  margin: 0;
}
.page-description {
  color: #8b96a9;
  font-size: 11px;
  margin: 6px 0 0;
}
.workspace-date {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  color: #78849a;
}
.workspace-date:before {
  content: "▦";
  margin-right: 8px;
  color: #9ca6b6;
}
.menu-toggle {
  display: none;
}
.workspace-backdrop {
  position: fixed;
  inset: 0;
  background: #17203966;
  z-index: 35;
  border-radius: 0;
}
/* Dashboard: metrics, registers and operations */
.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
}
.dashboard-view-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
}
.view-indicator {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 2px;
}
.scope-label {
  font-size: 9px;
  font-weight: 400;
  color: #96a0b2;
  margin-left: 7px;
  padding-left: 14px;
  border-left: 1px solid #dce1eb;
}
.dashboard-actions {
  display: flex;
  gap: 8px;
}
.dashboard-actions button {
  font-size: 10px;
  padding: 8px 12px;
}
.secondary-button {
  background: #fff;
  border: 1px solid #dfe3ed;
  color: #657189;
}
.secondary-button:hover {
  background: #f3f4fa;
  color: var(--ink);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}
.dashboard-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card,
.chart-card,
.table-wrap {
  background: #fff;
  box-shadow: 0 2px 3px #1c285303;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card {
  padding: 19px 22px;
  min-width: 0;
}
.card h3 {
  font-size: 11px;
  color: #7c879b;
  font-weight: 500;
  margin: 0 0 12px;
}
.card strong {
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.6px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.card p {
  font-size: 10px;
  color: #68758b;
  margin: 8px 0 0;
}
.dashboard-kpis .card {
  position: relative;
  padding: 21px 24px 23px;
  overflow: hidden;
}
.metric-icon {
  float: right;
  font-size: 17px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  background: #f5f6fb;
  color: #8e9ab0;
  border-radius: 7px;
  margin-top: -3px;
}
.kpi-line {
  display: block;
  height: 3px;
  background: #eaf0f6;
  margin-top: 20px;
  border-radius: 2px;
  width: 32px;
}
.dashboard-kpis .card:nth-child(2) .kpi-line {
  background: #28b79b;
}
.dashboard-kpis .card:nth-child(3) .kpi-line {
  background: #e5b15d;
}
.card.kpi-featured {
  background: linear-gradient(112deg, #252d58, #353f72);
  border-color: #343e6c;
  color: white;
}
.kpi-featured h3 {
  color: #b7bfdf;
}
.kpi-featured p {
  color: #a6b0d3;
}
.kpi-featured .metric-icon {
  background: #ffffff10;
  color: #c1c6f4;
}
.kpi-featured .kpi-line {
  background: #a5a0ff;
}
.dashboard-registers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-top: 14px;
  overflow: hidden;
}
.dashboard-registers button {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  color: #8994a8;
  border: 0;
  border-radius: 0;
  padding: 13px 22px;
  font-size: 10px;
  text-align: left;
}
.dashboard-registers button + button {
  border-left: 1px solid var(--line);
}
.dashboard-registers strong {
  margin-left: auto;
  font-size: 15px;
  font-weight: 600;
  color: #44516a;
}
.dashboard-registers button:hover {
  background: #f7f7ff;
  color: var(--accent);
}
.workflow-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 17px 20px;
  margin-top: 20px;
}
.workflow-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.workflow-symbol {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #f4f2ff;
  color: #8e80c9;
  display: grid;
  place-items: center;
  font-size: 19px;
}
.workflow-heading h2 {
  font-size: 11px;
  font-weight: 600;
  margin: 0;
}
.workflow-heading p {
  font-size: 9px;
  color: #99a3b4;
  margin: 2px 0 0;
}
.workflow-states {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  flex: 1;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.workflow-state {
  display: grid;
  grid-template-columns: 6px auto;
  gap: 4px 6px;
  align-items: center;
  white-space: nowrap;
  font-size: 9px;
  color: #8b96a9;
}
.workflow-state strong {
  grid-column: 2;
  font-size: 15px;
  font-weight: 600;
  color: #465169;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8592a8;
}
.status-dot.amber {
  background: #e3b064;
}
.status-dot.blue {
  background: #8292ec;
}
.status-dot.green {
  background: #41b79c;
}
.workflow-open {
  font-size: 10px;
  color: var(--accent);
  background: transparent;
  white-space: nowrap;
  padding: 5px;
}
.workflow-open:hover {
  background: var(--tint);
}
/* Reporting and record surfaces */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 20px;
}
.chart-card {
  padding: 20px;
  min-width: 0;
}
.chart-card h3 {
  font-size: 12px;
  font-weight: 600;
  color: #4b5670;
  margin: 0 0 18px;
}
.panel-caption {
  font-size: 10px;
  color: #68758b;
  margin: -12px 0 23px;
}
.panel-tag {
  float: right;
  padding: 3px 7px;
  font-size: 9px;
  color: #8691a6;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-weight: 400;
}
.chart-card canvas {
  max-height: 250px;
}
.chart-card .table-wrap {
  border-radius: 5px;
  box-shadow: none;
}
.chart-card > .chart-card {
  box-shadow: none;
}
.form-grid {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  padding: 16px;
  gap: 12px;
  background: white;
  align-items: start;
}
.form-grid > div {
  min-width: 0;
}
.table-wrap {
  margin-bottom: 16px;
  max-width: 100%;
}
table {
  font-variant-numeric: tabular-nums;
}
th {
  background: #f8f9fc;
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
}
td {
  font-size: 11px;
  color: #526078;
  padding: 12px 15px;
  border-bottom: 1px solid #edf0f5;
  line-height: 1.5;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafbff;
}
td button {
  font-size: 10px;
  padding: 5px 9px;
  border-radius: 5px;
  background: #f2f3ff;
  color: var(--accent);
  border: 1px solid #e7e7fb;
}
td button:hover {
  background: #e7e7ff;
}
.erp-compact td {
  padding: 7px 12px;
}
.erp-compact th {
  padding: 8px 12px;
}
.badge {
  background: #eff1ff;
  color: #6e65d4;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
}
.record-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}
.record-status:before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.record-status.pending_approval {
  background: #fff7e9;
  color: #bd903d;
}
.record-status.approved {
  background: #eef1ff;
  color: #6c7ac8;
}
.record-status.received {
  background: #eaf7f1;
  color: #409879;
}
.record-status.rejected,
.record-status.returned_for_correction {
  background: #fff0ee;
  color: #c07a6e;
}
.select-search {
  background: #fafbfe;
  margin-bottom: 5px;
  font-size: 11px;
}
.select-search-results {
  border-color: var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 20px #17203912;
}
.select-search-results button {
  font-size: 11px;
  padding: 8px 10px;
  color: #526078;
}
.select-search-results button:hover {
  background: var(--tint);
  color: var(--accent);
}
.danger,
.actions button,
td button.danger {
  background: #fff1f1;
  border: 1px solid #f6dada;
  color: #b76868;
}
.danger:hover,
.actions button:hover,
td button.danger:hover {
  background: #ffe4e4;
  color: #a24f4f;
}
.order-document {
  padding: 0;
  overflow: hidden;
}
.document-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.document-header h3 {
  margin: 0;
  font-size: 13px;
}
.document-header p {
  font-size: 10px;
  color: #96a0b2;
  margin: 4px 0 0;
}
.document-header .document-status {
  font-size: 10px;
  color: #9f8a5a;
  background: #fff8e8;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.document-body {
  padding: 20px 22px;
}
.document-body > .form-grid {
  border: 0;
  background: #f9fafc;
  padding: 14px;
  margin-bottom: 18px;
}
.document-body > .order-line-entry {
  background: white;
  padding: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.order-line-entry > div:nth-child(-n + 2) {
  grid-column: span 3;
}
.order-line-entry > div:nth-child(3) {
  grid-column: 1 / -1;
}
.order-line-entry > div {
  min-width: 0;
}
.order-line-entry textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  font: inherit;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.order-line-entry .select-search {
  margin-bottom: 3px;
}
.order-line-entry label {
  margin-top: 0;
}
.document-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 22px;
  border-top: 1px solid var(--line);
  background: #fcfcff;
}
.document-total {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #8792a6;
  font-size: 11px;
}
.document-total strong {
  color: #303d57;
  font-size: 21px;
  font-weight: 600;
}
.document-actions {
  display: flex;
  gap: 8px;
}
.order-list-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.order-list-title .panel-tag {
  float: none;
}
.order-document + .chart-card {
  margin-top: 20px !important;
}
/* Sign-in */
.login-screen {
  background: #f8f9fc;
  gap: 0;
  padding: 0;
  min-height: 100vh;
}
.login-story {
  width: 50%;
  min-height: 100vh;
  background: var(--navy);
  padding: 55px max(40px, 6vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-story:after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#ffffff03 1px, transparent 1px),
    linear-gradient(90deg, #ffffff03 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}
.login-story .workspace-brand {
  position: absolute;
  top: 42px;
  left: max(40px, 6vw);
  color: #fff;
  font-size: 22px;
}
.login-story .eyebrow {
  color: #939dcc;
  font-size: 9px;
  letter-spacing: 2px;
}
.login-story h2 {
  font-size: clamp(30px, 3.3vw, 52px);
  font-weight: 600;
  color: #f5f6ff;
  line-height: 1.18;
  letter-spacing: -1.7px;
  margin: 24px 0;
}
.login-story p {
  color: #8c99b4;
  line-height: 1.9;
  font-size: 13px;
  max-width: 380px;
}
.login-flow {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 28px;
  color: #9daac6;
  font-size: 11px;
}
.login-flow b {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin-right: 12px;
  border: 1px solid #394565;
  border-radius: 6px;
  font-weight: 400;
  color: #9d9ce6;
  background: #ffffff03;
}
.login-footnote {
  position: absolute;
  bottom: 32px;
  color: #53617f;
  font-size: 10px;
}
.login-card {
  width: min(360px, 40%);
  margin: auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.login-card .eyebrow {
  font-size: 9px;
  color: #9197af;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}
.login-card h1 {
  font-size: 26px;
  letter-spacing: -0.8px;
  font-weight: 600;
}
.login-card p {
  font-size: 12px;
}
.login-card label {
  margin-top: 24px;
  font-size: 11px;
}
.login-card input {
  min-height: 44px;
}
.login-card button[type="submit"] {
  width: 100%;
  margin-top: 28px;
  padding: 12px;
}
.login-card .error {
  min-height: 20px;
}
.chart-plot {
  position: relative;
  height: 240px;
  min-width: 0;
  width: 100%;
}
.chart-card .chart-plot canvas {
  display: block;
  max-height: none;
  width: 100% !important;
  height: 100% !important;
}
/* Command palette */
.workspace-search-dialog {
  border: 1px solid #e2e5f0;
  border-radius: 12px;
  padding: 22px;
  width: min(550px, calc(100vw - 32px));
  color: var(--ink);
  box-shadow: 0 25px 80px #17203933;
}
.workspace-search-dialog::backdrop {
  background: #17203955;
  backdrop-filter: blur(3px);
}
.search-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.search-dialog-heading h2 {
  font-size: 15px;
  font-weight: 600;
}
.search-dialog-heading button {
  background: #f4f5fa;
  color: #8994a8;
  padding: 5px 8px;
}
.workspace-search-dialog input {
  margin: 12px 0 4px;
  min-height: 42px;
}
#workspacePageResults {
  max-height: 340px;
  overflow: auto;
  margin-top: 10px;
}
#workspacePageResults button {
  display: block;
  width: 100%;
  background: white;
  text-align: left;
  color: #64718a;
  border-radius: 5px;
  padding: 11px;
  font-size: 12px;
}
#workspacePageResults button:hover {
  background: var(--tint);
  color: var(--accent);
}
.workspace-search-dialog p {
  font-size: 10px;
}
@media (min-width: 1600px) {
  .app-main {
    padding-left: 42px;
    padding-right: 42px;
  }
  .workspace-topbar {
    margin-left: -42px;
    margin-right: -42px;
    padding-left: 42px;
    padding-right: 42px;
  }
  .chart-card canvas {
    max-height: 290px;
  }
}
@media (max-width: 1250px) {
  .workflow-panel {
    flex-wrap: wrap;
  }
  .workflow-states {
    order: 3;
    flex-basis: 100%;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 14px 0 0;
    justify-content: space-between;
  }
  .workflow-open {
    margin-left: auto;
  }
  .document-body > .order-line-entry {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .order-line-entry > div:nth-child(-n + 2) {
    grid-column: span 2;
  }
  .workspace-search-button {
    min-width: 180px;
  }
  .workspace-tools {
    gap: 10px;
  }
}
@media (max-width: 1000px) {
  .sidebar {
    width: 218px;
  }
  .app-main {
    margin-left: 218px;
    padding-left: 22px;
    padding-right: 22px;
  }
  .workspace-topbar {
    margin-left: -22px;
    margin-right: -22px;
    padding-left: 22px;
    padding-right: 22px;
  }
  .toolbar-control {
    display: none;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-kpis {
    gap: 10px;
  }
  .dashboard-kpis .card {
    padding: 16px;
  }
  .dashboard-kpis strong {
    font-size: 22px;
  }
  .dashboard-kpis h3 {
    font-size: 10px;
  }
  .dashboard-registers button {
    padding: 12px;
    gap: 8px;
  }
  .page-description {
    max-width: 390px;
  }
  .login-story {
    padding-left: 40px;
    padding-right: 40px;
  }
  .scope-label {
    display: none;
  }
}
@media (max-width: 760px) {
  .sidebar {
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.18s;
  }
  .sidebar.workspace-open {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
    padding: 0 16px 25px;
  }
  .workspace-topbar {
    height: 58px;
    margin: 0 -16px;
    padding: 0 16px;
  }
  .workspace-breadcrumb {
    font-size: 10px;
  }
  .workspace-tools {
    gap: 8px;
  }
  .workspace-search-button {
    min-width: 0;
    width: 34px;
    height: 32px;
    padding: 8px;
  }
  .workspace-search-button > span,
  .workspace-search-button kbd {
    display: none;
  }
  .workspace-search-button svg {
    flex-shrink: 0;
  }
  .workspace-avatar {
    width: 26px;
    height: 26px;
  }
  .menu-toggle {
    display: block;
    background: transparent;
    color: #8290a7;
    padding: 3px;
    font-size: 19px;
  }
  .page-heading {
    margin: 22px 0 18px;
    align-items: start;
  }
  .page-heading h1 {
    font-size: 22px;
  }
  .page-description {
    font-size: 10px;
  }
  .workspace-date {
    display: none;
  }
  .dashboard-toolbar {
    gap: 12px;
    flex-wrap: wrap;
  }
  .dashboard-view-label {
    font-size: 10px;
  }
  .dashboard-actions {
    gap: 6px;
  }
  .dashboard-actions button {
    font-size: 9px;
    padding: 7px 9px;
  }
  .dashboard-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-kpis .card {
    padding: 18px 20px;
  }
  .dashboard-kpis strong {
    font-size: 28px;
  }
  .dashboard-kpis .kpi-line {
    margin-top: 14px;
  }
  .dashboard-registers button {
    flex-wrap: wrap;
    gap: 2px 8px;
    padding: 12px 10px;
    font-size: 9px;
  }
  .dashboard-registers button > span:first-child {
    flex-basis: 100%;
  }
  .dashboard-registers strong {
    margin-left: 0;
    margin-right: auto;
  }
  .workflow-panel {
    padding: 15px;
  }
  .workflow-states {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .chart-card {
    padding: 16px;
  }
  .chart-card canvas {
    max-height: 245px;
  }
  .document-header,
  .document-body,
  .document-footer {
    padding: 16px;
  }
  .document-body > .order-line-entry {
    grid-template-columns: 1fr 1fr;
  }
  .order-line-entry > div:nth-child(-n + 2) {
    grid-column: span 1;
  }
  .document-footer {
    flex-wrap: wrap;
  }
  .document-total {
    flex: 1;
  }
  .document-actions {
    width: 100%;
  }
  .document-actions button {
    flex: 1;
  }
  .form-grid {
    padding: 14px;
  }
  .login-screen {
    flex-direction: column;
    padding: 0 22px 35px;
    justify-content: start;
  }
  .login-story {
    width: calc(100% + 44px);
    min-height: 230px;
    padding: 80px 26px 25px;
    margin-bottom: 32px;
  }
  .login-story .workspace-brand {
    top: 24px;
    left: 26px;
  }
  .login-story h2 {
    font-size: 28px;
    margin: 12px 0;
  }
  .login-story p,
  .login-story .eyebrow,
  .login-flow,
  .login-footnote {
    display: none;
  }
  .login-card {
    width: min(360px, 100%);
    margin: 0 auto;
  }
  .login-card h1 {
    font-size: 24px;
  }
  .order-document {
    padding: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .sidebar,
  .workspace-topbar,
  .workspace-search-dialog,
  .workspace-backdrop,
  .dashboard-actions,
  .dashboard-registers,
  .workflow-open {
    display: none !important;
  }
  .app-main {
    margin: 0;
    padding: 0;
  }
  .card,
  .chart-card,
  .table-wrap {
    box-shadow: none;
    break-inside: avoid;
  }
  .card.kpi-featured {
    background: #fff;
    color: #111;
  }
  .kpi-featured h3,
  .kpi-featured p {
    color: #555;
  }
  .page-heading {
    margin-top: 0;
  }
}
