:root {
  --font-sans: "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --surface-muted: #f1f4f8;
  --text: #182230;
  --text-strong: #101828;
  --text-muted: #667085;
  --text-subtle: #6b7280;
  --border: #e4e8ef;
  --border-strong: #d6dce6;
  --primary: #2864dc;
  --primary-hover: #1f55c0;
  --primary-soft: #edf3ff;
  --primary-ring: rgba(40, 100, 220, .2);
  --success: #16835c;
  --success-soft: #eaf8f2;
  --warning: #a15c08;
  --warning-soft: #fff6e8;
  --danger: #c7353e;
  --danger-soft: #fff0f1;
  --violet: #7254c7;
  --violet-soft: #f3efff;
  --sidebar: #111827;
  --sidebar-soft: #192233;
  --sidebar-text: #d8deea;
  --sidebar-muted: #8f9aae;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .03);
  --shadow-md: 0 12px 32px rgba(16, 24, 40, .09), 0 2px 8px rgba(16, 24, 40, .04);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, .16);
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --sidebar-width: 256px;
  --topbar-height: 72px;
  --mobile-nav-height: 68px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

button,
summary,
select {
  cursor: pointer;
}

button {
  border: 0;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--surface);
  padding: 9px 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

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

input::placeholder,
textarea::placeholder {
  color: #6b7280;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #bdc6d4;
}

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

input[aria-invalid="true"],
.input-validation-error {
  border-color: var(--danger);
}

input[aria-invalid="true"]:focus,
.input-validation-error:focus {
  box-shadow: 0 0 0 3px rgba(199, 53, 62, .14);
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--primary-ring);
  outline-offset: 2px;
}

::selection {
  background: #cddcff;
  color: #102a63;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--primary);
  font-weight: 700;
  padding: 10px 14px;
  transition: transform .16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.sidebar {
  position: fixed;
  z-index: 70;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow: hidden;
  background: var(--sidebar);
  color: var(--sidebar-text);
}

.brand {
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.brand-link,
.auth-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 11px;
  background: linear-gradient(145deg, #3975ee, #2457bd);
  box-shadow: 0 5px 14px rgba(12, 50, 130, .28);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.brand-copy,
.auth-brand > span:last-child {
  display: grid;
  min-width: 0;
}

.brand-copy strong,
.auth-brand strong {
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy span,
.auth-brand small {
  overflow: hidden;
  margin-top: 1px;
  color: var(--sidebar-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s var(--ease);
}

.icon-button:hover {
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--text-strong);
}

.icon-button:active {
  transform: scale(.96);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.sidebar-close {
  display: none;
  color: var(--sidebar-muted);
}

.sidebar-close:hover {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.store-card {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  margin: 3px 12px 9px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  padding: 10px;
}

.store-avatar,
.user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #e9effc;
  color: #234d9f;
  font-size: 13px;
  font-weight: 750;
}

.store-avatar {
  background: rgba(90, 132, 222, .16);
  color: #b7ccff;
}

.store-card-copy {
  display: grid;
  min-width: 0;
  flex: 1;
}

.store-card-copy strong,
.store-card-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-card-copy strong {
  color: #eef2f8;
  font-size: 12px;
  font-weight: 600;
}

.store-card-copy span {
  color: var(--sidebar-muted);
  font-size: 10px;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #55c997;
  box-shadow: 0 0 0 3px rgba(85, 201, 151, .1);
}

.side-nav {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 10px 18px;
  scrollbar-color: rgba(255, 255, 255, .12) transparent;
  scrollbar-width: thin;
}

.nav-section-label {
  margin: 15px 10px 5px;
  color: #68748a;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.nav-section-label:first-child {
  margin-top: 5px;
}

.nav-link {
  position: relative;
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 11px;
  margin: 2px 0;
  border-radius: 9px;
  color: #aeb8c9;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 10px;
  transition: color .16s ease, background-color .16s ease, transform .16s var(--ease);
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 1.7;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .055);
  color: #fff;
  transform: translateX(1px);
}

.nav-link.is-active {
  background: #243651;
  color: #fff;
  font-weight: 600;
}

.nav-link.is-active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -10px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #6f9bff;
  content: "";
}

.nav-link.is-active svg {
  color: #8fb0ff;
}

.sidebar-foot {
  padding: 10px 12px 16px;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  color: var(--sidebar-muted);
  padding: 15px 3px 0;
}

.security-note > svg {
  width: 20px;
  height: 20px;
  color: #6f9bff;
}

.security-note > span {
  display: grid;
}

.security-note strong {
  color: #b9c2d1;
  font-size: 10px;
  font-weight: 600;
}

.security-note small {
  font-size: 9px;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(221, 226, 235, .9);
  background: rgba(255, 255, 255, .9);
  padding: 0 clamp(18px, 3vw, 38px);
  backdrop-filter: blur(16px);
}

.topbar-leading,
.topbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.menu-button {
  display: none;
}

.page-identity {
  display: grid;
  min-width: 0;
}

.eyebrow,
.panel-kicker,
.document-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.page-identity strong {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-chip {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 10px;
}

.context-chip svg {
  width: 15px;
  height: 15px;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
  list-style: none;
  padding: 4px 6px;
  transition: background-color .16s ease;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu summary:hover,
.user-menu[open] summary {
  background: var(--surface-muted);
}

.user-copy {
  display: grid;
  max-width: 150px;
}

.user-copy strong,
.user-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy strong {
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 650;
}

.user-copy small {
  color: var(--text-muted);
  font-size: 9px;
}

.chevron {
  width: 14px;
  height: 14px;
  color: var(--text-subtle);
  transition: transform .16s ease;
}

.user-menu[open] .chevron {
  transform: rotate(180deg);
}

.user-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 9px);
  right: 0;
  width: 250px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 9px;
  animation: popover-in .16s var(--ease) both;
}

.user-popover-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px;
}

.user-popover-head > span:last-child {
  display: grid;
  min-width: 0;
}

.user-popover-head strong {
  font-size: 12px;
}

.user-popover-head small {
  color: var(--text-muted);
  font-size: 10px;
}

.popover-context {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  padding: 10px 7px;
}

.popover-context strong {
  color: var(--text);
}

.menu-action {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  border-radius: 8px;
  background: transparent;
  color: var(--danger);
  font-size: 11px;
  font-weight: 600;
  padding: 8px;
}

.menu-action:hover {
  background: var(--danger-soft);
}

.menu-action svg {
  width: 17px;
  height: 17px;
}

.main-content {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 38px);
}

.mobile-tabs,
.nav-scrim {
  display: none;
}

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

.page-heading h1 {
  margin-top: 4px;
  color: var(--text-strong);
  font-size: clamp(25px, 2.25vw, 34px);
  font-weight: 670;
  letter-spacing: -.035em;
  line-height: 1.15;
}

.page-heading p {
  max-width: 720px;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 13px;
}

.page-heading-form {
  margin-bottom: 20px;
}

.heading-with-back,
.heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.heading-with-back {
  align-items: flex-start;
}

.back-button {
  margin-top: 3px;
  border-color: var(--border);
  background: var(--surface);
}

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

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  padding: 10px 14px;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s var(--ease);
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0) scale(.985);
}

.button svg {
  width: 17px;
  height: 17px;
}

.button-primary {
  background: var(--primary);
  box-shadow: 0 1px 2px rgba(31, 85, 192, .22);
  color: #fff;
}

.button-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 5px 14px rgba(31, 85, 192, .18);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.button-secondary:hover {
  border-color: #bdc6d4;
  background: var(--surface-soft);
}

.button-ghost {
  background: transparent;
  color: var(--text-muted);
}

.button-ghost:hover {
  background: var(--surface-muted);
  color: var(--text);
}

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

