/* =========================================================
   Ventix2 Theme — swap this file to re-skin the whole app.
   Only change class names if you also update the blades/JS.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  /* Defaults = Bosque; themes/*.css override these tokens */
  --vx-font-display: 'Outfit', sans-serif;
  --vx-font-body: 'Source Sans 3', sans-serif;

  --vx-bg: #eef2ef;
  --vx-bg-accent: #dce8e2;
  --vx-surface: #ffffff;
  --vx-surface-2: #f6f8f7;
  --vx-ink: #14201c;
  --vx-ink-soft: #5a6b64;
  --vx-line: rgba(20, 32, 28, 0.10);
  --vx-line-strong: rgba(20, 32, 28, 0.18);

  --vx-brand: #0c6b56;
  --vx-brand-2: #109276;
  --vx-brand-rgb: 12, 107, 86;
  --vx-brand-ink: #ffffff;
  --vx-accent: #e3a012;
  --vx-accent-rgb: 227, 160, 18;
  --vx-accent-ink: #2a1d00;
  --vx-danger: #c0392b;
  --vx-danger-soft: #fdecea;
  --vx-ok: #1f8a4c;
  --vx-ok-soft: #e8f7ee;
  --vx-warn: #b7791f;
  --vx-warn-soft: #fff6e5;

  --vx-shadow: 0 10px 30px rgba(16, 40, 32, 0.08);
  --vx-shadow-sm: 0 4px 14px rgba(16, 40, 32, 0.06);
  --vx-radius: 18px;
  --vx-radius-sm: 12px;
  --vx-radius-xs: 10px;
  --vx-btn-radius: 999px;
  --vx-pad: 16px;
  --vx-gap: 12px;
  --vx-nav-h: 64px;
  --vx-header-h: 64px;
  /* Updated at runtime from real topbar height; CSS fallback keeps titles clear */
  --vx-topbar-offset: calc(var(--vx-header-h) + env(safe-area-inset-top, 0px) + 16px);
  --vx-topbar-bg: rgba(238, 242, 239, 0.96);
  --vx-nav-bg: rgba(255, 255, 255, 0.92);
  --vx-bg-image:
    radial-gradient(1200px 500px at 10% -10%, var(--vx-bg-accent), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(var(--vx-accent-rgb), 0.14), transparent 55%),
    var(--vx-bg);
  --vx-max: 720px;
  --vx-tap: 44px;
  --vx-speed: 160ms;
  --vx-theme-color: #0c6b56;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--vx-font-body);
  color: var(--vx-ink);
  background: var(--vx-bg-image);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { padding-bottom: calc(var(--vx-nav-h) + env(safe-area-inset-bottom, 0px) + 12px); }

a { color: var(--vx-brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.vx-hide { display: none !important; }
.vx-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ----- Shell ----- */
.vx-app {
  width: 100%;
  max-width: var(--vx-max);
  margin: 0 auto;
  min-height: 100dvh;
  box-sizing: border-box;
}

.vx-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: var(--vx-max);
  margin: 0 auto;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--vx-header-h);
  padding: 12px var(--vx-pad);
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: var(--vx-topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--vx-line);
  box-sizing: border-box;
}

.vx-brand {
  font-family: var(--vx-font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--vx-ink);
  line-height: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.vx-brand-name {
  display: block;
  line-height: 1;
}

.vx-brand-ver {
  display: block;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  color: var(--vx-brand);
  opacity: 0.85;
  margin-top: 1px;
  margin-left: 1px;
}

.vx-brand span { color: inherit; }
.vx-brand .vx-brand-ver { color: var(--vx-brand); }

.vx-topbar-meta {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

.vx-topbar-meta strong,
.vx-topbar-meta small {
  display: block;
  max-width: 46vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vx-topbar-meta strong { font-size: 0.86rem; }
.vx-topbar-meta small { color: var(--vx-ink-soft); font-size: 0.75rem; }

.vx-topbar-logout,
.vx-topbar .vx-btn.vx-topbar-logout {
  flex: 0 0 auto;
  margin-left: 4px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 800;
  border: 1px solid var(--vx-line-strong);
  color: var(--vx-ink);
  background: var(--vx-surface);
  border-radius: var(--vx-btn-radius, 999px);
}
.vx-topbar-logout:hover,
.vx-topbar-logout:focus,
.vx-topbar .vx-btn.vx-topbar-logout:hover,
.vx-topbar .vx-btn.vx-topbar-logout:focus {
  color: #fff;
  background: var(--vx-danger);
  border-color: var(--vx-danger);
}

.vx-main {
  padding: 14px var(--vx-pad) 24px;
  padding-top: calc(20px + var(--vx-topbar-offset));
  max-width: 100%;
  box-sizing: border-box;
}

/* ----- Bottom nav ----- */
.vx-bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: var(--vx-max);
  margin: 0 auto;
  height: calc(var(--vx-nav-h) + env(safe-area-inset-bottom, 0px));
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  background: var(--vx-nav-bg);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--vx-line);
  z-index: 50;
  box-sizing: border-box;
}

.vx-nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--vx-ink-soft);
  font-size: 0.62rem;
  font-weight: 600;
  min-height: 48px;
  min-width: 0;
  max-width: 100%;
  padding: 4px 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--vx-speed), color var(--vx-speed), transform var(--vx-speed);
}

