/*
 * Hallmark · pre-emit critique: P5 H5 E5 S5 R4 V5
 * Hallmark · macrostructure: Workbench · nav: side rail · theme: Cobalt
 * Audience: comercios y operadores · use: administrar códigos · tone: technical
 */

:root,
[data-theme="cobalt"] {
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-label: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --color-paper: oklch(98.5% 0.004 250);
  --color-paper-2: oklch(96.5% 0.005 252);
  --color-paper-3: oklch(94% 0.006 254);
  --color-rule: oklch(91% 0.008 255);
  --color-rule-2: oklch(83% 0.011 255);
  --color-cobalt-muted: oklch(56% 0.013 255);
  --color-muted: #646a70;
  --color-neutral: oklch(46% 0.015 255);
  --color-ink-2: oklch(34% 0.018 257);
  --color-ink: oklch(24% 0.02 258);
  --color-cobalt-accent: oklch(58% 0.2 256);
  --color-accent: #0064cc;
  --color-accent-hover: #005abb;
  --color-accent-soft: oklch(95% 0.025 256);
  --color-accent-ink: oklch(99% 0.004 256);
  --color-focus: oklch(58% 0.2 256);
  --color-graphite: oklch(24% 0.018 260);
  --color-graphite-2: oklch(29% 0.022 258);
  --color-white: oklch(100% 0 0);
  --color-danger: oklch(54% 0.2 27);
  --color-danger-soft: oklch(96% 0.025 27);
  --color-success: oklch(55% 0.14 156);
  --color-whatsapp: #087c38;

  --brand: var(--color-accent);
  --brand-rgb: 0 100 204;
  --ink: var(--color-ink);
  --text: var(--color-ink-2);
  --muted: var(--color-muted);
  --soft: var(--color-paper-2);
  --page: var(--color-paper);
  --surface: var(--color-white);
  --line: var(--color-rule);
  --line-strong: var(--color-rule-2);
  --danger: var(--color-danger);
  --danger-soft: var(--color-danger-soft);
  --shadow-sm: 0 1px 2px oklch(24% 0.02 258 / 0.05);
  --shadow-md: 0 18px 42px -24px oklch(24% 0.02 258 / 0.28);
  --radius: 10px;
  --radius-control: 6px;
}

html,
body {
  overflow-x: clip;
}

html {
  background: var(--color-paper);
  color-scheme: light;
}

body {
  color: var(--color-ink-2);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.58;
}

button,
input,
textarea,
select {
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
.brand b,
.brand small,
.topbar-name b,
.wallet-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
}

::selection {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-focus) 28%, transparent);
  outline-offset: 2px;
}

.eyebrow,
.auth-kicker,
.page-heading small,
.panel-head small,
.form-section-title,
.wallet-card-kicker,
.public-detail-kicker,
.public-card-history header small,
.card-manager-header small,
.post-modal-header small,
.balance-modal-panel header small,
.admin-tabs button {
  font-family: var(--font-label);
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.brand {
  gap: 11px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  gap: 3px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-control);
  background: var(--color-accent);
  padding: 8px;
  box-shadow: none;
}

.brand-mark i {
  border-radius: 1px;
  background: var(--color-accent-ink);
}

.brand b,
.brand small {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.brand small {
  color: var(--color-accent);
}

.primary-button,
.secondary-button,
.whatsapp-button,
.google-button,
.hero-primary,
.hero-secondary,
.dark-button,
.outline-button {
  min-height: 46px;
  border-radius: var(--radius-control);
  padding: 0 17px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition:
    border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.primary-button,
.hero-primary,
.dark-button {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.primary-button:hover:not(:disabled),
.hero-primary:hover:not(:disabled),
.dark-button:hover:not(:disabled) {
  border-color: var(--color-accent-hover);
  background: var(--color-accent-hover);
  box-shadow: none;
  transform: translateY(-1px);
}

.secondary-button,
.hero-secondary,
.outline-button,
.google-button {
  border-color: var(--color-rule-2);
  background: var(--color-white);
  color: var(--color-ink-2);
}

.secondary-button:hover:not(:disabled),
.hero-secondary:hover:not(:disabled),
.outline-button:hover:not(:disabled),
.google-button:hover:not(:disabled) {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  box-shadow: none;
  transform: translateY(-1px);
}

.whatsapp-button {
  border-color: var(--color-whatsapp);
  background: var(--color-whatsapp);
  color: var(--color-white);
}

.whatsapp-button:hover:not(:disabled) {
  border-color: var(--color-whatsapp);
  background: var(--color-whatsapp);
  box-shadow: none;
  transform: translateY(-1px);
}

.icon-button {
  width: 42px;
  height: 42px;
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
  color: var(--color-ink-2);
}

/* Access */
.access-v2.access-body {
  background: var(--color-white);
}

.access-v2 .access-page {
  grid-template-columns: minmax(540px, 1.14fr) minmax(430px, 0.86fr);
}

.access-intro {
  isolation: isolate;
  background: var(--color-paper-2);
  padding: 28px clamp(34px, 5vw, 74px) 26px;
}

.access-intro::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-rule) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  opacity: 0.58;
  pointer-events: none;
  z-index: -2;
}

.access-intro::after {
  top: 0;
  right: 0;
  bottom: auto;
  width: 44%;
  height: 4px;
  border: 0;
  border-radius: 0;
  background: var(--color-accent);
  content: "";
  z-index: -1;
}

.access-brandbar,
.access-intro-copy,
.access-intro-footer {
  position: relative;
  z-index: 1;
}

.access-v2 .free-pill {
  min-height: 34px;
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
  color: var(--color-neutral);
  padding: 0 11px;
  font-family: var(--font-label);
  font-size: 10px;
}

.access-v2 .free-pill i,
.preview-status i {
  border-radius: 1px;
  background: var(--color-accent);
}

.access-intro-copy {
  width: min(760px, 100%);
  padding: 48px 0 34px;
}

.access-v2 .eyebrow {
  color: var(--color-accent);
  font-size: 11px;
}

.access-v2 .eyebrow i {
  width: 18px;
  height: 2px;
  border-radius: 0;
  background: var(--color-accent);
}

.access-intro-copy h1 {
  max-width: 740px;
  margin: 20px 0 17px;
  color: var(--color-ink);
  font-size: clamp(50px, 5.1vw, 74px);
  font-weight: 550;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.access-intro-copy > p {
  max-width: 620px;
  color: var(--color-neutral);
  font-size: 16px;
  line-height: 1.7;
}

.access-benefits {
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid var(--color-rule-2);
  border-bottom: 1px solid var(--color-rule-2);
}

.access-benefits > span {
  min-height: 78px;
  align-content: center;
  border-left: 0;
  border-right: 1px solid var(--color-rule-2);
  padding: 12px 14px;
}

.access-benefits > span:last-child {
  border-right: 0;
}

.access-benefits svg {
  color: var(--color-accent);
}

.access-benefits b {
  color: var(--color-ink);
  font-size: 12px;
}

.access-benefits small {
  color: var(--color-muted);
  font-size: 10px;
}

.access-workspace-preview {
  max-width: 700px;
  margin-top: 28px;
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
}

.preview-topbar {
  height: 52px;
  border-color: var(--color-rule);
  padding: 0 17px;
}

.preview-topbar b {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 12px;
}

.preview-topbar svg,
.preview-scan-card > svg {
  color: var(--color-accent);
}

.preview-status {
  color: var(--color-muted);
  font-family: var(--font-label);
  font-size: 9px;
}

.preview-grid {
  grid-template-columns: 0.9fr 1.1fr;
  background: var(--color-paper-2);
  padding: 13px;
}

.preview-scan-card,
.preview-community-card {
  border-color: var(--color-rule);
  border-radius: var(--radius-control);
  background: var(--color-white);
}

.preview-scan-card {
  padding: 15px;
}

.preview-scan-card > span {
  border-radius: var(--radius-control);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.preview-scan-card small {
  color: var(--color-muted);
  font-family: var(--font-label);
  font-size: 9px;
}

.preview-scan-card b {
  color: var(--color-ink);
  font-family: var(--font-label);
  font-size: 12px;
}

.preview-scan-card p {
  color: var(--color-muted);
  font-size: 10px;
}

.preview-community-card header > span {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.preview-community-card header b,
.preview-community-card footer b {
  color: var(--color-ink);
}

.preview-community-card header small,
.preview-community-card footer span {
  color: var(--color-muted);
}

.preview-community-card footer span:first-child {
  color: var(--color-muted);
}

.preview-community-card > p {
  color: var(--color-ink-2);
  font-size: 10.5px;
}

.preview-community-card footer {
  grid-template-columns: auto 1fr;
  border-color: var(--color-rule);
}

.preview-community-card footer b {
  justify-self: end;
}

.access-intro-footer {
  color: var(--color-muted);
  font-size: 10px;
}

.access-intro-footer svg {
  color: var(--color-accent);
}

.access-auth-pane {
  background: var(--color-white);
  padding: 42px clamp(34px, 5vw, 78px);
}

.auth-panel {
  width: min(470px, 100%);
}

.auth-kicker {
  color: var(--color-accent);
  font-size: 10px;
}

.auth-panel > h2 {
  margin: 13px 0 7px;
  color: var(--color-ink);
  font-size: 36px;
  font-weight: 550;
  letter-spacing: -0.04em;
}

.auth-panel > p {
  color: var(--color-muted);
  font-size: 14px;
}

.access-v2 .auth-tabs {
  border-color: var(--color-rule-2);
}

.access-v2 .auth-tab {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
}

.access-v2 .auth-tab.is-active {
  color: var(--color-ink);
}

.access-v2 .auth-tab.is-active::after {
  background: var(--color-accent);
}

.access-v2 .auth-form label {
  color: var(--color-ink-2);
  font-size: 12px;
  font-weight: 600;
}

.access-v2 .input-wrap {
  min-height: 52px;
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
}

.access-v2 .input-wrap:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-focus) 12%, transparent);
}

.access-v2 .auth-submit,
.access-v2 .google-button {
  min-height: 50px;
  border-radius: var(--radius-control);
}

.access-security,
.auth-free-note {
  color: var(--color-muted);
}

/* Workbench */
.studio-body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: 16px;
}

.app-shell {
  grid-template-columns: 288px minmax(0, 1fr);
}

.sidebar {
  border-color: var(--color-rule);
  background: var(--color-white);
  padding: 18px 13px;
}

.sidebar-brand {
  margin: 1px 10px 17px;
}

.sidebar-close,
.sidebar-backdrop {
  display: none;
}

.sidebar-account-card {
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-paper);
  padding: 12px;
}

.sidebar-account-main {
  grid-template-columns: 42px minmax(0, 1fr);
}

.sidebar-account-main .avatar,
.avatar,
.profile-avatar,
.post-avatar,
.comment-avatar,
.home-post-avatar {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.sidebar-account-main b {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.sidebar-account-main small {
  color: var(--color-muted);
  font-family: var(--font-label);
  font-size: 9px;
}

.sidebar-account-main button {
  border-radius: var(--radius-control);
  color: var(--color-muted);
}

.sidebar-account-main button:hover {
  background: var(--color-paper-2);
  color: var(--color-accent);
}

.account-plan {
  min-height: 40px;
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
  color: var(--color-accent);
}

.account-plan:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.account-plan span {
  color: var(--color-ink-2);
  font-size: 12px;
  font-weight: 600;
}

.main-nav {
  gap: 7px;
  grid-auto-rows: max-content;
  margin-top: 13px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.nav-group {
  border-color: transparent;
  border-radius: var(--radius);
  box-shadow: none;
}

.nav-group:has(.nav-item.is-active),
.nav-group.is-open {
  border-color: var(--color-rule-2);
  background: var(--color-accent-soft);
  box-shadow: none;
}

.nav-group-title {
  min-height: 44px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-control);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  padding: 0 11px;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.055em;
  transition:
    border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-group-title:hover,
.nav-group.is-open > .nav-group-title,
.nav-group:has(.nav-item.is-active) > .nav-group-title {
  border-color: var(--color-accent-hover);
  background: var(--color-accent-hover);
  color: var(--color-accent-ink);
  box-shadow: none;
  transform: none;
}

.nav-group-title svg,
.nav-group-title:hover svg,
.nav-group.is-open > .nav-group-title svg,
.nav-group:has(.nav-item.is-active) > .nav-group-title svg {
  color: var(--color-accent-ink);
}

.nav-item {
  min-height: 44px;
  border-radius: var(--radius-control);
  color: var(--color-ink-2);
}

.nav-item:hover {
  background: var(--color-paper-3);
  color: var(--color-ink);
}

.nav-item.is-active {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  box-shadow: none;
}

.nav-item svg {
  color: var(--color-accent);
}

.nav-item span {
  font-size: 14px;
  font-weight: 550;
}

.nav-item > b {
  border-radius: var(--radius-control);
  background: var(--color-paper-3);
  color: var(--color-muted);
  font-family: var(--font-label);
}

.nav-item.is-active > b {
  background: color-mix(in srgb, var(--color-white) 18%, transparent);
  color: var(--color-accent-ink);
}

.nav-group--loyalty {
  --loyalty-orange: #c2410c;
  --loyalty-orange-hover: #9a3412;
  --loyalty-orange-soft: #fff7ed;
  --loyalty-orange-line: #fed7aa;
}

.nav-group--loyalty:has(.nav-item.is-active),
.nav-group--loyalty.is-open {
  border-color: var(--loyalty-orange-line);
  background: var(--loyalty-orange-soft);
}

.nav-group--loyalty > .nav-group-title,
.nav-group--loyalty > .nav-group-title:hover,
.nav-group--loyalty.is-open > .nav-group-title,
.nav-group--loyalty:has(.nav-item.is-active) > .nav-group-title {
  border-color: var(--loyalty-orange);
  background: var(--loyalty-orange);
  color: #fff;
}

.nav-group--loyalty > .nav-group-title:hover,
.nav-group--loyalty.is-open > .nav-group-title,
.nav-group--loyalty:has(.nav-item.is-active) > .nav-group-title {
  border-color: var(--loyalty-orange-hover);
  background: var(--loyalty-orange-hover);
}

.nav-group--loyalty > .nav-group-title svg,
.nav-group--loyalty > .nav-group-title:hover svg,
.nav-group--loyalty.is-open > .nav-group-title svg,
.nav-group--loyalty:has(.nav-item.is-active) > .nav-group-title svg {
  color: #fff;
}

.nav-group--loyalty .nav-item:hover {
  background: #ffedd5;
  color: #7c2d12;
}

.nav-group--loyalty .nav-item svg {
  color: var(--loyalty-orange);
}

.nav-group--loyalty .nav-item.is-active {
  background: var(--loyalty-orange);
  color: #fff;
}

.nav-group--loyalty .nav-item.is-active svg {
  color: #fff;
}

.sidebar-logout {
  display: flex;
  width: 100%;
  min-height: 46px;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 10px;
  margin-bottom: env(safe-area-inset-bottom, 0);
  border: 1px solid #b91c1c;
  border-radius: var(--radius-control);
  background: #c62828;
  color: #fff;
  padding: 0 14px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 7px 16px color-mix(in srgb, #991b1b 20%, transparent);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.sidebar-logout:hover {
  border-color: #991b1b;
  background: #a91f1f;
  box-shadow: 0 8px 18px color-mix(in srgb, #991b1b 28%, transparent);
}

.sidebar-logout:active {
  background: #8f1d1d;
}

.sidebar-logout:focus-visible {
  outline: 3px solid color-mix(in srgb, #dc2626 32%, transparent);
  outline-offset: 2px;
}

.sidebar-logout svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: currentColor;
  stroke-width: 2.2;
}

.desktop-topbar {
  height: 66px;
  border-bottom: 1px solid var(--color-rule);
  background: color-mix(in srgb, var(--color-white) 96%, transparent);
  color: var(--color-ink);
  padding: 0 28px;
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.topbar-name b {
  color: var(--color-ink);
  font-size: 17px;
  font-weight: 600;
}

.topbar-name small {
  color: var(--color-accent);
  font-family: var(--font-label);
  font-size: 9px;
}

.topbar-search {
  width: min(390px, 34vw);
  height: 42px;
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-paper);
}

.topbar-search:focus-within {
  border-color: var(--color-accent);
  background: var(--color-white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-focus) 10%, transparent);
}

.topbar-search input {
  color: var(--color-ink);
  font-size: 13px;
}

.topbar-search kbd {
  border-color: var(--color-rule-2);
  border-radius: 3px;
  background: var(--color-white);
  color: var(--color-muted);
  font-family: var(--font-label);
}

.topbar-icon {
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--color-ink-2);
}

.topbar-icon:hover {
  border-color: var(--color-rule-2);
  background: var(--color-paper-2);
}

.topbar-avatar {
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.desktop-topbar .notification-count {
  border-color: var(--color-white);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.workspace {
  min-height: calc(100vh - 66px);
  background: var(--color-paper);
  padding: 34px clamp(24px, 3.4vw, 50px) 72px;
}

.view {
  width: min(1460px, 100%);
  animation: cobalt-view-in 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cobalt-view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.page-heading {
  align-items: flex-end;
  margin-bottom: 22px;
}

.page-heading small,
.panel-head small,
.profile-card > span:last-child,
.google-config-card small {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 600;
}

.page-heading h1 {
  margin-top: 5px;
  color: var(--color-ink);
  font-size: clamp(34px, 3.2vw, 46px);
  font-weight: 550;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.status-pill,
.loyalty-preview-status {
  min-height: 34px;
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
  color: var(--color-neutral);
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 600;
}

.status-pill i,
.loyalty-preview-status i {
  border-radius: 1px;
  background: var(--color-accent);
}

.panel {
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-white);
  padding: 21px;
  box-shadow: var(--shadow-sm);
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head h2 {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.panel-head > svg {
  color: var(--color-accent);
}

.community-hero {
  position: relative;
  min-height: 270px;
  grid-template-columns: minmax(0, 1fr) 235px;
  border: 1px solid var(--color-graphite-2);
  border-radius: var(--radius);
  background: var(--color-graphite);
  color: var(--color-white);
  padding: clamp(30px, 4vw, 48px);
}

.community-hero::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--color-white) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--color-white) 6%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  mask-image: linear-gradient(90deg, transparent, var(--color-ink));
  pointer-events: none;
}

.community-hero > * {
  position: relative;
}

.hero-kicker {
  color: var(--color-accent);
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.community-hero h2 {
  max-width: 780px;
  margin-top: 10px;
  color: var(--color-white);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 550;
  letter-spacing: -0.05em;
  line-height: 1;
}

.community-hero p {
  color: color-mix(in srgb, var(--color-white) 72%, transparent);
  font-size: 15px;
}

.community-hero .hero-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.community-hero .hero-secondary {
  border-color: color-mix(in srgb, var(--color-white) 28%, transparent);
  background: transparent;
  color: var(--color-white);
}

.community-hero .hero-secondary:hover {
  border-color: var(--color-white);
  background: color-mix(in srgb, var(--color-white) 8%, transparent);
  color: var(--color-white);
}

.hero-code {
  border-color: color-mix(in srgb, var(--color-white) 16%, transparent);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--color-white) 5%, transparent);
}

.hero-code > svg {
  color: var(--color-accent);
}

.hero-code b {
  color: var(--color-white);
  font-family: var(--font-label);
  font-weight: 500;
}

.hero-code small {
  color: color-mix(in srgb, var(--color-white) 62%, transparent);
  font-family: var(--font-label);
}

.home-stats {
  gap: 12px;
  margin: 14px 0;
}

.home-stats article,
.loyalty-stats article,
.stats-grid article {
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.home-stats article {
  position: relative;
  min-height: 82px;
}

.home-stats article::before {
  position: absolute;
  top: -1px;
  left: 16px;
  width: 34px;
  height: 2px;
  background: var(--color-accent);
  content: "";
}

.home-stats article > span,
.loyalty-stats article > span,
.stats-grid article > span {
  border-radius: var(--radius-control);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.home-stats article b,
.loyalty-stats article b,
.stats-grid article b {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 600;
}

.home-stats article small,
.loyalty-stats article small,
.stats-grid article small {
  color: var(--color-muted);
}

.home-layout {
  gap: 14px;
}

.link-button,
.text-button {
  color: var(--color-accent);
  font-weight: 600;
}

.home-public-item,
.home-post-item,
.notification-item {
  border-color: var(--color-rule);
}

.home-public-item:hover,
.home-post-item:hover,
.notification-item:hover {
  background: var(--color-paper-2);
}

.home-public-item > span:first-child {
  border-radius: var(--radius-control);
  background: var(--color-paper-2);
}

.home-public-item b,
.home-post-item b,
.home-empty b {
  color: var(--color-ink);
}

.home-public-item small,
.home-post-item small,
.home-empty,
.home-empty small {
  color: var(--color-muted);
}

.notification-panel {
  top: 74px;
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
}

.notification-panel > header,
.notification-panel > footer,
.notification-item {
  border-color: var(--color-rule);
}

.notification-panel > header b,
.notification-item b,
.notification-empty b {
  color: var(--color-ink);
}

.notification-panel > header small,
.notification-item small,
.notification-item time,
.notification-empty {
  color: var(--color-muted);
}

.notification-panel > header button,
.notification-panel > footer {
  border-radius: var(--radius-control);
  background: var(--color-paper-2);
}

.notification-item.is-unread {
  background: var(--color-accent-soft);
}

.notification-item-icon {
  border-radius: var(--radius-control);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.notification-unread-dot {
  border-radius: 1px;
  background: var(--color-accent);
}

/* Controls, cards and data */
.stack-form {
  gap: 16px;
}

.stack-form label {
  color: var(--color-ink-2);
  font-size: 12px;
  font-weight: 600;
}

.stack-form input,
.stack-form textarea,
.stack-form select,
.search-field input,
.manual-scan input,
.balance-modal-panel input,
.balance-modal-panel textarea {
  min-height: 48px;
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
  color: var(--color-ink);
  font-size: 15px;
}

.stack-form textarea,
.balance-modal-panel textarea {
  min-height: 96px;
}

.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-focus) 10%, transparent);
}

.stack-form input:disabled {
  background: var(--color-paper-2);
  color: var(--color-muted);
}

.form-two,
.form-three {
  gap: 13px;
}

.form-section-title {
  border-color: var(--color-rule);
  color: var(--color-neutral);
  font-size: 10px;
}

.search-field,
.manual-scan > div,
.color-field {
  min-height: 48px;
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
}

.search-field:focus-within,
.manual-scan > div:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-focus) 10%, transparent);
}

.reader,
.lookup-state,
.empty-state,
.product-image-preview,
.photo-upload,
.loyalty-upload-box {
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-paper-2);
}

.reader::before {
  border-top-color: var(--color-accent);
  border-left-color: var(--color-accent);
}

.reader::after {
  border-right-color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.reader-empty > svg,
.lookup-state > span,
.empty-state > svg,
.photo-upload > svg {
  color: var(--color-accent);
}

.lookup-state > span {
  border-radius: var(--radius-control);
  background: var(--color-accent-soft);
}

.lookup-state b,
.empty-state h2,
.photo-upload b {
  color: var(--color-ink);
}

.lookup-state small,
.empty-state p,
.photo-upload small,
.scanner-message {
  color: var(--color-muted);
}

.internet-result,
.publish-toggle,
.option-row {
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-accent-soft);
}

.internet-result-item {
  border-color: var(--color-rule);
  border-radius: var(--radius-control);
  background: var(--color-white);
}