.button-large {
  min-height: 48px;
  border-radius: 11px;
  font-size: 13px;
}

.button-block {
  width: 100%;
}

.button[disabled],
.button.is-loading {
  cursor: wait;
  opacity: .72;
  transform: none;
}

.button-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.is-loading .button-spinner {
  display: block;
}

.is-loading [data-button-arrow] {
  display: none;
}

.panel,
.form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.panel {
  min-width: 0;
}

.panel-head,
.form-card-head,
.line-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-head {
  padding: 20px 20px 10px;
}

.panel-head h2,
.data-toolbar h2,
.form-card h2,
.form-card-head h2 {
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.015em;
}

.panel-period,
.live-label,
.trend-pill,
.draft-badge {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 650;
  padding: 5px 9px;
  white-space: nowrap;
}

.live-label > span,
.draft-badge > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.draft-badge > span {
  background: var(--warning);
}

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

.kpi-card {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  padding: 17px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease);
}

.kpi-card:hover {
  border-color: #d7dde8;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.kpi-icon,
.section-icon,
.quick-icon,
.report-icon,
.finance-action-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
}

.kpi-icon {
  width: 36px;
  height: 36px;
}

.kpi-icon svg,
.section-icon svg,
.quick-icon svg,
.report-icon svg,
.finance-action-icon svg {
  width: 19px;
  height: 19px;
}

.kpi-icon-blue,
.section-icon-blue,
.quick-blue,
.report-icon-blue,
.finance-action-blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.kpi-icon-violet,
.section-icon-violet,
.report-icon-violet,
.finance-action-violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.kpi-icon-amber,
.section-icon-amber,
.quick-amber {
  background: var(--warning-soft);
  color: var(--warning);
}

.kpi-icon-green,
.section-icon-green,
.quick-green,
.report-icon-green,
.finance-action-green {
  background: var(--success-soft);
  color: var(--success);
}

.trend-positive {
  border-color: #d5eee4;
  background: var(--success-soft);
  color: var(--success);
}

.trend-warning {
  border-color: #f1dfc5;
  background: var(--warning-soft);
  color: var(--warning);
}

.trend-neutral {
  color: var(--text-muted);
}

.kpi-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 550;
}

.kpi-value {
  margin: 4px 0 6px;
  color: var(--text-strong);
  font-size: clamp(20px, 1.75vw, 27px);
  font-weight: 680;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.kpi-meta {
  margin-top: auto;
  color: var(--text-subtle);
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, .7fr);
  gap: 16px;
  margin-bottom: 16px;
}

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

.chart-panel {
  min-height: 354px;
}

.line-chart {
  padding: 8px 20px 17px;
}

.line-chart svg {
  width: 100%;
  height: 230px;
  overflow: visible;
}

.chart-gridline {
  stroke: #e9edf3;
  stroke-width: 1;
}

.chart-area {
  fill: url("#sales-area");
  fill: rgba(40, 100, 220, .08);
  stroke: none;
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.chart-point {
  fill: var(--surface);
  stroke: var(--primary);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  color: var(--text-subtle);
  font-size: 9px;
  padding: 0 3px;
}

.quick-panel {
  min-height: 354px;
}

.quick-actions {
  padding: 7px 12px 12px;
}

.quick-actions > a,
.settings-card,
.report-card,
.finance-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 11px;
  transition: background-color .16s ease, transform .16s var(--ease), box-shadow .16s ease;
}

.quick-actions > a {
  padding: 11px 9px;
}

.quick-actions > a + a {
  border-top: 1px solid var(--border);
  border-radius: 0;
}

.quick-actions > a:hover {
  background: var(--surface-soft);
  transform: translateX(2px);
}

.quick-icon {
  width: 36px;
  height: 36px;
}

.quick-actions > a > span:nth-child(2),
.settings-card > span:nth-child(2),
.report-card > span:nth-child(2),
.finance-action-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
}

.quick-actions strong,
.settings-card strong,
.report-card strong,
.finance-action-card strong {
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 650;
}

.quick-actions small,
.settings-card small,
.report-card small,
.finance-action-card small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--text-subtle);
}

.text-link {
  color: var(--primary);
  font-size: 10px;
  font-weight: 650;
}

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

.rank-list,
.activity-list {
  padding: 5px 12px 12px;
}

.rank-row,
.activity-row {
  display: flex;
  min-height: 61px;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.rank-row + .rank-row,
.activity-row + .activity-row {
  border-top: 1px solid var(--border);
}

.rank-number {
  width: 22px;
  color: var(--text-subtle);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.product-thumb,
.activity-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}

.activity-icon {
  background: var(--primary-soft);
  color: var(--primary);
}

.activity-icon-violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.activity-icon svg {
  width: 17px;
  height: 17px;
}

.rank-copy,
.activity-copy {
  display: grid;
  min-width: 0;
  flex: 1;
}

.rank-copy strong,
.activity-copy strong {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 10.5px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy small,
.activity-copy small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-value,
.activity-value {
  flex: 0 0 auto;
  color: var(--text-strong);
  font-size: 10.5px;
  font-weight: 650;
  text-align: right;
}

.activity-link {
  border-radius: 10px;
  transition: background-color .16s ease;
}

.activity-link:hover {
  background: var(--surface-soft);
}

.notice {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 550;
  padding: 9px 11px 9px 13px;
  animation: notice-in .25s var(--ease) both;
}

.notice svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.notice span {
  flex: 1;
}

.notice-success {
  border-color: #cde9de;
  background: var(--success-soft);
  color: #116d4d;
}

.notice-error {
  border-color: #f1ced1;
  background: var(--danger-soft);
  color: #a72731;
}

.notice-close {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: currentColor;
  font-size: 20px;
  opacity: .7;
}

.notice-close:hover {
  background: rgba(0, 0, 0, .05);
  opacity: 1;
}

.notice.is-leaving {
  animation: notice-out .2s ease both;
}

.data-panel {
  overflow: hidden;
}

.data-toolbar {
  display: flex;
  min-height: 75px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding: 15px 18px;
}

.data-toolbar > div:first-child {
  flex: 0 0 auto;
}

.data-toolbar p {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10px;
}

.search-form,
.transaction-filters,
.report-filters {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  gap: 8px;
}

.search-form-filters {
  flex: 1;
  justify-content: flex-end;
}

.search-box,
.select-box {
  display: flex;
  min-width: 250px;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 0 10px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.search-box:focus-within,
.select-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.search-box svg,
.select-box svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--text-subtle);
}

.search-box input,
.select-box select {
  min-width: 0;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  padding: 7px 0;
}

.search-box kbd {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--text-subtle);
  font-family: inherit;
  font-size: 10px;
  padding: 1px 5px;
}

.select-box {
  min-width: 165px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 13px;
}

.data-table th {
  height: 42px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
  padding: 9px 13px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  min-height: 55px;
  border-bottom: 1px solid var(--border);
  color: #344054;
  padding: 10px 13px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color .13s ease;
}

.data-table tbody tr:hover {
  background: #fbfcfe;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-primary {
  display: flex;
  min-width: 180px;
  align-items: center;
  gap: 10px;
}

.table-primary > span:last-child,
.table-document {
  display: grid;
  min-width: 0;
}

.table-primary strong,
.table-document strong,
.cell-strong {
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 630;
}

.table-primary small,
.table-document small,
.cell-muted {
  display: block;
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 450;
}

.table-document:hover strong {
  color: var(--primary);
}

.item-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 750;
}

.item-avatar-blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.item-avatar-green {
  background: var(--success-soft);
  color: var(--success);
}

.item-avatar-violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.item-avatar-amber {
  background: var(--warning-soft);
  color: var(--warning);
}

.tax-pair {
  display: grid;
  gap: 1px;
  color: var(--text-muted);
  font-size: 9px;
}

