/* 🌸 RESET — box-sizing only; margins come from Bootstrap + component rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Heritage Royal (Silver Edition) — tokens mapped for existing components */
:root {
  --hr-gold: #d4af37;
  --hr-gold-hover: #e8c656;
  --hr-gold-pressed: #a88628;
  --hr-steel: #989ea4;
  --hr-obsidian: #121212;
  --hr-navy: #1a2238;
  --hr-surface: #1e1e1e;
  --hr-surface-2: #252525;

  --lavender-main: #d4af37;
  --lavender-hover: #e8c656;
  --lavender-action: #c9a227;
  --lavender-light: rgba(212, 175, 55, 0.14);
  --lavender-tint: rgba(152, 158, 164, 0.12);
  --success-emerald: #34d399;
  --text-dark: #ececec;
  --text-muted: #989ea4;
  --touch-min: 48px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 4px 28px rgba(0, 0, 0, 0.4);
  --surface: #1e1e1e;
  --surface-page: #121212;
  --surface-elevated: #252525;
  --border-subtle: rgba(152, 158, 164, 0.28);
  --border-accent: rgba(212, 175, 55, 0.38);
  --focus-ring: 0 0 0 3px rgba(212, 175, 55, 0.28);
  --catalog-edge: rgba(200, 210, 220, 0.35);
  --catalog-row-stripe: rgba(212, 175, 55, 0.05);
  --catalog-row-hover: rgba(212, 175, 55, 0.1);
  --glass-overlay: rgba(10, 12, 18, 0.62);
  --glass-panel: rgba(30, 30, 30, 0.72);
  --glass-blur: 22px;
  --glass-border: rgba(255, 255, 255, 0.1);
  --gradient-border: linear-gradient(
    135deg,
    rgba(220, 228, 235, 0.42) 0%,
    rgba(152, 158, 164, 0.32) 45%,
    rgba(212, 175, 55, 0.28) 100%
  );
  --content-max: 1200px;
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
  height: -webkit-fill-available;
}

/* 🌸 GLOBAL */
body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background:
    radial-gradient(ellipse 110% 70% at 50% -15%, rgba(26, 34, 56, 0.95), transparent 52%),
    radial-gradient(ellipse 90% 55% at 100% 100%, rgba(212, 175, 55, 0.07), transparent 48%),
    radial-gradient(ellipse 70% 40% at 0% 80%, rgba(152, 158, 164, 0.06), transparent 45%),
    linear-gradient(180deg, #121212 0%, #1a2238 42%, #121212 100%);
  background-color: #121212;
  color: var(--text-dark);
  min-height: 100%;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  -webkit-tap-highlight-color: rgba(212, 175, 55, 0.15);
}

/* Installed PWA: slightly reduce browser-style overscroll */
html.pwa-standalone body {
  overscroll-behavior-y: none;
}

@media (display-mode: standalone), (display-mode: minimal-ui) {
  body {
    overscroll-behavior-y: none;
  }
}

/* PWA: optional subtle separation under sticky chrome (iOS / Android) */
html.pwa-standalone .action-bar {
  box-shadow: 0 4px 12px rgba(45, 42, 74, 0.04);
}

/* Keyboard / assistive tech: clear focus affordance */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--lavender-main);
  outline-offset: 2px;
}

.btn:focus-visible,
.btn-secondary:focus-visible {
  outline-offset: 3px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.product-col-filter:focus-visible {
  border-color: var(--lavender-main);
  box-shadow: var(--focus-ring);
}

/* 🌸 HEADER */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px max(16px, var(--safe-left)) 14px max(16px, var(--safe-right));
  padding-top: max(14px, var(--safe-top));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  /* iOS: avoid subpixel gap under status / dynamic island */
  isolation: isolate;
}

.header-branding {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  max-width: 100%;
}

.logo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  display: block;
}

/* Prominent app logo (Mohan full.png) */
.logo--app {
  height: 48px;
  width: auto;
  max-width: min(160px, 42vw);
  max-height: 56px;
  object-fit: contain;
}

.brand {
  min-width: 0;
  text-align: left;
}

.brand .title {
  font-size: clamp(17px, 4.2vw, 20px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.brand .subtitle {
  font-size: clamp(11px, 3vw, 13px);
  color: var(--text-muted);
  margin-top: 2px;
}

/* 🌸 ACTION BAR */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: var(--content-max);
  box-sizing: border-box;
  padding: 14px max(16px, var(--safe-left)) 14px max(16px, var(--safe-right));
  background: rgba(255, 255, 255, 0.94);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  justify-content: flex-start;
  margin-left: auto;
  margin-right: auto;
}

.action-bar .btn {
  min-height: var(--touch-min);
  touch-action: manipulation;
  flex: 1 1 calc(50% - 5px);
  min-width: 0;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
}

.action-bar .btn:active {
  box-shadow: none;
}

/* 🌸 BUTTONS (ALL UNIFORM) */
.btn {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--lavender-main);
  color: #121212;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover:not(:disabled) {
  background: var(--lavender-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.28);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Primary workflow — New Bill */
.btn--cta {
  background: linear-gradient(
    135deg,
    #e0bc4a 0%,
    var(--lavender-action) 45%,
    var(--hr-gold-pressed) 100%
  );
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.32);
}

