/* Application styles are independent of the optional Tailwind CDN. */
:root {
  --ink: #142035;
  --muted: #768194;
  --line: #e5e9ee;
  --green: #10a878;
  --green-dark: #078761;
  --bg: #f8fafc;
  --navy: #0f2035;
  --font: 'DM Sans', sans-serif;
  --heading: 'Manrope', sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #10b981;
  outline-offset: 4px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: #12a77d;
  box-shadow: 0 0 0 3px #10b98114;
}
button svg,
span svg,
a svg {
  flex-shrink: 0;
}
svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.7;
  vertical-align: middle;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--heading);
  font-size: 21px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: -0.9px;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 39px;
  background: var(--green);
  color: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px #10a87824;
}
.brand-icon svg {
  width: 24px;
  height: 24px;
}
.brand b {
  display: inline-block;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--green-dark);
  background: #e8f7f1;
  border-radius: 4px;
  padding: 3px 5px;
  vertical-align: middle;
  margin-left: 2px;
}
.workspace-label {
  font-size: 10px;
  color: #98a0ad;
  letter-spacing: 1.4px;
  font-weight: 700;
  margin: 47px 10px 15px;
}
.main-nav {
  display: grid;
  gap: 7px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 13px;
  background: transparent;
  color: #677285;
  text-align: left;
  font-weight: 550;
  border-radius: 8px;
  min-height: 47px;
  font-size: 14px;
}
.nav-link svg {
  width: 20px;
}
.nav-link:hover {
  background: #f6f8fa;
}
.nav-link.active {
  background: #eaf7f1;
  color: #078760;
}
.nav-count {
  margin-left: auto;
  border: 1px solid #e1e7ec;
  border-radius: 5px;
  padding: 0 6px;
  font-size: 11px;
  background: #fff;
  color: #738093;
}
.sidebar-note {
  position: relative;
  margin: auto 5px 36px;
  padding: 21px 18px 18px;
  border-radius: 12px;
  background: linear-gradient(125deg, #f2f9f6, #f8fbfa);
  border: 1px solid #e7f0eb;
  overflow: hidden;
}
.sidebar-note:after {
  content: '';
  position: absolute;
  width: 130px;
  height: 130px;
  border: 1px solid #e0eee7;
  border-radius: 50%;
  right: -90px;
  top: 30px;
  box-shadow:
    0 0 0 18px #ecf4ef,
    0 0 0 19px #e4eee8;
}
.note-icon {
  color: #16a379;
}
.sidebar-note > * {
  position: relative;
  z-index: 1;
}
.sidebar-note:after {
  pointer-events: none;
}
.note-icon svg {
  width: 23px;
  height: 23px;
}
.sidebar-note h3 {
  font: 700 17px/1.5 var(--heading);
  letter-spacing: -0.4px;
  margin: 13px 0 9px;
}
.sidebar-note p {
  color: #718277;
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.note-line {
  height: 1px;
  background: #dcebe2;
  margin: 18px 0 12px;
}
.sidebar-note > span:last-child {
  font-size: 10px;
  color: #82958a;
}
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #95a0aa;
  font-size: 11px;
  padding: 0 5px;
}
.sidebar-bottom > svg {
  color: #86988e;
  width: 22px;
  height: 22px;
}
.sidebar-bottom strong {
  font-weight: 500;
  color: #657466;
}
.sidebar-bottom .icon-button {
  margin-left: auto;
  width: 30px;
  min-width: 30px;
}
.app-shell {
  margin-left: 238px;
}
.topbar {
  height: 77px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 19px;
  background: #ffffffa6;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8b94a2;
  font-size: 13px;
}
.breadcrumb svg {
  width: 13px;
  height: 13px;
}
.breadcrumb strong {
  color: #4c596a;
  font-weight: 500;
}
.save-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: #899486;
  font-size: 11px;
}
.status-dot {
  width: 5px;
  height: 5px;
  display: inline-block;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}
