:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #eef1f5;
  --text: #071a3d;
  --text-soft: #5c6470;
  --text-faint: #747d8b;
  --line: #dde3ec;
  --line-strong: #cfd6e5;
  --accent: #553bd4;
  --accent-hover: #4c34c6;
  --accent-soft: #efecfd;
  --brand-aqua: #47e1ed;
  --brand-aqua-strong: #10bed1;
  --brand-aqua-soft: #e9fbfc;
  --brand-yellow: #fff9ae;
  --nav: #553bd4;
  --nav-soft: #644bdd;
  --nav-text: #f6f6fb;
  --danger: #b4232c;
  --danger-soft: #fdebed;
  --warning: #8a5a00;
  --warning-soft: #fff4d9;
  --success: #1c6b4a;
  --success-soft: #e2f4eb;
  --shadow: 0 16px 40px rgb(71 56 146 / 8%);
  --radius-card: 14px;
  --radius-control: 10px;
  --sidebar-width: 246px;
}

* {
  box-sizing: border-box;
}

html {
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--bg);
}

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

button {
  color: inherit;
}

[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;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.button.is-disabled {
  pointer-events: none;
  opacity: .62;
}

button,
select,
input,
textarea {
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 120ms ease, box-shadow 150ms ease;
}

button:active {
  transform: translateY(1px);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent);
  outline-offset: 2px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
  min-height: 100dvh;
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(32px, 5vw, 72px);
  color: #f7f7fc;
  background:
    radial-gradient(circle at 82% 16%, rgb(71 225 237 / 24%), transparent 28%),
    linear-gradient(145deg, #5e43df 0%, #553bd4 64%, #4c34c6 100%);
}

.login-brand::after {
  position: absolute;
  right: -18%;
  bottom: -32%;
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 50%;
  content: "";
}

.brand-lockup {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  color: var(--nav-text);
}

.brand-logo {
  display: block;
  width: 76px;
  height: auto;
  object-fit: contain;
}

.brand-name {
  font-size: 27px;
  font-weight: 800;
  line-height: .68;
  letter-spacing: -2px;
}

.brand-product {
  padding-bottom: 1px;
  color: #78d8df;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.brand-lockup-light .brand-name {
  font-size: clamp(38px, 4vw, 58px);
  letter-spacing: -4px;
}

.brand-lockup-light .brand-logo {
  width: clamp(150px, 18vw, 238px);
}

.brand-lockup-light .brand-product {
  font-size: 14px;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.login-copy h1 {
  max-width: 620px;
  margin: 12px 0 20px;
  font-size: clamp(46px, 6vw, 82px);
  line-height: .94;
  letter-spacing: -.055em;
}

.login-copy > p:last-child {
  max-width: 520px;
  margin: 0;
  color: rgb(247 247 252 / 74%);
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.45;
}

.login-proof {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-proof span,
.demo-chip {
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  padding: 7px 11px;
  color: rgb(255 255 255 / 78%);
  font-size: 12px;
  font-weight: 700;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 96px);
  background: var(--surface);
}

.login-form {
  display: grid;
  width: min(420px, 100%);
  gap: 22px;
}

.login-form h2 {
  margin: 8px 0 8px;
  font-size: 34px;
  letter-spacing: -.035em;
}

.login-note {
  margin: 0;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

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

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  padding: 28px 18px 20px;
  color: var(--nav-text);
  background: var(--nav);
}

.sidebar .brand-lockup {
  padding: 0 10px 32px;
}

.main-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: var(--radius-control);
  padding: 0 13px;
  color: rgb(246 246 251 / 68%);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 680;
  text-align: left;
}

.nav-item:hover {
  color: var(--nav-text);
  background: rgb(255 255 255 / 7%);
}

.nav-item.is-active {
  color: var(--nav-text);
  background: var(--nav-soft);
  box-shadow: inset 3px 0 #68d4dc;
}

.nav-count {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #162b31;
  background: #7bdbe2;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgb(255 255 255 / 11%);
  padding: 18px 9px 0;
}

.sidebar-foot p {
  margin: 10px 0 0;
  color: rgb(255 255 255 / 46%);
  font-size: 12px;
}

.workspace {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px clamp(20px, 3vw, 44px);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
}

.topbar h2,
.topbar-context {
  margin: 0;
}

.topbar h2 {
  font-size: 19px;
  letter-spacing: -.02em;
}

.topbar-context {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-block {
  display: grid;
  min-width: 150px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.user-block strong {
  font-size: 13px;
}

.user-block span {
  color: var(--text-faint);
  font-size: 11px;
}

.view {
  display: none;
  max-width: 1560px;
  margin: 0 auto;
  padding: 36px clamp(20px, 3vw, 44px) 70px;
}

.view.is-active {
  display: block;
  animation: view-in 180ms ease-out;
}

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

.page-heading {
  max-width: 800px;
  margin-bottom: 28px;
}

.page-heading h1 {
  margin: 7px 0 8px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -.048em;
}

.page-heading > p:last-child,
.page-heading > div > p:last-child,
.section-heading p,
.muted {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.heading-with-action {
  display: flex;
  max-width: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 830;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.button,
.icon-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 0 15px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.button-primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 22%, transparent);
}

.button-primary:hover {
  background: var(--accent-hover);
}

.button-soft {
  border-color: color-mix(in srgb, var(--brand-aqua-strong) 24%, var(--line));
  color: #064d57;
  background: var(--brand-aqua-soft);
}

.button-soft:hover {
  background: #d9f7f9;
}

.button-outline,
.icon-button {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface);
}

.button-outline:hover,
.icon-button:hover,
.button-quiet:hover {
  background: var(--surface-strong);
}

.button-quiet {
  color: var(--text-soft);
  background: transparent;
}

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

.button-small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.button-wide {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: .48;
  box-shadow: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  margin-bottom: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  display: grid;
  min-height: 154px;
  align-content: space-between;
  border-left: 1px solid var(--line);
  padding: 22px;
}

.metric:first-child {
  border-left: 0;
}

.metric span,
.summary-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 720;
}

.metric strong {
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: clamp(24px, 2.5vw, 36px);
  letter-spacing: -.05em;
}

.metric small {
  color: var(--text-faint);
}

.metric-featured {
  color: #071a3d;
  background: linear-gradient(135deg, #c9f7f9, var(--brand-aqua));
}

.metric-featured span,
.metric-featured small {
  color: rgb(7 26 61 / 68%);
}

.content-grid-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.table-surface {
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
}

.section-heading.compact {
  padding: 0 0 20px;
}

.section-heading h3 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -.025em;
}

.section-heading p {
  font-size: 13px;
}

.operations-rail {
  overflow: hidden;
  border-radius: var(--radius-card);
  color: #f7f7fb;
  background: var(--nav);
  box-shadow: var(--shadow);
}

.rail-heading {
  display: grid;
  gap: 4px;
  padding: 22px;
  background: var(--nav-soft);
}

.rail-heading span {
  color: rgb(255 255 255 / 56%);
  font-size: 11px;
  text-transform: uppercase;
}

.workflow-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 10px 22px 18px 42px;
}

.workflow-list li {
  padding: 13px 0 13px 6px;
  color: rgb(255 255 255 / 88%);
}

.workflow-list span,
.workflow-list small {
  display: block;
}

.workflow-list span {
  font-weight: 740;
}

.workflow-list small {
  margin-top: 3px;
  color: rgb(255 255 255 / 48%);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--text-faint);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 830;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: var(--text-soft);
}