.internet-result-title > span {
  border-radius: var(--radius-control);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.internet-source {
  border-radius: var(--radius-control);
  background: var(--color-white);
  color: var(--color-accent);
}

.public-product-card,
.product-card,
.design-card,
.sign-card,
.community-post-card,
.loyalty-card-item,
.admin-content-item,
.activity-item,
.profile-card,
.google-config-card {
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.public-product-card:hover,
.product-card:hover,
.design-card:hover,
.sign-card:hover,
.community-post-card:hover,
.loyalty-card-item:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.public-product-media,
.product-card-media,
.design-card-preview,
.sign-card-preview {
  background: var(--color-paper-2);
}

.public-product-card h2,
.product-card h2,
.design-card h2,
.sign-card h2,
.community-post-card b,
.loyalty-card-item h3,
.profile-card h2 {
  color: var(--color-ink);
  font-family: var(--font-display);
}

.community-post-copy,
.community-post-text,
.post-detail-body {
  color: var(--color-ink-2);
}

.community-post-header,
.community-post-footer,
.community-post-actions,
.post-detail-actions {
  border-color: var(--color-rule);
}

.community-post-card .post-avatar,
.comment-avatar,
.profile-avatar,
.home-post-avatar {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.post-modal,
.card-manager-modal,
.balance-modal {
  background: color-mix(in srgb, var(--color-graphite) 48%, transparent);
}

.post-modal-panel,
.card-manager-panel,
.balance-modal-panel {
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
}

.post-modal-header,
.card-manager-header,
.balance-modal-panel > header {
  border-color: var(--color-rule);
}

.post-modal-header b,
.card-manager-header b,
.balance-modal-panel header b {
  color: var(--color-ink);
  font-family: var(--font-display);
}

.post-modal-header > button,
.card-manager-header > button,
.balance-modal-panel header button {
  border-radius: var(--radius-control);
  background: var(--color-paper-2);
  color: var(--color-muted);
}

.toast-region {
  right: 20px;
  bottom: 20px;
}

.toast {
  min-height: 80px;
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
}

.toast::before,
.toast-progress {
  background: var(--color-accent);
}

.toast-icon {
  border-radius: var(--radius-control);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.toast-copy strong {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

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

.toast.is-error {
  border-color: color-mix(in srgb, var(--color-danger) 28%, var(--color-rule));
}

.toast.is-error::before,
.toast.is-error .toast-progress {
  background: var(--color-danger);
}

.toast.is-error .toast-icon {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

/* Labels, signs and loyalty */
.label-stage,
.sign-stage {
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-paper-2);
}

.card-builder-steps {
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-white);
}

.card-builder-steps > span {
  color: var(--color-muted);
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
}

.card-builder-steps > span b {
  border-radius: var(--radius-control);
  background: var(--color-paper-3);
  color: var(--color-neutral);
  font-family: var(--font-label);
}

.card-builder-steps > span.is-active {
  color: var(--color-accent);
}

.card-builder-steps > span.is-active b {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.card-builder-steps > i {
  background: var(--color-rule-2);
}

.loyalty-builder-layout {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 430px);
  gap: 16px;
}

.loyalty-type-picker button,
.loyalty-template-picker button {
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
  color: var(--color-muted);
}

.loyalty-type-picker button:hover,
.loyalty-template-picker button:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.loyalty-type-picker button.is-active,
.loyalty-template-picker button.is-active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

.loyalty-type-picker button.is-active::after {
  border-radius: 1px;
  background: var(--color-accent);
}

.loyalty-type-picker b,
.loyalty-template-picker button > em {
  color: var(--color-ink);
  font-family: var(--font-display);
}

.loyalty-type-picker small {
  color: var(--color-muted);
}

.loyalty-type-picker em {
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
  color: var(--color-accent);
  font-family: var(--font-label);
}

.template-mini {
  border-radius: var(--radius-control);
  background: var(--color-accent);
}

.template-mini:not(.is-elegant):not(.is-minimal) small {
  color: var(--color-white);
}

.template-mini.is-classic i,
.template-mini.is-bold,
.template-mini.is-ticket {
  background: var(--color-graphite);
}

.template-mini.is-elegant,
.template-mini.is-minimal {
  border-color: var(--color-rule-2);
  background: var(--color-paper-2);
  color: var(--color-ink);
}

.template-mini.is-elegant small,
.template-mini.is-minimal small {
  color: var(--color-ink-2);
}

.loyalty-upload-box {
  color: var(--color-muted);
}

.loyalty-upload-box:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.loyalty-upload-box > span {
  border-radius: var(--radius-control);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.loyalty-upload-box b {
  color: var(--color-ink);
}

.color-field b {
  color: var(--color-neutral);
  font-family: var(--font-label);
}

.loyalty-phone-panel {
  top: 82px;
  padding: 20px;
}

.loyalty-preview-status {
  width: fit-content;
  margin: 0 0 13px;
  padding: 0 10px;
}

.client-preview-surface {
  overflow: hidden;
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-paper-2);
}

.client-preview-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--color-rule-2);
  background: var(--color-white);
  padding: 12px 14px;
}

.client-preview-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.client-preview-brandmark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border-radius: var(--radius-control);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.client-preview-brandmark svg {
  width: 17px;
}

.client-preview-brand > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.client-preview-brand small,
.client-preview-live {
  color: var(--color-muted);
  font-family: var(--font-label);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.client-preview-brand b {
  margin-top: 2px;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 12px;
}

.client-preview-live {
  flex: none;
  color: var(--color-accent);
}

.client-preview-surface .loyalty-wallet-preview {
  margin: 0;
  padding: 15px 14px 0;
}

.client-preview-surface .wallet-card {
  width: 100%;
  min-height: 238px;
  border-radius: 14px;
  box-shadow: 0 16px 32px -20px color-mix(in srgb, var(--color-graphite) 62%, transparent);
}

.client-preview-surface .wallet-card-header {
  grid-template-columns: 46px minmax(0, 1fr) 34px;
  padding: 17px 17px 0;
}

.client-preview-surface .wallet-card-logo {
  width: 46px;
  height: 46px;
}

.client-preview-surface .wallet-card-content {
  padding-right: 17px;
  padding-left: 17px;
}

.wallet-card-kicker,
.wallet-card-value small,
.wallet-progress > span b,
.wallet-progress > span small,
.wallet-card-footer span,
.wallet-card-footer b {
  line-height: 1.2;
}

.wallet-card-content h1,
.wallet-card-content h3 {
  flex: none;
  line-height: 1.12;
}

.wallet-card-value strong {
  line-height: 1.08;
}

.client-preview-surface .wallet-card-content h3 {
  font-size: 23px;
}

.client-preview-surface .wallet-card-value strong {
  font-size: 27px;
}

.client-preview-surface .wallet-card-footer {
  min-height: 34px;
  padding: 0 17px;
}

.loyalty-qr-sheet {
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 14px;
  margin: 14px;
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
  box-shadow: none;
}

.loyalty-qr-sheet small {
  color: var(--color-accent);
  font-family: var(--font-label);
}

.loyalty-qr-sheet b {
  color: var(--color-ink);
  font-family: var(--font-display);
}

.loyalty-qr-sheet p,
.loyalty-preview-facts small {
  color: var(--color-muted);
}

.loyalty-preview-facts {
  border-color: var(--color-rule);
}

.loyalty-preview-facts span {
  border-color: var(--color-rule);
}

.loyalty-preview-facts svg {
  color: var(--color-accent);
}

/* Compact program library */
.loyalty-cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 500px));
  align-items: start;
  gap: 16px;
}

.loyalty-program-card {
  min-width: 0;
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.loyalty-program-visual {
  display: grid;
  place-items: center;
  background: var(--color-paper-2);
  padding: 12px;
}

.loyalty-program-visual .wallet-card.is-compact {
  width: 100%;
  max-width: 456px;
  aspect-ratio: 1.65;
  border-radius: 11px;
  box-shadow: 0 13px 28px -18px color-mix(in srgb, var(--color-graphite) 68%, transparent);
}

.loyalty-program-visual .wallet-card.is-compact .wallet-card-header {
  grid-template-columns: 34px minmax(0, 1fr) 26px;
  gap: 8px;
  padding: 12px 12px 0;
}

.loyalty-program-visual .wallet-card.is-compact .wallet-card-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.loyalty-program-visual .wallet-card.is-compact .wallet-card-type-icon {
  width: 26px;
  height: 26px;
}

.loyalty-program-visual .wallet-card.is-compact .wallet-card-content {
  padding: 8px 12px 5px;
}

.loyalty-program-visual .wallet-card.is-compact .wallet-card-content h3 {
  font-size: 17px;
}

.loyalty-program-visual .wallet-card.is-compact .wallet-card-value {
  margin-top: 5px;
}

.loyalty-program-visual .wallet-card.is-compact .wallet-card-value strong {
  font-size: 18px;
}

.loyalty-program-visual .wallet-card.is-compact .wallet-progress {
  margin-top: 5px;
}

.loyalty-program-visual .wallet-card.is-compact .wallet-card-footer {
  min-height: 25px;
  padding: 0 12px;
}

.loyalty-program-body {
  padding: 12px;
}

.loyalty-program-metrics {
  margin-top: 10px;
}

.loyalty-program-metrics span {
  padding: 8px 9px;
}

.loyalty-program-actions {
  margin-top: 10px;
}

.loyalty-program-actions button {
  min-height: 39px;
}

/* Public card */
.public-card-body {
  background: var(--color-paper);
  color: var(--color-ink);
}

.public-card-topbar {
  border-color: var(--color-rule);
  background: color-mix(in srgb, var(--color-white) 96%, transparent);
  backdrop-filter: blur(14px);
}

.public-card-topbar > span {
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
  color: var(--color-neutral);
  font-family: var(--font-label);
}

.public-card-topbar > span svg {
  color: var(--color-accent);
}

.public-card-page {
  align-items: start;
  gap: clamp(30px, 6vw, 78px);
}

.public-card-status {
  border-radius: var(--radius-control);
  color: var(--color-ink-2);
  font-family: var(--font-label);
  font-size: 9px;
}

.public-wallet-column .wallet-card {
  border-radius: 18px;
  box-shadow: 0 24px 56px -28px color-mix(in srgb, var(--color-graphite) 64%, transparent);
}

.public-wallet-note {
  color: var(--color-muted);
  font-size: 13px;
}

.public-card-details {
  max-width: 620px;
}

.public-detail-kicker {
  color: var(--color-accent);
  font-size: 10px;
}

.public-card-details > h2 {
  color: var(--color-ink);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 550;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.public-card-details > p {
  color: var(--color-neutral);
  font-size: 16px;
  line-height: 1.7;
}

.public-qr-card,
.public-card-facts > span,
.public-card-history,
.public-card-terms {
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.public-qr-card > div {
  border-color: var(--color-rule);
  border-radius: var(--radius-control);
  background: var(--color-white);
}

.public-qr-card b,
.public-card-facts b,
.public-card-history h3,
.public-card-terms summary {
  color: var(--color-ink);
  font-family: var(--font-display);
}

.public-qr-card small,
.public-card-facts small,
.public-card-history article small,
.public-card-terms p {
  color: var(--color-muted);
}

.public-card-actions {
  gap: 9px;
}

.public-card-actions button {
  min-height: 48px;
}

.public-card-missing {
  border-color: var(--color-rule-2);
  border-radius: var(--radius);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
}

.public-card-missing > span {
  border-radius: var(--radius-control);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

/* Responsive */
@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .loyalty-builder-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
}

@media (max-width: 1120px) {
  .community-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .loyalty-builder-layout {
    grid-template-columns: 1fr;
  }

  .loyalty-phone-panel {
    position: static;
  }

  .client-preview-surface {
    width: min(650px, 100%);
  }
}

@media (max-width: 960px) {
  .sidebar {
    width: min(320px, calc(100vw - 34px));
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    border-right: 1px solid var(--color-rule-2);
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    box-shadow: var(--shadow-md);
    z-index: 60;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-brand,
  .sidebar-account-card,
  .sidebar-logout {
    flex: none;
  }

  .main-nav {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 22px;
    scrollbar-gutter: stable;
  }

  .nav-group-title {
    height: auto;
    min-height: 46px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav-group-title span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .sidebar-logout {
    margin-bottom: 0;
  }

  .sidebar-close {
    position: absolute;
    top: max(17px, env(safe-area-inset-top));
    right: 13px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--color-rule-2);
    border-radius: var(--radius-control);
    background: var(--color-white);
    color: var(--color-ink-2);
    cursor: pointer;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    border: 0;
    background: color-mix(in srgb, var(--color-graphite) 42%, transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 55;
  }

  .studio-body.has-open-sidebar .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-header {
    height: 66px;
    border-color: var(--color-rule);
    background: color-mix(in srgb, var(--color-white) 96%, transparent);
    backdrop-filter: blur(14px);
  }

  .workspace {
    min-height: calc(100vh - 66px);
    padding: 26px 18px 96px;
  }

  .bottom-nav {
    inset: auto 10px 10px;
    height: 68px;
    border-color: var(--color-rule-2);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--color-white) 96%, transparent);
    box-shadow: var(--shadow-md);
  }

  .bottom-nav button {
    border-radius: var(--radius-control);
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 600;
  }

  .bottom-nav button.is-active {
    background: var(--color-accent-soft);
    color: var(--color-accent);
  }

  .notification-panel {
    top: 72px;
  }
}

@media (max-width: 860px) {
  .access-v2 .access-page {
    display: block;
  }

  .access-auth-pane {
    background:
      linear-gradient(var(--color-rule) 1px, transparent 1px),
      linear-gradient(90deg, var(--color-rule) 1px, transparent 1px),
      var(--color-paper);
    background-size: 40px 40px;
  }

  .auth-panel {
    border: 1px solid var(--color-rule-2);
    border-radius: var(--radius);
    background: var(--color-white);
    padding: 28px;
    box-shadow: var(--shadow-md);
  }

  .access-mobile-brand {
    margin-bottom: 42px;
  }
}

@media (max-width: 720px) {
  .page-heading {
    align-items: flex-start;
  }

  .page-heading h1 {
    font-size: 34px;
  }

  .community-hero {
    min-height: 0;
    border-radius: var(--radius);
    padding: 27px 22px;
  }

  .community-hero::before {
    background-size: 28px 28px;
  }

  .community-hero h2 {
    font-size: 36px;
  }

  .home-stats {
    grid-template-columns: 1fr;
  }

  .loyalty-type-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .loyalty-template-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-builder-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
  }

  .card-builder-steps > i {
    display: none;
  }

  .card-builder-steps > span {
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    text-align: center;
    white-space: normal;
  }

  .public-card-page {
    gap: 34px;
  }

  .public-card-details > h2 {
    font-size: 36px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .workspace {
    padding-right: 14px;
    padding-left: 14px;
  }

  .panel {
    padding: 17px;
  }

  .page-heading h1 {
    font-size: 32px;
  }

  .community-hero h2 {
    font-size: 34px;
  }

  .community-hero p {
    font-size: 14px;
  }

  .home-stats article {
    min-height: 78px;
  }

  .loyalty-type-picker button {
    min-height: 132px;
    padding: 13px 8px;
  }

  .loyalty-type-picker b {
    font-size: 15px;
  }

  .loyalty-type-picker small {
    font-size: 12px;
  }

  .loyalty-color-grid,
  .form-three {
    grid-template-columns: 1fr;
  }

  .loyalty-cards-grid {
    grid-template-columns: 1fr;
  }

  .loyalty-program-visual {
    padding: 10px;
  }

  .loyalty-program-visual .wallet-card.is-compact {
    max-width: none;
  }

  .client-preview-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-preview-surface .loyalty-wallet-preview {
    padding: 11px 10px 0;
  }

  .loyalty-qr-sheet {
    grid-template-columns: 1fr;
    margin: 10px;
  }

  .loyalty-preview-qr {
    justify-self: start;
  }

  .auth-panel {
    padding: 22px 18px;
  }

  .auth-panel > h2 {
    font-size: 31px;
  }

  .access-auth-pane {
    padding: 18px 14px 34px;
  }

  .public-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .public-card-actions button {
    width: 100%;
  }

  .toast-region {
    right: 10px;
    bottom: 88px;
    width: calc(100% - 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* Cobalt 2.7 · WhatsApp, fotografía de producto y búsqueda estable */
.field-help {
  display: block;
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 10.5px;
  font-weight: 450;
  line-height: 1.45;
}

.access-v2 .auth-form .field-help {
  padding: 0 2px;
}

.product-photo-options {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.product-photo-options .photo-upload {
  min-height: 86px;
}

.background-removal-tools {
  display: grid;
  gap: 10px;
  border: 1px solid #cfe0f4;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgb(var(--brand-rgb) / 8%), transparent 55%),
    var(--color-white);
  padding: 14px;
}

.background-removal-tools > span {
  display: grid;
  gap: 3px;
}

.background-removal-tools > span b {
  color: var(--color-ink);
  font-size: 12px;
}

.background-removal-tools > span small,
.background-removal-tools > small {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 450;
  line-height: 1.45;
}

.background-removal-tools > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.background-removal-tools .secondary-button {
  min-height: 40px;
  border-color: #b9d1ec;
  background: #f3f8fe;
  color: #0755a6;
  padding: 0 13px;
}

.background-removal-tools .secondary-button:hover:not(:disabled) {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.background-removal-tools .secondary-button:disabled {
  border-color: var(--color-rule);
  background: var(--color-paper-2);
  color: #8290a0;
  cursor: not-allowed;
}

.background-removal-tools .secondary-button.is-complete:disabled {
  border-color: #9bd8bb;
  background: #ecfdf3;
  color: #087443;
  opacity: 1;
}

.background-removal-tools .text-button {
  min-height: 40px;
  padding: 0 7px;
}

#product-photo-status.is-ready {
  color: #0755a6;
}

#product-photo-status.is-processing {
  color: #8a5700;
}

#product-photo-status.is-success {
  color: #087443;
  font-weight: 600;
}

#product-photo-status.is-error {
  color: #b42318;
  font-weight: 600;
}

#remove-product-background.is-processing svg {
  animation: product-tool-spin 0.9s linear infinite;
}

@keyframes product-tool-spin {
  to {
    transform: rotate(360deg);
  }
}

.product-image-preview {
  align-self: stretch;
  background:
    linear-gradient(45deg, #eef2f6 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f6 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f6 75%),
    #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.product-image-preview img {
  height: 100%;
  min-height: 230px;
  max-height: 360px;
  object-fit: contain;
  background: #fff;
}

.global-search-shell {
  position: relative;
}

.global-search-shell .topbar-search {
  width: min(430px, 37vw);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(620px, calc(100vw - 340px));
  max-height: min(610px, calc(100vh - 90px));
  overflow: auto;
  border: 1px solid var(--color-rule-2);
  border-radius: 13px;
  background: var(--color-white);
  padding: 8px;
  box-shadow: 0 24px 60px -25px rgb(15 33 58 / 44%);
  z-index: 45;
}

.global-search-summary {
  padding: 8px 10px 7px;
  color: var(--color-muted);
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.global-search-results > button {
  display: grid;
  width: 100%;
  min-height: 62px;
  grid-template-columns: 38px minmax(0, 1fr) max-content 16px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--color-ink);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.global-search-results > button:hover,
.global-search-results > button:focus-visible {
  background: var(--color-accent-soft);
  outline: 0;
}

.global-search-result-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  background: #eaf3fd;
  color: #075aa9;
}

.global-search-result-icon svg {
  width: 18px;
  height: 18px;
}

.global-search-results > button > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.global-search-results > button b,
.global-search-results > button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-results > button b {
  font-size: 13px;
  font-weight: 650;
}

.global-search-results > button small {
  color: var(--color-muted);
  font-size: 10px;
}

.global-search-results > button em {
  border: 1px solid var(--color-rule);
  border-radius: 999px;
  background: var(--color-paper-2);
  color: var(--color-neutral);
  padding: 5px 7px;
  font-size: 8px;
  font-style: normal;
  font-weight: 650;
  white-space: nowrap;
}

.global-search-results > button > svg {
  width: 15px;
  color: var(--color-muted);
}

.global-search-empty {
  display: grid;
  min-height: 170px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 24px;
  text-align: center;
}

.global-search-empty svg {
  width: 30px;
  height: 30px;
  color: var(--color-accent);
}

.global-search-empty b {
  color: var(--color-ink);
  font-size: 14px;
}

.global-search-empty small {
  max-width: 390px;
  color: var(--color-muted);
  font-size: 11px;
  line-height: 1.5;
}

.mobile-global-search,
.mobile-search-backdrop {
  display: none;
}

.search-field-with-status output {
  flex: none;
  border-radius: 999px;
  background: var(--color-paper-2);
  color: var(--color-neutral);
  padding: 4px 7px;
  font-family: var(--font-label);
  font-size: 8px;
  font-weight: 650;
  white-space: nowrap;
}

.profile-card p {
  margin-bottom: 0;
}

.profile-card .profile-phone {
  margin: 4px 0 17px;
  color: #087443;
  font-weight: 600;
}

.search-target-highlight {
  animation: search-target-pulse 2.4s ease both;
  outline: 3px solid rgb(var(--brand-rgb) / 30%);
  outline-offset: 3px;
}

@keyframes search-target-pulse {
  0%,
  100% {
    box-shadow: inherit;
  }
  22%,
  72% {
    box-shadow: 0 0 0 7px rgb(var(--brand-rgb) / 12%), 0 18px 42px -30px rgb(13 67 126 / 58%);
  }
}

@media (max-width: 960px) {
  body.has-mobile-search {
    overflow: hidden;
  }

  .mobile-global-search {
    position: fixed;
    top: max(74px, calc(env(safe-area-inset-top) + 68px));
    right: 12px;
    left: 12px;
    display: grid;
    max-height: calc(100dvh - 94px - env(safe-area-inset-bottom));
    overflow: hidden;
    grid-template-rows: auto auto minmax(0, 1fr);
    border: 1px solid var(--color-rule-2);
    border-radius: 14px;
    background: var(--color-white);
    padding: 13px;
    box-shadow: 0 28px 80px -24px rgb(11 29 52 / 60%);
    z-index: 52;
  }

  .mobile-global-search > header {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-ink);
    padding: 0 2px 8px;
  }

  .mobile-global-search > header b {
    font-size: 15px;
  }

  .mobile-global-search > header button {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--color-rule);
    border-radius: 8px;
    background: var(--color-paper-2);
    color: var(--color-ink);
  }

  .mobile-global-search > header svg {
    width: 18px;
  }

  .mobile-search-input {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--color-rule-2);
    border-radius: 9px;
    background: var(--color-white);
    padding: 0 12px;
  }

  .mobile-search-input:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / 10%);
  }

  .mobile-search-input svg {
    width: 18px;
    color: var(--color-accent);
  }

  .mobile-search-input input {
    min-width: 0;
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--color-ink);
    outline: 0;
    font-size: 16px;
  }

  .global-search-results.is-mobile {
    position: static;
    width: 100%;
    max-height: none;
    overflow: auto;
    border: 0;
    border-radius: 0;
    padding: 9px 0 0;
    box-shadow: none;
  }

  .mobile-search-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    border: 0;
    background: rgb(6 21 40 / 48%);
    backdrop-filter: blur(2px);
    z-index: 51;
  }

  .product-photo-editor {
    grid-template-columns: minmax(150px, .72fr) minmax(0, 1.28fr);
  }
}

@media (max-width: 680px) {
  .product-photo-editor {
    grid-template-columns: 1fr;
  }

  .product-image-preview img {
    min-height: 250px;
    max-height: 390px;
  }

  .background-removal-tools > div {
    align-items: stretch;
    flex-direction: column;
  }

  .background-removal-tools .secondary-button,
  .background-removal-tools .text-button {
    width: 100%;
    justify-content: center;
  }

  .global-search-results > button {
    grid-template-columns: 38px minmax(0, 1fr) 15px;
  }

  .global-search-results > button em {
    display: none;
  }
}

@media (max-width: 390px) {
  .mobile-global-search {
    top: max(67px, calc(env(safe-area-inset-top) + 62px));
    right: 7px;
    left: 7px;
    max-height: calc(100dvh - 78px - env(safe-area-inset-bottom));
    padding: 10px;
  }

  .global-search-results > button {
    min-height: 60px;
    gap: 8px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .global-search-result-icon {
    width: 36px;
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #remove-product-background.is-processing svg,
  .search-target-highlight {
    animation: none;
  }
}

/* Cobalt 2.2 · acceso, navegación, escáner y cuenta */
.access-v2 .access-page {
  grid-template-columns: minmax(560px, 1.08fr) minmax(460px, 0.92fr);
  background: var(--color-paper);
}

.access-v2 .access-intro {
  min-height: 100dvh;
  justify-content: space-between;
  background:
    radial-gradient(circle at 78% 18%, rgb(var(--brand-rgb) / 10%), transparent 30%),
    linear-gradient(145deg, #f7faff 0%, #eef4fb 100%);
  padding: 30px clamp(38px, 5vw, 76px) 28px;
}

.access-v2 .access-intro::before {
  background-image:
    linear-gradient(rgb(var(--brand-rgb) / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--brand-rgb) / 5%) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 1;
}

.access-v2 .access-intro::after {
  top: 0;
  right: 0;
  width: 38%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--color-accent));
}

.access-v2 .access-intro-copy {
  width: min(720px, 100%);
  margin: auto 0;
  padding: 48px 0 36px;
}

.access-v2 .access-intro-copy h1 {
  max-width: 690px;
  margin: 18px 0 16px;
  font-size: clamp(48px, 5vw, 70px);
  font-weight: 610;
  letter-spacing: -0.058em;
  line-height: 0.98;
}

.access-v2 .access-intro-copy > p {
  max-width: 600px;
  font-size: 16px;
  line-height: 1.68;
}

.access-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 25px;
}

.access-proof-row > span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-rule-2);
  border-radius: 999px;
  background: rgb(255 255 255 / 78%);
  color: var(--color-ink-2);
  padding: 0 12px;
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.access-proof-row svg {
  width: 15px;
  height: 15px;
  color: var(--color-accent);
}

.access-proof-row b {
  font-weight: 650;
}

.access-product-visual {
  width: min(650px, 100%);
  overflow: hidden;
  margin-top: 30px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 24%, var(--color-rule));
  border-radius: 14px;
  background: var(--color-white);
  box-shadow: 0 24px 60px -34px rgb(20 45 78 / 45%);
}

.access-visual-head,
.access-visual-result {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 17px;
}

.access-visual-head {
  border-bottom: 1px solid var(--color-rule);
}

.access-visual-head > span,
.access-visual-head > em {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.access-visual-head > span {
  color: var(--color-ink);
  font-size: 12px;
}

.access-visual-head svg {
  width: 17px;
  color: var(--color-accent);
}

.access-visual-head > em {
  color: var(--color-success);
  font-family: var(--font-label);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.access-visual-head > em i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent);
}

.access-barcode-stage {
  position: relative;
  display: grid;
  min-height: 230px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 15%, rgb(49 118 202 / 28%), transparent 42%),
    #0b1728;
  padding: 32px;
}

.access-barcode-stage::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
}

.access-focus-frame {
  position: relative;
  display: grid;
  width: min(430px, 90%);
  min-height: 126px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 10px;
  background: rgb(255 255 255 / 96%);
  padding: 24px 24px 14px;
  z-index: 1;
}

.access-barcode-lines {
  display: flex;
  width: 100%;
  height: 58px;
  align-items: stretch;
  justify-content: center;
  gap: clamp(2px, 0.65vw, 6px);
}

.access-barcode-lines i {
  width: 3px;
  background: #111827;
}

.access-barcode-lines i:nth-child(3n) {
  width: 7px;
}

.access-barcode-lines i:nth-child(4n) {
  width: 2px;
}

.access-barcode-lines i:nth-child(5n) {
  width: 5px;
}

.access-focus-frame small {
  color: #334155;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.24em;
}

.access-found-badge {
  position: absolute;
  right: 18px;
  bottom: 15px;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  background: #fff;
  color: #0d7440;
  padding: 0 11px;
  font-size: 10px;
  font-weight: 700;
  z-index: 2;
}

.access-found-badge svg {
  width: 14px;
  height: 14px;
}

.access-visual-result {
  border-top: 1px solid var(--color-rule);
}

.access-visual-result > span {
  display: grid;
}

.access-visual-result small {
  color: var(--color-muted);
  font-family: var(--font-label);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.access-visual-result b {
  color: var(--color-ink);
  font-size: 12px;
  font-weight: 650;
}

.access-visual-result > svg {
  width: 18px;
  color: var(--color-accent);
}

.access-v2 .access-intro-footer {
  justify-content: space-between;
  gap: 18px;
}

.access-v2 .access-intro-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.access-v2 .access-auth-pane {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% 0, rgb(var(--brand-rgb) / 7%), transparent 32%),
    var(--color-paper);
  padding: 30px clamp(28px, 4vw, 64px);
}

.access-v2 .auth-panel {
  width: min(500px, 100%);
  border: 1px solid var(--color-rule-2);
  border-radius: 15px;
  background: var(--color-white);
  padding: clamp(28px, 4vw, 40px);
  box-shadow: 0 28px 70px -42px rgb(19 39 68 / 52%);
}

.access-v2 .auth-panel > h2 {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 620;
}

.access-v2 .auth-panel > p {
  margin-bottom: 23px;
}

.access-v2 .google-button {
  min-height: 54px;
  justify-content: flex-start;
  gap: 11px;
  border-color: var(--color-rule-2);
  border-radius: 9px;
  background: var(--color-white);
  color: var(--color-ink);
  font-size: 14px;
}

.access-v2 .google-button > i {
  width: 17px;
  margin-left: auto;
  color: var(--color-muted);
}

.google-mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.google-button.needs-attention {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgb(var(--brand-rgb) / 10%);
}

.google-button.is-loading {
  pointer-events: none;
  opacity: 0.72;
}

