:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --card: #ffffff;
  --line: #cfcfcf;
  --gold: #111111;
  --text: #111111;
  --muted: #333333;
  --danger: #b42318;
  --ok: #1b7a3d;
  --input: #ffffff;
  --btn: #111111;
  --btn-text: #ffffff;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  color-scheme: light;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 260px;
  min-height: 100vh;
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand h1 {
  margin: 0;
  letter-spacing: 0.16em;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.brand-kicker,
.brand-sub,
.eyebrow,
.sidebar-note,
.stat span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
}

.brand-sub,
.sidebar-note {
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.5;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn,
.btn,
select {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.nav-btn {
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 600;
}

.nav-btn.active,
.nav-btn:hover {
  background: #f0f0f0;
  color: var(--text);
  font-weight: 700;
}

.content {
  padding: 24px;
  overflow: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.topbar h2,
.card h3,
.card h4,
.form h4,
.history-day,
.weekly-report h3,
.weekly-report h4,
.granizado-card h4,
.catalog-hero h1,
.catalog-card h2 {
  color: var(--text);
  font-weight: 700;
}

.topbar h2,
.card h3 {
  margin: 6px 0 0;
}

.stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat,
.card,
.toast {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat {
  min-width: 96px;
  padding: 10px 14px;
}

.stat em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 12px;
  color: var(--text);
  font-weight: 700;
}

.stat-wide {
  min-width: 220px;
}

.scanner-stat {
  min-width: 180px;
  border-color: var(--line);
}

.scanner-stat[data-state="waiting"] strong {
  color: var(--muted);
}

.scanner-stat[data-state="listening"] {
  border-color: var(--text);
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.15);
}

.scanner-stat[data-state="listening"] strong {
  color: var(--text);
  font-weight: 700;
}

.scanner-stat[data-state="connected"] {
  border-color: var(--ok);
  box-shadow: 0 0 0 1px rgba(27, 122, 61, 0.25);
}

.scanner-stat[data-state="connected"] strong {
  color: var(--text);
  font-weight: 700;
}

.scanner-stat .btn {
  margin-top: 0;
}

.scanner-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.scanner-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  margin-bottom: 2px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.scanner-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #666666;
  display: inline-block;
}

.scanner-pill[data-state="waiting"] i {
  background: #666666;
}

.scanner-pill[data-state="listening"] {
  border-color: var(--text);
  color: var(--text);
  font-weight: 700;
}

.scanner-pill[data-state="listening"] i {
  background: var(--text);
  animation: scanner-blink 0.9s ease-in-out infinite;
}

.scanner-pill[data-state="connected"] {
  border-color: var(--ok);
  color: var(--text);
  font-weight: 700;
}

.scanner-pill[data-state="connected"] i {
  background: var(--ok);
  box-shadow: none;
}

.formula-neto {
  border-color: var(--line);
  color: var(--text);
  font-weight: 700;
}

.formula-neto.has-discount {
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.12);
  background: #f5f5f5;
}

.discount-value {
  color: var(--text);
  font-weight: 700;
}

.price-now {
  display: block;
  font-weight: 600;
}

.hint.scan-ok {
  color: var(--ok);
  font-weight: 700;
}

.hint.scan-bad {
  color: #d36b6b;
}

.stat-formula {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
}

.toast {
  padding: 10px 14px;
  margin-bottom: 16px;
}

.toast.ok {
  border-color: var(--ok);
  color: var(--ok);
}

.toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 18px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  padding: 18px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.card-head.wrap,
.barcode-row {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

#products-table tr.scan-hit td {
  background: #f0f0f0;
  box-shadow: inset 3px 0 0 #111111;
}

#products-table tr.scan-hit {
  animation: scan-pulse 1.1s ease-in-out 2;
}

@keyframes scan-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.18);
  }
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  flex: 1;
}

input,
select,
textarea {
  background: var(--input);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 400;
  width: 100%;
}

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

input::placeholder,
textarea::placeholder {
  color: #555555;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  outline: 1px solid var(--text);
}

input.formula {
  background: #f5f5f5;
  color: var(--text);
  font-weight: 700;
  pointer-events: none;
}

