:root {
  color-scheme: light;
  --ink: #26302a;
  --muted: #68736c;
  --line: #dfe7de;
  --paper: #fffdf8;
  --panel: #ffffff;
  --leaf: #2f6f4f;
  --moss: #7b9b63;
  --rose: #c96f68;
  --gold: #c99a4c;
  --mist: #edf4ef;
  --shadow: 0 18px 48px rgba(38, 48, 42, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f6faf5 0%, #fffaf2 100%);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  padding: 24px;
}

.workspace {
  max-width: 1440px;
  margin: 0 auto;
}

.hero {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  background:
    linear-gradient(90deg, rgba(38, 48, 42, 0.78), rgba(47, 111, 79, 0.42)),
    url("./assets/evergreen-love-catalog.png") center / contain;
  background-color: #2f6f4f;
  background-repeat: no-repeat;
  color: white;
}

.brand-block,
.hero-actions,
.section-title,
.product-row,
.invoice-head,
.totals div {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 16px;
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.hero label {
  color: white;
}

input,
textarea,
select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}

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

.hero input {
  width: 145px;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.92);
}

.hero-photo-upload {
  min-width: 190px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.hero-photo-upload span {
  font-size: 0.82rem;
}

.hero-photo-upload input {
  min-height: auto;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: white;
  font-size: 0.74rem;
}

.save-button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--leaf);
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(38, 48, 42, 0.08);
}

.save-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
}