.vx-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.vx-nav-item.is-active {
  color: var(--vx-brand);
  background: rgba(var(--vx-brand-rgb), 0.10);
}
.vx-nav-item:active { transform: scale(0.96); }

/* ----- Typography ----- */
.vx-h1 {
  font-family: var(--vx-font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
  line-height: 1.15;
}

.vx-h2 {
  font-family: var(--vx-font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.vx-muted { color: var(--vx-ink-soft); font-size: 0.92rem; line-height: 1.35; }
.vx-page-header { margin-bottom: 14px; }
.vx-page-header .vx-muted { margin: 4px 0 0; }
.vx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vx-brand);
  margin-bottom: 6px;
}

/* ----- Panels ----- */
.vx-panel {
  background: var(--vx-surface);
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius);
  box-shadow: var(--vx-shadow-sm);
  padding: 16px;
  margin-bottom: var(--vx-gap);
}

.vx-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.vx-panel-head .vx-muted { margin: 4px 0 0; font-size: 0.84rem; }

.vx-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vx-ink-soft);
  line-height: 1.2;
}
.vx-section-label .vx-chip {
  letter-spacing: 0;
  text-transform: none;
}

.vx-pay {
  display: grid;
  gap: 14px;
}
.vx-pay-hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--vx-line);
}
.vx-pay-amount {
  font-family: var(--vx-font-display);
  font-size: clamp(1.55rem, 4vw, 1.9rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--vx-ink);
}
.vx-pay-methods {
  display: grid;
  gap: 0;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius-sm, 12px);
  overflow: hidden;
  background: var(--vx-surface);
}
.vx-pay-line {
  display: grid;
  grid-template-columns: minmax(4.5rem, 28%) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--vx-line);
  background: transparent;
}
.vx-pay-line:last-child {
  border-bottom: 0;
}
.vx-pay-line:focus-within {
  background: rgba(var(--vx-brand-rgb), 0.06);
}
.vx-pay-line-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--vx-ink);
}
.vx-pay-input {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.vx-pay-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--vx-line);
}
.vx-pay-summary > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px 0;
  min-width: 0;
}
.vx-pay-summary > div + div {
  border-left: 1px solid var(--vx-line);
  padding-left: 12px;
}
.vx-pay-summary dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vx-ink-soft);
}
.vx-pay-summary dd {
  margin: 0;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-family: var(--vx-font-display);
  color: var(--vx-ink);
}
.vx-pay-actions {
  margin-top: 2px;
}
.vx-catalog-item.is-added {
  border-color: var(--vx-brand);
  background: rgba(var(--vx-brand-rgb), 0.1);
}

.vx-text-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--vx-brand);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.vx-text-btn:hover,
.vx-text-btn:focus-visible {
  color: var(--vx-brand-2, var(--vx-brand));
}
.vx-card-title-btn {
  font-family: var(--vx-font-display);
  font-size: inherit;
}

.vx-sale-detail {
  display: grid;
  gap: 12px;
}
.vx-sale-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}
.vx-sale-detail-lines {
  display: grid;
  gap: 8px;
}
.vx-sale-detail-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--vx-line);
}
.vx-sale-detail-line:last-child { border-bottom: 0; }
.vx-sale-detail-line-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.vx-sale-detail-line-main strong {
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.vx-sale-detail-line-main span {
  font-size: 0.8rem;
  color: var(--vx-ink-soft);
}
.vx-sale-detail-pays {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.vx-sale-detail-totals {
  border-top: 1px solid var(--vx-line);
  padding-top: 4px;
}
.vx-sale-print-lead {
  margin: 0 0 6px;
  font-size: 1rem;
}
.vx-sale-print-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.vx-sale-print-actions .vx-btn {
  flex: 1 1 auto;
  width: 100%;
}
@media (max-width: 520px) {
  .vx-sale-detail-meta,
  .vx-sale-detail-pays {
    grid-template-columns: 1fr;
  }
}

.vx-quick-add {
  margin-top: 12px;
  border-top: 1px solid var(--vx-line);
  padding-top: 10px;
}
.vx-quick-add > summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--vx-brand);
  user-select: none;
}
.vx-quick-add > summary::-webkit-details-marker { display: none; }
.vx-quick-add > summary::before {
  content: '+ ';
  font-weight: 800;
}
.vx-quick-add[open] > summary::before { content: '− '; }
.vx-quick-add-form {
  margin-top: 12px;
}
.vx-h2 .vx-chip {
  margin-left: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.vx-stack { display: flex; flex-direction: column; gap: var(--vx-gap); }
.vx-row { display: flex; gap: 10px; align-items: center; }
.vx-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.vx-grid-3 {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr 0.95fr;
  gap: 8px;
  align-items: end;
}
.vx-grid-3 > .vx-field {
  margin-bottom: 0;
  min-width: 0;
}
.vx-grid-3 .vx-label {
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vx-grid-3 .vx-input,
.vx-grid-3 .vx-select {
  padding-left: 8px;
  padding-right: 8px;
  font-size: 0.9rem;
  min-height: 44px;
}

/* ----- Forms ----- */
.vx-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.vx-field:last-child { margin-bottom: 0; }

.vx-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--vx-ink-soft);
  letter-spacing: 0.02em;
}