td strong,
.cell-title {
  display: block;
  color: var(--text);
  font-weight: 720;
}

.cell-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 11px;
}

.money {
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--text-soft);
  background: var(--surface-strong);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

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

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

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
}

.empty-state p {
  margin: 0;
  color: var(--text-soft);
}

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

.document-main,
.settings-grid {
  display: grid;
  gap: 18px;
}

.form-section {
  padding: 24px;
}

.document-status {
  display: grid;
  min-width: 160px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
  text-align: right;
}

.document-status span {
  color: var(--text-faint);
  font-size: 11px;
  text-transform: uppercase;
}

.document-status strong {
  margin-top: 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 21px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  margin-bottom: 22px;
  background: var(--surface-soft);
}

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

.segmented label {
  position: relative;
  border-left: 1px solid var(--line);
  cursor: pointer;
}

.segmented label:first-child {
  border-left: 0;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 0 10px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.segmented input:checked + span {
  color: #ffffff;
  background: var(--accent);
}

.segmented input:focus-visible + span {
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

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

.field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.field > span,
.field > label,
.search-field > span,
.filter-field > span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 730;
}

.field small {
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.35;
}

.field-input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.field-input-action .button {
  min-width: 112px;
  padding-inline: 12px;
  white-space: nowrap;
}

.document-lookup-source {
  width: fit-content;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 720;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.document-lookup-result {
  display: grid;
  gap: 3px;
  border: 1px solid #b8e2d1;
  border-radius: 10px;
  padding: 9px 11px;
  color: #176343;
  background: #effaf5;
  font-size: 10px;
  line-height: 1.4;
}

.document-lookup-result[hidden] {
  display: none;
}

.document-lookup-result.is-warning {
  border-color: #f0d69c;
  color: #775517;
  background: #fff9ea;
}

.document-lookup-result strong,
.document-lookup-result span {
  display: block;
}

.required-label::after,
label.field:has(input[required]) > span::after,
label.field:has(select[required]) > span::after,
label.field:has(textarea[required]) > span::after {
  content: " *";
  color: var(--danger);
  font-weight: 850;
}

.required-note {
  margin: 12px 0 0;
  color: var(--text-faint);
  font-size: 11px;
}

.required-note span {
  color: var(--danger);
  font-weight: 850;
}

.document-required-note {
  margin: -22px 0 16px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  padding: 9px 11px;
  color: var(--text);
  background: var(--surface);
}

textarea {
  resize: vertical;
}

#productName {
  min-height: 112px;
  line-height: 1.5;
}

.product-image-field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 760;
}

.product-image-editor {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 12px;
  background: var(--surface-soft);
}

.product-image-preview,
.catalog-product-image {
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  color: var(--text-faint);
  background: #ffffff;
  font-size: 10px;
}

.product-image-preview {
  width: 116px;
  aspect-ratio: 4 / 3;
}

.catalog-product-image {
  width: 52px;
  height: 52px;
}

.product-image-preview img,
.catalog-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.product-image-actions small {
  flex-basis: 100%;
  color: var(--text-faint);
  line-height: 1.45;
}

.product-image-url-field {
  display: grid;
  flex-basis: 100%;
  gap: 6px;
  margin-top: 2px;
}

.product-image-url-field span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 730;
}

.product-image-picker {
  cursor: pointer;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

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

.field-span-3 {
  grid-column: span 3;
}

.align-field {
  align-self: end;
  margin-bottom: 1px;
}

.whatsapp-quick-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #bdeff2;
  border-radius: var(--radius-control);
  margin: -6px 0 20px;
  padding: 13px 14px;
  color: #143b42;
  background: var(--brand-aqua-soft);
}

.whatsapp-quick-order > div {
  display: grid;
  gap: 3px;
}

.whatsapp-quick-order strong {
  font-size: 13px;
}

.whatsapp-quick-order span {
  color: #53636c;
  font-size: 11px;
  line-height: 1.4;
}

.sunat-pdf-import {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: var(--radius-control);
  margin: -8px 0 14px;
  padding: 13px 14px;
  background: linear-gradient(110deg, #f8f6ff, #f0fcfd);
}

.sunat-pdf-import > div,
.pdf-import-heading > div,
.legacy-migration-result {
  display: grid;
  gap: 4px;
}

.sunat-pdf-import strong,
.pdf-import-heading strong,
.legacy-migration-result strong {
  font-size: 13px;
}

.sunat-pdf-import span,
.pdf-import-heading span,
.legacy-migration-result span {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}

.pdf-import-panel {
  display: grid;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: var(--radius-control);
  margin: 0 0 20px;
  padding: 14px;
  background: #fbfaff;
}

.pdf-import-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.pdf-import-warnings {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}

.pdf-import-actions,
.legacy-migration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payment-account-field {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.payment-account-field legend {
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 730;
}

.payment-account-field > small {
  display: block;
  margin-top: 7px;
  color: var(--text-faint);
  font-size: 10px;
}

.payment-account-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.payment-account-choice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  padding: 12px;
  background: var(--surface);
  cursor: pointer;
}

.payment-account-choice:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--accent-soft);
  box-shadow: inset 3px 0 var(--accent);
}

.payment-account-choice input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.payment-account-choice > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.payment-account-choice strong,
.payment-account-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-account-choice small {
  color: var(--text-faint);
  font-size: 10px;
}

.payment-account-choice em {
  color: var(--text-faint);
  font-size: 9px;
  font-style: normal;
  font-weight: 780;
  text-transform: uppercase;
}

.payment-account-empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-control);
  padding: 13px;
  color: var(--text-soft);
  font-size: 12px;
}

.client-picker {
  position: relative;
}

.client-picker-results {
  position: absolute;
  z-index: 7;
  inset: 68px 0 auto;
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  padding: 6px;
  background: var(--surface);
  box-shadow: 0 18px 36px rgb(71 56 146 / 16%);
}

.client-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.client-result:hover,
.client-result:focus-visible {
  background: var(--accent-soft);
}

.client-result span:first-child,
.client-result strong,
.client-result small {
  display: block;
}

.client-result small,
.client-result-document {
  color: var(--text-faint);
  font-size: 11px;
}

.client-result-document {
  font-family: inherit;
  white-space: nowrap;
}

.client-result-empty {
  display: grid;
  gap: 4px;
  padding: 14px;
  color: var(--text-soft);
  font-size: 12px;
}

.line-items {
  display: grid;
  gap: 12px;
}

.line-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) 82px 110px 118px 118px 112px 42px;
  gap: 10px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.line-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.line-item .field > span {
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.line-secondary {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 190px 190px;
  gap: 10px;
  margin-top: -2px;
}

.line-amount {
  display: grid;
  min-height: 42px;
  align-items: center;
  border-radius: var(--radius-control);
  padding: 0 10px;
  color: var(--text);
  background: var(--surface-strong);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.remove-line {
  display: grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--danger);
  background: var(--danger-soft);
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}

.document-summary {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 22px;
  padding: 24px;
}

.document-summary > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.document-summary > div:first-child strong {
  color: var(--accent);
  font-size: 12px;
}

.document-summary dl {
  display: grid;
  gap: 13px;
  margin: 0;
}

.document-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.document-summary dt {
  color: var(--text-soft);
  font-size: 13px;
}

.document-summary dd {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.document-summary .summary-total {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--text);
}

.document-summary .summary-total dt,
.document-summary .summary-total dd {
  color: var(--text);
  font-size: 19px;
  font-weight: 830;
}

.tax-note,
.info-callout {
  border-radius: var(--radius-control);
  padding: 13px;
  color: var(--accent);
  background: var(--accent-soft);
}

.tax-note p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}

