/* Kaslio website/dashboard alignment v2.3.8 */
html {
  background: #06101f !important;
  background-color: #06101f !important;
}

body:not(.login-body):not(.customer-body) {
  background: #06101f !important;
  background-color: #06101f !important;
}

.app-shell {
  background: #06101f;
  min-height: 100dvh;
}

body.login-body {
  background: #06101f;
}

.login-shell {
  background: none;
  isolation: isolate;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
}

.login-shell::before {
  background:
    linear-gradient(90deg, rgba(6, 16, 31, 0.98) 0%, rgba(6, 16, 31, 0.78) 48%, rgba(6, 16, 31, 0.35) 100%),
    url("./../images/festival-hero.png") center top/cover no-repeat;
  content: "";
  inset: 0;
  min-height: 100%;
  position: absolute;
  z-index: -2;
}

.login-shell::after {
  background: linear-gradient(180deg, rgba(6, 16, 31, 0) 0%, rgba(6, 16, 31, 0.94) 100%);
  content: "";
  inset: auto 0 0;
  min-height: 38vh;
  position: absolute;
  z-index: -1;
}

.login-body .promo-bar {
  display: none;
}

.login-body .login-card {
  gap: 18px;
  max-width: 520px;
  padding: 32px;
}

.login-body .login-logo {
  width: min(180px, 62%);
}

.login-body .login-copy {
  display: grid;
  gap: 8px;
}

.login-body .login-title {
  font-size: clamp(2.7rem, 7vw, 4rem);
  line-height: 0.95;
  margin: 0;
}

.login-body .login-text {
  margin: 0;
}

.login-body .login-form {
  display: grid;
  gap: 12px;
}

.login-body .recovery-form {
  gap: 18px;
}

.login-body .login-form[hidden],
.login-body .recovery-form[hidden],
.login-body .login-message[hidden] {
  display: none !important;
}

.login-body .recovery-form h2 {
  font-size: 1.3rem;
  margin: 0;
}

.login-card.is-recovery-mode {
  max-width: 620px;
}

.login-card.is-recovery-mode .login-cta-row {
  display: none;
}

.recovery-heading {
  display: grid;
  gap: 12px;
  text-align: center;
}

.recovery-heading h1 {
  color: #ffffff;
  font-size: clamp(2rem, 6vw, 2.7rem);
  line-height: 1.04;
  margin: 0;
}

.recovery-heading .login-text {
  color: #8ea0b6;
}

.login-body .login-message {
  margin-top: 2px;
}

.login-cta-row {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
}

.login-link-button,
.text-link-button {
  align-items: center;
  background: rgba(142, 160, 182, 0.12);
  border: 1px solid rgba(142, 160, 182, 0.2);
  border-radius: 10px;
  color: #dce6f2;
  display: inline-flex;
  font-weight: 800;
  min-height: 42px;
  padding: 0 14px;
  text-decoration: none;
}

.login-link-button:hover,
.text-link-button:hover {
  border-color: #25cce5;
  color: #ffffff;
}

.text-link-button {
  justify-content: center;
  width: fit-content;
}

.reset-card {
  max-width: 640px !important;
}

.reset-password-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.password-rules {
  background: rgba(11, 17, 27, 0.6);
  border: 1px solid rgba(38, 52, 73, 0.9);
  border-radius: 12px;
  color: #8ea0b6;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.password-rules strong {
  color: #ffffff;
}

.password-rules span::before {
  color: #8ea0b6;
  content: "✓";
  display: inline-block;
  font-weight: 900;
  margin-right: 8px;
}

.password-rules span[data-valid="true"] {
  color: #18d7a5;
}

.reset-success {
  background: rgba(24, 215, 165, 0.14);
  border: 1px solid rgba(24, 215, 165, 0.32);
  border-radius: 16px;
  display: grid;
  gap: 14px;
  padding: 20px;
}

.reset-success[hidden] {
  display: none !important;
}

.reset-success h1,
.reset-success p {
  margin: 0;
}

@media (max-width: 640px) {
  .login-body .login-shell {
    align-items: stretch;
    padding: 18px 14px;
  }

  .login-body .login-card {
    margin: 0 auto;
    max-width: 100%;
    padding: 22px;
  }

  .login-cta-row,
  .reset-password-grid {
    grid-template-columns: 1fr;
  }

  .login-link-button,
  .text-link-button {
    justify-content: center;
    width: 100%;
  }
}