.vx-input,
.vx-select,
.vx-textarea {
  width: 100%;
  min-height: var(--vx-tap);
  border: 1px solid var(--vx-line-strong);
  background: var(--vx-surface-2);
  border-radius: var(--vx-radius-xs);
  padding: 10px 12px;
  outline: none;
  transition: border-color var(--vx-speed), box-shadow var(--vx-speed), background var(--vx-speed);
}

.vx-textarea { min-height: 96px; resize: vertical; }

.vx-input:focus,
.vx-select:focus,
.vx-textarea:focus {
  border-color: var(--vx-brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--vx-brand-rgb), 0.14);
}

.vx-input:disabled,
.vx-select:disabled { opacity: 0.6; }

.vx-hint { font-size: 0.75rem; color: var(--vx-ink-soft); }
.vx-error-text { font-size: 0.78rem; color: var(--vx-danger); margin-top: 4px; }

/* ----- Buttons ----- */
.vx-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  min-height: var(--vx-tap);
  padding: 0 16px;
  border-radius: var(--vx-btn-radius);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--vx-speed), opacity var(--vx-speed), background var(--vx-speed);
  user-select: none;
}

.vx-btn:active { transform: scale(0.98); }
.vx-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.vx-btn-primary { background: var(--vx-brand); color: var(--vx-brand-ink); }
.vx-btn-primary:hover { background: var(--vx-brand-2); }

.vx-btn-accent { background: var(--vx-accent); color: var(--vx-accent-ink); }
.vx-btn-ghost {
  background: transparent;
  color: var(--vx-ink);
  border: 1px solid var(--vx-line-strong);
}
.vx-btn-danger { background: var(--vx-danger); color: #fff; }
.vx-btn-danger-soft {
  background: var(--vx-danger-soft);
  color: var(--vx-danger);
  border: 1px solid transparent;
}
.vx-btn-soft {
  background: rgba(var(--vx-brand-rgb), 0.10);
  color: var(--vx-brand);
}
.vx-btn-block { width: 100%; }
.vx-btn-sm { min-height: 34px; padding: 0 12px; font-size: 0.82rem; }
.vx-btn-icon {
  width: var(--vx-tap);
  padding: 0;
  border-radius: var(--vx-btn-radius);
}

.vx-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.vx-actions .vx-btn { flex: 1 1 auto; }

/* ----- Chips / badges ----- */
.vx-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 24px;
  min-width: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--vx-surface-2);
  color: var(--vx-ink-soft);
  border: 1px solid var(--vx-line);
  font-variant-numeric: tabular-nums;
}

.vx-chip-ok { background: var(--vx-ok-soft); color: var(--vx-ok); border-color: transparent; }
.vx-chip-warn { background: var(--vx-warn-soft); color: var(--vx-warn); border-color: transparent; }
.vx-chip-danger { background: var(--vx-danger-soft); color: var(--vx-danger); border-color: transparent; }
.vx-chip-brand { background: rgba(var(--vx-brand-rgb), 0.12); color: var(--vx-brand); border-color: transparent; }

/* ----- Suggest / autocomplete ----- */
.vx-input-trail {
  position: relative;
  display: block;
}
.vx-input-trail .vx-input {
  width: 100%;
  padding-right: 46px;
}
.vx-input-trail-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--vx-line-strong);
  border-radius: 0 var(--vx-radius-xs) var(--vx-radius-xs) 0;
  background: transparent;
  color: var(--vx-ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.vx-input-trail-btn:hover,
.vx-input-trail-btn:focus {
  color: var(--vx-brand);
  background: rgba(var(--vx-brand-rgb), 0.06);
  outline: none;
}
.vx-input-trail:focus-within .vx-input {
  border-color: var(--vx-brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--vx-brand-rgb), 0.14);
}
.vx-input-trail:focus-within .vx-input-trail-btn {
  border-left-color: rgba(var(--vx-brand-rgb), 0.28);
}

.vx-suggest-wrap { position: relative; }

.vx-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  z-index: 30;
  background: var(--vx-surface);
  border: 1px solid var(--vx-line-strong);
  border-radius: var(--vx-radius-sm);
  box-shadow: var(--vx-shadow);
  max-height: 260px;
  overflow: auto;
}

.vx-suggest-item {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--vx-line);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vx-suggest-item:last-child { border-bottom: 0; }
.vx-suggest-item strong { font-size: 0.92rem; color: var(--vx-ink); }
.vx-suggest-item span { font-size: 0.78rem; color: var(--vx-ink-soft); }
.vx-suggest-item:hover,
.vx-suggest-item:focus { background: rgba(var(--vx-brand-rgb), 0.08); }