.money-value,
.value-positive,
.value-warning {
  color: var(--text-strong);
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.value-positive {
  color: var(--success);
}

.value-warning {
  color: var(--warning);
}

.code-value,
.neutral-badge {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-soft);
  color: #475467;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 9px;
  padding: 4px 7px;
}

.neutral-badge {
  font-family: inherit;
  font-weight: 600;
}

.location-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #475467;
  white-space: nowrap;
}

.location-label svg {
  width: 14px;
  height: 14px;
  color: var(--text-subtle);
}

.status-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 650;
  padding: 4px 8px;
}

.status-badge > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-success {
  background: var(--success-soft);
  color: var(--success);
}

.status-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.table-actions {
  text-align: right;
  white-space: nowrap;
}

.table-actions form {
  display: inline-flex;
}

.table-action {
  width: 34px;
  height: 34px;
}

.table-action-danger {
  color: #9d5960;
}

.table-action-danger:hover {
  border-color: #f1d1d4;
  background: var(--danger-soft);
  color: var(--danger);
}

.pagination-bar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  padding: 10px 18px;
}

.pagination-bar p strong {
  color: var(--text);
}

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

.page-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: #475467;
  font-size: 10px;
  font-weight: 600;
  padding: 7px 9px;
}

.page-button:hover:not(.is-disabled) {
  border-color: #bcc6d5;
  background: var(--surface-soft);
}

.page-button svg {
  width: 14px;
  height: 14px;
}

.page-button.is-disabled {
  cursor: default;
  opacity: .45;
  pointer-events: none;
}

.page-count {
  color: var(--text-muted);
  font-size: 9px;
}

.empty-state {
  display: flex;
  min-height: 300px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 40px 20px;
}

.empty-state-compact {
  min-height: 210px;
}

.empty-icon,
.state-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.empty-icon svg,
.state-icon svg {
  width: 24px;
  height: 24px;
}

.empty-state h2,
.empty-state strong {
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 650;
}

.empty-state p {
  max-width: 430px;
  margin: 5px 0 15px;
  color: var(--text-muted);
  font-size: 11px;
}

.editor-form {
  padding-bottom: 84px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: start;
  gap: 16px;
}

.editor-main {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.editor-aside {
  min-width: 0;
}

.form-card {
  padding: 20px;
}

.form-card-head {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.form-card-head > div:last-child {
  min-width: 0;
}

.form-card-head p {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10px;
}

.section-icon {
  width: 36px;
  height: 36px;
}

.field-grid {
  display: grid;
  gap: 15px;
}

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

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

.field-span-two {
  grid-column: span 2;
}

.field {
  min-width: 0;
}

.field > label,
.label-row label {
  display: block;
  margin-bottom: 6px;
  color: #344054;
  font-size: 10.5px;
  font-weight: 620;
}

.field-error {
  display: block;
  min-height: 0;
  margin-top: 4px;
  color: var(--danger);
  font-size: 9px;
}

.field-error:empty {
  display: none;
}

.input-prefix,
.input-suffix {
  display: flex;
  min-height: 42px;
  align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.input-prefix:focus-within,
.input-suffix:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.input-prefix > span,
.input-suffix > span {
  display: grid;
  min-width: 37px;
  place-items: center;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 650;
  padding: 0 8px;
}

.input-prefix > span {
  border-right: 1px solid var(--border);
}

.input-suffix > span {
  border-left: 1px solid var(--border);
}

.input-prefix input,
.input-suffix input {
  min-width: 0;
  flex: 1;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.input-prominent {
  min-height: 52px;
}

.input-prominent input {
  font-size: 18px;
  font-weight: 650;
}

.split-input {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.field-note,
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: #3d5684;
  font-size: 9.5px;
  padding: 10px 11px;
}

.field-note svg,
.info-banner > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.guidance-card {
  background: #fbfcfe;
}

.guidance-card > p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 10px;
}

.guidance-list {
  display: grid;
  gap: 15px;
  margin-top: 17px;
  list-style: none;
}

.guidance-list li {
  display: flex;
  gap: 10px;
}

.guidance-list li > span {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 750;
}

.guidance-list p {
  display: grid;
  color: var(--text-muted);
  font-size: 9px;
}

.guidance-list strong {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 10px;
}

.sticky-card {
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
}

.form-actions {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: var(--sidebar-width);
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid rgba(218, 224, 233, .92);
  background: rgba(255, 255, 255, .92);
  padding: 12px clamp(22px, 3vw, 38px);
  backdrop-filter: blur(14px);
}

.compact-editor {
  max-width: 760px;
}

.validation-summary {
  margin-bottom: 14px;
  border: 1px solid #efcbd0;
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: #a72832;
  font-size: 10px;
  padding: 10px 12px;
}

.validation-summary:empty,
.validation-summary-valid {
  display: none;
}

.validation-summary ul {
  margin: 0;
  padding-left: 18px;
}

.settings-grid,
.report-grid,
.finance-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.settings-card,
.report-card,
.finance-action-card {
  min-height: 94px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  padding: 16px;
}

.settings-card:hover,
.report-card:hover,
.finance-action-card:hover {
  border-color: #ccd5e2;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.settings-icon,
.report-icon,
.finance-action-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
}

.settings-icon svg {
  width: 20px;
  height: 20px;
}

.info-banner {
  margin-top: 16px;
  border: 1px solid #dce6fa;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.info-banner strong {
  color: #284574;
  font-size: 10px;
}

.info-banner p {
  margin-top: 2px;
  font-size: 9px;
}

.split-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 16px;
}

.simple-list,
.tag-list {
  padding: 7px 12px 12px;
}

.simple-list-row,
.tag-list-row {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding: 7px;
}

.simple-list-row:last-child,
.tag-list-row:last-child {
  border-bottom: 0;
}

.simple-list-row > strong {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
}

.list-initial {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.add-reference-card {
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
}

.form-stack {
  display: grid;
  gap: 14px;
}

.filter-panel {
  margin-bottom: 14px;
  padding: 14px;
}

.report-filters,
.transaction-filters {
  align-items: flex-end;
}

.report-filters .field,
.transaction-filters .field {
  min-width: 140px;
}

.report-search-field,
.filter-grow {
  min-width: 230px !important;
  flex: 1;
}

.filter-submit {
  margin-bottom: 0;
}

.report-results {
  margin-top: 14px;
}

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

.report-table tfoot td {
  border-top: 2px solid var(--border-strong);
  background: var(--surface-soft);
  color: var(--text-strong);
  font-weight: 700;
}

.master-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 16px;
}

.master-side {
  overflow: hidden;
}

.tag-list-row > span:first-child {
  display: grid;
  min-width: 0;
  flex: 1;
}

.tag-list-row strong {
  font-size: 10.5px;
}

.tag-list-row small {
  color: var(--text-muted);
  font-size: 9px;
}

.inline-create-form {
  display: grid;
  gap: 11px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 17px;
}

.inline-create-form h3 {
  font-size: 12px;
}

.settings-tabs {
  position: sticky;
  z-index: 20;
  top: calc(var(--topbar-height) + 8px);
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 3px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-sm);
  padding: 4px;
  backdrop-filter: blur(12px);
}

.settings-tabs a {
  min-height: 32px;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 650;
  padding: 8px 10px;
}

.settings-tabs a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.scroll-target {
  scroll-margin-top: 135px;
}

.transaction-editor {
  display: grid;
  gap: 16px;
  padding-bottom: 84px;
}

.transaction-context {
  overflow: visible;
}

.line-editor-card {
  overflow: hidden;
  padding: 0;
}

.line-editor-head {
  min-height: 76px;
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
}

.line-editor-head .form-card-head {
  margin-bottom: 0;
}

.line-list {
  display: grid;
  gap: 10px;
  background: var(--surface-soft);
  padding: 12px;
}

.line-card {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 145px 36px;
  align-items: start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  padding: 13px;
}

.line-number {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 750;
}

.line-fields {
  display: grid;
  grid-template-columns: minmax(155px, 1.6fr) repeat(5, minmax(96px, 1fr));
  gap: 9px;
}

.line-fields-purchase {
  grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.5fr) repeat(4, minmax(95px, 1fr));
}