.shipping-fields {
  display: grid;
  gap: 18px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 22px;
}

.info-callout {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.info-callout span {
  color: var(--text-soft);
}

.form-error {
  margin: 0;
  border-radius: var(--radius-control);
  padding: 10px 12px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 12px;
  line-height: 1.45;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
}

.search-field {
  display: grid;
  width: min(360px, 100%);
  gap: 6px;
}

.documents-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 220px) auto;
}

.documents-toolbar .search-field {
  width: 100%;
}

.filter-field {
  display: grid;
  gap: 6px;
}

.documents-toolbar .toolbar-count {
  align-self: center;
  justify-self: end;
}

.document-mode-note {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--brand-aqua-strong) 28%, var(--line));
  border-radius: var(--radius-control);
  margin: -6px 0 18px;
  padding: 12px 14px;
  color: #174b55;
  background: var(--brand-aqua-soft);
  font-size: 12px;
}

.document-mode-note span {
  color: #53636c;
}

.document-row-actions {
  justify-content: flex-start;
  min-width: 220px;
}

.toolbar-count {
  color: var(--text-faint);
  font-size: 12px;
}

.settings-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  align-items: start;
}

.audit-panel {
  grid-column: 1 / -1;
}

.sunat-panel {
  grid-column: 1 / -1;
}

.legacy-migration-panel {
  grid-column: 1 / -1;
}

.legacy-migration-panel > p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.legacy-migration-panel > small {
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.5;
}

.legacy-migration-result {
  border-left: 4px solid var(--brand-aqua-strong);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--brand-aqua-soft);
}

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

.sunat-flow-list > div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 15px;
  background: var(--surface-soft);
}

.sunat-flow-list strong {
  color: var(--text);
  font-size: 13px;
}

.sunat-flow-list span,
.sunat-panel-note {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.sunat-panel-note {
  margin: 14px 0 0;
}

.bank-list,
.audit-list {
  display: grid;
  gap: 10px;
}

.bank-row,
.audit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: var(--radius-control);
  padding: 13px;
  background: var(--surface-soft);
}

.bank-row strong,
.bank-row span,
.audit-row strong,
.audit-row span {
  display: block;
}

.bank-row span,
.audit-row span {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 11px;
}

.bank-row.is-muted {
  opacity: 0.64;
}

.audit-row time {
  color: var(--text-faint);
  font-size: 11px;
  white-space: nowrap;
}

.modal {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  border: 0;
  border-radius: var(--radius-card);
  padding: 0;
  color: var(--text);
  background: transparent;
  box-shadow: 0 26px 90px rgb(10 15 24 / 30%);
}

.modal::backdrop {
  background: rgb(12 17 24 / 58%);
  backdrop-filter: blur(4px);
}

.modal-card {
  overflow: auto;
  max-height: calc(100dvh - 28px);
  border-radius: var(--radius-card);
  padding: 24px;
  background: var(--surface);
}

.modal-card-small {
  max-width: 620px;
}

.modal-card > header,
.modal-card > footer,
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-card > header h2 {
  margin: 5px 0 0;
  font-size: 25px;
  letter-spacing: -.03em;
}

.modal-card > footer {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
  justify-content: flex-end;
}

.modal-body {
  margin-top: 22px;
}

.preview-modal {
  width: min(1120px, calc(100vw - 24px));
}

.preview-shell {
  overflow: auto;
  max-height: calc(100dvh - 24px);
  border-radius: var(--radius-card);
  background: var(--bg);
}

.preview-toolbar {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  background: var(--surface);
}

.preview-toolbar > div {
  display: flex;
  gap: 8px;
  align-items: center;
}

.preview-toolbar span {
  color: var(--text-faint);
  font-size: 12px;
}

.document-preview {
  width: min(820px, calc(100% - 32px));
  min-height: 1050px;
  margin: 24px auto;
  padding: 42px;
  color: #202b35;
  background: #ffffff;
  box-shadow: 0 14px 50px rgb(32 46 58 / 14%);
}

.receipt-head {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 28px;
  align-items: start;
  border-bottom: 4px solid #087b87;
  padding-bottom: 22px;
}

.receipt-brand {
  color: #242044;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -.05em;
}

.receipt-brand span {
  color: #087b87;
}

.receipt-company {
  display: grid;
  gap: 4px;
  margin-top: 13px;
  color: #596671;
  font-size: 12px;
}

.receipt-box {
  border: 2px solid #242044;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
}

.receipt-box strong,
.receipt-box span {
  display: block;
}

.receipt-box strong {
  margin: 7px 0;
  font-size: 17px;
}

.receipt-box span {
  color: #596671;
  font-family: Arial, Helvetica, sans-serif;
}

.demo-watermark {
  margin-top: 10px;
  border-radius: 7px;
  padding: 7px;
  color: #8a5a00;
  background: #fff4d9;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.receipt-info {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 22px;
  margin: 26px 0;
}

.receipt-info dl,
.receipt-totals dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.receipt-info dl > div,
.receipt-totals dl > div {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 10px;
}

.receipt-info dt,
.receipt-totals dt {
  color: #77828b;
  font-size: 11px;
}

.receipt-info dd,
.receipt-totals dd {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.receipt-table th {
  border-color: #dfe4e8;
  color: #53616c;
  background: #f2f4f6;
}

.receipt-table td {
  border-color: #e6e9ec;
  color: #53616c;
}

.receipt-table .money {
  color: #202b35;
}

.receipt-totals {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  margin-top: 24px;
}

.receipt-totals dl > div {
  grid-template-columns: 1fr 110px;
  border-bottom: 1px solid #e7eaed;
  padding-bottom: 8px;
}

.receipt-totals .grand-total dt,
.receipt-totals .grand-total dd {
  color: #202b35;
  font-size: 16px;
}

.receipt-notes {
  color: #66737d;
  font-size: 11px;
  line-height: 1.55;
}

.receipt-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  border-top: 1px solid #dde2e6;
  margin-top: 28px;
  padding-top: 18px;
  color: #66737d;
  font-size: 10px;
  line-height: 1.5;
}

.shipment-ticket {
  margin-top: 28px;
  border: 2px dashed #087b87;
  border-radius: 10px;
  padding: 18px;
}

.shipment-ticket header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.shipment-ticket h3,
.shipment-ticket p {
  margin: 0;
}

.shipment-ticket h3 {
  font-size: 16px;
}

.shipment-ticket p {
  margin-top: 4px;
  color: #65727d;
  font-size: 11px;
}

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

.shipment-grid div {
  border-radius: 8px;
  padding: 10px;
  background: #f3f6f7;
}

.shipment-grid span,
.shipment-grid strong {
  display: block;
}

.shipment-grid span {
  color: #77828b;
  font-size: 9px;
  text-transform: uppercase;
}

.shipment-grid strong {
  margin-top: 4px;
  font-size: 11px;
}