.btn--cta:hover:not(:disabled) {
  background: linear-gradient(135deg, #f0d060 0%, var(--lavender-hover) 50%, #c9a227 100%);
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.38);
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover,
  .btn:active,
  .sales-wa:hover {
    transform: none;
  }

  .btn,
  .btn-secondary,
  .sales-wa {
    transition: none;
  }
}

/* 🌸 REMOVE OLD/CONFLICTING STYLES (do not reset .install-btn — it breaks PWA install UI) */
.primary,
.success,
.light,
.outline {
  all: unset;
}

/* 🌸 STATUS / LOG PANEL (app.html) */
.app-log-panel {
  margin: 0 auto 14px;
  padding: 0 max(16px, var(--safe-left)) 0 max(16px, var(--safe-right));
  max-width: var(--content-max);
  box-sizing: border-box;
}

.app-log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.app-log-toolbar__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn--compact {
  padding: 6px 12px;
  font-size: 13px;
  min-height: 36px;
  touch-action: manipulation;
}

.app-status-log {
  margin: 0;
  padding: 12px 14px;
  max-height: min(26dvh, 200px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 13px;
  line-height: 1.5;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.app-status-log:empty {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
  max-height: 0;
}

.app-log-line {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  background: rgba(212, 175, 55, 0.06);
}

.app-log-line:last-child {
  margin-bottom: 0;
}

.app-log-line--info {
  color: #a7f3d0;
  border-left-color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

.app-log-line--error {
  color: #fecaca;
  border-left-color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

/* 🌸 MAIN CONTAINER */
.container {
  padding: 16px max(16px, var(--safe-left)) max(24px, var(--safe-bottom))
    max(16px, var(--safe-right));
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .container {
    padding: 24px max(20px, var(--safe-left)) max(32px, var(--safe-bottom))
      max(20px, var(--safe-right));
  }

  .action-bar .btn {
    flex: 0 1 auto;
    min-width: auto;
    max-width: none;
  }

  .logo--app {
    height: 52px;
    max-height: 60px;
    max-width: 180px;
  }
}

/* 🌸 SCANNER MODAL (class name avoids Bootstrap .modal) */
.mz-overlay {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: max(12px, var(--safe-top)) max(12px, var(--safe-right))
    max(12px, var(--safe-bottom)) max(12px, var(--safe-left));
  background: var(--glass-overlay);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  z-index: 1200;
  -webkit-overflow-scrolling: touch;
}

.mz-overlay--scanner {
  background: rgba(0, 0, 0, 0.78);
  /* Heavy blur skipped on scanner: competes with camera + QR decode. */
}

.mz-overlay.is-open {
  display: flex;
}

.mz-modal-content {
  background: var(--glass-panel);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  padding: 20px;
  border-radius: var(--radius-lg);
  max-width: min(100vw - 32px, 400px);
  border: 1px solid var(--glass-border);
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mz-modal-content--scanner {
  max-width: min(100vw - 20px, 460px);
  width: 100%;
  max-height: min(92dvh, 92vh);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--glass-panel);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.scanner-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 12px 12px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.scanner-modal__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.scanner-modal__logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.scanner-modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-dark);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.scanner-modal__close {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.scanner-modal__close:hover {
  background: var(--surface-page);
  color: var(--text-dark);
}

@media (max-width: 767.98px) {
  .scanner-modal__logo {
    width: 48px;
    height: 48px;
  }

  .scanner-modal__close {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    font-size: 2rem;
    border-radius: 14px;
  }
}

.scanner-modal__body {
  padding: 12px 16px 16px;
  flex: 1;
  min-height: 0;
}

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

.scanner-manual-add {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: none;
}

.scanner-hint {
  order: 2;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.scanner-viewport-wrap {
  order: 3;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #0f172a;
  min-height: 200px;
  box-sizing: border-box;
  transition: box-shadow 0.18s ease;
}

/* Static frame while scanning — avoids animating box-shadow on the video container (major jank). */
.scanner-viewport-wrap--scanning {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.95),
    0 0 0 5px rgba(57, 255, 20, 0.4);
}

.scanner-viewport-wrap--success {
  box-shadow:
    0 0 0 3px #22c55e,
    0 0 24px rgba(34, 197, 94, 0.55);
}

.scanner-viewport-wrap--error {
  box-shadow:
    0 0 0 3px #ef4444,
    0 0 20px rgba(239, 68, 68, 0.45);
}

/* Lightweight “searching” cue: opacity pulse on overlay only (GPU-friendly), not on the camera layer. */
.scanner-frame-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(57, 255, 20, 0.35);
}

.scanner-viewport-wrap--scanning .scanner-frame-overlay {
  animation: scanner-overlay-pulse 2s ease-in-out infinite;
}

.scanner-viewport-wrap--success .scanner-frame-overlay,
.scanner-viewport-wrap--error .scanner-frame-overlay {
  animation: none;
  box-shadow: none;
}

@keyframes scanner-overlay-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.95;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scanner-viewport-wrap--scanning .scanner-frame-overlay {
    animation: none;
    opacity: 0.75;
  }
}

.scanner-viewport {
  min-height: 200px;
  border-radius: 20px;
  overflow: hidden;
  background: #0f172a;
  width: 100%;
}

.scanner-viewport video {
  border-radius: 20px;
}

.scanner-torch-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 40;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(15, 23, 42, 0.65);
  color: #fef08a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.scanner-torch-btn:hover {
  background: rgba(15, 23, 42, 0.85);
}

.scanner-torch-btn--on {
  background: rgba(250, 204, 21, 0.35);
  border-color: #fde047;
  color: #fff;
}

.scanner-torch-btn[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
}

.scanner-status {
  order: 4;
  min-height: 1.25em;
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.scanner-manual-add .bill-field {
  flex: 1 1 200px;
  min-width: 0;
  margin-bottom: 0;
}

.scanner-manual-input {
  font-size: 16px !important;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
}

.scanner-lookup-btn.btn-primary {
  background: var(--lavender-main);
  border-color: var(--lavender-main);
  font-weight: 600;
  min-height: 48px;
  padding-left: 18px;
  padding-right: 18px;
}

.scanner-modal__cancel-desktop {
  display: none;
}

@media (min-width: 768px) {
  .scanner-hint {
    order: 1;
  }

  .scanner-viewport-wrap {
    order: 2;
  }

  .scanner-manual-add {
    order: 3;
  }

  .scanner-status {
    order: 4;
  }

  .scanner-modal__cancel-desktop {
    display: inline-flex;
  }

  .scanner-manual-add {
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
  }
}

@media (max-width: 767.98px) {
  .mz-overlay--scanner {
    padding: 0;
    align-items: stretch;
  }

  .mz-modal-content--scanner {
    max-width: none;
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    border: none;
    overflow: hidden;
  }

  .scanner-modal__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 12px 16px max(16px, var(--safe-bottom));
    overflow: hidden;
  }

  #scannerPhaseScan.scanner-phase {
    flex: 1;
    min-height: 0;
  }

  .scanner-viewport-wrap {
    flex: 1 1 auto;
    min-height: 52vh;
    max-height: 70vh;
  }

  .scanner-viewport {
    min-height: 48vh;
    height: 100%;
  }
}

.scanner-manual-msg {
  font-size: 13px;
  color: #b71c1c;
  margin: 8px 0 0;
  min-height: 1.2em;
}

.scanner-result-body {
  margin-bottom: 12px;
}

.scanner-result-title {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 12px;
  color: var(--lavender-main);
}

.scanner-result-card {
  margin: 0;
}

.scanner-result-ok {
  font-size: 12px;
  font-weight: 600;
  color: #2e7d32;
  margin: 0 0 6px;
}

.scanner-result-name {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 4px;
  color: var(--text-dark);
}

.scanner-result-code {
  font-size: 12px;
  font-family: ui-monospace, Consolas, monospace;
  color: var(--text-muted);
  margin: 0 0 4px;
  word-break: break-all;
}

.scanner-result-category {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.35;
}

.scanner-result-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--lavender-light);
  padding-top: 6px;
}