.import-data-control {
  min-height: 40px;
  min-width: 150px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.import-data-control span {
  font-size: 0.82rem;
}

.import-data-control input {
  min-height: auto;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: white;
  font-size: 0.72rem;
}

.export-download-link,
.export-copy-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 6px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--leaf);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.export-copy-button {
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.export-ready {
  min-width: 230px;
  display: grid;
  gap: 5px;
  color: white;
}

.export-ready span,
.export-ready small {
  display: block;
  max-width: 250px;
  overflow-wrap: anywhere;
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
}

.export-ready small {
  opacity: 0.88;
}

.export-backup-text {
  width: 100%;
  min-height: 82px;
  max-height: 130px;
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.35;
}

.layout {
  display: grid;
  grid-template-columns: minmax(270px, 340px) 1fr;
  gap: 18px;
  margin-top: 18px;
}

.main-stack {
  display: grid;
  gap: 18px;
}

.panel,
.invoice-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel {
  padding: 20px;
}

.sidebar {
  align-self: start;
}

.section-title {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.05rem;
}

.section-title span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.invoice-manager {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.accounting-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.accounting-title {
  align-items: flex-start;
}

.accounting-title > div {
  display: grid;
  gap: 2px;
}

.accounting-toggle {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.78rem;
}

.accounting-content {
  display: grid;
  gap: 12px;
}

.ivu-report {
  display: grid;
  gap: 9px;
  border: 1px solid #b9c9ba;
  border-radius: 8px;
  padding: 12px;
  background: #f6faf4;
}

.ivu-report-head {
  display: grid;
  gap: 2px;
}

.ivu-report-head span,
.ivu-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.ivu-report-head strong {
  color: var(--ink);
  font-size: 0.98rem;
  text-transform: capitalize;
}

.ivu-report-head small,
.ivu-report p {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.ivu-report p {
  margin: 0;
}

.ivu-breakdown {
  display: grid;
  gap: 6px;
}

.ivu-breakdown div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(185, 201, 186, 0.7);
  padding-bottom: 5px;
}

.ivu-breakdown div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ivu-breakdown span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.ivu-breakdown strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.ivu-breakdown .ivu-total-line {
  border-top: 1px solid var(--ink);
  padding-top: 7px;
}

.ivu-breakdown .ivu-total-line strong {
  color: var(--leaf);
  font-size: 0.94rem;
}
.accounting-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.accounting-summary div,
.accounting-current {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdf9;
}

.accounting-summary span,
.accounting-current span,
.payment-record span,
.payment-record small,
.empty-accounting {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.accounting-summary strong {
  color: var(--leaf);
  font-size: 0.95rem;
}

.accounting-current .primary-button {
  min-height: 38px;
  margin-top: 4px;
  padding: 9px 10px;
  font-size: 0.82rem;
}

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

.payment-record {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.payment-record div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.payment-record .ghost-button {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 0.78rem;
}

.empty-accounting {
  margin: 0;
}

.invoice-manager-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.invoice-manager-actions .primary-button,
.invoice-manager-actions .ghost-button {
  min-height: 38px;
  padding: 9px 10px;
  font-size: 0.82rem;
}

.invoice-select-control {
  display: grid;
  gap: 6px;
}

.invoice-select-control select {
  width: 100%;
}

.active-invoice-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fbfdf9;
}

.active-invoice-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.active-invoice-card .danger-button {
  margin-top: 6px;
}

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

.customer-access {
  display: grid;
  gap: 10px;
}

.customer-access-button {
  width: 100%;
  color: var(--leaf);
  font-weight: 850;
}

.customer-select-control {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdf9;
}

.customer-select-control select {
  width: 100%;
}

.customer-select-control small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.customer-card {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.customer-card:hover {
  border-color: rgba(47, 111, 79, 0.46);
  background: #fbfdf9;
}

.customer-card.active {
  border-color: var(--leaf);
  background: var(--mist);
  box-shadow: inset 4px 0 0 var(--leaf);
}

.customer-card span,
.customer-card small {
  color: var(--muted);
}

.customer-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.customer-form h3 {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.edit-customer-form {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdf9;
}

.edit-customer-heading,
.edit-customer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.edit-customer-heading h3 {
  margin: 0;
}

.edit-customer-heading span {
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 800;
}

.edit-customer-actions {
  margin-top: 2px;
}

.edit-customer-actions .ghost-button,
.edit-customer-actions .primary-button {
  flex: 1;
  min-height: 38px;
}

.saved-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mist);
  color: var(--leaf);
  font-weight: 800;
  cursor: default;
}

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

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.custom-product-card {
  border-color: var(--leaf);
  box-shadow: inset 0 0 0 2px rgba(47, 111, 79, 0.18);
}

.add-product-card {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fafdf9;
}

.add-product-bottom-button {
  min-width: 180px;
}

.product-photo {
  aspect-ratio: 16 / 9;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  background-color: #f8fbf7;
}

.product-details {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.product-row {
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.product-edit {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
}

.product-edit input {
  min-height: 38px;
  width: 100%;
  padding: 8px 10px;
  font-size: 0.9rem;
  font-weight: 650;
}

.product-category-edit {
  color: var(--rose);
}

.product-category-edit input {
  text-transform: uppercase;
}

.stock-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: white;
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.catalog-options .product-edit:nth-child(3),
.catalog-options .product-edit:nth-child(4) {
  grid-column: 1 / -1;
}

.catalog-options textarea {
  min-height: 64px;
}

.photo-upload {
  display: grid;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
  color: var(--leaf);
  font-size: 0.82rem;
  font-weight: 800;
}

.photo-upload input {
  min-height: auto;
  width: 100%;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

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

.move-product-button {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 0.84rem;
}

.move-product-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary-button,
.icon-button,
.ghost-button,
.danger-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
}

.primary-button {
  border: 0;
  background: var(--leaf);
  color: white;
}

.compact-button {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 0.86rem;
}

.icon-button {
  min-width: 42px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.88);
  color: var(--leaf);
  font-size: 0.84rem;
}

.add-to-invoice-button {
  min-height: 42px;
  border: 1px solid var(--leaf);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--leaf);
  color: white;
  font-size: 0.84rem;
  font-weight: 800;
}

.ghost-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
}

.refresh-invoice-button {
  align-self: end;
}

.refresh-status {
  align-self: end;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--mist);
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 800;
}

.danger-button {
  width: 100%;
  margin-top: 12px;
  border: 1px solid #efc5bf;
  background: #fff6f4;
  color: #a23b32;
}

.product-delete-button {
  margin-top: 0;
}

.invoice-shell {
  padding: 0;
}

.invoice-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fafdf9;
}

.tax-toggle {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}

.tax-toggle input {
  min-height: auto;
  width: 18px;
  height: 18px;
  padding: 0;
}