.google-account-note {
  display: block;
  margin: 8px 2px 0;
  color: var(--color-muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.access-v2 .auth-divider {
  margin: 20px 0 16px;
  color: var(--color-muted);
  font-size: 10px;
}

.access-v2 .auth-tabs {
  gap: 4px;
  border: 1px solid var(--color-rule);
  border-radius: 9px;
  background: var(--color-paper-2);
  padding: 4px;
}

.access-v2 .auth-tab {
  min-height: 42px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.access-v2 .auth-tab.is-active {
  border-radius: 6px;
  background: var(--color-white);
  color: var(--color-ink);
  box-shadow: 0 1px 4px rgb(15 30 50 / 8%);
}

.access-v2 .auth-tab.is-active::after {
  display: none;
}

.access-v2 .auth-form {
  gap: 13px;
  margin-top: 17px;
}

.access-v2 .auth-form label {
  gap: 6px;
  font-size: 12px;
}

.access-v2 .input-wrap {
  min-height: 51px;
  border-radius: 8px;
  padding: 0 13px;
}

.access-v2 .input-wrap > svg {
  width: 17px;
  height: 17px;
}

.access-v2 .input-wrap input {
  font-size: 13px;
}

.access-v2 .auth-submit {
  min-height: 51px;
  justify-content: space-between;
  margin-top: 3px;
  border-radius: 8px;
}

.access-v2 .form-alert {
  margin: 0 0 14px;
  border-radius: 8px;
  line-height: 1.48;
}

.access-v2 .form-alert.is-info {
  border: 1px solid rgb(var(--brand-rgb) / 24%);
  background: var(--color-accent-soft);
  color: #0755a6;
}

.access-v2 .access-security {
  margin-top: 17px;
  font-size: 10.5px;
}

.access-v2 .auth-free-note {
  display: block;
  margin-top: 5px;
  text-align: center;
}

.nav-group-title {
  min-height: 45px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.012em;
  text-transform: none;
}

.nav-group-title span {
  line-height: 1.2;
}

.nav-group-title svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.nav-group-title .nav-group-chevron {
  width: 15px;
  height: 15px;
  opacity: 0.88;
}

.reader-shell {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  border: 1px solid var(--color-rule-2);
  border-radius: 13px;
  background: #0c1726;
}

.reader {
  min-height: 380px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 42%, rgb(var(--brand-rgb) / 18%), transparent 45%),
    #0c1726;
}

.reader::before,
.reader::after {
  display: none;
}

.reader video {
  min-height: 380px;
  object-fit: cover;
}

.reader-empty {
  color: #c4d0df;
}

.reader-empty > svg {
  color: #7eb7f5;
}

.reader-empty b {
  color: #fff;
}

.scanner-viewfinder {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(88%, 560px);
  height: min(48%, 210px);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 5;
}

.scanner-viewfinder > i {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: #fff;
  border-style: solid;
  filter: drop-shadow(0 1px 5px rgb(0 0 0 / 35%));
}

.scanner-viewfinder > i:nth-child(1) {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px;
  border-radius: 8px 0 0;
}

.scanner-viewfinder > i:nth-child(2) {
  top: 0;
  right: 0;
  border-width: 3px 3px 0 0;
  border-radius: 0 8px 0 0;
}

.scanner-viewfinder > i:nth-child(3) {
  right: 0;
  bottom: 0;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 8px;
}

.scanner-viewfinder > i:nth-child(4) {
  bottom: 0;
  left: 0;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 8px;
}

.scanner-viewfinder > span {
  position: absolute;
  top: 8%;
  right: 5%;
  left: 5%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #4ea1ff 18%, #fff 50%, #4ea1ff 82%, transparent);
  box-shadow: 0 0 12px #4ea1ff;
  opacity: 0;
}

.reader-shell:has(video) .scanner-viewfinder > span {
  animation: scanner-sweep 2.1s ease-in-out infinite;
  opacity: 1;
}

.reader-shell.is-focusing .scanner-viewfinder {
  animation: scanner-focus-pulse 680ms ease-out;
}

.scanner-camera-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  border: 1px solid var(--color-rule);
  border-radius: 10px;
  background: var(--color-paper-2);
  padding: 9px;
}

.scanner-tool-button {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--color-rule-2);
  border-radius: 7px;
  background: var(--color-white);
  color: var(--color-ink-2);
  padding: 0 11px;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.scanner-tool-button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.scanner-tool-button[aria-pressed="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
}

.scanner-tool-button svg {
  width: 16px;
  height: 16px;
}

.scanner-zoom-control {
  display: grid;
  min-height: 39px;
  flex: 1 1 210px;
  grid-template-columns: auto minmax(90px, 1fr) 34px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--color-rule-2);
  border-radius: 7px;
  background: var(--color-white);
  padding: 0 10px;
  color: var(--color-ink-2);
  font-size: 10px;
  font-weight: 650;
}

.scanner-zoom-control > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.scanner-zoom-control svg {
  width: 15px;
  height: 15px;
  color: var(--color-accent);
}

.scanner-zoom-control input {
  width: 100%;
  accent-color: var(--color-accent);
}

.scanner-zoom-control output {
  color: var(--color-accent);
  font-family: var(--font-label);
  text-align: right;
}

.scanner-message {
  min-height: 21px;
  font-size: 12px;
  line-height: 1.5;
}

.account-photo-field {
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  border: 1px solid var(--color-rule);
  border-radius: 12px;
  background: var(--color-paper-2);
  padding: 15px;
}

.profile-upload-preview {
  width: 88px;
  height: 88px;
  border: 3px solid var(--color-white);
  box-shadow: 0 0 0 1px var(--color-rule-2), 0 8px 24px -16px rgb(15 35 60 / 55%);
}

.account-photo-copy {
  display: grid;
  gap: 3px;
}

.account-photo-copy > b {
  color: var(--color-ink);
  font-size: 14px;
}

.account-photo-copy > small {
  color: var(--color-muted);
  font-size: 11px;
}

.account-photo-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 9px;
}

.profile-photo-button,
.profile-photo-remove {
  display: flex;
  min-height: 47px;
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
}

.profile-photo-button {
  position: relative;
  gap: 9px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 38%, var(--color-rule-2));
  background: var(--color-white);
  color: var(--color-ink-2);
  padding: 7px 11px;
}

.profile-photo-button:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.profile-photo-button:focus-within {
  border-color: var(--color-accent);
  outline: 3px solid color-mix(in srgb, var(--color-focus) 18%, transparent);
  outline-offset: 2px;
}

.profile-photo-button > svg {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--color-accent);
}

.profile-photo-button > span {
  display: grid;
  min-width: 0;
}

.profile-photo-button b {
  color: var(--color-ink);
  font-size: 11px;
}

.profile-photo-button small {
  overflow: hidden;
  color: var(--color-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-photo-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.profile-photo-remove {
  justify-content: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--color-danger) 30%, var(--color-rule));
  background: var(--color-white);
  color: var(--color-danger);
  padding: 0 11px;
  font-size: 10px;
  font-weight: 650;
}

.profile-photo-remove:hover {
  border-color: var(--color-danger);
  background: var(--color-danger-soft);
}

.profile-photo-remove svg {
  width: 15px;
  height: 15px;
}

.profile-photo-status {
  display: block;
  margin-top: 5px;
  color: var(--color-muted);
  font-size: 9.5px;
}

.account-google-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 1px 0 3px;
  border: 1px solid rgb(var(--brand-rgb) / 20%);
  border-radius: 9px;
  background: var(--color-accent-soft);
  padding: 11px 12px;
}

.account-google-status > svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--color-accent);
}

.account-google-status > span {
  display: grid;
}

.account-google-status b {
  color: var(--color-ink);
  font-size: 11px;
}

.account-google-status small {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 10px;
  line-height: 1.45;
}

@keyframes scanner-sweep {
  0%,
  100% {
    top: 8%;
    opacity: 0.45;
  }

  50% {
    top: calc(92% - 2px);
    opacity: 1;
  }
}

@keyframes scanner-focus-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(0.96);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 1120px) {
  .access-v2 .access-page {
    grid-template-columns: minmax(470px, 1fr) minmax(420px, 0.92fr);
  }

  .access-v2 .access-intro {
    padding-right: 40px;
    padding-left: 40px;
  }

  .access-v2 .access-intro-copy h1 {
    font-size: clamp(44px, 5vw, 58px);
  }

  .access-proof-row > span {
    min-height: 35px;
    padding: 0 10px;
  }
}

@media (max-width: 860px) {
  .access-v2 .access-page {
    display: block;
  }

  .access-v2 .access-intro {
    display: none;
  }

  .access-v2 .access-auth-pane {
    min-height: 100dvh;
    align-items: center;
    background:
      radial-gradient(circle at 50% 0, rgb(var(--brand-rgb) / 10%), transparent 32%),
      var(--color-paper);
    padding: 24px;
  }

  .access-v2 .auth-panel {
    padding: 32px;
  }

  .access-v2 .access-mobile-brand {
    display: flex;
    width: max-content;
    margin-bottom: 34px;
  }
}

@media (max-width: 560px) {
  .access-v2 .access-auth-pane {
    align-items: start;
    padding: 12px;
  }

  .access-v2 .auth-panel {
    width: 100%;
    border-radius: 12px;
    padding: 23px 19px;
  }

  .access-v2 .access-mobile-brand {
    margin-bottom: 28px;
  }

  .access-v2 .auth-panel > h2 {
    font-size: 30px;
  }

  .access-v2 .google-button,
  .access-v2 .auth-submit,
  .access-v2 .input-wrap {
    min-height: 50px;
  }

  .reader-shell,
  .reader,
  .reader video {
    min-height: 330px;
  }

  .scanner-viewfinder {
    width: 90%;
    height: 46%;
  }

  .scanner-camera-tools {
    align-items: stretch;
  }

  .scanner-tool-button {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
  }

  .scanner-zoom-control {
    flex-basis: 100%;
  }

  .account-photo-field {
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: start;
    gap: 13px;
    padding: 13px;
  }

  .profile-upload-preview {
    width: 70px;
    height: 70px;
  }

  .account-photo-actions {
    grid-template-columns: 1fr;
  }

  .profile-photo-remove {
    min-height: 40px;
  }
}

@media (max-width: 390px) {
  .access-v2 .auth-panel {
    padding-right: 16px;
    padding-left: 16px;
  }

  .access-v2 .auth-tab {
    font-size: 11px;
  }

  .account-photo-field {
    grid-template-columns: 1fr;
  }

  .profile-upload-preview {
    width: 76px;
    height: 76px;
  }
}

/* Cobalt 2.3 · clasificación, destino de escaneo y comunidad responsive */
.home-leaderboard {
  margin-bottom: 18px;
  overflow: hidden;
}

.leaderboard-head {
  align-items: center;
}

.leaderboard-note {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--color-rule-2);
  border-radius: 999px;
  background: var(--color-paper-2);
  color: var(--color-muted);
  padding: 0 12px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.leaderboard-note svg {
  width: 15px;
  height: 15px;
  color: var(--color-accent);
}

.leaderboard-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}

.leaderboard-item {
  display: grid;
  min-width: 0;
  min-height: 76px;
  grid-template-columns: 42px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--color-rule);
  border-radius: 10px;
  background: var(--color-white);
  padding: 10px 13px 10px 10px;
}

.leaderboard-item.is-first {
  grid-column: 1 / -1;
  min-height: 86px;
  border-color: #e3c66b;
  background:
    radial-gradient(circle at 92% 0, rgb(255 210 73 / 20%), transparent 28%),
    linear-gradient(120deg, #fffdf6 0%, #f7faff 62%, #eef5ff 100%);
  box-shadow: inset 3px 0 0 #e3b632;
}

.leaderboard-item.is-current:not(.is-first) {
  border-color: rgb(var(--brand-rgb) / 36%);
  background: var(--color-accent-soft);
}

.leaderboard-rank {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--color-rule-2);
  border-radius: 9px;
  background: var(--color-paper-2);
  color: var(--color-ink-2);
}

.leaderboard-rank > b {
  font-family: var(--font-mono);
  font-size: 12px;
}

.leaderboard-rank.is-crown {
  position: relative;
  border-color: #eed98e;
  background: #fff7d9;
  color: #a56b00;
}

.leaderboard-rank.is-crown svg {
  width: 21px;
  height: 21px;
  fill: rgb(229 177 27 / 18%);
}

.leaderboard-rank.is-crown small {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #b97800;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
}

.leaderboard-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  overflow: hidden;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 0 1px var(--color-rule-2);
  font-size: 13px;
  font-weight: 800;
}

.leaderboard-avatar.has-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-user {
  display: grid;
  min-width: 0;
}

.leaderboard-user > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.leaderboard-user b {
  overflow: hidden;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-user em {
  flex: none;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  padding: 2px 6px;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .04em;
}

.leaderboard-user small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 9px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  display: grid;
  min-width: 64px;
  justify-items: end;
  border-left: 1px solid var(--color-rule);
  padding-left: 12px;
}

.leaderboard-score b {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1;
}

.leaderboard-score small {
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.leaderboard-loading,
.leaderboard-empty {
  display: flex;
  min-height: 92px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px dashed var(--color-rule-2);
  border-radius: 10px;
  background: var(--color-paper-2);
  color: var(--color-muted);
  padding: 18px;
  text-align: left;
}

.leaderboard-loading > svg {
  width: 23px;
  color: var(--color-accent);
  animation: modal-spin .8s linear infinite;
}

.leaderboard-loading > span,
.leaderboard-empty > span:last-child {
  display: grid;
}

.leaderboard-loading b,
.leaderboard-empty b {
  color: var(--color-ink);
  font-size: 12px;
}

.leaderboard-loading small,
.leaderboard-empty small {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.45;
}

.leaderboard-empty > span:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 9px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.leaderboard-empty svg {
  width: 20px;
}

.product-editor {
  scroll-margin-top: 86px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.product-editor.is-scan-target {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgb(var(--brand-rgb) / 10%), var(--shadow-md);
}

.feed-layout > div,
.post-composer,
.posts-feed,
.community-post-card,
.community-author,
.community-post-copy,
.post-modal-content,
.post-detail {
  min-width: 0;
}

.community-post-text,
.post-detail-body,
.comment-row p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.community-post-copy img,
.post-detail-image,
.post-image-preview img {
  height: auto;
}

@media (max-width: 1120px) {
  .feed-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .community-guide {
    position: static;
  }
}

@media (max-width: 900px) {
  .leaderboard-list {
    grid-template-columns: 1fr;
  }

  .leaderboard-item.is-first {
    grid-column: auto;
  }

  .feed-layout {
    gap: 14px;
  }

  .community-guide {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 13px;
  }

  .community-guide > span {
    grid-row: 1 / span 2;
  }

  .community-guide h2 {
    align-self: end;
    margin-top: 0;
  }

  .community-guide p {
    margin-top: 4px;
  }

  .community-guide ul {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .leaderboard-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .leaderboard-note {
    white-space: normal;
  }

  .post-composer {
    margin-bottom: 11px;
  }

  .composer-head {
    align-items: flex-start;
  }

  .composer-head > div,
  .composer-head small {
    min-width: 0;
  }

  .post-composer textarea {
    min-height: 116px;
    font-size: 16px;
  }

  .composer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .composer-photo,
  .composer-actions .primary-button {
    width: 100%;
    justify-content: center;
  }

  .community-post-copy img {
    max-height: none;
    object-fit: contain;
  }
}

@media (max-width: 560px) {
  .home-leaderboard {
    margin-bottom: 14px;
  }

  .leaderboard-list {
    gap: 7px;
    margin-top: 14px;
  }

  .leaderboard-item,
  .leaderboard-item.is-first {
    min-height: 72px;
    grid-template-columns: 36px 42px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 10px 9px 8px;
  }

  .leaderboard-rank {
    width: 32px;
    height: 32px;
  }

  .leaderboard-avatar {
    width: 42px;
    height: 42px;
  }

  .leaderboard-user b {
    font-size: 12px;
  }

  .leaderboard-user small {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .leaderboard-score {
    min-width: 50px;
    padding-left: 8px;
  }

  .leaderboard-score b {
    font-size: 18px;
  }

  .leaderboard-score small {
    font-size: 7px;
  }

  .leaderboard-loading,
  .leaderboard-empty {
    justify-content: flex-start;
    padding: 14px;
  }

  .feed-layout {
    gap: 11px;
  }

  .post-composer {
    padding: 14px;
  }

  .composer-head {
    gap: 9px;
  }

  .composer-head .avatar {
    width: 40px;
    height: 40px;
    flex: none;
  }

  .composer-head small {
    font-size: 10px;
    line-height: 1.4;
  }

  .composer-actions {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .composer-photo,
  .composer-actions .primary-button {
    min-height: 44px;
  }

  .community-post-card {
    width: 100%;
    border-radius: 11px;
  }

  .community-post-header {
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 7px;
    padding: 11px 11px 7px;
  }

  .community-author {
    gap: 8px;
  }

  .community-post-card .post-avatar {
    width: 38px;
    height: 38px;
  }

  .community-author b {
    font-size: 12px;
  }

  .community-author small {
    font-size: 9px;
  }

  .community-post-copy {
    padding: 4px 11px 11px;
  }

  .community-post-text {
    font-size: 13px;
    line-height: 1.55;
  }

  .community-post-copy img {
    margin-top: 10px;
    border-radius: 8px;
  }

  .community-post-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 7px 8px 8px;
  }

  .community-post-footer button {
    min-width: 0;
    min-height: 38px;
    justify-content: center;
    padding: 0 7px;
  }

  .community-view-button {
    width: 100%;
    grid-column: 1 / -1;
    justify-self: stretch;
    border-top: 1px solid var(--color-rule) !important;
    border-radius: 0 !important;
    padding-top: 6px !important;
  }

  .community-guide {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 14px;
  }

  .community-guide > span {
    width: 40px;
    height: 40px;
  }

  .community-guide h2 {
    font-size: 16px;
  }

  .community-guide p,
  .community-guide li {
    font-size: 11px;
  }

  .post-modal-panel {
    max-height: calc(100dvh - env(safe-area-inset-top, 0px));
  }

  .post-modal-header {
    min-height: 58px;
    padding-right: 11px;
    padding-left: 14px;
  }

  .post-detail-author {
    grid-template-columns: 40px minmax(0, 1fr) 34px;
    gap: 8px;
  }

  .post-detail-avatar {
    width: 40px;
    height: 40px;
  }

  .post-detail-author small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .post-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .post-detail-actions button,
  .post-detail-actions > span {
    justify-content: center;
    text-align: center;
  }

  .post-detail .comment-form {
    grid-template-columns: 32px minmax(0, 1fr) 36px;
    gap: 6px;
  }

  .post-detail .comment-avatar {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 360px) {
  .leaderboard-item,
  .leaderboard-item.is-first {
    grid-template-columns: 32px 38px minmax(0, 1fr) auto;
    gap: 6px;
    padding-right: 8px;
  }

  .leaderboard-avatar {
    width: 38px;
    height: 38px;
  }

  .leaderboard-score {
    min-width: 43px;
    padding-left: 6px;
  }

  .leaderboard-user small {
    display: none;
  }

  .community-post-footer button {
    font-size: 11px;
  }
}

/* Cobalt 2.4 · identidad, fidelización e imágenes públicas */
.account-plan {
  border-color: #076a40;
  background: linear-gradient(135deg, #0a7f4d 0%, #075f3a 100%);
  color: #fff;
  box-shadow: 0 8px 18px -12px rgb(5 94 56 / 72%);
}

.account-plan span,
.account-plan svg {
  color: #fff;
}

.account-plan:hover {
  border-color: #054f31;
  background: linear-gradient(135deg, #087548 0%, #054f31 100%);
  color: #fff;
  box-shadow: 0 10px 22px -13px rgb(5 79 49 / 82%);
}

.account-plan:focus-visible {
  outline: 3px solid rgb(10 127 77 / 24%);
  outline-offset: 2px;
}

.loyalty-palette-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 11px;
}

.loyalty-palette-picker button {
  display: grid;
  min-width: 0;
  min-height: 72px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-control);
  background: var(--color-white);
  color: var(--color-ink-2);
  padding: 9px;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.loyalty-palette-picker button:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.loyalty-palette-picker button.is-active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-soft);
}

.loyalty-palette-picker button > span {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid rgb(25 32 41 / 10%);
  border-radius: 10px;
  background: var(--palette-a);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%);
}

.loyalty-palette-picker button > span i:first-child {
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: var(--palette-b);
}

.loyalty-palette-picker button > span i:last-child {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--palette-t);
  border-radius: 50%;
}

.loyalty-palette-picker button b {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
}

#loyalty-template-picker {
  --picker-primary: #0064cc;
  --picker-secondary: #174ea6;
  --picker-text: #ffffff;
}

#loyalty-template-picker .template-mini {
  border: 1px solid color-mix(in srgb, var(--picker-text) 22%, transparent);
  background: var(--picker-primary);
  color: var(--picker-text);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 7%);
}

#loyalty-template-picker .template-mini small {
  color: color-mix(in srgb, var(--picker-text) 76%, transparent);
}

#loyalty-template-picker .template-mini.is-classic i {
  background: var(--picker-secondary);
}

#loyalty-template-picker .template-mini.is-modern i {
  background: var(--picker-secondary);
}

#loyalty-template-picker .template-mini.is-elegant {
  border: 2px solid var(--picker-secondary);
  background: var(--picker-primary);
  color: var(--picker-text);
}

#loyalty-template-picker .template-mini.is-elegant small,
#loyalty-template-picker .template-mini.is-minimal small {
  color: color-mix(in srgb, var(--picker-text) 76%, transparent);
}

#loyalty-template-picker .template-mini.is-elegant i {
  border-color: color-mix(in srgb, var(--picker-text) 32%, transparent);
}

#loyalty-template-picker .template-mini.is-bold {
  background: var(--picker-primary);
  color: var(--picker-text);
}

#loyalty-template-picker .template-mini.is-bold i {
  background: var(--picker-secondary);
}

#loyalty-template-picker .template-mini.is-minimal {
  border-color: var(--picker-secondary);
  background: var(--picker-primary);
  color: var(--picker-text);
}

#loyalty-template-picker .template-mini.is-minimal i {
  background: var(--picker-secondary);
}

#loyalty-template-picker .template-mini.is-ticket {
  border-color: var(--picker-secondary);
  background: var(--picker-primary);
  color: var(--picker-text);
}

.color-field {
  border-color: var(--color-rule-2);
  background: var(--color-paper-2);
}

.color-field:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.color-field input {
  overflow: hidden;
  border: 1px solid rgb(25 32 41 / 12%);
  border-radius: 9px;
}

.wallet-card {
  border: 1px solid color-mix(in srgb, var(--card-text) 20%, transparent);
  background: var(--card-primary);
  box-shadow:
    0 18px 38px -22px color-mix(in srgb, var(--card-primary) 78%, #0b1724),
    inset 0 1px rgb(255 255 255 / 12%);
}

.wallet-card-accent {
  height: 7px;
  background: var(--card-secondary);
}

.wallet-card-logo {
  box-shadow: 0 6px 16px -10px rgb(5 20 35 / 62%);
}

.wallet-template-bold {
  background: var(--card-primary);
}

.wallet-template-bold::before {
  inset: 0 67% 0 0;
  background: var(--card-secondary);
}

.wallet-template-bold .wallet-card-accent {
  background: var(--card-text);
}

.wallet-template-ticket {
  border-color: var(--card-secondary);
  background: var(--card-primary);
}

.wallet-template-ticket .wallet-card-accent {
  background: var(--card-secondary);
}

.public-products-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  align-items: stretch;
  gap: 18px;
}

.public-product-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  border-radius: 14px;
}

.public-product-media {
  position: relative;
  display: grid;
  height: auto;
  min-height: 190px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  place-items: center;
  margin: 0;
  background:
    radial-gradient(circle at 18% 14%, rgb(0 100 204 / 10%), transparent 36%),
    var(--color-paper-2);
  padding: 12px;
}

.public-product-image-frame {
  position: absolute;
  inset: 12px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgb(25 32 41 / 9%);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px -20px rgb(20 38 61 / 55%);
  isolation: isolate;
}

.public-product-image-backdrop {
  position: absolute;
  inset: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  opacity: .16;
  filter: blur(22px) saturate(.9);
  object-fit: cover;
  transform: scale(1.08);
  z-index: -1;
}

.public-product-image-main {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform .2s ease;
  z-index: 1;
}

.public-product-image-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 7px;
  background: var(--color-paper-2);
  color: var(--color-muted);
  z-index: 2;
}

.public-product-image-fallback svg {
  width: 31px;
  height: 31px;
  color: var(--color-accent);
}

.public-product-image-fallback small {
  font-size: 11px;
}

.public-product-image-frame.is-error .public-product-image-backdrop,
.public-product-image-frame.is-error .public-product-image-main {
  display: none;
}

.public-product-image-frame.is-error .public-product-image-fallback {
  display: grid;
}

.public-product-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 17px;
}

.public-product-content h3 {
  min-height: 0;
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.28;
}

.public-product-content > p {
  min-height: 0;
  margin-top: 9px;
  -webkit-line-clamp: 3;
}

.public-price {
  margin-top: auto;
  padding-top: 15px;
}

.public-price b {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -.025em;
}

.publisher-row {
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
}

.publisher-row .publisher-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.publisher-row .publisher-avatar.has-photo {
  background: var(--color-paper-3);
}

.publisher-row .publisher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.publisher-row small {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.35;
}

.publisher-row small b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publisher-row small em {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 9px;
  font-style: normal;
}

.public-actions {
  gap: 9px;
  margin-top: 13px;
}

.public-actions .dark-button,
.public-actions .outline-button {
  min-height: 43px;
  border-radius: var(--radius-control);
}

@media (hover: hover) {
  .public-product-card:hover .public-product-image-main {
    transform: scale(1.018);
  }
}

@media (max-width: 720px) {
  .loyalty-palette-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-products-grid {
    gap: 14px;
  }

  .public-product-media {
    min-height: 180px;
  }
}

@media (max-width: 380px) {
  .loyalty-palette-picker button {
    min-height: 64px;
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 7px;
  }

  .loyalty-palette-picker button > span {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .public-product-content {
    padding: 14px;
  }
}

/* Cobalt 2.5 · etiquetas masivas, Top, tarjetas creadas y comunidad */
.page-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.bulk-print-panel {
  scroll-margin-top: 88px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 0;
}

#bulk-print-panel:not([hidden]) ~ #designs-empty,
#bulk-print-panel:not([hidden]) ~ #designs-grid {
  display: none !important;
}

.bulk-print-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--color-rule-2);
  background:
    radial-gradient(circle at 88% 0, rgb(var(--brand-rgb) / 13%), transparent 32%),
    linear-gradient(135deg, #f7faff 0%, #eef5ff 100%);
  padding: 21px;
}

.bulk-print-header > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.bulk-print-header > div > span:last-child {
  display: grid;
  min-width: 0;
}

.bulk-print-header small,
.bulk-print-toolbar small,
.bulk-print-settings > div small {
  color: var(--color-accent);
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .075em;
}

.bulk-print-header h2 {
  margin: 3px 0 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -.025em;
}

.bulk-print-header p {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.45;
}

.bulk-print-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: none;
  place-items: center;
  border-radius: 11px;
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgb(var(--brand-rgb) / 90%);
}

.bulk-print-icon svg {
  width: 22px;
  height: 22px;
}

.bulk-print-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
}

.bulk-print-selection {
  min-width: 0;
  border-right: 1px solid var(--color-rule);
  padding: 19px 20px 22px;
}

.bulk-print-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 13px;
  margin-bottom: 12px;
}

.bulk-print-toolbar > span {
  display: flex;
  flex-direction: column;
}