.line-card .field > label {
  font-size: 9px;
}

.line-card input,
.line-card select {
  min-height: 38px;
  font-size: 10px;
  padding: 7px 9px;
}

.line-card .input-prefix,
.line-card .input-suffix {
  min-height: 38px;
}

.line-total {
  display: grid;
  align-self: end;
  min-height: 38px;
  align-content: center;
  justify-items: end;
  padding: 3px 0;
}

.line-total span {
  color: var(--text-muted);
  font-size: 8px;
}

.line-total strong {
  color: var(--text-strong);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.remove-line {
  width: 34px;
  height: 34px;
  align-self: end;
  color: #a05b61;
}

.remove-line:hover {
  border-color: #f1d1d4;
  background: var(--danger-soft);
  color: var(--danger);
}

.line-advanced {
  grid-column: 2 / -1;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.line-advanced summary {
  width: max-content;
  color: var(--primary);
  font-size: 9px;
  font-weight: 650;
}

.line-advanced-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 9px;
  margin-top: 11px;
}

.transaction-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: stretch;
  gap: 16px;
}

.transaction-bottom-summary {
  grid-template-columns: minmax(0, 1fr) 290px;
}

.transaction-bottom .info-banner {
  margin: 0;
  align-items: center;
}

.invoice-estimate {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #d4e0f8;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
  padding: 18px;
}

.invoice-estimate > span {
  color: #51688f;
  font-size: 9px;
  font-weight: 650;
  text-transform: uppercase;
}

.invoice-estimate strong {
  margin: 3px 0;
  color: #183d83;
  font-size: 24px;
  letter-spacing: -.03em;
}

.invoice-estimate small {
  color: #667a9e;
  font-size: 8.5px;
}

.draft-badge {
  align-self: center;
  border-color: #f0dfc3;
  background: var(--warning-soft);
  color: var(--warning);
}

.document-sheet,
.voucher-sheet {
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.document-header,
.voucher-head {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  padding: 22px 26px;
}

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

.document-brand > span:last-child {
  display: grid;
}

.document-brand strong {
  color: var(--text-strong);
  font-size: 14px;
}

.document-brand small {
  color: var(--text-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.document-number {
  display: grid;
  text-align: right;
}

.document-number span,
.document-number small {
  color: var(--text-muted);
  font-size: 9px;
}

.document-number strong {
  color: var(--text-strong);
  font-size: 18px;
}

.document-parties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 24px 26px;
}

.document-parties section {
  min-height: 100px;
  border-radius: 11px;
  background: var(--surface-soft);
  padding: 15px;
}

.document-parties h2 {
  margin: 5px 0;
  font-size: 13px;
}

.document-parties p {
  color: var(--text-muted);
  font-size: 9.5px;
}

.document-table {
  padding: 0 26px;
}

.document-table .data-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.document-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  padding: 24px 26px;
}

.payment-summary {
  max-width: 330px;
}

.payment-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  padding: 8px 0;
}

.payment-summary strong {
  color: var(--text);
}

.amount-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-muted);
  font-size: 10px;
  padding: 5px 0;
}

.amount-summary dd {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.amount-summary .amount-total {
  margin-top: 7px;
  border-top: 1px solid var(--border-strong);
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 700;
  padding-top: 12px;
}

.amount-total dd {
  color: var(--primary);
}

.document-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 9px;
  padding: 16px 26px;
}

.voucher-sheet {
  max-width: 850px;
}

.voucher-flow {
  display: grid;
  grid-template-columns: 1fr 46px 1fr;
  align-items: center;
  gap: 14px;
  padding: 32px;
}

.voucher-flow section {
  min-height: 105px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 18px;
}

.voucher-flow h2 {
  margin-top: 8px;
  font-size: 15px;
}

.flow-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}

.flow-arrow-violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.flow-arrow svg {
  width: 20px;
  height: 20px;
}

.voucher-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 32px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: #385583;
  padding: 18px;
}

.voucher-amount strong {
  color: #183d83;
  font-size: 24px;
}

.voucher-amount-violet {
  background: var(--violet-soft);
  color: #5d4a92;
}

.voucher-amount-violet strong {
  color: #503792;
}

.voucher-note {
  margin: 24px 32px 32px;
}

.voucher-note p {
  margin-top: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 10px;
  padding: 13px;
}

.state-page {
  display: flex;
  max-width: 680px;
  min-height: calc(100vh - var(--topbar-height) - 90px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto;
  text-align: center;
}

.state-icon-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.state-icon-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.state-page h1 {
  max-width: 620px;
  margin-top: 7px;
  color: var(--text-strong);
  font-size: clamp(25px, 4vw, 38px);
  letter-spacing: -.035em;
}

.state-page > p {
  max-width: 520px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.state-actions {
  display: flex;
  gap: 9px;
  margin-top: 22px;
}

.state-code {
  color: #dce2eb;
  font-size: clamp(70px, 12vw, 130px);
  font-weight: 800;
  letter-spacing: -.08em;
  line-height: .9;
}

.request-id {
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 7px 10px;
}

.request-id code {
  font-size: 10px;
}

.prose-panel {
  max-width: 900px;
  padding: 28px;
}

.prose-panel h2 {
  margin: 20px 0 7px;
  font-size: 15px;
}

.prose-panel h2:first-child {
  margin-top: 0;
}

.prose-panel p {
  color: var(--text-muted);
  font-size: 11px;
}

.confirm-dialog {
  width: min(420px, calc(100vw - 30px));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  padding: 24px;
}

.confirm-dialog[open] {
  animation: dialog-in .2s var(--ease) both;
}

.confirm-dialog::backdrop {
  background: rgba(11, 18, 30, .52);
  backdrop-filter: blur(3px);
  animation: backdrop-in .18s ease both;
}

.dialog-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 11px;
  background: var(--danger-soft);
  color: var(--danger);
}

.dialog-icon svg {
  width: 20px;
  height: 20px;
}

.confirm-dialog h2 {
  color: var(--text-strong);
  font-size: 18px;
}

.confirm-dialog p {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 11px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
}

.auth-body {
  overflow-x: hidden;
  background: #f4f7fb;
}

.auth-main,
.auth-layout {
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(430px, .92fr) minmax(0, 1.08fr);
}

.auth-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(145deg, #0b1220 0%, #111b2e 56%, #132a50 100%);
  color: #fff;
  padding: clamp(28px, 4vw, 58px);
}

.auth-story::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .024) 1px, transparent 1px),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 9px);
  background-size: 44px 44px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.auth-brand {
  position: relative;
  z-index: 2;
  width: max-content;
}

.brand-mark-stitch {
  position: relative;
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s var(--ease);
}

.brand-mark-stitch::after {
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255, 255, 255, .5);
  border-radius: 8px;
  content: "";
}

.auth-brand:hover .brand-mark-stitch {
  box-shadow: 0 8px 22px rgba(12, 50, 130, .36);
  transform: translateY(-1px);
}

.auth-story-content {
  position: relative;
  z-index: 2;
  max-width: 590px;
  margin: auto 0;
  padding: clamp(48px, 7vh, 82px) 0;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: #c2d4ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .075em;
  padding: 8px 11px;
  text-transform: uppercase;
}