.usp-rotator {
  justify-content: center;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.usp-rotator span {
  align-items: center;
  animation: kaslio-usp-cycle-final 24s ease-in-out infinite;
  display: inline-flex;
  gap: 10px;
  opacity: 0;
  position: absolute;
  transform: translateY(8px);
}

.usp-rotator span::before {
  background: #06101f;
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

.usp-rotator span:nth-child(1) { animation-delay: 0s; }
.usp-rotator span:nth-child(2) { animation-delay: 4s; }
.usp-rotator span:nth-child(3) { animation-delay: 8s; }
.usp-rotator span:nth-child(4) { animation-delay: 12s; }
.usp-rotator span:nth-child(5) { animation-delay: 16s; }
.usp-rotator span:nth-child(6) { animation-delay: 20s; }

@keyframes kaslio-usp-cycle-final {
  0%, 4% { opacity: 0; transform: translateY(8px); }
  7%, 14% { opacity: 1; transform: translateY(0); }
  18%, 100% { opacity: 0; transform: translateY(-8px); }
}

@media (min-width: 981px) {
  .catalog-toolbar,
  .catalog-actions {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .sort-strip {
    justify-self: start;
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .usp-rotator span {
    animation: none;
    opacity: 1;
    position: static;
    transform: none;
  }

  .usp-rotator span:not(:first-child) {
    display: none;
  }
}

/* Browser-width scaling override */
html,
body {
  width: 100%;
}

body:not(.login-body):not(.customer-body) {
  overflow-x: hidden;
}

body:not(.login-body):not(.customer-body) .app-shell,
body:not(.login-body):not(.customer-body) .topbar,
body:not(.login-body):not(.customer-body) .register-layout,
body:not(.login-body):not(.customer-body) .overview-layout,
body:not(.login-body):not(.customer-body) .cash-layout,
body:not(.login-body):not(.customer-body) .settings-layout,
body:not(.login-body):not(.customer-body) .shift-layout {
  box-sizing: border-box;
  max-width: none !important;
  width: 100% !important;
}

body:not(.login-body):not(.customer-body) .app-shell {
  margin: 0;
}

body:not(.login-body):not(.customer-body) .topbar {
  margin: 0 0 clamp(18px, 2vw, 32px);
  padding-left: clamp(16px, 3vw, 56px);
  padding-right: clamp(16px, 3vw, 56px);
}

body:not(.login-body):not(.customer-body) .register-layout,
body:not(.login-body):not(.customer-body) .overview-layout,
body:not(.login-body):not(.customer-body) .cash-layout,
body:not(.login-body):not(.customer-body) .settings-layout,
body:not(.login-body):not(.customer-body) .shift-layout {
  margin-left: 0;
  margin-right: 0;
  padding-left: clamp(16px, 3vw, 56px);
  padding-right: clamp(16px, 3vw, 56px);
}

body:not(.login-body):not(.customer-body) .register-layout {
  gap: clamp(18px, 2vw, 34px);
  grid-template-columns: minmax(0, 1fr) minmax(360px, clamp(380px, 26vw, 480px));
}

body:not(.login-body):not(.customer-body) .products-panel {
  min-width: 0;
}

body:not(.login-body):not(.customer-body) .products-panel .product-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

body:not(.login-body):not(.customer-body) .receipt-panel {
  min-width: 0;
}

@media (min-width: 1600px) {
  body:not(.login-body):not(.customer-body) .products-panel .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 1180px) {
  body:not(.login-body):not(.customer-body) .register-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body:not(.login-body):not(.customer-body) .topbar,
  body:not(.login-body):not(.customer-body) .register-layout,
  body:not(.login-body):not(.customer-body) .overview-layout,
  body:not(.login-body):not(.customer-body) .cash-layout,
  body:not(.login-body):not(.customer-body) .settings-layout,
  body:not(.login-body):not(.customer-body) .shift-layout {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Mijn Kaslio dark register polish */
@media (min-width: 981px) {
  body:not(.login-body):not(.customer-body) .register-layout,
  body:not(.login-body):not(.customer-body) .overview-layout,
  body:not(.login-body):not(.customer-body) .cash-layout,
  body:not(.login-body):not(.customer-body) .settings-layout,
  body:not(.login-body):not(.customer-body) .shift-layout {
    padding-left: clamp(320px, 19.5vw, 360px);
    padding-right: clamp(28px, 3vw, 56px);
  }

  body:not(.login-body):not(.customer-body) .register-layout {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(360px, clamp(390px, 26vw, 460px));
  }

  body:not(.login-body):not(.customer-body) .products-panel {
    background: #101824;
    border-color: #202c3c;
    box-shadow: none;
    color: #e9eef5;
    overflow: hidden;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-toolbar,
  body:not(.login-body):not(.customer-body) .products-panel .catalog-actions {
    width: 100%;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-tabs {
    scrollbar-color: #354255 #0b111b;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-tab,
  body:not(.login-body):not(.customer-body) .products-panel .quick-sale-toolbar,
  body:not(.login-body):not(.customer-body) .products-panel .sort-strip,
  body:not(.login-body):not(.customer-body) .products-panel .field input,
  body:not(.login-body):not(.customer-body) .products-panel .field select,
  body:not(.login-body):not(.customer-body) .products-panel .secondary-button,
  body:not(.login-body):not(.customer-body) .products-panel .icon-button,
  body:not(.login-body):not(.customer-body) .products-panel .sort-chip {
    background: #0b111b;
    border-color: #202c3c;
    color: #dce6f2;
  }

  body:not(.login-body):not(.customer-body) .products-panel .quick-sale-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  body:not(.login-body):not(.customer-body) .products-panel .field span,
  body:not(.login-body):not(.customer-body) .products-panel .group-title h2 {
    color: #8ea0b6;
  }

  body:not(.login-body):not(.customer-body) .products-panel .field input::placeholder {
    color: #7c8ba0;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-tab.active,
  body:not(.login-body):not(.customer-body) .products-panel .sort-chip.active,
  body:not(.login-body):not(.customer-body) .products-panel .secondary-button.is-active {
    background: #102d40;
    border-color: #16415a;
    color: #25cce5;
    box-shadow: none;
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-button {
    background: linear-gradient(180deg, #101824 0%, #0b111b 100%);
    border-color: #202c3c;
    color: #ffffff;
    min-height: 124px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-button:hover {
    background: #121d2b;
    border-color: #25cce5;
    box-shadow: 0 0 34px rgba(37, 204, 229, 0.1);
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-name,
  body:not(.login-body):not(.customer-body) .products-panel .product-price {
    color: #ffffff;
  }

  body:not(.login-body):not(.customer-body) .products-panel .group-dot {
    background: rgba(37, 204, 229, 0.12);
    color: #25cce5;
  }
}

/* Mijn Kaslio dark dashboard polish */
body:not(.login-body):not(.customer-body) {
  --kaslio-panel: #101824;
  --kaslio-panel-strong: #07101e;
  --kaslio-panel-soft: #0b111b;
  --kaslio-line: #202c3c;
  --kaslio-line-strong: #354255;
  --kaslio-text: #ffffff;
  --kaslio-muted: #8ea0b6;
  --kaslio-muted-strong: #b7c2d1;
}

body:not(.login-body):not(.customer-body) .panel,
body:not(.login-body):not(.customer-body) .metric,
body:not(.login-body):not(.customer-body) .products-panel,
body:not(.login-body):not(.customer-body) .receipt-panel {
  background: var(--kaslio-panel);
  border-color: var(--kaslio-line);
  box-shadow: none;
  color: var(--kaslio-text);
}

body:not(.login-body):not(.customer-body) .receipt-panel {
  background: var(--kaslio-panel-strong);
}

body:not(.login-body):not(.customer-body) .panel h2,
body:not(.login-body):not(.customer-body) .metric strong,
body:not(.login-body):not(.customer-body) .cash-metric strong,
body:not(.login-body):not(.customer-body) .ticket-summary strong,
body:not(.login-body):not(.customer-body) .total-row strong,
body:not(.login-body):not(.customer-body) .sale-row strong,
body:not(.login-body):not(.customer-body) .audit-row strong {
  color: var(--kaslio-text);
}

body:not(.login-body):not(.customer-body) .metric span,
body:not(.login-body):not(.customer-body) .field span,
body:not(.login-body):not(.customer-body) .muted,
body:not(.login-body):not(.customer-body) .action-panel p,
body:not(.login-body):not(.customer-body) .sale-row span,
body:not(.login-body):not(.customer-body) .sale-row em,
body:not(.login-body):not(.customer-body) .audit-row span,
body:not(.login-body):not(.customer-body) .cash-metric span,
body:not(.login-body):not(.customer-body) .cloud-state span,
body:not(.login-body):not(.customer-body) .chart-row-header span,
body:not(.login-body):not(.customer-body) .entry-mode-copy span,
body:not(.login-body):not(.customer-body) .receipt-line span {
  color: var(--kaslio-muted);
}

body:not(.login-body):not(.customer-body) .field input,
body:not(.login-body):not(.customer-body) .field select,
body:not(.login-body):not(.customer-body) .cash-row input,
body:not(.login-body):not(.customer-body) .payment-method-form input,
body:not(.login-body):not(.customer-body) .modal-form input,
body:not(.login-body):not(.customer-body) .modal-form select {
  background: var(--kaslio-panel-soft);
  border-color: var(--kaslio-line);
  color: #dce6f2;
}

body:not(.login-body):not(.customer-body) .field input::placeholder,
body:not(.login-body):not(.customer-body) .payment-method-form input::placeholder,
body:not(.login-body):not(.customer-body) .modal-form input::placeholder {
  color: #6f7f94;
}

body:not(.login-body):not(.customer-body) .field select option {
  background: var(--kaslio-panel-soft);
  color: #dce6f2;
}

body:not(.login-body):not(.customer-body) .secondary-button,
body:not(.login-body):not(.customer-body) .icon-button,
body:not(.login-body):not(.customer-body) .sale-row-button,
body:not(.login-body):not(.customer-body) .audit-pager .secondary-button,
body:not(.login-body):not(.customer-body) .sales-pager .secondary-button {
  background: #111d2c;
  border-color: var(--kaslio-line);
  box-shadow: none;
  color: #dce6f2;
}

body:not(.login-body):not(.customer-body) .secondary-button:hover:not(:disabled),
body:not(.login-body):not(.customer-body) .icon-button:hover:not(:disabled),
body:not(.login-body):not(.customer-body) .sale-row-button:hover:not(:disabled) {
  background: #132437;
  border-color: #25cce5;
  color: #ffffff;
}

body:not(.login-body):not(.customer-body) .secondary-button:disabled,
body:not(.login-body):not(.customer-body) .sale-row-button:disabled,
body:not(.login-body):not(.customer-body) .checkout-button:disabled {
  background: #1b2636;
  border-color: #1b2636;
  color: #6f7f94;
  opacity: 1;
}

body:not(.login-body):not(.customer-body) .danger-button {
  background: rgba(255, 75, 125, 0.12);
  border-color: rgba(255, 75, 125, 0.28);
  color: #ff9eb8;
}

body:not(.login-body):not(.customer-body) .metric::before {
  background: linear-gradient(180deg, #25cce5, #18d7a5);
}

body:not(.login-body):not(.customer-body) .chart-grid {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body:not(.login-body):not(.customer-body) .chart-panel {
  min-height: 190px;
}

body:not(.login-body):not(.customer-body) .chart-panel:nth-child(3) {
  grid-column: 1 / -1;
  min-height: 330px;
}

body:not(.login-body):not(.customer-body) .chart-list {
  gap: 14px;
}

body:not(.login-body):not(.customer-body) .chart-row {
  gap: 8px;
}

body:not(.login-body):not(.customer-body) .chart-row-header strong {
  color: #dce6f2;
}

body:not(.login-body):not(.customer-body) .chart-bar {
  background: #202c3c;
  height: 10px;
}

body:not(.login-body):not(.customer-body) .chart-bar-fill {
  background: linear-gradient(90deg, #25cce5, #18d7a5);
  box-shadow: 0 0 22px rgba(24, 215, 165, 0.16);
}

body:not(.login-body):not(.customer-body) .line-chart {
  display: grid;
  gap: 12px;
  min-height: 260px;
}

body:not(.login-body):not(.customer-body) .line-chart-meta {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

body:not(.login-body):not(.customer-body) .line-chart-meta span,
body:not(.login-body):not(.customer-body) .line-chart-axis,
body:not(.login-body):not(.customer-body) .line-chart-empty-copy span {
  color: var(--kaslio-muted);
}

body:not(.login-body):not(.customer-body) .line-chart-meta strong,
body:not(.login-body):not(.customer-body) .line-chart-empty-copy strong {
  color: #18d7a5;
}

body:not(.login-body):not(.customer-body) .line-chart svg {
  display: block;
  height: auto;
  width: 100%;
}

body:not(.login-body):not(.customer-body) .line-chart-grid {
  fill: none;
  stroke: #202c3c;
  stroke-width: 2;
}

body:not(.login-body):not(.customer-body) .line-chart-line {
  fill: none;
  stroke: #22d4bd;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
  filter: drop-shadow(0 0 10px rgba(34, 212, 189, 0.24));
}

body:not(.login-body):not(.customer-body) .line-chart-point circle {
  fill: #18d7a5;
  stroke: #07101e;
  stroke-width: 3;
}

body:not(.login-body):not(.customer-body) .line-chart-axis {
  display: flex;
  font-size: 0.82rem;
  font-weight: 800;
  justify-content: space-between;
}

body:not(.login-body):not(.customer-body) .empty-line-chart {
  position: relative;
}

body:not(.login-body):not(.customer-body) .line-chart-empty-copy {
  bottom: 18px;
  display: grid;
  gap: 4px;
  left: 24px;
  position: absolute;
}

body:not(.login-body):not(.customer-body) .cash-row,
body:not(.login-body):not(.customer-body) .cash-metric,
body:not(.login-body):not(.customer-body) .entry-mode-card,
body:not(.login-body):not(.customer-body) .ticket-summary,
body:not(.login-body):not(.customer-body) .preorder-fields,
body:not(.login-body):not(.customer-body) .cloud-state,
body:not(.login-body):not(.customer-body) .sync-diagnostics,
body:not(.login-body):not(.customer-body) .payment-totals div,
body:not(.login-body):not(.customer-body) .dashboard-card,
body:not(.login-body):not(.customer-body) .editor-subsection,
body:not(.login-body):not(.customer-body) .payment-method-row,
body:not(.login-body):not(.customer-body) .seller-stat-row,
body:not(.login-body):not(.customer-body) .category-row,
body:not(.login-body):not(.customer-body) .sale-row,
body:not(.login-body):not(.customer-body) .audit-row,
body:not(.login-body):not(.customer-body) .total-row {
  background: var(--kaslio-panel-soft);
  border-color: var(--kaslio-line);
  color: #dce6f2;
}

body:not(.login-body):not(.customer-body) .cash-row {
  grid-template-columns: minmax(110px, 0.7fr) minmax(180px, 1fr) minmax(90px, auto);
}

body:not(.login-body):not(.customer-body) .toggle-slider {
  background: #263449;
}

body:not(.login-body):not(.customer-body) .toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(100deg, #25cce5, #18d7a5);
}

body:not(.login-body):not(.customer-body) .payment-method-row button,
body:not(.login-body):not(.customer-body) .danger {
  color: #ff9eb8;
}

@media (max-width: 1180px) {
  body:not(.login-body):not(.customer-body) .chart-grid {
    grid-template-columns: 1fr;
  }

  body:not(.login-body):not(.customer-body) .chart-panel:nth-child(3) {
    grid-column: auto;
  }
}

/* Touch-first kassa redesign */
body:not(.login-body):not(.customer-body) .products-panel .catalog-tabs {
  gap: 10px;
}

body:not(.login-body):not(.customer-body) .products-panel .catalog-tab,
body:not(.login-body):not(.customer-body) .products-panel .sort-chip,
body:not(.login-body):not(.customer-body) .products-panel .secondary-button {
  min-height: 48px;
}

body:not(.login-body):not(.customer-body) .products-panel .product-button {
  align-content: space-between;
  border-radius: 12px;
  min-height: 132px;
  padding: 18px;
}

body:not(.login-body):not(.customer-body) .products-panel .product-name {
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.18;
}

body:not(.login-body):not(.customer-body) .products-panel .product-price {
  font-size: clamp(1.45rem, 1.7vw, 1.8rem);
}

@media (min-width: 981px) and (max-width: 1380px) {
  body:not(.login-body):not(.customer-body) .register-layout {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 370px);
  }

  body:not(.login-body):not(.customer-body) .products-panel {
    padding: 22px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body:not(.login-body):not(.customer-body) .receipt-panel {
    position: sticky;
    top: 142px;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  body:not(.login-body):not(.customer-body) .app-shell {
    padding-bottom: 22px;
  }

  body:not(.login-body):not(.customer-body) .topbar {
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px 18px;
  }

  body:not(.login-body):not(.customer-body) .brand-block {
    align-items: center;
    flex-direction: row;
  }

  body:not(.login-body):not(.customer-body) .brand-logo {
    width: 150px;
  }

  body:not(.login-body):not(.customer-body) .topbar h1 {
    font-size: 1.45rem;
  }

  body:not(.login-body):not(.customer-body) .topbar-actions {
    background: #0b111b;
    border: 1px solid var(--kaslio-line);
    border-radius: 14px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 6px;
    width: 100%;
  }

  body:not(.login-body):not(.customer-body) .tab {
    justify-content: center;
    min-height: 48px;
    min-width: 0;
    padding: 0 10px;
    text-align: center;
  }

  body:not(.login-body):not(.customer-body) .register-layout {
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) 320px;
    padding-left: 18px;
    padding-right: 18px;
    padding-top: 0;
  }

  body:not(.login-body):not(.customer-body) .products-panel {
    border-radius: 14px;
    gap: 16px;
    padding: 18px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-toolbar,
  body:not(.login-body):not(.customer-body) .products-panel .catalog-actions {
    gap: 12px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-tab {
    justify-content: center;
    min-width: 0;
    padding: 0 10px;
    width: 100%;
  }

  body:not(.login-body):not(.customer-body) .products-panel .sort-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-self: stretch;
    padding: 5px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .sort-chip {
    justify-content: center;
    min-width: 0;
    padding: 0 8px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .quick-sale-toolbar {
    gap: 10px;
    padding: 12px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-grid {
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-button {
    min-height: 124px;
    padding: 16px;
  }

  body:not(.login-body):not(.customer-body) .receipt-panel {
    border-radius: 14px;
    max-height: calc(100dvh - 190px);
    overflow: auto;
    padding: 18px;
    position: sticky;
    top: 18px;
  }

  body:not(.login-body):not(.customer-body) .receipt-header h2 {
    font-size: 2rem;
  }

  body:not(.login-body):not(.customer-body) .entry-mode-card {
    padding: 12px;
  }

  body:not(.login-body):not(.customer-body) .split-payment-fields,
  body:not(.login-body):not(.customer-body) .discount-fields {
    grid-template-columns: 1fr;
  }
}


/* Final tablet/mobile POS layout */
body:not(.login-body):not(.customer-body) .mobile-pos-checkout {
  display: none;
}

body:not(.login-body):not(.customer-body) .mobile-receipt-backdrop {
  display: none;
}

body:not(.login-body):not(.customer-body) .catalog-icon {
  align-items: center;
  background: rgba(37, 204, 229, 0.16);
  border-radius: 999px;
  color: #25cce5;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  width: 22px;
}

body:not(.login-body):not(.customer-body) .catalog-short {
  display: none;
}

@media (max-width: 980px) {
  body:not(.login-body):not(.customer-body) .topbar {
    background: #07101e;
    border-bottom: 1px solid #202c3c;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px 14px;
  }

  body:not(.login-body):not(.customer-body) .brand-block {
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  body:not(.login-body):not(.customer-body) .brand-logo {
    height: 38px;
    width: 132px;
  }

  body:not(.login-body):not(.customer-body) .brand-copy .eyebrow {
    display: none;
  }

  body:not(.login-body):not(.customer-body) .topbar h1 {
    color: #ffffff;
    font-size: 1.28rem;
  }

  body:not(.login-body):not(.customer-body) .topbar-actions {
    background: #07101e;
    border: 1px solid #202c3c;
    border-radius: 18px 18px 0 0;
    bottom: 0;
    box-shadow: 0 -18px 45px rgba(0, 0, 0, 0.38);
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    left: 0;
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    top: auto;
    width: auto;
    z-index: 110;
  }

  body:not(.login-body):not(.customer-body) .tab {
    align-items: center;
    border-radius: 12px;
    display: grid;
    font-size: 0.76rem;
    gap: 3px;
    justify-items: center;
    min-height: 52px;
    min-width: 0;
    padding: 4px 2px;
    text-align: center;
  }

  body:not(.login-body):not(.customer-body) .tab::before {
    color: currentColor;
    font-size: 1.06rem;
    line-height: 1;
  }

  body:not(.login-body):not(.customer-body) .tab[data-tab="register"]::before { content: "▣"; }
  body:not(.login-body):not(.customer-body) .tab[data-tab="overview"]::before { content: "▥"; }
  body:not(.login-body):not(.customer-body) .tab[data-tab="cash"]::before { content: "▤"; }
  body:not(.login-body):not(.customer-body) .tab[data-tab="shift"]::before { content: "♙"; }
  body:not(.login-body):not(.customer-body) .tab[data-tab="settings"]::before { content: "⚙"; }

  body:not(.login-body):not(.customer-body) .tab.active {
    background: rgba(37, 204, 229, 0.12);
    color: #25cce5;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  body:not(.login-body):not(.customer-body) .app-shell {
    padding-bottom: 78px;
  }

  body:not(.login-body):not(.customer-body) .register-layout {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) 330px;
    padding: 0 14px 86px;
  }

  body:not(.login-body):not(.customer-body) .products-panel {
    background: #101824 !important;
    border-color: #202c3c !important;
    gap: 14px;
    padding: 16px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body:not(.login-body):not(.customer-body) .products-panel .quick-sale-toolbar {
    grid-template-columns: minmax(0, 1fr) 160px 150px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-grid {
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-button {
    min-height: 122px;
  }

  body:not(.login-body):not(.customer-body) .receipt-panel {
    background: #07101e !important;
    border-color: #202c3c !important;
    max-height: calc(100dvh - 150px);
    overflow: auto;
    position: sticky;
    top: 12px;
  }
}

@media (max-width: 760px) {
  html,
  body:not(.login-body):not(.customer-body) {
    --kaslio-mobile-checkout-height: 86px;
    --kaslio-mobile-nav-height: 78px;
    max-width: 100%;
    overflow-x: hidden;
  }

  body:not(.login-body):not(.customer-body) .app-shell {
    padding-bottom: 138px;
  }

  body:not(.login-body):not(.customer-body) .promo-bar {
    height: 24px;
    min-height: 24px;
  }

  body:not(.login-body):not(.customer-body) .topbar {
    padding: 10px 12px;
  }

  body:not(.login-body):not(.customer-body) .topbar-side {
    display: block;
    width: 0;
  }

  body:not(.login-body):not(.customer-body) .sync-indicator {
    display: none;
  }

  body:not(.login-body):not(.customer-body) .brand-logo {
    height: 34px;
    width: 114px;
  }

  body:not(.login-body):not(.customer-body) .topbar h1 {
    font-size: 1rem;
  }

  body:not(.login-body):not(.customer-body) .header-links {
    display: none;
  }

  body:not(.login-body):not(.customer-body) .register-layout {
    display: block !important;
    padding: 0 10px 138px;
  }

  body:not(.login-body):not(.customer-body) .overview-layout,
  body:not(.login-body):not(.customer-body) .cash-layout,
  body:not(.login-body):not(.customer-body) .settings-layout,
  body:not(.login-body):not(.customer-body) .shift-layout {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    padding-left: 10px;
    padding-right: 10px;
    width: 100%;
  }

  body:not(.login-body):not(.customer-body) .cash-layout > *,
  body:not(.login-body):not(.customer-body) .cash-panel,
  body:not(.login-body):not(.customer-body) .cash-grid {
    max-width: 100%;
    min-width: 0;
  }

  body:not(.login-body):not(.customer-body) .cash-row {
    box-sizing: border-box;
    gap: 8px;
    grid-template-columns: minmax(72px, 0.8fr) minmax(88px, 1fr) minmax(72px, auto);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }

  body:not(.login-body):not(.customer-body) .cash-row > * {
    min-width: 0;
  }

  body:not(.login-body):not(.customer-body) .cash-row input {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
  }

  body:not(.login-body):not(.customer-body) .cash-row strong {
    font-size: 0.98rem;
    text-align: right;
    white-space: nowrap;
  }

  body:not(.login-body):not(.customer-body) .products-panel {
    background: #101824 !important;
    border: 1px solid #202c3c !important;
    border-radius: 14px;
    display: grid;
    gap: 12px;
    padding: 10px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-toolbar,
  body:not(.login-body):not(.customer-body) .products-panel .catalog-actions {
    gap: 8px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-tabs {
    background: transparent !important;
    border: 0;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-tab {
    align-items: center;
    background: #0b111b !important;
    border: 1px solid #263449 !important;
    border-radius: 11px;
    color: #dce6f2 !important;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 900;
    gap: 5px;
    justify-content: center;
    min-height: 46px;
    overflow: hidden;
    padding: 0 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-tab.active {
    background: rgba(37, 204, 229, 0.12) !important;
    border-color: #25cce5 !important;
    box-shadow: inset 0 0 0 1px rgba(37, 204, 229, 0.18);
    color: #25cce5 !important;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-icon {
    height: 20px;
    width: 20px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-label {
    display: none;
  }

  body:not(.login-body):not(.customer-body) .products-panel .catalog-short {
    display: inline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.login-body):not(.customer-body) .products-panel .quick-sale-toolbar {
    background: transparent !important;
    border: 0 !important;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 86px 52px 52px;
    padding: 0;
  }

  body:not(.login-body):not(.customer-body) .products-panel .quick-sale-toolbar .field {
    min-width: 0;
  }

  body:not(.login-body):not(.customer-body) .products-panel .quick-sale-toolbar .field span {
    display: none;
  }

  body:not(.login-body):not(.customer-body) .products-panel .field input,
  body:not(.login-body):not(.customer-body) .products-panel .field select,
  body:not(.login-body):not(.customer-body) .products-panel .secondary-button {
    background: #0b111b !important;
    border: 1px solid #263449 !important;
    border-radius: 11px;
    color: #dce6f2 !important;
    min-height: 44px;
  }


  body:not(.login-body):not(.customer-body) .products-panel .field input {
    font-size: 0.92rem;
    padding-left: 12px;
    padding-right: 12px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .quick-sale-toolbar .field:nth-child(2) {
    position: relative;
  }

  body:not(.login-body):not(.customer-body) .products-panel #barcode-scan {
    font-size: 0;
    padding: 0;
  }

  body:not(.login-body):not(.customer-body) .products-panel .quick-sale-toolbar .field:nth-child(2)::before {
    align-items: center;
    background: #0b111b;
    border: 1px solid #263449;
    border-radius: 11px;
    color: #dce6f2;
    content: "Scan";
    display: flex;
    font-size: 0.8rem;
    font-weight: 900;
    inset: 0;
    justify-content: center;
    pointer-events: none;
    position: absolute;
  }

  body:not(.login-body):not(.customer-body) .products-panel #repeat-last-sale,
  body:not(.login-body):not(.customer-body) .products-panel #toggle-favorites {
    font-size: 0;
    min-width: 0;
    padding: 0;
  }

  body:not(.login-body):not(.customer-body) .products-panel #repeat-last-sale::before {
    content: "\21bb";
    font-size: 1.15rem;
  }

  body:not(.login-body):not(.customer-body) .products-panel #toggle-favorites::before {
    content: "\2606";
    font-size: 1.15rem;
  }


  body:not(.login-body):not(.customer-body) .products-panel .sort-strip {
    display: none;
  }

  body:not(.login-body):not(.customer-body) .products-panel .group-title {
    margin: 6px 0 0;
  }

  body:not(.login-body):not(.customer-body) .products-panel .group-title h2 {
    display: none;
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-grid {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-button {
    background: linear-gradient(180deg, #101824, #0b111b) !important;
    border: 1px solid #263449 !important;
    border-radius: 10px;
    color: #ffffff !important;
    min-height: 92px;
    padding: 10px;
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-name {
    color: #ffffff !important;
    font-size: 0.82rem;
  }

  body:not(.login-body):not(.customer-body) .products-panel .product-price {
    color: #ffffff !important;
    font-size: 1.05rem;
  }

  body:not(.login-body):not(.customer-body) .receipt-panel {
    display: none !important;
  }

  body:not(.login-body):not(.customer-body) .mobile-pos-checkout {
    align-items: center;
    background: #07101e;
    border: 1px solid #263449;
    border-radius: 16px 16px 0 0;
    bottom: auto;
    box-sizing: border-box;
    box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.38);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    height: var(--kaslio-mobile-checkout-height);
    left: 0;
    padding: 10px 12px;
    position: fixed;
    right: 0;
    top: calc(var(--kaslio-vv-top, 0px) + var(--kaslio-vv-height, 100dvh) - var(--kaslio-mobile-nav-height) - var(--kaslio-mobile-checkout-height));
    z-index: 70;
  }

  body:not(.login-body):not(.customer-body) .mobile-pos-total {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  body:not(.login-body):not(.customer-body) .mobile-pos-total strong {
    color: #ffffff;
    font-size: 1.45rem;
    line-height: 1;
  }

  body:not(.login-body):not(.customer-body) .mobile-pos-total span {
    color: #8ea0b6;
    font-size: 0.8rem;
    font-weight: 800;
  }

  body:not(.login-body):not(.customer-body) .mobile-pos-checkout .checkout-button {
    margin: 0;
    min-height: 50px;
    min-width: 118px;
    padding: 0 14px;
  }

  body:not(.login-body):not(.customer-body) .mobile-pos-checkout .checkout-button[data-empty="true"] {
    background: #1b293b !important;
    color: #91a0b4 !important;
  }

  body:not(.login-body):not(.customer-body) .mobile-pos-checkout {
    cursor: pointer;
  }

  body:not(.login-body):not(.customer-body):not([data-active-view="register"]) .mobile-pos-checkout {
    display: none !important;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open {
    overflow: hidden;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .mobile-receipt-backdrop {
    background: rgba(1, 7, 15, 0.72);
    display: block;
    inset: 0;
    position: fixed;
    z-index: 86;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .receipt-panel {
    background: linear-gradient(180deg, #0b1422 0%, #07101e 100%) !important;
    border: 1px solid #263449 !important;
    border-radius: 20px 20px 0 0;
    bottom: 0;
    box-shadow: 0 -22px 58px rgba(0, 0, 0, 0.55);
    display: grid !important;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) !important;
    left: 0;
    margin: 0;
    max-height: min(84dvh, 720px);
    max-width: none;
    overflow: auto;
    padding: 16px 14px calc(92px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    top: auto !important;
    width: auto;
    z-index: 92;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .receipt-header {
    align-items: center;
    display: grid !important;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: space-between;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .receipt-header h2 {
    font-size: 2rem;
    line-height: 1;
    white-space: nowrap;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open #clear-ticket {
    display: inline-flex !important;
    min-height: 44px;
    min-width: 96px;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .entry-mode-card {
    display: grid !important;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .entry-mode-copy {
    min-width: 0;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .entry-mode-tabs {
    width: 100%;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .receipt-lines {
    display: block !important;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .ticket-summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .receipt-panel .field {
    display: grid !important;
    gap: 7px;
    min-width: 0;
    width: 100%;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .split-payment-fields,
  body:not(.login-body):not(.customer-body).mobile-receipt-open .discount-fields {
    display: grid !important;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .receipt-panel .field input,
  body:not(.login-body):not(.customer-body).mobile-receipt-open .receipt-panel .field select {
    min-height: 48px;
    width: 100%;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .preorder-toggle {
    display: flex !important;
    gap: 12px;
    justify-content: space-between;
    width: 100%;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .receipt-panel .checkout-button {
    min-height: 56px;
    width: 100%;
  }
}

@media (max-width: 430px) {
  body:not(.login-body):not(.customer-body).mobile-receipt-open .receipt-panel {
    inset-inline: 0;
    max-height: 82dvh;
    padding-inline: 12px;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open .receipt-header h2 {
    font-size: 1.75rem;
  }

  body:not(.login-body):not(.customer-body).mobile-receipt-open #clear-ticket {
    min-width: 86px;
    padding-inline: 12px;
  }
}

@media (max-width: 980px) {
  body:not(.login-body):not(.customer-body) .view:not(.active) {
    display: none !important;
  }

  body:not(.login-body):not(.customer-body) .view.active {
    display: grid !important;
  }

  body:not(.login-body):not(.customer-body) .topbar-actions {
    bottom: auto !important;
    box-sizing: border-box;
    height: var(--kaslio-mobile-nav-height);
    left: 0 !important;
    right: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    margin: 0 !important;
    position: fixed !important;
    top: calc(var(--kaslio-vv-top, 0px) + var(--kaslio-vv-height, 100dvh) - var(--kaslio-mobile-nav-height)) !important;
    transform: translate3d(0, 0, 0);
    width: auto !important;
    z-index: 130 !important;
  }

  body:not(.login-body):not(.customer-body):not([data-active-view="register"]) .app-shell {
    min-height: 100dvh;
    padding-bottom: calc(132px + env(safe-area-inset-bottom)) !important;
  }

  body:not(.login-body):not(.customer-body):not([data-active-view="register"]) .view.active {
    padding-bottom: calc(132px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 760px) {
  body:not(.login-body):not(.customer-body) .register-layout.view.active {
    display: block !important;
  }

  body:not(.login-body):not(.customer-body) .register-layout.view:not(.active) {
    display: none !important;
  }
}