.bulk-print-toolbar > span:last-child {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.bulk-print-toolbar b {
  margin-top: 2px;
  color: var(--color-ink);
  font-size: 14px;
}

.bulk-print-toolbar .text-button {
  min-height: 36px;
  padding: 0 5px;
  font-size: 11px;
}

.bulk-print-list {
  display: grid;
  max-height: 500px;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
}

.bulk-print-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 34px 66px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--color-rule);
  border-radius: 10px;
  background: var(--color-white);
  padding: 9px 10px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.bulk-print-item.is-selected {
  border-color: rgb(var(--brand-rgb) / 45%);
  background: var(--color-accent-soft);
  box-shadow: inset 3px 0 0 var(--color-accent);
}

.bulk-design-check {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  cursor: pointer;
}

.bulk-design-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.bulk-design-check span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--color-rule-2);
  border-radius: 6px;
  background: #fff;
  color: transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.bulk-design-check span svg {
  width: 14px;
  height: 14px;
}

.bulk-design-check input:checked + span {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

.bulk-design-check input:focus-visible + span {
  outline: 3px solid rgb(var(--brand-rgb) / 18%);
  outline-offset: 2px;
}

.bulk-design-mini {
  position: relative;
  display: grid;
  width: 66px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--color-rule-2);
  border-radius: 6px;
  background: #fff;
  padding: 6px;
  text-align: center;
}

.bulk-design-mini::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--mini-accent);
  content: "";
}

.bulk-design-mini b {
  max-width: 100%;
  overflow: hidden;
  color: var(--color-ink);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-design-mini small {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 5px;
}

.bulk-design-info {
  display: grid;
  min-width: 0;
}

.bulk-design-info b {
  overflow: hidden;
  color: var(--color-ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-design-info small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-copy-field {
  display: grid;
  gap: 4px;
  color: var(--color-muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.bulk-copy-field input {
  width: 70px;
  min-height: 36px;
  border: 1px solid var(--color-rule-2);
  border-radius: 7px;
  background: #fff;
  color: var(--color-ink);
  padding: 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.bulk-copy-field input:disabled {
  background: var(--color-paper-2);
  color: var(--color-muted);
}

.bulk-print-settings {
  display: grid;
  gap: 13px;
  padding: 20px;
}

.bulk-print-settings > div:first-child {
  display: grid;
}

.bulk-print-settings h3 {
  margin: 3px 0 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 18px;
}

.bulk-print-settings > label,
.bulk-print-settings .form-two > label {
  display: grid;
  gap: 6px;
  color: var(--color-ink-2);
  font-size: 11px;
  font-weight: 650;
}

.bulk-print-settings select {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--color-ink);
  padding: 0 11px;
  font-size: 13px;
}

.bulk-cut-option {
  margin: 0;
  border-color: var(--color-rule);
  background: var(--color-paper-2);
}

.bulk-print-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--color-rule);
  border-radius: 10px;
  background: var(--color-paper-2);
}

.bulk-print-summary span {
  display: grid;
  min-width: 0;
  justify-items: center;
  padding: 11px 5px;
  text-align: center;
}

.bulk-print-summary span + span {
  border-left: 1px solid var(--color-rule);
}

.bulk-print-summary b {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 20px;
}

.bulk-print-summary small {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .055em;
}

.bulk-print-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  color: var(--color-muted);
  font-size: 10px;
  line-height: 1.45;
}

.bulk-print-tip svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--color-accent);
}

.bulk-print-submit {
  width: 100%;
  justify-content: center;
}

.bulk-print-empty {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px dashed var(--color-rule-2);
  border-radius: 10px;
  background: var(--color-paper-2);
  padding: 18px;
}

.bulk-print-empty > svg {
  width: 28px;
  color: var(--color-accent);
}

.bulk-print-empty > span {
  display: grid;
}

.bulk-print-empty b {
  color: var(--color-ink);
  font-size: 12px;
}

.bulk-print-empty small {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 10px;
}

.home-leaderboard {
  padding: 16px;
}

.leaderboard-head {
  position: relative;
  display: flex;
  min-height: 126px;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0;
  border: 1px solid #0b4683;
  border-radius: 12px;
  background:
    radial-gradient(circle at 90% -10%, rgb(66 153 255 / 42%), transparent 35%),
    linear-gradient(130deg, #071b34 0%, #073f7c 54%, #0064cc 100%);
  color: #fff;
  padding: 22px 24px;
}

.leaderboard-head::after {
  position: absolute;
  right: 30%;
  bottom: -56px;
  width: 170px;
  height: 170px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 50%;
  content: "";
}

.leaderboard-heading {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  z-index: 1;
}

.leaderboard-heading > span:last-child {
  display: grid;
  min-width: 0;
}

.leaderboard-emblem {
  display: grid;
  width: 50px;
  height: 50px;
  flex: none;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 12px;
  background: rgb(255 255 255 / 12%);
  color: #ffd76a;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 14%);
}

.leaderboard-emblem svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.8;
}

.leaderboard-heading small {
  color: #a9d1ff;
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

.leaderboard-heading h2 {
  margin: 3px 0 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 29px);
  font-weight: 650;
  letter-spacing: -.035em;
}

.leaderboard-heading p {
  margin: 5px 0 0;
  color: rgb(255 255 255 / 70%);
  font-size: 11px;
  line-height: 1.45;
}

.leaderboard-note {
  position: relative;
  display: grid;
  min-width: 218px;
  min-height: 72px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 11px;
  background: rgb(255 255 255 / 11%);
  color: #fff;
  padding: 10px 13px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%);
  white-space: normal;
  z-index: 1;
}

.leaderboard-note-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 9px;
  background: #fff;
  color: var(--color-accent);
}

.leaderboard-note-icon svg {
  width: 19px;
  height: 19px;
  color: inherit;
}

.leaderboard-note > span:last-child {
  display: grid;
  min-width: 0;
}

.leaderboard-note small {
  color: #a9d1ff;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
}

.leaderboard-note b {
  margin-top: 2px;
  color: #fff;
  font-size: 13px;
}

.leaderboard-note em {
  color: rgb(255 255 255 / 70%);
  font-size: 9px;
  font-style: normal;
}

.leaderboard-list {
  margin-top: 13px;
}

.leaderboard-item {
  position: relative;
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.leaderboard-item:hover {
  border-color: var(--color-rule-2);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.leaderboard-item.is-first {
  min-height: 94px;
  border-color: #e2c46e;
  background:
    radial-gradient(circle at 92% 5%, rgb(255 204 46 / 24%), transparent 30%),
    linear-gradient(125deg, #fffaf0 0%, #fff 47%, #eef5ff 100%);
  box-shadow: inset 4px 0 0 #e6b934, 0 10px 24px -20px rgb(132 92 0 / 60%);
}

.leaderboard-item.is-first::after {
  position: absolute;
  top: 8px;
  right: 9px;
  color: rgb(152 100 0 / 9%);
  content: "01";
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.leaderboard-item.is-second .leaderboard-rank {
  border-color: #c7cdd5;
  background: linear-gradient(145deg, #fff, #e8edf3);
  color: #66717f;
}

.leaderboard-item.is-third .leaderboard-rank {
  border-color: #dcb28d;
  background: linear-gradient(145deg, #fff9f3, #f2d5bd);
  color: #9b5a2c;
}

.leaderboard-user em.is-leader {
  background: #b97800;
}

.leaderboard-score small {
  max-width: 72px;
  line-height: 1.2;
  text-align: right;
  white-space: normal;
}

.loyalty-program-card {
  position: relative;
}

.loyalty-program-card.is-newly-created {
  border-color: #0b8f57;
  box-shadow: 0 0 0 4px rgb(11 143 87 / 12%), 0 20px 42px -28px rgb(6 95 70 / 70%);
  animation: created-card-arrival .52s cubic-bezier(.2, .8, .2, 1) both;
}

.loyalty-created-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgb(255 255 255 / 38%);
  border-radius: 999px;
  background: #08794a;
  color: #fff;
  padding: 0 10px;
  box-shadow: 0 8px 18px -11px rgb(3 75 44 / 90%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .02em;
  z-index: 4;
}

.loyalty-created-badge svg {
  width: 13px;
  height: 13px;
}

@keyframes created-card-arrival {
  from {
    opacity: .55;
    transform: translateY(12px) scale(.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.community-post-media,
.post-detail-media {
  display: grid;
  width: 100%;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--color-rule);
  border-radius: 11px;
  background:
    linear-gradient(45deg, rgb(0 100 204 / 3%) 25%, transparent 25%, transparent 75%, rgb(0 100 204 / 3%) 75%),
    linear-gradient(45deg, rgb(0 100 204 / 3%) 25%, #f7f9fc 25%, #f7f9fc 75%, rgb(0 100 204 / 3%) 75%);
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
}

.community-post-media {
  max-height: 340px;
  margin-top: 13px;
}

.community-post-copy .community-post-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 338px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.post-detail-media {
  max-height: min(620px, 72svh);
  margin-top: 17px;
  border-radius: 13px;
}

.post-detail-media .post-detail-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(618px, 72svh);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.post-image-preview {
  display: grid;
  max-height: 360px;
  place-items: center;
}

.post-image-preview[hidden] {
  display: none;
}

.post-image-preview img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 360px;
  margin: auto;
}

.product-promotion-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgb(255 255 255 / 42%);
  border-radius: 999px;
  color: #fff;
  padding: 0 10px;
  box-shadow: 0 9px 18px -12px rgb(20 25 31 / 85%);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
  z-index: 3;
}

.product-promotion-badge svg {
  width: 13px;
  height: 13px;
}

.product-promotion-badge.is-offer {
  background: #c33a21;
}

.product-promotion-badge.is-promotion {
  background: #0064cc;
}

.product-promotion-badge.is-clearance {
  background: #252a31;
}

.discount-badge.has-promotion {
  right: 10px;
  left: auto;
}

.promotion-select select {
  font-weight: 650;
}

.promotion-select > small {
  margin-top: 1px;
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 450;
  line-height: 1.45;
}

.product-sale-tag {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 960px) {
  .bulk-print-layout {
    grid-template-columns: 1fr;
  }

  .bulk-print-selection {
    border-right: 0;
    border-bottom: 1px solid var(--color-rule);
  }

  .bulk-print-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bulk-print-settings > div:first-child,
  .bulk-cut-option,
  .bulk-print-summary,
  .bulk-print-tip,
  .bulk-print-submit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .page-heading-actions {
    width: 100%;
    justify-content: stretch;
  }

  .page-heading-actions > button {
    flex: 1 1 180px;
    justify-content: center;
  }

  .bulk-print-header {
    align-items: flex-start;
    padding: 17px;
  }

  .bulk-print-header > div {
    align-items: flex-start;
  }

  .bulk-print-header p {
    font-size: 11px;
  }

  .bulk-print-selection,
  .bulk-print-settings {
    padding: 16px;
  }

  .leaderboard-head {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 15px;
    padding: 19px;
  }

  .leaderboard-note {
    width: 100%;
    min-width: 0;
  }

  .leaderboard-list {
    margin-top: 10px;
  }

  .community-post-media {
    max-height: 300px;
  }

  .community-post-copy .community-post-media img {
    max-height: 298px;
  }

  .post-detail-media,
  .post-detail-media .post-detail-image {
    max-height: 65svh;
  }
}

@media (max-width: 560px) {
  .page-heading-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bulk-print-icon {
    width: 40px;
    height: 40px;
  }

  .bulk-print-header h2 {
    font-size: 18px;
  }

  .bulk-print-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .bulk-print-toolbar > span:last-child {
    width: 100%;
    justify-content: space-between;
  }

  .bulk-print-item {
    grid-template-columns: 30px 58px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .bulk-design-check {
    width: 30px;
  }

  .bulk-design-mini {
    width: 58px;
    height: 38px;
  }

  .bulk-copy-field {
    grid-column: 2 / -1;
    grid-template-columns: minmax(0, 1fr) 74px;
    align-items: center;
  }

  .bulk-copy-field input {
    width: 74px;
  }

  .bulk-print-settings {
    grid-template-columns: 1fr;
  }

  .bulk-print-settings > div:first-child,
  .bulk-cut-option,
  .bulk-print-summary,
  .bulk-print-tip,
  .bulk-print-submit {
    grid-column: auto;
  }

  .leaderboard-heading {
    align-items: flex-start;
  }

  .leaderboard-emblem {
    width: 42px;
    height: 42px;
  }

  .leaderboard-heading h2 {
    font-size: 22px;
  }

  .leaderboard-heading p {
    font-size: 10px;
  }

  .leaderboard-item.is-first::after {
    display: none;
  }

  .leaderboard-score small {
    max-width: 52px;
  }

  .community-post-media {
    max-height: 260px;
    margin-top: 10px;
    border-radius: 8px;
  }

  .community-post-copy .community-post-media img {
    max-height: 258px;
  }

  .post-image-preview,
  .post-image-preview img {
    max-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loyalty-program-card.is-newly-created {
    animation: none;
  }
}

/* Cobalt 2.6 · galería ampliable, controles, impresión visible y Top renovado */
.public-products-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 410px));
  align-items: start;
  justify-content: center;
}

.public-product-card {
  width: 100%;
  max-width: 410px;
  height: auto;
}

.public-product-media {
  min-height: 0;
  aspect-ratio: 4 / 3;
  padding: 10px;
}

.public-product-image-frame {
  inset: 10px;
  width: auto;
  height: auto;
  appearance: none;
  border: 1px solid #dce4ef;
  background:
    radial-gradient(circle at 50% 35%, #fff 0%, #f7f9fc 68%, #eef3f9 100%);
  color: inherit;
  padding: 0;
  cursor: zoom-in;
  font: inherit;
  text-align: inherit;
}

.public-product-image-frame:focus-visible {
  outline: 3px solid rgb(var(--brand-rgb) / 24%);
  outline-offset: 3px;
}

.public-product-image-backdrop {
  display: none;
}

.public-product-image-main {
  width: 100%;
  height: 100%;
  padding: 14px;
  object-fit: contain;
}

.public-product-image-expand {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 8px;
  background: rgb(8 25 45 / 88%);
  color: #fff;
  padding: 0 10px;
  box-shadow: 0 8px 22px -12px rgb(0 0 0 / 72%);
  opacity: .92;
  transform: translateY(0);
  transition: background .16s ease, opacity .16s ease, transform .16s ease;
  z-index: 3;
}

.public-product-image-expand svg {
  width: 15px;
  height: 15px;
}

.public-product-image-expand small {
  color: inherit;
  font-size: 10px;
  font-weight: 750;
}

.public-product-image-frame:hover .public-product-image-expand {
  background: var(--color-accent);
  opacity: 1;
  transform: translateY(-1px);
}

.public-product-image-frame.is-error {
  cursor: default;
}

.public-product-image-frame.is-error .public-product-image-expand {
  display: none;
}

.image-viewer-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgb(4 13 24 / 25%);
  z-index: 125;
}

.image-viewer-modal[hidden] {
  display: none !important;
}

.image-viewer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  background: rgb(4 13 24 / 78%);
  backdrop-filter: blur(5px);
  cursor: zoom-out;
}

.image-viewer-panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1120px, 100%);
  max-height: calc(100svh - 44px);
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgb(255 255 255 / 34%);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 30px 90px rgb(0 0 0 / 38%);
  animation: post-modal-in .2s ease both;
}

.image-viewer-header {
  display: flex;
  min-height: 62px;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--color-rule);
  background: #fff;
  padding: 0 16px 0 20px;
}

.image-viewer-header > span {
  display: grid;
  min-width: 0;
}

.image-viewer-header small {
  color: var(--color-accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
}

.image-viewer-header b {
  overflow: hidden;
  margin-top: 2px;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-viewer-header > button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border: 1px solid var(--color-rule-2);
  border-radius: 9px;
  background: #fff;
  color: var(--color-ink-2);
  cursor: pointer;
}

.image-viewer-header > button:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.image-viewer-header svg {
  width: 18px;
  height: 18px;
}

.image-viewer-stage {
  position: relative;
  display: grid;
  min-height: 260px;
  flex: 1;
  overflow: hidden;
  place-items: center;
  background:
    linear-gradient(45deg, rgb(0 100 204 / 3%) 25%, transparent 25%, transparent 75%, rgb(0 100 204 / 3%) 75%),
    linear-gradient(45deg, rgb(0 100 204 / 3%) 25%, #f3f6fa 25%, #f3f6fa 75%, rgb(0 100 204 / 3%) 75%);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
  padding: 20px;
}

.image-viewer-stage > img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100svh - 180px);
  object-fit: contain;
  transition: opacity .16s ease;
}

.image-viewer-loading,
.image-viewer-error {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--color-muted);
  text-align: center;
}

.image-viewer-loading svg {
  width: 27px;
  height: 27px;
  color: var(--color-accent);
  animation: modal-spin .8s linear infinite;
}

.image-viewer-stage.is-loading > img {
  opacity: .16;
}

.image-viewer-stage.is-loading .image-viewer-loading {
  display: grid;
}

.image-viewer-stage.is-error > img,
.image-viewer-stage.is-error .image-viewer-loading {
  display: none;
}

.image-viewer-stage.is-error .image-viewer-error {
  display: grid;
}

.image-viewer-error svg {
  width: 38px;
  height: 38px;
  color: var(--color-accent);
}

.image-viewer-error b {
  color: var(--color-ink);
  font-size: 14px;
}

.image-viewer-error small {
  color: var(--color-muted);
  font-size: 11px;
}

.image-viewer-panel > footer {
  display: flex;
  min-height: 60px;
  flex: none;
  align-items: center;
  gap: 11px;
  border-top: 1px solid var(--color-rule);
  background: #fff;
  padding: 10px 20px;
}

.image-viewer-panel > footer > svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--color-accent);
}

.image-viewer-panel > footer > span {
  display: grid;
  min-width: 0;
}

.image-viewer-panel > footer b,
.image-viewer-panel > footer small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-viewer-panel > footer b {
  color: var(--color-ink);
  font-size: 12px;
}

.image-viewer-panel > footer small {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 10px;
}

.post-detail-image-button {
  position: relative;
  appearance: none;
  color: inherit;
  padding: 0;
  cursor: zoom-in;
}

.post-detail-image-button > span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  background: rgb(8 25 45 / 88%);
  color: #fff;
  padding: 0 10px;
  box-shadow: 0 8px 20px -12px rgb(0 0 0 / 75%);
  font-size: 10px;
  font-weight: 750;
}

.post-detail-image-button > span svg {
  width: 15px;
  height: 15px;
}

.post-detail-image-button:hover > span {
  background: var(--color-accent);
}

.option-row {
  position: relative;
  min-height: 68px;
  border-color: #d8e1ec;
  border-radius: 11px;
  background: #fff;
  padding: 10px 12px;
  box-shadow: 0 5px 16px -16px rgb(18 43 73 / 65%);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.option-row:hover {
  border-color: rgb(var(--brand-rgb) / 42%);
  background: #f9fbff;
  box-shadow: 0 9px 22px -19px rgb(var(--brand-rgb) / 70%);
}

.option-row input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.option-row > span {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 42px;
  align-content: center;
  padding-left: 44px;
}

.option-row > span::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 30px;
  height: 30px;
  border: 1.5px solid #b8c5d4;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgb(15 35 60 / 5%);
  content: "";
  transform: translateY(-50%);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.option-row > span::after {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 8px;
  height: 14px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  content: "";
  opacity: 0;
  transform: translateY(-62%) rotate(45deg) scale(.7);
  transition: opacity .14s ease, transform .14s ease;
}

.option-row input[type="checkbox"]:checked + span::before {
  border-color: var(--color-accent);
  background: var(--color-accent);
  box-shadow: 0 6px 15px -9px rgb(var(--brand-rgb) / 95%);
}

.option-row input[type="checkbox"]:checked + span::after {
  opacity: 1;
  transform: translateY(-62%) rotate(45deg) scale(1);
}

.option-row input[type="checkbox"]:focus-visible + span::before {
  outline: 3px solid rgb(var(--brand-rgb) / 20%);
  outline-offset: 3px;
}

.option-row input[type="checkbox"]:disabled + span {
  opacity: .58;
}

.option-row b {
  color: var(--color-ink);
  font-size: 13px;
}

.option-row small {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 10px;
  line-height: 1.4;
}

.home-leaderboard {
  overflow: hidden;
  border-color: #d8e3f0;
  padding: 0;
}

.leaderboard-head {
  min-height: 0;
  overflow: visible;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #dce6f2;
  border-radius: 0;
  background:
    radial-gradient(circle at 92% 0, rgb(0 100 204 / 13%), transparent 34%),
    linear-gradient(135deg, #fff 0%, #f3f8ff 100%);
  color: var(--color-ink);
  padding: 20px 22px;
}

.leaderboard-head::after {
  display: none;
}

.leaderboard-emblem {
  border-color: rgb(var(--brand-rgb) / 20%);
  background: var(--color-accent);
  color: #ffdf78;
  box-shadow: 0 12px 24px -16px rgb(var(--brand-rgb) / 95%);
}

.leaderboard-heading small {
  color: var(--color-accent);
}

.leaderboard-heading h2 {
  color: var(--color-ink);
  font-size: clamp(22px, 2vw, 27px);
}

.leaderboard-heading p {
  color: var(--color-muted);
  font-size: 11px;
}

.leaderboard-note {
  min-width: 245px;
  min-height: 66px;
  border-color: rgb(var(--brand-rgb) / 16%);
  background: rgb(255 255 255 / 82%);
  color: var(--color-ink);
  box-shadow: 0 10px 25px -22px rgb(17 57 102 / 65%);
}

.leaderboard-note-icon {
  background: var(--color-accent-soft);
}

.leaderboard-note small {
  color: var(--color-accent);
}

.leaderboard-note b {
  color: var(--color-ink);
}

.leaderboard-note em {
  color: var(--color-muted);
}

.leaderboard-list {
  display: block;
  margin: 0;
  background: #f7f9fc;
  padding: 24px;
}

.leaderboard-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 13px;
  padding-top: 18px;
}

.leaderboard-podium.has-1 {
  grid-template-columns: minmax(260px, 430px);
  justify-content: center;
}

.leaderboard-podium.has-2 {
  grid-template-columns: repeat(2, minmax(260px, 390px));
  justify-content: center;
}

.leaderboard-podium-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 218px;
  overflow: hidden;
  align-items: center;
  flex-direction: column;
  border: 1px solid #dce4ed;
  border-radius: 13px;
  background: #fff;
  padding: 43px 15px 15px;
  box-shadow: 0 13px 28px -25px rgb(16 42 72 / 80%);
  text-align: center;
}

.leaderboard-podium-card.is-position-1 {
  min-height: 245px;
  border-color: #d5ad45;
  background:
    radial-gradient(circle at 50% 0, rgb(255 220 116 / 25%), transparent 30%),
    linear-gradient(155deg, #09284a 0%, #064a91 58%, #0064cc 100%);
  color: #fff;
  box-shadow: 0 18px 40px -24px rgb(0 68 145 / 80%);
}

.leaderboard-podium-card.is-current:not(.is-position-1) {
  border-color: rgb(var(--brand-rgb) / 42%);
  box-shadow: inset 0 0 0 2px rgb(var(--brand-rgb) / 8%);
}

.leaderboard-podium-position {
  position: absolute;
  top: 10px;
  left: 50%;
  display: inline-flex;
  min-width: 43px;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #d6dee8;
  border-radius: 999px;
  background: #f5f7fa;
  color: #647183;
  padding: 0 9px;
  transform: translateX(-50%);
}

.leaderboard-podium-position svg {
  width: 14px;
  height: 14px;
}

.leaderboard-podium-position b {
  font-size: 10px;
}

.is-position-1 .leaderboard-podium-position {
  border-color: rgb(255 226 137 / 50%);
  background: #f2c852;
  color: #523600;
  box-shadow: 0 8px 18px -12px #000;
}

.leaderboard-podium-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  flex: none;
  overflow: hidden;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 0 1px #dbe3ed, 0 9px 21px -14px rgb(8 34 63 / 80%);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 750;
}

.is-position-1 .leaderboard-podium-avatar {
  width: 68px;
  height: 68px;
  background: #fff;
  color: var(--color-accent);
  box-shadow: 0 0 0 2px #e6be54, 0 12px 24px -14px #001c3b;
}

.leaderboard-podium-avatar.has-photo img,
.leaderboard-row-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-podium-user {
  display: grid;
  width: 100%;
  min-width: 0;
  justify-items: center;
  margin-top: 10px;
}