/* NanoLoo brand refresh and non-blocking document flow */
.sidebar {
  background:
    radial-gradient(circle at 10% 0%, rgb(71 225 237 / 16%), transparent 24%),
    linear-gradient(180deg, #5e43df 0%, #553bd4 58%, #4c34c6 100%);
}

.brand-product {
  color: var(--brand-aqua);
}

.sidebar .brand-lockup {
  align-items: center;
}

.sidebar .brand-product {
  color: var(--brand-yellow);
}

.nav-item.is-active {
  color: #071a3d;
  background: var(--brand-aqua);
  box-shadow: none;
}

.nav-item:hover:not(.is-active) {
  background: rgb(255 255 255 / 12%);
}

.nav-count {
  color: #071a3d;
  background: var(--brand-yellow);
}

.section-actions,
.summary-actions,
.preview-toolbar-start,
.preview-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.document-layout {
  grid-template-columns: minmax(0, 1fr);
}

.document-summary {
  position: static;
  top: auto;
  display: grid;
  grid-template-columns: 130px minmax(330px, 1fr) minmax(170px, .55fr) minmax(220px, 260px);
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
}

.document-summary dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.document-summary dl > div {
  display: grid;
  gap: 4px;
  border-left: 1px solid var(--line);
  padding: 2px 18px;
}

.document-summary .summary-total {
  border-top: 0;
  padding-top: 2px;
}

.document-summary .tax-note {
  padding: 11px 13px;
}

.document-summary .form-error {
  grid-column: 1 / -1;
}

.summary-actions {
  display: grid;
}

.same-client-option {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid #bdeff2;
  border-radius: var(--radius-control);
  padding: 12px 14px;
  color: #143b42;
  background: var(--brand-aqua-soft);
  cursor: pointer;
}

.same-client-option input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.same-client-option span,
.same-client-option small {
  display: block;
}

.same-client-option small {
  margin-top: 3px;
  color: #53636c;
  font-size: 11px;
  line-height: 1.4;
}

.preview-view {
  max-width: 1480px;
}

.preview-page-toolbar {
  position: sticky;
  z-index: 6;
  top: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.preview-toolbar-start > div {
  display: grid;
  gap: 2px;
}

.preview-toolbar-start span {
  color: var(--text-faint);
  font-size: 11px;
}

.preview-tabs {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.preview-tabs button {
  min-height: 38px;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0 13px;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  font-weight: 750;
  white-space: nowrap;
}

.preview-tabs button:first-child {
  border-left: 0;
}

.preview-tabs button.is-active {
  color: #ffffff;
  background: var(--accent);
}

.preview-stage {
  overflow: auto;
  border-radius: var(--radius-card);
  padding: clamp(14px, 3vw, 36px);
  background: #e9ecf3;
}

.preview-pane {
  width: 100%;
}

.document-preview,
.shipping-label-preview {
  width: min(900px, 100%);
  margin: 0 auto;
  color: #20242a;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  font-variant-numeric: proportional-nums;
  font-feature-settings: "zero" 0;
  background: #ffffff;
  box-shadow: 0 18px 55px rgb(54 47 105 / 14%);
}

.payment-summary-preview {
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  font-variant-numeric: proportional-nums;
  font-feature-settings: "zero" 0;
}

.document-preview {
  min-height: 1120px;
  padding: clamp(22px, 4vw, 48px);
}

.receipt-head {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: calc(clamp(22px, 4vw, 48px) * -1) calc(clamp(22px, 4vw, 48px) * -1) 0;
  border: 0;
  border-radius: 16px 16px 0 0;
  padding: 24px clamp(22px, 4vw, 48px);
  color: #ffffff;
  background: linear-gradient(135deg, #5e43df 0%, #553bd4 65%, #4c34c6 100%);
}

.receipt-logo {
  width: 164px;
  height: auto;
}

.receipt-company {
  display: grid;
  gap: 3px;
  margin: 0;
  color: rgb(255 255 255 / 82%);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

.receipt-company strong {
  color: #ffffff;
  font-size: 15px;
}

.receipt-company span:nth-of-type(2) {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.receipt-aqua-rule {
  height: 12px;
  margin: 0 calc(clamp(22px, 4vw, 48px) * -1);
  background: linear-gradient(90deg, var(--brand-aqua), var(--brand-aqua-strong));
}

.receipt-title {
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 28px 0 22px;
  text-align: center;
}

.receipt-title h2 {
  margin: 0;
  color: var(--brand-aqua-strong);
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: .01em;
}

.receipt-title strong {
  color: var(--accent);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.receipt-title span {
  color: #6b7280;
  font-size: 11px;
}

.receipt-draft-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ead99f;
  border-radius: 12px;
  margin: 0 0 18px;
  padding: 11px 14px;
  color: #6f5710;
  background: #fff9e8;
  font-size: 11px;
  line-height: 1.45;
}

.receipt-draft-banner strong {
  white-space: nowrap;
}

.receipt-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 24px;
}

.receipt-info-card {
  overflow: hidden;
  border: 1px solid #d7dee8;
  border-radius: 14px;
  background: #fafbfd;
}

.receipt-info-card h3 {
  margin: 0;
  padding: 12px 15px;
  color: #334155;
  background: #eef2f6;
  font-size: 13px;
}

.receipt-info dl {
  gap: 0;
}

.receipt-info dl > div {
  grid-template-columns: 104px 1fr;
  border-top: 1px solid #e9eef4;
  padding: 10px 15px;
}

.receipt-info dl > div:first-child {
  border-top: 0;
}

.receipt-info-card dt {
  color: #53565c;
  font-weight: 750;
}

.receipt-info-card dd {
  color: #30343a;
}

.receipt-table-wrap {
  overflow-x: auto;
  border: 1px solid #d7dee8;
  border-radius: 14px;
}

.receipt-table {
  min-width: 760px;
  table-layout: fixed;
}

.receipt-table th {
  border-color: #d7dee8;
  color: #4d5662;
  background: #eef2f6;
  text-align: center;
}

.receipt-table th:nth-child(1),
.receipt-table td:nth-child(1) { width: 10%; }
.receipt-table th:nth-child(2),
.receipt-table td:nth-child(2) { width: 33%; }
.receipt-table th:nth-child(3),
.receipt-table td:nth-child(3) { width: 9%; }
.receipt-table th:nth-child(4),
.receipt-table td:nth-child(4) { width: 11%; }
.receipt-table th:nth-child(5),
.receipt-table td:nth-child(5) { width: 7%; }
.receipt-table th:nth-child(6),
.receipt-table td:nth-child(6) { width: 15%; }
.receipt-table th:nth-child(7),
.receipt-table td:nth-child(7) { width: 15%; }

.receipt-table td {
  padding: 12px 9px;
  text-align: center;
}

.receipt-table .receipt-description {
  text-align: left;
}

.receipt-product-image {
  min-height: 46px;
  background: #fbfcfe;
}

.receipt-product-image img {
  display: block;
  width: 62px;
  height: 54px;
  margin: 0 auto;
  object-fit: contain;
}

.receipt-product-image span {
  color: #9aa4b2;
  font-size: 8px;
}

.receipt-warranty,
.receipt-code,
.receipt-quantity {
  color: #4e5866;
  font-weight: 650;
}

.receipt-line-total strong {
  color: #071a3d;
  font-weight: 850;
}

.receipt-item-meta {
  display: block;
  margin-top: 4px;
  color: #687386;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
}

.receipt-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(265px, 330px);
  gap: 14px;
  align-items: start;
  margin-top: 18px;
}

.receipt-total-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #d7dee8;
  border-radius: 12px;
  margin: 0;
}

.receipt-total-card > div {
  display: grid;
  grid-template-columns: 1fr 116px;
  gap: 12px;
  border-bottom: 1px solid #d7dee8;
  padding: 10px 13px;
}

.receipt-total-card > div:last-child {
  border-bottom: 0;
  background: #f5f8ff;
}

.receipt-total-card dt,
.receipt-total-card dd {
  margin: 0;
  color: #071a3d;
  font-size: 12px;
  font-weight: 760;
  text-align: right;
}

.receipt-total-card .grand-total dt,
.receipt-total-card .grand-total dd {
  font-size: 16px;
  font-weight: 900;
}

.receipt-conditions {
  border-left: 6px solid var(--brand-aqua);
  border-radius: 12px;
  padding: 14px 16px;
  color: #46505c;
  background: #f2fbfc;
  font-size: 11px;
  line-height: 1.5;
}

.receipt-conditions strong {
  color: #071a3d;
  font-size: 12px;
}

.receipt-conditions p {
  display: inline;
  margin: 0 0 0 4px;
}

.receipt-payment {
  margin-top: 22px;
  border-left: 6px solid #8cddea;
  border-radius: 14px;
  padding: 18px;
  background: #f3f5f7;
}

.receipt-payment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.receipt-payment-head h3,
.receipt-payment-head span {
  display: block;
}

.receipt-payment-head h3 {
  margin: 0 0 3px;
  color: #071a3d;
  font-size: 20px;
}

.receipt-payment-head span {
  color: #667085;
  font-size: 11px;
}

.receipt-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d4dce7;
  border-radius: 999px;
  padding: 8px 13px;
  color: #071a3d;
  background: #ffffff;
  font-size: 11px;
  white-space: nowrap;
}

.receipt-brand-pill i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-aqua);
}