.avatar {
  border-radius: 50%;
  background: #eaf0ed;
  color: #587469;
  font-size: 11px;
  font-weight: 700;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 3px solid white;
  box-shadow: 0 0 0 1px #e8ede9;
}
.mobile-header {
  display: none;
}
main {
  max-width: 1500px;
  margin: auto;
  padding: 35px 40px 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: #8a96a5;
  display: flex;
  align-items: center;
  gap: 7px;
}
.eyebrow > span {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
}
h1 {
  font: 750 clamp(24px, 2.1vw, 32px)/1.4 var(--heading);
  letter-spacing: -1.3px;
  margin: 8px 0 5px;
}
h1 > span {
  color: var(--green);
}
.page-heading p {
  font-size: 13px;
  color: #7e8998;
  margin: 0;
}
.button {
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 600;
  font-size: 13px;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:active {
  transform: translateY(1px);
}
.button-white {
  background: white;
  color: #4e5b6b;
  border: 1px solid #dfe5e9;
  box-shadow: 0 2px 3px #14203503;
}
.button-white:hover {
  background: #f2f6f5;
}
.example-button {
  white-space: nowrap;
  font-size: 11px;
  min-height: 38px;
  padding: 9px 12px;
}
.example-button svg {
  width: 15px;
  color: #6a7f75;
}
.button-primary {
  background: var(--navy);
  color: white;
}
.button-primary:hover {
  background: #19334e;
}
.button-whatsapp {
  background: #edf9f2;
  color: #108e60;
  border: 1px solid #d6efdf;
}
.button-whatsapp:hover {
  background: #e1f5e9;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr);
  align-items: start;
  gap: 30px;
}
.editor {
  min-width: 0;
}
.mode-switch {
  display: flex;
  background: #eaf0f3;
  padding: 5px;
  border: 1px solid #e5eaee;
  border-radius: 10px;
  margin-bottom: 18px;
}
.mode-switch button {
  position: relative;
  display: grid;
  grid-template-columns: 20px auto;
  align-items: center;
  column-gap: 9px;
  row-gap: 1px;
  justify-content: center;
  flex: 1;
  background: none;
  color: #7b8795;
  min-height: 57px;
  font-weight: 600;
  text-align: left;
  border-radius: 7px;
  font-size: 14px;
}
.mode-switch button svg {
  grid-row: 1/3;
}
.mode-switch button span {
  font-size: 10px;
  font-weight: 400;
}
.mode-switch button.active {
  background: white;
  box-shadow: 0 2px 4px #1523350a;
  color: var(--ink);
}
.mode-switch button.active svg {
  color: var(--green);
}
.mode-switch button.active:after {
  position: absolute;
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  right: 12px;
  top: 12px;
}
.document-meta {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 13px;
  margin: 0 0 18px;
}
.document-meta label,
.receipt-fields label {
  font-size: 11px;
}
.document-meta input,
.document-meta select {
  font-size: 12px;
  min-height: 40px;
  padding: 9px 10px;
}
.document-meta .input-prefix input {
  padding-left: 28px;
}
.document-meta .input-prefix span {
  left: 11px;
}
.receipt-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
label {
  display: block;
  font-weight: 500;
  color: #525e6f;
  font-size: 12px;
}
input:not([type='checkbox']),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 1px solid #e0e5ea;
  background: white;
  border-radius: 7px;
  padding: 11px 12px;
  color: #344155;
  margin-top: 7px;
  transition:
    border 0.15s,
    box-shadow 0.15s;
  font-size: 13px;
}
input::placeholder,
textarea::placeholder {
  color: #a1a9b4;
  font-weight: 400;
}
input[type='date'] {
  min-width: 0;
  color-scheme: light;
}
textarea {
  line-height: 1.7;
  resize: vertical;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23748290' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 31px;
}
.input-prefix {
  position: relative;
}
.input-prefix > span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #97a1af;
  font-size: 12px;
  font-weight: 400;
}
.input-prefix input {
  padding-left: 34px;
  font-variant-numeric: tabular-nums;
}
.company-strip {
  background: #f1f7f4;
  border: 1px dashed #c8dfd2;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border-radius: 9px;
  text-align: left;
  margin-bottom: 20px;
  color: #4e6e5d;
}
.company-strip-icon {
  width: 34px;
  height: 34px;
  background: #e2eee7;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #67937a;
}
.company-strip strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.company-strip small {
  display: block;
  font-size: 10px;
  color: #8b9c90;
  margin-top: 3px;
}
.company-strip-edit {
  margin-left: auto;
  color: #789a86;
}
.company-strip-edit svg {
  width: 15px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 22px;
  margin-bottom: 19px;
  box-shadow: 0 2px 3px #102a4302;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 21px;
}
.section-icon {
  background: #eff5f3;
  color: #6d9181;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.section-icon svg {
  width: 18px;
  height: 18px;
}
.section-heading h2 {
  font: 700 14px/1.5 var(--heading);
  letter-spacing: -0.15px;
  margin: 0;
}
.section-heading p {
  font-size: 10px;
  color: #98a1ad;
  margin: 2px 0 0;
}
.section-heading > .optional {
  margin-left: auto;
  font-size: 10px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 14px;
}
.full {
  grid-column: 1/-1;
}
.required {
  color: #10a878;
}
.optional {
  font-size: 10px;
  font-weight: 400;
  color: #9aa4b0;
  margin-left: 5px;
}
.item-count {
  font-size: 10px;
  color: #8995a5;
  background: #f5f7f9;
  border-radius: 4px;
  padding: 3px 7px;
  margin-left: auto;
  white-space: nowrap;
}
.item {
  background: #fafbfc;
  border: 1px solid #e8ecf0;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}
.item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.item-type {
  margin: 0;
  min-height: 30px;
  width: 116px;
  padding: 5px 26px 5px 10px;
  font-size: 10px;
  color: #668078;
  border-color: #e4eae7;
  background-color: #f0f5f2;
  border-radius: 5px;
}
.item-top > span {
  font-size: 10px;
  color: #a2acb6;
}
.icon-button {
  background: transparent;
  display: inline-grid;
  place-items: center;
  color: #8995a4;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 7px;
}
.icon-button:hover {
  color: #304861;
  background: #edf2f5;
}
.item-remove {
  margin-left: auto;
  height: 32px;
  min-width: 36px;
  width: 36px;
}
.item-remove svg {
  width: 15px;
}
.item-remove:hover {
  color: #cc4852;
  background: #fff0f0;
}
.item-description {
  margin-top: 0 !important;
  font-size: 12px !important;
  background: #fff !important;
}
.item-bottom {
  display: grid;
  grid-template-columns: 0.8fr 0.9fr 1.4fr 1.3fr;
  gap: 10px;
  margin-top: 12px;
  align-items: end;
}
.item-bottom label {
  font-size: 10px;
  white-space: nowrap;
}
.item-bottom input,
.item-bottom select {
  font-size: 12px;
  padding: 9px;
  min-height: 39px;
  margin-top: 5px;
}
.item-bottom select {
  padding-right: 25px;
  background-position: right 6px center;
}
.item-bottom .input-prefix input {
  padding-left: 28px;
}
.item-bottom .input-prefix span {
  left: 9px;
  font-size: 10px;
}
.item-subtotal {
  text-align: right;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 0 10px;
  color: #96a0ae;
  font-size: 10px;
  white-space: nowrap;
}
.item-subtotal strong {
  color: #435365;
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
}
.add-item {
  width: 100%;
  border: 1px dashed #c6d8d0;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #23916a;
  background: #fbfdfc;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 550;
  margin-top: 15px;
}
.add-item:hover {
  background: #edf8f2;
}
.add-item svg {
  width: 16px;
}
.subtotal-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 18px;
  color: #7a8796;
}
.subtotal-row strong {
  font-weight: 550;
  color: #566274;
}
.finance-fields {
  border-bottom: 1px dashed #e4e9ed;
  padding-bottom: 20px;
}
.finance-fields label {
  font-size: 11px;
}
.discount-input {
  display: flex;
  align-items: center;
  border: 1px solid #e0e5ea;
  border-radius: 7px;
  min-height: 44px;
  padding: 4px;
  margin-top: 7px;
}
.discount-input:focus-within {
  box-shadow: 0 0 0 3px #10b98114;
  border-color: #12a77d;
}
.discount-type {
  display: flex;
  gap: 2px;
}
.discount-type button {
  width: 30px;
  height: 32px;
  background: white;
  color: #9ca5af;
  border-radius: 4px;
  font-size: 11px;
}
.discount-type button.active {
  background: #eef2f5;
  color: #546576;
  font-weight: 600;
}
.discount-input input {
  border: 0;
  box-shadow: none;
  min-height: 32px;
  margin: 0;
  padding: 4px 9px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.discount-input input:focus {
  box-shadow: none;
}
.field-help {
  font-size: 11px;
  color: #b86b26;
  margin: 10px 0;
}
.grand-total {
  margin-top: 18px;
  border-radius: 8px;
  background: #edf7f2;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.grand-total small {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  color: #749584;
  font-weight: 600;
}
.grand-total strong {
  display: block;
  font: 700 22px/1.4 var(--heading);
  letter-spacing: -.6px;
  color: #148458;
}
.total-symbol {
  border: 1px solid #cae5d5;
  border-radius: 50%;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #54a47b;
}
.suggestion-label {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  color: #a1aab5;
  font-weight: 500;
  margin: 16px 0 9px;
}
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.suggestion-chips button {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f7f9fa;
  border: 1px solid #e6ebef;
  min-height: 32px;
  border-radius: 5px;
  color: #7e8995;
  font-size: 10px;
  padding: 6px 8px;
  text-align: left;
}
.suggestion-chips button svg {
  width: 11px;
  height: 11px;
}
.suggestion-chips button:hover,
.suggestion-chips button.selected {
  color: #108860;
  border-color: #bce4d1;
  background: #effaf4;
}
.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.editor-footer .button {
  font-size: 11px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: #83928c;
  font-size: 11px;
  min-height: 44px;
  padding: 8px;
}
.text-button:hover {
  color: #128b64;
}
.text-button svg {
  width: 15px;
}
.preview-sticky {
  position: sticky;
  top: 24px;
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1px 0 15px;
}
.preview-header > span:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
  font: 650 12px var(--heading);
  color: #5b6a7e;
}
.preview-header svg {
  width: 16px;
  color: #8999aa;
}
.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
  letter-spacing: 1px;
  color: #82988b;
  background: #eff5f1;
  padding: 4px 7px;
  border-radius: 4px;
}
.live-badge .status-dot {
  width: 4px;
  height: 4px;
}
.preview-stage {
  background: #edf0f4;
  border: 1px solid #e2e7ec;
  border-radius: 10px;
  padding: 23px 21px 0;
  overflow: hidden;
  background-image: radial-gradient(#d9e0e7 0.65px, transparent 0.65px);
  background-size: 9px 9px;
}
#paper-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  filter: drop-shadow(0 5px 8px #132b4610);
}
.paper {
  width: 794px;
  min-height: 1123px;
  transform-origin: top left;
  background: white;
  padding: 38px;
  color: #303d4d;
}
.paper-caption {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: #9aa4b0;
  height: 39px;
}
.paper-caption svg {
  width: 10px;
  height: 10px;
}
.paper-caption > span {
  margin-left: auto;
  font-size: 8px;
}
.theme-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 20px;
  font-size: 11px;
  color: #8a96a5;
}
.theme-picker > div {
  display: flex;
  gap: 10px;
}
.swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--swatch);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px transparent;
  position: relative;
}
.swatch:before {
  content: '';
  position: absolute;
  inset: -9px;
}
.swatch.active {
  box-shadow: 0 0 0 1.5px var(--swatch);
}
.swatch.active:after {
  content: '✓';
  position: absolute;
  inset: 0;
  line-height: 12px;
  font-size: 8px;
  color: white;
}
.export-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.export-area > .button {
  min-height: 47px;
  font-size: 12px;
  width: 100%;
}
.export-area .button-primary {
  box-shadow: 0 4px 8px #122b4314;
}
.button-tag {
  margin-left: auto;
  border: 1px solid #ffffff2b;
  border-radius: 4px;
  font-size: 9px;
  color: #a0b0be;
  padding: 1px 5px;
}
.export-area .button-primary > svg {
  margin-right: auto;
}
.export-area .button-primary {
  padding-left: 17px;
  padding-right: 17px;
}
.export-area .button-primary:after {
  content: '';
  width: 0;
}
.export-area .share-file {
  justify-content: center;
  min-height: 30px;
  padding: 4px;
  font-size: 11px;
}
.export-area > p {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  color: #a5afba;
  font-size: 9px;
  margin: 1px 0 0;
}
.export-area > p svg {
  width: 10px;
  height: 10px;
}
.preview-tip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 17px 5px;
  margin-top: 19px;
  border-top: 1px solid var(--line);
  color: #9aa8a1;
}
.preview-tip > svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: #83a291;
}
.preview-tip p {
  font-size: 10px;
  line-height: 1.8;
  margin: 0;
  color: #9aa5b0;
}
.preview-tip strong {
  color: #7a8a96;
  font-weight: 500;
  display: block;
}
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 22px 0;
  color: #a0aab5;
  font-size: 10px;
}
.app-footer > span:first-child {
  font-family: var(--heading);
  font-weight: 700;
  color: #8e9ba7;
}
.app-footer strong {
  font-weight: 500;
  color: #9eaab4;
}
.mobile-view-toggle,
.mobile-action-bar {
  display: none;
}