.leaderboard-podium-user > span {
  display: flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.leaderboard-podium-user b {
  overflow: hidden;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-position-1 .leaderboard-podium-user b {
  color: #fff;
  font-size: 16px;
}

.leaderboard-podium-user em,
.leaderboard-row-user em {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  padding: 0 7px;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.is-position-1 .leaderboard-podium-user em {
  background: rgb(255 255 255 / 16%);
  color: #fff;
}

.leaderboard-podium-user > small {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 9px;
}

.is-position-1 .leaderboard-podium-user > small {
  color: #b8d8fa;
}

.leaderboard-podium-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.leaderboard-podium-score strong {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -.05em;
  line-height: 1;
}

.is-position-1 .leaderboard-podium-score strong {
  color: #ffdf78;
  font-size: 34px;
}

.leaderboard-podium-score small {
  max-width: 62px;
  color: var(--color-muted);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
}

.is-position-1 .leaderboard-podium-score small {
  color: #d9e9fa;
}

.leaderboard-podium-activity {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 11px;
  color: var(--color-muted);
  font-size: 8px;
  line-height: 1.3;
}

.leaderboard-podium-activity svg {
  width: 12px;
  height: 12px;
  flex: none;
  color: var(--color-accent);
}

.is-position-1 .leaderboard-podium-activity {
  color: #b8d8fa;
}

.is-position-1 .leaderboard-podium-activity svg {
  color: #ffdf78;
}

.leaderboard-ranking {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid #dce4ed;
  border-radius: 12px;
  background: #fff;
}

.leaderboard-ranking > header {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-rule);
  background: #fbfcfe;
  padding: 9px 14px;
}

.leaderboard-ranking > header > span {
  display: grid;
}

.leaderboard-ranking > header small {
  color: var(--color-accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
}

.leaderboard-ranking > header b {
  margin-top: 2px;
  color: var(--color-ink);
  font-size: 12px;
}

.leaderboard-ranking > header > svg {
  width: 19px;
  height: 19px;
  color: var(--color-accent);
}

.leaderboard-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 32px 40px minmax(0, 1fr) minmax(72px, auto);
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
}

.leaderboard-row + .leaderboard-row {
  border-top: 1px solid var(--color-rule);
}

.leaderboard-row.is-current {
  background: var(--color-accent-soft);
}

.leaderboard-row-position {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--color-ink-2);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 750;
}

.leaderboard-row-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.leaderboard-row-user {
  display: grid;
  min-width: 0;
}

.leaderboard-row-user > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.leaderboard-row-user b {
  overflow: hidden;
  color: var(--color-ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-row-user > small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-row-score {
  display: grid;
  min-width: 62px;
  justify-items: end;
}

.leaderboard-row-score b {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
}

.leaderboard-row-score small {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 8px;
}

@media (max-width: 960px) {
  .leaderboard-list {
    padding: 18px;
  }

  .leaderboard-podium {
    gap: 9px;
  }

  .leaderboard-podium-card {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (max-width: 720px) {
  .public-products-grid {
    grid-template-columns: minmax(0, 410px);
  }

  .public-product-media {
    min-height: 0;
  }

  .image-viewer-modal {
    padding: 10px;
  }

  .image-viewer-panel {
    max-height: calc(100svh - 20px);
    border-radius: 12px;
  }

  .image-viewer-stage {
    min-height: 210px;
    padding: 10px;
  }

  .image-viewer-stage > img {
    max-height: calc(100svh - 156px);
  }

  .image-viewer-panel > footer {
    min-height: 54px;
    padding: 8px 15px;
  }

  .leaderboard-head {
    padding: 18px;
  }

  .leaderboard-list {
    padding: 14px;
  }

  .leaderboard-podium,
  .leaderboard-podium.has-1,
  .leaderboard-podium.has-2 {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding-top: 0;
  }

  .leaderboard-podium-card,
  .leaderboard-podium-card.is-position-1 {
    min-height: 0;
    padding: 43px 15px 15px;
  }

  .leaderboard-podium-card.is-position-1 {
    order: -1;
  }

  .leaderboard-podium-avatar,
  .is-position-1 .leaderboard-podium-avatar {
    width: 62px;
    height: 62px;
  }

  .leaderboard-podium-activity {
    margin-top: 3px;
  }
}

@media (max-width: 440px) {
  .public-product-image-expand small {
    display: none;
  }

  .public-product-image-expand {
    width: 36px;
    justify-content: center;
    padding: 0;
  }

  .image-viewer-header {
    padding-left: 14px;
  }

  .image-viewer-header b {
    max-width: 235px;
    font-size: 14px;
  }

  .option-row {
    min-height: 72px;
    padding: 9px 10px;
  }

  .leaderboard-heading {
    gap: 11px;
  }

  .leaderboard-emblem {
    width: 40px;
    height: 40px;
  }

  .leaderboard-heading h2 {
    font-size: 21px;
  }

  .leaderboard-note {
    min-height: 61px;
  }

  .leaderboard-row {
    grid-template-columns: 28px 36px minmax(0, 1fr) 54px;
    gap: 8px;
    padding: 9px 10px;
  }

  .leaderboard-row-avatar {
    width: 36px;
    height: 36px;
  }

  .leaderboard-row-user > small {
    font-size: 8px;
  }

  .leaderboard-row-score {
    min-width: 50px;
  }

  .leaderboard-row-score b {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-viewer-panel {
    animation: none;
  }

  .public-product-image-main,
  .public-product-image-expand,
  .option-row,
  .option-row > span::before,
  .option-row > span::after {
    transition: none;
  }
}

/* Cobalt 2.7.1 · Inicio móvil estable, fotografías proporcionadas y Top compacto */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  scrollbar-gutter: stable;
}

body.studio-body,
.app-shell,
.app-main,
.workspace,
.view {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.studio-body {
  position: relative;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.workspace,
[data-view-panel] {
  overflow-x: clip;
}

.home-save-notice {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid rgb(var(--brand-rgb) / 16%);
  border-radius: 16px;
  background:
    linear-gradient(105deg, rgb(var(--brand-rgb) / 5%) 0, transparent 42%),
    #fff;
  padding: 15px 15px 15px 18px;
  box-shadow: 0 10px 28px -24px rgb(5 61 120 / 75%);
}

.home-save-notice::before {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 0;
  width: 4px;
  border-radius: 0 8px 8px 0;
  background: var(--color-accent);
  content: "";
  pointer-events: none;
}

.home-save-notice::after {
  display: none;
  content: none;
}

.home-save-notice-icon {
  position: relative;
  display: grid;
  width: 56px;
  height: 56px;
  flex: none;
  place-items: center;
  border: 1px solid rgb(var(--brand-rgb) / 18%);
  border-radius: 14px;
  background: rgb(var(--brand-rgb) / 8%);
  color: var(--color-accent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 85%);
}

.home-save-notice-icon > svg:first-child {
  width: 27px;
  height: 27px;
  stroke-width: 1.9;
}

.home-save-notice-icon > svg:last-child {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 21px;
  height: 21px;
  border: 2px solid #fff;
  border-radius: 7px;
  background: var(--color-accent);
  color: #fff;
  padding: 3px;
  box-shadow: 0 5px 12px -8px rgb(var(--brand-rgb) / 90%);
}

.home-save-notice-copy {
  display: grid;
  min-width: 0;
}

.home-save-notice-copy small {
  color: var(--color-accent);
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}

.home-save-notice-copy h2 {
  margin: 3px 0 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.home-save-notice-copy p {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--color-muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.home-save-notice-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.home-install-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--color-accent);
  border-radius: 10px;
  background: var(--color-accent);
  color: #fff;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 750;
  box-shadow: 0 8px 18px -14px rgb(var(--brand-rgb) / 95%);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.home-install-button:hover {
  border-color: var(--color-accent-hover);
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.home-install-button svg {
  width: 16px;
  height: 16px;
}

.home-save-notice-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgb(var(--brand-rgb) / 5%);
  color: var(--color-muted);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.home-save-notice-close:hover {
  border-color: transparent;
  background: rgb(var(--brand-rgb) / 10%);
  color: var(--color-accent);
}

.home-save-notice-close svg {
  width: 17px;
  height: 17px;
}

/* La altura se adapta a la proporción real para que una foto vertical no quede diminuta. */
.public-product-media {
  aspect-ratio: 4 / 3;
}

.public-product-media.is-portrait {
  max-height: 460px;
  aspect-ratio: 4 / 5;
}

.public-product-media.is-square {
  max-height: 430px;
  aspect-ratio: 1;
}

.public-product-media.is-landscape {
  aspect-ratio: 4 / 3;
}

.public-product-media.is-wide {
  aspect-ratio: 16 / 10;
}

.public-product-image-frame {
  inset: 8px;
}

.public-product-image-main {
  max-width: 100%;
  max-height: 100%;
  padding: 3px;
  image-rendering: auto;
  object-fit: contain;
  object-position: center;
}

/* Clasificación compacta: la información se conserva sin convertir al líder en una tarjeta gigante. */
.home-leaderboard {
  margin-bottom: 18px;
}

.leaderboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 17px 18px;
}

.leaderboard-heading {
  gap: 12px;
}

.leaderboard-emblem {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}

.leaderboard-emblem svg {
  width: 22px;
  height: 22px;
}

.leaderboard-heading h2 {
  font-size: clamp(21px, 2vw, 25px);
}

.leaderboard-heading p {
  max-width: 520px;
  margin-top: 3px;
  font-size: 10px;
}

.leaderboard-note {
  display: grid;
  width: auto;
  min-width: 210px;
  min-height: 52px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  border-radius: 10px;
  padding: 7px 10px;
}

.leaderboard-note-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.leaderboard-note-icon svg {
  width: 17px;
  height: 17px;
}

.leaderboard-note small {
  font-size: 6.5px;
}

.leaderboard-note b {
  margin-top: 0;
  font-size: 11px;
  line-height: 1.25;
}

.leaderboard-note em {
  font-size: 8px;
}

.leaderboard-list {
  margin: 0;
  padding: 13px;
}

.leaderboard-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.leaderboard-entry {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 76px;
  grid-template-columns: 34px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  border: 1px solid #dce4ed;
  border-radius: 11px;
  background: #fff;
  padding: 9px 10px;
  box-shadow: 0 8px 20px -22px rgb(13 45 80 / 70%);
}

.leaderboard-entry.is-position-1 {
  grid-column: 1 / -1;
  border-color: #dec46e;
  background:
    radial-gradient(circle at 94% 0, rgb(255 213 80 / 18%), transparent 28%),
    linear-gradient(120deg, #fffdf6 0%, #fff 48%, #eef6ff 100%);
  box-shadow: inset 3px 0 0 #d9a921, 0 12px 25px -23px rgb(79 57 0 / 68%);
}

.leaderboard-entry.is-position-2 {
  border-left: 3px solid #a9b4c1;
}

.leaderboard-entry.is-position-3 {
  border-left: 3px solid #c98754;
}

.leaderboard-entry.is-current:not(.is-position-1) {
  border-color: rgb(var(--brand-rgb) / 35%);
  background: var(--color-accent-soft);
}

.leaderboard-entry-rank {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #dce4ed;
  border-radius: 9px;
  background: #f5f7fa;
  color: #5f6a78;
}

.leaderboard-entry-rank b {
  font-family: var(--font-display);
  font-size: 11px;
}

.is-position-1 .leaderboard-entry-rank {
  border-color: #e7c960;
  background: #ffedaa;
  color: #805500;
  box-shadow: 0 7px 16px -13px #5e3c00;
}

.is-position-1 .leaderboard-entry-rank svg {
  width: 18px;
  height: 18px;
  fill: rgb(152 98 0 / 12%);
}

.leaderboard-entry-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 0 1px #d8e1eb;
  font-size: 11px;
  font-weight: 800;
}

.leaderboard-entry-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-entry-user {
  display: grid;
  min-width: 0;
}

.leaderboard-entry-user > span:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.leaderboard-entry-user b {
  overflow: hidden;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-entry-user em {
  display: inline-flex;
  min-height: 18px;
  flex: none;
  align-items: center;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  padding: 0 6px;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
}

.leaderboard-entry-user > small {
  overflow: hidden;
  margin-top: 1px;
  color: var(--color-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-entry-activity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  margin-top: 2px;
  color: #6c7682;
  font-size: 8px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-entry-activity svg {
  width: 11px;
  height: 11px;
  flex: none;
  color: var(--color-accent);
}

.leaderboard-entry-score {
  display: grid;
  min-width: 58px;
  justify-items: center;
  border: 1px solid #dae5f0;
  border-radius: 9px;
  background: #f2f7fc;
  padding: 7px 8px;
}

.leaderboard-entry-score strong {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: -.04em;
  line-height: 1;
}

.leaderboard-entry-score small {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 7px;
  font-weight: 750;
  line-height: 1;
}

.is-position-1 .leaderboard-entry-score {
  border-color: #e5ce81;
  background: #fff;
}

@media (max-width: 960px) {
  .studio-body {
    touch-action: pan-y pinch-zoom;
  }

  .workspace {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .bottom-nav {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    width: auto;
    max-width: calc(100vw - 20px);
    transform: translateZ(0);
  }

  .leaderboard-entries {
    grid-template-columns: 1fr;
  }

  .leaderboard-entry.is-position-1 {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .home-save-notice {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    margin-bottom: 14px;
    border-radius: 14px;
    padding: 14px 12px 14px 16px;
  }

  .home-save-notice::before {
    top: 13px;
    bottom: 13px;
  }

  .home-save-notice-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .home-save-notice-icon > svg:first-child {
    width: 23px;
    height: 23px;
  }

  .home-save-notice-icon > svg:last-child {
    width: 19px;
    height: 19px;
    border-radius: 6px;
  }

  .home-save-notice-copy h2 {
    font-size: 16px;
  }

  .home-save-notice-copy p {
    font-size: 10.5px;
  }

  .home-save-notice-actions {
    align-items: flex-start;
  }

  .public-product-media.is-portrait {
    height: clamp(330px, 108vw, 420px);
    max-height: 420px;
    aspect-ratio: auto;
  }

  .public-product-media.is-square {
    max-height: 390px;
  }

  .public-product-image-main {
    padding: 0;
  }

  .leaderboard-head {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px;
  }

  .leaderboard-note {
    width: 100%;
    min-width: 0;
  }

  .leaderboard-list {
    padding: 10px;
  }
}

@media (max-width: 560px) {
  .home-save-notice {
    grid-template-columns: 46px minmax(0, 1fr) 36px;
  }

  .home-save-notice-actions {
    display: contents;
  }

  .home-save-notice-close {
    width: 36px;
    height: 36px;
    grid-column: 3;
    grid-row: 1;
  }

  .home-install-button:not([hidden]) {
    display: inline-flex;
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 1px;
  }

  .leaderboard-heading {
    align-items: center;
  }

  .leaderboard-heading h2 {
    font-size: 20px;
  }

  .leaderboard-heading p {
    font-size: 9.5px;
  }

  .leaderboard-entry {
    min-height: 74px;
    grid-template-columns: 30px 38px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 8px;
  }

  .leaderboard-entry-rank {
    width: 29px;
    height: 29px;
    border-radius: 8px;
  }

  .leaderboard-entry-avatar {
    width: 38px;
    height: 38px;
  }

  .leaderboard-entry-user b {
    font-size: 11px;
  }

  .leaderboard-entry-score {
    min-width: 49px;
    padding: 6px;
  }

  .leaderboard-entry-score strong {
    font-size: 17px;
  }
}

@media (max-width: 360px) {
  .workspace {
    padding-right: 12px;
    padding-left: 12px;
  }

  .home-save-notice {
    grid-template-columns: 42px minmax(0, 1fr) 34px;
    gap: 10px;
    padding: 12px 10px 12px 15px;
  }

  .home-save-notice-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }

  .home-save-notice-copy h2 {
    font-size: 14.5px;
  }

  .leaderboard-entry-user > small {
    display: none;
  }

  .leaderboard-entry-activity {
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-save-notice,
  .leaderboard-entry,
  .bottom-nav {
    scroll-behavior: auto;
    transition: none;
  }
}

/* =========================================================
   CHUS.SITE 2.7.4 · MENÚ LATERAL AZUL, FIJO Y PROFESIONAL
   ========================================================= */

.sidebar {
  --menu-blue: #066bcc;
  --menu-blue-dark: #055caf;
  --menu-blue-deep: #064f97;
  --menu-blue-soft: #eef6ff;
  --menu-blue-line: #c9def5;
  --menu-text: #253140;
  --menu-muted: #697586;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  border-right: 1px solid #d9e2ec;
  background: #ffffff;
  padding: 16px 13px 17px;
  box-shadow: 8px 0 28px rgb(15 23 42 / 4%);
}

.sidebar-brand {
  flex: none;
  margin: 1px 4px 14px;
}

.sidebar-account-card {
  flex: none;
  border: 1px solid #dce6f1;
  border-radius: 14px;
  background: #ffffff;
  padding: 11px;
  box-shadow: 0 7px 20px rgb(15 23 42 / 5%);
}

.sidebar-account-main .avatar {
  background: var(--menu-blue);
  box-shadow: 0 0 0 4px var(--menu-blue-soft);
}

.account-plan {
  min-height: 39px;
  border-color: var(--menu-blue-line);
  background: var(--menu-blue-soft);
  color: var(--menu-blue-dark);
}

.account-plan span {
  color: var(--menu-blue-deep);
}

.account-plan:hover {
  border-color: var(--menu-blue);
  background: #e2efff;
}

.sidebar-menu-label {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 15px 6px 8px;
  color: #697586;
  font-family: var(--font-label);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .075em;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar-menu-label small {
  color: #a0a9b4;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .065em;
}

.main-nav {
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  gap: 7px;
  margin-top: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 2px 12px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b9d2eb transparent;
  -webkit-overflow-scrolling: touch;
}

.main-nav::-webkit-scrollbar {
  width: 5px;
}

.main-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #b9d2eb;
}

.nav-group,
.nav-group--loyalty {
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  box-shadow: none;
}

.nav-group.is-open,
.nav-group:has(.nav-item.is-active),
.nav-group--loyalty.is-open,
.nav-group--loyalty:has(.nav-item.is-active) {
  border-color: var(--menu-blue-line);
  background: var(--menu-blue-soft);
  padding: 3px;
  box-shadow: 0 5px 14px rgb(6 107 204 / 7%);
}

.nav-group-title,
.nav-group--loyalty > .nav-group-title,
.nav-group--loyalty > .nav-group-title:hover,
.nav-group--loyalty.is-open > .nav-group-title,
.nav-group--loyalty:has(.nav-item.is-active) > .nav-group-title {
  min-height: 46px;
  gap: 10px;
  border: 1px solid var(--menu-blue);
  border-radius: 10px;
  background: var(--menu-blue);
  color: #ffffff;
  padding: 0 12px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -.012em;
  text-transform: none;
  box-shadow: 0 5px 12px rgb(6 107 204 / 14%);
  transform: none;
}

.nav-group-title:hover,
.nav-group--loyalty > .nav-group-title:hover {
  border-color: var(--menu-blue-dark);
  background: var(--menu-blue-dark);
  color: #ffffff;
  box-shadow: 0 7px 16px rgb(5 92 175 / 19%);
  transform: translateY(-1px);
}

.nav-group.is-open > .nav-group-title,
.nav-group:has(.nav-item.is-active) > .nav-group-title,
.nav-group--loyalty.is-open > .nav-group-title,
.nav-group--loyalty:has(.nav-item.is-active) > .nav-group-title {
  border-color: var(--menu-blue-deep);
  background: var(--menu-blue-deep);
  color: #ffffff;
}

.nav-group-title > svg:first-child,
.nav-group--loyalty > .nav-group-title > svg:first-child {
  width: 20px;
  height: 20px;
  flex: none;
  color: #ffffff;
  padding: 0;
  stroke-width: 2;
}

.nav-group-title span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-group-title .nav-group-chevron,
.nav-group--loyalty > .nav-group-title .nav-group-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: rgb(255 255 255 / 88%);
  opacity: 1;
  stroke-width: 2;
}

.nav-group.is-open .nav-group-items > div {
  gap: 3px;
  padding: 6px 3px 3px;
}

.nav-item,
.nav-group--loyalty .nav-item {
  min-height: 41px;
  border-radius: 8px;
  background: transparent;
  color: #344255;
  padding: 0 10px;
}

.nav-item:hover,
.nav-group--loyalty .nav-item:hover {
  background: #dcecff;
  color: #064f97;
}

.nav-item svg,
.nav-group--loyalty .nav-item svg {
  width: 18px;
  height: 18px;
  color: var(--menu-blue);
}

.nav-item span {
  font-size: 13.5px;
  font-weight: 600;
}

.nav-item.is-active,
.nav-group--loyalty .nav-item.is-active {
  background: var(--menu-blue);
  color: #ffffff;
  box-shadow: 0 4px 10px rgb(6 107 204 / 16%);
}

.nav-item.is-active svg,
.nav-group--loyalty .nav-item.is-active svg {
  color: #ffffff;
}

.nav-item > b {
  min-width: 23px;
  border-radius: 7px;
  background: #dce7f2;
  color: #667586;
  padding: 3px 6px;
}

.nav-item.is-active > b {
  background: rgb(255 255 255 / 18%);
  color: #ffffff;
}

.sidebar-logout {
  min-height: 45px;
  flex: none;
  justify-content: center;
  gap: 9px;
  margin: 10px 0 env(safe-area-inset-bottom, 0);
  border: 1px solid #e7b4b0;
  border-radius: 10px;
  background: #fff7f6;
  color: #c52b23;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 650;
  box-shadow: none;
}

.sidebar-logout:hover {
  border-color: #c52b23;
  background: #c52b23;
  color: #ffffff;
  box-shadow: 0 6px 14px rgb(197 43 35 / 17%);
}

.sidebar-logout:active {
  background: #a9231d;
}

@media (max-height: 760px) and (min-width: 961px) {
  .sidebar {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .sidebar-brand {
    margin-bottom: 10px;
  }

  .sidebar-account-card {
    padding: 9px;
  }

  .sidebar-menu-label {
    margin-top: 11px;
    margin-bottom: 7px;
  }

  .nav-group-title,
  .nav-group--loyalty > .nav-group-title,
  .nav-group--loyalty > .nav-group-title:hover {
    min-height: 43px;
  }

  .main-nav {
    gap: 6px;
    padding-bottom: 8px;
  }

  .sidebar-logout {
    min-height: 42px;
    margin-top: 8px;
  }
}

@media (max-width: 960px) {
  .sidebar {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding-right: 13px;
    padding-left: 13px;
  }

  .sidebar-menu-label {
    margin-top: 14px;
  }

  .main-nav {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 13px;
  }

  .nav-group-title,
  .nav-group--loyalty > .nav-group-title,
  .nav-group--loyalty > .nav-group-title:hover {
    min-height: 47px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .nav-group-title span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .sidebar-logout {
    flex: none;
    margin-top: 8px;
  }
}

@media (max-width: 380px) {
  .sidebar-menu-label small {
    display: none;
  }

  .nav-group-title,
  .nav-group--loyalty > .nav-group-title,
  .nav-group--loyalty > .nav-group-title:hover {
    font-size: 13px;
  }
}


/* =========================================================
   CHUS.SITE 2.7.5 · CORRECCIÓN DEFINITIVA DEL SCROLL LATERAL
   El menú permanece visible al bajar la página. Solo la lista
   de opciones puede desplazarse y el cierre de sesión queda fijo.
   ========================================================= */

@media (min-width: 961px) {
  .app-shell {
    --sidebar-fixed-width: 288px;
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-fixed-width);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    z-index: 30;
  }

  .app-main {
    width: calc(100% - var(--sidebar-fixed-width));
    max-width: none;
    min-width: 0;
    margin-left: var(--sidebar-fixed-width);
  }

  .main-nav {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sidebar-logout {
    flex: 0 0 auto;
  }
}

@media (min-width: 961px) and (max-width: 1280px) {
  .app-shell {
    --sidebar-fixed-width: 270px;
  }
}

@media (max-width: 960px) {
  .app-shell {
    display: block;
  }

  .app-main {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
  }
}

/* =========================================================
   Catálogo público profesional · v2.8.3
   Búsqueda completa, filtros, paginación y escáner
   ========================================================= */

.public-page-heading {
  align-items: flex-end;
  gap: 22px;
}

.public-page-heading > span > p {
  max-width: 680px;
  margin: 9px 0 0;
  color: var(--color-muted);
  font-size: 14px;
}

.public-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.public-heading-actions .secondary-button,
.public-heading-actions .primary-button {
  min-height: 45px;
  white-space: nowrap;
}

.public-search-scanner {
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid rgb(var(--brand-rgb) / 26%);
  border-radius: 16px;
  background: var(--color-white);
  box-shadow: 0 22px 54px -38px rgb(var(--brand-rgb) / 55%);
}

.public-scanner-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--color-rule);
  background:
    linear-gradient(120deg, rgb(var(--brand-rgb) / 8%), transparent 52%),
    var(--color-white);
  padding: 18px 20px;
}

.public-scanner-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 12px 25px -16px rgb(var(--brand-rgb) / 90%);
}

.public-scanner-icon svg {
  width: 23px;
  height: 23px;
}

.public-scanner-head small {
  color: var(--color-accent);
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
}

.public-scanner-head h2 {
  margin: 2px 0 0;
  color: var(--color-ink);
  font-size: 20px;
  letter-spacing: -.025em;
}

.public-scanner-head p {
  margin: 3px 0 0;
  color: var(--color-muted);
  font-size: 12.5px;
}

.public-scanner-close {
  align-self: start;
  border: 1px solid var(--color-rule-2);
  background: var(--color-white);
}

.public-scanner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, .75fr);
  gap: 18px;
  padding: 18px;
}

.public-reader-shell {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  border: 1px solid #223248;
  border-radius: 13px;
  background: #0c1726;
}

#public-reader {
  display: grid;
  min-height: 350px;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgb(var(--brand-rgb) / 20%), transparent 45%),
    #0c1726;
  color: #c4d0df;
}

#public-reader video,
#public-reader img {
  width: 100% !important;
  min-height: 350px;
  max-height: 430px;
  object-fit: cover;
}

#public-reader > div:not(.reader-empty) {
  width: 100% !important;
}

#public-reader__dashboard_section_csr,
#public-reader__dashboard_section_swaplink {
  display: none !important;
}

.public-reader-shell .reader-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  min-height: 350px;
  padding: 24px;
  text-align: center;
}

.public-reader-shell .reader-empty svg {
  width: 42px;
  height: 42px;
  color: #7eb7f5;
}

.public-reader-shell .reader-empty b {
  color: #fff;
  font-size: 16px;
}

.public-reader-shell .reader-empty small {
  color: #a9b8c9;
}

.public-reader-shell:has(video) .scanner-viewfinder > span {
  animation: scanner-sweep 2.1s ease-in-out infinite;
  opacity: 1;
}

.public-scanner-side {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
}

.public-scanner-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 66px;
  border: 1px solid var(--color-rule);
  border-radius: 11px;
  background: var(--color-paper-2);
  padding: 13px 14px;
  color: var(--color-ink-2);
  font-size: 13px;
}

.public-scanner-status svg {
  width: 19px;
  height: 19px;
  margin-top: 1px;
  color: var(--color-accent);
}

.public-scanner-status.is-success {
  border-color: rgb(17 145 82 / 28%);
  background: rgb(17 145 82 / 7%);
}

.public-scanner-status.is-success svg {
  color: var(--color-success);
}

.public-scanner-status.is-error {
  border-color: rgb(200 45 45 / 28%);
  background: var(--color-danger-soft);
}

.public-scanner-status.is-error svg {
  color: var(--color-danger);
}

.public-scanner-actions {
  display: grid;
  gap: 9px;
}

.public-scanner-actions > button,
.public-scanner-actions > label {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.public-scanner-tip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  color: var(--color-muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.public-scanner-tip svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.public-catalog-panel {
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--color-rule-2);
  border-radius: 14px;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: opacity .18s ease;
}

.public-catalog-panel.is-loading {
  opacity: .82;
}

.public-search-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--color-rule);
  border-radius: 0;
  background: var(--color-white);
  padding: 15px;
}

.public-search-toolbar .community-search {
  width: 100%;
  min-width: 0;
}

.public-search-toolbar > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--color-muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.public-search-toolbar > span svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
}

.public-filter-bar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) minmax(170px, .72fr) auto;
  align-items: end;
  gap: 11px;
  padding: 14px 15px;
}

.public-filter-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.public-filter-field > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-neutral);
  font-size: 11px;
  font-weight: 700;
}

.public-filter-field > span svg {
  width: 15px;
  height: 15px;
  color: var(--color-accent);
}

.public-filter-field select {
  width: 100%;
  min-height: 43px;
  overflow: hidden;
  border: 1px solid var(--color-rule-2);
  border-radius: 8px;
  background-color: var(--color-white);
  color: var(--color-ink-2);
  padding: 0 36px 0 12px;
  text-overflow: ellipsis;
}

.public-filter-field select:focus {
  border-color: var(--color-accent);
  outline: 3px solid rgb(var(--brand-rgb) / 12%);
}

.public-clear-filters {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgb(var(--brand-rgb) / 24%);
  border-radius: 8px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  padding: 0 14px;
  font-weight: 700;
  white-space: nowrap;
}

.public-clear-filters:hover {
  border-color: var(--color-accent);
  background: rgb(var(--brand-rgb) / 12%);
}

.public-clear-filters svg {
  width: 17px;
  height: 17px;
}

.public-results-summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--color-rule);
  background: var(--color-paper-2);
  padding: 9px 15px;
  color: var(--color-muted);
  font-size: 11.5px;
}

.public-results-summary > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.public-results-summary svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
}