.scanner-result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.scanner-result-row:last-child {
  border-bottom: none;
}

.scanner-result-label {
  flex: 0 0 auto;
  max-width: 42%;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.scanner-result-value {
  flex: 1 1 auto;
  text-align: right;
  word-break: break-word;
  color: var(--text-dark);
}

.scanner-result-row--price {
  padding-top: 8px;
  padding-bottom: 8px;
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.scanner-result-row--price .scanner-result-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lavender-main);
}

.scanner-result-miss__title {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 8px;
  color: #b71c1c;
}

.scanner-result-miss__text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 12px;
}

.scanner-result-miss__code {
  font-size: 13px;
  font-family: ui-monospace, Consolas, monospace;
  padding: 10px 12px;
  background: var(--lavender-light);
  border-radius: 8px;
  word-break: break-all;
  margin: 0;
}

.scanner-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
  padding: 12px 16px max(14px, var(--safe-bottom));
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.scanner-modal-actions .btn {
  flex: 1 1 auto;
  min-height: var(--touch-min);
  touch-action: manipulation;
}

@media (max-width: 380px) {
  .scanner-modal-actions {
    flex-direction: column;
  }

  .scanner-modal-actions .btn {
    width: 100%;
  }
}

/* 📦 Product catalog shell (table scroll + toolbar outside) */
.catalog-section {
  margin-top: 36px;
}

.catalog-section__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
}

.catalog-mobile-subheader {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 8px;
  line-height: 1.35;
  font-weight: 600;
}

.catalog-section__title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.catalog-filter-open-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--lavender-main);
  background: var(--surface);
  color: var(--lavender-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.catalog-filter-open-btn:hover {
  background: var(--lavender-light);
}

.catalog-section__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  padding-left: 12px;
  border-left: 4px solid var(--lavender-main);
}

.catalog-clear-icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--lavender-main);
  background: var(--surface);
  color: var(--lavender-main);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.catalog-clear-icon-btn:hover:not(:disabled) {
  background: var(--lavender-light);
}