/* ----- Cart ----- */
.vx-cart-panel {
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(var(--vx-brand-rgb), 0.10), transparent 45%),
    var(--vx-surface);
}

.vx-cart-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--vx-line);
}

.vx-cart-hero-total {
  text-align: right;
}
.vx-cart-hero-total span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vx-ink-soft);
}
.vx-cart-hero-total strong {
  font-family: var(--vx-font-display);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  color: var(--vx-brand);
  font-variant-numeric: tabular-nums;
}

.vx-cart-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vx-cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius-sm);
  background: rgba(255,255,255,0.72);
  animation: vx-fade-up 180ms ease both;
}

.vx-cart-line.is-editing {
  flex-direction: column;
  align-items: stretch;
  border-color: rgba(var(--vx-brand-rgb), 0.35);
  box-shadow: 0 0 0 3px rgba(var(--vx-brand-rgb), 0.10);
}

.vx-cart-edit-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.vx-cart-line-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vx-cart-line-main strong {
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.vx-cart-line-main span {
  font-size: 0.78rem;
  color: var(--vx-ink-soft);
}

.vx-cart-line-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.vx-cart-line-btns {
  display: flex;
  gap: 6px;
}

.vx-cart-line-side .vx-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.vx-cart-checkout .vx-btn-accent {
  flex: 1.4;
  min-height: 50px;
  font-size: 1rem;
}

/* Modal */
body.vx-modal-open { overflow: hidden; }
.vx-modal-backdrop,
.vx-modal {
  display: none;
}
.vx-modal-backdrop.is-open,
.vx-modal.is-open {
  display: grid;
}
.vx-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 16, 0.5);
  z-index: 90;
}
.vx-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  place-items: end center;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
.vx-modal.is-open { pointer-events: auto; }
.vx-modal-card {
  width: min(100%, var(--vx-max));
  max-height: min(86dvh, 720px);
  overflow: auto;
  background: var(--vx-surface);
  border-radius: 24px;
  box-shadow: var(--vx-shadow);
  padding: 14px;
  animation: vx-fade-up 180ms ease both;
  pointer-events: auto;
}
.vx-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  background: var(--vx-surface);
  z-index: 1;
  padding-bottom: 4px;
}
.vx-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.vx-catalog-item {
  width: 100%;
  appearance: none;
  border: 1px solid var(--vx-line);
  background: var(--vx-surface-2);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}
.vx-catalog-item:active { background: rgba(var(--vx-brand-rgb), 0.08); }
.vx-catalog-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.vx-catalog-item-main strong { font-size: 0.95rem; }
.vx-catalog-item-main span { font-size: 0.8rem; color: var(--vx-ink-soft); }
.vx-catalog-item-prices {
  text-align: right;
  flex-shrink: 0;
}
.vx-catalog-item-prices em {
  font-style: normal;
  font-weight: 800;
  font-family: var(--vx-font-display);
  color: var(--vx-brand);
}
.vx-catalog-item-prices small {
  display: block;
  color: var(--vx-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
  font-weight: 700;
}

/* ----- Date filters ----- */
.vx-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  margin: 0 0 14px;
  padding: 10px;
  border-radius: var(--vx-radius-sm);
  background: var(--vx-surface-2);
  border: 1px solid var(--vx-line);
  max-width: 100%;
  box-sizing: border-box;
}

.vx-filters .vx-field { margin: 0; min-width: 0; }
.vx-filters .vx-label { margin-bottom: 0; }
.vx-filters .vx-input,
.vx-filters .vx-select {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.vx-filters .vx-btn {
  width: 100%;
  min-width: 0;
  min-height: var(--vx-tap);
}
.vx-filters-action {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  min-width: 0;
}
.vx-filters-action .vx-label { display: none; }

@media (min-width: 560px) {
  .vx-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }
  .vx-filters-action {
    grid-column: auto;
  }
  .vx-filters .vx-btn {
    width: auto;
    min-width: 96px;
  }
}

/* ----- Summary table (mobile cards + desktop table) ----- */
.vx-summary .vx-panel-head {
  padding-bottom: 2px;
}

.vx-table-wrap {
  max-width: 100%;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius-sm);
  background: #fff;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.vx-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  display: none;
}

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

.vx-table thead th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vx-ink-soft);
  font-weight: 700;
  background: var(--vx-surface-2);
  border-bottom: 1px solid var(--vx-line);
}

.vx-table tbody tr:last-child td { border-bottom: 0; }
.vx-table tbody tr:hover td { background: rgba(var(--vx-brand-rgb), 0.035); }

.vx-table .vx-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-family: var(--vx-font-body);
  letter-spacing: 0;
  color: var(--vx-ink);
}

.vx-th-actions,
.vx-td-actions {
  width: 1%;
  white-space: nowrap;
  text-align: left;
  vertical-align: middle;
}

