/* Shared red, white and neutral screen theme. Product artwork and print styles remain independent. */
@media screen {
  :root {
    --ink: #202024 !important;
    --muted: #6c6c74 !important;
    --line: #dfdfe4 !important;
    --paper: rgba(255, 255, 255, .94) !important;
    --bg: #f7f7f9 !important;
    --red: #d00000 !important;
    --red-dark: #780000 !important;
    --royal: #d00000 !important;
    --accent-purple: #d00000 !important;
    --accent-cyan: #ff3939 !important;
    --shadow: 0 18px 46px #2d121218 !important;
  }

  html { min-height: 100%; }

  body:not(.login-page) {
    position: relative;
    isolation: isolate;
    background-color: #fff !important;
    background-image: none !important;
    color: var(--ink) !important;
  }

  body:not(.login-page)::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background: url("https://smarthell.sk/pallet-background.jpg") center center / cover no-repeat;
    opacity: 1;
  }

  .wrap,
  .shell,
  .assortment-page-root,
  .catalog-page-root {
    background-color: rgba(255, 255, 255, .92) !important;
    border-color: rgba(255, 255, 255, .88) !important;
    box-shadow: 0 20px 55px #2d121218 !important;
    backdrop-filter: blur(5px);
  }

  .settings,
  .stage,
  .panel,
  .choice,
  .assortment-brand,
  .catalog-page-root .saved-dialog-head {
    color: var(--ink) !important;
    background-color: rgba(255, 255, 255, .95) !important;
    border-color: var(--line) !important;
    box-shadow: 0 12px 32px #2d12120d !important;
  }

  .panel-title,
  .stage-head h2,
  .top h1,
  .brand h1,
  .intro h2,
  .assortment-header h1,
  .assortment-brand-head h2 {
    color: var(--ink) !important;
  }

  .eyebrow,
  .assortment-kicker,
  .open,
  .choice .open,
  .choice.regal .open,
  .choice.fridge .open,
  .choice.pallet .open,
  .choice.assortment .open,
  .assortment-photo-link {
    color: var(--royal) !important;
  }

  .assortment-page-root .assortment-photo-link {
    color: #0066cc !important;
  }

  .assortment-product-code-value.internal-code {
    font-weight: 800 !important;
  }

  .assortment-product-flag.icetea,
  .assortment-product-flag.csd,
  .assortment-product-flag.lemonade {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    padding: 5px 8px;
    border-radius: 4px;
    text-align: center;
  }

  .button.primary,
  .top-actions .button.primary,
  .assortment-page-root .button.primary {
    color: #fff !important;
    background: #d00000 !important;
    border-color: transparent !important;
    box-shadow: 0 7px 18px #d0000026 !important;
  }

  .button.primary:hover,
  .button.primary:focus-visible {
    background: #b80000 !important;
  }

  .button:not(.primary),
  .logout,
  .choice {
    border-color: var(--line) !important;
  }

  .button:not(.primary):hover,
  .logout:hover {
    border-color: #e6aaaa !important;
    background-color: #fff0f0 !important;
  }

  .field input:focus,
  .field select:focus,
  input:focus-visible,
  select:focus-visible {
    border-color: #d00000 !important;
    box-shadow: 0 0 0 3px #d0000020 !important;
    outline: none;
  }

  .stat,
  .assortment-brand-count,
  .assortment-brand-badge {
    color: var(--muted) !important;
    background-color: #f7f7f9 !important;
    border-color: var(--line) !important;
  }

  .stat b,
  .assortment-product-code-value {
    color: var(--ink) !important;
  }

  .canvas-wrap,
  .assortment-preview,
  .assortment-product-image {
    background-color: #f7f7f9 !important;
    border-color: var(--line) !important;
  }

  .product.active {
    background: #fff1f1 !important;
    border-color: #eba5a5 !important;
  }

  .choice:hover {
    box-shadow: 0 18px 40px #2d121220 !important;
  }

  .assortment-product,
  .product,
  .shelf-card,
  .saved-item {
    background-color: rgba(255, 255, 255, .88) !important;
    border-color: var(--line) !important;
  }

  .assortment-product-code,
  .catalog-page-root .catalog-table-wrap,
  .pallet-summary th {
    border-color: var(--line) !important;
  }

  .pallet-preview,
  .pallet-preview:before {
    /* Keep product and pallet artwork unchanged; only the surrounding UI is themed. */
  }

  .pallet-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .pallet-home-logo {
    display: inline-flex;
    flex: none;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 0;
  }

  .pallet-logo {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
  }

  .pallet-brand-copy { min-width: 0; }

  /* Keep the new artwork visible through the landing page surfaces. */
  .shell { background-color: rgba(255, 255, 255, .92) !important; }
  .choice { background-color: rgba(255, 255, 255, .88) !important; }

  .pallet-eyebrow {
    color: var(--royal);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  .top .pallet-brand h1 { margin: 3px 0 0; text-align: left; }

  @media (max-width: 700px) {
    .pallet-brand { width: 100%; }
    .pallet-logo { width: 46px; height: 46px; }
    .top .pallet-brand h1 { font-size: 21px; text-align: left; }

    body:not(.login-page)::before {
      background-position: center top;
      background-size: 100% auto;
      background-repeat: repeat-y;
    }
  }

  :root { --red-soft: #fff0f0; --red-deep: #650000; --surface: #f7f7f9; --blue: #d00000; }
  body { color: var(--ink) !important; }
  .card, .view, .shelf-card, .share-chart-section, .fridge-share-chart, .display-share-chart,
  .half-config, .half-pallet-summary, .public-lock .assortment-shell {
    color: var(--ink); border-color: var(--line) !important;
  }
  .card, .shelf-card, .share-chart-section, .fridge-share-chart, .display-share-chart, .half-config {
    background-color: #f7f7f9 !important;
  }
  .view, .pallet-summary, .table-wrap, dialog, .saved-dialog-head { background-color: #fff !important; }
  .field label, .muted, .hint, .sub, .backup-meta, .product-meta { color: var(--muted) !important; }
  h1, h2, h3, .product-name, .fridge-share-chart-label, .display-share-chart-label,
  .fridge-share-chart-value, .display-share-chart-value { color: var(--ink) !important; }
  input, select, textarea { color: var(--ink); border-color: var(--line); accent-color: #d00000; }
  input[type="checkbox"], input[type="radio"] { accent-color: #d00000 !important; }
  .notice, .math-question { background-color: #fff0f0 !important; border-color: #f0cccc !important; color: #650000 !important; }
  .stats .stat:first-child { background-color: #d00000 !important; border-color: #d00000 !important; color: #fff !important; }
  .stats .stat:first-child b { color: #fff !important; }
  .pallet-barcode, .pallet-summary th, .catalog-toolbar, .catalog-table thead, .table-wrap th { background-color: #f7f7f9 !important; }
  .pallet-share-track, .share-chart-track, .fridge-share-chart-track, .display-share-chart-track { background-color: #e9e7e8 !important; }
  .pallet-share-bar, .share-chart-bar, .fridge-share-chart-bar, .display-share-chart-bar { background: #d00000 !important; }
  .form button, .permissions-form button[type="submit"], .card form>button:not(.danger),
  .public-lock-row button, .login-page .button {
    background: #d00000 !important; border-color: #d00000 !important; color: #fff !important;
    box-shadow: 0 5px 14px #d0000024 !important;
  }
  .form button:hover, .permissions-form button[type="submit"]:hover, .card form>button:not(.danger):hover,
  .public-lock-row button:hover, .login-page .button:hover { background: #b80000 !important; border-color: #b80000 !important; }
  button.danger, .card form>button.danger { color: #780000 !important; background: #fff0f0 !important; box-shadow: none !important; }
  .login-page .card { color: var(--ink); background: rgba(255,255,255,.96) !important; border-color: #fff !important; }
  .login-page .motion-toggle { background: #650000d9; border-color: #ffffff65; }
  .login-page .motion-toggle:hover { background: #650000; }
  :focus-visible { outline-color: #d00000; }
}