.catalog-clear-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.catalog-list-host {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.catalog-scroll {
  flex: 1;
  min-height: 0;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 4px 0;
}

.catalog-count {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.catalog-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 4px;
}

.catalog-load-more-link {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--lavender-main);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  padding: 12px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  box-sizing: border-box;
}

.catalog-load-more-link:hover:not(:disabled) {
  color: var(--lavender-hover);
}

.catalog-load-more-link:disabled {
  color: var(--text-muted);
  cursor: default;
  text-decoration: none;
}

.catalog-list-host > .product-table-empty {
  margin: 0;
  padding: 28px 20px;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

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

.catalog-cards-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
  background: var(--surface);
}

.catalog-card {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--gradient-border) border-box;
  background-clip: padding-box, border-box;
}

.catalog-card__row1 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.catalog-card__id {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.catalog-card__name {
  flex: 1;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text-dark);
  min-width: 0;
}

.catalog-card__price {
  font-weight: 700;
  font-size: 17px;
  color: var(--text-dark);
  white-space: nowrap;
  flex-shrink: 0;
}

.catalog-card__meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.catalog-card__stock {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.catalog-card__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.catalog-card__dot--in {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.catalog-card__dot--out {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.catalog-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: var(--glass-overlay);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.catalog-filter-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  max-height: min(88dvh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--glass-panel);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 1px solid var(--glass-border);
  border-bottom: none;
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding-bottom: max(12px, var(--safe-bottom));
}

.catalog-filter-sheet__handle {
  width: 40px;
  height: 5px;
  border-radius: 999px;
  background: rgba(152, 158, 164, 0.45);
  margin: 10px auto 6px;
}

.catalog-filter-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.catalog-filter-sheet__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
}

.catalog-filter-sheet__close {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.catalog-filter-sheet__close:hover {
  background: var(--surface-page);
  color: var(--text-dark);
}

.catalog-filter-sheet__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.catalog-filter-field__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.catalog-filter-sheet__actions {
  padding: 12px 16px 8px;
  border-top: 1px solid var(--border-subtle);
}

.catalog-filter-sheet__apply {
  width: 100%;
  min-height: 48px;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: var(--lavender-main) !important;
  border-color: var(--lavender-main) !important;
}

body.catalog-filter-open {
  overflow: hidden;
}

/* 🌸 PRODUCT TABLE */
.product-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--gradient-border) border-box;
  background-clip: padding-box, border-box;
  max-height: min(62dvh, calc(100dvh - 260px));
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 720px) {
  .product-table-wrap {
    max-height: min(70vh, 720px);
  }
}

.product-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.35;
  table-layout: fixed;
}

/* Sticky sheet column titles (row 1) */
.product-table thead tr.column-header-row th {
  position: sticky;
  top: 0;
  z-index: 4;
  text-align: left;
  padding: 12px 10px;
  background: var(--lavender-light);
  color: var(--text-dark);
  font-weight: 600;
  border-bottom: 2px solid var(--catalog-edge);
  white-space: nowrap;
  vertical-align: bottom;
  box-shadow: 0 1px 0 var(--catalog-edge);
}

.product-table thead tr.column-header-row th.col-header-wide {
  white-space: normal;
  max-width: 140px;
  line-height: 1.25;
}

.product-table tbody td {
  min-height: 48px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.product-table tbody td.cell-url {
  max-width: 200px;
  word-break: break-all;
  font-size: 12px;
  color: var(--text-muted);
}

.product-table tbody tr:nth-child(even) {
  background: var(--catalog-row-stripe);
}

.product-table tbody tr:hover {
  background: var(--catalog-row-hover);
}

/* Keep first column visible while scrolling wide tables */
.product-table thead tr th:first-child,
.product-table tbody tr td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
}

.product-table tbody tr td:first-child {
  background: inherit;
  box-shadow: 1px 0 0 var(--border-subtle);
}

.product-table thead tr.column-header-row th:first-child {
  z-index: 6;
}

.product-table thead tr.product-table-filter-row th:first-child {
  z-index: 5;
}

.product-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.product-table .mono {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
}

.stock-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.stock-pill--in {
  background: #e8f5e9;
  color: #1b5e20;
}

.stock-pill--out {
  background: #ffebee;
  color: #b71c1c;
}

/* Sticky filter row (row 2) — sits under column headers */
.product-table thead tr.product-table-filter-row th {
  position: sticky;
  top: 56px;
  z-index: 3;
  padding: 8px 8px !important;
  background: var(--surface);
  border-bottom: 2px solid var(--catalog-edge);
  font-weight: normal;
  vertical-align: middle;
}

.product-col-filter {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  color: var(--text-dark);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.product-col-filter:hover {
  border-color: var(--border-accent);
  background: var(--surface);
}

.product-col-filter::placeholder {
  color: var(--text-muted);
}

.product-filter-empty {
  background: var(--surface);
}

.product-table-empty-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 18px 12px;
}

.product-table-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.btn-secondary {
  background: var(--surface);
  color: var(--lavender-main);
  border: 2px solid var(--lavender-main);
  box-shadow: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--lavender-light);
  box-shadow: var(--shadow-sm);
}

/* 🌸 LOGIN (index.html) */
.login-setup {
  max-width: none;
  margin: 16px 0;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--lavender-light);
}