/* The same document markup is rendered in the preview and passed to html2pdf. */
.pdf-document {
  --doc-theme: #1e3a5f;
  font:
    13px/1.6 'DM Sans',
    Arial,
    sans-serif;
  color: #445063;
  background: white;
  overflow-wrap: anywhere;
}
.pdf-document * {
  box-sizing: border-box;
}
.pdf-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 3px solid var(--doc-theme);
  padding-bottom: 27px;
  gap: 24px;
}
.pdf-provider {
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.pdf-logo {
  max-width: 90px;
  max-height: 75px;
  object-fit: contain;
}
.pdf-monogram {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--doc-theme);
  border-radius: 11px;
  color: white;
  font:
    bold 18px 'Manrope',
    sans-serif;
}
.pdf-provider h2 {
  margin: 0 0 3px;
  font:
    bold 20px/1.3 'Manrope',
    Arial,
    sans-serif;
  letter-spacing: -0.5px;
  color: var(--doc-theme);
}
.pdf-provider p {
  margin: 0;
  font-size: 10px;
  line-height: 1.7;
  color: #82909e;
}
.pdf-document-id {
  text-align: right;
  min-width: 145px;
  max-width: 210px;
}
.pdf-document-id > span {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--doc-theme);
}
.pdf-document-id > strong {
  display: block;
  font:
    750 26px/1.5 'Manrope',
    Arial,
    sans-serif;
  color: var(--doc-theme);
}
.pdf-document-id p {
  margin: 2px 0 0;
  color: #8693a0;
  font-size: 10px;
}
.pdf-client {
  background: #f3f5f7;
  padding: 19px 22px;
  border-radius: 5px;
  margin: 26px 0 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.pdf-eyebrow {
  font-size: 8px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: #929eab;
  margin-bottom: 5px;
}
.pdf-client h3 {
  font:
    bold 16px 'Manrope',
    sans-serif;
  color: #344256;
  margin: 0 0 5px;
}
.pdf-client p {
  margin: 2px 0;
  font-size: 11px;
  color: #7b8998;
  white-space: pre-line;
}
.pdf-client-side {
  text-align: right;
  max-width: 40%;
  align-self: center;
}
.pdf-intro {
  font-size: 11px;
  color: #83909d;
  line-height: 1.8;
  margin: 0 0 24px;
}
.pdf-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.pdf-table th {
  text-align: left;
  font-size: 8px;
  letter-spacing: 0.9px;
  color: #8694a4;
  font-weight: 600;
  padding: 10px 11px;
  border-bottom: 1px solid #e6eaee;
}
.pdf-table th:first-child {
  padding-left: 13px;
  width: 46%;
}
.pdf-table th:nth-child(2) {
  width: 14%;
}
.pdf-table th:nth-child(3) {
  width: 20%;
}
.pdf-table th:nth-child(4) {
  width: 20%;
}
.pdf-table td {
  padding: 14px 11px;
  font-size: 11px;
  vertical-align: top;
  border-bottom: 1px solid #f1f3f5;
}
.pdf-table tr:nth-child(odd) td {
  background: #f7f9fa;
}
.pdf-table td:first-child {
  padding-left: 13px;
}
.pdf-table .pdf-number {
  text-align: right;
  white-space: nowrap;
}
.pdf-item-name {
  font-weight: 500;
  color: #4d5d70;
  white-space: pre-line;
}
.pdf-item-type {
  display: block;
  font-size: 8px;
  color: #9da7b2;
  margin-top: 3px;
}
.pdf-totals {
  width: 290px;
  margin: 19px 0 24px auto;
}
.pdf-total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  gap: 10px;
  font-size: 11px;
  color: #8794a1;
}
.pdf-total-row strong {
  font-weight: 500;
  color: #586a7d;
}
.pdf-total-final {
  background: var(--doc-theme);
  color: white !important;
  border-radius: 4px;
  align-items: center;
  margin-top: 10px;
  padding: 13px 14px;
}
.pdf-total-final span {
  font-size: 10px;
}
.pdf-total-final strong {
  color: white;
  font:
    bold 21px 'Manrope',
    Arial,
    sans-serif;
  letter-spacing: -0.6px;
  white-space: nowrap;
}
.pdf-notes {
  margin: 20px 0;
  padding-top: 19px;
  border-top: 1px solid #e7ebef;
}
.pdf-notes p {
  white-space: pre-line;
  font-size: 11px;
  color: #81909c;
  margin: 6px 0;
  line-height: 1.9;
}
.pdf-payment {
  background: #f4f7f8;
  padding: 14px 17px;
  margin-top: 22px;
  border-left: 3px solid var(--doc-theme);
  border-radius: 2px;
}
.pdf-payment p {
  font-size: 11px;
  color: #627989;
  margin: 0;
  white-space: pre-line;
}
.pdf-payment strong {
  color: var(--doc-theme);
}
.pdf-signatures {
  display: flex;
  justify-content: space-between;
  gap: 55px;
  padding: 60px 20px 0;
  text-align: center;
}
.pdf-signatures > div {
  flex: 1;
  min-width: 0;
}
.pdf-signatures span {
  display: block;
  border-top: 1px solid #dce2e8;
  padding-top: 8px;
  font-size: 10px;
  color: #7c8c9b;
}
.pdf-signatures small {
  font-size: 8px;
  color: #a8b1ba;
}
.pdf-footer {
  margin-top: 38px;
  padding-top: 12px;
  border-top: 1px solid #ecf0f3;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 8px;
  color: #a8b2bc;
}
.pdf-row,
.pdf-block,
.pdf-signatures {
  break-inside: avoid;
  page-break-inside: avoid;
}
.pdf-empty {
  color: #a1acb8;
  font-style: italic;
}