.formula-note {
  font-size: 11px;
  color: var(--muted);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.row.three {
  grid-template-columns: 1.1fr 0.8fr 1.1fr;
}

.client-form {
  gap: 6px;
  padding: 12px;
}

.client-form h3 {
  margin: 0;
}

.client-form label {
  gap: 4px;
}

.client-form input,
.client-form select {
  padding: 8px 10px;
}

.client-form .hint {
  font-size: 12px;
  line-height: 1.3;
}

.client-form .formula-note {
  margin: 0;
}

.client-form .table-wrap table {
  min-width: 0;
}

.client-form .cart-total {
  margin-top: 4px;
  padding-top: 8px;
  font-size: 16px;
}

.client-form .form-actions {
  margin-top: 2px;
}

.plan-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.form h4 {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
}

.cost-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cost-item-row {
  display: grid;
  grid-template-columns: 1.6fr 0.55fr 0.9fr auto;
  gap: 8px;
  align-items: center;
}

.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-actions.stack-actions {
  flex-direction: column;
  margin-top: 12px;
}

.form-actions.stack-actions .btn {
  width: 100%;
}

.granizado-grid {
  display: grid;
  gap: 14px;
}

.granizado-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--card);
}

.granizado-card h4 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.granizado-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

@media (min-width: 720px) {
  .granizado-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.granizado-price-edit {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.granizado-price-edit .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sale-edit-card {
  max-width: 760px;
  width: min(96vw, 760px);
  max-height: 90vh;
  overflow: auto;
}

.sale-edit-card input[type="number"],
.sale-edit-card input[type="text"],
.sale-edit-card input[type="tel"],
.sale-edit-card textarea {
  width: 100%;
  min-width: 0;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.topbar > div .btn {
  margin-top: 0;
}

.image-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.image-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}

.image-option img,
.thumb,
.catalog-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #f0f0f0;
}

.thumb {
  width: 44px;
  height: 44px;
  aspect-ratio: auto;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 16px;
}

.modal[hidden] {
  display: none;
}

.modal-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.catalog-qr-box {
  display: grid;
  place-items: center;
  margin: 12px 0;
}

.catalog-qr-box svg,
.catalog-qr-box img {
  width: 180px;
  height: 180px;
  background: #fff;
  border-radius: 8px;
}

.form-actions .btn {
  flex: 1;
  min-width: 140px;
  font-size: 15px;
  padding: 12px 16px;
}

.btn {
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--btn);
  color: var(--btn-text);
  font-weight: 700;
}

a.btn {
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn.primary {
  background: var(--btn);
  color: var(--btn-text);
  font-weight: 700;
}

.btn.ghost,
.btn.tiny {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--text);
}

.btn.danger {
  background: #ffffff;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn.danger.wide {
  display: block;
  background: transparent;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 16px;
}

.btn.wide {
  width: 100%;
  margin-top: 12px;
}

.btn.primary.wide {
  display: block;
  font-size: 15px;
  padding: 12px 16px;
}

.btn.tiny {
  padding: 6px 8px;
  font-size: 12px;
}

.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.cart-actions .btn.tiny {
  min-width: 4.4rem;
}

.cart td input[type="text"],
.cart td input[type="number"],
.plan-pay-table td input[type="text"],
.plan-pay-table td input[type="number"],
.sale-edit-card td input[type="text"],
.sale-edit-card td input[type="number"] {
  min-width: 4.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.cart table,
.separe-ledger-table,
.plan-pay-table,
.account-table {
  min-width: 0;
}

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

th {
  color: var(--text);
  font-weight: 700;
}

.product-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow: auto;
}

.pick-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.pick-item p {
  margin: 0;
}

.pick-item small {
  color: var(--muted);
}

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

.qty-row input {
  width: 72px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 20px;
  color: var(--text);
  font-weight: 700;
}

.cart-total[hidden],
.table-wrap[hidden] {
  display: none !important;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.history-day {
  margin: 18px 0 8px;
  font-size: 15px;
  text-transform: capitalize;
}

.history-item[data-history-id] {
  scroll-margin-top: 12px;
}

.sale-day-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin: 10px 0;
}

.sale-day-row label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--text);
  font-weight: 700;
}

.sale-day-row input[type="date"] {
  min-width: 11rem;
}

.sale-customer,
.sale-note {
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
}

.sale-note {
  white-space: pre-wrap;
}

.weekly-report {
  margin: 0 0 16px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.weekly-report h3,
.weekly-report h4 {
  margin: 12px 0 8px;
}

.weekly-report h3 {
  margin-top: 0;
}

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

.week-stats div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.week-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.week-stats strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 1100px) {
  .week-stats {
    grid-template-columns: 1fr;
  }
}