.login-setup__text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.login-setup__text--secondary {
  margin-top: -4px;
  font-size: 13px;
  opacity: 0.95;
}

.login-setup__text code {
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-dark);
}

.login-setup__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  font-size: 16px;
  background: var(--surface-elevated);
  color: var(--text-dark);
}

/* PWA install — hidden until browser fires beforeinstallprompt */
.install-btn.install-btn--hidden {
  display: none !important;
}

/* ═══════════ LOGIN PAGE SHELL ═══════════ */
.login-page {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  padding-top: max(20px, env(safe-area-inset-top, 0px));
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--glass-panel);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: 16px;
  padding: 28px 22px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
}

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

.logo--login {
  width: 96px;
  height: auto;
  max-height: 100px;
  object-fit: contain;
  margin: 0 auto 14px;
  display: block;
}

.login-title {
  font-size: clamp(1.35rem, 5vw, 1.6rem);
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  letter-spacing: -0.02em;
}

.login-tagline {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--text-muted);
}

.login-auth-msg {
  display: none;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.login-actions {
  margin-top: 8px;
}

.login-actions .btn {
  width: 100%;
  min-height: var(--touch-min);
  touch-action: manipulation;
}

/* ═══════════ MOBILE TABLE / HEADER ═══════════ */
@media (max-width: 639px) {
  .product-table {
    font-size: 12px;
    min-width: 980px;
  }

  .product-table thead tr.column-header-row th {
    padding: 8px 6px;
    font-size: 11px;
  }

  .product-table thead tr.product-table-filter-row th {
    top: 50px;
    padding: 6px 4px !important;
  }

  .product-col-filter {
    font-size: 11px;
    padding: 8px 6px;
    min-height: 40px;
  }

  .catalog-clear-filters-inline {
    min-height: 40px;
    font-size: 11px;
    padding: 7px 6px;
  }

  .catalog-toolbar {
    padding-top: 6px;
  }

  .catalog-count {
    width: 100%;
    order: 1;
  }

  .catalog-section__title-row {
    gap: 8px;
  }

  .product-table tbody td {
    padding: 8px 6px;
  }

  .header-branding {
    gap: 10px;
  }
}

/* ═══════════ NEW BILL MODAL ═══════════ */
.new-bill-modal {
  z-index: 1250;
}

.mz-modal-content--bill {
  position: relative;
  max-width: min(100vw - 20px, 920px);
  width: 100%;
  max-height: min(94dvh, 94vh);
  overflow-y: auto;
  padding: 22px 20px;
  /* Let nested invoice preview shrink inside flex modal (default min-width:auto clips overflow) */
  min-width: 0;
  background: var(--glass-panel);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.new-bill-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(37, 37, 37, 0.6);
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition:
    background 0.15s ease,
    color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.new-bill-modal__close:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--text-dark);
}

.new-bill-modal__close:focus-visible {
  outline: 2px solid var(--lavender-main);
  outline-offset: 2px;
}

/* Single primary row: Continue / Finalize / Finalize Bill */
.bill-step-actions--forward-only {
  justify-content: center;
  margin-top: 14px;
}

.bill-step-actions--forward-only .btn {
  min-width: min(100%, 280px);
}

.new-bill-modal__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: -22px -20px 16px;
  padding: 14px 20px 16px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(
    145deg,
    rgba(26, 34, 56, 0.55) 0%,
    rgba(30, 30, 30, 0.75) 45%,
    rgba(37, 37, 37, 0.82) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Tier 1: brand (logo) + connection status */
.new-bill-modal__head-tier--brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding-right: 44px;
}

/* Tier 2: task title + step progress pill */
.new-bill-modal__head-tier--task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}

.new-bill-modal__logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(180px, 55vw);
  object-fit: contain;
  flex-shrink: 0;
}

.new-bill-modal__title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-dark);
}

.new-bill-modal__step-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
  background: rgba(37, 37, 37, 0.65);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.new-bill-modal__step-fraction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25em;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #121212;
  background: linear-gradient(180deg, #e8c656 0%, var(--hr-gold) 100%);
  border: 1px solid rgba(212, 175, 55, 0.5);
}

.new-bill-modal__step-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  color: var(--lavender-main);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.new-bill-modal__step-info-btn:hover {
  background: rgba(212, 175, 55, 0.22);
  color: var(--lavender-hover);
}

.new-bill-modal__step-info-btn:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.55);
  outline-offset: 2px;
}

.new-bill-modal__step-info-btn:active {
  transform: scale(0.94);
}