.vx-row-menu {
  position: relative;
  display: inline-flex;
}
.vx-row-menu-toggle {
  appearance: none;
  border: 1px solid var(--vx-line);
  background: var(--vx-surface);
  color: var(--vx-ink);
  border-radius: var(--vx-btn-radius, 10px);
  min-height: 34px;
  padding: 0 0.65rem 0 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.vx-row-menu-toggle:hover,
.vx-row-menu.is-open .vx-row-menu-toggle {
  border-color: var(--vx-line-strong);
  background: var(--vx-surface-2);
}
.vx-row-menu-caret {
  font-size: 0.75rem;
  opacity: 0.75;
  line-height: 1;
}
.vx-row-menu-panel {
  position: fixed;
  z-index: 120;
  min-width: 9.5rem;
  padding: 0.3rem;
  border: 1px solid var(--vx-line-strong);
  border-radius: var(--vx-radius-sm);
  background: var(--vx-surface);
  box-shadow: var(--vx-shadow);
  display: grid;
  gap: 0.15rem;
}
.vx-row-menu-panel[hidden] { display: none !important; }
.vx-row-menu-item {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: calc(var(--vx-radius-sm) - 2px);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--vx-ink);
  cursor: pointer;
}
.vx-row-menu-item:hover,
.vx-row-menu-item:focus-visible {
  background: rgba(var(--vx-brand-rgb), 0.1);
  outline: none;
}
.vx-row-menu-item.is-danger {
  color: var(--vx-danger);
}
.vx-row-menu-item.is-danger:hover,
.vx-row-menu-item.is-danger:focus-visible {
  background: var(--vx-danger-soft);
}

[data-page="products"] .vx-table {
  min-width: 980px;
}

.vx-cards { display: flex; flex-direction: column; gap: 8px; padding: 8px; }

.vx-card-row {
  border: 1px solid var(--vx-line);
  background: var(--vx-surface-2);
  border-radius: var(--vx-radius-sm);
  padding: 12px;
  animation: vx-fade-up 220ms ease both;
}

.vx-card-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.vx-card-title {
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.25;
}

.vx-card-sub { color: var(--vx-ink-soft); font-size: 0.82rem; margin-top: 2px; }

.vx-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