.modal {
  border: 1px solid #e3e9ed;
  box-shadow: 0 25px 100px #0c263d33;
  border-radius: 17px;
  width: min(560px, calc(100% - 30px));
  max-height: 90dvh;
  padding: 0;
  color: var(--ink);
  background: white;
}
.modal::backdrop {
  background: #0f203575;
  backdrop-filter: blur(4px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 26px 27px 21px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}
.modal h2 {
  font: 750 25px var(--heading);
  letter-spacing: -0.8px;
  margin: 8px 0;
}
.modal-header p {
  margin: 0;
  font-size: 12px;
  color: #8a97a5;
}
.modal-body {
  padding: 24px 27px;
}
.modal-footer {
  padding: 17px 27px;
  border-top: 1px solid var(--line);
  text-align: right;
}
.modal-footer .button {
  min-width: 140px;
}
.logo-uploader {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 25px;
}
.logo-uploader #logo-preview {
  width: 81px;
  height: 81px;
  border: 1px dashed #cbdcd4;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f7fbf9;
  color: #96afa2;
  flex-shrink: 0;
}
.logo-uploader #logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}
.logo-uploader p {
  font-size: 10px;
  color: #97a2ad;
  margin: 8px 0;
}
.upload-label {
  cursor: pointer;
  width: fit-content;
  font-size: 12px;
}
.logo-uploader .text-button {
  min-height: 28px;
  padding: 0;
  color: #b86d6d;
}
.toggle-label {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 25px 0;
  color: #5c6e7f;
}
.toggle-label input {
  accent-color: var(--green);
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.toggle-label strong {
  font-size: 12px;
  font-weight: 500;
}
.toggle-label small {
  display: block;
  font-size: 11px;
  color: #9aa6b2;
  margin-top: 3px;
}
.info-box {
  padding: 14px;
  background: #f3f7f8;
  border-radius: 8px;
  color: #8395a0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11px;
  line-height: 1.7;
}
.info-box svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
}
.settings-section {
  margin-bottom: 27px;
}
.settings-section h3 {
  font: 700 17px var(--heading);
  margin: 12px 0 8px;
}
.settings-section p {
  font-size: 12px;
  color: #8594a1;
  line-height: 1.9;
}
.settings-section .button {
  width: 100%;
  margin-top: 10px;
}
.settings-section > small {
  display: block;
  font-size: 11px;
  color: #a4adb8;
  margin-top: 10px;
}
.install-note {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.install-note > svg {
  color: #829d8d;
}
.version-label {
  font-size: 9px;
  letter-spacing: 1.4px;
  text-align: center;
  color: #a9b3bc;
  margin: 25px 0 0;
}
.search-field {
  position: relative;
  margin-bottom: 20px;
}
.search-field > svg {
  position: absolute;
  left: 13px;
  top: 13px;
  color: #99a6b3;
  width: 17px;
}
.search-field input {
  padding-left: 40px;
  margin: 0;
}
.history-empty {
  text-align: center;
  padding: 35px 10px;
  color: #8595a5;
  font-size: 13px;
}
.history-empty > svg {
  width: 36px;
  height: 36px;
  color: #b4c5bb;
  margin-bottom: 10px;
}
.history-empty h3 {
  font: 700 17px var(--heading);
  color: #516778;
}
.history-entry {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px;
  margin-bottom: 12px;
}
.history-entry-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.history-entry h3 {
  margin: 5px 0 3px;
  font-size: 14px;
  font-weight: 600;
}
.history-type {
  font-size: 9px;
  letter-spacing: 1px;
  color: #7b9a88;
}
.history-entry time {
  color: #a6b0ba;
  font-size: 10px;
}
.history-amount {
  font-weight: 650;
  white-space: nowrap;
  font-size: 14px;
  margin-top: 21px;
}
.history-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid #eff2f4;
  padding-top: 10px;
  margin-top: 12px;
}
.history-actions .button {
  font-size: 11px;
  min-height: 36px;
  padding: 7px 10px;
}
.history-actions .icon-button {
  margin-left: auto;
}
.confirm-modal {
  width: min(420px, calc(100% - 30px));
  text-align: center;
}
.confirm-modal .modal-body {
  padding: 30px;
}
.confirm-icon {
  background: #eaf5ee;
  color: #78a38d;
  width: 50px;
  height: 50px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 10px;
}
.confirm-modal h2 {
  font-size: 21px;
}
.confirm-modal p {
  font-size: 13px;
  line-height: 1.8;
  color: #83909f;
}
.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #142c26;
  color: white;
  max-width: min(500px, calc(100% - 32px));
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 13px;
  box-shadow: 0 8px 35px #102c2a25;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 100;
  text-align: center;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.error {
  background: #7f303b;
}
.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #fff;
  z-index: 200;
}
.pdf-export-host {
  position: fixed;
  left: 0;
  top: 0;
  width: 718px;
  z-index: -10;
  pointer-events: none;
  background: #fff;
}
.pdf-export-host .pdf-document {
  width: 718px;
}