.receipt-payment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .8fr);
  gap: 14px;
}

.receipt-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 12px;
}

.receipt-pay-card,
.receipt-contact-card {
  border: 1px solid #d7dee7;
  border-radius: 12px;
  padding: 15px;
  background: #ffffff;
  font-size: 11px;
  line-height: 1.55;
}

.receipt-bank-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.receipt-bank-heading h4,
.receipt-contact-card h4 {
  margin: 0;
  color: #071a3d;
  font-size: 15px;
}

.receipt-bank-badge {
  display: inline-grid;
  min-width: 42px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  padding: 0 7px;
  color: #fff16a;
  background: #3153e8;
  font-size: 9px;
  font-weight: 900;
}

.receipt-bank-badge.is-wallet {
  color: #ffffff;
  background: #6a35d2;
}

.receipt-bank-logo,
.payment-bank-logo {
  display: block;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: contain;
}

.payment-bank-title {
  display: flex;
  gap: 11px;
  align-items: center;
}

.payment-bank-title > div {
  display: grid;
  gap: 4px;
}

.payment-bank-title span {
  color: #6b7280;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.payment-bank-title strong {
  font-size: 16px;
}

.receipt-pay-data {
  display: grid;
  gap: 6px;
  margin: 0;
}

.receipt-pay-data > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
}

.receipt-pay-data dt,
.receipt-pay-data dd {
  margin: 0;
}

.receipt-pay-data dt {
  color: #667085;
  font-weight: 700;
}

.receipt-pay-data dd {
  overflow-wrap: anywhere;
  color: #071a3d;
  font-weight: 820;
}

.receipt-contact-card h4 {
  margin-bottom: 11px;
}

.receipt-contact-list {
  display: grid;
  gap: 10px;
}

.receipt-contact-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.receipt-contact-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receipt-contact-row strong,
.receipt-contact-row span {
  display: block;
}

.receipt-contact-row span {
  overflow-wrap: anywhere;
  color: #566172;
}

.receipt-contact-icon {
  display: grid !important;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #5335d4 !important;
  background: #f0f3f8;
}