.vx-kv {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--vx-line);
}
.vx-kv span { font-size: 0.68rem; color: var(--vx-ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.vx-kv strong { font-size: 0.92rem; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

.vx-card-actions {
  display: inline-flex;
  margin-top: 10px;
}

.vx-table-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ----- Segmented control ----- */
.vx-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 12px;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-btn-radius, 10px);
  background: var(--vx-surface-2);
}
.vx-seg-item {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}
.vx-seg-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.vx-seg-item span {
  display: block;
  text-align: center;
  padding: 9px 10px;
  border-radius: calc(var(--vx-btn-radius, 10px) - 2px);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--vx-ink-soft);
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
.vx-seg-item.is-income input:checked + span {
  background: var(--vx-ok, #047857);
  color: #fff;
  box-shadow: 0 6px 14px rgba(4, 120, 87, 0.22);
}
.vx-seg-item.is-outgo input:checked + span {
  background: var(--vx-danger, #be123c);
  color: #fff;
  box-shadow: 0 6px 14px rgba(190, 18, 60, 0.22);
}

.vx-seg-buttons {
  gap: 4px;
}
.vx-seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--vx-ink-soft);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 9px 10px;
  border-radius: calc(var(--vx-btn-radius, 10px) - 2px);
  cursor: pointer;
}
.vx-seg-btn.is-active {
  background: var(--vx-brand);
  color: #fff;
  box-shadow: 0 6px 14px rgba(var(--vx-brand-rgb), 0.22);
}

/* ----- Restaurant / mesas ----- */
.vx-rst-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.vx-rst-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 720px) {
  .vx-rst-board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.vx-rst-table {
  appearance: none;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius-sm, 12px);
  background: rgba(255,255,255,0.78);
  padding: 14px 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 88px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  position: relative;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.vx-rst-check {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--vx-brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
}
.vx-rst-table.is-selected .vx-rst-check {
  display: inline-flex;
}
.vx-rst-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(var(--vx-brand-rgb), 0.12);
  color: var(--vx-brand);
}
.vx-rst-table.is-selected .vx-rst-badge {
  display: none;
}
.vx-rst-table strong {
  font-size: 1rem;
}
.vx-rst-table span {
  font-size: 0.78rem;
  color: var(--vx-ink-soft);
}
.vx-rst-table.is-occupied {
  border-color: rgba(var(--vx-brand-rgb), 0.35);
  box-shadow: none;
  background: rgba(var(--vx-brand-rgb), 0.06);
}
.vx-rst-table.is-selected {
  border-color: var(--vx-brand);
  box-shadow: 0 0 0 3px rgba(var(--vx-brand-rgb), 0.2);
  background: rgba(var(--vx-brand-rgb), 0.14);
}
.vx-rst-table:active { transform: scale(0.98); }
.vx-rst-openbar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius-sm, 12px);
  background: rgba(var(--vx-brand-rgb), 0.08);
}
.vx-rst-openbar span {
  font-weight: 700;
  font-size: 0.9rem;
}
.vx-rst-add {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius-sm);
  background:
    linear-gradient(180deg, rgba(var(--vx-brand-rgb), 0.05), transparent 70%),
    var(--vx-surface-2);
}
.vx-rst-add .vx-field { margin: 0; }
.vx-rst-add .vx-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--vx-ink-soft);
}
.vx-rst-ticket-hero {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius-sm);
  background: var(--vx-surface);
  box-shadow: var(--vx-shadow-sm);
}
.vx-rst-ticket-total {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.vx-rst-ticket-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vx-ink-soft);
}
.vx-rst-ticket-total strong {
  font-family: var(--vx-font-display);
  font-size: clamp(1.55rem, 5vw, 1.85rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--vx-ink);
}
.vx-rst-ticket-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.vx-rst-ticket-stat {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.55rem 0.6rem;
  border-radius: calc(var(--vx-radius-sm) - 2px);
  background: var(--vx-surface-2);
  border: 1px solid transparent;
}
.vx-rst-ticket-stat span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vx-ink-soft);
}
.vx-rst-ticket-stat strong {
  font-size: 0.92rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--vx-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vx-rst-ticket-stat.is-pending {
  background: rgba(var(--vx-brand-rgb), 0.08);
  border-color: rgba(var(--vx-brand-rgb), 0.14);
}
.vx-rst-ticket-stat.is-pending strong {
  color: var(--vx-brand);
  font-weight: 700;
}
@media (max-width: 420px) {
  .vx-rst-ticket-stats {
    grid-template-columns: 1fr 1fr;
  }
  .vx-rst-ticket-stat.is-pending {
    grid-column: 1 / -1;
  }
}
.vx-rst-actions {
  margin-top: 12px;
  flex-wrap: wrap;
}
.vx-rst-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.vx-rst-ticket-head {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--vx-line);
}
.vx-rst-ticket-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.vx-rst-ticket-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--vx-line);
  background: var(--vx-surface-2);
  color: var(--vx-ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.vx-rst-ticket-title {
  margin: 0.2rem 0 0;
  font-family: var(--vx-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--vx-ink);
  line-height: 1.15;
}
.vx-rst-ticket-sub {
  margin: 0.25rem 0 0;
  color: var(--vx-ink-soft);
  font-size: 0.88rem;
}
.vx-rst-client .vx-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--vx-ink-soft);
}
.vx-rst-client .vx-input[readonly] {
  cursor: pointer;
  background: var(--vx-surface);
}
.vx-cart-line.is-sent {
  opacity: 0.88;
}
.vx-kit-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.vx-kit-card {
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius-sm);
  background: var(--vx-surface);
  padding: 12px;
}
.vx-kit-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.vx-kit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--vx-line);
}
.vx-kit-item-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.vx-rst-day-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.vx-rst-day-stats > div {
  background: var(--vx-surface-2, var(--vx-surface));
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius-xs);
  padding: 10px 12px;
}
.vx-rst-day-stats small {
  display: block;
  color: var(--vx-ink-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vx-rst-day-stats strong {
  font-size: 1.15rem;
}

/* Restaurant menu catalog (photo grid) */
#rst-catalog .vx-modal-card {
  max-height: min(92dvh, 820px);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
#rst-catalog .vx-modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.vx-rst-catalog {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  flex: 1;
}
.vx-rst-catalog-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 0.55rem;
  padding-bottom: 0.35rem;
  background: linear-gradient(180deg, var(--vx-surface) 70%, transparent);
}
.vx-rst-catalog-search {
  font-size: 16px;
  min-height: 46px;
  border-radius: 999px;
  padding-inline: 1rem;
}
.vx-rst-catalog-cats {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding: 0.1rem 0 0.15rem;
}
.vx-rst-catalog-cats::-webkit-scrollbar { display: none; }
.vx-rst-cat {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--vx-line);
  background: var(--vx-surface-2);
  color: var(--vx-ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 36px;
  cursor: pointer;
  white-space: nowrap;
}
.vx-rst-cat.is-active {
  background: var(--vx-ink);
  border-color: var(--vx-ink);
  color: #fff;
}
.vx-rst-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding-bottom: 0.35rem;
}
@media (min-width: 720px) {
  .vx-rst-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.vx-rst-catalog-card {
  appearance: none;
  border: 1px solid var(--vx-line);
  background: var(--vx-surface-2);
  border-radius: 1rem;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  min-height: 0;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.vx-rst-catalog-card:active {
  transform: scale(0.98);
}
.vx-rst-catalog-card.is-added {
  border-color: var(--vx-brand);
  background: rgba(var(--vx-brand-rgb), 0.1);
}
.vx-rst-catalog-media {
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 30% 20%, rgba(var(--vx-brand-rgb), 0.18), transparent 55%),
    linear-gradient(160deg, rgba(0,0,0,0.04), rgba(0,0,0,0.02));
  overflow: hidden;
}
.vx-rst-catalog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vx-rst-catalog-media.is-empty::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, transparent 46%, rgba(var(--vx-brand-rgb), 0.2) 46% 54%, transparent 54%),
    radial-gradient(circle at 50% 58%, rgba(var(--vx-brand-rgb), 0.22) 0 18%, transparent 19%);
  opacity: 0.9;
}
.vx-rst-catalog-body {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.6rem 0.65rem;
  min-width: 0;
}
.vx-rst-catalog-body strong {
  font-size: 0.86rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vx-rst-catalog-body span {
  font-size: 0.68rem;
  color: var(--vx-ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vx-rst-catalog-body em {
  font-style: normal;
  font-weight: 800;
  font-family: var(--vx-font-display);
  color: var(--vx-brand);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
#rst-catalog-empty span {
  display: block;
  margin-top: 0.25rem;
  color: var(--vx-ink-soft);
  font-size: 0.85rem;
}

.vx-row-click {
  cursor: pointer;
}
.vx-row-click:hover td {
  background: rgba(var(--vx-brand-rgb, 12, 107, 86), 0.06);
}
.vx-sale-abono span {
  font-size: 0.82rem;
  line-height: 1.35;
}

/* ----- Cash flows page (compact) ----- */
[data-page="cash_flows"] .vx-page-header {
  margin-bottom: 10px;
}
[data-page="cash_flows"] .vx-page-header .vx-muted {
  font-size: 0.84rem;
}
[data-page="cash_flows"] .vx-panel {
  padding: 12px;
}
[data-page="cash_flows"] .vx-panel-head {
  margin-bottom: 10px;
}
[data-page="cash_flows"] .vx-cf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
[data-page="cash_flows"] .vx-cf-span-2 {
  grid-column: 1 / -1;
  min-width: 0;
}
[data-page="cash_flows"] .vx-cf-grid .vx-field {
  margin: 0;
  gap: 4px;
}
[data-page="cash_flows"] .vx-cf-grid .vx-label {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
[data-page="cash_flows"] .vx-cf-grid .vx-input,
[data-page="cash_flows"] .vx-cf-grid .vx-select {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.92rem;
}
[data-page="cash_flows"] .vx-cf-actions {
  margin-top: 12px;
}
[data-page="cash_flows"] .vx-cards {
  gap: 6px;
  padding: 6px;
}
[data-page="cash_flows"] .vx-card-row {
  padding: 10px 12px;
}
[data-page="cash_flows"] .vx-card-row-top {
  margin-bottom: 6px;
  align-items: center;
}
[data-page="cash_flows"] .vx-card-title {
  font-family: var(--vx-font-display);
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
[data-page="cash_flows"] .vx-card-title.is-income-amt { color: var(--vx-ok, #047857); }
[data-page="cash_flows"] .vx-card-title.is-outgo-amt { color: var(--vx-danger, #be123c); }
[data-page="cash_flows"] .vx-card-sub {
  font-size: 0.78rem;
}
[data-page="cash_flows"] .vx-card-grid {
  gap: 6px 8px;
}
[data-page="cash_flows"] .vx-kv {
  padding: 6px 8px;
  border-radius: 8px;
}
[data-page="cash_flows"] .vx-kv strong {
  font-size: 0.86rem;
}
[data-page="cash_flows"] .vx-card-actions {
  margin-top: 8px;
}
[data-page="cash_flows"] .vx-table th,
[data-page="cash_flows"] .vx-table td {
  padding: 9px 10px;
  font-size: 0.86rem;
}
@media (min-width: 720px) {
  [data-page="cash_flows"] .vx-cf-grid {
    grid-template-columns: 1.3fr 1fr 1fr 0.9fr 0.9fr;
  }
  [data-page="cash_flows"] .vx-cf-span-2 {
    grid-column: span 1;
  }
  [data-page="cash_flows"] .vx-cf-grid .vx-cf-span-2:last-child {
    grid-column: 1 / -1;
  }
}

.vx-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--vx-ink-soft);
}

.vx-empty strong {
  display: block;
  color: var(--vx-ink);
  font-family: var(--vx-font-display);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

/* ----- Toast ----- */
.vx-toast-host {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--vx-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  width: min(calc(100% - 24px), var(--vx-max));
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.vx-toast {
  pointer-events: auto;
  background: var(--vx-ink);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--vx-shadow);
  font-size: 0.92rem;
  font-weight: 600;
  animation: vx-fade-up 180ms ease both;
}

.vx-toast.is-ok { background: var(--vx-ok); }
.vx-toast.is-danger { background: var(--vx-danger); }
.vx-toast.is-warn { background: var(--vx-warn); color: #fff; }

/* ----- Loading ----- */
.vx-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--vx-ink-soft);
  font-size: 0.88rem;
}

.vx-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(var(--vx-brand-rgb), 0.2);
  border-top-color: var(--vx-brand);
  border-radius: 50%;
  animation: vx-spin 0.7s linear infinite;
}

.vx-skeleton {
  background: linear-gradient(90deg, #e8ecea 25%, #f5f7f6 50%, #e8ecea 75%);
  background-size: 200% 100%;
  animation: vx-shimmer 1.1s infinite;
  border-radius: 10px;
  height: 64px;
}

/* ----- Auth ----- */
.vx-auth {
  min-height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 24px var(--vx-pad);
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
}

.vx-auth-card {
  width: min(100%, 420px);
  margin: auto;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--vx-line);
  border-radius: 28px;
  box-shadow: var(--vx-shadow);
  padding: 28px 22px 22px;
  animation: vx-fade-up 320ms ease both;
}

.vx-auth-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  place-content: center;
  background: #111111;
  color: #fff;
  font-family: var(--vx-font-display);
  font-weight: 800;
  margin-bottom: 16px;
  box-shadow: 0 10px 22px rgba(17, 17, 17, 0.22);
  line-height: 1;
}

.vx-auth-mark-letter {
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.vx-auth-mark-ver {
  display: block;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.75;
  margin-top: 2px;
  text-align: center;
}

.vx-auth-card .vx-h1 { font-size: 1.8rem; }
.vx-auth-card .vx-muted { margin-bottom: 18px; }

.vx-email-combo {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-btn-radius, 12px);
  background: var(--vx-surface);
  overflow: hidden;
}
.vx-email-combo .vx-input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  flex: 1 1 auto;
  min-width: 0;
}
.vx-email-combo .vx-input:focus {
  outline: none;
  box-shadow: none;
}
.vx-email-domain {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: var(--vx-surface-2);
  color: var(--vx-ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
  border-left: 1px solid var(--vx-line);
  user-select: none;
  white-space: nowrap;
}
.vx-email-combo:focus-within {
  border-color: var(--vx-brand);
  box-shadow: 0 0 0 3px rgba(var(--vx-brand-rgb), 0.12);
}

/* ----- Menu sheet ----- */
.vx-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 16, 0.45);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--vx-speed);
}

.vx-sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }

.vx-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 110%);
  width: min(100%, var(--vx-max));
  max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 12px));
  display: flex;
  flex-direction: column;
  background: var(--vx-surface);
  border-radius: 24px 24px 0 0;
  padding: 10px 16px 0;
  z-index: 70;
  box-shadow: 0 -20px 50px rgba(0,0,0,.18);
  transition: transform 220ms ease;
  overflow: hidden;
  overscroll-behavior: contain;
}