.tax-toggle span {
  font-size: 0.86rem;
  font-weight: 800;
}

.logo-upload {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: white;
}

.logo-upload input {
  min-height: auto;
  width: 100%;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.invoice {
  position: relative;
  overflow: hidden;
  padding: 40px;
  background: #ffffff;
}

.invoice::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--leaf), var(--moss), var(--gold));
}

.invoice-head {
  display: grid;
  grid-template-columns: minmax(210px, 0.95fr) minmax(220px, 1fr) minmax(180px, 0.72fr);
  align-items: flex-start;
  gap: 14px;
  padding: 4px 0 14px;
  border-bottom: 1.5px solid #26302a;
}

.invoice-head .eyebrow {
  margin-bottom: 3px;
  color: var(--leaf);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.invoice-head h2 {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 1.34rem;
  line-height: 1;
}

.invoice-brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.invoice-title-block {
  min-width: 0;
  flex: 1;
  text-align: center;
}

.invoice-company-info {
  display: grid;
  gap: 1px;
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.18;
}

.invoice-company-info strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.invoice-location {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

 .invoice-logo {
  width: 52px;
  height: 52px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: white;
  box-shadow: 0 8px 20px rgba(38, 48, 42, 0.08);
}

.invoice-logo-box {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.invoice-logo-change {
  display: grid;
  gap: 3px;
  place-items: center;
  color: var(--leaf);
  font-size: 0.6rem;
  font-weight: 750;
}

.invoice-logo-change input {
  max-width: 70px;
  min-height: auto;
  border: 0;
  padding: 0;
  font-size: 0.56rem;
}

.invoice-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 10px;
  background: #fafdf9;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.2;
  text-align: right;
}

.invoice-meta strong {
  display: inline-flex;
  justify-self: end;
  border-radius: 5px;
  padding: 5px 7px;
  background: var(--ink);
  color: white;
  font-size: 0.66rem;
  letter-spacing: 0;
}

.invoice-meta span,
.bill-to span,
.invoice-notes {
  color: var(--muted);
}

.bill-to {
  margin: 26px 0;
  border: 1px solid var(--line);
  border-left: 5px solid var(--leaf);
  border-radius: 8px;
  padding: 16px 18px;
  background: #fbfdf9;
}

.bill-to-header {
  max-width: 360px;
  margin: 4px auto 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-left: 0;
  border-radius: 0;
  padding: 6px 4px 0;
  background: transparent;
  text-align: center;
}

.bill-to span {
  display: block;
  margin-bottom: 3px;
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bill-to strong {
  display: block;
  margin-top: 0;
  font-size: 0.86rem;
  line-height: 1.08;
}

.bill-to p {
  margin-bottom: 0;
  font-size: 0.68rem;
  line-height: 1.12;
}

.bill-company {
  margin: 2px 0 3px;
  color: var(--leaf);
  font-weight: 800;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 8px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.invoice-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}

.invoice-table thead th {
  border-bottom: 0;
  background: var(--ink);
  color: white;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.invoice-table tbody tr:nth-child(even) {
  background: #fafdf9;
}

.invoice-table tbody td {
  border-bottom: 1px solid #e8eee6;
}

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

.invoice-table td:nth-child(4),
.invoice-table td:nth-child(5),
.invoice-table td:nth-child(6),
.invoice-table th:nth-child(4),
.invoice-table th:nth-child(5),
.invoice-table th:nth-child(6) {
  text-align: right;
}

.qty-input {
  width: 74px;
  margin-top: 6px;
}

.invoice-category {
  display: block;
  margin-top: 5px;
  color: var(--rose);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-qty {
  display: block;
  color: var(--leaf);
  font-size: 1rem;
}

.item-options-print {
  max-width: 280px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.invoice-photo {
  width: 34px;
  height: 34px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  object-fit: contain;
  background-color: #f8fbf7;
}

.photo-empty {
  background: var(--mist);
}

.empty-row {
  color: var(--muted);
  text-align: center;
}

.invoice-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 22px;
  align-items: start;
  margin-top: 26px;
}

.invoice-terms {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdf9;
}

.invoice-terms h3 {
  margin: 0 0 5px;
  color: var(--leaf);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.invoice-terms p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.totals {
  max-width: 390px;
  margin: 0 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  background: #fbfdf9;
}

.totals div {
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.totals div:last-child {
  border-bottom: 0;
}

.grand-total {
  margin: 5px -16px -12px;
  border-radius: 0 0 8px 8px;
  padding: 14px 16px !important;
  background: var(--leaf);
  color: white;
  font-size: 1.28rem;
}

.invoice-notes {
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-style: italic;
}

.order-checklist {
  margin-top: 18px;
  padding: 34px;
  border-top: 1px solid var(--line);
  background: white;
}

.checklist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.checklist-head .eyebrow {
  color: var(--leaf);
}

.checklist-head h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

.checklist-meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.checklist-meta strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.checklist-table th,
.checklist-table td {
  padding: 8px 6px;
  font-size: 0.82rem;
}

.checklist-photo {
  width: 30px;
  height: 30px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  object-fit: contain;
  background-color: #f8fbf7;
}

.check-box {
  width: 20px;
  height: 20px;
  display: inline-block;
  border: 2px solid var(--leaf);
  border-radius: 4px;
  background: white;
}

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

.checklist-footer label {
  color: var(--ink);
}

.checklist-footer span {
  min-height: 38px;
  display: block;
  border-bottom: 1px solid var(--ink);
}

.print-only {
  display: none;
}

@media (max-width: 980px) {
  .layout,
  .invoice-toolbar {
    grid-template-columns: 1fr;
  }

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

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 640px) {
  .app {
    padding: 12px;
  }

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

  .invoice {
    padding: 20px;
  }

  .invoice-head {
    grid-template-columns: 1fr;
  }

  .invoice-title-block,
  .invoice-meta {
    text-align: left;
  }

  .bill-to-header {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }

  .checklist-head,
  .checklist-footer {
    grid-template-columns: 1fr;
  }

  .checklist-head {
    flex-direction: column;
  }

  .checklist-meta {
    text-align: left;
  }

  .invoice-meta {
    text-align: left;
  }

  .invoice-bottom {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 10px 4px;
    font-size: 0.86rem;
  }

  .invoice-photo {
    width: 34px;
    height: 34px;
  }

  .checklist-photo {
    width: 30px;
    height: 30px;
  }

  .catalog-options {
    grid-template-columns: 1fr;
  }

  .catalog-options .product-edit:nth-child(3),
  .catalog-options .product-edit:nth-child(4) {
    grid-column: auto;
  }
}

@media print {
  body {
    background: white;
  }

  .app {
    padding: 0;
  }

  .hero,
  .sidebar,
  .panel,
  .invoice-toolbar,
  .no-print,
  .no-print-inline {
    display: none !important;
  }

  .workspace,
  .layout,
  .main-stack {
    display: block;
    max-width: none;
    margin: 0;
  }

  .invoice-shell {
    border: 0;
    box-shadow: none;
  }

  .invoice {
    padding: 0.35in;
  }

  .order-checklist {
    margin-top: 0;
    padding: 0.35in;
    page-break-before: always;
    break-before: page;
  }

  .print-only {
    display: inline;
  }

  .invoice-table th,
  .invoice-table td {
    padding: 6px 5px;
    font-size: 0.76rem;
  }

  .invoice-head h2 {
    font-size: 1.18rem;
  }

  .invoice-head {
    gap: 10px;
    padding-bottom: 10px;
  }

  .invoice-logo {
    width: 46px;
    height: 46px;
  }

  .bill-to-header {
    max-width: 310px;
  }

  .bill-to strong {
    font-size: 0.78rem;
  }

  .invoice-company-info {
    font-size: 0.6rem;
  }

  .invoice-terms p {
    font-size: 0.7rem;
  }

  .invoice-bottom {
    gap: 14px;
    margin-top: 18px;
  }

  .invoice-terms {
    padding: 10px;
  }

  .invoice-photo {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .checklist-photo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .item-options-print {
    max-width: 220px;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .invoice-category {
    font-size: 0.66rem;
  }

  .invoice-qty {
    font-size: 0.86rem;
  }
}