.receipt-contact-icon img {
  display: block;
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.receipt-contact-web {
  margin-top: 10px !important;
}

.receipt-contact-card p {
  margin: 4px 0;
  color: #566172;
  overflow-wrap: anywhere;
}

.receipt-contact-card strong {
  color: #071a3d;
}

.receipt-footer {
  color: #59606d;
}

.receipt-web-footer {
  display: grid;
  justify-items: center;
  gap: 13px;
  margin-top: 28px;
  padding: 22px 12px 4px;
  color: #30343a;
  text-align: center;
}

.receipt-web-footer p {
  margin: 0;
  font-size: 13px;
}

.receipt-web-footer a {
  color: var(--brand-aqua-strong);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.receipt-terms-link {
  font-size: 13px;
  font-weight: 800;
}

.receipt-social-links {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

.receipt-social {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
  text-decoration: none !important;
}

.receipt-social img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-summary-preview {
  width: min(760px, 100%);
  margin: 0 auto;
  overflow: hidden;
  color: #12203f;
  background: #f5f7fb;
  box-shadow: 0 18px 55px rgb(54 47 105 / 14%);
}

.payment-summary-head {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 10px solid var(--brand-aqua);
  padding: 30px 40px;
  color: #ffffff;
  background: linear-gradient(135deg, #5e43df 0%, #4c34c6 100%);
}

.payment-summary-head img {
  width: 180px;
  height: auto;
}

.payment-summary-head > div {
  display: grid;
  gap: 5px;
  text-align: right;
}

.payment-summary-head span,
.payment-summary-head small {
  color: rgb(255 255 255 / 78%);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .08em;
}

.payment-summary-head strong {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 25px;
}

.payment-summary-body {
  display: grid;
  gap: 18px;
  padding: 32px;
}

.payment-summary-intro {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
}

.payment-summary-intro > div,
.payment-bank {
  display: grid;
  gap: 5px;
  border: 1px solid #dfe4ed;
  border-radius: 14px;
  padding: 17px;
  background: #ffffff;
}

.payment-summary-intro span,
.payment-bank > span {
  color: #6b7280;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.payment-summary-intro strong,
.payment-bank > strong {
  font-size: 16px;
}

.payment-summary-intro small {
  color: #667085;
}

.payment-items {
  overflow: hidden;
  border: 1px solid #dfe4ed;
  border-radius: 14px;
  background: #ffffff;
}

.payment-items-head,
.payment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 130px;
  gap: 14px;
  align-items: center;
}

.payment-items-head {
  padding: 12px 16px;
  color: #667085;
  background: #edf1f7;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.payment-items-head span:nth-child(n + 2),
.payment-item > span,
.payment-item > strong {
  text-align: right;
}

.payment-item {
  border-top: 1px solid #eef1f5;
  padding: 15px 16px;
  font-size: 13px;
}

.payment-item:first-of-type {
  border-top: 0;
}

.payment-item div,
.payment-item div strong,
.payment-item div small {
  display: grid;
  gap: 3px;
}

.payment-item small {
  color: #7a8290;
}

.payment-summary-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 20px;
  align-items: center;
  border-radius: 14px;
  padding: 21px 24px;
  color: #ffffff;
  background: var(--accent);
}

.payment-summary-total span {
  font-weight: 720;
}

.payment-summary-total strong {
  grid-row: span 2;
  font-size: 30px;
}

.payment-summary-total small {
  color: rgb(255 255 255 / 70%);
}

.payment-bank {
  border-left: 7px solid var(--brand-aqua);
  padding: 20px 22px;
}

.payment-bank dl {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
}

.payment-bank dl > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
}

.payment-bank dt,
.payment-bank dd {
  margin: 0;
}

.payment-bank dt {
  color: #667085;
}

.payment-bank dd {
  overflow-wrap: anywhere;
  font-weight: 720;
}

.payment-bank-empty p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 12px;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.payment-summary-foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid #dfe4ed;
  padding-top: 18px;
}

.payment-summary-foot > div {
  display: grid;
  gap: 4px;
}

.payment-summary-foot > div:last-child {
  text-align: right;
}

.payment-summary-foot > .receipt-contact-list {
  min-width: 280px;
  text-align: left;
}

.payment-summary-foot .receipt-contact-row {
  grid-template-columns: 30px minmax(0, 1fr);
}

.payment-summary-foot .receipt-contact-icon {
  width: 28px;
  height: 28px;
}

.payment-summary-foot .receipt-contact-icon img {
  width: 15px;
  height: 15px;
}

.payment-summary-foot span {
  color: #667085;
  font-size: 11px;
}

.shipping-label-preview {
  min-height: 1080px;
  padding-bottom: 34px;
}

.shipping-label-head {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 54px;
  color: #ffffff;
  background: linear-gradient(135deg, #5e43df 0%, #4c34c6 100%);
}

.shipping-label-head img {
  width: 185px;
  height: auto;
}

.shipping-label-head strong {
  font-size: clamp(34px, 7vw, 58px);
}

.shipping-label-content {
  display: grid;
  gap: 12px;
  padding: 30px 42px;
}

.shipping-card {
  overflow: hidden;
  border: 1px solid #cfd6e5;
  border-radius: 16px;
}

.shipping-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  color: #143b42;
  background: linear-gradient(90deg, var(--brand-aqua), #7beaf1);
  font-size: 18px;
  font-weight: 860;
}

.shipping-card-body {
  padding: 24px 28px;
}

.shipping-sender-name,
.shipping-recipient-name {
  color: #5d6068;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 860;
  line-height: 1.1;
}

.shipping-sender-details {
  margin-top: 9px;
  color: #5c6472;
  font-size: 14px;
  line-height: 1.45;
}

.shipping-data {
  display: grid;
  margin-top: 20px;
}

.shipping-data > div {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 18px;
  border-bottom: 1px dashed #d7dce6;
  padding: 10px 0;
}

.shipping-data > div:last-child {
  border-bottom: 0;
}

.shipping-data dt,
.shipping-data dd {
  margin: 0;
}

.shipping-data dt {
  color: var(--brand-aqua-strong);
  font-weight: 820;
}

.shipping-data dd {
  color: #4d5058;
  font-weight: 720;
}

.shipping-data .shipping-destination {
  color: var(--accent);
  font-size: 22px;
  font-weight: 880;
  text-transform: uppercase;
}

.shipping-mode-badge {
  border-radius: 14px;
  padding: 16px;
  color: #514a00;
  background: var(--brand-yellow);
  font-size: 18px;
  font-weight: 850;
  text-align: center;
}

.shipping-label-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid #e2e6ef;
  margin: 10px 42px 0;
  padding: 22px 8px 0;
  color: #59606d;
}

.shipping-label-footer strong {
  display: block;
  color: var(--accent);
  font-size: 20px;
}

.shipping-label-footer .thanks {
  color: var(--brand-aqua-strong);
  font-size: 18px;
  font-weight: 840;
  text-align: right;
}

.toast-region {
  position: fixed;
  z-index: 50;
  top: 92px;
  right: 22px;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 8px;
}

.toast {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  padding: 13px 15px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: toast-in 180ms ease-out;
}

.toast.error {
  border-color: color-mix(in srgb, var(--danger) 30%, var(--line));
  color: var(--danger);
}

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

.mobile-only {
  display: none;
}

@media (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .metric:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .document-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .document-summary {
    position: static;
  }
  .audit-panel {
    grid-column: auto;
  }
  .line-item {
    grid-template-columns: minmax(190px, 1.4fr) 82px 108px 108px;
  }
  .line-item > :nth-child(5),
  .line-item > :nth-child(6) {
    grid-row: 2;
  }
  .line-item > :nth-child(7) {
    grid-column: 4;
    grid-row: 2;
  }
}

@media (min-width: 901px) and (max-height: 780px) {
  .login-brand {
    padding-block: 34px;
  }
  .login-copy h1 {
    margin-block: 8px 12px;
    font-size: clamp(46px, 5vw, 64px);
  }
  .login-copy > p:last-child {
    font-size: 17px;
  }
}

@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-brand {
    min-height: 42dvh;
    gap: 44px;
  }
  .login-panel {
    min-height: 58dvh;
  }
  .login-proof {
    display: none;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .workspace {
    margin-left: 0;
  }
  .mobile-only {
    display: inline-flex;
  }
  .topbar {
    justify-content: flex-start;
    gap: 14px;
  }
  .topbar-actions {
    margin-left: auto;
  }
  .user-block {
    display: none;
  }
  .content-grid-wide {
    grid-template-columns: 1fr;
  }
  .operations-rail {
    display: none;
  }
}

@media (max-width: 720px) {
  .sunat-pdf-import,
  .pdf-import-heading {
    display: grid;
  }

  .sunat-pdf-import .button,
  .pdf-import-actions .button,
  .legacy-migration-actions .button {
    width: 100%;
  }

  .pdf-import-actions,
  .legacy-migration-actions {
    display: grid;
  }

  .view {
    padding: 26px 14px 54px;
  }
  .topbar {
    min-height: 66px;
    padding: 10px 14px;
  }
  .topbar-context {
    display: none;
  }
  .topbar h2 {
    font-size: 16px;
  }
  .page-heading {
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 34px;
  }
  .heading-with-action {
    display: grid;
    align-items: start;
  }
  .heading-with-action > .button {
    justify-self: start;
  }
  .document-status {
    border: 0;
    padding: 0;
    text-align: left;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .metric,
  .metric:nth-child(3),
  .metric:nth-child(4) {
    min-height: 126px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .metric:first-child {
    border-top: 0;
  }
  .form-section {
    padding: 18px;
  }
  .section-heading {
    align-items: flex-start;
    padding: 18px;
  }
  .section-heading.compact {
    padding: 0 0 18px;
  }
  .section-heading .button {
    min-height: 34px;
    padding: 0 10px;
  }
  .segmented {
    grid-template-columns: repeat(2, 1fr);
  }
  .segmented label:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .segmented label:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .document-type-segmented label:nth-child(5) {
    border-top: 1px solid var(--line);
    border-left: 0;
    grid-column: 1 / -1;
  }
  .form-grid.two,
  .form-grid.three {
    grid-template-columns: 1fr;
  }
  .field-span-2,
  .field-span-3 {
    grid-column: auto;
  }
  .field-input-action {
    grid-template-columns: 1fr;
  }
  .field-input-action .button {
    width: 100%;
  }
  .product-image-editor {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .product-image-preview {
    width: 88px;
  }
  .line-item {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface-soft);
  }
  .line-item:first-child {
    padding-top: 16px;
  }
  .line-item > :first-child,
  .line-secondary {
    grid-column: 1 / -1;
  }
  .line-item > :nth-child(5),
  .line-item > :nth-child(6),
  .line-item > :nth-child(7) {
    grid-row: auto;
  }
  .line-item > :nth-child(7) {
    grid-column: 2;
    justify-self: end;
  }
  .line-secondary {
    grid-template-columns: 1fr;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .documents-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }
  .documents-toolbar .toolbar-count {
    justify-self: start;
  }
  .search-field {
    width: 100%;
  }
  .document-mode-note {
    display: grid;
  }
  .client-picker-results {
    max-height: 270px;
  }
  th,
  td {
    padding: 12px 13px;
  }
  #view-documents .table-wrap,
  #view-sellers .table-wrap,
  #view-shipments .table-wrap {
    overflow: visible;
  }
  #view-documents table,
  #view-documents tbody,
  #view-sellers table,
  #view-sellers tbody,
  #view-shipments table,
  #view-shipments tbody {
    display: block;
    width: 100%;
  }
  #view-documents thead,
  #view-sellers thead,
  #view-shipments thead {
    display: none;
  }
  #view-documents tbody,
  #view-sellers tbody,
  #view-shipments tbody {
    padding: 0 14px 14px;
  }
  #view-documents tbody tr,
  #view-sellers tbody tr,
  #view-shipments tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
    border-top: 1px solid var(--line);
    padding: 16px 0;
  }
  #view-documents tbody td,
  #view-sellers tbody td,
  #view-shipments tbody td {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 3px;
    border: 0;
    padding: 0;
    white-space: normal;
  }
  #view-documents tbody td::before,
  #view-sellers tbody td::before,
  #view-shipments tbody td::before {
    content: attr(data-label);
    color: var(--text-faint);
    font-size: 9px;
    font-weight: 820;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  #view-documents tbody td:nth-child(8),
  #view-sellers tbody td:nth-child(7),
  #view-shipments tbody td:nth-child(7) {
    grid-column: 1 / -1;
  }
  #view-documents .document-row-actions,
  #view-shipments tbody td:nth-child(7) .button {
    width: 100%;
  }
  #view-documents .document-row-actions .button {
    flex: 1;
  }
  .modal-card {
    padding: 18px;
  }
  .preview-toolbar {
    align-items: flex-start;
  }
  .preview-toolbar > div:first-child span {
    display: none;
  }
  .document-preview {
    width: 100%;
    min-width: 760px;
    margin: 0;
    box-shadow: none;
  }
  .preview-shell {
    overflow-x: auto;
  }
  .toast-region {
    top: 76px;
    right: 16px;
  }
}