.vx-sheet.is-open { transform: translate(-50%, 0); }
.vx-sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: var(--vx-line-strong);
  margin: 4px auto 10px;
  flex: 0 0 auto;
}

.vx-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex: 0 0 auto;
}

.vx-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  overscroll-behavior: contain;
}

.vx-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.vx-menu-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  border-radius: 16px;
  background: var(--vx-surface-2);
  border: 1px solid var(--vx-line);
  color: var(--vx-ink);
  font-weight: 700;
  min-height: 72px;
}

.vx-menu-link small { color: var(--vx-ink-soft); font-weight: 500; font-size: 0.75rem; }
.vx-menu-link:active { background: rgba(var(--vx-brand-rgb), 0.08); }

.vx-theme-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--vx-line);
}
.vx-theme-block .vx-muted { margin: 4px 0 10px; }
.vx-theme-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (min-width: 520px) {
  .vx-theme-options { grid-template-columns: 1fr 1fr 1fr; }
}
.vx-theme-card {
  appearance: none;
  border: 1px solid var(--vx-line);
  background: var(--vx-surface);
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 84px;
  color: var(--vx-ink);
}
.vx-theme-card strong {
  font-size: 0.92rem;
  font-weight: 800;
}
.vx-theme-card small {
  color: var(--vx-ink-soft);
  font-size: 0.72rem;
  font-weight: 500;
}
.vx-theme-swatch {
  display: flex;
  gap: 4px;
  height: 10px;
}
.vx-theme-swatch i {
  flex: 1;
  border-radius: 999px;
  background: var(--sw, var(--vx-brand));
}
.vx-theme-card.is-active {
  border-color: var(--vx-brand);
  box-shadow: 0 0 0 3px rgba(var(--vx-brand-rgb), 0.14);
}