.new-bill-modal__step-hint-popover {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(37, 37, 37, 0.92);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.new-bill-modal__step-hint-popover__text {
  margin: 0;
}

.new-bill-modal__step-hint-popover__text strong {
  color: var(--text-dark);
  font-weight: 700;
}

.bill-modal-alert {
  padding: 10px 12px;
  margin: 0 0 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.bill-modal-alert--error {
  background: rgba(183, 28, 28, 0.18);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.bill-modal-alert--info {
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.28);
}

.bill-step__hint {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 14px;
}

.bill-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin-bottom: 16px;
}

/* Step 1 customer: Row 1 name+phone, Row 2 email+address, then pairs; full-width date + note */
.bill-form-grid--customer {
  align-items: start;
}

/* Step 2: Order mode, payment, month — 3 columns on wider screens */
.bill-form-grid.bill-form-grid--step2-setup {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bill-step2-setup {
  margin: 0 -20px 16px;
  padding: 14px 20px 16px;
  border-radius: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(
    180deg,
    rgba(26, 34, 56, 0.4) 0%,
    rgba(30, 30, 30, 0.55) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bill-step2-scan-hero {
  margin-bottom: 16px;
}

.bill-scan-row--hero {
  justify-content: center;
  margin-bottom: 0;
}

.bill-scan-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  gap: 14px;
}

.bill-manual-add--hero {
  flex: 0 0 auto;
  width: 100%;
  max-width: 420px;
}

.bill-lines-section {
  margin-bottom: 8px;
}

.bill-lines-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 16px 32px;
  border: 1px dashed rgba(152, 158, 164, 0.45);
  border-radius: var(--radius-md);
  background: rgba(37, 37, 37, 0.5);
  color: var(--text-muted);
}

.bill-lines-empty[hidden] {
  display: none !important;
}

.bill-lines-empty__art {
  color: rgba(212, 175, 55, 0.35);
  margin-bottom: 10px;
}

.bill-lines-empty__title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.bill-lines-empty__sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  max-width: 280px;
}

.bill-lines-wrap--table {
  margin-bottom: 8px;
}

.bill-line-final {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-dark);
}

.bill-step2-checkout {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.bill-checkout-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-subtle);
}

.bill-checkout-total-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bill-checkout-total-amt {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--lavender-main);
  font-variant-numeric: tabular-nums;
}

.bill-field--final-paid input {
  font-size: 16px;
}

.bill-step-actions--step2 {
  margin-top: 12px;
}

@media (max-width: 639px) {
  .bill-step2-checkout {
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin-top: 12px;
    padding-top: 14px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(
      to top,
      rgba(18, 18, 18, 0.98) 55%,
      rgba(26, 34, 56, 0.92) 100%
    );
    box-shadow:
      0 -8px 24px rgba(0, 0, 0, 0.45),
      0 -1px 0 var(--border-subtle);
  }
}

.bill-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.bill-field--full {
  grid-column: 1 / -1;
}

.bill-field input,
.bill-field select,
.bill-field textarea {
  font-weight: 400;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
  background: var(--surface-elevated);
  color: var(--text-dark);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.bill-field textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.45;
  font-family: inherit;
}

.bill-field input:hover,
.bill-field select:hover,
.bill-field textarea:hover {
  border-color: var(--border-accent);
}

.bill-field input:focus,
.bill-field select:focus,
.bill-field textarea:focus {
  background: var(--surface);
}

/* Required fields: subtle red accent on focus (beyond asterisk labels) */
.bill-field input:required:focus,
.bill-field select:required:focus,
.bill-field textarea:required:focus {
  border-color: rgba(220, 38, 38, 0.42);
  box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.12);
  outline: none;
}

.bill-field input:required:focus-visible,
.bill-field select:required:focus-visible,
.bill-field textarea:required:focus-visible {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.14);
}

.bill-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.bill-step-actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.bill-step-actions .btn {
  min-height: var(--touch-min);
}

.bill-scan-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
  align-items: flex-start;
}

.bill-scan-viewport {
  flex: 1 1 220px;
  min-height: 200px;
  max-width: 320px;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a2e;
}

.bill-scan-viewport.bill-scan-viewport--hero {
  flex: 0 0 auto;
  width: 100%;
  max-width: 420px;
  min-height: 220px;
  min-width: 200px;
  margin: 0 auto;
}

/* html5-qrcode measures this node; ensure it never lays out at 0×0 before getUserMedia */
#billScanRegion.bill-scan-viewport {
  box-sizing: border-box;
}

.bill-manual-add {
  flex: 1 1 200px;
  min-width: 0;
}

.bill-line-msg {
  font-size: 13px;
  color: #b71c1c;
  margin-top: 8px;
  min-height: 1.2em;
}

.bill-lines-wrap {
  overflow-x: auto;
  margin-bottom: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--gradient-border) border-box;
  background-clip: padding-box, border-box;
}