.empty {
  color: var(--muted);
  padding: 8px;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.check input {
  width: auto;
}

.inspire {
  background: var(--panel);
  border-left: 1px solid var(--line);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.inspire.align-left {
  align-items: flex-start;
  text-align: left;
}

.inspire-kicker,
.inspire-label {
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  margin: 0;
}

.family-photo {
  width: 168px;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  padding: 10px;
}

.daily-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.inspire-date {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.plan-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.plan-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  align-items: flex-start;
}

.plan-card.is-editing {
  border-color: var(--gold);
}

.plan-name-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.plan-name-line strong {
  font-size: 16px;
}

.plan-name-line .debe {
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

.plan-summary {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 10px;
}

.plan-summary th,
.plan-summary td {
  text-align: left;
  vertical-align: top;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.plan-summary th {
  width: 7.5rem;
  color: var(--text);
  font-weight: 700;
  padding-right: 12px;
  white-space: nowrap;
}

.plan-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.plan-actions .btn {
  flex: 1;
}

.plan-card p {
  margin: 4px 0;
  font-size: 13px;
}

.separe-ledger {
  margin-top: 18px;
  margin-bottom: 0;
}

.separe-ledger-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.separe-ledger-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.separe-ledger-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.separe-ledger-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  color: var(--text);
  font-weight: 700;
}

.separe-ledger-stat.owe strong {
  color: var(--text);
}

.separe-ledger-table {
  width: 100%;
  min-width: 0;
}

.separe-ledger-table th,
.separe-ledger-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.separe-ledger-table .debe {
  font-weight: 700;
  color: var(--text);
}

.plan-pay-table {
  width: 100%;
  min-width: 0;
  margin: 8px 0;
}

.plan-pay-table th,
.plan-pay-table td {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  vertical-align: middle;
}

.plan-pay-table input {
  width: 100%;
  min-width: 0;
}

.plan-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin: 10px 0;
}

.plan-add-row select {
  min-width: 12rem;
  flex: 1;
}

.plan-search-label {
  width: 100%;
}

.product-hits {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #f5f5f5;
}

.product-hits[hidden] {
  display: none;
}

.product-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
}

.product-hit:hover,
.product-hit:focus {
  outline: none;
  border-color: var(--gold);
}

.product-hit strong {
  font-size: 13px;
}

.product-hit small {
  color: var(--muted);
  font-size: 12px;
}

.plan-add-row input[type="number"] {
  width: 5.5rem;
}

.plan-balance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0;
  font-size: 13px;
}

.plan-balance .debe {
  font-weight: 700;
  color: var(--text);
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 8px;
}

.account-table th,
.account-table td {
  text-align: left;
  padding: 2px 0;
  font-size: 11px;
  border-bottom: 1px dashed var(--line);
}

.account-table th:nth-child(2),
.account-table th:nth-child(3),
.account-table td:nth-child(2),
.account-table td:nth-child(3) {
  text-align: right;
}

.account-debe {
  font-weight: 700;
  font-size: 14px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.ok {
  color: var(--ok);
  border-color: var(--ok);
}

.badge.warn {
  color: var(--text);
  border-color: var(--text);
  font-weight: 700;
}

.pay-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.plan-card label {
  display: block;
  margin: 8px 0 0;
}

.pay-row input {
  flex: 1;
}

body[data-theme="boutique"],
body[data-theme="claro"] {
  --bg: #ffffff;
  --panel: #ffffff;
  --card: #ffffff;
  --line: #cfcfcf;
  --gold: #111111;
  --text: #111111;
  --muted: #333333;
  --input: #ffffff;
  --btn: #111111;
  --btn-text: #ffffff;
}

body[data-theme="rosa"] {
  --bg: #1a1014;
  --panel: #26181e;
  --card: #2c1c23;
  --line: #4a2e38;
  --gold: #e2a0b2;
  --text: #fbeff3;
  --muted: #c9a8b2;
  --input: #2c1c23;
  --btn: #fbeff3;
  --btn-text: #1a1014;
}

body[data-theme="azul"] {
  --bg: #0b1220;
  --panel: #121a2c;
  --card: #162036;
  --line: #2a3a58;
  --gold: #7eb6ff;
  --text: #eaf2ff;
  --muted: #9aadc8;
  --input: #162036;
  --btn: #eaf2ff;
  --btn-text: #0b1220;
}

body[data-font="grande"] {
  font-size: 18px;
}

body[data-radius="soft"] {
  --radius: 8px;
}

body[data-radius="square"] {
  --radius: 2px;
}

body[data-density="compacta"] .card {
  padding: 12px;
}

body[data-density="compacta"] .sidebar {
  padding: 16px 14px;
}

@media (max-width: 1100px) {
  body {
    grid-template-columns: 1fr;
    padding-bottom: 76px;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
    gap: 12px;
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: row;
    flex-wrap: wrap;
    background: #ffffff;
    border-top: 1px solid var(--line);
    padding: 8px;
    z-index: 10;
  }

  .nav-btn {
    flex: 1 1 30%;
    text-align: center;
    font-size: 12px;
    padding: 8px 6px;
  }

  .grid-two,
  .row,
  .row.grow,
  .row.three,
  .cost-item-row,
  .separe-ledger-stats {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 16px;
  }

  .inspire {
    border-left: 0;
    border-top: 1px solid var(--line);
    order: -1;
  }

  table {
    min-width: 640px;
  }
}

.invoice-sheet {
  display: none;
}

body.printing .invoice-sheet {
  display: block;
}

.invoice-head,
.invoice-signs {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  margin-bottom: 8px;
}

.invoice-head p,
.invoice-signs p,
.invoice-sheet p {
  margin: 0 0 3px;
}

.ticket-logo {
  width: 42mm;
  max-width: 100%;
  height: auto;
  background: #fff;
  margin: 0 auto 4px;
}

.invoice-brand {
  font-size: 16px;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0 0 2px;
}

.invoice-note {
  margin-top: 6px;
  font-size: 11px;
  color: #555;
}

.invoice-kind {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  margin: 6px 0;
}

.ticket-rule {
  border: 0;
  border-top: 1px dashed #111;
  margin: 8px 0;
  height: 0;
}

.ticket-section {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  margin: 8px 0 4px;
}

.ticket-item {
  margin: 0 0 8px;
}

.ticket-item-name {
  font-weight: 700;
}

.ticket-item-meta {
  font-size: 11px;
  color: #444;
}

.ticket-item-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.invoice-qr-wrap {
  text-align: center;
  margin: 8px auto;
}

.invoice-qr svg,
.invoice-qr-img {
  width: 28mm;
  height: 28mm;
  background: #fff;
}

.invoice-total {
  font-size: 16px;
  text-align: right;
  margin: 8px 0;
}

.invoice-thanks {
  margin: 10px 0;
  text-align: center;
}

.invoice-thanks-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}