@media (min-width: 1600px) {
  .workspace {
    gap: 42px;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  }
  main {
    padding-top: 44px;
  }
  .page-heading {
    margin-bottom: 36px;
  }
  .card {
    padding: 26px;
  }
  .section-heading p {
    font-size: 12px;
  }
  label {
    font-size: 13px;
  }
  .company-strip strong {
    font-size: 14px;
  }
  .company-strip small {
    font-size: 12px;
  }
  .preview-header > span:first-child {
    font-size: 14px;
  }
  .preview-stage {
    padding: 28px 28px 0;
  }
}
@media (max-width: 1230px) {
  .sidebar {
    width: 204px;
    padding: 28px 15px;
  }
  .app-shell {
    margin-left: 204px;
  }
  .brand {
    font-size: 18px;
    gap: 8px;
  }
  .brand-icon {
    width: 32px;
    height: 35px;
  }
  .sidebar .brand b {
    font-size: 8px;
  }
  .nav-link {
    font-size: 12px;
    gap: 10px;
  }
  .workspace-label {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .sidebar-note {
    margin-left: 0;
    margin-right: 0;
    padding: 18px 15px;
  }
  .sidebar-note h3 {
    font-size: 16px;
  }
  main {
    padding: 28px 26px 0;
  }
  .topbar {
    padding: 0 26px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading .example-button {
    font-size: 10px;
    padding: 7px 9px;
  }
  .workspace {
    gap: 22px;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  }
  .card {
    padding: 17px;
  }
  .document-meta {
    gap: 8px;
  }
  .section-heading {
    gap: 9px;
  }
  .section-heading p {
    font-size: 9px;
  }
  .section-heading h2 {
    font-size: 13px;
  }
  .section-icon {
    width: 30px;
    height: 30px;
  }
  .company-strip {
    padding: 13px;
  }
  .company-strip small {
    font-size: 9px;
  }
  .item {
    padding: 11px;
  }
  .item-bottom {
    gap: 7px;
  }
  .item-bottom label {
    font-size: 9px;
  }
  .item-subtotal strong {
    font-size: 11px;
  }
  .item-subtotal {
    font-size: 9px;
  }
  .preview-stage {
    padding: 17px 15px 0;
  }
  .page-heading .eyebrow {
    font-size: 8px;
  }
  .button-tag {
    display: none;
  }
  .export-area .button-primary > svg {
    margin-right: 0;
  }
  .theme-picker {
    font-size: 10px;
  }
}
@media (max-width: 1020px) and (min-width: 801px) {
  .sidebar {
    width: 78px;
    padding: 26px 12px;
  }
  .sidebar .brand > span:last-child,
  .workspace-label,
  .nav-link > span,
  .sidebar-note,
  .sidebar-bottom {
    display: none;
  }
  .sidebar .brand {
    justify-content: center;
  }
  .main-nav {
    margin-top: 38px;
    gap: 15px;
  }
  .nav-link {
    padding: 13px;
    justify-content: center;
  }
  .app-shell {
    margin-left: 78px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading {
    margin-bottom: 24px;
  }
  .workspace {
    gap: 20px;
  }
}
@media (max-width: 800px) {
  body {
    font-size: 16px;
  }
  .sidebar,
  .topbar {
    display: none;
  }
  .app-shell {
    margin-left: 0;
  }
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid var(--line);
  }
  .mobile-header .brand {
    font-size: 20px;
  }
  .mobile-header > div {
    display: flex;
    align-items: center;
    gap: 2px;
  }
  .mobile-header .avatar {
    margin: 0 4px;
  }
  .mobile-header .icon-button {
    width: 36px;
    min-width: 36px;
  }
  .brand b {
    font-size: 8px;
  }
  .brand-icon {
    width: 32px;
    height: 34px;
  }
  .brand-icon svg {
    width: 21px;
    height: 21px;
  }
  main {
    max-width: 680px;
    padding: 26px 20px 100px;
  }
  .page-heading {
    display: block;
    margin-bottom: 20px;
  }
  .page-heading .eyebrow {
    font-size: 8px;
    letter-spacing: 1.3px;
  }
  .page-heading h1 {
    font-size: 27px;
    letter-spacing: -1.2px;
    margin: 9px 0 6px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .example-button {
    margin-top: 17px;
  }
  .page-heading .example-button {
    font-size: 11px;
    min-height: 40px;
    padding: 8px 12px;
  }
  .mobile-view-toggle {
    display: flex;
    border: 1px solid #e1e7ec;
    border-radius: 8px;
    background: #eef2f5;
    padding: 4px;
    margin-bottom: 20px;
  }
  .mobile-view-toggle button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1;
    min-height: 42px;
    background: transparent;
    color: #8290a0;
    font-size: 12px;
    border-radius: 5px;
  }
  .mobile-view-toggle button.active {
    background: white;
    color: #325443;
    box-shadow: 0 1px 4px #183d3410;
  }
  .mobile-view-toggle svg {
    width: 16px;
  }
  .workspace {
    display: block;
  }
  .preview-column {
    display: none;
  }
  .preview-mode .editor {
    display: none;
  }
  .preview-mode .preview-column {
    display: block;
  }
  .preview-sticky {
    position: static;
  }
  .preview-stage {
    padding: 18px 18px 0;
  }
  .preview-header {
    margin: 0 0 14px;
  }
  .preview-header > span:first-child {
    font-size: 13px;
  }
  .live-badge {
    font-size: 8px;
  }
  .mode-switch {
    margin-bottom: 18px;
  }
  .mode-switch button {
    min-height: 59px;
    font-size: 14px;
    column-gap: 8px;
  }
  .mode-switch button span {
    font-size: 10px;
  }
  .document-meta {
    gap: 10px;
    grid-template-columns: 0.85fr 1.25fr 0.85fr;
  }
  .document-meta label {
    font-size: 11px;
  }
  .document-meta input,
  .document-meta select {
    font-size: 12px;
    padding: 10px 9px;
    min-height: 44px;
  }
  .company-strip {
    margin-bottom: 18px;
    padding: 14px;
  }
  .company-strip strong {
    font-size: 12px;
  }
  .company-strip small {
    font-size: 10px;
  }
  .card {
    padding: 20px;
    margin-bottom: 17px;
  }
  .section-heading {
    margin-bottom: 20px;
    gap: 11px;
  }
  .section-heading h2 {
    font-size: 14px;
  }
  .section-heading p {
    font-size: 10px;
  }
  .section-icon {
    width: 33px;
    height: 33px;
  }
  .fields {
    gap: 16px 12px;
  }
  label {
    font-size: 12px;
  }
  input:not([type='checkbox']),
  select,
  textarea {
    font-size: 16px;
    min-height: 46px;
  }
  input::placeholder,
  textarea::placeholder {
    font-size: 13px;
  }
  .item {
    padding: 13px;
  }
  .item-type {
    font-size: 12px !important;
    min-height: 36px !important;
    padding: 6px 28px 6px 10px !important;
    width: 120px;
  }
  .item-description {
    font-size: 16px !important;
  }
  .item-bottom {
    grid-template-columns: 0.8fr 0.9fr 1.3fr;
    gap: 9px;
    margin-top: 14px;
  }
  .item-bottom label {
    font-size: 10px;
  }
  .item-bottom input,
  .item-bottom select {
    font-size: 16px;
    padding: 9px;
    min-height: 44px;
  }
  .item-bottom .input-prefix input {
    padding-left: 26px;
  }
  .item-subtotal {
    grid-column: 1/-1;
    flex-direction: row;
    align-items: center;
    padding: 8px 0 0;
    border-top: 1px solid #e8ecef;
    margin-top: 3px;
    font-size: 11px;
  }
  .item-subtotal strong {
    font-size: 13px;
  }
  .item-top > span {
    font-size: 10px;
  }
  .item-remove {
    min-width: 44px;
    width: 44px;
    height: 44px;
  }
  .item-remove svg {
    width: 17px;
    height: 17px;
  }
  .add-item {
    font-size: 13px;
    min-height: 46px;
  }
  .finance-fields label {
    font-size: 10px;
  }
  .discount-input {
    min-height: 46px;
  }
  .discount-input input {
    min-height: 34px;
  }
  .discount-type button {
    min-width: 30px;
    height: 36px;
  }
  .finance-fields .input-prefix input {
    padding-left: 28px;
  }
  .grand-total strong {
    font-size: 22px;
  }
  .grand-total small {
    font-size: 9px;
  }
  .suggestion-chips button {
    font-size: 11px;
    min-height: 44px;
    padding: 8px 9px;
  }
  .editor-footer {
    flex-wrap: wrap;
  }
  .editor-footer .button,
  .editor-footer .text-button {
    font-size: 11px;
  }
  .mobile-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffffee;
    backdrop-filter: blur(10px);
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #e2e9e6;
    box-shadow: 0 -5px 20px #17362705;
    z-index: 15;
    gap: 12px;
  }
  .mobile-action-bar small {
    display: block;
    font-size: 10px;
    color: #88998e;
  }
  .mobile-action-bar strong {
    font: 700 18px var(--heading);
    color: #17875e;
    letter-spacing: -0.6px;
  }
  .mobile-action-bar .button {
    min-width: 150px;
    min-height: 44px;
    font-size: 12px;
  }
  .toast {
    bottom: 100px;
    font-size: 12px;
  }
  .app-footer {
    padding: 20px 0;
    margin-top: 30px;
    font-size: 9px;
  }
  .app-footer > span:last-child {
    font-size: 8px;
  }
  .theme-picker {
    font-size: 12px;
    margin: 20px 0;
  }
  .swatch {
    width: 21px;
    height: 21px;
  }
  .swatch.active:after {
    line-height: 15px;
  }
  .export-area > .button {
    font-size: 13px;
    min-height: 48px;
  }
  .export-area > p {
    font-size: 9px;
  }
  .preview-tip p {
    font-size: 11px;
  }
  .modal .fields label {
    font-size: 12px;
  }
  .modal-body {
    padding: 22px;
  }
  .modal-header {
    padding: 23px 22px;
  }
  .modal h2 {
    font-size: 24px;
  }
  .modal-header p {
    font-size: 11px;
  }
  .modal .eyebrow {
    font-size: 8px;
  }
  .modal {
    max-height: 92dvh;
  }
  .logo-uploader {
    gap: 12px;
  }
  .logo-uploader #logo-preview {
    width: 70px;
    height: 70px;
  }
  .logo-uploader .upload-label {
    font-size: 11px;
    padding: 9px 12px;
  }
  .history-actions .button {
    min-height: 44px;
  }
  .history-type {
    font-size: 10px;
  }
  .history-entry time {
    font-size: 11px;
  }
  .history-amount {
    font-size: 13px;
  }
  .theme-picker > div {
    gap: 16px;
  }
  .receipt-fields label {
    font-size: 12px;
  }
}
/* Physical page sizes stay identical on screen and in the exported PDF. */
.paper {
  width: 210mm;
  padding: 0;
  background: transparent;
  min-height: 0;
}
#document-content {
  background: transparent;
}
.pdf-sheet {
  width: 210mm;
  height: 297mm;
  padding: 10mm;
  background: white;
  margin-bottom: 22px;
  overflow: hidden;
}
.pdf-sheet:last-child {
  margin-bottom: 0;
}
.pdf-page-content {
  width: 190mm;
  height: 277mm;
  display: flow-root;
  overflow: visible;
}
.pagination-host {
  position: absolute;
  left: -20000px;
  top: 0;
  width: 210mm;
  visibility: hidden;
  pointer-events: none;
}
.pdf-header {
  padding-bottom: 20px;
}
.pdf-logo {
  width: 90px;
  height: 75px;
}
.pdf-client {
  margin-top: 22px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.pdf-table td {
  padding-top: 11px;
  padding-bottom: 11px;
}
.pdf-total-row {
  padding-top: 5px;
  padding-bottom: 5px;
}
.pdf-total-final {
  padding-top: 13px;
  padding-bottom: 13px;
}
.pdf-notes {
  padding-top: 15px;
}
.pdf-payment {
  padding-top: 12px;
  padding-bottom: 12px;
}
.pdf-signatures {
  padding-top: 36px;
}
.pdf-footer {
  margin-top: 18px;
}
.document-meta.receipt-meta {
  grid-template-columns: 1fr 1.5fr;
}
body {
  font-size: 16px;
}
label {
  font-size: 14px;
}
input:not([type='checkbox']),
select,
textarea {
  font-size: 14px;
}
.section-heading h2 {
  font-size: 16px;
}
.section-heading p {
  font-size: 12px;
}
.document-meta label,
.receipt-fields label {
  font-size: 14px;
}
.document-meta input,
.document-meta select {
  font-size: 14px;
}
.company-strip strong {
  font-size: 14px;
}
.company-strip small {
  font-size: 12px;
}
.item-bottom label,
.finance-fields label {
  font-size: 12px;
}
.item-bottom input,
.item-bottom select {
  font-size: 14px;
}
.item-description {
  font-size: 14px !important;
}
.item-subtotal strong {
  font-size: 14px;
}
.sidebar-note h3 {
  font-size: 16px;
  letter-spacing: -0.6px;
}
.pdf-document-id p {
  font-size: 10px;
}
@media (max-width: 800px) {
  .document-meta,
  .document-meta.receipt-meta {
    grid-template-columns: 1fr 1.5fr;
  }
  #validity-label {
    grid-column: 1/-1;
  }
  .document-meta label {
    white-space: nowrap;
  }
  .document-meta input,
  .document-meta select,
  input:not([type='checkbox']),
  select,
  textarea {
    font-size: 16px;
  }
  .mobile-header .icon-button {
    width: 44px;
    min-width: 44px;
  }
  .mobile-header .brand {
    font-size: 19px;
    gap: 7px;
  }
  .mobile-header > div {
    gap: 0;
  }
  .mobile-header .avatar {
    width: 44px;
    height: 44px;
    margin: 0;
  }
  .mode-switch button {
    font-size: 14px;
  }
  .mode-switch button span {
    font-size: 9px;
  }
  .section-heading h2 {
    font-size: 15px;
  }
  .section-heading p {
    font-size: 12px;
  }
  .section-heading > .optional {
    font-size: 9px;
  }
  .item-description {
    font-size: 16px !important;
  }
  .item-bottom label {
    font-size: 11px;
  }
  .item-bottom {
    grid-template-columns: 0.75fr 1.15fr 1.5fr;
    gap: 8px;
  }
  .item-bottom input,
  .item-bottom select {
    font-size: 16px;
  }
  .company-strip small {
    font-size: 11px;
  }
  .finance-fields {
    grid-template-columns: 1fr;
  }
  .finance-fields label {
    font-size: 13px;
  }
  .discount-type button {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }
  .discount-input {
    min-height: 54px;
  }
  .page-heading .example-button,
  .export-area .share-file,
  .logo-uploader .text-button {
    min-height: 44px;
  }
  .item-type {
    min-height: 44px !important;
  }
  .swatch:before {
    inset: -12px;
  }
  .suggestion-chips button {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.pdf-ready { text-align: center; }
.pdf-ready-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px; color: #078761; background: #eaf7f1; border-radius: 16px; }
.pdf-ready-icon svg { width: 28px; height: 28px; }
.pdf-ready > strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.pdf-ready > p { font-size: 13px; color: #788898; line-height: 1.7; }
.pdf-ready > .button { display: flex; width: 100%; min-height: 48px; margin-top: 12px; }
.pdf-ready > .text-button { margin-top: 8px; }
#pdf-ready-status { font-size: 12px; color: #638a73; }
#doc-number { background: #f1f5f8; color: #62748a; cursor: default; }
.pdf-ready-modal { max-width: 480px; }
@media print {
  body > * {
    display: none !important;
  }
  body > .print-host {
    display: block !important;
  }
  .print-host .pdf-document {
    width: 190mm;
  }
  @page {
    size: A4 portrait;
    margin: 10mm;
  }
}