.auth-kicker > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6f9bff;
  box-shadow: 0 0 0 4px rgba(111, 155, 255, .11);
}

.auth-story h1 {
  max-width: 570px;
  margin-top: 21px;
  font-size: clamp(38px, 4.15vw, 61px);
  font-weight: 620;
  letter-spacing: -.057em;
  line-height: 1.01;
}

.auth-story-content > p {
  max-width: 520px;
  margin-top: 22px;
  color: #bac5d6;
  font-size: 14.5px;
  line-height: 1.68;
}

.auth-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 27px;
  list-style: none;
}

.auth-capabilities li {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  background: rgba(255, 255, 255, .045);
  color: #dbe3ef;
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 10px;
}

.auth-capabilities svg {
  width: 15px;
  height: 15px;
  color: #8fb0ff;
  stroke-width: 1.7;
}

.auth-order-flow {
  max-width: 550px;
  margin-top: 31px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 16px;
  background: rgba(8, 16, 31, .34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 18px 48px rgba(3, 9, 19, .16);
  padding: 17px 19px 18px;
  backdrop-filter: blur(10px);
}

.auth-order-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #8997ab;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-order-flow-head strong {
  color: #c8d7f6;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .04em;
}

.auth-order-flow ol {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.auth-order-flow ol::before {
  position: absolute;
  top: 14px;
  right: 10%;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, rgba(111, 155, 255, .15), rgba(111, 155, 255, .5), rgba(111, 155, 255, .15));
  content: "";
}

.auth-order-flow li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #dfe7f3;
  font-size: 10.5px;
  text-align: center;
}

.auth-order-flow li > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(135, 171, 247, .25);
  border-radius: 50%;
  background: #14223a;
  color: #9cb9f6;
  font-size: 8.5px;
  font-weight: 750;
}

.auth-order-flow li > strong {
  font-weight: 600;
}

.auth-story-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9ba8bb;
  font-size: 11px;
}

.auth-story-foot > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #57c997;
  box-shadow: 0 0 0 4px rgba(87, 201, 151, .1);
}

.auth-story-foot strong {
  margin-left: auto;
  color: #c3ccda;
  font-size: 10.5px;
  font-weight: 600;
}

.fabric-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.fabric-orb-one {
  right: -20%;
  bottom: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at 35% 35%, rgba(57, 117, 238, .26), rgba(57, 117, 238, 0) 70%);
}

.fabric-orb-two {
  top: 12%;
  right: -22%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 40% 40%, rgba(114, 84, 199, .15), rgba(114, 84, 199, 0) 70%);
}

.auth-form-panel {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  background:
    radial-gradient(circle at 88% 7%, rgba(40, 100, 220, .075), transparent 28%),
    linear-gradient(180deg, #f8fafe 0%, #f3f6fa 100%);
  padding: clamp(26px, 4.5vw, 72px);
}

.auth-form-wrap {
  width: min(100%, 560px);
}

.auth-form-card {
  position: relative;
  border: 1px solid rgba(214, 220, 230, .9);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(16, 24, 40, .11), 0 3px 10px rgba(16, 24, 40, .045);
  padding: clamp(34px, 4vw, 46px);
}

.auth-form-card::before {
  position: absolute;
  top: -1px;
  right: 70px;
  left: 70px;
  height: 2px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, rgba(40, 100, 220, .7), transparent);
  content: "";
}

.auth-card-topline {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 23px;
}

.mobile-auth-brand {
  display: none;
}

.auth-security-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border: 1px solid #dfe5ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #536174;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .025em;
  padding: 6px 9px;
}

.auth-security-chip svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
  stroke-width: 1.8;
}

.auth-form-heading {
  margin-bottom: 29px;
}

.auth-form-heading h2 {
  max-width: 420px;
  margin-top: 7px;
  color: var(--text-strong);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 670;
  letter-spacing: -.045em;
  line-height: 1.12;
}

.auth-form-heading > p {
  max-width: 430px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.auth-form {
  gap: 21px;
}

.auth-fieldset {
  display: grid;
  min-width: 0;
  gap: 14px;
  margin: 0;
  border: 0;
  padding: 0;
}

.auth-fieldset + .auth-fieldset {
  border-top: 1px solid var(--border);
  padding-top: 21px;
}

.auth-fieldset legend {
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  color: #27364a;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -.005em;
  padding: 0;
}

.auth-fieldset legend small {
  color: var(--text-subtle);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.auth-form .field > label,
.auth-form .label-row label {
  margin-bottom: 7px;
  color: #2f3d50;
  font-size: 11.5px;
  font-weight: 650;
}

.auth-form .field-error {
  margin-top: 5px;
  font-size: 10.5px;
}

.auth-form .validation-summary {
  margin-bottom: 0;
  font-size: 11px;
  line-height: 1.5;
}

.input-shell {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fbfcfe;
  padding: 0 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.input-shell:hover {
  border-color: #c3ccda;
  background: #fff;
}

.input-shell:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.input-shell:has(input.input-validation-error),
.input-shell:has(input[aria-invalid="true"]) {
  border-color: var(--danger);
  background: #fffafa;
}

.input-shell:has(input.input-validation-error):focus-within,
.input-shell:has(input[aria-invalid="true"]):focus-within {
  box-shadow: 0 0 0 3px rgba(199, 53, 62, .14);
}

.input-shell > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--text-subtle);
  transition: color .16s ease;
}

.input-shell:focus-within > svg {
  color: var(--primary);
}

.input-shell input {
  min-width: 0;
  min-height: 48px;
  flex: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13.5px;
  padding: 8px 0;
}

.password-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  margin-right: -5px;
  transition: background-color .16s ease, color .16s ease, transform .16s var(--ease);
}

.password-toggle:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.password-toggle:active {
  transform: scale(.96);
}

.password-toggle svg {
  width: 17px;
  height: 17px;
}

.password-toggle .eye-closed,
.password-toggle[aria-pressed="true"] .eye-open {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
  display: block;
}

.label-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.caps-hint {
  color: var(--warning);
  font-size: 10.5px;
  font-weight: 600;
}

.check-control {
  display: flex;
  width: max-content;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  color: #475467;
  cursor: pointer;
  font-size: 12px;
}

.check-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-box {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  color: #fff;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.check-box svg {
  width: 13px;
  height: 13px;
  opacity: 0;
}

.check-control input:checked + .check-box {
  border-color: var(--primary);
  background: var(--primary);
}

.check-control input:checked + .check-box svg {
  opacity: 1;
}