.bill-lines-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bill-lines-table th,
.bill-lines-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.bill-lines-table th {
  background: var(--lavender-light);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.bill-discount-input {
  width: 4.5rem;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  font-size: 14px;
  background: var(--surface-elevated);
  color: var(--text-dark);
}

.bill-totals-summary {
  margin-bottom: 12px;
}

.bill-totals-summary__list {
  list-style: none;
  padding: 12px 14px;
  margin: 0;
  background: var(--surface-elevated);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.bill-totals-summary__list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.bill-totals-summary__list li:last-child {
  border-bottom: none;
  font-weight: 700;
  color: var(--lavender-main);
}

.bill-invoice-preview-host {
  max-height: min(52vh, 520px);
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(37, 37, 37, 0.9) 0%, rgba(18, 18, 18, 0.95) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.bill-invoice-preview-host--step3 {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile bottom sheet: same responsive invoice rules as new-bill step 3; outer scroll only */
.mz-bottom-sheet__scroll .bill-invoice-preview-host--sheet {
  max-height: none;
  overflow: visible;
  margin-bottom: 0;
  min-width: 0;
  width: 100%;
}

.bill-preview-placeholder {
  margin: 0;
  padding: 16px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 360px;
}

/* Wrapper for live DOM invoice (PDF still uses full-resolution .invoice-print-root) */
.bill-invoice-preview-inner {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/*
 * Preview-only overrides: invoice-bill.js embeds ~800px print CSS; without this the
 * layout stays wide on phones and clips inside the modal (transform:scale does not
 * reduce layout width).
 */
.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 10px 8px !important;
  box-sizing: border-box !important;
}

.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .invoice-wrapper {
  max-width: 100% !important;
  width: 100% !important;
  padding: 12px 10px !important;
  box-sizing: border-box !important;
}

.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .header-table {
  width: 100% !important;
  table-layout: fixed !important;
}

.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .header-left,
.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .header-center,
.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .header-right {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .header-center {
  font-size: clamp(12px, 3.2vw, 18px) !important;
  letter-spacing: 0.06em !important;
}

.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .details-table {
  width: 100% !important;
  table-layout: fixed !important;
}

.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .details-table td {
  width: 50% !important;
}

/* Print template uses fixed height; wrapped text on narrow screens must not overlap items table */
.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .info-box {
  height: auto !important;
  min-height: 88px;
}

.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .items-table {
  width: 100% !important;
  table-layout: fixed !important;
}

.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .items-table th,
.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .items-table td {
  padding: 8px 4px !important;
  font-size: clamp(9px, 2.4vw, 12px) !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .totals-wrapper {
  width: 100% !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .totals-table {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
}

.bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .footer-table {
  width: 100% !important;
  table-layout: fixed !important;
}

@media (max-width: 480px) {
  .bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .qr-img {
    width: 48px !important;
    height: 48px !important;
  }

  .bill-invoice-preview-host .bill-invoice-preview-inner .invoice-print-root .logo-img {
    max-width: 88px !important;
    width: auto !important;
  }
}

.bill-step-actions--final {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.bill-step-actions--final .btn {
  min-width: 140px;
}

.bill-preview-loading,
.bill-preview-error {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
}

.bill-preview-error {
  color: #b71c1c;
}

/* ═══════════ SALES TABLE ═══════════ */
.sales-section {
  margin: 0 0 8px;
}

.sales-section__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  padding-left: 12px;
  border-left: 4px solid var(--lavender-main);
}

.sales-table-wrap {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--gradient-border) border-box;
  background-clip: padding-box, border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sales-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.sales-table th,
.sales-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: middle;
}

#saleDetailsTable.sales-table tbody td {
  min-height: 48px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.sales-table th {
  background: var(--lavender-light);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sales-invoice-no {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  width: 1%;
}

.sales-customer-link {
  color: var(--lavender-main);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.sales-customer-link:hover {
  color: var(--lavender-hover);
}

.sales-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 44px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #128c7e;
  text-decoration: none;
  border-radius: 999px;
  background: rgba(18, 140, 126, 0.1);
  border: 1px solid rgba(18, 140, 126, 0.25);
  -webkit-touch-callout: none;
  touch-action: manipulation;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.sales-wa:hover {
  background: rgba(18, 140, 126, 0.18);
  transform: translateY(-1px);
}

.sales-wa:focus-visible {
  outline-color: #128c7e;
}

.sales-invoice-link {
  color: var(--lavender-main);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sales-invoice-link:hover {
  color: var(--lavender-hover);
}

.sale-details-product-link {
  color: var(--lavender-main);
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 4px;
  margin: 2px 4px 2px 0;
  font-weight: 600;
  font-size: 14px;
}

.sale-details-product-link:hover {
  color: var(--lavender-hover);
}

.sale-details-mobile-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sale-details-mobile-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  padding: 14px 14px 12px;
  border-top: 3px solid rgba(57, 255, 20, 0.55);
}

.sale-details-mobile-card__primary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sale-details-mobile-card__cat {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--text-dark);
  flex: 1;
  min-width: 0;
}

.sale-details-mobile-card__total {
  font-weight: 800;
  font-size: 17px;
  line-height: 1.2;
  color: var(--text-dark);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sale-details-mobile-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
}

.sale-details-mobile-card__col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.sale-details-mobile-card__col-h {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.sale-details-mobile-card__col-v {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  word-break: break-word;
}

.sale-details-mobile-card__ids {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.sale-details-mobile-card__ids-h {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.sale-details-mobile-card__ids-links {
  font-size: 13px;
  line-height: 1.55;
}

.sale-details-mobile-totals {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.sale-details-mobile-totals__main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.sale-details-mobile-totals__label {
  font-weight: 700;
  color: var(--text-dark);
}

.sale-details-mobile-totals__amt {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
}

.sale-details-mobile-totals__sub {
  font-size: 13px;
  color: var(--text-muted);
}

.sale-details-mobile-totals__sep {
  margin: 0 6px;
  opacity: 0.6;
}

.sales-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.sale-details-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 10px;
}

.sale-details-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sale-details-icon-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--lavender-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.sale-details-icon-btn:hover {
  background: var(--lavender-light);
  border-color: var(--lavender-main);
}

.sale-details-icon-btn:focus-visible {
  outline: 2px solid var(--lavender-main);
  outline-offset: 2px;
}

.sale-details-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sale-details-header-row .sales-section__title {
  margin-bottom: 0;
}

.sale-details-pin-gate {
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  margin-bottom: 12px;
}

.sale-details-pin-gate__msg {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.sale-details-pin-gate__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sale-details-pin-gate .login-setup__input {
  margin-bottom: 0;
  flex: 1 1 220px;
}

.sale-details-total-row td {
  font-weight: 700;
  background: rgba(212, 175, 55, 0.1);
}

.sale-details-share {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.sale-details-share .bill-field {
  flex: 1 1 260px;
}

.mz-modal-content--customer-info {
  max-width: min(100vw - 20px, 640px);
  width: 100%;
  background: var(--glass-panel);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.customer-info-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.customer-info-modal__logo {
  flex-shrink: 0;
  height: 28px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
}

.customer-info-modal__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.customer-info-edit-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--lavender-main);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.customer-info-edit-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--border-accent);
}

.customer-review-body {
  min-width: 0;
  margin-bottom: 8px;
}

.customer-review__hero {
  margin-bottom: 18px;
}

.customer-review__hero-name {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  line-height: 1.2;
}

.customer-review__hero-phone {
  margin: 0;
  font-size: clamp(1.1rem, 2.8vw, 1.35rem);
  font-weight: 700;
  color: var(--lavender-main);
  font-variant-numeric: tabular-nums;
}

.customer-review__row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}

.customer-review__row:last-child {
  margin-bottom: 0;
}

.customer-review__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.customer-review__value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  word-break: break-word;
}

.customer-review__cluster-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lavender-main);
}

.bill-customer-review__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.bill-customer-review__logo {
  flex-shrink: 0;
  height: 28px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
}

.bill-customer-review__title {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .customer-review__mobile {
    display: none;
  }

  .customer-review__desktop {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    align-items: start;
  }

  .customer-review__cluster--order {
    grid-column: 1 / -1;
  }
}

@media (max-width: 639.98px) {
  .customer-review__desktop {
    display: none;
  }

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

  .customer-review__mcard {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 14px 14px 12px;
    background:
      linear-gradient(180deg, rgba(37, 37, 37, 0.95) 0%, rgba(30, 30, 30, 0.98) 100%) padding-box,
      var(--gradient-border) border-box;
    background-clip: padding-box, border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .mz-sales-card .sales-customer-link,
  .sales-table .sales-customer-link {
    display: inline-block;
    padding: 6px 10px;
    margin: -2px -6px;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.12);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    touch-action: manipulation;
  }
}

@media (max-width: 639px) {
  .bill-form-grid {
    grid-template-columns: 1fr;
  }

  .sales-table {
    font-size: 12px;
  }

  .sales-table th,
  .sales-table td {
    padding: 8px 6px;
  }

  .sale-details-share .btn {
    width: 100%;
  }
}

/* ═══════════ HERITAGE ROYAL — Bootstrap + icons (offline CSS only) ═══════════ */
.btn-primary {
  --bs-btn-bg: #c9a227;
  --bs-btn-border-color: #d4af37;
  --bs-btn-hover-bg: #e8c656;
  --bs-btn-hover-border-color: #e8c656;
  --bs-btn-active-bg: #a88628;
  --bs-btn-active-border-color: #a88628;
  --bs-btn-color: #121212;
  --bs-btn-hover-color: #121212;
  --bs-btn-active-color: #121212;
  color: #121212;
}

.btn-outline-secondary {
  --bs-btn-color: var(--text-muted);
  --bs-btn-border-color: var(--border-subtle);
  --bs-btn-hover-bg: rgba(212, 175, 55, 0.12);
  --bs-btn-hover-border-color: var(--border-accent);
  --bs-btn-hover-color: var(--text-dark);
}

.btn-outline-success {
  --bs-btn-color: #34d399;
  --bs-btn-border-color: rgba(52, 211, 153, 0.45);
}

.btn-outline-danger {
  --bs-btn-color: #f87171;
  --bs-btn-border-color: rgba(248, 113, 113, 0.4);
}

/* Light-line iconography: thinner strokes on inline SVGs (filled icons keep fill) */
.mz-app-layout svg[stroke],
.mz-overlay svg[stroke],
.mz-bottom-sheet svg[stroke] {
  stroke-width: 1.15;
}

.mz-app-layout svg path[stroke],
.mz-overlay svg path[stroke],
.mz-bottom-sheet svg path[stroke] {
  stroke-width: 1.15 !important;
}

.mz-app-layout .btn svg,
.mz-bottom-nav__btn svg,
.mz-sidebar-nav__btn svg,
.mz-system-menu-btn svg {
  opacity: 0.92;
}

.table {
  --bs-table-color: var(--text-dark);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--border-subtle);
  color: var(--text-dark);
}

.table-hover > tbody > tr:hover > * {
  --bs-table-hover-bg: rgba(212, 175, 55, 0.07);
}

.card {
  --bs-card-bg: var(--surface);
  color: var(--text-dark);
}