.public-loading-indicator svg {
  animation: public-spin .85s linear infinite;
}

@keyframes public-spin {
  to { transform: rotate(360deg); }
}

.public-product-content .public-barcode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.public-product-content .public-barcode svg {
  width: 14px;
  height: 14px;
  color: var(--color-accent);
}

.public-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  border: 1px solid var(--color-rule-2);
  border-radius: 12px;
  background: var(--color-white);
  padding: 11px 12px;
  box-shadow: var(--shadow-sm);
}

.public-page-summary {
  color: var(--color-muted);
  font-size: 12px;
  white-space: nowrap;
}

.public-page-summary b {
  color: var(--color-ink-2);
}

.public-page-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.public-page-number,
.public-page-nav {
  display: inline-flex;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--color-rule-2);
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-ink-2);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.public-page-number:hover,
.public-page-nav:hover:not(:disabled) {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.public-page-number.is-active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 18px -12px rgb(var(--brand-rgb) / 85%);
}

.public-page-nav:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.public-page-nav svg {
  width: 16px;
  height: 16px;
}

.public-page-gap {
  display: inline-grid;
  min-width: 22px;
  place-items: center;
  color: var(--color-muted);
}

@media (max-width: 1100px) {
  .public-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-clear-filters {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .public-page-heading {
    align-items: stretch;
  }

  .public-heading-actions {
    justify-content: stretch;
  }

  .public-heading-actions > button {
    flex: 1 1 210px;
    justify-content: center;
  }

  .public-scanner-layout {
    grid-template-columns: 1fr;
  }

  .public-scanner-side {
    display: grid;
    grid-template-columns: 1fr;
  }

  .public-search-toolbar {
    grid-template-columns: 1fr;
  }

  .public-search-toolbar > span {
    justify-content: flex-start;
  }

  .public-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .public-page-buttons {
    justify-content: center;
  }

  .public-page-summary {
    text-align: center;
  }
}

@media (max-width: 620px) {
  .public-page-heading > span > p {
    font-size: 13px;
  }

  .public-heading-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .public-heading-actions > button {
    width: 100%;
  }

  .public-scanner-head {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    padding: 15px;
  }

  .public-scanner-close {
    position: absolute;
    top: 11px;
    right: 11px;
  }

  .public-scanner-head > span:nth-child(2) {
    padding-right: 34px;
  }

  .public-scanner-head p {
    display: none;
  }

  .public-scanner-layout {
    gap: 13px;
    padding: 12px;
  }

  .public-reader-shell,
  #public-reader,
  .public-reader-shell .reader-empty,
  #public-reader video,
  #public-reader img {
    min-height: 285px;
  }

  #public-reader video,
  #public-reader img {
    max-height: 330px;
  }

  .public-filter-bar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .public-search-toolbar {
    padding: 12px;
  }

  .public-search-toolbar > span {
    white-space: normal;
  }

  .public-results-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-page-buttons {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
  }

  .public-page-nav {
    grid-column: span 2;
  }

  .public-page-number {
    width: 100%;
  }

  .public-page-gap {
    display: none;
  }
}

.public-scanner-head {
  position: relative;
}

.public-scanner-actions .danger-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgb(198 42 42 / 30%);
  border-radius: 8px;
  background: var(--color-danger-soft);
  color: var(--color-danger);
  padding: 0 16px;
  font-weight: 750;
}

.public-scanner-actions .danger-button:hover {
  border-color: var(--color-danger);
  background: rgb(198 42 42 / 11%);
}

.public-scanner-actions .danger-button svg {
  width: 18px;
  height: 18px;
}


