:root {
  --bg: #0c0f14;
  --surface: #141923;
  --surface-2: #1c2433;
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Instrument Sans", "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(94, 234, 212, 0.12), transparent),
    radial-gradient(900px 500px at 90% 20%, rgba(99, 102, 241, 0.1), transparent),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(12, 15, 20, 0.75);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #042f2e;
  box-shadow: 0 8px 32px rgba(45, 212, 191, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 12px 40px rgba(45, 212, 191, 0.35);
}

/* Secundario: combina con .btn (misma altura/padding que .btn-primary) */
.btn.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.38);
  box-shadow: none;
}

.btn.btn-secondary:hover,
.btn.btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(148, 163, 184, 0.55);
  outline: none;
}

.btn.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  min-height: 2.25rem;
  border-radius: 10px;
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--surface);
}

.btn-demo {
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.45);
  color: var(--accent);
}

.btn-demo:hover {
  background: rgba(94, 234, 212, 0.18);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.22);
}

.hero {
  padding: clamp(3rem, 10vw, 6rem) 0 clamp(4rem, 12vw, 7rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.35rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
}

.hero p.lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 36ch;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-visual {
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.benefit-panel-heading {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.mock-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.section {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.section-intro {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 2.5rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(94, 234, 212, 0.35);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.icon-pill {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(94, 234, 212, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

@media (max-width: 700px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

.stat {
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  font-family: var(--font-display);
  color: var(--accent);
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 32ch;
}

.footer-col h4 {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.page-hero p {
  color: var(--muted);
  max-width: 55ch;
  margin: 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

@media (max-width: 960px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
}

.price-card.featured {
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.15);
}

.price-card h3 {
  margin: 0 0 0.25rem;
}

.price-card .price {
  font-size: 2.25rem;
  font-family: var(--font-display);
  margin: 1rem 0;
}

.price-card .price small {
  font-size: 1rem;
  color: var(--muted);
  font-weight: normal;
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex: 1;
}

.price-card li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.price-card li::before {
  content: "✓ ";
  color: var(--accent);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-panel h3 {
  margin-top: 0;
}

.contact-panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.cards.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 700px) {
  .cards.cols-2 {
    grid-template-columns: 1fr;
  }
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-tag {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.25);
  color: var(--accent);
}

.callout {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.08), rgba(99, 102, 241, 0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-top: 2rem;
}

.callout h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.callout p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.mono {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.9em;
  color: var(--accent);
}

.stack-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.stack-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.stack-list li:last-child {
  border-bottom: none;
}

.stack-list strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.35rem;
}

/* Registro / OAuth */
.auth-main {
  padding: clamp(2rem, 6vw, 4rem) 0;
}

.auth-shell {
  display: flex;
  justify-content: center;
}

.auth-shell-wide .auth-card {
  max-width: 32rem;
}

.auth-shell-editor {
  justify-content: stretch;
}

.auth-shell-editor .auth-card {
  max-width: 1120px;
}

.dash-editor-card {
  width: 100%;
}

.dash-editor-intro {
  max-width: 52rem;
}

/* Mantener «…en Productos» junto cuando hay ancho; en móvil estrecho puede partirse la frase */
@media (min-width: 720px) {
  .dash-editor-intro-tail {
    white-space: nowrap;
  }
}

.dash-product-pane-label {
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.dash-product-pane-label-muted {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.dash-editor-sidebar.dash-product-editor-pane {
  padding: 1.35rem 1rem 1.5rem 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  border-right-width: 3px;
  border-right-color: var(--accent-dim);
  background:
    linear-gradient(225deg, rgba(94, 234, 212, 0.07), transparent 44%),
    rgba(17, 22, 30, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.22);
  overflow-x: hidden;
}

.dash-product-catalog-pane {
  min-width: 0;
  padding: 1.25rem 1.2rem 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(12, 15, 20, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow-x: hidden;
}

.dash-product-catalog-pane .dash-box {
  margin-top: 0.15rem;
  background: rgba(0, 0, 0, 0.2);
}

.dash-editor-layout {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 1.85rem;
  align-items: start;
  margin-top: 0.65rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.dash-editor-main {
  min-width: 0;
}

@media (max-width: 900px) {
  .dash-editor-layout {
    grid-template-columns: 1fr;
  }

  .dash-editor-sidebar {
    position: static !important;
    max-height: none !important;
  }
}

.dash-editor-sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.dash-editor-sidebar.dash-product-editor-pane {
  padding-right: 0.85rem;
}

.dash-product-form {
  padding-bottom: 0.5rem;
  min-width: 0;
}

.dash-product-form .auth-field input:not([type="checkbox"]):not([type="radio"]),
.dash-product-form .auth-field select,
.dash-product-form .auth-field textarea {
  width: 100%;
  max-width: 100%;
}

.dash-product-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  width: 100%;
}

.dash-product-meta-row > .auth-field {
  margin: 0;
  min-width: 0;
}

.dash-product-meta-row > .auth-field > span:first-child {
  line-height: 1.25;
}

.dash-meta-control-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}

.dash-product-meta-row input,
.dash-product-meta-row select {
  min-height: 2.65rem;
  box-sizing: border-box;
  width: 100%;
}

.dash-product-meta-name input,
.dash-product-meta-slug input {
  display: block;
}

.dash-product-form .dash-char-count--placeholder {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.dash-product-taxonomy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.85rem;
  width: 100%;
  align-items: start;
}

.dash-product-taxonomy-col {
  margin: 0;
  min-width: 0;
}

.dash-product-taxonomy-col .dash-field-hint {
  margin: 0 0 0.4rem;
  line-height: 1.35;
}

.dash-product-taxonomy-col .dash-category-checkboxes,
.dash-product-taxonomy-col .dash-tag-checkboxes {
  max-height: min(200px, 34vh);
}

@media (max-width: 800px) {
  .dash-product-meta-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dash-product-taxonomy-row {
    grid-template-columns: 1fr;
  }
}

.dash-editor-main-head {
  margin-bottom: 0.85rem;
}

.dash-editor-main-title {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.dash-editor-main-lead {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.dash-product-list-scroll {
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

.dash-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.dash-form-actions .auth-submit {
  width: auto;
  flex: 1 1 auto;
  min-width: 12rem;
}

.dash-cancel-edit {
  flex-shrink: 0;
}

.dash-edit-banner {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.22);
  font-size: 0.88rem;
  color: var(--text);
}

.dash-edit-banner a {
  color: var(--accent);
  font-weight: 600;
}

.dash-field-hint {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--muted);
}

.dash-category-filter-toolbar,
.dash-tag-filter-toolbar {
  margin: 0 0 0.65rem;
}

.dash-category-filter-toolbar[hidden],
.dash-tag-filter-toolbar[hidden] {
  display: none !important;
}

.dash-category-search-label,
.dash-tag-search-label {
  display: block;
  margin: 0;
}

.dash-category-search-label-text,
.dash-tag-search-label-text {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.dash-category-filter-input,
.dash-tag-filter-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}

.dash-category-filter-input:focus,
.dash-tag-filter-input:focus {
  outline: 2px solid rgba(94, 234, 212, 0.35);
  outline-offset: 1px;
}

.dash-category-filter-empty,
.dash-tag-filter-empty {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.dash-category-checkboxes,
.dash-tag-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  max-height: min(260px, 42vh);
  overflow-y: auto;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  min-height: 2.75rem;
}

.dash-cat-pick,
.dash-tag-pick {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  padding: 0.48rem 0.4rem;
  margin: 0;
  border-radius: 8px;
}

/* El UA [hidden] pierde contra `display:flex` de arriba; sin esto el filtro por texto no oculta filas. */
.dash-cat-pick[hidden],
.dash-tag-pick[hidden] {
  display: none !important;
}

.dash-cat-pick:hover,
.dash-tag-pick:hover {
  background: rgba(94, 234, 212, 0.07);
}

.dash-cat-pick .dash-cat-cb,
.dash-tag-pick .dash-tag-cb {
  margin-top: 0.18rem;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent-dim, #5eead4);
}

.dash-cat-pick-label,
.dash-tag-pick-label {
  flex: 1;
  line-height: 1.4;
  font-size: 0.93rem;
}

.dash-other-cat-check {
  margin-top: 0.35rem;
}

.dash-other-cat-wrap {
  margin-top: 0.5rem;
}

.dash-other-cat-wrap.is-hidden {
  display: none;
}

.dash-simple-product-fields.is-hidden,
.dash-simple-product-fields[hidden] {
  display: none !important;
}

.dash-variants-panel.is-hidden,
.dash-variants-panel[hidden] {
  display: none !important;
}

.dash-product-variant-rows {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.dash-product-variant-card {
  padding: 1rem 1rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}

.dash-product-variant-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.dash-product-variant-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.dash-product-variant-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
}

@media (max-width: 520px) {
  .dash-product-variant-card-grid {
    grid-template-columns: 1fr;
  }
}

.dash-product-variant-card .auth-field {
  margin: 0;
}

.dash-variant-attr-block {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.dash-variant-attr-block > span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dash-v-active-wrap {
  margin: 0.65rem 0 0;
}

.dash-variant-add-btn {
  margin-top: 0.25rem;
}

.dash-variant-images-section {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.dash-variant-images-section .dash-variant-images-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dash-variant-image-add {
  margin-top: 0.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dash-has-variants-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

#dash-help-has-variants {
  margin: 0.35rem 0 0.75rem;
}

.dash-section-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.dash-section-title-row .dash-variant-section-title {
  margin: 0;
}

.dash-section-title-row .dash-help-btn {
  align-self: center;
  margin-top: 0.05rem;
}

.dash-help-btn {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.1);
  color: var(--accent, #5eead4);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.dash-help-btn:hover,
.dash-help-btn:focus-visible {
  background: rgba(94, 234, 212, 0.2);
  border-color: rgba(94, 234, 212, 0.75);
  outline: none;
}

.dash-help-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.35);
}

.dash-help-btn:active {
  transform: scale(0.94);
}

.dash-help-btn--sm {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.68rem;
}

.dash-help-panel {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  background: rgba(94, 234, 212, 0.06);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
}

.dash-help-panel p {
  margin: 0;
}

.dash-help-panel--after-row {
  margin-top: 0.5rem;
}

.dash-help-panel--toolbar {
  margin-bottom: 0.65rem;
}

.dash-help-panel .dash-help-list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

.dash-help-panel .dash-help-list li {
  margin: 0.25rem 0;
}

.dash-field-hint--lead {
  font-size: 0.84rem;
  line-height: 1.45;
}

.dash-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dash-generate-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dash-table-columns-help {
  margin: 0 0 0.5rem;
}

.dash-help-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--accent, #5eead4);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-weight: 500;
}

.dash-help-link:hover,
.dash-help-link:focus-visible {
  color: var(--text);
  outline: none;
}

.dash-help-dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(5rem, 9rem) 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.8rem;
}

.dash-help-dl dt {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
}

.dash-help-dl dd {
  margin: 0;
  color: var(--text);
}

@media (max-width: 640px) {
  .dash-help-dl {
    grid-template-columns: 1fr;
  }
  .dash-help-dl dt {
    margin-top: 0.35rem;
  }
  .dash-help-dl dt:first-child {
    margin-top: 0;
  }
}

.dash-variant-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dash-variants-panel {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Evita que el min-content de la tabla ensanche todo el panel hacia el modal */
  contain: inline-size;
}

.dash-variant-matrix-options {
  margin-bottom: 1.25rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  contain: inline-size;
}

.dash-variant-matrix-table-wrap {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  contain: inline-size;
  /* Respaldo: si el scroll interno falla en algún motor, toda la sección 2 sigue siendo desplazable */
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

/* Hijo flex del formulario: no usar ancho intrínseco del contenido (tabla ancha) */
body.dash-shell-products .dash-product-editor-pane--modal .dash-product-form-scroll > #dash-variants-panel {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Límite duro: el hijo con overflow-x:auto recibe un ancho definido por el padre, no por la tabla */
.dash-variant-table-scroll-outer {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.dash-variant-option-groups {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.dash-variant-opt-card {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

.dash-variant-opt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.5rem;
}

.dash-variant-opt-head label {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(100%, 22rem);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dash-variant-opt-head label > span {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Inputs de opción (JS): mismo aspecto que .auth-field del panel oscuro */
.dash-variant-opt-name,
.dash-variant-opt-val {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 400;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  line-height: 1.35;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.dash-variant-opt-name::placeholder,
.dash-variant-opt-val::placeholder {
  color: rgba(148, 163, 184, 0.55);
}

.dash-variant-opt-name:hover,
.dash-variant-opt-val:hover {
  border-color: rgba(148, 163, 184, 0.35);
}

.dash-variant-opt-name:focus,
.dash-variant-opt-val:focus {
  outline: 2px solid rgba(94, 234, 212, 0.35);
  border-color: var(--accent-dim, #5eead4);
  outline-offset: 0;
}

.dash-variant-opt-values {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.dash-variant-opt-values > span:first-child {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.dash-variant-opt-val-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dash-variant-opt-val-row .dash-variant-opt-val {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(100%, 16rem);
}

.dash-variant-val-remove {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
  border-radius: 9px;
}

.dash-variant-val-add {
  margin-top: 0.25rem;
  align-self: flex-start;
}

.dash-variant-opt-remove {
  flex-shrink: 0;
  white-space: nowrap;
}

.dash-variant-matrix-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.dash-variant-matrix-actions-row--solo-add {
  margin: 0.35rem 0 0.85rem;
}

/* Misma altura / tipografía entre «Añadir opción», precio base y «Generar» */
.dash-variant-matrix-actions-row > .btn,
.dash-variant-matrix-actions-row > .dash-generate-wrap .btn {
  min-height: 2.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  line-height: 1.2;
}

.dash-variant-matrix-actions-row > .btn-secondary {
  border-radius: 10px;
}

.dash-variant-default-price-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  flex: 0 1 auto;
  min-width: 11rem;
}

.dash-variant-default-price-label input {
  width: 100%;
  min-width: 9rem;
  max-width: 12rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  line-height: 1.3;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  box-sizing: border-box;
}

.dash-variant-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.6rem;
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(0, 0, 0, 0.12);
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(94, 234, 212, 0.4) rgba(0, 0, 0, 0.2);
}

.dash-variant-toolbar .btn {
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  line-height: 1.2;
  border-radius: 9px;
  width: auto;
  flex: 0 0 auto;
}

.dash-variant-toolbar .dash-help-btn--sm {
  align-self: center;
}

.dash-variant-filter-q {
  flex: 1;
  min-width: 10rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
}

.dash-variant-toolbar-check {
  font-size: 0.78rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dash-variant-toolbar-spacer {
  flex: 1;
  min-width: 0.5rem;
}

.dash-variant-bulk-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.dash-bulk-input {
  width: 5.5rem;
  min-width: 4.75rem;
  max-width: 6.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.25;
  box-sizing: border-box;
}

.dash-variant-table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: min(70vh, 520px);
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scrollbar-gutter: stable;
  border-radius: 12px;
  border: 1px solid var(--border);
  /* Ayuda visual: la barra horizontal sea reconocible en tema oscuro */
  scrollbar-color: rgba(94, 234, 212, 0.45) rgba(0, 0, 0, 0.25);
}

.dash-variant-table-scroll:focus-within {
  border-color: rgba(94, 234, 212, 0.25);
}

.dash-variant-table {
  /* Ancho intrínseco por columnas; min 100% del contenedor con scroll */
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  table-layout: auto;
}

.dash-variant-table th,
.dash-variant-table td {
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: middle;
  text-align: left;
}

.dash-variant-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(18, 22, 28, 0.98);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.dash-v-th-check,
.dash-v-td-check,
.dash-v-td-center {
  width: 2rem;
  text-align: center;
}

.dash-variant-row--low {
  background: rgba(245, 158, 11, 0.06);
}

.dash-v-inp {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.3;
  box-sizing: border-box;
}

.dash-variant-table .dash-v-sku {
  min-width: 7.5rem;
  max-width: 14rem;
}

.dash-variant-table .dash-v-inp[data-field="price"],
.dash-variant-table .dash-v-inp[data-field="compare_at_price"],
.dash-variant-table .dash-v-inp[data-field="cost_price"] {
  min-width: 5.5rem;
  max-width: 8rem;
}

.dash-variant-table .dash-v-inp[data-field="stock"] {
  min-width: 4.25rem;
  max-width: 6rem;
}

.dash-variant-table .dash-v-inp[data-field="weight_kg"] {
  min-width: 4.5rem;
  max-width: 7rem;
}

.dash-variant-table .dash-v-opt {
  min-width: 4.5rem;
  max-width: 9rem;
}

.dash-variant-table .dash-v-stock-status {
  min-width: 6.75rem;
  max-width: 10rem;
  padding: 0.4rem 0.45rem;
  font-size: 0.8rem;
  line-height: 1.25;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  box-sizing: border-box;
}

.dash-variant-table .dash-v-toggle-img {
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.2;
  border-radius: 9px;
  align-self: center;
}

.dash-variant-img-row td {
  background: rgba(0, 0, 0, 0.18);
}

.dash-variant-img-cell {
  padding: 0.65rem 0.75rem !important;
}

.dash-variant-img-panel .dash-variant-images-grid {
  margin-bottom: 0.45rem;
}

.dash-variant-img-panel {
  max-width: 22rem;
}

.dash-variant-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.25rem, 1fr));
  gap: 0.4rem;
  max-width: 100%;
}

.dash-variant-images-grid .dash-image-item {
  min-height: 0;
  border-radius: 8px;
}

.dash-variant-images-grid .dash-image-frame {
  aspect-ratio: 1;
}

.dash-variant-images-grid .dash-image-name {
  display: none;
}

.dash-variant-img-panel .dash-variant-image-add {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  padding: 0.3rem 0.55rem;
}

.dash-images-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  max-width: 22rem;
}

@media (max-width: 520px) {
  .dash-images-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
  }
}

.dash-image-add {
  display: grid;
  place-items: center;
  min-height: 4.25rem;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.dash-image-add:hover {
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.06);
}

.dash-image-add:active {
  transform: scale(0.98);
}

.dash-image-item {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dash-image-frame {
  position: relative;
  background: rgba(0, 0, 0, 0.18);
}

.dash-image-thumb-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: default;
  aspect-ratio: 1;
}

.dash-image-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.dash-image-name {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.2rem 0.35rem 0.3rem;
}

.dash-image-remove {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  z-index: 2;
  width: 1.55rem;
  height: 1.55rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, transform 0.15s;
}

.dash-image-remove:hover,
.dash-image-remove:focus-visible {
  background: rgba(220, 38, 38, 0.92);
  outline: none;
}

.dash-image-lightbox {
  padding: 0;
  border: none;
  max-width: min(96vw, 56rem);
  max-height: 92vh;
  width: auto;
  background: transparent;
  color: var(--text);
}

.dash-image-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.dash-image-lightbox-inner {
  margin: 0;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-image-lightbox-img {
  display: block;
  max-width: min(96vw, 56rem);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}

.dash-image-lightbox-close {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.dash-image-lightbox-close:hover,
.dash-image-lightbox-close:focus-visible {
  background: rgba(220, 38, 38, 0.9);
  outline: none;
}

.dash-web-layout .dash-editor-sidebar {
  max-height: calc(100vh - 2rem);
}

.mw-preview {
  --mw-accent: #5eead4;
  --mw-bg: #0b1220;
  --mw-surface: #0f172a;
  --mw-text: #e5e7eb;
  --mw-radius: 16px;
  --mw-pad: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--mw-bg);
  color: var(--mw-text);
  padding: var(--mw-pad);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.35);
}

.mw-hero {
  border-radius: calc(var(--mw-radius) + 4px);
  background: color-mix(in oklab, var(--mw-surface) 88%, #000 12%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: calc(var(--mw-pad) + 4px);
}

.mw-badge {
  margin: 0;
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(229, 231, 235, 0.85);
  font-size: 0.82rem;
}

.mw-h2 {
  margin: 0.7rem 0 0;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  font-family: var(--font-display);
}

.mw-accent {
  color: var(--mw-accent);
}

.mw-lead {
  margin: 0.6rem 0 0;
  color: rgba(229, 231, 235, 0.8);
  line-height: 1.5;
  max-width: 46ch;
}

.mw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.mw-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--mw-text);
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font);
}

.mw-btn-primary {
  background: color-mix(in oklab, var(--mw-accent) 36%, rgba(255, 255, 255, 0.02) 64%);
  border-color: color-mix(in oklab, var(--mw-accent) 55%, rgba(255, 255, 255, 0.08) 45%);
}

.mw-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.95rem;
}

@media (max-width: 860px) {
  .mw-grid {
    grid-template-columns: 1fr;
  }
}

.mw-card {
  border-radius: var(--mw-radius);
  background: color-mix(in oklab, var(--mw-surface) 86%, #000 14%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.9rem 0.95rem;
}

.mw-card-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mw-card-desc {
  margin: 0.4rem 0 0;
  color: rgba(229, 231, 235, 0.8);
  line-height: 1.45;
}

.mw-card-price {
  margin: 0.75rem 0 0;
  color: var(--mw-accent);
  font-weight: 900;
  font-family: ui-monospace, "Cascadia Code", monospace;
}

.dash-topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-topnav .nav {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

/* Mi web dentro del panel: menú lateral de dashboard + editor demo + vista previa */
body.demo-store-layout.dash-miweb-layout.dash-shell {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  margin: 0;
  min-height: 100vh;
}

body.demo-store-layout[data-store-id].dash-shell .demo-editor {
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
}

#dash-miweb-shell {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-width: 0;
  min-height: 100vh;
}

body.demo-store-layout.dash-miweb-layout.dash-shell .demo-preview-column {
  flex: 1;
  min-width: 0;
}

/* Dentro del dashboard no mostramos la franja demo que enlaza al sitio público */
body.dash-miweb-layout #demo-preview-root .demo-platform-banner {
  display: none !important;
}

.dash-attr-rows {
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
}

.dash-attr-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

@media (max-width: 520px) {
  .dash-attr-row {
    grid-template-columns: 1fr;
  }
}

.dash-attr-row .dash-attr-key,
.dash-attr-row .dash-attr-val {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.dash-attr-row .dash-attr-remove {
  padding: 0.45rem 0.65rem;
  min-width: 2.25rem;
  font-size: 1.1rem;
  line-height: 1;
}

.dash-attr-add-btn {
  margin-top: 0.35rem;
  align-self: flex-start;
}

.dash-item-main {
  min-width: 0;
}

.dash-item-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  text-align: right;
}

.dash-item-edit {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent);
  text-decoration: none;
}

.dash-item-edit:hover {
  text-decoration: underline;
}

.dash-item-delete-form {
  display: inline;
  margin: 0;
  padding: 0;
}

.dash-item-delete-btn {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  color: #f87171;
  text-decoration: underline;
}

.dash-item-delete-btn:hover {
  color: #fca5a5;
}

.dash-product-delete-wrap {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.dash-product-delete-form {
  margin: 0;
}

.dash-product-delete-btn {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.45);
}

.dash-product-delete-btn:hover {
  background: rgba(248, 113, 113, 0.08);
}

.auth-card {
  width: 100%;
  max-width: 24rem;
  background: var(--surface);
  border: 1px solid var(--border);
  /* border-radius: var(--radius); */
  padding: 1rem 1rem;
  box-shadow: var(--shadow);
}

.auth-card h2.auth-card-heading {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.auth-intro {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.auth-footnote {
  margin: 1.25rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  background: #ffffff;
  color: #3c4043;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  text-decoration: none;
  transition:
    box-shadow 0.2s,
    transform 0.15s;
}

.btn-google:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  color: #202124;
}

.btn-google:active {
  transform: scale(0.98);
}

.btn-google-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
  font-size: 0.88rem;
}

.form-success {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
  font-size: 0.88rem;
}

.auth-badge {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-badge strong {
  color: var(--text);
  word-break: break-all;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.dash-shell .auth-form {
  gap: 1.3rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-field span {
  font-size: 0.72rem;
}

body.dash-shell .auth-field {
  gap: 0.48rem;
}

body.dash-shell .auth-field-span > span:first-child {
  margin-bottom: 0.05rem;
}

.auth-field .dash-category-checkboxes .dash-cat-pick-label,
.auth-field .dash-tag-checkboxes .dash-tag-pick-label {
  font-size: 0.93rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
}

.auth-field input:not([type="checkbox"]):not([type="radio"]),
.auth-field select,
.auth-field textarea {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.auth-field input[type="checkbox"],
.auth-field input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  max-width: none;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  border-radius: 4px;
  vertical-align: middle;
  accent-color: var(--accent-dim, #5eead4);
}

.auth-field textarea {
  resize: vertical;
  min-height: 5rem;
}

.auth-field input:focus:not([type="checkbox"]):not([type="radio"]),
.auth-field select:focus,
.auth-field textarea:focus {
  outline: 2px solid rgba(94, 234, 212, 0.35);
  border-color: var(--accent-dim);
}

.auth-field input[type="checkbox"]:focus-visible,
.auth-field input[type="radio"]:focus-visible {
  outline: 2px solid rgba(94, 234, 212, 0.35);
  outline-offset: 2px;
}

.dash-product-form .dash-char-count {
  align-self: flex-end;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.2rem;
  letter-spacing: normal;
  text-transform: none;
}

.dash-product-form .dash-char-count--near {
  color: #d97706;
}

.dash-product-form .dash-char-count--full {
  color: #dc2626;
}

.auth-field-span {
  grid-column: 1 / -1;
}

.auth-submit {
  margin-top: 0.35rem;
  width: 100%;
  cursor: pointer;
  border: none;
}

.auth-card-success .auth-intro {
  color: var(--text);
}

.auth-subdomain {
  display: block;
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.25);
}

.auth-card-success .btn-primary {
  margin-top: 0.5rem;
}

/* ---------- Panel a pantalla completa (tipo dashboard SaaS) ---------- */
body.dash-shell {
  display: flex;
  min-height: 100vh;
  margin: 0;
}

.dash-sidebar {
  width: 272px;
  flex-shrink: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(26, 31, 42, 0.98) 0%, rgba(17, 22, 32, 0.98) 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0 1.25rem;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition:
    width 0.22s ease,
    padding 0.22s ease;
}

:root.dash-sidebar-collapsed .dash-sidebar {
  width: 78px;
  padding-left: 0.42rem;
  padding-right: 0.42rem;
}

.dash-sidebar-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.85rem 0.95rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.dash-sidebar-brand {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
  padding: 0;
  margin: 0;
  border: none;
  color: var(--text);
}

.dash-sidebar-brand:hover {
  color: inherit;
}

.dash-sidebar-brand-accent span {
  color: var(--accent);
}

:root.dash-sidebar-collapsed .dash-sidebar-brand-accent {
  display: none;
}

:root.dash-sidebar-collapsed .dash-sidebar-head {
  flex-direction: column-reverse;
  gap: 0.65rem;
  padding-left: 0.28rem;
  padding-right: 0.28rem;
}

.dash-sidebar-collapse {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.dash-sidebar-collapse:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.dash-sidebar-collapse-icon {
  display: block;
}

:root:not(.dash-sidebar-collapsed) .dash-sidebar-collapse-only-collapsed {
  display: none;
}

:root.dash-sidebar-collapsed .dash-sidebar-collapse-only-expanded {
  display: none;
}

.dash-sidebar-section {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.85rem 1.25rem 0.35rem;
}

.dash-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.65rem;
}

.dash-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.dash-sidebar-icon svg {
  display: block;
  flex-shrink: 0;
}

.dash-sidebar-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.dash-sidebar-link.active {
  color: #042f2e;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.95), rgba(45, 212, 191, 0.88));
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.22);
}

.dash-sidebar-pending-badge {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  color: #1c1917;
  background: linear-gradient(180deg, #fde68a, #fbbf24);
  border: 1px solid rgba(251, 191, 36, 0.65);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.35);
}

.dash-sidebar-link.active .dash-sidebar-pending-badge {
  color: #422006;
  border-color: rgba(180, 83, 9, 0.45);
}

:root.dash-sidebar-collapsed .dash-sidebar-pending-badge {
  position: absolute;
  top: 0.2rem;
  right: 0.28rem;
  margin-left: 0;
  min-width: 1.1rem;
  height: 1.1rem;
  font-size: 0.62rem;
  padding: 0 0.2rem;
}

:root.dash-sidebar-collapsed .dash-sidebar-link {
  position: relative;
}

:root.dash-sidebar-collapsed .dash-sidebar-link-text,
:root.dash-sidebar-collapsed .dash-sidebar-section {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root.dash-sidebar-collapsed .dash-sidebar-link {
  justify-content: center;
  gap: 0;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

:root.dash-sidebar-collapsed .dash-sidebar-nav {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.dash-sidebar-foot {
  margin-top: auto;
  padding: 1rem 0.85rem 0;
  border-top: 1px solid var(--border);
}

:root.dash-sidebar-collapsed .dash-sidebar-foot {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.dash-sidebar-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  width: 100%;
}

:root.dash-sidebar-collapsed .dash-sidebar-logout-btn {
  justify-content: center;
  padding-inline: 0.4rem;
}

:root.dash-sidebar-collapsed .dash-sidebar-logout-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dash-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dash-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.85rem;
  border-bottom: 1px solid var(--border);
  background: rgba(17, 22, 32, 0.65);
  backdrop-filter: blur(12px);
}

.dash-breadcrumb {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.dash-breadcrumb span.sep {
  margin: 0 0.35rem;
  opacity: 0.6;
}

.dash-page-title {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.dash-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.btn-dash-outline {
  border-radius: 10px;
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
}

.dash-scroll {
  flex: 1;
  overflow: hidden;
  overflow-x: hidden;
  padding: 0;
  background:
    radial-gradient(800px 400px at 100% -10%, rgba(94, 234, 212, 0.06), transparent), var(--bg);
}

.dash-scroll > .dash-page-inner,
.dash-scroll > .container {
  width: 100%;
  max-width: none !important;
  margin-inline: 0 !important;
}

body.dash-shell .auth-shell,
body.dash-shell .auth-shell-wide,
body.dash-shell .auth-shell-editor {
  width: 100%;
  max-width: none;
  justify-content: stretch;
  padding: 0;
}

body.dash-shell .auth-shell-wide .auth-card,
body.dash-shell .auth-shell-editor .auth-card {
  max-width: none !important;
  width: 100%;
  min-width: 0;
}

body.dash-shell .dash-page-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

body.dash-shell .dash-page-inner .auth-main {
  flex: 1;
  min-height: 0;
}

body.dash-shell .auth-main {
  padding: 0 !important;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Productos: tarjeta a alto disponible; scroll solo en columnas ---------- */
html:has(body.dash-shell-products) {
  height: 100vh;
  overflow: hidden;
}

@supports (height: 100dvh) {
  html:has(body.dash-shell-products) {
    height: 100dvh;
  }
}

body.dash-shell-products {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* dynamic viewport: mejor en móviles con barra del navegador */
@supports (height: 100dvh) {
  body.dash-shell-products {
    height: 100dvh;
    max-height: 100dvh;
  }
}

body.dash-shell-products .dash-main-col {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Antes: solo overflow:hidden; los hijos con flex:1 no limitaban altura (bloque normal). */
body.dash-shell-products .dash-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

body.dash-shell-products .dash-page-inner,
body.dash-shell-products .auth-main,
body.dash-shell-products .container.auth-shell.auth-shell-editor {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.dash-shell-products .dash-editor-card-products {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dash-shell-products .dash-editor-card-products > *:not(.dash-products-page-layout):not(#dash-product-modal) {
  flex-shrink: 0;
}

body.dash-shell-products .dash-products-page-layout {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

body.dash-shell-products .dash-products-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  flex-shrink: 0;
}

body.dash-shell-products .dash-products-toolbar-primary {
  flex-shrink: 0;
}

body.dash-shell-products .dash-products-toolbar-muted {
  color: var(--muted);
  opacity: 0.5;
}

body.dash-shell-products .dash-products-toolbar-hint {
  font-size: 0.85rem;
  flex: 1;
  min-width: 12rem;
}

body.dash-shell-products .dash-product-catalog-full {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dash-shell-products .dash-product-catalog-head {
  flex-shrink: 0;
}

body.dash-shell-products .dash-product-catalog-full > .dash-product-list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Tarjetas de producto: imagen izquierda, datos a la derecha; cuadrícula responsive (hasta 20 ítems en servidor) */
body.dash-shell-products .dash-product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
}

body.dash-shell-products .dash-product-card.dash-item {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

body.dash-shell-products .dash-product-card-thumb {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

body.dash-shell-products .dash-product-card-thumb--empty {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.14),
    rgba(148, 163, 184, 0.08)
  );
}

body.dash-shell-products .dash-product-card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.dash-shell-products .dash-product-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

body.dash-shell-products .dash-product-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

body.dash-shell-products .dash-product-card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

body.dash-shell-products .dash-product-card-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

body.dash-shell-products .dash-product-card-delete-form {
  margin: 0;
  padding: 0;
  display: inline;
}

body.dash-shell-products .dash-product-card-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent, #93c5fd);
  transition: background 0.15s ease, color 0.15s ease;
}

body.dash-shell-products .dash-product-card-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

body.dash-shell-products .dash-product-card-icon-btn--delete {
  color: #f87171;
}

body.dash-shell-products .dash-product-card-icon-btn--delete:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

body.dash-shell-products .dash-product-card-slug {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.dash-shell-products .dash-product-card-meta {
  margin: 0.3rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
}

body.dash-shell-products .dash-product-card-meta-dot {
  margin: 0 0.35rem;
  opacity: 0.55;
}

body.dash-shell-products .dash-product-cards-cap {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
}

/* ——— Variantes en modal de producto: tarjetas (dash-pv-*) ——— */
.dash-variants-panel .dash-variant-cards-scroll-outer {
  max-height: min(52vh, 28rem);
  margin-top: 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

.dash-variants-panel .dash-variant-cards-scroll {
  max-height: inherit;
  overflow: auto;
  padding: 0.65rem;
  -webkit-overflow-scrolling: touch;
}

.dash-variants-panel .dash-variant-cards-host {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.dash-variants-panel .dash-product-variant-card {
  display: block;
  padding: 0;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  overflow-x: hidden;
}

.dash-variants-panel .dash-pv-card-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  min-width: 0;
}

.dash-variants-panel .dash-pv-card-left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.dash-variants-panel .dash-pv-card-check {
  flex-shrink: 0;
  padding-top: 0;
  line-height: 1;
}

.dash-variants-panel .dash-pv-card-thumb {
  flex-shrink: 0;
  width: 5rem;
  height: 5rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

.dash-variants-panel .dash-pv-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-variants-panel .dash-pv-thumb-placeholder {
  width: 100%;
  height: 100%;
  min-height: 5rem;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.14),
    rgba(148, 163, 184, 0.08)
  );
}

.dash-variants-panel .dash-pv-card-body {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dash-variants-panel .dash-pv-field-name .dash-pv-input {
  font-weight: 600;
  font-size: 0.95rem;
}

.dash-variants-panel .dash-pv-core-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem 0.55rem;
}

.dash-variants-panel .dash-pv-secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem 0.55rem;
}

@media (max-width: 640px) {
  .dash-variants-panel .dash-pv-core-grid,
  .dash-variants-panel .dash-pv-secondary-grid {
    grid-template-columns: 1fr;
  }
}

.dash-variants-panel .dash-pv-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  min-width: 0;
}

.dash-variants-panel .dash-pv-field-active {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.dash-variants-panel .dash-pv-field-active .dash-pv-lbl {
  margin: 0;
}

.dash-variants-panel .dash-pv-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dash-variants-panel .dash-pv-input {
  width: 100%;
  font-family: var(--font);
  font-size: 0.88rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  box-sizing: border-box;
}

.dash-variants-panel .dash-pv-attr-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.dash-variants-panel .dash-pv-attr-hint {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.35;
}

.dash-variants-panel .dash-pv-attr-rows {
  margin-bottom: 0.25rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.dash-variants-panel .dash-pv-attr-rows .dash-attr-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  min-width: 0;
  max-width: 100%;
}

.dash-variants-panel .dash-pv-attr-rows .dash-attr-key,
.dash-variants-panel .dash-pv-attr-rows .dash-attr-val {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.dash-variants-panel .dash-pv-attr-rows .dash-attr-remove {
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .dash-variants-panel .dash-pv-attr-rows .dash-attr-row {
    grid-template-columns: 1fr;
  }
}

.dash-variants-panel .dash-v-toggle-img {
  align-self: flex-start;
}

.dash-variants-panel .dash-pv-fotos-wrap {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.dash-variants-panel .dash-pv-fotos-wrap .dash-variant-img-panel {
  margin-top: 0.35rem;
}

/* Modal de producto */
.dash-product-modal {
  width: min(100vw - 1.5rem, 920px);
  max-width: calc(100vw - 1.5rem);
  min-width: 0;
  max-height: min(94vh, 900px);
  padding: 0;
  border: none;
  border-radius: 16px;
  background: var(--card, #1a1f2a);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.dash-product-modal::backdrop {
  background: rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(4px);
}

.dash-product-modal-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: min(94vh, 900px);
}

.dash-product-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  flex-shrink: 0;
}

.dash-product-modal-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.dash-product-modal-lead {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
  /* max-width: 52ch; */
}

.dash-product-modal-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.dash-product-modal-close:hover,
.dash-product-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.dash-product-modal-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 1.25rem;
}

body.dash-shell-products .dash-product-editor-pane--modal {
  position: relative !important;
  top: auto !important;
  max-height: none !important;
  flex: 1;
  min-height: 0;
  min-width: 0;
  /* hidden en ambos ejes recorta el scroll horizontal de la tabla de variantes */
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0 0;
  border: none;
  border-radius: 0;
  border-right: none;
  background: transparent;
  box-shadow: none;
}

/* Gana a .dash-editor-sidebar.dash-product-editor-pane { overflow-x: hidden } en el modal */
body.dash-shell-products .dash-editor-sidebar.dash-product-editor-pane.dash-product-editor-pane--modal {
  overflow-x: auto;
  overflow-y: hidden;
}

body.dash-shell-products .dash-product-editor-pane--modal .dash-product-form {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-x: visible;
  overflow-y: hidden;
  padding-bottom: 0;
  gap: 0.35rem;
}

body.dash-shell-products .dash-product-editor-pane--modal .dash-product-form-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  /* auto: si una sección (p. ej. tabla) desborda, aparece scroll horizontal aquí como respaldo */
  overflow-x: auto;
  padding-right: 0.35rem;
  padding-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  scrollbar-gutter: stable;
}

.dash-product-modal-footer {
  flex-shrink: 0;
  padding: 1rem 1.25rem 1.15rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(12, 16, 22, 0.96);
}

.dash-product-modal-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* El submit del auth suele ser width:100%; en el modal debe alinearse con Cerrar */
.dash-product-modal-footer .auth-submit {
  width: auto;
  flex: 0 1 auto;
  min-width: 10.5rem;
  max-width: min(100%, 22rem);
  margin-top: 0;
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.dash-product-modal-footer .dash-product-modal-dismiss {
  min-height: 2.5rem;
  padding: 0.55rem 1.1rem;
}

.dash-product-modal-footer .dash-product-delete-wrap {
  margin-top: 0.85rem;
}

.dash-product-modal-body .dash-product-form-scroll > .danger-check:last-of-type {
  margin-bottom: 0.25rem;
}

body.dash-shell-products .dash-product-editor-pane--modal .dash-product-form-scroll {
  gap: 1rem;
}

/* Modal de guardado (dialog en top layer, encima del modal de producto) */
body.dash-product-save-active {
  overflow: hidden;
}

.dash-product-save-overlay {
  width: min(100vw - 1.5rem, 28rem);
  max-width: calc(100vw - 1.5rem);
  padding: 0;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: #0f172a;
  overflow: visible;
}

.dash-product-save-overlay::backdrop {
  background: rgba(2, 6, 12, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dash-product-save-overlay-panel {
  width: min(28rem, 100%);
  max-height: min(85vh, 32rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem 1.1rem;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.dash-product-save-overlay-spinner {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.15rem;
  border: 3px solid rgba(94, 234, 212, 0.25);
  border-top-color: #0d9488;
  border-radius: 50%;
  animation: dash-product-save-spin 0.75s linear infinite;
}

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

.dash-product-save-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
}

.dash-product-save-lead {
  margin: 0;
  font-size: 0.88rem;
  color: #475569;
  text-align: center;
}

.dash-product-save-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 14rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dash-product-save-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  gap: 0.2rem 0.5rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.dash-product-save-item--solo {
  grid-template-columns: 1fr auto;
}

.dash-product-save-item--error {
  border-color: #fca5a5;
  background: #fef2f2;
}

.dash-product-save-item-name {
  grid-column: 1 / 2;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-product-save-item-meta {
  grid-column: 2 / 3;
  grid-row: 1;
  font-size: 0.68rem;
  color: #64748b;
}

.dash-product-save-item-bar {
  grid-column: 1 / 3;
  height: 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.dash-product-save-item-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #0d9488);
  transition: width 0.15s ease-out;
}

.dash-product-save-item-pct {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0f766e;
}

.dash-product-save-item-state {
  grid-column: 2 / 3;
  grid-row: 3;
  font-size: 0.65rem;
  color: #64748b;
  text-align: right;
}

.dash-product-save-overall {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dash-product-save-overall-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
}

.dash-product-save-overall-track {
  height: 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.dash-product-save-overall-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  transition: width 0.15s ease-out;
}

.dash-product-save-status {
  margin: 0;
  font-size: 0.78rem;
  color: #475569;
  text-align: center;
}

.dash-product-save-retry {
  align-self: center;
  min-width: 8rem;
}

.dash-product-form.is-save-locked {
  pointer-events: none;
}

@media (max-width: 900px) {
  html:has(body.dash-shell-products) {
    height: auto;
    overflow: visible;
  }

  body.dash-shell-products {
    height: auto;
    max-height: none;
    overflow: auto;
  }

  body.dash-shell-products .dash-main-col,
  body.dash-shell-products .dash-scroll {
    overflow: visible;
  }

  body.dash-shell-products .dash-scroll {
    display: block;
    flex: 1 1 auto;
    padding: 0;
  }

  body.dash-shell-products .dash-editor-card-products {
    flex: none;
    overflow: visible;
    min-height: min-content;
  }

  body.dash-shell-products .dash-products-page-layout {
    flex: none;
    min-height: min-content;
    overflow: visible;
  }

  body.dash-shell-products .dash-product-catalog-full {
    flex: none;
    min-height: min-content;
    overflow: visible;
  }

  body.dash-shell-products .dash-product-catalog-full > .dash-product-list-scroll {
    flex: none;
    max-height: none;
    overflow-y: visible;
  }

  .dash-product-modal {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .dash-product-modal-box {
    max-height: 100vh;
  }
}

.dash-topbar-actions .logout-form-inline {
  margin: 0;
}

@media (max-width: 980px) {
  body.dash-shell {
    flex-direction: column;
  }

  .dash-sidebar {
    width: 100%;
    min-height: 0;
    max-height: none;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .dash-sidebar-brand {
    padding: 0;
    margin: 0;
    border-bottom: none;
    flex-shrink: 0;
  }

  .dash-sidebar-head {
    width: 100%;
    justify-content: space-between;
    border-bottom: none;
    padding-bottom: 0.5rem;
    margin-bottom: 0.35rem;
  }

  .dash-sidebar-section {
    display: none;
  }

  .dash-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
    gap: 0.25rem;
    padding: 0;
    justify-content: flex-end;
  }

  .dash-sidebar-link {
    padding: 0.4rem 0.65rem;
    font-size: 0.82rem;
  }

  .dash-sidebar-collapse {
    display: none;
  }

  :root.dash-sidebar-collapsed .dash-sidebar {
    width: 100%;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  :root.dash-sidebar-collapsed .dash-sidebar-head {
    flex-direction: row;
  }

  :root.dash-sidebar-collapsed .dash-sidebar-brand-accent {
    display: inline;
  }

  :root.dash-sidebar-collapsed .dash-sidebar-link-text,
  :root.dash-sidebar-collapsed .dash-sidebar-section,
  :root.dash-sidebar-collapsed .dash-sidebar-logout-text {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: revert !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    border: 0 !important;
  }

  :root.dash-sidebar-collapsed .dash-sidebar-link {
    justify-content: flex-start;
    gap: 0.48rem;
  }

  .dash-sidebar-foot {
    display: none;
  }

  .dash-topbar {
    padding: 0.85rem 1rem;
  }

  .dash-page-title {
    font-size: 1.2rem;
  }
}

/* Dashboard */
.dashboard-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (max-width: 820px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dash-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  background: rgba(255, 255, 255, 0.02);
}

.dash-box p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.dash-box p strong {
  color: var(--text);
}

.dash-list {
  display: grid;
  gap: 0.85rem;
}

.dash-item {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.dash-item-thumb-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.dash-item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-item-body {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
}

.dash-item-title {
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.dash-item-desc {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dash-item-price {
  font-family: ui-monospace, "Cascadia Code", monospace;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-danger {
  margin-top: 1.35rem;
  border-top: 1px solid var(--border);
  padding-top: 1.15rem;
}

.muted {
  color: var(--muted);
}

.danger-form {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.danger-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Editor Mi web (contenido): alto = viewport; scroll solo en .dash-content-form-scroll */
html:has(body.dash-shell-content-editor) {
  height: 100vh;
  overflow: hidden;
}

@supports (height: 100dvh) {
  html:has(body.dash-shell-content-editor) {
    height: 100dvh;
  }
}

body.dash-shell-content-editor {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

@supports (height: 100dvh) {
  body.dash-shell-content-editor {
    height: 100dvh;
    max-height: 100dvh;
  }
}

body.dash-shell-content-editor .dash-main-col {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dash-shell-content-editor .dash-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dash-shell-content-editor .dash-page-inner,
body.dash-shell-content-editor .auth-main,
body.dash-shell-content-editor .container.auth-shell.auth-shell-editor {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.dash-shell-content-editor .dash-editor-card {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dash-shell-content-editor .dash-editor-card > .auth-badge,
body.dash-shell-content-editor .dash-editor-card > .dash-editor-intro {
  flex-shrink: 0;
}

body.dash-shell-content-editor .dash-content-editor-layout {
  flex: 1 1 0;
  min-height: 0;
  align-items: stretch;
  margin-top: 0.65rem;
  width: 100%;
  max-width: 100%;
}

body.dash-shell-content-editor .dash-content-form-panel {
  display: flex;
  flex-direction: column;
  max-width: 26rem;
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: none;
  align-self: stretch;
  position: static;
  top: auto;
  padding: 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 28%),
    rgba(12, 16, 24, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.dash-shell-content-editor .dash-content-form-panel.dash-editor-sidebar {
  position: static;
  top: auto;
  max-height: none;
  padding-right: 0.65rem;
}

body.dash-shell-content-editor .dash-store-content-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0;
}

body.dash-shell-content-editor .dash-content-form-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem 0.5rem 0.65rem 0.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

body.dash-shell-content-editor .dash-content-form-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem 0.65rem 0.55rem;
  margin-top: auto;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0 0 12px 12px;
  background: rgba(10, 14, 22, 0.92);
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.22);
  z-index: 3;
}

body.dash-shell-content-editor .dash-content-form-footer .auth-submit {
  width: 100%;
  margin-top: 0;
}

/* Cada bloque = tarjeta (flex, sin overflow:hidden: recorta el contenido con legend ancho) */
body.dash-shell-content-editor .dash-content-fieldset {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0;
  padding: 0.75rem 0.85rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 20px rgba(0, 0, 0, 0.12);
  overflow: visible;
  min-height: min-content;
}

body.dash-shell-content-editor .dash-content-fieldset legend {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: -0.75rem -0.85rem 0.15rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px 12px 0 0;
}

body.dash-shell-content-editor .dash-content-fieldset .auth-field,
body.dash-shell-content-editor .dash-content-fieldset .dash-content-check,
body.dash-shell-content-editor .dash-content-fieldset .dash-range-field {
  margin: 0;
}

body.dash-shell-content-editor .dash-content-fieldset .dash-content-image-field {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(0, 0, 0, 0.18);
}

body.dash-shell-content-editor .dash-content-fieldset .dash-logo-tabs {
  margin: 0;
  flex-shrink: 0;
}

body.dash-shell-content-editor .dash-content-fieldset .dash-logo-tab-panel {
  margin: 0;
  min-height: min-content;
}

body.dash-shell-content-editor .dash-content-fieldset .dash-logo-tab-panel.is-active {
  display: flex !important;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-content-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  color: var(--text);
}

.dash-content-radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.dash-content-image-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.5rem 0;
}

body.dash-shell-content-editor .dash-content-fieldset .dash-logo-image-upload-row {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(0, 0, 0, 0.16);
}

.auth-field-span-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dash-content-image-preview {
  min-height: 4rem;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dash-content-image-preview img {
  max-width: 100%;
  max-height: 8rem;
  object-fit: contain;
}

.dash-content-check {
  margin-bottom: 0.5rem;
}

.dash-content-form-actions {
  margin-top: 0.25rem;
}

@media (max-width: 900px) {
  html:has(body.dash-shell-content-editor),
  body.dash-shell-content-editor {
    height: auto;
    max-height: none;
    overflow: auto;
  }

  body.dash-shell-content-editor .dash-main-col,
  body.dash-shell-content-editor .dash-scroll,
  body.dash-shell-content-editor .dash-page-inner,
  body.dash-shell-content-editor .dash-editor-card {
    overflow: visible;
    flex: 1 1 auto;
    min-height: min-content;
  }

  body.dash-shell-content-editor .dash-content-editor-layout {
    flex: none;
    min-height: min-content;
  }

  body.dash-shell-content-editor .dash-content-form-panel {
    height: auto;
    max-height: min(70dvh, 560px);
  }

  body.dash-shell-content-editor .dash-content-preview-frame {
    flex: none;
    min-height: min(50vh, 420px);
  }
}

body.dash-shell-content-editor .dash-content-preview-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.dash-shell-content-editor .dash-content-preview-panel .dash-editor-main-head {
  flex-shrink: 0;
}

body.dash-shell-content-editor .dash-content-preview-frame {
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b1220;
}

.dash-logo-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
}


.dash-logo-tab {
  flex: 1;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.dash-logo-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.dash-logo-tab.is-active {
  color: #042f2e;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.95), rgba(45, 212, 191, 0.88));
  box-shadow: 0 4px 14px rgba(45, 212, 191, 0.2);
}

/* [hidden] pierde contra display:flex; forzar ocultar panel inactivo */
.dash-logo-tab-panel {
  display: none !important;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-logo-tab-panel.is-active {
  display: flex !important;
}

.dash-logo-tab-panel[hidden] {
  display: none !important;
}

.dash-logo-image-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
}

.dash-logo-image-preview {
  flex: 0 0 auto;
  min-width: 5.5rem;
  min-height: 3.5rem;
  max-width: 12rem;
}

.dash-logo-image-preview.is-empty::after {
  content: "Sin imagen";
  font-size: 0.75rem;
  color: var(--muted);
}

.dash-logo-image-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.dash-logo-file-label {
  cursor: pointer;
  margin: 0;
}

.dash-range-field input[type="range"] {
  width: 100%;
  margin-top: 0.35rem;
  accent-color: var(--accent-dim, #5eead4);
}

.dash-range-field strong {
  color: var(--accent);
  font-weight: 700;
}

.dash-store-content-form .auth-field select {
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  width: 100%;
}

/* Lives: vista previa vertical / horizontal */
body.dash-shell-lives {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

@supports (height: 100dvh) {
  body.dash-shell-lives {
    height: 100dvh;
    max-height: 100dvh;
  }
}

body.dash-shell-lives .dash-main-col {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dash-shell-lives .dash-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dash-shell-lives .dash-page-inner,
body.dash-shell-lives .auth-main,
body.dash-shell-lives .container.auth-shell.auth-shell-wide {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.dash-shell-lives .dash-lives-card {
  max-width: none;
  flex: 1 1 0;
  min-height: 0;
  padding: 1rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.dash-shell-lives .dash-lives-workspace {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.dash-lives-layout {
  flex: 1 1 0;
  display: grid;
  grid-template-columns: minmax(10.5rem, 13.5rem) minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.85rem;
  min-height: 0;
  height: 100%;
  align-items: stretch;
  overflow: hidden;
}

.dash-lives-pane--scenes {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0.75rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.dash-lives-scenes-title {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.dash-lives-scenes-lead {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.dash-live-scenes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dash-live-scene-row {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
}

.dash-live-scene-btn {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dash-live-scene-btn:hover {
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.08);
}

.dash-live-scene-btn.is-active {
  border-color: rgba(94, 234, 212, 0.65);
  background: rgba(94, 234, 212, 0.14);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.2);
}

.dash-live-scene-name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
}

.dash-live-scene-live-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5eead4;
}

.dash-live-scene-delete {
  flex: 0 0 auto;
  width: 2rem;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.dash-live-scene-delete:hover {
  background: rgba(248, 113, 113, 0.18);
}

.btn-dash-live-scene-add {
  width: 100%;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.dash-plan-limit-note {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.84rem;
  line-height: 1.45;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.38);
}

.btn.is-disabled,
.btn.is-disabled:hover {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

/* Pagos — credenciales de pasarelas */
.dash-pagos-intro {
  max-width: 62ch;
}

.dash-pagos-alert {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.dash-pagos-alert.is-success {
  border: 1px solid rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.1);
  color: var(--text);
}

.dash-pagos-alert.is-error {
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

.dash-pagos-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.dash-pagos-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 36rem) {
  .dash-pagos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 56rem) {
  .dash-pagos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 78rem) {
  .dash-pagos-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dash-pagos-provider {
  --dash-pay-accent: #94a3b8;
  --dash-pay-border: rgba(148, 163, 184, 0.28);
  --dash-pay-bg: rgba(15, 23, 42, 0.45);
  --dash-pay-head-bg: rgba(255, 255, 255, 0.03);
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--dash-pay-border);
  border-left: 4px solid var(--dash-pay-accent);
  background: linear-gradient(
    118deg,
    var(--dash-pay-bg) 0%,
    rgba(0, 0, 0, 0.2) 55%,
    rgba(0, 0, 0, 0.26) 100%
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  min-width: 0;
}

.dash-pagos-grid .dash-pagos-provider {
  display: flex;
  flex-direction: column;
  align-self: start;
}

.dash-pagos-provider[data-provider="paypal"] {
  --dash-pay-accent: #60b4f5;
  --dash-pay-border: rgba(0, 112, 186, 0.42);
  --dash-pay-bg: rgba(0, 84, 166, 0.14);
  --dash-pay-head-bg: rgba(0, 112, 186, 0.12);
}

.dash-pagos-provider[data-provider="izipay"] {
  --dash-pay-accent: #ff6b8a;
  --dash-pay-border: rgba(230, 0, 40, 0.38);
  --dash-pay-bg: rgba(180, 0, 45, 0.1);
  --dash-pay-head-bg: rgba(230, 0, 40, 0.1);
}

.dash-pagos-provider[data-provider="lemon"] {
  --dash-pay-accent: #f5d547;
  --dash-pay-border: rgba(255, 193, 7, 0.38);
  --dash-pay-bg: rgba(255, 193, 7, 0.08);
  --dash-pay-head-bg: rgba(255, 193, 7, 0.1);
}

.dash-pagos-provider[data-provider="nowpayments"] {
  --dash-pay-accent: #a78bfa;
  --dash-pay-border: rgba(124, 58, 237, 0.4);
  --dash-pay-bg: rgba(91, 33, 182, 0.12);
  --dash-pay-head-bg: rgba(124, 58, 237, 0.12);
}

.dash-pagos-provider-head {
  padding: 0.85rem 1rem;
  background: var(--dash-pay-head-bg);
  border-bottom: 1px solid var(--dash-pay-border);
  flex-shrink: 0;
}

.dash-pagos-grid .dash-pagos-provider-head {
  padding: 0.75rem 0.85rem;
}

.dash-pagos-provider-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dash-pagos-grid .dash-pagos-provider-title-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.dash-pagos-provider-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text);
}

.dash-pagos-provider-title::before {
  content: "";
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--dash-pay-accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--dash-pay-accent) 65%, transparent);
}

.dash-pagos-provider-desc {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  padding-left: 1rem;
}

.dash-pagos-grid .dash-pagos-provider-desc {
  padding-left: 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.dash-pagos-enable {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--dash-pay-border);
  background: rgba(0, 0, 0, 0.2);
}

.dash-pagos-enable input {
  accent-color: var(--dash-pay-accent);
}

.dash-pagos-provider-body {
  padding: 0.85rem 1rem 1rem;
  display: grid;
  gap: 0.65rem;
  border-top: 1px solid color-mix(in srgb, var(--dash-pay-border) 40%, transparent);
  min-width: 0;
}

.dash-pagos-grid .dash-pagos-provider-body {
  flex: 0 0 auto;
  padding: 0.75rem 0.85rem 0.9rem;
  gap: 0.55rem;
}

.dash-pagos-grid .dash-pagos-provider-body .auth-field span {
  font-size: 0.78rem;
}

.dash-pagos-grid .dash-pagos-provider-body input,
.dash-pagos-grid .dash-pagos-provider-body select {
  font-size: 0.88rem;
}

.dash-paypal-env-block {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--dash-pay-border) 55%, transparent);
  border-radius: 10px;
  display: grid;
  gap: 0.6rem;
}

.dash-paypal-env-block legend {
  padding: 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dash-pay-text, #1a1d24);
}

.dash-pagos-grid .dash-paypal-env-block {
  padding: 0.65rem 0.7rem;
  gap: 0.5rem;
}

.dash-pagos-grid .dash-paypal-env-block legend {
  font-size: 0.78rem;
}

.dash-pagos-grid .dash-pagos-enable {
  font-size: 0.78rem;
  width: 100%;
  justify-content: flex-start;
}

.dash-pagos-grid .dash-pagos-provider-title {
  font-size: 0.98rem;
}

.dash-field-hint.is-warning {
  color: #b45309;
}

.dash-secret-field {
  position: relative;
  display: block;
  width: 100%;
}

.dash-secret-field input {
  width: 100%;
  padding-right: 2.85rem;
  box-sizing: border-box;
}

.dash-secret-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted, #5c6370);
  cursor: pointer;
}

.dash-secret-toggle:hover {
  background: color-mix(in srgb, var(--dash-pay-border, #e8e6e1) 45%, transparent);
  color: var(--dash-pay-text, #1a1d24);
}

.dash-secret-toggle:focus-visible {
  outline: 2px solid var(--dash-pay-accent, #0d9488);
  outline-offset: 2px;
}

.dash-secret-toggle-icon {
  width: 1.15rem;
  height: 1.15rem;
  pointer-events: none;
}

.dash-secret-toggle-icon--hide {
  display: none;
}

.dash-secret-toggle.is-visible .dash-secret-toggle-icon--show {
  display: none;
}

.dash-secret-toggle.is-visible .dash-secret-toggle-icon--hide {
  display: block;
}

.dash-pagos-provider:focus-within {
  border-color: color-mix(in srgb, var(--dash-pay-accent) 45%, var(--dash-pay-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--dash-pay-accent) 25%, transparent);
}

.dash-pagos-clear-check {
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

.dash-pagos-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding-top: 0.25rem;
}

.dash-orders-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
}

.dash-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.dash-orders-table th,
.dash-orders-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}

.dash-orders-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #94a3b8);
}

.dash-order-modal {
  max-width: min(96vw, 36rem);
  padding: 0;
  border: none;
  border-radius: 14px;
  background: var(--card, #1a1f2a);
  color: var(--text);
}

.dash-order-modal::backdrop {
  background: rgba(2, 6, 12, 0.72);
}

.dash-order-modal-box {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.dash-order-modal-head,
.dash-order-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}

.dash-order-modal-foot {
  border-bottom: none;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  flex-wrap: wrap;
}

.dash-order-modal-body {
  padding: 1rem;
  overflow: auto;
}

.dash-order-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.dash-order-dl dt {
  color: var(--muted, #94a3b8);
  margin: 0;
}

.dash-order-dl dd {
  margin: 0;
}

.dash-order-items-table {
  margin-top: 0.5rem;
}

.dash-order-totals {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.dash-order-ship-form {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.dash-order-ship-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.dash-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.dash-tab {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}

.dash-tab.is-active {
  background: var(--accent, #3b82f6);
  border-color: transparent;
  color: #fff;
}

.dash-inv-pending-alert {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
}

.dash-inv-pending-alert-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fde68a;
}

.dash-inv-pending-alert-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.dash-inv-pending-alert-text strong {
  font-weight: 700;
}

.dash-inv-section-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.dash-inv-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.dash-inv-inline-form .auth-field {
  flex: 1 1 12rem;
  margin: 0;
}

.dash-inv-actions {
  white-space: nowrap;
}

.dash-inv-actions .btn {
  margin: 0.1rem 0;
}

.dash-inv-thumb-cell {
  width: 3.25rem;
  vertical-align: middle;
}

.dash-inv-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: rgba(255, 255, 255, 0.06);
}

.dash-inv-reset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-inv-thumb-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.25);
  font-size: 0.75rem;
  font-weight: 700;
  color: #c7d2fe;
}

.dash-inv-picker-field {
  position: relative;
  z-index: 1;
}

.dash-inv-picker-field:has(.dash-inv-picker.is-open) {
  z-index: 20;
}

.dash-inv-picker {
  position: relative;
  width: 100%;
}

.dash-inv-picker-trigger {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dash-inv-picker-trigger:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.28);
}

.dash-inv-picker.is-disabled .dash-inv-picker-trigger {
  opacity: 0.65;
  cursor: not-allowed;
}

.dash-inv-picker-thumb {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-inv-picker-thumb-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: rgba(255, 255, 255, 0.06);
}

.dash-inv-picker-thumb-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.25);
  font-size: 0.7rem;
  font-weight: 700;
  color: #c7d2fe;
}

.dash-inv-picker-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-inv-picker-chevron {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.55;
  margin-left: 0.25rem;
}

.dash-inv-picker-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: var(--surface-elevated, #1e1e2e);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 30;
}

.dash-inv-picker-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dash-inv-picker-option:hover,
.dash-inv-picker-option:focus-visible {
  background: rgba(99, 102, 241, 0.2);
  outline: none;
}

.dash-inv-picker-option-thumb {
  flex: 0 0 auto;
  display: flex;
}

.dash-inv-picker-option-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dash-inv-picker-option-label {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-inv-picker-option-meta {
  font-size: 0.8rem;
  opacity: 0.7;
}

.dash-inv-picker-empty {
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  opacity: 0.75;
}

.dash-inventory-notice {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: rgba(59, 130, 246, 0.08);
}

.dash-inventory-notice-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.dash-inventory-notice p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.dash-inventory-notice a {
  color: var(--accent, #60a5fa);
}

/* Modales Lives (escenas) */
.dash-live-modal {
  width: min(100vw - 1.5rem, 26rem);
  max-width: calc(100vw - 1.5rem);
  padding: 0;
  border: none;
  border-radius: 14px;
  background: var(--card, #1a1f2a);
  color: var(--text);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}

.dash-live-modal::backdrop {
  background: rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(4px);
}

.dash-live-modal-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-live-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.dash-live-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.dash-live-modal-lead {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.dash-live-modal-lead strong {
  color: var(--text);
  font-weight: 600;
}

.dash-live-modal-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.dash-live-modal-close:hover,
.dash-live-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.dash-live-modal-body {
  padding: 0.85rem 1.1rem 1rem;
}

.dash-live-modal-body .auth-field {
  margin: 0;
}

.dash-live-modal-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.dash-live-modal-btn-danger {
  background: rgba(248, 113, 113, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.dash-live-modal-btn-danger:hover {
  background: rgba(248, 113, 113, 0.28);
}

.dash-lives-pane--preview {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.dash-lives-pane--widgets {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(0, 0, 0, 0.22);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dash-lives-widgets-head {
  flex-shrink: 0;
}

.dash-lives-widgets-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.dash-lives-widgets-lead {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.dash-lives-widgets-steps {
  flex-shrink: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  background: rgba(94, 234, 212, 0.07);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
}

.dash-lives-widgets-steps p {
  margin: 0;
}

.dash-lives-widgets-steps p + p {
  margin-top: 0.35rem;
}

.dash-lives-steps-toggle {
  display: inline-block;
  vertical-align: middle;
  width: 1.65rem;
  height: 0.9rem;
  margin: 0 0.15rem;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.55);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
}

.dash-lives-steps-toggle::after {
  content: "";
  position: absolute;
  top: 0.1rem;
  right: 0.1rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #fff;
}

.dash-lives-widget-list-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.dash-live-widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-live-widget-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.dash-live-widget-item:hover {
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.06);
}

.dash-live-widget-item.is-active {
  border-color: rgba(94, 234, 212, 0.65);
  background: rgba(94, 234, 212, 0.12);
  box-shadow:
    0 0 0 1px rgba(94, 234, 212, 0.25),
    0 0 20px rgba(94, 234, 212, 0.12);
}

.dash-live-widget-item.is-active::before {
  content: "Configurando";
  position: absolute;
  top: 0.45rem;
  right: 3.1rem;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #042f2e;
  background: var(--accent);
  pointer-events: none;
}

.dash-live-widget-item-action {
  display: block;
  min-height: 1.05rem;
  font-size: 0.72rem;
  margin-top: 0.15rem;
  line-height: 1.05rem;
  color: transparent;
  user-select: none;
}

.dash-live-widget-item:not(.is-active):hover .dash-live-widget-item-action {
  color: var(--muted);
}

.dash-live-widget-item.is-active .dash-live-widget-item-action {
  color: var(--accent);
  font-weight: 600;
}

.dash-live-widget-item-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

.dash-live-widget-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.dash-live-widget-toggle {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
  cursor: pointer;
}

.dash-live-widget-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dash-live-widget-toggle-ui {
  display: block;
  width: 2.1rem;
  height: 1.15rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: background 0.15s;
}

.dash-live-widget-toggle-ui::after {
  content: "";
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  margin: 0.125rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}

.dash-live-widget-toggle input:checked + .dash-live-widget-toggle-ui {
  background: rgba(45, 212, 191, 0.85);
}

.dash-live-widget-toggle input:checked + .dash-live-widget-toggle-ui::after {
  transform: translateX(0.95rem);
}

.dash-live-widget-item-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.dash-live-widget-item-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.dash-lives-config-zone {
  flex-shrink: 0;
  margin-top: 0.25rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
}

.dash-lives-config-zone::before {
  content: "";
  position: absolute;
  top: -0.55rem;
  left: 1.25rem;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(94, 234, 212, 0.35);
}

.dash-lives-config-zone.is-pulse {
  animation: dash-live-config-pulse 0.65s ease;
}

@keyframes dash-live-config-pulse {
  0% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 0 rgba(94, 234, 212, 0.45);
  }
  40% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 4px rgba(94, 234, 212, 0.2);
  }
  100% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 0 rgba(94, 234, 212, 0);
  }
}

.dash-lives-config-zone-head {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.dash-lives-config-zone-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.dash-lives-config-zone-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-lives-config-zone-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-live-widget-config {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-live-widget-config[hidden] {
  display: none !important;
}

.dash-live-widget-config .dash-range-field strong {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.dash-live-widget-config .dash-range-field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.dash-live-widget-config .auth-field {
  margin: 0;
}

.dash-live-widget-config .auth-field select {
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  width: 100%;
}

.dash-lives-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.dash-lives-obs-panel {
  flex-shrink: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  background: rgba(94, 234, 212, 0.06);
}

.dash-lives-obs-label {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.dash-lives-obs-url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.dash-lives-obs-url-input {
  flex: 1 1 12rem;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.dash-lives-obs-hint {
  margin: 0.45rem 0 0;
}

.dash-lives-toolbar-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.dash-live-orient-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
}

.dash-live-orient-tab {
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.dash-live-orient-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.dash-live-orient-tab.is-active {
  color: #042f2e;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.95), rgba(45, 212, 191, 0.88));
  box-shadow: 0 4px 14px rgba(45, 212, 191, 0.2);
}

.dash-live-preview-stage {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
  min-width: 0;
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.dash-live-frame-widgets {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.dash-live-frame-widgets > * {
  pointer-events: auto;
}

/* [hidden] pierde contra display:flex en los overlays del live */
.dash-live-frame-widgets[hidden],
.dash-live-product-carousel[hidden],
.dash-live-product-selected[hidden],
.dash-live-offer[hidden],
.dash-live-stock[hidden],
.dash-live-flash-deal[hidden] {
  display: none !important;
}

.dash-live-product-carousel {
  position: absolute;
  right: 0.3rem;
  top: 2.25rem;
  bottom: 0.45rem;
  width: min(46%, 6.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 5;
}

.dash-live-product-carousel.is-custom-position,
.dash-live-product-selected.is-custom-position,
.dash-live-offer.is-custom-position,
.dash-live-stock.is-custom-position,
.dash-live-flash-deal.is-custom-position {
  right: auto;
  bottom: auto;
}

.dash-live-product-carousel.is-custom-position {
  width: min(46%, 6.75rem);
  height: 72%;
  max-height: 72%;
}

.dash-live-frame-widgets.is-edit-mode .dash-live-product-selected,
.dash-live-frame-widgets.is-edit-mode .dash-live-product-carousel,
.dash-live-frame-widgets.is-edit-mode .dash-live-offer,
.dash-live-frame-widgets.is-edit-mode .dash-live-stock,
.dash-live-frame-widgets.is-edit-mode .dash-live-flash-deal {
  outline: 1px dashed rgba(94, 234, 212, 0.45);
  outline-offset: 2px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.dash-live-frame-widgets.is-edit-mode .dash-live-stock .dash-live-stock-card {
  pointer-events: none;
}

.dash-live-frame-widgets.is-edit-mode .dash-live-stock .dash-live-stock-card * {
  pointer-events: none;
  cursor: inherit;
}

.dash-live-frame-widgets.is-edit-mode .dash-live-product-selected button,
.dash-live-frame-widgets.is-edit-mode .dash-live-product-carousel button,
.dash-live-frame-widgets.is-edit-mode .dash-live-offer button,
.dash-live-frame-widgets.is-edit-mode .dash-live-stock button {
  cursor: pointer;
  touch-action: auto;
}

.dash-live-frame-widgets.is-edit-mode .dash-live-product-selected.is-dragging,
.dash-live-frame-widgets.is-edit-mode .dash-live-product-carousel.is-dragging,
.dash-live-frame-widgets.is-edit-mode .dash-live-offer.is-dragging,
.dash-live-frame-widgets.is-edit-mode .dash-live-stock.is-dragging,
.dash-live-frame-widgets.is-edit-mode .dash-live-flash-deal.is-dragging {
  outline-color: rgba(94, 234, 212, 0.95);
  z-index: 20;
  cursor: grabbing;
}

.dash-live-frame-widgets.is-edit-mode .dash-live-product-selected.is-layout-focus,
.dash-live-frame-widgets.is-edit-mode .dash-live-product-carousel.is-layout-focus,
.dash-live-frame-widgets.is-edit-mode .dash-live-offer.is-layout-focus,
.dash-live-frame-widgets.is-edit-mode .dash-live-stock.is-layout-focus,
.dash-live-frame-widgets.is-edit-mode .dash-live-flash-deal.is-layout-focus {
  outline: 2px solid rgba(94, 234, 212, 0.85);
  outline-offset: 3px;
  z-index: 15;
}

.dash-live-carousel-heading {
  margin: 0;
  padding: 0.2rem 0.35rem;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.dash-live-carousel-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 10%,
    #000 90%,
    transparent 100%
  );
  mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.dash-live-carousel-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  width: 100%;
  --carousel-duration: 22s;
  --carousel-loop-px: 0px;
  will-change: transform;
}

.dash-live-carousel-track:not(.is-carousel-engine) {
  animation: dash-live-carousel-up var(--carousel-duration) linear infinite;
}

.dash-live-carousel-track.is-carousel-engine {
  animation: none !important;
}

.dash-live-carousel-track.is-dir-down:not(.is-carousel-engine) {
  animation-name: dash-live-carousel-down;
}

.dash-live-carousel-track:not(.is-carousel-engine):hover {
  animation-play-state: paused;
}

@keyframes dash-live-carousel-up {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(calc(-1 * var(--carousel-loop-px, 0px)));
  }
}

@keyframes dash-live-carousel-down {
  from {
    transform: translateY(calc(-1 * var(--carousel-loop-px, 0px)));
  }
  to {
    transform: translateY(0);
  }
}

.dash-live-carousel-card {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  padding: 0.38rem 0.4rem 0.45rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.dash-live-carousel-card-index {
  position: absolute;
  top: 0.32rem;
  left: 0.32rem;
  z-index: 2;
  min-width: 1.1rem;
  padding: 0.08rem 0.28rem;
  border-radius: 5px;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  color: #334155;
  background: rgba(226, 232, 240, 0.95);
}

.dash-live-carousel-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}

.dash-live-carousel-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-live-carousel-card-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.95rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
}

.dash-live-carousel-card-name {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1a1d24;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-live-carousel-card-price {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 800;
  color: #0d9488;
}

.dash-live-carousel-card-cart {
  position: absolute;
  right: 0.32rem;
  bottom: 0.32rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #f472b6, #ec4899);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.45);
}

/* Producto seleccionado (tarjeta superior izquierda) */
.dash-live-product-selected {
  position: absolute;
  left: 0.35rem;
  top: 2.15rem;
  z-index: 6;
  max-width: min(92%, 11.5rem);
}

.dash-live-selected-card {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.42rem 0.5rem 0.42rem 0.42rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
}

.dash-live-selected-close {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

.dash-live-selected-close:hover {
  background: rgba(15, 23, 42, 0.14);
  color: #334155;
}

.dash-live-selected-media {
  flex-shrink: 0;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}

.dash-live-selected-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-live-selected-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.75rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
}

.dash-live-selected-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
  padding-right: 0.85rem;
}

.dash-live-selected-name {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1a1d24;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-live-selected-price {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  color: #0d9488;
}

.dash-live-selected-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  margin-top: 0.12rem;
  padding: 0.28rem 0.55rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f472b6, #ec4899);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
  align-self: flex-start;
}

.dash-live-frame.is-horizontal .dash-live-product-selected:not(.is-custom-position) {
  top: 1.35rem;
  max-width: min(55%, 14rem);
}

/* Oferta (abajo derecha) */
.dash-live-frame:has(.dash-live-offer:not([hidden]))
  .dash-live-product-carousel:not(.is-custom-position) {
  bottom: 5rem;
}

.dash-live-offer {
  position: absolute;
  right: 0.35rem;
  bottom: 0.45rem;
  z-index: 7;
  max-width: 4.5rem;
}

.dash-live-offer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 0.45rem 0.55rem;
  border-radius: 14px;
  text-align: center;
  color: #fff;
  background: linear-gradient(165deg, #f472b6 0%, #ec4899 45%, #db2777 100%);
  box-shadow:
    0 8px 22px rgba(236, 72, 153, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.dash-live-offer-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.dash-live-offer-icon svg {
  stroke: #fff;
}

.dash-live-offer-percent {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dash-live-offer-percent-sym {
  font-size: 0.85rem;
  font-weight: 800;
}

.dash-live-offer-text {
  margin: 0;
  max-width: 4.2rem;
  font-size: 0.52rem;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.95);
}

.dash-live-frame.is-horizontal .dash-live-offer:not(.is-custom-position) {
  bottom: 0.35rem;
  max-width: 5rem;
}

.dash-live-frame.is-horizontal .dash-live-offer-text {
  max-width: 4.8rem;
  font-size: 0.58rem;
}

/* Stock / últimas unidades */
.dash-live-stock {
  position: absolute;
  z-index: 8;
  max-width: 7.25rem;
}

.dash-live-stock .dash-live-widget-drag-surface {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: grab;
  touch-action: none;
  background: transparent;
  border-radius: 14px;
}

.dash-live-frame-widgets.is-edit-mode .dash-live-stock.is-dragging .dash-live-widget-drag-surface {
  cursor: grabbing;
}

.dash-live-stock-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
  padding: 0.5rem 0.6rem 0.55rem;
  border-radius: 14px;
  text-align: center;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dash-live-stock-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  margin: 0;
  font-size: 0.54rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ff4d6d;
}

.dash-live-stock-badge--bottom {
  margin-top: 0.12rem;
  font-size: 0.48rem;
  opacity: 0.92;
}

.dash-live-stock-product {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  width: 100%;
}

.dash-live-stock-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}

.dash-live-stock-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-live-stock-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.dash-live-stock-name {
  margin: 0;
  width: 100%;
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.95);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-live-stock-price {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
}

.dash-live-stock-urgency {
  width: 100%;
  padding-top: 0.22rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.dash-live-stock-warn {
  display: flex;
  color: #ffc107;
}

.dash-live-stock-warn svg {
  stroke: #ffc107;
}

.dash-live-stock-lead,
.dash-live-stock-unit {
  margin: 0;
  font-size: 0.56rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.dash-live-stock-qty {
  margin: 0.05rem 0;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #ff8fa3;
}

.dash-live-stock-bar {
  width: 100%;
  margin-top: 0.35rem;
  height: 0.38rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.dash-live-stock-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e91e8c, #ff4d6d);
  transition: width 0.35s ease;
}

.dash-live-price-compare {
  text-decoration: line-through;
  opacity: 0.72;
  font-weight: 600;
  margin-right: 0.15rem;
}

.dash-live-carousel-card-media,
.dash-live-selected-media,
.dash-live-stock-media {
  position: relative;
}

.dash-live-flash-product-badge {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  z-index: 4;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  padding: 0.2rem 0.28rem;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #ff4d6d, #7c3aed);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.42rem;
  font-weight: 800;
  line-height: 1.05;
  pointer-events: none;
}

.dash-live-flash-product-badge-icon {
  display: flex;
}

.dash-live-flash-product-badge-pct {
  font-size: 0.48rem;
}

.dash-live-flash-product-badge-timer {
  font-variant-numeric: tabular-nums;
  font-size: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Oferta por tiempo (cuenta atrás) */
.dash-live-flash-deal {
  position: absolute;
  z-index: 9;
  max-width: 5.5rem;
}

.dash-live-flash-deal-card {
  position: relative;
  padding: 0.55rem 0.5rem 0.65rem;
  border-radius: 16px;
  text-align: center;
  color: #fff;
  background: linear-gradient(165deg, #ff6b4a 0%, #e91e63 38%, #7c3aed 72%, #5b21b6 100%);
  box-shadow:
    0 12px 32px rgba(124, 58, 237, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.dash-live-flash-deal-head {
  margin: 0 0 0.35rem;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.dash-live-flash-deal-timer {
  position: relative;
  margin: 0 auto;
  padding: 0.45rem 0.35rem 0.35rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
}

.dash-live-flash-deal-heart {
  position: absolute;
  top: -0.35rem;
  left: 28%;
  font-size: 0.55rem;
  color: #ff4d6d;
  filter: drop-shadow(0 0 4px rgba(255, 77, 109, 0.8));
}

.dash-live-flash-deal-heart--r {
  left: auto;
  right: 28%;
}

.dash-live-flash-deal-digits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

.dash-live-flash-deal-sep {
  opacity: 0.85;
  font-weight: 700;
}

.dash-live-flash-deal-labels {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 0.2rem;
  padding: 0 0.35rem;
  font-size: 0.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.dash-live-flash-deal-clock {
  position: absolute;
  right: 0.15rem;
  bottom: 0.1rem;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.95;
}

.dash-flash-deal-scope-field legend {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.dash-radio-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.dash-live-flash-deal-duration-row {
  display: flex;
  gap: 0.65rem;
}

.dash-live-flash-deal-duration-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.dash-live-flash-deal-products {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 10rem;
  overflow: auto;
  padding: 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.dash-flash-deal-product-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
}

.dash-live-flash-deal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.dash-live-widget-config .auth-field textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  width: 100%;
  resize: vertical;
  min-height: 4.5rem;
}

.dash-live-widget-config .auth-field input[type="number"] {
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  width: 100%;
}

.dash-live-carousel-empty {
  margin: 0;
  padding: 0.5rem;
  font-size: 0.65rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.dash-live-frame.is-horizontal .dash-live-product-carousel:not(.is-custom-position) {
  width: min(38%, 8.5rem);
  top: 1.5rem;
}

.dash-live-frame {
  position: relative;
  box-sizing: border-box;
  border-radius: 14px;
  border: 2px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(165deg, #12151c 0%, #0a0c10 55%, #151a24 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 16px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition:
    width 0.35s ease,
    height 0.35s ease,
    aspect-ratio 0.35s ease,
    max-width 0.35s ease,
    max-height 0.35s ease;
}

.dash-live-frame.is-vertical {
  aspect-ratio: 9 / 16;
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
}

.dash-live-frame.is-horizontal {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 100%;
}

.dash-live-frame-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  background: #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.45);
}

.dash-live-frame-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 1.25rem;
  pointer-events: none;
}

.dash-live-frame-placeholder {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.55);
  text-align: center;
  line-height: 1.4;
  pointer-events: none;
}

@media (max-width: 768px) {
  body.dash-shell-lives {
    height: auto;
    max-height: none;
    overflow: auto;
  }

  body.dash-shell-lives .dash-scroll,
  body.dash-shell-lives .dash-page-inner,
  body.dash-shell-lives .auth-main,
  body.dash-shell-lives .container.auth-shell.auth-shell-wide,
  body.dash-shell-lives .dash-lives-card,
  body.dash-shell-lives .dash-lives-workspace {
    flex: none;
    overflow: visible;
  }

  .dash-lives-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .dash-lives-pane--preview {
    min-height: min(52vh, 480px);
    height: auto;
  }

  .dash-lives-pane--widgets {
    min-height: 10rem;
    max-height: none;
    height: auto;
  }

  .dash-lives-pane--scenes {
    min-height: 8rem;
    max-height: none;
    height: auto;
  }

  .dash-live-preview-stage {
    min-height: min(52vh, 480px);
    height: auto;
  }

  .dash-live-frame.is-vertical {
    height: min(420px, 52vh);
    max-height: min(420px, 52vh);
  }
}

@media (max-width: 520px) {
  .dash-live-orient-tabs {
    width: 100%;
  }

  .dash-live-orient-tab {
    flex: 1;
  }
}