.invoice-thanks p {
  margin: 2px 0;
  font-size: 12px;
}

.invoice-catalog-url {
  margin: 6px 0 0;
  font-size: 10px;
  line-height: 1.35;
  word-break: break-all;
  color: #111;
}
}

@page {
  size: 80mm auto;
  margin: 2mm;
}

@media print {
  html,
  body {
    width: 76mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
  }

  body > *:not(#invoice-sheet) {
    display: none !important;
  }

  #invoice-sheet {
    display: block !important;
    position: static !important;
    inset: auto;
    width: 76mm !important;
    max-width: 76mm !important;
    margin: 0 !important;
    padding: 1mm !important;
    background: #fff !important;
    color: #000 !important;
    font-size: 11px;
    line-height: 1.25;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #invoice-sheet * {
    color: #000 !important;
    box-shadow: none !important;
  }

  #invoice-sheet table {
    min-width: 0;
    width: 100%;
    border-collapse: collapse;
  }

  #invoice-sheet th,
  #invoice-sheet td {
    border-bottom: 1px dashed #000;
    padding: 3px 0;
    text-align: left;
    font-size: 11px;
  }

  #invoice-sheet.plan-account-sheet {
    font-size: 10px;
    line-height: 1.2;
  }

  #invoice-sheet.plan-account-sheet .ticket-logo {
    width: 32mm;
    margin-bottom: 2px;
  }

  #invoice-sheet.plan-account-sheet .invoice-qr svg,
  #invoice-sheet.plan-account-sheet .invoice-qr-img {
    width: 20mm;
    height: 20mm;
  }

  #invoice-sheet.plan-account-sheet .invoice-thanks p {
    font-size: 10px;
  }

  #invoice-sheet .account-table {
    page-break-inside: avoid;
  }

  #invoice-sheet .account-debe {
    font-size: 13px;
  }
}

.catalog-page {
  display: block;
  padding: 20px;
}

.catalog-hero {
  text-align: center;
  margin-bottom: 20px;
}

.catalog-hero h1 {
  letter-spacing: 0.16em;
}

.catalog-list {
  display: grid;
  gap: 28px;
}

.catalog-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.catalog-nav button {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.catalog-nav button.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--card);
}

.catalog-section {
  scroll-margin-top: 16px;
}

.catalog-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.catalog-section-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.12em;
}

.catalog-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.catalog-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.catalog-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.catalog-card h2,
.catalog-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.catalog-kicker {
  color: var(--text);
  font-weight: 700;
}

.catalog-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.catalog-photos figure {
  margin: 0;
}

.catalog-photo-main {
  grid-column: 1 / -1;
}

.catalog-photos img {
  display: block;
  width: 100%;
  min-height: 220px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 10px;
  background: #eee;
}

.catalog-photo-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #f0f0f0;
  color: #333333;
  font-size: 13px;
}

.catalog-photos figcaption {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.catalog-updated {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