/* ----- Dashboard bits ----- */
.vx-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: var(--vx-gap);
}

.vx-stat-grid.is-dashboard {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vx-stat {
  background: var(--vx-surface);
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius);
  padding: 14px;
  box-shadow: var(--vx-shadow-sm);
  min-width: 0;
}

.vx-stat.is-wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(var(--vx-brand-rgb), 0.12), transparent 55%),
    var(--vx-surface);
}

.vx-stat span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vx-ink-soft);
  margin-bottom: 6px;
}

.vx-stat strong {
  font-family: var(--vx-font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.vx-stat.is-wide strong {
  font-size: 1.75rem;
  color: var(--vx-brand);
}

.vx-stat em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--vx-ink-soft);
}

.vx-stat.is-neg strong { color: var(--vx-danger); }
.vx-stat.is-pos strong { color: var(--vx-ok); }

.vx-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.vx-quick a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 16px;
  background: var(--vx-brand);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(var(--vx-brand-rgb), 0.18);
}

.vx-quick a.vx-quick-soft {
  background: rgba(var(--vx-brand-rgb), 0.10);
  color: var(--vx-brand);
  box-shadow: none;
}

/* ----- Animations ----- */
@keyframes vx-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes vx-spin { to { transform: rotate(360deg); } }
@keyframes vx-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (min-width: 720px) {
  .vx-cards { display: none; }
  .vx-table { display: table; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