.check-control input:focus-visible + .check-box {
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.auth-form-options {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-keyboard-hint {
  color: var(--text-subtle);
  font-size: 10.5px;
}

.auth-submit {
  min-height: 52px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(31, 85, 192, .2), 0 1px 2px rgba(31, 85, 192, .25);
  font-size: 13.5px;
}

.auth-submit:hover {
  box-shadow: 0 11px 24px rgba(31, 85, 192, .24), 0 1px 2px rgba(31, 85, 192, .25);
}

.auth-submit [data-button-arrow] {
  transition: transform .18s var(--ease);
}

.auth-submit:hover [data-button-arrow] {
  transform: translateX(2px);
}

.auth-trust-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 23px;
  border-top: 1px solid var(--border);
  color: #59677a;
  font-size: 10.5px;
  padding-top: 19px;
}

.auth-trust-line svg {
  width: 16px;
  height: 16px;
  color: var(--success);
  stroke-width: 1.8;
}

.auth-help {
  margin-top: 9px;
  color: var(--text-subtle);
  font-size: 11px;
  text-align: center;
}

.reveal {
  animation: reveal-in .52s var(--ease) both;
}

.reveal-delay-1 {
  animation-delay: .05s;
}

.reveal-delay-2 {
  animation-delay: .1s;
}

.reveal-delay-3 {
  animation-delay: .15s;
}

.reveal-delay-4 {
  animation-delay: .2s;
}

.nav-live-dot {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: #58cd99;
  box-shadow: 0 0 0 3px rgba(88, 205, 153, .09);
}

.finance-action-amber {
  background: var(--warning-soft);
  color: var(--warning);
}

.order-operations {
  position: relative;
  display: grid;
  min-height: calc(100vh - var(--topbar-height) - 140px);
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 14px;
}

.order-queue,
.order-detail {
  min-height: 660px;
  overflow: hidden;
}

.order-queue {
  display: flex;
  flex-direction: column;
}

.order-queue-head,
.order-detail-head,
.order-section-head,
.document-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-queue-head {
  min-height: 70px;
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
}

.order-queue-head h2,
.order-detail-head h2,
.order-section-head h3,
.document-section-head h2 {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 650;
}

.queue-count {
  display: grid;
  min-width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 750;
}

.order-filters {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  scrollbar-width: none;
}

.order-filters::-webkit-scrollbar {
  display: none;
}

.order-filter {
  min-height: 31px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 650;
  padding: 7px 9px;
}

.order-filter:hover {
  background: var(--surface-muted);
}

.order-filter.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.queue-search {
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 8px;
  margin: 11px 12px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 0 9px;
}

.queue-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.queue-search svg {
  width: 16px;
  height: 16px;
  color: var(--text-subtle);
}

.queue-search input {
  min-width: 0;
  min-height: 37px;
  border: 0;
  box-shadow: none;
  font-size: 10px;
  padding: 7px 0;
}

.queue-closed-toggle {
  margin: 6px 13px 10px;
  color: var(--text-muted);
  font-size: 9px;
}

.order-list {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 9px;
  scrollbar-color: #d7dde6 transparent;
  scrollbar-width: thin;
}

.order-card {
  display: grid;
  width: 100%;
  min-height: 107px;
  gap: 7px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s var(--ease);
}

.order-card:hover {
  border-color: #cbd5e3;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.order-card.is-selected {
  border-color: #8cacfa;
  box-shadow: 0 0 0 2px rgba(40, 100, 220, .11);
}

.order-card-top,
.order-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.order-card-number {
  color: var(--text-strong);
  font-size: 10.5px;
  font-weight: 700;
}

.order-card-time,
.order-card-meta {
  color: var(--text-muted);
  font-size: 8.5px;
}

.order-card-customer {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-card-total {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
}

.order-status,
.payment-state,
.delivery-state {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .02em;
  padding: 5px 8px;
  text-transform: capitalize;
}

.order-status.status-confirmed {
  background: var(--primary-soft);
  color: var(--primary);
}

.order-status.status-accepted,
.order-status.status-delivered,
.payment-state.status-paid,
.payment-state.status-captured,
.payment-state.status-settled {
  background: var(--success-soft);
  color: var(--success);
}

.order-status.status-dispatched {
  background: var(--violet-soft);
  color: var(--violet);
}

.order-status.status-rejected,
.order-status.status-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}

.order-status.status-closed {
  background: var(--surface-muted);
  color: var(--text-muted);
}

.order-card-skeleton {
  display: grid;
  min-height: 105px;
  gap: 11px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  padding: 14px;
  overflow: hidden;
}

.order-card-skeleton span {
  display: block;
  width: 60%;
  height: 9px;
  border-radius: 5px;
  background: linear-gradient(90deg, #edf0f4 25%, #f7f8fa 50%, #edf0f4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.35s linear infinite;
}

.order-card-skeleton span:nth-child(2) {
  width: 82%;
  height: 13px;
}

.order-card-skeleton span:nth-child(3) {
  width: 43%;
}

.order-queue-empty,
.order-queue-error {
  display: flex;
  min-height: 250px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
}

.order-queue-empty strong,
.order-queue-error strong {
  color: var(--text-strong);
  font-size: 12px;
}

.order-queue-empty p,
.order-queue-error p {
  max-width: 250px;
  margin: 5px 0 13px;
  font-size: 9px;
}

.order-detail {
  display: flex;
  flex-direction: column;
}

.order-detail-empty {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--text-muted);
  text-align: center;
  padding: 30px;
}

.order-detail-empty h2 {
  color: var(--text-strong);
  font-size: 16px;
}

.order-detail-empty p {
  max-width: 360px;
  margin-top: 6px;
  font-size: 10px;
}

.order-detail-content {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.order-detail-content[hidden] {
  display: none;
}

.order-detail-head {
  min-height: 75px;
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
}

.order-detail-head > div {
  min-width: 0;
  flex: 1;
}

.order-detail-head h2 {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
}

.order-detail-head p {
  color: var(--text-muted);
  font-size: 9px;
}

.order-mobile-back {
  display: none;
}

.order-detail-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 18px 18px;
  scrollbar-color: #d7dde6 transparent;
  scrollbar-width: thin;
}

.order-detail-scroll > section {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.order-detail-scroll > section:last-child {
  border-bottom: 0;
}

.order-section-head {
  margin-bottom: 12px;
}

.order-section-head > span,
.order-section-head > a {
  color: var(--text-muted);
  font-size: 9px;
}

.customer-summary {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border-radius: 11px;
  background: var(--surface-soft);
  padding: 13px;
}

.customer-summary > div {
  min-width: 0;
}

.customer-summary strong {
  color: var(--text-strong);
  font-size: 11px;
}

.customer-summary p,
.customer-summary small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 9px;
}

.order-items {
  display: grid;
  gap: 8px;
}

.order-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px;
}

.order-item-image {
  display: grid;
  width: 52px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-subtle);
  object-fit: cover;
  overflow: hidden;
}

.order-item-image svg {
  width: 21px;
  height: 21px;
}

img.order-item-image {
  border: 0;
}

.order-item-copy {
  display: grid;
  min-width: 0;
}

.order-item-copy strong {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item-copy span,
.order-item-copy small {
  color: var(--text-muted);
  font-size: 8.5px;
}

.order-item-total {
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.order-amounts {
  display: grid;
  gap: 7px;
  border-radius: 11px;
  background: var(--surface-soft);
  padding: 13px;
}

.order-amounts > div {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 9.5px;
}

.order-amounts dd {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.order-amounts .order-total {
  margin-top: 3px;
  border-top: 1px solid var(--border);
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 700;
  padding-top: 9px;
}

.payment-reference {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 8.5px;
}

.fulfilment-grid,
.settlement-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--border);
  overflow: hidden;
}

.fulfilment-grid > div,
.settlement-meta > div {
  display: grid;
  min-height: 57px;
  align-content: center;
  background: var(--surface);
  padding: 9px 11px;
}

.fulfilment-grid dt,
.settlement-meta dt {
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 650;
  text-transform: uppercase;
}

.fulfilment-grid dd,
.settlement-meta dd {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
}

.order-timeline {
  position: relative;
  display: grid;
  gap: 14px;
  list-style: none;
}

.order-event {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
}

.order-event:not(:last-child)::before {
  position: absolute;
  top: 22px;
  bottom: -14px;
  left: 10px;
  width: 1px;
  background: var(--border);
  content: "";
}

.event-dot {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 8px;
  font-weight: 750;
}

.order-event-copy {
  display: grid;
}

.order-event-copy strong {
  color: var(--text-strong);
  font-size: 9.5px;
  text-transform: capitalize;
}

.order-event-copy p,
.order-event-copy small,
.order-event-time {
  color: var(--text-muted);
  font-size: 8px;
}

.order-actions {
  display: flex;
  min-height: 69px;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .96);
  padding: 11px 18px;
}

.order-action-reject,
.order-action-cancel {
  margin-right: auto;
  border-color: #eccfd2;
  background: var(--surface);
  color: var(--danger);
}