@media (max-width: 1400px) {
  .document-summary {
    grid-template-columns: 120px minmax(330px, 1fr) minmax(210px, 250px);
  }
  .document-summary .tax-note {
    display: none;
  }
}

@media (max-width: 900px) {
  .brand-lockup-light .brand-logo {
    width: 170px;
  }
  .preview-page-toolbar {
    top: 78px;
  }
  .document-summary {
    grid-template-columns: 120px minmax(300px, 1fr) minmax(210px, 250px);
  }
}

@media (max-width: 720px) {
  .section-heading.compact,
  .preview-page-toolbar,
  .preview-toolbar-actions {
    align-items: stretch;
  }
  .section-heading.compact,
  .preview-page-toolbar {
    display: grid;
  }
  .preview-page-toolbar {
    position: static;
    top: auto;
  }
  .section-actions,
  .preview-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .section-actions .button,
  .preview-toolbar-actions > .button {
    width: 100%;
  }
  .preview-toolbar-actions > .button {
    grid-column: auto;
  }
  #printPreviewButton {
    grid-column: 1 / -1;
  }
  .preview-tabs {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    width: 100%;
  }
  .preview-tabs button {
    padding-inline: 8px;
    font-size: 12px;
  }
  .document-summary {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }
  .document-summary dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .document-summary dl > div {
    padding: 2px 10px;
  }
  .document-summary dl > div:first-child {
    border-left: 0;
    padding-left: 0;
  }
  .document-summary .summary-total dt,
  .document-summary .summary-total dd {
    font-size: 15px;
  }
  .same-client-option {
    width: 100%;
  }
  .whatsapp-quick-order {
    display: grid;
    align-items: stretch;
  }
  .whatsapp-quick-order .button {
    width: 100%;
  }
  .payment-account-choices,
  .payment-options {
    grid-template-columns: 1fr;
  }
  .preview-stage {
    padding: 8px;
  }
  .document-preview {
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 18px;
  }
  .receipt-head {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    margin: -18px -18px 0;
    padding: 22px;
  }
  .receipt-logo {
    width: 128px;
  }
  .receipt-company {
    text-align: left;
  }
  .receipt-aqua-rule {
    margin: 0 -18px;
  }
  .receipt-info,
  .receipt-summary-row,
  .receipt-payment-grid {
    grid-template-columns: 1fr;
  }
  .receipt-payment-head {
    display: grid;
  }
  .receipt-brand-pill {
    width: max-content;
    max-width: 100%;
    white-space: normal;
  }
  .receipt-draft-banner {
    display: grid;
  }
  .payment-summary-head {
    display: grid;
    min-height: 0;
    padding: 24px;
  }
  .payment-summary-head img {
    width: 140px;
  }
  .payment-summary-head > div {
    text-align: left;
  }
  .payment-summary-body {
    padding: 16px;
  }
  .payment-summary-intro,
  .sunat-flow-list {
    grid-template-columns: 1fr;
  }
  .payment-items-head,
  .payment-item {
    grid-template-columns: minmax(0, 1fr) 48px 102px;
    gap: 8px;
  }
  .payment-summary-total {
    grid-template-columns: 1fr;
  }
  .payment-summary-total strong {
    grid-row: auto;
  }
  .payment-summary-foot {
    display: grid;
  }
  .payment-summary-foot > div:last-child {
    text-align: left;
  }
  .payment-summary-foot > .receipt-contact-list {
    min-width: 0;
  }
  .receipt-info dl > div {
    grid-template-columns: 88px 1fr;
  }
  .shipping-label-preview {
    min-height: 0;
  }
  .shipping-label-head {
    min-height: 112px;
    padding: 18px 22px;
  }
  .shipping-label-head img {
    width: 118px;
  }
  .shipping-label-content {
    padding: 18px 14px;
  }
  .shipping-card-body {
    padding: 19px;
  }
  .shipping-data > div {
    grid-template-columns: 105px 1fr;
    gap: 12px;
  }
  .shipping-label-footer {
    display: grid;
    margin: 4px 14px 0;
  }
  .shipping-label-footer .thanks {
    text-align: left;
  }
}

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

.png-export-mount {
  position: fixed;
  z-index: -1;
  top: 0;
  left: -100000px;
  overflow: visible;
  pointer-events: none;
  background: #ffffff;
}

.png-export-source.document-preview {
  width: 900px !important;
  min-width: 900px !important;
  min-height: 0 !important;
  padding: 48px !important;
}

.png-export-source .receipt-head {
  display: flex !important;
  min-height: 150px !important;
  margin: -48px -48px 0 !important;
  padding: 24px 48px !important;
}

.png-export-source .receipt-logo {
  width: 164px !important;
}

.png-export-source .receipt-company {
  text-align: right !important;
}

.png-export-source .receipt-aqua-rule {
  margin: 0 -48px !important;
}

.png-export-source .receipt-info {
  grid-template-columns: 1fr 1fr !important;
}

.png-export-source .receipt-summary-row {
  grid-template-columns: minmax(0, 1fr) 340px !important;
}

.png-export-source .receipt-payment-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .8fr) !important;
}

.png-export-source .receipt-account-grid {
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)) !important;
}

.png-export-source .receipt-table-wrap {
  overflow: hidden !important;
}

.png-export-source .receipt-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

.png-export-source.shipping-label-preview {
  width: 760px !important;
  min-width: 760px !important;
  min-height: 0 !important;
}