/* Catálogo público 2.8.4: buscador limpio y sin doble contorno */
.public-search-toolbar {
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.public-search-toolbar .community-search {
  min-height: 52px;
  border: 1px solid #cbd8e7;
  border-radius: 13px;
  background: #ffffff;
  padding: 0 10px 0 14px;
  box-shadow: 0 8px 24px -22px rgb(20 55 95 / 70%);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.public-search-toolbar .community-search:hover {
  border-color: #9eb6d2;
}

.public-search-toolbar .community-search:focus-within {
  border-color: #1675d1;
  box-shadow: 0 0 0 4px rgb(22 117 209 / 10%), 0 12px 28px -22px rgb(18 74 133 / 65%);
  transform: translateY(-1px);
}

.public-search-toolbar .community-search > svg {
  color: #4f6f91;
}

.public-search-toolbar .community-search:focus-within > svg {
  color: #0b6ecb;
}

.public-search-toolbar .community-search input,
.public-search-toolbar .community-search input:focus,
.public-search-toolbar .community-search input:focus-visible {
  border: 0;
  outline: 0 !important;
  box-shadow: none !important;
}

.public-search-toolbar .community-search output {
  border: 1px solid #dbe6f1;
  background: #f3f7fb;
  color: #49647f;
  padding: 5px 8px;
}

.public-search-toolbar .community-search:focus-within output {
  border-color: #c8def3;
  background: #edf6ff;
  color: #075eae;
}

@media (max-width: 700px) {
  .public-search-toolbar .community-search {
    min-height: 50px;
    border-radius: 12px;
  }
}

/* Chus.site 2.8.5 · cuenta y biblioteca completa */
.account-plan {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  width: 100%;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  border: 1px solid #d7e4f3;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff 0%, #f5f9ff 100%);
  color: #0b67c7;
  padding: 7px 8px;
  box-shadow: 0 7px 18px rgb(15 71 130 / 8%);
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.account-plan:hover {
  border-color: #9bc4f2;
  background: linear-gradient(145deg, #ffffff 0%, #edf6ff 100%);
  box-shadow: 0 10px 24px rgb(15 71 130 / 13%);
  transform: translateY(-1px);
}

.account-plan:active {
  transform: translateY(0);
}

.account-plan:focus-visible {
  outline: 3px solid rgb(11 103 199 / 18%);
  outline-offset: 2px;
}

.account-plan .account-plan-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #0877dc 0%, #075eb7 100%);
  color: #ffffff;
  box-shadow: 0 6px 14px rgb(8 103 199 / 24%);
}

.account-plan .account-plan-icon svg {
  width: 18px;
  height: 18px;
  color: #ffffff;
  stroke-width: 2.2;
}

.account-plan .account-plan-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: inherit;
}

.account-plan .account-plan-copy small {
  color: #7590ad;
  font-family: var(--font-label);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1;
}

.account-plan .account-plan-copy strong {
  overflow: hidden;
  max-width: 100%;
  color: #17324f;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-plan .account-plan-arrow {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #d5e5f6;
  border-radius: 9px;
  background: #ffffff;
  color: #0b67c7;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.account-plan:hover .account-plan-arrow {
  border-color: #a8cdf4;
  background: #eaf4ff;
  transform: translateX(2px);
}

.account-plan .account-plan-arrow svg {
  width: 15px;
  height: 15px;
  color: currentColor;
}

.products-pagination {
  margin-top: 24px;
}

@media (max-width: 620px) {
  .account-plan {
    min-height: 56px;
  }

  .products-pagination {
    margin-top: 18px;
  }
}


/* Chus.site 2.8.6 · catálogo privado, búsquedas y creación de rótulos */
.products-page-heading {
  align-items: flex-end;
}

.products-page-heading > span > p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.55;
}

.products-scan-button {
  min-height: 44px;
  white-space: nowrap;
}

.products-search-panel,
.public-catalog-panel {
  overflow: hidden;
  border: 1px solid #d5e0ec;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 14px 34px -30px rgb(26 64 105 / 48%);
}

.products-search-panel {
  margin-bottom: 20px;
  padding: 15px;
}

.catalog-search-field {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 56px;
  grid-template-columns: 24px minmax(150px, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #c9d7e6;
  border-radius: 13px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  padding: 6px 7px 6px 15px;
  box-shadow: 0 8px 22px -22px rgb(25 67 112 / 68%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.catalog-search-field:hover {
  border-color: #9fb8d2;
}

.catalog-search-field:focus-within {
  border-color: #0b73d5;
  box-shadow: 0 0 0 4px rgb(11 115 213 / 10%), 0 15px 30px -24px rgb(11 83 155 / 54%);
  transform: translateY(-1px);
}

.catalog-search-icon {
  width: 20px;
  height: 20px;
  color: #587795;
  transition: color 180ms ease, transform 180ms ease;
}

.catalog-search-field:focus-within .catalog-search-icon {
  color: #086bc8;
  transform: scale(1.04);
}

.catalog-search-field input,
.catalog-search-field input:focus,
.catalog-search-field input:focus-visible {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 0 !important;
  outline: 0 !important;
  background: transparent;
  box-shadow: none !important;
  color: #182737;
  padding: 0 4px;
  font-size: 14px;
}

.catalog-search-field input::placeholder {
  color: #8191a2;
}

.catalog-search-field input::-webkit-search-cancel-button {
  display: none;
}

.catalog-search-field output {
  max-width: 155px;
  overflow: hidden;
  border: 1px solid #dce6f0;
  border-radius: 999px;
  background: #f4f8fc;
  color: #526d88;
  padding: 5px 9px;
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-search-clear {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #70869c;
}

.catalog-search-clear:hover {
  border-color: #d5e2ee;
  background: #f3f7fb;
  color: #23486c;
}

.catalog-search-clear svg {
  width: 17px;
  height: 17px;
}

.catalog-search-submit {
  display: inline-flex;
  min-width: 104px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #0867bf;
  border-radius: 10px;
  background: linear-gradient(145deg, #0b79df 0%, #0864bd 100%);
  color: #fff;
  padding: 0 15px;
  box-shadow: 0 8px 18px -12px rgb(6 89 170 / 78%);
  font-size: 12px;
  font-weight: 780;
  transition: box-shadow 180ms ease, transform 180ms ease, filter 180ms ease;
}

.catalog-search-submit:hover {
  filter: brightness(1.04);
  box-shadow: 0 11px 22px -12px rgb(6 89 170 / 85%);
  transform: translateY(-1px);
}

.catalog-search-submit:active {
  transform: translateY(0);
}

.catalog-search-submit svg {
  width: 17px;
  height: 17px;
}

.products-results-summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  border-radius: 10px;
  background: #f6f9fc;
  color: #62778d;
  padding: 9px 12px;
  font-size: 11.5px;
}

.products-results-summary svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: #0870cf;
}

.public-search-toolbar .catalog-search-field {
  min-width: 0;
}

.public-search-toolbar .catalog-search-field output {
  padding: 5px 9px;
}

.products-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  align-items: stretch;
  gap: 18px;
}

.product-library-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  border-radius: 14px;
}

.product-library-card .catalog-product-media {
  min-height: 190px;
  aspect-ratio: 16 / 10;
  padding: 12px;
}

.product-library-card .visibility-badge {
  top: 10px;
  right: 10px;
  left: auto;
  border: 1px solid rgb(78 96 115 / 12%);
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 5px 14px -10px rgb(13 38 66 / 65%);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.product-library-card .visibility-badge.is-public {
  border-color: rgb(0 100 204 / 18%);
  background: rgb(239 248 255 / 94%);
}

.catalog-image-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  color: #8a9bad;
  text-align: center;
}

.catalog-image-empty svg {
  width: 42px;
  height: 42px;
  color: #7da8d2;
}

.catalog-image-empty small {
  font-size: 11px;
}

.product-library-card .product-card-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 17px;
}

.product-library-card .product-card-top {
  align-items: center;
  gap: 8px;
}

.product-category-tag {
  display: inline-flex;
  min-width: 0;
  overflow: hidden;
  align-items: center;
  border-radius: 999px;
  background: #edf6ff;
  color: #0768c3;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-library-card .source-tag {
  max-width: 108px;
  overflow: hidden;
  margin-left: auto;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-library-card h3 {
  display: -webkit-box;
  min-height: 43px;
  overflow: hidden;
  margin: 10px 0 0;
  color: #172536;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.28;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-library-card p {
  min-height: 19px;
  margin-top: 7px;
  white-space: normal;
}

.product-card-price-row {
  display: flex;
  min-height: 34px;
  align-items: baseline;
  gap: 9px;
  margin-top: auto;
  padding-top: 13px;
}

.product-card-price-row .card-price {
  margin: 0;
  color: #15283a;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -.025em;
}

.product-card-price-row .card-price.is-empty {
  color: #73879a;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
}

.product-card-price-row del {
  color: #8d9aa7;
  font-size: 11px;
}

.product-library-card .barcode-number {
  min-height: 39px;
  margin-top: 10px;
  border: 1px solid #e1e9f1;
  background: #f7f9fb;
}

.product-library-card .barcode-number span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 42px;
  gap: 7px;
  margin-top: 12px;
}

.catalog-sign-button {
  display: grid;
  min-height: 43px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #075ead;
  border-radius: 10px;
  background: linear-gradient(145deg, #0a74d6 0%, #075dad 100%);
  color: #fff;
  padding: 0 13px;
  box-shadow: 0 9px 20px -14px rgb(4 79 151 / 88%);
  font-size: 12px;
  font-weight: 780;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.catalog-sign-button:hover {
  filter: brightness(1.045);
  box-shadow: 0 12px 23px -13px rgb(4 79 151 / 92%);
  transform: translateY(-1px);
}

.catalog-sign-button:active {
  transform: translateY(0);
}

.catalog-sign-button svg {
  width: 17px;
  height: 17px;
}

.catalog-sign-button svg:last-child {
  width: 15px;
  height: 15px;
  opacity: .76;
}

.product-card-actions .catalog-sign-button,
.catalog-public-actions .catalog-sign-button {
  grid-column: 1 / -1;
}

.catalog-public-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.catalog-public-actions .catalog-sign-button {
  margin-top: 1px;
}

.product-library-card .product-promotion-badge,
.product-library-card .discount-badge {
  z-index: 6;
}

.product-library-card .discount-badge.has-promotion {
  top: 45px;
}

@media (hover: hover) {
  .product-library-card:hover .public-product-image-main {
    transform: scale(1.018);
  }
}

@media (max-width: 820px) {
  .products-page-heading {
    align-items: stretch;
  }

  .products-scan-button {
    width: 100%;
    justify-content: center;
  }

  .catalog-search-field {
    grid-template-columns: 22px minmax(120px, 1fr) auto auto;
  }

  .catalog-search-field output {
    display: none;
  }
}

@media (max-width: 620px) {
  .products-search-panel {
    padding: 11px;
  }

  .catalog-search-field {
    min-height: 52px;
    grid-template-columns: 21px minmax(90px, 1fr) 34px 44px;
    gap: 5px;
    border-radius: 12px;
    padding: 4px 5px 4px 12px;
  }

  .catalog-search-field input {
    height: 42px;
    font-size: 16px;
  }

  .catalog-search-submit {
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  .catalog-search-submit span {
    display: none;
  }

  .products-results-summary {
    align-items: flex-start;
    line-height: 1.45;
  }

  .products-grid,
  .public-products-grid {
    grid-template-columns: 1fr;
  }

  .product-library-card .catalog-product-media {
    min-height: 220px;
    aspect-ratio: 4 / 3;
  }

  .product-card-actions {
    grid-template-columns: 1fr 1fr 42px;
  }
}

/* Chus.site 2.8.7 · Mis productos: galería compacta y profesional */
.products-grid,
.public-products-grid {
  display: grid;
}

.products-grid {
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 340px));
  align-items: start;
  justify-content: center;
  gap: 18px;
}

.product-library-card {
  width: 100%;
  max-width: 340px;
  height: auto;
  overflow: hidden;
  border: 1px solid #d7e1ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 34px -28px rgb(18 52 86 / 58%);
}

.product-library-card:hover {
  border-color: #a8c9e8;
  box-shadow: 0 18px 38px -28px rgb(5 85 158 / 62%);
  transform: translateY(-2px);
}

.product-library-card .catalog-product-media,
.product-library-card .catalog-product-media.is-portrait,
.product-library-card .catalog-product-media.is-square,
.product-library-card .catalog-product-media.is-landscape,
.product-library-card .catalog-product-media.is-wide {
  position: relative;
  width: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin: 0;
  background:
    radial-gradient(circle at 50% 34%, #fff 0%, #f6f9fc 66%, #edf3f8 100%);
  padding: 10px;
}

.product-library-card .product-card-image-frame {
  inset: 10px;
  border: 1px solid #dce6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px -22px rgb(18 46 76 / 72%);
}

.product-library-card .public-product-image-backdrop {
  display: none;
}

.product-library-card .public-product-image-main {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 12px;
  object-fit: contain;
  object-position: center;
}

.product-library-card .public-product-image-expand {
  right: 8px;
  bottom: 8px;
  min-height: 31px;
  border-radius: 8px;
  padding: 0 9px;
}

.product-library-card .visibility-badge {
  top: 10px;
  right: 10px;
  min-height: 27px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 9.5px;
}

.product-library-card .product-card-body {
  min-height: 0;
  padding: 16px;
}

.product-library-card .product-card-top {
  min-height: 27px;
}

.product-library-card h3 {
  min-height: 44px;
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.3;
}

.product-library-card p {
  min-height: 18px;
  margin-top: 6px;
  color: #6d7e90;
  font-size: 11.5px;
}

.product-library-card .product-card-price-row {
  min-height: 31px;
  padding-top: 11px;
}

.product-library-card .product-card-price-row .card-price {
  font-size: 20px;
}

.product-library-card .barcode-number {
  min-height: 37px;
  margin-top: 9px;
  border-radius: 9px;
}

.product-library-card .product-card-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
  gap: 7px;
  margin-top: 11px;
}

.product-library-card .catalog-sign-button {
  min-height: 41px;
  border-radius: 10px;
}

.product-library-card .mini-button {
  min-width: 0;
  min-height: 38px;
  justify-content: center;
  border-radius: 9px;
  padding: 0 9px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .products-grid {
    grid-template-columns: minmax(0, 410px);
    justify-content: center;
    gap: 14px;
  }

  .product-library-card {
    max-width: 410px;
  }

  .product-library-card .catalog-product-media,
  .product-library-card .catalog-product-media.is-portrait,
  .product-library-card .catalog-product-media.is-square,
  .product-library-card .catalog-product-media.is-landscape,
  .product-library-card .catalog-product-media.is-wide {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 420px) {
  .product-library-card .product-card-actions {
    grid-template-columns: 1fr 1fr 39px;
  }

  .product-library-card .mini-button {
    font-size: 10.5px;
  }
}


/* =========================================================
   CHUS.SITE 2.8.8 · BÚSQUEDA MÓVIL, ANCHO ESTABLE Y RÓTULOS
   ========================================================= */

/* Evita que componentes internos amplíen el lienzo en iPhone. */
html,
body,
.studio-body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

body.studio-body {
  position: relative;
  overscroll-behavior-x: none;
}

.app-shell,
.app-main,
.workspace,
.view,
.sign-designer-layout,
.sign-preview-panel,
.sign-stage {
  min-width: 0;
  max-width: 100%;
}

/* El código de barras nunca puede ensanchar el rótulo. */
.sign-barcode,
.sign-barcode svg {
  max-width: 100%;
}

.sign-barcode svg {
  display: block;
  overflow: hidden;
}

/* En la plantilla azul el pie ya no dibuja una línea detrás del código. */
.template-price .sign-barcode {
  position: relative;
  z-index: 2;
}

.template-price footer {
  z-index: 1;
  border-top: 0 !important;
  padding-top: 0 !important;
}

@media (max-width: 960px) {
  .app-shell,
  .app-main,
  .workspace,
  .view,
  .sign-designer-layout,
  .sign-preview-panel,
  .sign-stage {
    width: 100%;
  }

  .app-main,
  .workspace,
  .view,
  .sign-designer-layout,
  .sign-preview-panel {
    overflow-x: hidden;
  }

  .sign-designer-layout {
    contain: inline-size;
  }

  .sign-stage {
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: visible;
    contain: inline-size;
  }

  .sign-preview,
  .sign-preview.size-a4-landscape,
  .sign-preview.size-letter-landscape,
  .sign-preview.size-a4-portrait,
  .sign-preview.size-letter-portrait {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 0 0 auto;
  }

  .bottom-nav {
    box-sizing: border-box;
    width: auto;
    max-width: none;
  }
}

/* En teléfono el buscador utiliza dos filas: campo limpio + botón completo. */
@media (max-width: 620px) {
  .public-catalog-panel,
  .public-search-toolbar,
  .products-search-panel {
    max-width: 100%;
    overflow: hidden;
  }

  .catalog-search-field {
    min-height: 104px;
    grid-template-columns: 28px minmax(0, 1fr) 38px;
    grid-template-rows: 46px 46px;
    gap: 6px;
    border-radius: 14px;
    padding: 5px;
  }

  .catalog-search-icon {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }

  .catalog-search-field input,
  .catalog-search-field input:focus,
  .catalog-search-field input:focus-visible {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 3px;
    font-size: 16px;
  }

  .catalog-search-clear {
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
  }

  .catalog-search-submit {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 14px;
  }

  .catalog-search-submit span {
    display: inline;
  }

  .catalog-search-field output {
    display: none;
  }

  .sign-stage {
    min-height: 0;
    padding: 10px;
  }

  .sign-preview {
    box-shadow: 0 12px 28px rgb(16 24 40 / 14%);
  }

  .sign-preview h2,
  .sign-preview p,
  .sign-price-block,
  .sign-barcode,
  .sign-preview footer {
    max-width: 100%;
  }
}

/* ========================================================================== 
   CHUS.SITE 2.9.0 · Fidelización, soporte y administración profesional
   ========================================================================== */
:root {
  --loyalty-green: #168a46;
  --loyalty-green-dark: #0f7138;
  --loyalty-green-soft: #edf9f1;
  --loyalty-green-line: #b9e3c8;
  --support-violet: #6558d9;
  --support-violet-dark: #5145bd;
  --support-violet-soft: #f2f0ff;
  --support-violet-line: #d8d3fb;
  --admin-ink: #152033;
  --admin-muted: #66758a;
  --admin-line: #dce5ef;
  --admin-soft: #f5f8fc;
}

/* Fidelización siempre verde, sin afectar el resto del menú azul. */
.sidebar .nav-group--loyalty {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.sidebar .nav-group--loyalty.is-open,
.sidebar .nav-group--loyalty:has(.nav-item.is-active) {
  border-color: var(--loyalty-green-line);
  background: var(--loyalty-green-soft);
  box-shadow: 0 6px 16px rgb(22 138 70 / 10%);
}

.sidebar .nav-group--loyalty > .nav-group-title,
.sidebar .nav-group--loyalty > .nav-group-title:hover,
.sidebar .nav-group--loyalty.is-open > .nav-group-title,
.sidebar .nav-group--loyalty:has(.nav-item.is-active) > .nav-group-title {
  border-color: var(--loyalty-green);
  background: var(--loyalty-green);
  color: #fff;
  box-shadow: 0 5px 13px rgb(22 138 70 / 20%);
}

.sidebar .nav-group--loyalty > .nav-group-title:hover,
.sidebar .nav-group--loyalty.is-open > .nav-group-title,
.sidebar .nav-group--loyalty:has(.nav-item.is-active) > .nav-group-title {
  border-color: var(--loyalty-green-dark);
  background: var(--loyalty-green-dark);
}

.sidebar .nav-group--loyalty > .nav-group-title > svg,
.sidebar .nav-group--loyalty > .nav-group-title .nav-group-chevron {
  color: #fff;
}

.sidebar .nav-group--loyalty .nav-item svg {
  color: var(--loyalty-green);
}

.sidebar .nav-group--loyalty .nav-item:hover {
  background: #dff3e6;
  color: #0c6631;
}

.sidebar .nav-group--loyalty .nav-item.is-active {
  background: var(--loyalty-green);
  color: #fff;
  box-shadow: 0 4px 11px rgb(22 138 70 / 20%);
}

.sidebar .nav-group--loyalty .nav-item.is-active svg {
  color: #fff;
}

/* Soporte se diferencia visualmente sin competir con fidelización. */
.sidebar .nav-group--support.is-open,
.sidebar .nav-group--support:has(.nav-item.is-active) {
  border-color: var(--support-violet-line);
  background: var(--support-violet-soft);
  box-shadow: 0 6px 16px rgb(101 88 217 / 9%);
}

.sidebar .nav-group--support > .nav-group-title,
.sidebar .nav-group--support > .nav-group-title:hover,
.sidebar .nav-group--support.is-open > .nav-group-title,
.sidebar .nav-group--support:has(.nav-item.is-active) > .nav-group-title {
  border-color: var(--support-violet);
  background: var(--support-violet);
  box-shadow: 0 5px 13px rgb(101 88 217 / 18%);
}

.sidebar .nav-group--support > .nav-group-title:hover,
.sidebar .nav-group--support.is-open > .nav-group-title,
.sidebar .nav-group--support:has(.nav-item.is-active) > .nav-group-title {
  border-color: var(--support-violet-dark);
  background: var(--support-violet-dark);
}

.sidebar .nav-group--support .nav-item svg {
  color: var(--support-violet);
}

.sidebar .nav-group--support .nav-item:hover {
  background: #e9e6ff;
  color: #4e42b4;
}

.sidebar .nav-group--support .nav-item.is-active {
  background: var(--support-violet);
  color: #fff;
  box-shadow: 0 4px 11px rgb(101 88 217 / 20%);
}

.sidebar .nav-group--support .nav-item.is-active svg {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Centro de soporte y sugerencias
   -------------------------------------------------------------------------- */
.support-page-heading p,
.admin-page-heading p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #667384;
  font-size: 15px;
  line-height: 1.55;
}

.support-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.support-summary-card {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 13px;
  border: 1px solid #dce5ef;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f8faff);
  padding: 17px;
  box-shadow: 0 8px 24px rgb(27 55 92 / 6%);
}

.support-summary-card > span:first-child {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border-radius: 13px;
  background: var(--support-violet-soft);
  color: var(--support-violet);
}

.support-summary-card > span:first-child svg {
  width: 21px;
  height: 21px;
}

.support-summary-card > span:last-child {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 8px;
}

.support-summary-card small {
  color: #637187;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.support-summary-card b {
  grid-row: 1 / 3;
  grid-column: 2;
  color: #172235;
  font-size: 27px;
  line-height: 1;
}

.support-summary-card em {
  overflow: hidden;
  color: #8994a3;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  align-items: start;
  gap: 18px;
}

.support-compose-card,
.support-inbox-card,
.support-conversation-card {
  overflow: hidden;
  border-color: #dbe5f0;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgb(23 50 82 / 6%);
}

.support-compose-card .panel-head > svg,
.support-inbox-card .panel-head > svg {
  color: var(--support-violet);
}

.support-compose-card .stack-form {
  gap: 15px;
}

.support-compose-card label,
.support-reply-form label,
.admin-support-reply-form label,
.admin-support-controls label {
  color: #344156;
  font-size: 12px;
  font-weight: 700;
}

.support-compose-card input,
.support-compose-card textarea,
.support-compose-card select,
.support-reply-form textarea,
.admin-support-reply-form textarea,
.admin-support-controls select {
  width: 100%;
  border: 1px solid #ccd8e6;
  border-radius: 11px;
  background: #fff;
  color: #1d2939;
  box-shadow: 0 1px 2px rgb(16 24 40 / 3%);
}

.support-compose-card input:focus,
.support-compose-card textarea:focus,
.support-compose-card select:focus,
.support-reply-form textarea:focus,
.admin-support-reply-form textarea:focus,
.admin-support-controls select:focus {
  border-color: var(--support-violet);
  outline: 3px solid rgb(101 88 217 / 12%);
}

.support-privacy-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  border: 1px solid #cee7d7;
  border-radius: 12px;
  background: #f2fbf5;
  color: #277044;
  padding: 12px 14px;
}

.support-privacy-note svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.support-privacy-note span {
  display: grid;
  gap: 2px;
}

.support-privacy-note b {
  font-size: 12px;
}

.support-privacy-note small {
  color: #54816a;
  font-size: 11px;
  line-height: 1.4;
}

.support-submit-button {
  justify-content: center;
  min-height: 47px;
  background: var(--support-violet);
  box-shadow: 0 8px 20px rgb(101 88 217 / 20%);
}

.support-submit-button:hover {
  background: var(--support-violet-dark);
}

.support-ticket-list,
.admin-support-list {
  display: grid;
  gap: 8px;
  max-height: 590px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

.support-ticket-item {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid #e1e8f0;
  border-radius: 13px;
  background: #fff;
  color: #243044;
  padding: 12px;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.support-ticket-item:hover {
  border-color: #c9c3f7;
  background: #fbfaff;
  box-shadow: 0 7px 18px rgb(47 43 103 / 8%);
  transform: translateY(-1px);
}

.support-ticket-item.is-active {
  border-color: var(--support-violet);
  background: #f7f5ff;
  box-shadow: 0 0 0 3px rgb(101 88 217 / 9%);
}

.support-ticket-item.is-unread::before {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #e5484d;
  content: "";
  box-sizing: content-box;
}

.support-ticket-icon,
.support-conversation-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border-radius: 12px;
  background: #eef4ff;
  color: #0c6dcc;
}

.support-ticket-icon.is-suggestion,
.support-conversation-icon.is-suggestion {
  background: #fff5d9;
  color: #ad7410;
}

.support-ticket-icon.is-error,
.support-conversation-icon.is-error {
  background: #fff0f0;
  color: #d43f4c;
}

.support-ticket-icon.is-other,
.support-conversation-icon.is-other {
  background: #f1efff;
  color: var(--support-violet);
}

.support-ticket-icon svg,
.support-conversation-icon svg {
  width: 20px;
  height: 20px;
}

.support-ticket-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.support-ticket-topline {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.support-ticket-topline b {
  overflow: hidden;
  flex: 1;
  color: #1d2939;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-ticket-copy > small,
.support-ticket-preview {
  overflow: hidden;
  color: #7b8797;
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-ticket-preview {
  color: #5b687a;
  font-size: 11px;
}

.support-priority,
.support-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.support-priority {
  background: #edf2f7;
  color: #607083;
  padding: 5px 7px;
}

.support-priority.is-high {
  background: #fff3d6;
  color: #966100;
}

.support-priority.is-urgent {
  background: #ffebec;
  color: #c4333d;
}

.support-status {
  background: #edf5ff;
  color: #1468b8;
  padding: 6px 8px;
}

.support-status svg {
  width: 12px;
  height: 12px;
}

.support-status.is-in_review,
.support-status.is-waiting_user {
  background: #fff6dc;
  color: #986600;
}

.support-status.is-resolved {
  background: #e9f8ef;
  color: #177040;
}

.support-status.is-closed {
  background: #edf0f4;
  color: #687587;
}

.support-empty-state,
.admin-empty-state {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #708095;
  padding: 30px;
  text-align: center;
}

.support-empty-state svg,
.admin-empty-state svg {
  width: 38px;
  height: 38px;
  color: #a6b4c5;
}

.support-empty-state b,
.admin-empty-state b {
  color: #344156;
  font-size: 14px;
}

.support-empty-state small,
.admin-empty-state small {
  max-width: 360px;
  font-size: 11px;
  line-height: 1.5;
}

.support-conversation-card {
  margin-top: 18px;
}

.support-conversation-head,
.admin-support-detail-head {
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid #e4eaf1;
  padding: 18px 20px;
}

.support-conversation-head > span:nth-child(2),
.admin-support-detail-head > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.support-conversation-head small,
.admin-support-detail-head small {
  color: var(--support-violet);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.support-conversation-head h2,
.admin-support-detail-head h2 {
  margin: 3px 0 2px;
  color: #172235;
  font-size: 19px;
  line-height: 1.25;
}

.support-conversation-head p,
.admin-support-detail-head p {
  margin: 0;
  color: #748195;
  font-size: 11px;
}

.support-conversation-badges {
  display: flex;
  align-items: center;
  gap: 7px;
}

.support-messages {
  display: grid;
  align-content: start;
  gap: 13px;
  max-height: 500px;
  overflow-y: auto;
  background: #f6f8fb;
  padding: 20px;
  scrollbar-width: thin;
}

.support-message {
  display: flex;
  max-width: min(82%, 760px);
  align-items: flex-start;
  gap: 9px;
}

.support-message.is-admin {
  justify-self: end;
  flex-direction: row-reverse;
}

.support-message-avatar {
  width: 34px;
  height: 34px;
  flex: none;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgb(25 42 70 / 12%);
}

.support-message > span:last-child {
  min-width: 0;
  border: 1px solid #dfe6ee;
  border-radius: 5px 14px 14px 14px;
  background: #fff;
  padding: 10px 12px;
  box-shadow: 0 4px 13px rgb(29 49 76 / 5%);
}

.support-message.is-admin > span:last-child {
  border-color: #cbc5fa;
  border-radius: 14px 5px 14px 14px;
  background: #f1efff;
}

.support-message b {
  display: inline-block;
  color: #243044;
  font-size: 11px;
}

.support-message small {
  margin-left: 6px;
  color: #8a96a7;
  font-size: 9px;
}

.support-message p {
  margin: 5px 0 0;
  color: #3d4a5e;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.support-reply-form,
.admin-support-reply-form {
  display: grid;
  gap: 12px;
  border-top: 1px solid #e4eaf1;
  background: #fff;
  padding: 17px 20px 20px;
}

/* --------------------------------------------------------------------------
   Panel administrativo 2.9
   -------------------------------------------------------------------------- */
.admin-view {
  --panel-padding: 20px;
}

.admin-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-live-badge {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid #cfe7d8;
  border-radius: 999px;
  background: #f0fbf4;
  color: #237346;
  padding: 0 13px;
  font-size: 11px;
  font-weight: 700;
}

.admin-live-badge i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #24a35a;
  box-shadow: 0 0 0 5px rgb(36 163 90 / 10%);
}

.admin-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 17px;
}

.admin-stats-grid .stat-card {
  min-height: 108px;
  border-color: #dce5ef;
  background: linear-gradient(145deg, #fff, #f7faff);
  box-shadow: 0 8px 24px rgb(25 51 84 / 6%);
}

.admin-stats-grid .stat-card > i {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eaf3ff;
  color: #096aca;
  padding: 10px;
}

.admin-tabs {
  position: sticky;
  z-index: 5;
  top: 10px;
  display: flex;
  max-width: 100%;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 17px;
  border: 1px solid #dce5ef;
  border-radius: 15px;
  background: rgb(255 255 255 / 95%);
  padding: 6px;
  box-shadow: 0 9px 26px rgb(30 54 84 / 7%);
  backdrop-filter: blur(14px);
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tabs button {
  display: inline-flex;
  min-width: max-content;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #627086;
  padding: 0 15px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.admin-tabs button:hover {
  background: #f0f5fb;
  color: #1f5485;
}

.admin-tabs button.is-active {
  background: #096dce;
  color: #fff;
  box-shadow: 0 7px 16px rgb(9 109 206 / 18%);
}

.admin-tabs button svg {
  width: 17px;
  height: 17px;
}

.admin-tabs button b {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  padding: 0 5px;
  font-size: 9px;
}

.admin-section[hidden] {
  display: none !important;
}

.admin-overview-grid,
.admin-moderation-grid,
.admin-system-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  align-items: start;
  gap: 17px;
}

.admin-overview-grid--lower {
  margin-top: 17px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
}

.admin-view .panel {
  border-color: #dce5ef;
  border-radius: 17px;
  box-shadow: 0 8px 26px rgb(27 50 82 / 5%);
}

.admin-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 13px;
  color: #67758a;
  font-size: 10px;
  font-weight: 650;
}

.admin-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #096dce;
}

.admin-chart-legend span:nth-child(2) i {
  background: #168a46;
}

.admin-chart-legend span:nth-child(3) i {
  background: #7a5fd0;
}

.admin-growth-chart {
  display: grid;
  height: 235px;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  align-items: end;
  gap: 12px;
  border-bottom: 1px solid #dfe7ef;
  background-image: linear-gradient(to top, #e8edf4 1px, transparent 1px);
  background-size: 100% 25%;
  padding: 18px 5px 0;
}

.growth-day {
  display: grid;
  height: 100%;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 7px;
}

.growth-bars {
  display: flex;
  height: 100%;
  align-items: end;
  justify-content: center;
  gap: 4px;
}

.growth-bars i {
  width: min(10px, 26%);
  min-height: 5px;
  border-radius: 4px 4px 1px 1px;
  background: #096dce;
  transition: height .25s ease;
}

.growth-bars .is-products {
  background: #168a46;
}

.growth-bars .is-posts {
  background: #7a5fd0;
}

.growth-day small {
  color: #7b8797;
  font-size: 9px;
  text-align: center;
}

.admin-pulse-grid,
.system-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-pulse-grid > div,
.system-facts > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border: 1px solid #e0e7ef;
  border-radius: 12px;
  background: #f8fafd;
  padding: 12px;
}

.admin-pulse-grid > div > svg,
.system-facts > div > svg {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: #e8f2ff;
  color: #096dce;
  padding: 8px;
}

.admin-pulse-grid span,
.system-facts span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-pulse-grid small,
.system-facts small {
  color: #748196;
  font-size: 9.5px;
}

.admin-pulse-grid b,
.system-facts b {
  overflow: hidden;
  color: #1f2b3d;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-broadcast .stack-form {
  gap: 13px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.admin-activity-toolbar,
.admin-support-toolbar {
  grid-template-columns: minmax(240px, 1fr) minmax(150px, auto) minmax(150px, auto);
}

.admin-toolbar .search-field {
  min-width: 0;
}

.admin-toolbar select,
.admin-role-select {
  min-height: 42px;
  border: 1px solid #ced9e6;
  border-radius: 10px;
  background: #fff;
  color: #344156;
  padding: 0 34px 0 11px;
  font-size: 11px;
  font-weight: 650;
}

.admin-section-intro {
  margin: -5px 0 15px;
  border-left: 3px solid #91bde8;
  color: #647287;
  padding-left: 11px;
  font-size: 11.5px;
  line-height: 1.55;
}

.admin-users-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-users-table th {
  border-bottom: 1px solid #dfe7ef;
  background: #f6f9fc;
  color: #68768a;
  padding: 11px 12px;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .045em;
  text-align: left;
  text-transform: uppercase;
}

.admin-users-table td {
  border-bottom: 1px solid #e7edf3;
  color: #3b485b;
  padding: 12px;
  font-size: 11px;
  vertical-align: middle;
}

.admin-users-table tr:last-child td {
  border-bottom: 0;
}

.admin-users-table tbody tr:hover td {
  background: #f9fbfd;
}

.user-cell {
  display: flex;
  min-width: 220px;
  align-items: center;
  gap: 9px;
}

.user-cell > span:last-child,
.admin-last-activity {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.user-cell b,
.admin-last-activity b {
  color: #243044;
  font-size: 11.5px;
}

.user-cell b em {
  border-radius: 999px;
  background: #e9f2ff;
  color: #096dce;
  padding: 2px 5px;
  font-size: 8px;
  font-style: normal;
}

.user-cell small,
.admin-last-activity small {
  color: #7d8999;
  font-size: 9.5px;
  line-height: 1.35;
}

.admin-user-avatar {
  width: 36px;
  height: 36px;
  flex: none;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #edf8f1;
  color: #197443;
  padding: 6px 8px;
  font-size: 9.5px;
  font-weight: 750;
  white-space: nowrap;
}

.admin-status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #26a55d;
}

.admin-status.is-suspended {
  background: #fff0ef;
  color: #c43a35;
}

.admin-status.is-suspended i {
  background: #dc4c46;
}

.admin-content-counts {
  color: #647287;
  font-size: 9.5px;
  line-height: 1.5;
}

.admin-content-counts b {
  color: #273548;
}

.admin-row-actions,
.admin-content-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.admin-row-actions button,
.admin-content-actions button,
.admin-activity-entry > button {
  display: inline-flex;
  min-width: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #d9e2ec;
  border-radius: 9px;
  background: #fff;
  color: #526176;
  padding: 0 9px;
  font-size: 9.5px;
  font-weight: 700;
}

.admin-row-actions button:hover,
.admin-content-actions button:hover,
.admin-activity-entry > button:hover {
  border-color: #a9c9e9;
  background: #eef6ff;
  color: #0964bb;
}

.admin-row-actions button.is-primary {
  border-color: #b8d5f1;
  background: #eef6ff;
  color: #096dce;
}

.admin-row-actions button.is-danger,
.admin-content-actions button.is-danger {
  border-color: #f0c7c4;
  background: #fff7f6;
  color: #c33b34;
}

.admin-row-actions button svg,
.admin-content-actions button svg,
.admin-activity-entry > button svg {
  width: 15px;
  height: 15px;
}

.admin-activity-grid,
.admin-activity-feed,
.admin-user-activity-list {
  display: grid;
  gap: 8px;
}

.admin-activity-feed {
  max-height: 690px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

.admin-activity-entry {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e1e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 11px;
}

.admin-activity-entry.is-compact {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 9px;
}

.admin-activity-entry-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: #edf5ff;
  color: #096dce;
}

.admin-activity-entry.is-compact .admin-activity-entry-icon {
  width: 34px;
  height: 34px;
}

.admin-activity-entry-icon svg {
  width: 17px;
  height: 17px;
}

.admin-activity-entry-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-activity-entry-copy b {
  color: #253246;
  font-size: 11.5px;
  line-height: 1.35;
}

.admin-activity-entry-copy small,
.admin-activity-entry-copy em {
  overflow: hidden;
  color: #7c8999;
  font-size: 9.5px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-activity-entry-copy em {
  color: #98a2af;
}

.admin-activity-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 13px;
}

.admin-activity-summary > span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  border: 1px solid #dce5ef;
  border-radius: 10px;
  background: #f7fafd;
  padding: 0 11px;
}

.admin-activity-summary svg {
  width: 16px;
  height: 16px;
  color: #096dce;
}

.admin-activity-summary b {
  color: #1f2c3e;
  font-size: 14px;
}

.admin-activity-summary small {
  color: #768397;
  font-size: 9.5px;
}

.admin-support-layout {
  display: grid;
  grid-template-columns: minmax(360px, .78fr) minmax(0, 1.22fr);
  align-items: start;
  gap: 17px;
}

.admin-support-list {
  max-height: 720px;
}

.admin-support-detail {
  min-height: 560px;
  overflow: hidden;
  padding: 0;
}

.admin-support-detail-head {
  padding: 18px;
}

.admin-support-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 9px;
  border-bottom: 1px solid #e3eaf1;
  background: #f8fafd;
  padding: 12px 18px;
}

.admin-support-controls label {
  display: grid;
  min-width: 150px;
  gap: 5px;
}

.admin-support-messages {
  min-height: 300px;
  max-height: 440px;
}

.admin-content-list {
  display: grid;
  gap: 8px;
  max-height: 650px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.admin-content-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e1e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.admin-content-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #edf5ff;
  color: #096dce;
}

.admin-content-icon svg {
  width: 17px;
  height: 17px;
}

.admin-content-item > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-content-item b {
  overflow: hidden;
  color: #283548;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-content-item small {
  overflow: hidden;
  color: #7b8797;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-config-card {
  display: flex;
  min-height: 140px;
  align-items: center;
  gap: 14px;
  background: linear-gradient(145deg, #fff, #f5f8ff);
}

.google-config-card > svg {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  background: #e9f2ff;
  color: #096dce;
  padding: 12px;
}

.google-config-card > span {
  display: grid;
  gap: 4px;
}

.google-config-card small {
  color: #758297;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .055em;
}

.google-config-card b {
  color: #1e2a3c;
  font-size: 17px;
}

.google-config-card p,
.admin-data-policy p {
  margin: 0;
  color: #657388;
  font-size: 11px;
  line-height: 1.55;
}

.admin-data-policy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.is-danger-soft {
  border-color: #efc7c4;
  background: #fff7f6;
  color: #c13933;
}

.admin-empty-row {
  display: grid;
  min-height: 90px;
  place-items: center;
  color: #7c8999;
  font-size: 11px;
  text-align: center;
}

/* Expediente del usuario */
.admin-user-modal[hidden] {
  display: none;
}

.admin-user-modal {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.admin-user-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(15 23 42 / 62%);
  backdrop-filter: blur(5px);
}

.admin-user-modal-panel {
  position: relative;
  display: grid;
  width: min(1100px, 96vw);
  max-height: min(880px, 92vh);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #dce5ef;
  border-radius: 20px;
  background: #f6f8fb;
  box-shadow: 0 28px 80px rgb(15 23 42 / 30%);
}

.admin-user-modal-header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dce5ef;
  background: #fff;
  padding: 0 20px;
}

.admin-user-modal-header > span {
  display: grid;
  gap: 2px;
}

.admin-user-modal-header small {
  color: #7b8797;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .06em;
}

.admin-user-modal-header b {
  color: #1d2939;
  font-size: 16px;
}

.admin-user-modal-header button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #dbe4ed;
  border-radius: 10px;
  background: #fff;
  color: #526176;
}

.admin-user-modal-content {
  overflow-y: auto;
  padding: 18px;
  scrollbar-width: thin;
}

.admin-user-profile {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #dce5ef;
  border-radius: 16px;
  background: #fff;
  padding: 17px;
}

.admin-user-profile-avatar {
  width: 58px;
  height: 58px;
  flex: none;
  font-size: 18px;
}

.admin-user-profile > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.admin-user-profile h2 {
  margin: 0;
  color: #1c283a;
  font-size: 21px;
}

.admin-user-profile p,
.admin-user-profile small {
  overflow: hidden;
  margin: 0;
  color: #6f7d90;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-detail-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.admin-user-detail-stats > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.admin-user-detail-stats > div > svg {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #edf5ff;
  color: #096dce;
  padding: 8px;
}

.admin-user-detail-stats span {
  display: grid;
  min-width: 0;
}

.admin-user-detail-stats small {
  overflow: hidden;
  color: #788598;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-detail-stats b {
  color: #1f2c3e;
  font-size: 16px;
}

.admin-user-notify {
  display: grid;
  grid-template-columns: minmax(200px, .35fr) minmax(0, .65fr);
  align-items: center;
  gap: 15px;
  border: 1px solid #d8e3ee;
  border-radius: 15px;
  background: #fff;
  padding: 15px;
}

.admin-user-notify small,
.admin-user-detail-grid header small {
  color: #798699;
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: .055em;
}

.admin-user-notify h3,
.admin-user-detail-grid h3 {
  margin: 3px 0 0;
  color: #253246;
  font-size: 14px;
}

.admin-user-notify form {
  display: grid;
  grid-template-columns: minmax(150px, .35fr) minmax(220px, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.admin-user-notify input,
.admin-user-notify textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #ced9e6;
  border-radius: 10px;
  background: #fff;
}

.admin-user-notify textarea {
  resize: vertical;
}

.admin-user-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.admin-user-detail-grid > article {
  overflow: hidden;
  border: 1px solid #dce5ef;
  border-radius: 15px;
  background: #fff;
}

.admin-user-detail-grid header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e3eaf1;
  padding: 13px 15px;
}

.admin-user-detail-grid header > svg {
  width: 20px;
  height: 20px;
  color: #096dce;
}

.admin-user-activity-list,
.admin-user-content-list {
  display: grid;
  max-height: 410px;
  gap: 7px;
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: thin;
}

.admin-user-content-list > div {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #e4eaf1;
  border-radius: 10px;
  padding: 9px;
}

.admin-user-content-list > div > svg {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: #edf5ff;
  color: #096dce;
  padding: 7px;
}

.admin-user-content-list > div > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-user-content-list b,
.admin-user-content-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-content-list b {
  color: #2c394d;
  font-size: 10.5px;
}

.admin-user-content-list small {
  color: #7a8798;
  font-size: 9px;
}

body.has-modal {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Adaptación responsiva
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .support-summary-grid,
  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-detail-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-overview-grid,
  .admin-overview-grid--lower,
  .admin-moderation-grid,
  .admin-system-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .support-layout,
  .admin-support-layout {
    grid-template-columns: 1fr;
  }

  .support-ticket-list,
  .admin-support-list {
    max-height: 430px;
  }

  .admin-support-detail {
    min-height: 480px;
  }

  .admin-user-notify,
  .admin-user-detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-notify form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .support-page-heading,
  .admin-page-heading {
    align-items: stretch;
  }

  .support-page-heading > button,
  .admin-heading-actions,
  .admin-heading-actions > button {
    width: 100%;
  }

  .admin-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-live-badge {
    justify-content: center;
  }

  .support-summary-grid,
  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .support-summary-card {
    gap: 9px;
    padding: 12px;
  }

  .support-summary-card > span:first-child {
    width: 38px;
    height: 38px;
  }

  .support-summary-card b {
    font-size: 22px;
  }

  .support-summary-card em {
    display: none;
  }

  .support-layout {
    gap: 13px;
  }

  .support-compose-card,
  .support-inbox-card,
  .support-conversation-card {
    border-radius: 15px;
  }

  .support-ticket-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .support-ticket-icon {
    width: 38px;
    height: 38px;
  }

  .support-ticket-item > .support-status {
    grid-column: 2;
    justify-self: start;
  }

  .support-conversation-head,
  .admin-support-detail-head {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 14px;
  }

  .support-conversation-badges {
    width: 100%;
    padding-left: 55px;
  }

  .support-messages {
    max-height: 420px;
    padding: 13px;
  }

  .support-message {
    max-width: 94%;
  }

  .support-reply-form,
  .admin-support-reply-form {
    padding: 13px;
  }

  .support-reply-form .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .support-reply-form .form-actions button {
    width: 100%;
    justify-content: center;
  }

  .admin-tabs {
    top: 5px;
    margin-inline: -4px;
    border-radius: 13px;
  }

  .admin-tabs button {
    min-height: 40px;
    padding: 0 12px;
  }

  .admin-toolbar,
  .admin-activity-toolbar,
  .admin-support-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-toolbar select {
    width: 100%;
  }

  .admin-growth-chart {
    height: 190px;
    gap: 6px;
  }

  .admin-pulse-grid,
  .system-facts {
    grid-template-columns: 1fr;
  }

  .admin-support-controls {
    align-items: stretch;
  }

  .admin-support-controls label {
    width: 100%;
  }

  .admin-user-modal {
    align-items: end;
    padding: 0;
  }

  .admin-user-modal-panel {
    width: 100%;
    max-height: 94dvh;
    border-radius: 20px 20px 0 0;
  }

  .admin-user-modal-content {
    padding: 12px;
  }

  .admin-user-profile {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 13px;
  }

  .admin-user-profile > .admin-status {
    margin-left: 71px;
  }

  .admin-user-detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .admin-content-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .admin-content-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 430px) {
  .support-summary-grid,
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .support-summary-card em {
    display: block;
  }

  .support-message-avatar {
    display: none;
  }

  .support-message {
    max-width: 97%;
  }

  .support-conversation-badges {
    padding-left: 0;
  }

  .admin-user-detail-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* Ajustes visuales 2.9.1 - expediente de usuario */
.admin-user-modal-panel {
  width: min(1180px, 96vw);
}

.admin-user-modal-content {
  padding: 20px;
}

.admin-user-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.admin-user-profile-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.admin-user-profile-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-user-profile h2 {
  font-size: 18px;
  line-height: 1.2;
}

.admin-user-profile p {
  font-size: 12px;
}

.admin-user-profile small {
  font-size: 11px;
}

.admin-user-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.admin-user-profile-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 1px solid #e1e8f0;
  border-radius: 999px;
  background: #f5f8fc;
  color: #617287;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
}

.admin-user-profile-meta svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: #0f6dd7;
}

.admin-user-detail-stats {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.admin-user-detail-stats > div {
  min-height: 78px;
  padding: 12px;
}

.admin-user-detail-stats small {
  font-size: 10px;
}

.admin-user-detail-stats b {
  font-size: 17px;
}

.admin-user-notify {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.admin-user-notify-copy {
  display: grid;
  gap: 6px;
  align-content: start;
}

.admin-user-notify-copy p {
  margin: 0;
  color: #6d7c8f;
  font-size: 12px;
  line-height: 1.5;
}

.admin-user-notify form {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-user-notify-field {
  display: grid;
  gap: 6px;
}

.admin-user-notify-field--message {
  min-width: 0;
}

.admin-user-notify input,
.admin-user-notify textarea {
  min-height: 48px;
  padding: 11px 13px;
  color: #203044;
  font-size: 14px;
  box-sizing: border-box;
}

.admin-user-notify textarea {
  min-height: 92px;
}

.admin-user-notify form > button {
  min-height: 48px;
  align-self: stretch;
  justify-content: center;
  padding-inline: 18px;
}

.admin-user-detail-grid {
  gap: 14px;
  margin-top: 14px;
}

.admin-user-detail-grid > article {
  min-height: 300px;
}

.admin-user-activity-list,
.admin-user-content-list {
  padding: 14px;
}

.admin-user-content-list > div {
  gap: 10px;
  padding: 10px;
}

.admin-user-content-list b {
  font-size: 12px;
}

.admin-user-content-list small {
  font-size: 10px;
}

@media (max-width: 980px) {
  .admin-user-notify {
    grid-template-columns: 1fr;
  }

  .admin-user-notify form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-user-modal-content {
    padding: 12px;
  }

  .admin-user-profile {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .admin-user-profile-main {
    align-items: flex-start;
  }

  .admin-user-profile > .admin-status {
    margin-left: 0;
  }

  .admin-user-profile-meta span {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-user-detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .admin-user-detail-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* Ajustes 2.9.2 · conversación de soporte y etiquetas térmicas */
.support-conversation-card,
.admin-support-detail {
  overflow: hidden;
}

.support-conversation-head,
.admin-support-detail-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.support-conversation-icon {
  width: 44px;
  height: 44px;
}

.support-conversation-badges {
  max-width: 260px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.support-messages {
  min-height: 170px;
  max-height: 480px;
  gap: 15px;
  padding: 18px 20px;
}

.support-message {
  display: flex;
  width: fit-content;
  max-width: min(82%, 760px);
  align-items: flex-start;
  gap: 10px;
}

.support-message.is-user {
  justify-self: start;
}

.support-message.is-admin {
  justify-self: end;
  flex-direction: row-reverse;
}

.support-message-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #5b68c8;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 3px 12px rgb(25 42 70 / 15%);
}

.support-message-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.support-message-bubble,
.support-message > span:last-child {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 6px;
  border: 1px solid #dce5ef;
  border-radius: 6px 16px 16px 16px;
  background: #fff;
  padding: 11px 13px;
  box-shadow: 0 6px 18px rgb(29 49 76 / 6%);
}

.support-message.is-admin .support-message-bubble,
.support-message.is-admin > span:last-child {
  border-color: #cdd9f5;
  border-radius: 16px 6px 16px 16px;
  background: #eef5ff;
}

.support-message-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
}

.support-message-meta b {
  color: #172337;
  font-size: 11.5px;
  line-height: 1.25;
}

.support-message-meta small {
  margin: 0;
  color: #7d8999;
  font-size: 9px;
  line-height: 1.25;
}

.support-message p {
  margin: 0;
  color: #344257;
  font-size: 12.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.support-reply-form,
.admin-support-reply-form {
  gap: 14px;
  padding: 18px 20px 20px;
}

.support-reply-form > label,
.admin-support-reply-form > label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #263449;
  font-size: 12px;
  font-weight: 700;
}

.support-reply-form textarea,
.admin-support-reply-form textarea {
  width: 100%;
  max-width: 100%;
  min-height: 118px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #cbd7e5;
  border-radius: 12px;
  background: #fff;
  color: #253247;
  padding: 12px 13px;
  font: inherit;
  font-weight: 450;
  line-height: 1.5;
}

.support-reply-form textarea:focus,
.admin-support-reply-form textarea:focus {
  border-color: #0b6fd8;
  outline: 3px solid rgb(11 111 216 / 12%);
}

.support-reply-form .form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* El precio no depende de fondos de color: se lee en impresoras térmicas. */
.label-price {
  right: 12px;
  bottom: 10px;
  border: 2px solid #111 !important;
  border-radius: 7px;
  background: #fff !important;
  color: #111 !important;
  padding: 7px 10px;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -.025em;
  line-height: 1;
  box-shadow: 0 2px 0 rgb(17 17 17 / 8%);
  text-shadow: none !important;
}

.label-preview.size-50x30 .label-price {
  font-size: 14px;
}

.label-preview.size-100x50 .label-price {
  padding: 8px 13px;
  font-size: 20px;
}

@media (max-width: 760px) {
  .support-conversation-head,
  .admin-support-detail-head {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    padding: 15px;
  }

  .support-conversation-badges {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    padding-left: 56px;
  }

  .support-messages {
    min-height: 145px;
    padding: 15px;
  }

  .support-message {
    max-width: 94%;
  }

  .support-reply-form,
  .admin-support-reply-form {
    padding: 15px;
  }

  .support-reply-form .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .support-reply-form .form-actions button,
  .admin-support-reply-form button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .support-message-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 12px;
  }

  .support-message {
    max-width: 98%;
  }

  .support-message-bubble,
  .support-message > span:last-child {
    padding: 10px 11px;
  }

  .support-conversation-badges {
    padding-left: 0;
  }
}

/* Ajustes visuales 2.9.3 - expediente de usuario */
.admin-user-profile {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.admin-user-profile-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.admin-user-profile-avatar {
  display: grid !important;
  width: 72px !important;
  min-width: 72px;
  height: 72px !important;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #5875d8 0%, #4f63cb 100%);
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%);
}

.admin-user-profile-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-user-profile-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.admin-user-profile h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.admin-user-profile p {
  overflow: hidden;
  margin: 0;
  color: #6f7d90;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.admin-user-profile-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dce6f1;
  border-radius: 999px;
  background: #f5f8fc;
  color: #64768b;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 11px;
}

.admin-user-profile-meta svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: #0f6dd7;
}

.admin-user-notify {
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) !important;
  align-items: start;
  gap: 16px;
}

.admin-user-notify-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}

.admin-user-notify-copy p {
  margin: 0;
  color: #6d7c8f;
  font-size: 13px;
  line-height: 1.5;
}

.admin-user-notify form {
  display: grid !important;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) 108px;
  gap: 10px;
  align-items: end !important;
}

.admin-user-notify-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-user-notify-field--message {
  min-width: 0;
}

.admin-user-notify input,
.admin-user-notify textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: #203044;
  font-size: 14px;
}

.admin-user-notify textarea {
  min-height: 112px;
}

.admin-user-notify form > button {
  width: 108px;
  min-width: 108px;
  min-height: 48px;
  height: 48px;
  align-self: end !important;
  justify-content: center;
  padding: 0 16px;
}

@media (max-width: 980px) {
  .admin-user-profile {
    grid-template-columns: 1fr;
  }

  .admin-user-notify {
    grid-template-columns: 1fr !important;
  }

  .admin-user-notify form {
    grid-template-columns: 1fr !important;
  }

  .admin-user-notify form > button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .admin-user-profile-main {
    align-items: flex-start;
  }

  .admin-user-profile-avatar {
    width: 64px !important;
    min-width: 64px;
    height: 64px !important;
    font-size: 30px;
  }

  .admin-user-profile-meta span {
    width: 100%;
  }
}

/* Ajuste 2.9.4 - el precio nunca invade el nombre de la etiqueta */
.label-preview.has-price .label-brand,
.label-preview.has-price .label-name {
  width: 64%;
  max-width: 64%;
  align-self: flex-start;
}

.label-preview.has-price .label-price {
  top: 14px;
  right: 12px;
  bottom: auto;
  max-width: 31%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.label-preview.size-50x30.has-price .label-brand,
.label-preview.size-50x30.has-price .label-name {
  width: 60%;
  max-width: 60%;
}

.label-preview.size-50x30.has-price .label-price {
  top: 10px;
  right: 8px;
  max-width: 35%;
}

.label-preview.size-100x50.has-price .label-brand,
.label-preview.size-100x50.has-price .label-name {
  width: 70%;
  max-width: 70%;
}

.label-preview.size-100x50.has-price .label-price {
  top: 14px;
  right: 14px;
  max-width: 27%;
}

/* Ajuste 2.9.5 - nombre y precio más compactos en viñetas */
.label-preview .label-brand {
  letter-spacing: .1em;
}

.label-preview .label-name {
  line-height: 1.02;
}

.label-preview.has-price .label-brand,
.label-preview.has-price .label-name {
  width: 58%;
  max-width: 58%;
  align-self: flex-start;
}

.label-preview.has-price .label-price {
  top: 12px;
  right: 10px;
  bottom: auto;
  max-width: 35%;
  padding: 6px 8px;
  font-size: 14px;
}

.label-preview.size-50x30 .label-brand {
  font-size: 4.8pt;
}

.label-preview.size-50x30 .label-name {
  margin-top: .7mm;
  font-size: 7.2pt;
}

.label-preview.size-50x30.has-price .label-brand,
.label-preview.size-50x30.has-price .label-name {
  width: 56%;
  max-width: 56%;
}

.label-preview.size-50x30.has-price .label-price {
  top: 10px;
  right: 8px;
  max-width: 36%;
  padding: 5px 7px;
  font-size: 11px;
}

.label-preview.size-60x40 .label-brand {
  font-size: 6.2pt;
}

.label-preview.size-60x40 .label-name {
  margin-top: 1.2mm;
  font-size: 10pt;
}

.label-preview.size-60x40.has-price .label-brand,
.label-preview.size-60x40.has-price .label-name {
  width: 57%;
  max-width: 57%;
}

.label-preview.size-60x40.has-price .label-price {
  max-width: 34%;
  padding: 6px 9px;
  font-size: 13px;
}

.label-preview.size-100x50 .label-brand {
  font-size: 8pt;
}

.label-preview.size-100x50 .label-name {
  margin-top: 1.2mm;
  font-size: 13pt;
}

.label-preview.size-100x50.has-price .label-brand,
.label-preview.size-100x50.has-price .label-name {
  width: 66%;
  max-width: 66%;
}

.label-preview.size-100x50.has-price .label-price {
  top: 14px;
  right: 12px;
  max-width: 28%;
  padding: 7px 11px;
  font-size: 18px;
}

/* Ajuste 2.9.7 - viñeta centrada con precio arriba */
.label-preview.has-price {
  padding-top: 34px;
}

.label-preview.has-price .label-brand,
.label-preview.has-price .label-name {
  width: 100%;
  max-width: 100%;
  align-self: center;
  text-align: center;
}

.label-preview.has-price .label-brand {
  margin-top: 2px;
}

.label-preview.has-price .label-price {
  top: 10px;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  max-width: 72%;
  padding: 6px 10px;
  font-size: 13px;
}

.label-preview.size-50x30.has-price {
  padding-top: 30px;
}

.label-preview.size-50x30.has-price .label-brand,
.label-preview.size-50x30.has-price .label-name {
  width: 100%;
  max-width: 100%;
}

.label-preview.size-50x30.has-price .label-price {
  top: 8px;
  max-width: 76%;
  padding: 4px 8px;
  font-size: 10px;
}

.label-preview.size-60x40.has-price {
  padding-top: 34px;
}

.label-preview.size-60x40.has-price .label-price {
  max-width: 72%;
  font-size: 13px;
}

.label-preview.size-100x50.has-price {
  padding-top: 40px;
}

.label-preview.size-100x50.has-price .label-price {
  top: 10px;
  max-width: 64%;
  padding: 7px 12px;
  font-size: 18px;
}

/* Ajuste 2.9.8 - vista previa de viñeta más parecida a la impresión */
.label-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: min(100%, 420px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  background: #fff;
  color: #111;
  text-align: center;
  box-shadow: 0 14px 35px rgb(26 43 71 / 10%);
}

.label-preview.size-50x30 {
  min-height: 188px;
  padding: 18px 18px 12px;
}

.label-preview.size-60x40 {
  min-height: 238px;
  padding: 22px 28px 18px;
}

.label-preview.size-100x50 {
  min-height: 280px;
  padding: 24px 30px 20px;
}

.label-preview .label-accent {
  position: absolute;
  inset: 0 0 auto;
  height: 9px;
  background: var(--label-accent, #0064cc);
}

.label-preview .label-brand {
  max-width: 100%;
  margin-top: 30px;
  overflow: hidden;
  color: #1c1f24;
  font-weight: 800;
  letter-spacing: .18em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-preview .label-name {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  margin-top: 8px;
  color: #15181d;
  font-weight: 800;
  line-height: 1.05;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.label-preview .label-price {
  position: absolute;
  top: 12px;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  border: 2px solid #111 !important;
  border-radius: 8px;
  background: #fff !important;
  color: #111 !important;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 3px 0 rgb(17 17 17 / 10%);
}

.label-preview svg {
  display: block;
  width: 78%;
  max-width: 300px;
  margin-top: 14px;
}

.label-preview svg + * {
  margin-top: 0;
}

.label-preview.size-50x30 .label-brand {
  margin-top: 24px;
  font-size: 9px;
}

.label-preview.size-50x30 .label-name {
  font-size: 18px;
}

.label-preview.size-50x30 .label-price {
  top: 10px;
  max-width: 76%;
  padding: 4px 10px;
  font-size: 16px;
}

.label-preview.size-50x30 svg {
  margin-top: 12px;
}

.label-preview.size-60x40 .label-brand {
  margin-top: 30px;
  font-size: 10px;
}

.label-preview.size-60x40 .label-name {
  font-size: 16px;
}

.label-preview.size-60x40 .label-price {
  top: 12px;
  max-width: 72%;
  padding: 5px 12px;
  font-size: 15px;
}

.label-preview.size-100x50 .label-brand {
  margin-top: 34px;
  font-size: 12px;
}

.label-preview.size-100x50 .label-name {
  font-size: 20px;
}

.label-preview.size-100x50 .label-price {
  top: 14px;
  max-width: 66%;
  padding: 6px 14px;
  font-size: 19px;
}

.label-preview:not(.has-price) .label-brand {
  margin-top: 16px;
}

.label-preview.has-price {
  padding-top: 18px;
}

.label-preview.has-price .label-brand,
.label-preview.has-price .label-name {
  width: 100%;
  max-width: 100%;
  align-self: center;
  text-align: center;
}

/* Ajuste 2.9.9 - menos espacio debajo del precio en vista previa */
.label-preview.has-price {
  padding-top: 10px;
}

.label-preview.has-price .label-brand {
  margin-top: 6px;
}

.label-preview.size-50x30.has-price {
  padding-top: 8px;
}

.label-preview.size-50x30.has-price .label-brand {
  margin-top: 4px;
}

.label-preview.size-60x40.has-price {
  padding-top: 10px;
}

.label-preview.size-60x40.has-price .label-brand {
  margin-top: 6px;
}

.label-preview.size-100x50.has-price {
  padding-top: 12px;
}

.label-preview.size-100x50.has-price .label-brand {
  margin-top: 8px;
}

/* Chus.site 3.0.0 - rótulos sin línea y con imagen opcional */
.sign-controls .form-two .option-row {
  height: 100%;
}

.sign-preview .sign-product-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(42%, 180px);
  aspect-ratio: 1 / 1;
  margin-top: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgb(21 35 58 / 10%);
  overflow: hidden;
}

.sign-preview .sign-product-image[hidden] {
  display: none !important;
}

.sign-preview .sign-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sign-preview.template-minimal .sign-product-image {
  align-self: flex-start;
  width: min(34%, 160px);
}

.sign-preview.template-split .sign-product-image {
  position: absolute;
  left: clamp(18px, 4vw, 34px);
  top: 110px;
  width: min(18%, 125px);
  margin-top: 0;
  border-radius: 18px;
}

.sign-preview.template-frame .sign-product-image {
  border: 2px solid #dce6f3;
}

.sign-preview.template-minimal footer,
.sign-preview.template-split footer,
.sign-preview.template-frame footer {
  border-top: 0 !important;
  padding-top: 0 !important;
}

@media (max-width: 760px) {
  .sign-preview .sign-product-image {
    width: min(48%, 150px);
    margin-top: 14px;
  }

  .sign-preview.template-split .sign-product-image {
    left: 14px;
    top: 96px;
    width: min(22%, 96px);
  }
}

/* Chus.site 3.0.1 · imágenes de producto profesionales en los cinco rótulos */
.sign-preview .sign-product-image {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center;
  justify-content: center;
  width: 178px !important;
  height: 122px !important;
  min-width: 178px;
  min-height: 122px;
  max-width: 178px !important;
  max-height: 122px;
  aspect-ratio: auto !important;
  margin: 14px auto 0;
  border: 1px solid #dce5ef;
  border-radius: 18px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 12px 28px rgb(20 36 60 / 10%);
  overflow: hidden;
}

.sign-preview .sign-product-image[hidden] {
  display: none !important;
}

.sign-preview .sign-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  transform: scale(1.04);
}

.sign-preview.has-product-image {
  justify-content: flex-start;
  padding-top: 38px;
}

.sign-preview.has-product-image h2 {
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: .98;
}

.sign-preview.has-product-image p {
  margin-top: 9px;
}

.sign-preview.has-product-image .sign-price-block {
  margin-top: 14px;
}

.sign-preview.has-product-image .sign-barcode {
  margin-top: 12px;
}

/* 1. Impacto / oferta */
.sign-preview.template-offer.has-product-image .sign-product-image {
  width: 174px !important;
  height: 112px !important;
  min-width: 174px;
  min-height: 112px;
  max-width: 174px !important;
  max-height: 112px;
}

/* 2. Minimal: producto en una tarjeta inferior derecha */
.sign-preview.template-minimal.has-product-image {
  justify-content: flex-start;
  padding-top: 48px;
}

.sign-preview.template-minimal.has-product-image h2,
.sign-preview.template-minimal.has-product-image p {
  max-width: 94%;
}

.sign-preview.template-minimal.has-product-image .sign-product-image {
  position: absolute;
  right: 28px;
  bottom: 76px;
  width: 146px !important;
  height: 146px !important;
  min-width: 146px;
  min-height: 146px;
  max-width: 146px !important;
  max-height: 146px;
  margin: 0;
  border-radius: 20px;
}

.sign-preview.template-minimal.has-product-image .sign-price-block,
.sign-preview.template-minimal.has-product-image .sign-barcode {
  width: 50%;
  max-width: 50%;
}

/* 3. Dividido: imagen dentro del panel lateral */
.sign-preview.template-split.has-product-image {
  justify-content: flex-start;
  padding-top: 48px;
  padding-left: 38%;
}

.sign-preview.template-split.has-product-image .sign-corner {
  width: 31%;
}

.sign-preview.template-split.has-product-image .sign-badge {
  width: 24%;
}

.sign-preview.template-split.has-product-image .sign-product-image {
  position: absolute;
  top: 150px;
  left: 4%;
  width: 23% !important;
  height: 164px !important;
  min-width: 0;
  min-height: 164px;
  max-width: 23% !important;
  max-height: 164px;
  margin: 0;
  border: 0;
  border-radius: 18px;
  padding: 9px;
  box-shadow: 0 12px 30px rgb(0 0 0 / 16%);
}

/* 4. Marco */
.sign-preview.template-frame.has-product-image {
  padding-top: 34px;
}

.sign-preview.template-frame.has-product-image .sign-product-image {
  width: 168px !important;
  height: 112px !important;
  min-width: 168px;
  min-height: 112px;
  max-width: 168px !important;
  max-height: 112px;
  border: 2px solid #d6e3f2;
}

/* 5. Precio: tarjeta blanca compacta sin aplastar la foto */
.sign-preview.template-price.has-product-image {
  justify-content: flex-start;
  padding: 34px 30px 26px;
}

.sign-preview.template-price.has-product-image .sign-eyebrow {
  margin-top: 16px;
}

.sign-preview.template-price.has-product-image h2 {
  max-width: 94%;
  margin-top: 9px;
  font-size: clamp(28px, 3.8vw, 38px);
  line-height: .96;
}

.sign-preview.template-price.has-product-image p {
  margin-top: 8px;
  font-size: 13px;
}

.sign-preview.template-price.has-product-image .sign-product-image {
  width: 170px !important;
  height: 94px !important;
  min-width: 170px;
  min-height: 94px;
  max-width: 170px !important;
  max-height: 94px;
  margin-top: 10px;
  border: 0;
  border-radius: 13px;
  padding: 8px;
  box-shadow: none;
}

.sign-preview.template-price.has-product-image .sign-price-block {
  min-width: 64%;
  margin-top: 12px;
  padding: 11px 22px;
}

.sign-preview.template-price.has-product-image .sign-price-block strong {
  font-size: clamp(52px, 6vw, 66px);
}

.sign-preview.template-price.has-product-image .sign-barcode {
  margin-top: 12px;
}

.sign-preview.template-price.has-product-image .sign-barcode svg {
  height: 52px;
}

/* La línea inferior no aparece en Minimal, Dividido ni Marco. */
.sign-preview.template-minimal footer,
.sign-preview.template-split footer,
.sign-preview.template-frame footer {
  border-top: 0 !important;
  padding-top: 0 !important;
}

/* Ajustes para rótulos horizontales */
.sign-preview.size-a4-landscape.has-product-image,
.sign-preview.size-letter-landscape.has-product-image {
  padding-top: 32px;
}

.sign-preview.size-a4-landscape.has-product-image .sign-product-image,
.sign-preview.size-letter-landscape.has-product-image .sign-product-image {
  width: 190px !important;
  height: 112px !important;
  min-width: 190px;
  min-height: 112px;
  max-width: 190px !important;
  max-height: 112px;
}

.sign-preview.template-minimal.size-a4-landscape.has-product-image .sign-product-image,
.sign-preview.template-minimal.size-letter-landscape.has-product-image .sign-product-image {
  right: 34px;
  bottom: 48px;
  width: 150px !important;
  height: 118px !important;
  min-width: 150px;
  min-height: 118px;
  max-width: 150px !important;
  max-height: 118px;
}

.sign-preview.template-split.size-a4-landscape.has-product-image .sign-product-image,
.sign-preview.template-split.size-letter-landscape.has-product-image .sign-product-image {
  top: 104px;
  left: 5%;
  width: 22% !important;
  height: 132px !important;
  min-width: 0;
  min-height: 132px;
  max-width: 22% !important;
  max-height: 132px;
}

@media (max-width: 620px) {
  .sign-preview .sign-product-image {
    width: 148px !important;
    height: 102px !important;
    min-width: 148px;
    min-height: 102px;
    max-width: 148px !important;
    max-height: 102px;
  }

  .sign-preview.template-minimal.has-product-image .sign-product-image {
    right: 18px;
    bottom: 70px;
    width: 118px !important;
    height: 118px !important;
    min-width: 118px;
    min-height: 118px;
    max-width: 118px !important;
    max-height: 118px;
  }

  .sign-preview.template-split.has-product-image .sign-product-image {
    top: 132px;
    left: 3.5%;
    height: 132px !important;
    min-height: 132px;
    max-height: 132px;
  }

  .sign-preview.template-price.has-product-image .sign-product-image {
    width: 146px !important;
    height: 82px !important;
    min-width: 146px;
    min-height: 82px;
    max-width: 146px !important;
    max-height: 82px;
  }
}

/* Chus.site 3.0.2 - corrección definitiva de etiquetas con precio */
.label-preview {
  position: relative;
  overflow: hidden;
}

.label-preview .label-accent {
  position: absolute;
  inset: 0 0 auto;
}

.label-preview .label-price {
  position: absolute !important;
  z-index: 3;
  left: auto !important;
  transform: none !important;
  right: 10px;
  top: 10px;
  bottom: auto !important;
  max-width: 34%;
  border: 2px solid #111;
  border-radius: 8px;
  background: #fff;
  color: #111;
  box-shadow: none;
}

.label-preview.has-price {
  padding-top: 8px !important;
}

.label-preview.has-price .label-brand,
.label-preview.has-price .label-name {
  align-self: center;
  text-align: center;
}

.label-preview.has-price .label-brand {
  width: 74%;
  max-width: 74%;
  margin-top: 30px !important;
}

.label-preview.has-price .label-name {
  width: 74%;
  max-width: 74%;
  margin-top: 3px;
}

.label-preview.size-50x30 .label-price {
  right: 8px;
  top: 8px;
  max-width: 36%;
  padding: 4px 8px;
  font-size: 10px;
}

.label-preview.size-50x30.has-price .label-brand,
.label-preview.size-50x30.has-price .label-name {
  width: 72%;
  max-width: 72%;
}

.label-preview.size-50x30.has-price .label-brand {
  margin-top: 24px !important;
}

.label-preview.size-50x30 .label-name {
  font-size: 11px;
  line-height: 1.02;
}

.label-preview.size-60x40 .label-price {
  right: 10px;
  top: 10px;
  max-width: 34%;
  padding: 5px 10px;
  font-size: 13px;
}

.label-preview.size-60x40.has-price .label-brand,
.label-preview.size-60x40.has-price .label-name {
  width: 74%;
  max-width: 74%;
}

.label-preview.size-60x40.has-price .label-brand {
  margin-top: 30px !important;
}

.label-preview.size-60x40 .label-name {
  font-size: 15px;
  line-height: 1.03;
}

.label-preview.size-100x50 .label-price {
  right: 12px;
  top: 12px;
  max-width: 32%;
  padding: 6px 12px;
  font-size: 18px;
}

.label-preview.size-100x50.has-price .label-brand,
.label-preview.size-100x50.has-price .label-name {
  width: 78%;
  max-width: 78%;
}

.label-preview.size-100x50.has-price .label-brand {
  margin-top: 34px !important;
}

.label-preview.size-100x50 .label-name {
  font-size: 20px;
  line-height: 1.02;
}

/* Chus.site 3.0.3 - etiqueta optimizada y sin diseño dividido */
.label-preview .label-price {
  border: 0 !important;
  box-shadow: none !important;
  right: 10px !important;
  left: auto !important;
  top: 10px !important;
  bottom: auto !important;
  transform: none !important;
  max-width: 34%;
  padding: 5px 10px !important;
}

.label-preview.has-price {
  padding-top: 8px !important;
}

.label-preview.has-price .label-brand {
  width: 48% !important;
  max-width: 48% !important;
  align-self: flex-start !important;
  text-align: left !important;
  margin-top: 18px !important;
  margin-left: 10px !important;
}

.label-preview.has-price .label-name {
  width: 86% !important;
  max-width: 86% !important;
  align-self: center !important;
  text-align: center !important;
  margin-top: 4px !important;
}

.label-preview.size-50x30 .label-price {
  right: 8px !important;
  top: 8px !important;
  max-width: 36%;
  padding: 4px 8px !important;
  font-size: 10px !important;
}

.label-preview.size-50x30.has-price .label-brand {
  width: 46% !important;
  max-width: 46% !important;
  margin-top: 14px !important;
  margin-left: 8px !important;
}

.label-preview.size-50x30.has-price .label-name {
  width: 86% !important;
  max-width: 86% !important;
  margin-top: 3px !important;
}

.label-preview.size-60x40.has-price .label-brand {
  width: 48% !important;
  max-width: 48% !important;
  margin-top: 18px !important;
}

.label-preview.size-60x40.has-price .label-name {
  width: 87% !important;
  max-width: 87% !important;
}

.label-preview.size-100x50.has-price .label-brand {
  width: 52% !important;
  max-width: 52% !important;
  margin-top: 22px !important;
}

.label-preview.size-100x50.has-price .label-name {
  width: 88% !important;
  max-width: 88% !important;
}

/* Chus.site 3.0.4 - estabilidad de formularios y buscadores en móvil */
@media (max-width: 900px) {
  html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    overscroll-behavior-x: none;
  }

  body {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    overscroll-behavior-x: none;
  }

  input,
  textarea,
  select {
    min-width: 0;
    max-width: 100%;
    font-size: 16px !important;
    touch-action: manipulation;
  }

  input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
  }

  form,
  label,
  .input-wrap,
  .form-two,
  .stack-form,
  .search-field,
  .manual-scan,
  .topbar-search,
  .global-search-shell,
  .catalog-search-field,
  .products-search-panel,
  .public-catalog-panel,
  .public-search-toolbar,
  .access-page,
  .access-auth-pane,
  .auth-panel,
  .auth-form,
  .app-shell,
  .app-main,
  .workspace,
  .view {
    min-width: 0;
    max-width: 100%;
  }

  .input-wrap,
  .catalog-search-field,
  .search-field,
  .manual-scan,
  .global-search-shell {
    width: 100%;
  }

  .input-wrap input,
  .catalog-search-field input,
  .search-field input,
  .manual-scan input,
  .topbar-search input,
  .global-search-shell input,
  .stack-form input,
  .stack-form textarea,
  .stack-form select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 16px !important;
  }

  .access-v2 .input-wrap input,
  .access-v2 .auth-form input,
  .access-v2 .auth-form select,
  .access-v2 .auth-form textarea {
    font-size: 16px !important;
  }

  .access-auth-pane {
    overflow-x: hidden;
  }

  .auth-panel {
    width: 100%;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 900px) {
    input,
    textarea,
    select {
      font-size: 16px !important;
    }

    html,
    body {
      -webkit-overflow-scrolling: touch;
    }
  }
}