.order-feedback {
  position: fixed;
  z-index: 95;
  right: 22px;
  bottom: 22px;
  max-width: 380px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}

.order-feedback:not(:empty) {
  border: 1px solid #cde9de;
  background: var(--success-soft);
  color: #116d4d;
  font-size: 10px;
  padding: 11px 13px;
  animation: notice-in .22s var(--ease) both;
}

.order-feedback.is-error:not(:empty) {
  border-color: #f1ced1;
  background: var(--danger-soft);
  color: #a72731;
}

.order-action-dialog {
  width: min(500px, calc(100vw - 28px));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  padding: 24px;
}

.order-action-dialog[open] {
  animation: dialog-in .2s var(--ease) both;
}

.order-action-dialog::backdrop {
  background: rgba(11, 18, 30, .54);
  backdrop-filter: blur(3px);
}

.order-action-dialog h2 {
  margin-top: 6px;
  color: var(--text-strong);
  font-size: 19px;
}

.order-action-dialog form > p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 10px;
}

.order-dialog-fields {
  margin-top: 18px;
}

.order-dialog-fields .field small {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 8px;
}

.order-action-dialog .order-dialog-error {
  margin-top: 14px;
  border: 1px solid #f1ced1;
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: #9f2630;
  font-size: 11px;
  line-height: 1.45;
  padding: 10px 12px;
}

.settlement-sheet {
  max-width: 960px;
}

.settlement-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 26px;
  border-radius: 12px;
  background: var(--success-soft);
  padding: 18px;
}

.settlement-hero h2 {
  margin-top: 5px;
  color: var(--text-strong);
  font-size: 16px;
}

.settlement-hero p {
  color: var(--text-muted);
  font-size: 9px;
}

.settlement-hero > div:last-child {
  display: grid;
  text-align: right;
}

.settlement-hero > div:last-child span {
  color: var(--success);
  font-size: 8px;
  font-weight: 650;
  text-transform: uppercase;
}

.settlement-hero > div:last-child strong {
  color: #126f4e;
  font-size: 24px;
}

.settlement-hero-payment {
  background: var(--primary-soft);
}

.settlement-hero-payment > div:last-child span {
  color: var(--primary);
}

.settlement-hero-payment > div:last-child strong {
  color: #183d83;
}