@media print {
  html,
  body {
    width: 210mm !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }
  body {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body > :not(#appView),
  #appView > :not(.workspace),
  .workspace > :not(#view-preview),
  #view-preview > :not(.preview-stage),
  .preview-stage > .preview-pane:not(.is-active) {
    display: none !important;
  }
  #appView,
  .workspace,
  #view-preview,
  .preview-stage,
  .preview-pane.is-active,
  .preview-pane.is-active * {
    visibility: visible !important;
  }
  #appView,
  .workspace,
  #view-preview,
  .preview-stage {
    display: block !important;
    width: 210mm !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }
  .preview-pane.is-active {
    position: static !important;
    width: 210mm !important;
    min-width: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  .document-preview,
  .payment-summary-preview,
  .shipping-label-preview {
    width: 210mm !important;
    max-width: none !important;
    min-height: 0;
    margin: 0;
    box-shadow: none !important;
  }
  .document-preview {
    padding: 7mm !important;
  }
  .receipt-head {
    min-height: 31mm !important;
    margin: 0 !important;
    border-radius: 4mm 4mm 0 0 !important;
    padding: 4mm 7mm !important;
  }
  .receipt-logo {
    width: 34mm !important;
  }
  .receipt-company {
    font-size: 8.2pt !important;
  }
  .receipt-company strong {
    font-size: 10.5pt !important;
  }
  .receipt-company span:nth-of-type(2) {
    font-size: 9pt !important;
  }
  .receipt-aqua-rule {
    height: 3mm !important;
    margin: 0 !important;
  }
  .receipt-title {
    padding: 3.5mm 0 3mm !important;
  }
  .receipt-title h2 {
    font-size: 15.5pt !important;
  }
  .receipt-title strong {
    font-size: 10pt !important;
  }
  .receipt-info {
    gap: 7mm !important;
    margin-bottom: 4mm !important;
    break-inside: avoid;
  }
  .receipt-info-card {
    overflow: hidden !important;
    border: .25mm solid #d7dee8 !important;
    border-radius: 3.2mm !important;
    background: #fafbfd !important;
  }
  .receipt-info-card h3 {
    display: block !important;
    padding: 2.4mm 3.2mm !important;
    background: #eef2f6 !important;
    font-size: 8.6pt !important;
  }
  .receipt-info dl > div {
    grid-template-columns: 25mm 1fr !important;
    border-top: .2mm solid #e4e9f0 !important;
    padding: 1.35mm 1.5mm !important;
  }
  .receipt-info dl > div:first-child {
    border-top: 0 !important;
  }
  .receipt-info dt,
  .receipt-info dd {
    font-size: 8.2pt !important;
  }
  .receipt-table-wrap {
    overflow: hidden !important;
    border-color: #c9ced6 !important;
    border-radius: 3.2mm !important;
  }
  .receipt-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 8.1pt !important;
  }
  .receipt-table thead {
    display: table-header-group;
  }
  .receipt-table tr {
    break-inside: avoid;
  }
  .receipt-table th,
  .receipt-table td {
    border-color: #c9ced6 !important;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .receipt-table th {
    padding: 2.2mm 1.2mm !important;
    font-size: 7.2pt !important;
  }
  .receipt-table td {
    padding: 2.4mm 1.2mm !important;
    vertical-align: top;
  }
  .receipt-table th:nth-child(1),
  .receipt-table td:nth-child(1) { width: 10%; }
  .receipt-table th:nth-child(2),
  .receipt-table td:nth-child(2) { width: 33%; }
  .receipt-table th:nth-child(3),
  .receipt-table td:nth-child(3) { width: 9%; }
  .receipt-table th:nth-child(4),
  .receipt-table td:nth-child(4) { width: 11%; }
  .receipt-table th:nth-child(5),
  .receipt-table td:nth-child(5) { width: 7%; }
  .receipt-table th:nth-child(6),
  .receipt-table td:nth-child(6) { width: 15%; }
  .receipt-table th:nth-child(7),
  .receipt-table td:nth-child(7) { width: 15%; }
  .receipt-table .money {
    white-space: nowrap !important;
    font-size: 7.8pt !important;
  }
  .receipt-item-meta {
    font-size: 6.5pt !important;
  }
  .receipt-summary-row {
    grid-template-columns: minmax(0, 1fr) 64mm !important;
    gap: 5mm !important;
    margin-top: 4mm !important;
    break-inside: avoid;
  }
  .receipt-total-card > div {
    padding: 2.1mm 3mm !important;
    font-size: 8pt !important;
  }
  .receipt-total-card dt,
  .receipt-total-card dd {
    font-size: 9pt !important;
  }
  .receipt-total-card .grand-total dt,
  .receipt-total-card .grand-total dd {
    font-size: 11pt !important;
  }
  .receipt-conditions {
    margin-top: 0 !important;
    border: 0 !important;
    border-left: 1.4mm solid var(--brand-aqua) !important;
    border-radius: 3mm !important;
    padding: 2.5mm 3mm !important;
    background: #f2fbfc !important;
    font-size: 7.5pt !important;
    break-inside: avoid;
  }
  .receipt-payment {
    margin-top: 4mm !important;
    border: 0 !important;
    border-left: 1.4mm solid #8cddea !important;
    border-radius: 3.2mm !important;
    padding: 3.2mm !important;
    background: #f3f5f7 !important;
    break-inside: avoid;
  }
  .receipt-payment-head {
    margin-bottom: 3mm !important;
  }
  .receipt-payment-head h3 {
    font-size: 12pt !important;
  }
  .receipt-payment-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(45mm, .8fr) !important;
    gap: 3mm !important;
  }
  .receipt-account-grid {
    grid-template-columns: repeat(auto-fit, minmax(42mm, 1fr)) !important;
    gap: 2.5mm !important;
  }
  .receipt-pay-card,
  .receipt-contact-card {
    border: .25mm solid #d7dee7 !important;
    border-radius: 2.8mm !important;
    padding: 2.5mm !important;
    background: #ffffff !important;
    font-size: 7.2pt !important;
  }
  .receipt-brand-pill {
    border: .25mm solid #d4dce7 !important;
    padding: 1.5mm 2.5mm !important;
  }
  .receipt-bank-heading h4,
  .receipt-contact-card h4 {
    font-size: 9pt !important;
  }
  .receipt-bank-badge {
    min-width: 9mm !important;
    height: 8mm !important;
    font-size: 6pt !important;
  }
  .receipt-bank-logo {
    width: 8mm !important;
    height: 8mm !important;
    border-radius: 2mm !important;
  }
  .receipt-product-image img {
    width: 13mm !important;
    height: 11mm !important;
    object-fit: contain !important;
  }
  .receipt-pay-data > div {
    grid-template-columns: 19mm 1fr !important;
  }
  .receipt-footer {
    margin-top: 4mm !important;
    padding-top: 3mm !important;
    font-size: 6.5pt !important;
    break-inside: avoid;
  }
  .receipt-web-footer {
    gap: 2.2mm !important;
    margin-top: 3mm !important;
    padding: 2.5mm 2mm 0 !important;
    break-inside: avoid;
  }
  .receipt-web-footer p,
  .receipt-terms-link {
    font-size: 7.2pt !important;
  }
  .receipt-social-links {
    gap: 4mm !important;
  }
  .receipt-social {
    width: 3mm !important;
    height: 3mm !important;
  }
  .payment-summary-preview {
    padding: 0 !important;
  }
  .payment-summary-intro,
  .payment-summary-total,
  .payment-bank,
  .payment-summary-foot,
  .shipping-card,
  .shipping-label-footer {
    break-inside: avoid;
  }
  .payment-item {
    break-inside: avoid;
  }
  .payment-summary-preview,
  .shipping-label-preview {
    box-shadow: none;
  }
  .shipping-label-preview {
    min-height: 297mm;
    padding: 0 0 10mm;
  }
  @page {
    size: 210mm 297mm;
    margin: 0;
  }
}