.settlement-meta {
  margin: 0 26px 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.document-section-head {
  margin: 0 26px;
  border-top: 1px solid var(--border);
  padding: 20px 0 12px;
}

.document-section-head > div {
  display: grid;
}

.document-section-head > span {
  color: var(--text-muted);
  font-size: 9px;
}

.settlement-note {
  margin: 22px 26px;
}

.settlement-note p {
  margin-top: 6px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 9.5px;
  padding: 11px;
}

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popover-in {
  from { opacity: 0; transform: translateY(-5px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes notice-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes notice-out {
  to { opacity: 0; transform: translateY(-5px); }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes shimmer {
  to { background-position: -200% 0; }
}

@keyframes order-detail-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 232px;
  }

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

  .kpi-card {
    min-height: 154px;
  }

  .line-card {
    grid-template-columns: 26px minmax(0, 1fr) 130px 34px;
  }

  .line-fields,
  .line-fields-purchase {
    grid-template-columns: repeat(3, minmax(115px, 1fr));
  }

  .line-item-field {
    grid-column: span 2;
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 272px;
  }

  .sidebar {
    transform: translateX(-102%);
    box-shadow: var(--shadow-lg);
    transition: transform .28s var(--ease);
  }

  .nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-button {
    display: inline-grid;
  }

  .nav-scrim {
    position: fixed;
    z-index: 60;
    inset: 0;
    display: block;
    visibility: hidden;
    background: rgba(10, 17, 29, .48);
    opacity: 0;
    transition: opacity .22s ease, visibility .22s ease;
  }

  .nav-open .nav-scrim {
    visibility: visible;
    opacity: 1;
  }

  .workspace {
    margin-left: 0;
  }

  .form-actions {
    left: 0;
  }

  .editor-layout,
  .master-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  }

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

  .settings-grid,
  .report-grid,
  .finance-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    padding: 0 16px;
  }

  .main-content {
    padding: 22px 16px calc(var(--mobile-nav-height) + 28px);
  }

  .mobile-tabs {
    position: fixed;
    z-index: 45;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, .95);
    padding: 5px 5px env(safe-area-inset-bottom);
    backdrop-filter: blur(16px);
  }

  .mobile-tabs a,
  .mobile-tabs button {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 600;
  }

  .mobile-tabs svg {
    width: 19px;
    height: 19px;
  }

  .mobile-tabs .is-active {
    background: var(--primary-soft);
    color: var(--primary);
  }

  .form-actions {
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    min-height: 66px;
    padding: 10px 16px;
  }

  .editor-form,
  .transaction-editor {
    padding-bottom: 138px;
  }

  .dashboard-grid,
  .dashboard-grid-tables,
  .editor-layout,
  .master-layout,
  .split-settings,
  .transaction-bottom,
  .transaction-bottom-summary {
    grid-template-columns: 1fr;
  }

  .editor-aside {
    order: -1;
  }

  .guidance-card:not(.sticky-card) {
    display: none;
  }

  .sticky-card,
  .add-reference-card {
    position: static;
  }

  .chart-panel,
  .quick-panel {
    min-height: auto;
  }

  .line-chart svg {
    height: 200px;
  }

  .report-filters,
  .transaction-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-search-field,
  .filter-grow {
    grid-column: span 2;
  }

  .report-filters .field,
  .transaction-filters .field {
    min-width: 0;
  }

  .filter-submit {
    width: 100%;
  }

  .line-card {
    grid-template-columns: 26px minmax(0, 1fr) 34px;
  }

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

  .line-total {
    grid-column: 2;
    justify-items: start;
  }

  .remove-line {
    grid-column: 3;
    grid-row: 1;
  }

  .line-advanced {
    grid-column: 2 / -1;
  }

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

  .order-operations {
    display: block;
    min-height: calc(100vh - var(--topbar-height) - var(--mobile-nav-height) - 130px);
  }

  .order-queue,
  .order-detail {
    min-height: calc(100vh - var(--topbar-height) - var(--mobile-nav-height) - 132px);
  }

  .order-detail {
    display: none;
  }

  .order-operations.is-detail-open .order-queue {
    display: none;
  }

  .order-operations.is-detail-open .order-detail {
    display: flex;
    animation: order-detail-in .22s var(--ease) both;
  }

  .order-mobile-back {
    display: inline-grid;
  }

  .order-detail-scroll {
    padding-right: 14px;
    padding-left: 14px;
  }

  .order-actions {
    position: sticky;
    z-index: 5;
    bottom: 0;
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .order-actions .button {
    flex: 1;
  }

  .order-action-reject,
  .order-action-cancel {
    margin-right: 0;
  }

  .order-feedback {
    right: 12px;
    bottom: calc(var(--mobile-nav-height) + 12px);
    left: 12px;
    max-width: none;
  }

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

@media (max-width: 700px) {
  input,
  select,
  textarea,
  .input-shell input,
  .search-box input,
  .select-box select {
    min-height: 44px;
    font-size: 16px;
  }

  .page-identity .eyebrow,
  .context-chip,
  .user-copy,
  .user-menu .chevron {
    display: none;
  }

  .user-menu summary {
    padding: 4px;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 18px;
  }

  .page-heading > .button {
    align-self: flex-start;
  }

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

  .heading-actions .button {
    flex: 1;
  }

  .heading-with-back {
    gap: 9px;
  }

  .page-heading h1 {
    font-size: 26px;
  }

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

  .kpi-card {
    min-height: 145px;
    padding: 14px;
  }

  .kpi-value {
    font-size: 19px;
  }

  .kpi-meta {
    display: none;
  }

  .data-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .search-form,
  .search-form-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .search-box,
  .select-box {
    min-width: 0;
  }

  .search-form-filters .select-box {
    grid-column: 1 / -1;
  }

  .search-form .button-ghost {
    grid-column: 1 / -1;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody {
    background: var(--surface-soft);
    padding: 10px;
  }

  .responsive-table tr {
    position: relative;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
  }

  .responsive-table tr:last-child {
    margin-bottom: 0;
  }

  .responsive-table td {
    display: grid;
    min-height: 42px;
    grid-template-columns: 105px minmax(0, 1fr);
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 8px 11px;
    text-align: right;
    font-size: 13px;
  }

  .responsive-table td::before {
    color: var(--text-muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
  }

  .responsive-table td:first-child {
    display: block;
    padding: 12px;
    text-align: left;
  }

  .responsive-table td:first-child::before {
    display: none;
  }

  .responsive-table .table-actions {
    display: flex;
    min-height: 49px;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
  }

  .responsive-table .table-actions::before {
    margin-right: auto;
  }

  .responsive-table .table-primary {
    min-width: 0;
  }

  .report-table {
    min-width: 0;
  }

  .report-table tfoot {
    display: block;
    background: var(--surface-soft);
    padding: 0 10px 10px;
  }

  .report-table tfoot tr {
    margin-bottom: 0;
    border-color: var(--border-strong);
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination {
    justify-content: space-between;
  }

  .page-count {
    align-self: center;
  }

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

  .field-grid-three > .field:last-child:nth-child(odd) {
    grid-column: span 2;
  }

  .settings-grid,
  .report-grid,
  .finance-action-grid {
    grid-template-columns: 1fr;
  }

  .document-sheet,
  .voucher-sheet {
    border-radius: 12px;
  }

  .document-header,
  .voucher-head,
  .document-parties,
  .document-summary {
    padding: 17px;
  }

  .document-parties,
  .document-summary {
    grid-template-columns: 1fr;
  }

  .document-table {
    padding: 0 17px;
  }

  .document-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 17px;
  }

  .voucher-flow {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .flow-arrow {
    margin: -4px auto;
    transform: rotate(90deg);
  }

  .voucher-amount {
    margin: 0 20px;
  }

  .voucher-note {
    margin: 20px;
  }

  .settings-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .settings-tabs a {
    flex: 1 0 auto;
    text-align: center;
  }

  .state-page {
    min-height: calc(100vh - var(--topbar-height) - var(--mobile-nav-height) - 60px);
  }

  .settlement-hero {
    align-items: flex-start;
    flex-direction: column;
    margin: 17px;
  }

  .settlement-hero > div:last-child {
    width: 100%;
    border-top: 1px solid rgba(22, 131, 92, .15);
    padding-top: 12px;
    text-align: left;
  }

  .settlement-meta {
    margin: 0 17px 18px;
    grid-template-columns: 1fr;
  }

  .document-section-head,
  .settlement-note {
    margin-right: 17px;
    margin-left: 17px;
  }
}

@media (max-width: 560px) {
  .field-grid-two,
  .field-grid-three,
  .report-filters,
  .transaction-filters {
    grid-template-columns: 1fr;
  }

  .field-span-two,
  .field-grid-three > .field:last-child:nth-child(odd),
  .report-search-field,
  .filter-grow {
    grid-column: auto;
  }

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

  .kpi-card {
    min-height: 134px;
  }

  .kpi-top {
    margin-bottom: 11px;
  }

  .kpi-icon {
    width: 32px;
    height: 32px;
  }

  .trend-pill {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .line-editor-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .line-editor-head > .button {
    width: 100%;
  }

  .line-card {
    grid-template-columns: 24px minmax(0, 1fr) 34px;
    padding: 10px;
  }

  .line-fields,
  .line-fields-purchase,
  .line-advanced-grid {
    grid-template-columns: 1fr;
  }

  .line-item-field {
    grid-column: auto;
  }

  .split-input {
    grid-template-columns: 1fr;
  }

  .form-actions .button {
    flex: 1;
  }

  .simple-list-row {
    min-height: 58px;
  }

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

  .order-action-dialog {
    padding: 20px;
  }

  .order-action-dialog .field-grid-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .auth-layout {
    display: block;
  }

  .auth-story {
    display: none;
  }

  .auth-form-panel {
    min-height: 100vh;
    min-height: 100dvh;
    align-items: start;
    background: var(--surface);
    padding:
      max(28px, env(safe-area-inset-top))
      max(20px, env(safe-area-inset-right))
      max(34px, env(safe-area-inset-bottom))
      max(20px, env(safe-area-inset-left));
  }

  .auth-form-wrap {
    margin: auto;
  }

  .auth-form-card {
    border: 0;
    border-radius: 0;
    background: var(--surface);
    box-shadow: none;
    padding: 0;
  }

  .auth-form-card::before {
    display: none;
  }

  .auth-card-topline {
    justify-content: space-between;
    margin-bottom: 44px;
  }

  .mobile-auth-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 700;
  }

  .mobile-auth-brand .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }
}

@media (max-width: 580px) {
  .auth-form-panel {
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
  }

  .auth-form-heading {
    margin-bottom: 27px;
  }

  .auth-form-heading h2 {
    font-size: clamp(27px, 8vw, 33px);
  }

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

  .auth-fieldset legend small,
  .auth-keyboard-hint {
    display: none;
  }

  .auth-fieldset + .auth-fieldset {
    padding-top: 19px;
  }
}

@media (max-width: 350px) {
  .auth-security-chip {
    display: none;
  }
}

@media (max-height: 740px) and (min-width: 981px) {
  .auth-story-content {
    padding: 36px 0;
  }

  .auth-story h1 {
    font-size: clamp(35px, 3.8vw, 52px);
  }

  .auth-order-flow {
    margin-top: 23px;
  }

  .auth-form-card {
    padding: 30px 36px;
  }

  .auth-card-topline {
    margin-bottom: 16px;
  }

  .auth-form-heading {
    margin-bottom: 22px;
  }

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

@media (hover: none), (pointer: coarse) {
  button,
  a,
  summary {
    touch-action: manipulation;
  }

  .button,
  .icon-button,
  .nav-link,
  .menu-action,
  .order-filter,
  .notice-close {
    min-height: 44px;
  }

  .icon-button,
  .notice-close {
    min-width: 44px;
  }

  .check-control {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  .button,
  .panel,
  .form-card,
  .auth-form-card,
  .input-shell,
  .check-box,
  .kpi-card,
  .nav-link,
  input,
  select,
  textarea {
    border: 1px solid CanvasText;
  }

  .status-dot,
  .live-label > span,
  .draft-badge > span {
    forced-color-adjust: none;
  }
}

@media print {
  @page {
    size: auto;
    margin: 12mm;
  }

  :root {
    --text: #000;
    --text-strong: #000;
    --text-muted: #444;
    --border: #ccc;
  }

  body,
  .app-body,
  .workspace,
  .main-content {
    min-height: auto;
    margin: 0;
    background: #fff;
    padding: 0;
  }

  .sidebar,
  .topbar,
  .mobile-tabs,
  .nav-scrim,
  .form-actions,
  .notice,
  .no-print {
    display: none !important;
  }

  .document-sheet,
  .voucher-sheet,
  .report-results,
  .panel {
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .report-results {
    margin: 0;
  }

  .report-table {
    min-width: 0;
    font-size: 8pt;
  }

  .data-table th,
  .data-table td {
    color: #000;
    padding: 5px;
  }

  .document-header,
  .voucher-head {
    padding-top: 0;
  }

  .reveal {
    animation: none;
  }

  a {
    text-decoration: none;
  }
}
