:root {
  --red: #d61b3c;
  --red-dark: #760f24;
  --red-soft: #fdebed;
  --ink: #22191d;
  --muted: #6d5961;
  --line: #eadfe3;
  --bg: #650f1f;
  --card: rgba(255, 255, 255, .985);
  --green: #16823a;
  --amber: #b96a00;
  --shadow: 0 18px 44px rgba(27, 6, 12, .22);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.08), transparent 28%),
    radial-gradient(circle at 15% 10%, rgba(255,255,255,.05), transparent 22%),
    linear-gradient(180deg, #7a1429 0%, #65101f 35%, #4b0b17 100%);
  background-attachment: fixed;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.top-strip {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 9px 18px;
  color: #6a1021;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,244,246,.98));
  border-bottom: 1px solid rgba(118,15,36,.12);
  font-size: 13px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 14px clamp(16px, 3vw, 42px);
  background: rgba(95, 14, 30, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 34px rgba(29,6,12,.22);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}
.brand img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 7px 24px rgba(208,2,27,.18);
}
.brand strong { display:block; font-size: 18px; line-height: 1.1; }
.brand small { color: rgba(255,255,255,.88); font-weight: 600; }
.search-wrap label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 10px 0 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 12px 28px rgba(24,5,10,.12), inset 0 1px 0 rgba(255,255,255,.85);
  color: #2a1a1f;
}
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #2a1a1f;
  background: transparent;
}
.header-actions { display:flex; gap:10px; align-items:center; }
.login-pill, .icon-btn, .ghost-btn, .outline-btn, .secondary-btn, .primary-btn, .wide-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.login-pill, .primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 22px rgba(208,2,27,.25);
}
.primary-btn { text-decoration: none; display:inline-flex; align-items:center; justify-content:center; }
.icon-btn, .secondary-btn, .wide-btn {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,240,243,.98));
  border: 1px solid var(--line);
}
.icon-btn { position:relative; display:flex; gap:8px; align-items:center; }
.icon-btn b {
  min-width: 21px;
  height: 21px;
  display:inline-flex; align-items:center; justify-content:center;
  color:#fff; background:var(--red);
  border-radius:999px; font-size:12px;
}
.ghost-btn { padding: 8px 10px; background: transparent; color: rgba(255,255,255,.92); }
.outline-btn {
  color: var(--red);
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(214,27,60,.28);
}
button:hover, .primary-btn:hover { transform: translateY(-1px); }
.hero {
  display:grid;
  grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr);
  gap: 28px;
  align-items: stretch;
  margin: 28px auto;
  max-width: 1240px;
  padding: 0 22px;
}

.hero.public-hero:not(.root-active) {
  grid-template-columns: 1fr;
}
.hero.public-hero:not(.root-active) .hero-content {
  min-height: 330px;
}
.hero-content, .hero-panel, .filter-card, .catalog-toolbar, .product-card, .category-bar {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.hero-content {
  position:relative;
  overflow:hidden;
  padding: clamp(26px, 5vw, 56px);
}
.hero-content:after {
  content:"";
  position:absolute;
  inset:auto -80px -120px auto;
  width: 310px; height:310px;
  border-radius:50%;
  background: radial-gradient(circle, rgba(214,27,60,.22), transparent 65%);
}
.eyebrow {
  display:inline-flex;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid rgba(208,2,27,.12);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
}
.hero h1 {
  max-width: 830px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: .98;
  margin: 18px 0 14px;
  letter-spacing: -.04em;
}
.hero p { max-width: 720px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.hero-actions { display:flex; gap:16px; flex-wrap:wrap; margin-top:24px; }
.hero-panel {
  display:grid;
  gap: 14px;
  padding: 22px;
  background: linear-gradient(145deg, #78152a, #4d0c18);
  color:#fff;
}
.metric-card {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 22px;
}
.metric-card strong { display:block; font-size: 34px; }
.metric-card span { color: rgba(255,255,255,.72); }
.category-bar {
  max-width: 1240px;
  margin: 0 auto 22px;
  padding: 20px 22px;
}
.section-title { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:16px; }
.section-title span { font-size:22px; font-weight:900; }
.section-title small { color: var(--muted); }
.chips { display:flex; gap:10px; overflow:auto; padding-bottom:4px; }
.chip {
  flex: 0 0 auto;
  border: 1px solid rgba(214,27,60,.12);
  background: rgba(255,255,255,.98);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
}
.chip.active {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}
.catalog-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 50px;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 22px;
}
.filters { position: sticky; top: 104px; align-self:start; display:grid; gap:16px; }
.filter-card { padding: 18px; }
.filter-card h2, .filter-card h3 { margin: 0 0 14px; }
.field-label {
  display:block;
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
select, .text-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  outline-color: rgba(208,2,27,.25);
}
.check-row { display:flex; align-items:center; gap:10px; margin: 14px 0; color: var(--ink); font-weight:700; }
.check-row input { width:18px; height:18px; accent-color: var(--red); }
.wide, .wide-btn { width: 100%; justify-content:center; }
.note-card p { color: var(--muted); line-height:1.55; }
.catalog-content { min-width:0; }
.catalog-toolbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.catalog-toolbar h2 { margin:0; }
.catalog-toolbar p { margin:5px 0 0; color: var(--muted); }
.toolbar-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.products-grid {
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 14px;
}
.product-card {
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height: 100%;
  transition: transform .17s ease, box-shadow .17s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 18px 46px rgba(24,32,43,.14); }
.product-img {
  position:relative;
  height: 190px;
  background: linear-gradient(135deg, #ffffff, #f7f3f5);
  display:flex; align-items:center; justify-content:center;
}
.product-img img {
  width:100%; height:100%;
  object-fit:contain;
  padding: 8px;
}
.no-img {
  color: var(--muted);
  font-weight:800;
  text-align:center;
  padding: 20px;
}
.sku-badge {
  position:absolute;
  left: 10px; top: 10px;
  color:#fff; background: rgba(24,32,43,.86);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}
.stock-badge {
  position:absolute;
  right: 10px; top: 10px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  background: #fff;
  border: 1px solid var(--line);
}
.stock-badge.disponible { color: var(--green); }
.stock-badge.bajo-stock { color: var(--amber); }
.stock-badge.agotado { color: var(--red); }

.support-badge {
  position:absolute;
  left: 10px; bottom: 10px;
  color:#0f172a;
  background: rgba(255,255,255,.95);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
}
.card-body { padding: 15px; display:flex; flex-direction:column; flex:1; }
.category-line { color: var(--red); font-weight:900; font-size:12px; text-transform:uppercase; letter-spacing:.05em; }
.card-body h3 { margin: 8px 0 6px; font-size: 18px; line-height: 1.15; }
.secondary {
  color: var(--muted);
  min-height: 42px;
  font-size: 14px;
  line-height: 1.45;
}
.price-box {
  display:grid;
  gap:8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}
.price-row { display:flex; justify-content:space-between; gap:16px; align-items:center; }
.price-row span { color: var(--muted); font-size:13px; }
.price-row strong { font-size:14px; }
.current-price strong { color: var(--green); }
.history-price strong { color: var(--amber); }
.card-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:auto; }
.card-actions .edit-price { grid-column: span 2; }
.load-more-wrap { display:flex; justify-content:center; margin: 26px 0; }
.hidden { display:none !important; }
.modal, .drawer {
  position:fixed;
  inset:0;
  z-index:100;
  display:none;
  background: rgba(13,18,26,.58);
  backdrop-filter: blur(5px);
}
.modal.show, .drawer.show { display:flex; align-items:center; justify-content:center; }
.modal-card {
  position:relative;
  width:min(520px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  overflow:auto;
  background:#fff9fa;
  border-radius: 22px;
  box-shadow: 0 25px 80px rgba(0,0,0,.25);
  padding: 24px;
}
.modal-card.large { width:min(960px, calc(100% - 28px)); }
.close-modal {
  position:absolute;
  right:14px; top:14px;
  border:0; background:#f1f3f7; color:var(--ink);
  width:36px; height:36px; border-radius:999px;
}
.muted { color: var(--muted); line-height:1.55; }
.error { color: var(--red); font-weight:800; }
.price-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin: 12px 0; }
.price-grid label span { display:block; margin-bottom:8px; color:var(--muted); font-weight:800; font-size:13px; }
.history-hint { color: var(--amber); font-weight:700; line-height:1.5; }
.detail-grid { display:grid; grid-template-columns: 360px 1fr; gap:24px; }
.detail-img { border:1px solid var(--line); border-radius:18px; min-height:320px; display:flex; align-items:center; justify-content:center; background:#fafafa; overflow:hidden; }
.detail-img img { width:100%; height:100%; object-fit:contain; }
.detail-meta { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin:18px 0; }
.meta-box { border:1px solid var(--line); border-radius:14px; padding:12px; }
.meta-box span { display:block; color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; }
.meta-box strong { display:block; margin-top:4px; }
.drawer.show { justify-content:flex-end; align-items:stretch; }
.drawer-card {
  width:min(430px,100%);
  background:#ffffff;
  min-height:100%;
  padding:22px;
  box-shadow: -20px 0 70px rgba(0,0,0,.22);
  overflow:auto;
}
.drawer-head { display:flex; justify-content:space-between; align-items:center; position:relative; }
.drawer-head .close-modal { position:static; }
.quote-items { display:grid; gap:10px; margin:16px 0; }
.quote-item { border:1px solid var(--line); border-radius:14px; padding:12px; }
.quote-item strong { display:block; }
.quote-item small { color:var(--muted); }
.quote-item-row { display:flex; justify-content:space-between; gap:10px; margin-top:8px; align-items:center; }
.qty-btn { border:1px solid var(--line); background:#fff; border-radius:10px; width:32px; height:32px; font-weight:900; }
.quote-total { display:flex; justify-content:space-between; align-items:center; border-top:1px solid var(--line); padding:18px 0; }

.quote-mode-group { display:flex; flex-wrap:wrap; gap:10px; }
.quote-mode-badge { display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:6px 12px; font-size:12px; font-weight:800; background:#fff3f6; color:#bd1237; border:1px solid rgba(189,18,55,.18); }
.quote-mode-badge.mayor { background:#fff8e8; color:#b77705; border-color:rgba(183,119,5,.22); }
.quote-help-note { margin-top:8px; font-size:12px; color:#7d5f66; }
.quote-item-warning { margin-top:8px; padding:8px 10px; border-radius:10px; background:#fff4f1; color:#b42318; font-size:12px; font-weight:700; }
.quote-validation-box { display:grid; gap:10px; margin:6px 0 14px; }
.quote-validation-card { border-radius:16px; padding:12px 14px; border:1px solid rgba(188,23,49,.12); background:#fffaf8; }
.quote-validation-card.ok { border-color:rgba(20,143,78,.15); background:#f4fff8; }
.quote-validation-card strong { display:block; margin-bottom:6px; }
.quote-validation-card ul { margin:0; padding-left:18px; color:#6a5057; }
.quote-client-panel { border:1px solid var(--line); border-radius:18px; padding:14px; background:rgba(255,248,250,.85); display:grid; gap:10px; margin:6px 0 10px; }
.quote-client-head { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.quote-client-head h3 { margin:0; font-size:1rem; }
.quote-required-pill { display:inline-flex; padding:6px 10px; border-radius:999px; background:#fff0f3; color:#c21238; font-size:12px; font-weight:900; }
.quote-client-copy { margin:0; font-size:13px; color:var(--muted); }
.quote-client-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.quote-form-message { margin:0; font-size:12px; color:#b42318; font-weight:700; }
.quote-form-message.ok { color:#16823a; }
.invoice-actions-bar { gap:10px; flex-wrap:wrap; }
.invoice-alert-box { margin:0 0 14px; border-radius:14px; padding:12px 14px; border:1px solid rgba(188,23,49,.14); background:#fff7f5; color:#5c3943; }
.invoice-alert-box.ok { border-color:rgba(20,143,78,.18); background:#f5fff8; }
.invoice-alert-box strong { display:block; margin-bottom:6px; color:#24171d; }
.invoice-alert-box ul { margin:0; padding-left:18px; }
.detail-actions .primary-btn.outline-mayor { background:#fff8e8; color:#b77705; box-shadow:none; }
@media (max-width:640px){ .quote-client-grid{grid-template-columns:1fr;} .quote-mode-group{flex-direction:column;} }

.footer {
  margin-top: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(251,248,249,1));
  color:#2a1a1f;
  padding: 34px clamp(18px,3.5vw,40px) 124px;
  display:flex;
  justify-content:center;
  align-items:center;
  border-top: 1px solid rgba(118,15,36,.12);
  text-align:center;
}
.footer-inner {
  width: min(100%, 1180px);
  margin: 0 auto;
  display:grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 28px;
  align-items:start;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}
.footer-column {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap: 12px;
}
.footer-column-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: .06em;
  color: #8f0f28;
  text-transform: uppercase;
}
.footer-left,
.footer-right {
  padding-top: 18px;
}
.footer-brand-row {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
}
.footer-brand-row img { width:46px; height:46px; object-fit:cover; border-radius:12px; margin:0; }
.footer-brand-row strong { font-size: 1.38rem; font-weight: 900; letter-spacing:.01em; }
.footer p { color: #2a1a1f; margin:0; font-weight: 800; }
.footer-line {
  line-height: 1.45;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .01em;
}
.footer-slogan {
  font-family: "Arial Black", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 1.05rem;
  letter-spacing: .075em;
  text-transform: uppercase;
  color: var(--red);
  line-height: 1.35;
}
.footer-shipping {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
}
.agency-logos {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  flex-wrap:wrap;
}
.agency-logos img,
.agency-logo {
  height:44px;
  width:auto;
  max-width:170px;
  object-fit:contain;
  display:block;
}
.agency-logo-mrw {
  height:44px;
  max-width:170px;
}
.footer-quick-links {
  display:flex;
  flex-direction:column;
  width:100%;
  gap:10px;
  align-items:stretch;
}
.footer-quick-link {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  text-decoration:none;
  background:#ffffff;
  border:1px solid rgba(118,15,36,.16);
  border-radius:14px;
  padding:12px 14px;
  box-shadow: 0 6px 18px rgba(118,15,36,.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.footer-quick-link:hover {
  transform: translateY(-2px);
  border-color: rgba(184,16,46,.38);
  box-shadow: 0 10px 22px rgba(118,15,36,.09);
}
.footer-link-name {
  color:#7c0f26;
  font-weight: 900;
  font-size: .98rem;
}
.footer-link-meta {
  color:#2a1a1f;
  font-weight: 800;
  font-size: .85rem;
  opacity: .84;
}
.footer-bottom-note {
  grid-column: 1 / -1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  margin-top: 4px;
}
.footer-sales {
  text-transform: uppercase;
  letter-spacing: .03em;
}
.footer-note { max-width: 440px; }
.footer-service-note {
  margin-top: 0;
  font-size: 0.62rem;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: .02em;
  text-align: center;
  color: #5f5155;
  opacity: 0.95;
}
@media (max-width: 980px) {
  .site-header { grid-template-columns:1fr; gap:16px; }
  .header-actions { justify-content:space-between; }
  .hero, .catalog-layout, .detail-grid { grid-template-columns:1fr; }
  .filters { position:static; }
  .catalog-toolbar { align-items:flex-start; flex-direction:column; }
}
@media (max-width: 560px) {
  .top-strip { justify-content:flex-start; gap:8px; font-size:12px; }
  .brand img { width:46px; height:46px; }
  .hero { padding:0 12px; }
  .catalog-layout, .category-bar { padding-left:12px; padding-right:12px; }
  .products-grid { grid-template-columns:1fr; }
  .card-actions { grid-template-columns:1fr; }
  .card-actions .edit-price { grid-column:auto; }
  .price-grid { grid-template-columns:1fr; }
  .detail-meta { grid-template-columns:1fr; }
}

.root-filter-tools {
  margin-top: 18px;
}
.internal-divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0 16px;
}
.internal-title {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}


/* v5: tarjetas públicas limpias */
.product-open { cursor: pointer; }
.product-title-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}
.product-title-btn:hover { color: var(--red); }
.review-badge {
  position:absolute;
  right: 10px; bottom: 10px;
  color:#fff;
  background: #d0021b;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing:.03em;
}
.clean-actions {
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items:center;
  gap:10px;
}
.clean-actions .edit-price { grid-column: 1 / -1; }
.status-pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height: 42px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background:#fff;
  text-align:center;
}
.status-pill.disponible {
  color: #ffffff;
  background: #16a34a;
  border-color: #16a34a;
}
.status-pill.agotado {
  color: #ffffff;
  background: #d92d20;
  border-color: #d92d20;
}
.clean-actions > * {
  width: 100%;
}
.add-btn {
  min-height: 42px;
  width: 100%;
}
.public-detail-status { margin: 16px 0; }
.detail-category {
  display:inline-flex;
  margin: 4px 0 10px;
  color: var(--red);
  background: #fff2f4;
  border: 1px solid rgba(208,2,27,.15);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.root-detail-meta { margin-top: 16px; }
.quote-total.hidden { display:none !important; }

@media (max-width: 560px) {
  .clean-actions { grid-template-columns: 1fr 1fr; }
}

/* v6: sección pública de ofertas y novedades */
.promo-section {
  width: min(1180px, calc(100% - 48px));
  margin: 24px auto 24px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 16px 44px rgba(27,6,12,.18);
  backdrop-filter: blur(10px);
}
.promo-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.promo-eyebrow {
  display:inline-flex;
  margin-bottom: 10px;
}
.promo-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
}
.promo-head p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.65;
}
.promo-link { white-space: nowrap; }
.promo-grid {
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.promo-card {
  border: 1px solid rgba(214,27,60,.10);
  border-radius: 18px;
  overflow:hidden;
  background:#ffffff;
  box-shadow: 0 10px 26px rgba(27,6,12,.10);
  display:flex;
  flex-direction:column;
  min-height:100%;
}
.promo-img {
  position:relative;
  height: 160px;
  background: linear-gradient(135deg, #ffffff, #f6f2f4);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.promo-img img {
  width:100%;
  height:100%;
  object-fit:contain;
  padding: 8px;
}
.promo-type {
  position:absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 900;
  color:#fff;
  background: var(--red);
  box-shadow: 0 8px 18px rgba(208,2,27,.22);
}
.promo-type.nuevo { background:#087443; }
.promo-type.destacado { background:#18202b; }
.promo-body {
  padding: 14px;
  display:flex;
  flex-direction:column;
  gap: 8px;
  flex: 1;
}
.promo-sku {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing:.04em;
}
.promo-body h3 {
  margin:0;
  font-size: 16px;
  line-height: 1.2;
}
.promo-body p {
  margin:0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  min-height: 38px;
}
.promo-actions {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top:auto;
}
.promo-root-panel {
  margin-top: 20px;
  padding: 18px;
  border: 1px dashed rgba(208,2,27,.32);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #fbf8f9);
}
.compact-title { margin-bottom: 16px; }
.promo-editor-grid {
  display:grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}
.promo-editor-grid label span {
  display:block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
.wide-editor-field { grid-column: 1 / -1; }
.promo-textarea {
  min-height: 76px;
  resize: vertical;
}
.promo-editor-actions {
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-top: 14px;
}
.promo-editor-message { margin: 10px 0 0; }
.promo-admin-list {
  display:grid;
  gap: 8px;
  margin-top: 14px;
}
.promo-admin-item {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:#fff;
}
.promo-admin-item strong { display:block; }
.promo-admin-item small { color: var(--muted); }
.promo-remove-btn {
  border:1px solid rgba(208,2,27,.25);
  background:#fff;
  color:var(--red);
  border-radius:999px;
  padding:8px 12px;
  font-weight:900;
}
@media (max-width: 760px) {
  .promo-section { width: calc(100% - 24px); padding:16px; }
  .promo-head { flex-direction:column; }
  .promo-link { width:100%; justify-content:center; }
  .promo-editor-grid { grid-template-columns:1fr; }
  .promo-actions { grid-template-columns:1fr; }
}


body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 14%, rgba(255,255,255,.06), transparent 16%),
    radial-gradient(circle at 16% 80%, rgba(255,255,255,.04), transparent 20%);
}
.search-box input::placeholder { color: rgba(74,54,62,.72); }
.header-actions .icon-btn {
  color: #fff;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
}
.header-actions .icon-btn span { color: #fff; }
.header-actions .icon-btn b { box-shadow: 0 8px 18px rgba(214,27,60,.28); }
main { position: relative; z-index: 1; }
.hero, .category-bar, .catalog-layout, .promo-section { position: relative; z-index: 1; }
.filter-card, .catalog-toolbar, .product-card, .category-bar, .promo-section, .hero-content {
  box-shadow: 0 18px 42px rgba(24, 5, 10, .14);
}
.filter-card, .catalog-toolbar, .promo-section, .category-bar {
  background: rgba(255, 255, 255, .99);
}
.select, select, .text-input { background: rgba(255,255,255,.95); }
.category-line { color: #b40f2e; }
.section-title span, .catalog-toolbar h2, .filter-card h2, .filter-card h3 { color: #25191d; }


.top-strip span, .top-strip strong, .top-strip b { color: #fff; }
.search-wrap, .search-wrap * { color: #fff; }
.search-box button, .search-box .ghost-btn, .search-box .icon-btn { color: #fff; }
.site-header .brand strong, .site-header .brand small { text-shadow: 0 1px 2px rgba(0,0,0,.16); }


@media (max-width: 760px) {
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .footer-left, .footer-right {
    padding-top: 0;
  }
  .footer-brand-row strong { font-size: 1.12rem; }
  .footer-line { font-size: .96rem; }
  .footer-slogan { font-size: .92rem; letter-spacing: .045em; }
  .agency-logos { gap: 14px; }
  .agency-logos img, .agency-logo { height: 34px; max-width: 95px; }
  .footer-column-title { font-size: .92rem; }
  .footer-quick-link { padding: 11px 12px; }
  .footer-link-name { font-size: .94rem; }
  .footer-link-meta { font-size: .8rem; }
  .footer-bottom-note {
    margin-top: -2px;
  }
}
.footer strong, .footer b, .footer .brand, .footer-note, .footer-note strong { color:#2a1a1f; }

.top-strip, .top-strip * { color: #6a1021 !important; }
.search-wrap label { color: #ffffff !important; }
.search-wrap .search-box, .search-wrap .search-box * { color: #2a1a1f !important; }
.hero-content, .filter-card, .catalog-toolbar, .product-card, .category-bar, .promo-section { background: rgba(255,255,255,.99) !important; }
.products-grid .product-card { border: 1px solid rgba(118,15,36,.10); }

/* v11: encabezado blanco y tarjetas en blanco puro */
.site-header {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid #e8e8e8 !important;
  box-shadow: none !important;
}
.site-header .brand,
.site-header .brand strong,
.site-header .brand small,
.site-header .search-wrap,
.site-header .search-wrap label,
.site-header .search-wrap span,
.site-header .search-wrap input,
.site-header .search-wrap button {
  color: #22191d !important;
  text-shadow: none !important;
}
.site-header .brand small { color: #6d5961 !important; }
.search-wrap label {
  color: #4a3a40 !important;
}
.search-box {
  background: #ffffff !important;
  border: 1px solid #dddddd !important;
  box-shadow: none !important;
}
.search-box input,
.search-box input::placeholder {
  color: #5e4d54 !important;
}
.header-actions .icon-btn {
  color: #22191d !important;
  background: #ffffff !important;
  border: 1px solid #dddddd !important;
  box-shadow: none !important;
}
.header-actions .icon-btn span { color: #22191d !important; }
.login-pill {
  box-shadow: none !important;
}
.top-strip {
  background: #ffffff !important;
  border-bottom: 1px solid #ececec !important;
}
.top-strip,
.top-strip * {
  color: #6a1021 !important;
}
.hero-content,
.hero-panel,
.filter-card,
.catalog-toolbar,
.product-card,
.category-bar,
.promo-section,
.modal-card,
.drawer-card,
.promo-root-panel,
.promo-card,
.promo-admin-item,
.quote-item,
.price-box,
.meta-box,
.detail-img {
  background: #ffffff !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.hero-content,
.hero-panel,
.filter-card,
.catalog-toolbar,
.product-card,
.category-bar,
.promo-section,
.modal-card,
.drawer-card,
.promo-root-panel,
.promo-card,
.promo-admin-item,
.quote-item,
.price-box,
.meta-box,
.detail-img,
.search-box,
select,
.text-input,
.chip,
.status-pill,
.outline-btn,
.secondary-btn,
.wide-btn,
.qty-btn,
.close-modal {
  border-color: #e3e3e3 !important;
}
.hero-content::after,
body::before {
  display: none !important;
}
.filter-card,
.catalog-toolbar,
.promo-section,
.category-bar,
.hero-content,
.product-card {
  background: #ffffff !important;
}
.product-card:hover,
button:hover,
.primary-btn:hover {
  transform: none !important;
  box-shadow: none !important;
}
.product-img,
.promo-img,
.detail-img {
  background: #ffffff !important;
}
.chip,
.status-pill,
.outline-btn,
.secondary-btn,
.wide-btn,
select,
.text-input,
.qty-btn,
.close-modal {
  background: #ffffff !important;
  box-shadow: none !important;
}
.footer {
  background: #ffffff !important;
  border-top: 1px solid #ececec !important;
  box-shadow: none !important;
}
.footer .agency-logos img {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
@media (max-width: 760px) {
  .footer { padding-bottom: 132px !important; }
  .agency-logos { gap: 12px; }
  .agency-logos img { height: 32px; max-width: 90px; }
}


/* v15 login modal adjustments */
#loginModal .field-label {
  text-align: center;
}
#loginModal .text-input {
  background: #ffffff !important;
  color: #1f1720;
}
#loginModal .text-input::placeholder {
  color: transparent;
}


/* v16 login modal: centered text, larger elegant button, no emoji on trigger */
#loginModal h2 {
  text-align: center;
  margin-bottom: 10px;
}
#loginModal .muted {
  text-align: center;
  max-width: 340px;
  margin: 0 auto 8px;
  line-height: 1.65;
}
#loginModal #doLogin {
  min-height: 54px;
  margin-top: 18px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .01em;
  border: 1px solid rgba(160, 8, 36, 0.95);
  background: linear-gradient(180deg, #c9153b 0%, #a90d2f 100%);
  box-shadow: 0 10px 22px rgba(169, 13, 47, 0.20);
}
#loginModal #doLogin:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(169, 13, 47, 0.24);
}
#loginButton.login-pill {
  min-height: 44px;
  padding-inline: 18px;
}


/* v17 header login button: plain centered text without icon */
#loginButton.login-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 0 !important;
  min-width: 110px;
}


/* v18: accesos rápidos laterales, sugerencias y chat online */
.side-access { position: fixed; z-index: 85; top: 58%; }
.side-access-left { left: 0; }
.side-access-right { right: 0; }
.side-tab {
  min-height: 142px;
  border: 0;
  background: #a70f2d;
  color: #fff;
  font-weight: 900;
  letter-spacing: .02em;
  padding: 14px 10px;
  box-shadow: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.side-tab-left { border-radius: 0 16px 16px 0; }
.side-tab-right { border-radius: 16px 0 0 16px; }
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #7a7a7a;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(255,255,255,.18);
}
.status-dot.open { background: #16a34a; }
.status-dot.closed { background: #8f8f8f; }
.floating-panel {
  position: fixed;
  z-index: 90;
  bottom: 24px;
  width: min(380px, calc(100vw - 96px));
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 22px;
  padding: 18px;
  display: none;
}
.floating-panel.show { display: block; }
.floating-left { left: 64px; }
.floating-right { right: 64px; }
.floating-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.floating-head h3 { margin: 2px 0 0; font-size: 22px; line-height: 1.1; }
.panel-kicker { display: block; color: #a70f2d; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.panel-close { border: 1px solid #e3e3e3; background: #fff; color: #22191d; width: 34px; height: 34px; border-radius: 999px; font-weight: 900; }
.panel-copy { margin: 0 0 14px; color: #6d5961; line-height: 1.55; }
.mini-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.full-field { grid-column: 1 / -1; }
.mini-textarea { min-height: 92px; resize: vertical; }
.panel-message { min-height: 22px; margin: 10px 0 0; color: #16823a; font-weight: 800; line-height: 1.45; }
.panel-message.error { color: #b42318; }
.chat-choice-grid { display: grid; gap: 10px; margin: 12px 0; }
.chat-choice-grid button[disabled] { opacity: .55; cursor: not-allowed; }
.store-chat-box { border: 1px solid #e3e3e3; border-radius: 16px; padding: 12px; margin-top: 12px; }
.store-chat-messages { display: grid; gap: 8px; max-height: 190px; overflow: auto; padding-right: 4px; }
.chat-bubble { max-width: 88%; padding: 9px 11px; border-radius: 14px; line-height: 1.35; font-size: 14px; }
.chat-bubble.system { background: #fff1f3; color: #721327; justify-self: start; }
.chat-bubble.client { background: #ecfdf5; color: #064e3b; justify-self: end; }
.chat-input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.chat-input-row .primary-btn { min-height: 44px; border-radius: 14px; }
.whatsapp-vendors { display: grid; gap: 8px; margin-top: 12px; }
.vendor-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  padding: 11px 12px;
  color: #22191d;
  background: #fff;
  text-decoration: none;
  font-weight: 800;
}
.vendor-link span { color: #16a34a; font-weight: 900; }
@media (max-width: 760px) {
  .side-access { top: auto; bottom: 16px; }
  .side-access-left { left: 10px; }
  .side-access-right { right: 10px; }
  .side-tab { min-height: auto; writing-mode: horizontal-tb; border-radius: 999px; padding: 10px 12px; }
  .floating-panel { width: calc(100vw - 24px); bottom: 70px; left: 12px !important; right: 12px !important; }
  .mini-form-grid { grid-template-columns: 1fr; }
}

/* v19: accesos rápidos en esquinas inferiores */
.side-access {
  top: auto !important;
  bottom: 22px !important;
  z-index: 85;
}
.side-access-left { left: 22px !important; }
.side-access-right { right: 22px !important; }
.side-tab {
  min-height: auto !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  border-radius: 999px !important;
  padding: 12px 16px !important;
  box-shadow: 0 10px 22px rgba(44, 8, 17, .18) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  white-space: nowrap;
}
.side-tab-left,
.side-tab-right { border-radius: 999px !important; }
.floating-panel {
  bottom: 86px !important;
  width: min(390px, calc(100vw - 44px));
  max-height: min(680px, calc(100vh - 120px));
}
.floating-left { left: 22px !important; right: auto !important; }
.floating-right { right: 22px !important; left: auto !important; }
@media (max-width: 760px) {
  .side-access { bottom: 14px !important; }
  .side-access-left { left: 10px !important; }
  .side-access-right { right: 10px !important; }
  .side-tab { padding: 10px 12px !important; font-size: 13px; }
  .floating-panel {
    width: calc(100vw - 24px) !important;
    bottom: 72px !important;
    left: 12px !important;
    right: 12px !important;
    max-height: calc(100vh - 96px);
  }
}


/* v20 override: botón de disponibilidad visible con color sólido */
.status-pill.disponible,
.product-card .status-pill.disponible,
.public-detail-status .status-pill.disponible {
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #ffffff !important;
}

.status-pill.agotado,
.product-card .status-pill.agotado,
.public-detail-status .status-pill.agotado {
  background: #d92d20 !important;
  border-color: #d92d20 !important;
  color: #ffffff !important;
}

.status-pill {
  min-width: 108px;
  box-shadow: none !important;
}


/* v21 override: texto de estado al mismo tamaño visual que Añadir */
.status-pill,
.product-card .status-pill,
.public-detail-status .status-pill {
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}


/* v22: catálogo desbloqueable y categorías al costado */
.catalog-layout.catalog-locked { display: none !important; }
.catalog-layout.catalog-open { display: grid !important; }
.side-category-block { margin: 16px 0 18px; }
.side-category-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.category-side-list {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 0 2px 4px 0;
}
.category-side-list .chip {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border-radius: 12px;
  padding: 10px 12px;
}
.category-side-list .chip.active { justify-content: center; }

/* v22: carrusel publicitario */
.ad-carousel-section {
  width: min(1180px, calc(100% - 48px));
  margin: 24px auto;
  background: #ffffff;
  border: 1px solid #e3e3e3;
  border-radius: 18px;
  padding: 22px;
}
.ad-carousel-head { display: flex; justify-content: space-between; align-items: stretch; gap: 24px; margin-bottom: 18px; }
.ad-carousel-copy { flex: 1 1 620px; min-width: 0; }
.ad-carousel-brand {
  flex: 0 0 clamp(240px, 28vw, 380px);
  min-height: 156px;
  display: grid;
  place-items: center;
  padding: 4px 8px;
  position: relative;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
}
.ad-carousel-brand::after {
  content: none;
}
.ad-carousel-brand-logo {
  position: relative;
  z-index: 1;
  width: min(100%, 330px);
  max-height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 14px 26px rgba(176,18,51,.18)) drop-shadow(0 4px 10px rgba(0,0,0,.08));
}
.ad-carousel-head h2 { margin: 12px 0 8px; font-size: clamp(28px, 3vw, 40px); line-height: 1.05; }
.ad-carousel-head p { margin: 0; color: var(--muted); line-height: 1.6; max-width: 760px; }
.ad-carousel-shell { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 12px; align-items: stretch; }
.ad-carousel-track { min-height: 245px; overflow: hidden; border-radius: 18px; }
.ad-slide {
  min-height: 245px;
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .65fr);
  gap: 14px;
  align-items: center;
  padding: 26px;
  border: 1px solid #e8e8e8;
  border-radius: 18px;
  background: radial-gradient(circle at top right, rgba(214,27,60,.08), transparent 36%), linear-gradient(135deg, #ffffff, #fff7f8);
}
.ad-slide.active { display: grid; }
.ad-slide-text small {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #a90d2f;
  background: #fff0f3;
  border: 1px solid rgba(169,13,47,.14);
  font-weight: 900;
}
.ad-slide-text h3 { margin: 0 0 10px; font-size: clamp(26px, 3vw, 42px); line-height: 1.05; }
.ad-slide-text p { margin: 0; color: var(--muted); line-height: 1.65; max-width: 650px; }
.ad-slide-media { min-height: 180px; display: grid; place-items: center; border-radius: 18px; background: #ffffff; border: 1px solid #ececec; overflow: hidden; }
.ad-slide-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .22s ease, object-position .22s ease; will-change: transform; }
.ad-placeholder-icon { font-size: 64px; }
.ad-nav-btn { border: 1px solid #e3e3e3; background: #ffffff; border-radius: 16px; color: #7a1028; font-size: 32px; font-weight: 900; }
.ad-carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.ad-dot { width: 9px; height: 9px; border-radius: 999px; border: 0; background: #d9c9cf; }
.ad-dot.active { width: 28px; background: #b01233; }
.ad-root-panel { margin-top: 20px; padding: 18px; border: 1px dashed rgba(208,2,27,.32); border-radius: 18px; background: #ffffff; }
.ad-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 14px; }
.ad-editor-grid label span { display: block; margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 900; }
.ad-admin-item { display:flex; align-items:center; justify-content:space-between; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background:#fff; }
.ad-admin-item strong { display:block; }
.ad-admin-item small { color: var(--muted); }
.ad-remove-btn { border:1px solid rgba(208,2,27,.25); background:#fff; color:var(--red); border-radius:999px; padding:8px 12px; font-weight:900; }
@media (max-width: 760px) {
  .ad-carousel-section { width: calc(100% - 24px); padding: 16px; }
  .ad-carousel-head { flex-direction: column; }
  .ad-carousel-brand {
    width: 100%;
    min-height: 108px;
    flex-basis: auto;
    padding: 0;
  }
  .ad-carousel-brand-logo {
    width: min(100%, 260px);
    max-height: 96px;
  }
  .ad-carousel-shell { grid-template-columns: 1fr; }
  .ad-nav-btn { display:none; }
  .ad-slide { grid-template-columns: 1fr; padding: 18px; }
  .ad-editor-grid { grid-template-columns: 1fr; }
}


/* v30: borrador de factura / cotización basado en formato Sonimax */
.invoice-draft-trigger {
  margin-top: 10px;
}
.invoice-modal-card {
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
}
.invoice-actions-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}
.invoice-sheet {
  background: #fff;
  color: #111;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 22px 24px;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: 0 12px 34px rgba(0,0,0,.08);
}
.invoice-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.invoice-logo-box {
  grid-column: 2;
  text-align: center;
}
.invoice-logo-box img {
  height: 74px;
  max-width: 310px;
  object-fit: contain;
}
.invoice-company-text {
  grid-column: 3;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}
.invoice-draft-title {
  margin: 4px 0 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #7a1028;
}
.invoice-client-box {
  display: grid;
  grid-template-columns: 1.5fr .8fr;
  gap: 16px;
  border: 2px solid #222;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 800;
}
.invoice-client-lines,
.invoice-meta-lines {
  display: grid;
  gap: 6px;
}
.invoice-client-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: baseline;
}
.invoice-blank {
  border-bottom: 1px solid #222;
  min-height: 18px;
  display: inline-block;
}
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.invoice-table thead th {
  background: #b9b9b9;
  border-top: 2px solid #222;
  border-bottom: 2px solid #222;
  padding: 6px 6px;
  text-align: left;
  font-size: 13px;
  letter-spacing: .03em;
}
.invoice-table tbody td {
  padding: 7px 6px;
  vertical-align: top;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.invoice-table .num,
.invoice-table .money {
  text-align: right;
  white-space: nowrap;
}
.invoice-wholesale-mark {
  font-weight: 900;
  text-align: center;
  width: 44px;
}
.invoice-desc-main {
  font-weight: 800;
}
.invoice-note {
  margin: 18px 0 80px;
  font-size: 12px;
  line-height: 1.5;
  color: #333;
  border-left: 4px solid #b9b9b9;
  padding-left: 10px;
}
.invoice-total-box {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 36px;
  border: 2px solid #222;
  border-radius: 10px;
  padding: 16px 26px;
  font-size: 22px;
  font-weight: 900;
}
.invoice-watermark {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #fff2f4;
  color: #9f1239;
  border: 1px solid rgba(159,18,57,.2);
}
@media print {
  /* El ocultamiento se limita al documento principal. Las hojas aisladas del
     vendedor usan .vendor-print-page y nunca deben quedar invisibles. */
  body:not(.vendor-print-page) * { visibility: hidden !important; }
  body:not(.vendor-print-page) #invoiceModal,
  body:not(.vendor-print-page) #invoiceModal * { visibility: visible !important; }
  body:not(.vendor-print-page) #invoiceModal { position: absolute !important; inset: 0 !important; background: #fff !important; }
  body:not(.vendor-print-page) .invoice-modal-card { box-shadow: none !important; border: 0 !important; width: 100% !important; max-height: none !important; padding: 0 !important; }
  .no-print, .close-modal { display: none !important; }
  body:not(.vendor-print-page) .invoice-sheet { border: 0 !important; box-shadow: none !important; padding: 16mm 12mm !important; }
}
@media (max-width: 720px) {
  .invoice-client-box { grid-template-columns: 1fr; }
  .invoice-top { grid-template-columns: 1fr; }
  .invoice-logo-box, .invoice-company-text { grid-column: auto; text-align: center; }
  .invoice-table { font-size: 11px; }
  .invoice-table thead th { font-size: 11px; padding: 5px 4px; }
  .invoice-table tbody td { padding: 6px 4px; }
}


/* ===== v32 cotización visual mejorada ===== */
.invoice-page {
  background: linear-gradient(180deg, #f3f4f6 0%, #ececec 100%);
  padding: 28px;
  font-family: Arial, Helvetica, sans-serif;
}
.invoice-sheet--enhanced {
  max-width: 980px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-top: 8px solid #b90e2e;
  border-radius: 18px;
  padding: 28px 30px 26px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .10);
}
.invoice-header-enhanced {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}
.invoice-brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.invoice-logo-box--enhanced {
  min-width: 200px;
}
.invoice-logo-box--enhanced img {
  height: 84px;
  max-width: 220px;
  object-fit: contain;
}
.invoice-brand-copy h1 {
  margin: 0 0 8px;
  font-size: 29px;
  line-height: 1;
  letter-spacing: .03em;
  color: #a20f2a;
}
.invoice-brand-copy p {
  margin: 2px 0;
  font-size: 13px;
  color: #334155;
  font-weight: 700;
  letter-spacing: .02em;
}
.invoice-quote-badge {
  min-width: 230px;
  border: 2px solid #b90e2e;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff7f8 0%, #fff 100%);
  padding: 14px 18px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(185, 14, 46, .08);
}
.invoice-quote-badge span {
  display: block;
  font-size: 11px;
  letter-spacing: .16em;
  font-weight: 800;
  color: #7f1d1d;
  margin-bottom: 6px;
}
.invoice-quote-badge strong {
  display: block;
  font-size: 28px;
  letter-spacing: .08em;
  color: #b90e2e;
}
.invoice-client-box--enhanced {
  position: relative;
  border: 1px solid #dbe1e8;
  border-radius: 16px;
  background: #fcfcfd;
  padding: 20px 18px 18px;
  margin-bottom: 18px;
}
.invoice-section-title {
  position: absolute;
  top: -13px;
  left: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #b90e2e;
  color: white;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 900;
}
.invoice-client-grid {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) minmax(240px,.8fr);
  gap: 18px;
}
.invoice-client-lines, .invoice-meta-card {
  display: grid;
  gap: 8px;
}
.invoice-client-line {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 8px;
  font-size: 13px;
}
.invoice-client-line span:first-child {
  font-weight: 800;
  color: #111827;
}
.invoice-blank {
  min-height: 20px;
  border-bottom: 1.5px dashed #9ca3af;
}
.invoice-meta-card {
  border: 1px solid #ead1d7;
  background: #fff7f8;
  border-radius: 14px;
  padding: 14px 14px;
  align-content: start;
}
.invoice-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(185, 14, 46, .12);
}
.invoice-meta-row:last-child { border-bottom: 0; }
.invoice-meta-row span {
  color: #7f1d1d;
  font-weight: 900;
  letter-spacing: .04em;
}
.invoice-meta-row strong {
  color: #111827;
  font-size: 14px;
}
.invoice-table--enhanced {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  font-size: 13px;
}
.invoice-table--enhanced thead th {
  background: linear-gradient(180deg, #b90e2e 0%, #980d25 100%);
  color: #fff;
  padding: 11px 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  border: 0;
}
.invoice-table--enhanced thead th:first-child { border-top-left-radius: 16px; }
.invoice-table--enhanced thead th:last-child { border-top-right-radius: 16px; }
.invoice-table--enhanced tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid #edf1f5;
  color: #111827;
}
.invoice-table--enhanced tbody tr:nth-child(even) td {
  background: #fafafa;
}
.invoice-table--enhanced .num,
.invoice-table--enhanced .money {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.invoice-table--enhanced .invoice-wholesale-mark {
  text-align: center;
  font-weight: 900;
  color: #7f1d1d;
}
.invoice-table--enhanced .invoice-desc-main {
  font-weight: 800;
}
.invoice-footer-meta {
  display: grid;
  grid-template-columns: minmax(0,1fr) 280px;
  gap: 18px;
  align-items: end;
  margin-top: 18px;
}
.invoice-note--enhanced {
  margin: 0;
  padding: 14px 16px;
  border-left: 4px solid #b90e2e;
  background: #fff8f8;
  border-radius: 12px;
  color: #374151;
  font-size: 12.5px;
  line-height: 1.55;
}
.invoice-total-box--enhanced {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  border: 2px solid #111827;
  border-radius: 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.invoice-total-box--enhanced span {
  font-size: 12px;
  letter-spacing: .14em;
  font-weight: 900;
  color: #6b7280;
}
.invoice-total-box--enhanced strong {
  font-size: 30px;
  color: #111827;
  line-height: 1;
}
@media (max-width: 820px) {
  .invoice-header-enhanced { flex-direction: column; }
  .invoice-quote-badge { width: 100%; }
  .invoice-client-grid, .invoice-footer-meta { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .invoice-page { padding: 12px; }
  .invoice-sheet--enhanced { padding: 18px 14px; border-radius: 12px; }
  .invoice-brand-block { flex-direction: column; align-items: flex-start; }
  .invoice-brand-copy h1 { font-size: 24px; }
  .invoice-table--enhanced { font-size: 11px; }
  .invoice-table--enhanced thead th, .invoice-table--enhanced tbody td { padding: 8px 6px; }
  .invoice-total-box--enhanced strong { font-size: 24px; }
}


/* ===== v33 cotización estilo factura real ===== */
.invoice-page-v33 {
  background: #eef0f3;
  padding: 24px;
}
.invoice-sheet--real {
  max-width: 1020px;
  margin: 0 auto;
  background: #fff;
  border: 1.6px solid #4b5563;
  border-radius: 0;
  padding: 24px 28px 26px;
  box-shadow: 0 14px 32px rgba(15,23,42,.08);
}
.invoice-real-header {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}
.invoice-real-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}
.invoice-real-logo {
  max-width: 230px;
  max-height: 90px;
  object-fit: contain;
}
.invoice-real-company {
  text-align: left;
}
.invoice-real-company h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #b90e2e;
  letter-spacing: .03em;
  line-height: 1.05;
}
.invoice-real-company p {
  margin: 2px 0;
  font-size: 13px;
  color: #1f2937;
  font-weight: 700;
}
.invoice-real-docbox {
  border: 1.6px solid #6b7280;
  padding: 10px 12px;
  min-height: 108px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: #fafafa;
}
.invoice-real-doclabel {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #111827;
  padding-bottom: 6px;
  border-bottom: 2px solid #9ca3af;
}
.invoice-real-docmeta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #111827;
}
.invoice-real-docmeta span {
  font-weight: 800;
}
.invoice-real-docmeta strong {
  font-weight: 800;
}
.invoice-real-clientbox {
  border: 1.6px solid #6b7280;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.invoice-real-clientgrid {
  display: grid;
  grid-template-columns: 1.6fr .7fr .7fr;
  gap: 10px 14px;
}
.invoice-real-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  min-height: 24px;
}
.invoice-real-line--wide {
  grid-column: 1 / span 2;
}
.invoice-real-line label {
  font-size: 12px;
  color: #111827;
  font-weight: 900;
  letter-spacing: .03em;
}
.invoice-real-line span {
  display: block;
  min-height: 19px;
  border-bottom: 1px solid #6b7280;
  font-size: 12.5px;
  color: #374151;
  font-weight: 700;
}
.invoice-real-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}
.invoice-real-table thead th {
  border: 1.3px solid #4b5563;
  background: #d1d5db;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 8px;
  text-align: left;
}
.invoice-real-table tbody td {
  border-left: 1px solid #9ca3af;
  border-right: 1px solid #9ca3af;
  padding: 8px 8px;
  color: #111827;
  vertical-align: top;
}
.invoice-real-table tbody tr:last-child td {
  border-bottom: 1px solid #9ca3af;
}
.invoice-real-table .text-right,
.invoice-real-table .col-qty,
.invoice-real-table .col-price,
.invoice-real-table .col-disc,
.invoice-real-table .col-total {
  text-align: right;
}
.invoice-real-table .col-code { width: 120px; }
.invoice-real-table .col-type { width: 70px; text-align: center; }
.invoice-real-table .col-desc { width: auto; }
.invoice-real-table .col-qty { width: 80px; }
.invoice-real-table .col-price,
.invoice-real-table .col-disc,
.invoice-real-table .col-total { width: 100px; }
.invoice-real-table .type-cell {
  text-align: center;
  font-weight: 900;
  color: #111827;
}
.invoice-real-summary {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
  align-items: end;
}
.invoice-real-notes {
  min-height: 112px;
  border: 1.4px solid #6b7280;
  padding: 10px 12px;
}
.invoice-real-note-title {
  font-size: 12px;
  font-weight: 900;
  color: #111827;
  margin-bottom: 8px;
}
.invoice-real-notes p {
  margin: 0 0 8px;
  font-size: 12.3px;
  line-height: 1.45;
  color: #374151;
}
.invoice-real-totalwrap {
  display: flex;
  justify-content: flex-end;
}
.invoice-real-totalbox {
  width: 100%;
  border: 2px solid #4b5563;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 12px 16px;
  background: #fff;
}
.invoice-real-totalbox span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #111827;
}
.invoice-real-totalbox strong {
  font-size: 34px;
  line-height: 1;
  color: #111827;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .invoice-real-header, .invoice-real-summary, .invoice-real-clientgrid {
    grid-template-columns: 1fr;
  }
  .invoice-real-line--wide { grid-column: auto; }
}


/* ===== v34 formato final de presupuesto Sonimax ===== */
.invoice-page-budget {
  background: #f4f4f4;
  padding: 24px;
}
.budget-sheet {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border: 1.5px solid #b7b7b7;
  border-radius: 12px;
  padding: 24px 24px 18px;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.budget-header {
  display: grid;
  grid-template-columns: minmax(390px, 48%) minmax(0, 52%);
  align-items: center;
  gap: 18px;
  min-height: 170px;
  padding: 10px 14px 6px;
}
.budget-logo-wrap {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 158px;
  padding: 8px 20px 8px 18px;
}
.budget-logo {
  width: min(100%, 430px);
  max-width: 100%;
  max-height: 150px;
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.08));
}
.budget-company {
  min-height: 158px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
  padding: 2px 4px 2px 0;
}
.budget-company h1 {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: .02em;
}
.budget-company p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
}
.budget-invoice-no {
  margin: 0;
  font-size: 19px !important;
  font-weight: 700 !important;
}
.budget-invoice-no strong {
  font-size: 20px;
  letter-spacing: .05em;
}
.budget-title {
  border: 2px solid #111;
  border-radius: 9px;
  margin: 10px 0 20px;
  padding: 12px 10px;
  text-align: center;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .03em;
}
.budget-info-box {
  display: grid;
  grid-template-columns: 58% 42%;
  gap: 20px;
  border: 2px solid #111;
  border-radius: 10px;
  padding: 23px 18px 18px;
  margin-bottom: 22px;
}
.budget-client-info,
.budget-meta-info {
  display: grid;
  gap: 16px;
}
.budget-meta-info {
  align-content: start;
  padding-top: 10px;
}
.budget-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 12px;
  min-height: 26px;
}
.budget-field span {
  font-size: 18px;
  font-weight: 900;
}
.budget-field i {
  display: block;
  min-height: 22px;
  border-bottom: 1.6px solid #111;
}
.budget-field strong {
  font-size: 16px;
  font-style: normal;
  letter-spacing: .08em;
  white-space: nowrap;
}
.budget-address {
  grid-template-columns: auto 1fr;
}
.budget-address i:last-child {
  grid-column: 2;
}
.budget-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 2px solid #111;
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}
.budget-table th,
.budget-table td {
  border-right: 1.4px solid #606060;
  border-bottom: 1.4px solid #8b8b8b;
}
.budget-table th:last-child,
.budget-table td:last-child {
  border-right: 0;
}
.budget-table thead th {
  background: #efefef;
  padding: 11px 8px;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  font-weight: 900;
}
.budget-table tbody td {
  height: 41px;
  padding: 6px 8px;
  vertical-align: middle;
}
.budget-table tbody tr:last-child td {
  border-bottom: 0;
}
.budget-table th:nth-child(1),
.budget-table td:nth-child(1) {
  width: 14%;
}
.budget-table th:nth-child(2),
.budget-table td:nth-child(2) {
  width: 49%;
}
.budget-table th:nth-child(3),
.budget-table td:nth-child(3) {
  width: 12%;
}
.budget-table th:nth-child(4),
.budget-table td:nth-child(4) {
  width: 13%;
}
.budget-table th:nth-child(5),
.budget-table td:nth-child(5) {
  width: 12%;
}
.budget-table .num,
.budget-table .money {
  text-align: right;
  white-space: nowrap;
}
.budget-table .budget-desc-main {
  font-weight: 800;
}
.budget-table .budget-desc-mark {
  display: inline-block;
  min-width: 28px;
  font-weight: 900;
  margin-right: 6px;
}
.budget-empty {
  text-align: center !important;
  font-weight: 700;
  color: #666;
}
.budget-note {
  margin: 24px 0 28px;
  border: 2px solid #111;
  border-radius: 9px;
  padding: 17px 22px;
  font-size: 16px;
  line-height: 1.7;
}
.budget-note strong {
  font-weight: 900;
}
.budget-total-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 42px;
  border: 2px solid #111;
  border-radius: 9px;
  padding: 14px 24px;
  min-height: 54px;
  font-size: 31px;
  line-height: 1;
  font-weight: 900;
}
.budget-total-box span,
.budget-total-box strong {
  font-weight: 900;
}
.budget-footer {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
}
@media (max-width: 720px) {
  .budget-sheet {
    padding: 16px 12px;
  }
  .budget-header,
  .budget-info-box {
    grid-template-columns: 1fr;
  }
  .budget-company {
    text-align: center;
  }
  .budget-title {
    font-size: 28px;
  }
  .budget-field span {
    font-size: 14px;
  }
  .budget-table {
    font-size: 11px;
  }
  .budget-table thead th {
    font-size: 11px;
    padding: 8px 5px;
  }
  .budget-table tbody td {
    height: 34px;
    padding: 5px;
  }
  .budget-note {
    font-size: 13px;
  }
  .budget-total-box {
    font-size: 24px;
  }
}
@media print {
  .invoice-sheet.budget-sheet {
    border: 1.5px solid #b7b7b7 !important;
    box-shadow: none !important;
    padding: 12mm 10mm !important;
  }
}


/* ===== v36 footer: botones rojos y logos reforzados ===== */
.agency-logo-tealca{
  height:56px;
  max-width:200px;
}
.footer-quick-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 14px;
  border-radius:16px;
  border:1px solid rgba(118,15,36,.10);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 22px rgba(208,2,27,.18);
}
.footer-quick-link:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(118,15,36,.24);
  border-color: rgba(255,255,255,.22);
}
.footer-link-logo{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  flex:1 1 auto;
  background:#ffffff;
  border-radius:12px;
  padding:8px 12px;
  box-shadow: inset 0 0 0 1px rgba(118,15,36,.08);
}
.social-wordmark{
  display:block;
  width:148px;
  max-width:100%;
  height:40px;
  object-fit:contain;
}
.social-wordmark-ml{
  width:158px;
  height:44px;
}
.footer-link-meta{
  color:#ffffff;
  font-weight:900;
  font-size:.9rem;
  opacity:1;
  text-align:right;
  white-space:nowrap;
}
.footer-sales-left{
  margin-top:1.25rem;
  line-height:1.45;
}
.footer-bottom-note{
  padding-top:.35rem;
}
.footer-service-note{
  margin-top:.15rem;
}
@media (max-width: 720px){
  .agency-logo-tealca{height:50px;max-width:176px;}
  .footer-quick-link{padding:10px 12px; gap:10px;}
  .footer-link-logo{padding:7px 10px;}
  .social-wordmark{width:132px;height:36px;}
  .social-wordmark-ml{width:142px;height:38px;}
  .footer-link-meta{font-size:.84rem;}
}

/* ===== v37 cashea + footer refinado ===== */
.footer-cashea-box{
  width:100%;
  max-width:340px;
  padding:14px 16px;
  border-radius:18px;
  background: linear-gradient(135deg, rgba(208,2,27,.08), rgba(118,15,36,.12));
  border:1px solid rgba(208,2,27,.18);
  box-shadow:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin-bottom:6px;
}
.footer-cashea-text{
  color:#8f0f28;
  font-size:1rem;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.agency-logo-tealca{
  height:120px;
  max-width:360px;
}
.footer-quick-links{
  gap:12px;
}
.footer-quick-link{
  background: linear-gradient(135deg, #d0021b 0%, #8f0f28 100%);
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;
  padding:14px 16px;
  min-height:72px;
}
.footer-link-logo{
  background:transparent;
  box-shadow:none;
  padding:0;
  flex:0 1 150px;
  justify-content:flex-start;
}
.social-wordmark{
  width:164px;
  max-width:100%;
  height:46px;
}
.social-wordmark-ml{
  width:174px;
  height:48px;
}
.footer-link-meta{
  color:#ffffff;
  font-size:.95rem;
  font-weight:900;
  letter-spacing:.01em;
}
@media (max-width: 720px){
  .agency-logo-tealca{
    height:100px;
    max-width:320px;
  }
  .footer-quick-link{
    padding:12px 14px;
    min-height:68px;
  }
  .footer-link-logo{
    flex-basis:136px;
  }
  .social-wordmark{
    width:148px;
    height:42px;
  }
  .social-wordmark-ml{
    width:156px;
    height:44px;
  }
}


/* ===== v40 tealca + redes + cashea refinado ===== */
.footer-cashea-box{
  max-width: 360px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(208,2,27,.06), rgba(118,15,36,.12));
  border: 1px solid rgba(208,2,27,.18);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.footer-cashea-copy{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
}
.footer-cashea-logo{
  width:150px;
  height:auto;
  max-width:48%;
  object-fit:contain;
  flex:0 0 auto;
}
.footer-cashea-box .footer-column-title,
.footer-cashea-box .footer-cashea-text{
  text-align:left;
}
.agency-logos .agency-logo-tealca,
.footer .agency-logos .agency-logo-tealca{
  height:64px !important;
  max-width:220px !important;
}
.footer-quick-link{
  background: linear-gradient(135deg, #d0021b 0%, #8f0f28 100%) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 10px 22px rgba(143,15,40,.18);
  gap: 12px;
}
.footer-link-main{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  flex:1 1 auto;
}
.footer-link-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.footer-link-logo{
  background: transparent !important;
  box-shadow: none !important;
}
.social-icon{
  width:32px;
  height:32px;
  object-fit:contain;
  display:block;
}
.social-icon-ml{
  width:38px;
  height:38px;
}
.footer-link-name{
  color:#ffffff;
  font-weight:900;
  font-size:1rem;
  letter-spacing:.01em;
  line-height:1;
}
.footer-link-meta{
  color:#ffffff;
  font-weight:800;
  font-size:.94rem;
}
@media (max-width: 760px){
  .agency-logos .agency-logo-tealca,
  .footer .agency-logos .agency-logo-tealca{
    height:60px !important;
    max-width:210px !important;
  }
}
@media (max-width: 720px){
  .footer-cashea-box{
    max-width:100%;
    padding:14px 16px;
    gap:12px;
  }
  .footer-cashea-logo{
    width:132px;
    height:auto;
    max-width:46%;
  }
  .footer-quick-link{
    min-height:70px;
    padding:12px 14px;
  }
  .social-icon{width:30px;height:30px;}
  .social-icon-ml{width:34px;height:34px;}
  .footer-link-name{font-size:.98rem;}
  .footer-link-meta{font-size:.9rem;}
}

/* ===== v43: control integral ROOT ===== */
.root-review-card {
  border: 1px solid rgba(118,15,36,.16);
  background: linear-gradient(180deg, #fff 0%, #fff8f9 100%);
}
.root-card-heading {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.root-card-heading h3 {
  margin:2px 0 0;
  font-size:1.08rem;
}
.root-card-kicker {
  display:block;
  color:var(--red);
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.root-count-badge,
.root-unread-badge {
  min-width:32px;
  height:32px;
  padding:0 9px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,var(--red),var(--red-dark));
  color:#fff;
  font-weight:900;
  font-size:.82rem;
  box-shadow:0 7px 16px rgba(208,2,27,.2);
}
.root-card-copy { margin-bottom:12px !important; }
.root-pending-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.root-pending-btn {
  min-height:66px;
  border:1px solid rgba(118,15,36,.14);
  border-radius:13px;
  background:#fff;
  color:#2a1a1f;
  padding:10px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:space-between;
  text-align:left;
  cursor:pointer;
  transition:.18s ease;
}
.root-pending-btn:hover,
.root-pending-btn.active {
  border-color:var(--red);
  background:var(--red-soft);
  transform:translateY(-1px);
}
.root-pending-btn span { font-size:.78rem; font-weight:800; line-height:1.25; }
.root-pending-btn strong { color:var(--red-dark); font-size:1.18rem; }
.root-pending-all { grid-column:1 / -1; min-height:58px; flex-direction:row; align-items:center; }
.root-clear-pending { margin-top:9px; }
.root-monitor-divider { height:1px; background:rgba(118,15,36,.13); margin:14px 0; }
.root-inbox-open { justify-content:space-between; gap:10px; }
.root-unread-badge { background:#fff; color:var(--red-dark); box-shadow:none; min-width:28px; height:28px; }
.root-monitor-mini-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:10px;
}
.root-monitor-mini-grid > div {
  border:1px solid rgba(118,15,36,.12);
  border-radius:12px;
  background:#fff;
  padding:9px;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.root-monitor-mini-grid span { font-size:.72rem; color:#6a535a; font-weight:700; }
.root-monitor-mini-grid strong { font-size:1.05rem; color:var(--red-dark); }
.root-backup-btn { margin-top:9px; }
.review-badge-sku { background:#fff2cc; color:#7a5000; }
.review-badge-description { background:#fde2e2; color:#8d172b; }
.review-badge-price { background:#e5edff; color:#214d9b; }
.review-badge-image { background:#eee8ff; color:#5e3aa7; }
.detail-review-flags { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.detail-review-flags span {
  padding:6px 9px;
  border-radius:999px;
  background:#fff0f2;
  color:#8f0f28;
  border:1px solid rgba(208,2,27,.13);
  font-size:.76rem;
  font-weight:900;
}

.product-editor-card {
  width:min(920px, calc(100vw - 28px));
  max-height:92vh;
  overflow:auto;
}
.product-editor-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.product-editor-head h2 { margin:3px 0 5px; }
.root-security-pill {
  padding:7px 11px;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(135deg,var(--red),var(--red-dark));
  font-size:.74rem;
  font-weight:900;
  letter-spacing:.09em;
}
.product-editor-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-bottom:18px;
}
.product-editor-grid label,
.price-grid label {
  display:flex;
  flex-direction:column;
  gap:7px;
}
.product-editor-grid label > span,
.price-grid label > span,
.editor-image-preview > span {
  font-size:.8rem;
  font-weight:900;
  color:#4b343b;
}
.editor-wide-field { grid-column:1 / -1; }
.product-editor-textarea { min-height:88px; resize:vertical; }
.editor-file-field small { color:#736168; font-size:.72rem; }
.editor-remove-image { flex-direction:row !important; align-items:center; }
.editor-image-preview { display:flex; flex-direction:column; gap:8px; }
.editor-preview-box {
  min-height:150px;
  border:1px dashed rgba(118,15,36,.28);
  border-radius:15px;
  background:#faf8f9;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  color:#7c6a70;
  font-size:.82rem;
}
.editor-preview-box img { width:100%; max-height:280px; object-fit:contain; background:#fff; }
.editor-section-title {
  margin:6px 0 10px;
  color:#761024;
  font-weight:900;
  font-size:.84rem;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.product-editor-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }

.root-inbox-card {
  width:min(1180px, calc(100vw - 24px));
  height:min(820px, calc(100vh - 30px));
  padding:24px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.root-inbox-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding-right:36px;
  margin-bottom:16px;
}
.root-inbox-header h2 { margin:3px 0 5px; }
.root-inbox-header-stats { display:flex; gap:10px; }
.root-inbox-header-stats > div {
  min-width:92px;
  border:1px solid rgba(118,15,36,.13);
  border-radius:14px;
  background:#fff8f9;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:3px;
  text-align:center;
}
.root-inbox-header-stats span { font-size:.72rem; color:#715d63; font-weight:800; }
.root-inbox-header-stats strong { font-size:1.35rem; color:var(--red-dark); }
.root-inbox-layout {
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns:360px 1fr;
  border:1px solid rgba(118,15,36,.14);
  border-radius:18px;
  overflow:hidden;
  background:#fff;
}
.root-inbox-sidebar {
  min-height:0;
  display:flex;
  flex-direction:column;
  border-right:1px solid rgba(118,15,36,.12);
  background:#fffafb;
}
.root-inbox-filters {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:14px;
  border-bottom:1px solid rgba(118,15,36,.1);
}
.root-inbox-filters button {
  border:1px solid rgba(118,15,36,.14);
  background:#fff;
  color:#6d2635;
  border-radius:999px;
  padding:7px 10px;
  font-size:.73rem;
  font-weight:900;
  cursor:pointer;
}
.root-inbox-filters button.active { background:var(--red); border-color:var(--red); color:#fff; }
.root-inbox-list { flex:1; min-height:0; overflow:auto; padding:8px; }
.root-inbox-thread {
  width:100%;
  border:1px solid transparent;
  border-radius:14px;
  background:transparent;
  padding:11px;
  margin-bottom:5px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  text-align:left;
  color:#2c2024;
  cursor:pointer;
}
.root-inbox-thread:hover,
.root-inbox-thread.active { background:#fff; border-color:rgba(118,15,36,.13); box-shadow:0 7px 18px rgba(118,15,36,.06); }
.root-inbox-thread.unread { border-left:4px solid var(--red); }
.root-thread-top { width:100%; display:flex; justify-content:space-between; gap:8px; align-items:center; }
.root-thread-top b { font-size:.85rem; }
.root-thread-top small { font-size:.65rem; color:#8b767c; }
.root-thread-type {
  display:inline-flex;
  padding:4px 7px;
  border-radius:999px;
  background:#eee;
  font-size:.65rem;
  font-weight:900;
}
.type-reclamo { background:#ffe0e4; color:#94142e; }
.type-precio { background:#e3edff; color:#2753a0; }
.type-chat { background:#def7e8; color:#187444; }
.type-consulta { background:#fff0cf; color:#8b5a00; }
.type-sugerencia { background:#eee5ff; color:#6840a2; }
.root-inbox-thread > strong { font-size:.82rem; }
.root-thread-preview { max-width:100%; font-size:.75rem; color:#755f66; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.root-inbox-list-empty { padding:22px; text-align:center; color:#806b71; font-size:.82rem; }
.root-inbox-conversation { min-width:0; min-height:0; display:flex; flex-direction:column; background:#fff; }
.root-inbox-empty { margin:auto; max-width:340px; text-align:center; color:#75636a; }
.root-inbox-empty > span { display:block; font-size:2.5rem; margin-bottom:8px; }
.root-inbox-empty h3 { margin:0 0 7px; color:#2b1c21; }
.root-conversation-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:18px 20px;
  border-bottom:1px solid rgba(118,15,36,.1);
}
.root-conversation-head h3 { margin:6px 0 3px; }
.root-conversation-head p { margin:0; color:#775f67; font-size:.78rem; }
.root-status-pill {
  padding:7px 10px;
  border-radius:999px;
  font-size:.68rem;
  font-weight:900;
  white-space:nowrap;
}
.status-nuevo { background:#ffe0e4; color:#94142e; }
.status-en_proceso { background:#fff0cf; color:#815400; }
.status-resuelto { background:#def7e8; color:#177344; }
.root-conversation-messages {
  flex:1;
  min-height:0;
  overflow:auto;
  padding:20px;
  background:linear-gradient(180deg,#fff,#fffafb);
}
.root-message-row { display:flex; margin-bottom:12px; }
.root-message-row.client { justify-content:flex-start; }
.root-message-row.root { justify-content:flex-end; }
.root-message-row.system { justify-content:center; }
.root-message-bubble {
  max-width:min(74%,620px);
  padding:11px 13px;
  border-radius:16px;
  background:#f1ecee;
  color:#2e2226;
}
.root-message-row.root .root-message-bubble { background:linear-gradient(135deg,var(--red),var(--red-dark)); color:#fff; border-bottom-right-radius:5px; }
.root-message-row.client .root-message-bubble { border-bottom-left-radius:5px; }
.root-message-row.system .root-message-bubble { background:#f4f1e8; color:#675d43; text-align:center; }
.root-message-bubble p { margin:0 0 5px; white-space:pre-wrap; line-height:1.45; }
.root-message-bubble small { font-size:.64rem; opacity:.75; }
.root-reply-box { padding:14px 16px; border-top:1px solid rgba(118,15,36,.1); }
.root-reply-box textarea { min-height:68px; resize:vertical; }
.root-reply-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }

@media (max-width: 900px) {
  .root-inbox-layout { grid-template-columns:300px 1fr; }
  .product-editor-grid { grid-template-columns:1fr; }
  .editor-wide-field { grid-column:auto; }
}
@media (max-width: 720px) {
  .root-pending-grid { grid-template-columns:1fr; }
  .root-pending-all { grid-column:auto; }
  .product-editor-actions { grid-template-columns:1fr; }
  .root-inbox-card { height:94vh; padding:15px; }
  .root-inbox-header { flex-direction:column; padding-right:28px; }
  .root-inbox-header-stats { width:100%; }
  .root-inbox-header-stats > div { flex:1; }
  .root-inbox-layout { grid-template-columns:1fr; }
  .root-inbox-sidebar { max-height:42%; border-right:0; border-bottom:1px solid rgba(118,15,36,.12); }
  .root-message-bubble { max-width:88%; }
  .root-reply-actions { flex-direction:column; }
}


/* ===== v44 gestor ROOT de novedades ===== */
.ad-manager-heading { margin-bottom: 16px; }
.ad-heading-copy { display:flex; flex-direction:column; gap:4px; min-width:0; }
.ad-panel-toggle { flex:0 0 auto; min-width: 146px; }
.ad-panel-toggle.is-collapsed { background: #fdf0f3; color: var(--red); border-color: rgba(208,2,27,.18); }
.ad-root-panel-body.hidden { display:none; }
.ad-manager-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
  gap: 18px;
  align-items: start;
}
.ad-editor-column {
  min-width: 0;
}
.ad-field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.ad-file-field input[type="file"] {
  min-height: 46px;
  padding: 9px 11px;
  background: #fff;
}
.ad-publish-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 14px 0 4px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fffafb;
}
.ad-check-row {
  margin: 0;
  font-size: 13px;
}
.ad-manager-actions {
  margin-top: 15px;
  flex-wrap: wrap;
}
.ad-preview-card {
  position: sticky;
  top: 92px;
  padding: 14px;
  border: 1px solid rgba(118,15,36,.14);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fff7f8 100%);
  box-shadow: 0 12px 30px rgba(118,15,36,.07);
}
.ad-preview-label {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #8f0f28;
  background: #fdebed;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}
.ad-editor-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(110px, .85fr);
  gap: 12px;
  min-height: 210px;
  padding: 15px;
  border: 1px solid #eadde0;
  border-radius: 16px;
  background: #fff;
}
.ad-editor-preview-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.ad-editor-preview-copy small {
  align-self: flex-start;
  padding: 5px 8px;
  border-radius: 999px;
  color: #a10e29;
  background: #fdebed;
  font-weight: 900;
  font-size: 10px;
}
.ad-editor-preview-copy h3 {
  margin: 10px 0 7px;
  font-size: 21px;
  line-height: 1.08;
}
.ad-editor-preview-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.ad-editor-preview-copy a {
  align-self: flex-start;
  margin-top: 11px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}
.ad-editor-preview-media {
  min-height: 145px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #ececec;
  border-radius: 14px;
  background: #fafafa;
}
.ad-editor-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .22s ease, object-position .22s ease;
  will-change: transform;
}
.ad-editor-preview-media span {
  font-size: 42px;
}
.ad-library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 22px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.ad-library-header strong,
.ad-library-header small {
  display: block;
}
.ad-library-header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.ad-library-count {
  padding: 7px 10px;
  border-radius: 999px;
  color: #8f0f28;
  background: #fdebed;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.ad-admin-library {
  display: grid;
  gap: 10px;
}
.ad-admin-item-v44 {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.ad-admin-item-v44.is-inactive {
  opacity: .68;
  background: #fafafa;
}
.ad-admin-thumb {
  width: 72px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: #f6f6f6;
  border: 1px solid #ececec;
  font-size: 25px;
}
.ad-admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ad-admin-copy {
  min-width: 0;
}
.ad-admin-copy strong,
.ad-admin-copy small {
  display: block;
}
.ad-admin-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-admin-copy small {
  margin-top: 3px;
  color: var(--muted);
}
.ad-admin-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.ad-status-chip {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ad-status-active { color: #0f6d34; background: #e8f8ee; }
.ad-status-draft { color: #795500; background: #fff4cf; }
.ad-status-featured { color: #8f0f28; background: #fdebed; }
.ad-admin-actions-v44 {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 250px;
}
.ad-mini-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  color: #5e1322;
  background: #fff;
  font-size: 10px;
  font-weight: 900;
}
.ad-mini-btn:hover { transform: translateY(-1px); }
.ad-mini-btn.danger { color: #b42318; border-color: #f1c4bf; }
.ad-slide-text .ad-slide-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 13px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}
@media (max-width: 940px) {
  .ad-manager-layout { grid-template-columns: 1fr; }
  .ad-preview-card { position: static; }
}
@media (max-width: 680px) {
  .ad-admin-item-v44 { grid-template-columns: 58px minmax(0, 1fr); }
  .ad-admin-thumb { width: 58px; height: 52px; }
  .ad-admin-actions-v44 { grid-column: 1 / -1; max-width: none; justify-content: flex-start; }
  .ad-editor-preview { grid-template-columns: 1fr; }
  .ad-library-header { align-items: flex-start; flex-direction: column; }
  .ad-manager-heading { align-items: flex-start; flex-direction: column; }
  .ad-panel-toggle { width: 100%; min-width: 0; }
}

/* v45 - administración ampliada */
.admin-hidden-badge{position:absolute;top:48px;left:12px;z-index:3;background:#7a1d1d;color:#fff;padding:5px 9px;border-radius:999px;font-size:.72rem;font-weight:800;letter-spacing:.04em}
.product-card:has(.admin-hidden-badge){outline:2px dashed rgba(122,29,29,.45);opacity:.78}
.product-visibility-control{margin:14px 0;padding:12px;border:1px solid #d8dde6;border-radius:12px;background:#f8fafc}
.ad-slide-media video,.ad-editor-preview-media video,.ad-admin-thumb video{width:100%;height:100%;object-fit:cover;border-radius:inherit;background:#111}
.ad-admin-thumb video{pointer-events:none}


/* Mercantil Sonimax v46 — bandeja de productos ocultos */
#showHiddenProducts{display:inline-flex;align-items:center;gap:7px}
#showHiddenProducts span{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:rgba(122,29,29,.12);font-size:.78rem;font-weight:900}
#showHiddenProducts.active-hidden-view{background:#7a1d1d;color:#fff;border-color:#7a1d1d}
#showHiddenProducts.active-hidden-view span{background:rgba(255,255,255,.18)}
.card-actions .product-hide-btn,.card-actions .product-restore-btn{grid-column:span 2}
.product-hide-btn{border-color:#9a3131!important;color:#7a1d1d!important}
.product-restore-btn{background:#246b43!important;border-color:#246b43!important}
@media(max-width:680px){.card-actions .product-hide-btn,.card-actions .product-restore-btn{grid-column:auto}}

/* v47: centro independiente para vendedor */
.vendor-dashboard-card{width:min(1180px,96vw);max-width:none;padding:0;overflow:hidden}.vendor-dashboard-head{display:flex;justify-content:space-between;gap:24px;padding:24px 28px;border-bottom:1px solid #e8e8e8}.vendor-dashboard-head h2{margin:4px 0}.vendor-connection-box{display:flex;align-items:center;gap:10px;min-width:260px;padding:12px 14px;border:1px solid #e3e3e3;border-radius:14px;background:#fafafa}.vendor-connection-box div{display:grid;gap:2px}.vendor-connection-box small{color:#666}.vendor-connection-dot{width:12px;height:12px;border-radius:50%;background:#d79b21;box-shadow:0 0 0 4px rgba(215,155,33,.15)}.vendor-connection-dot[data-provider="firebase"],.vendor-connection-dot[data-provider="supabase"]{background:#239b56}.vendor-tabs{display:flex;gap:8px;padding:14px 20px;border-bottom:1px solid #eee;background:#fff}.vendor-tabs button{border:0;background:#f1f1f1;border-radius:999px;padding:10px 16px;font-weight:700;cursor:pointer}.vendor-tabs button.active{background:#b5121b;color:#fff}.vendor-tabs b{display:inline-grid;place-items:center;min-width:22px;height:22px;margin-left:6px;border-radius:50%;background:rgba(255,255,255,.22)}.vendor-workspace{display:grid;grid-template-columns:340px 1fr;min-height:590px;max-height:72vh}.vendor-item-list{border-right:1px solid #e8e8e8;overflow:auto;background:#fafafa}.vendor-list-row{width:100%;display:grid;gap:6px;text-align:left;padding:15px;border:0;border-bottom:1px solid #e7e7e7;background:transparent;cursor:pointer}.vendor-list-row:hover,.vendor-list-row.active{background:#fff}.vendor-list-row.active{box-shadow:inset 4px 0 #b5121b}.vendor-list-top{display:flex;justify-content:space-between;gap:8px}.vendor-list-top small,.vendor-list-row span{color:#666}.vendor-list-row em,.vendor-status{justify-self:start;font-style:normal;text-transform:capitalize;font-size:.76rem;border-radius:999px;padding:4px 8px;background:#ececec}.vendor-status.status-nuevo,.vendor-status.status-pendiente{background:#fff1c8;color:#785400}.vendor-status.status-en_proceso{background:#dceeff;color:#135b91}.vendor-status.status-resuelto,.vendor-status.status-atendida{background:#dff4e6;color:#126234}.vendor-item-detail{display:flex;flex-direction:column;min-width:0;overflow:hidden}.vendor-empty{margin:auto;text-align:center;color:#777}.vendor-empty span{font-size:44px}.vendor-detail-head{display:flex;justify-content:space-between;gap:20px;padding:20px 24px;border-bottom:1px solid #eee}.vendor-detail-head h3{margin:5px 0}.vendor-detail-head p{margin:0;color:#666}.vendor-type{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:#b5121b;font-weight:800}.vendor-messages{flex:1;overflow:auto;padding:22px;background:#f5f6f8}.vendor-message{display:flex;flex-direction:column;max-width:75%;margin:0 0 12px}.vendor-message p{margin:0;padding:11px 14px;border-radius:15px;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.07)}.vendor-message small{padding:4px 6px;color:#777}.vendor-message.vendor{margin-left:auto;align-items:flex-end}.vendor-message.vendor p{background:#b5121b;color:#fff}.vendor-message.system{margin-inline:auto;align-items:center}.vendor-message.system p{background:#e7e7e7}.vendor-reply{padding:16px 20px;border-top:1px solid #eee}.vendor-reply textarea{min-height:78px}.vendor-reply>div,.vendor-quote-actions{display:flex;gap:10px;margin-top:10px}.vendor-quote-meta{display:flex;gap:24px;padding:18px 24px}.vendor-quote-table{padding:0 24px;overflow:auto}.vendor-quote-table table{width:100%;border-collapse:collapse}.vendor-quote-table th,.vendor-quote-table td{padding:10px;border-bottom:1px solid #eee;text-align:left}.vendor-quote-actions{padding:20px 24px}.vendor-list-empty{padding:25px;color:#777;text-align:center}@media(max-width:800px){.vendor-dashboard-head{flex-direction:column}.vendor-connection-box{min-width:0}.vendor-workspace{grid-template-columns:1fr;max-height:none}.vendor-item-list{max-height:250px;border-right:0;border-bottom:1px solid #ddd}.vendor-item-detail{min-height:430px}.vendor-tabs{overflow:auto}.vendor-message{max-width:90%}}


/* v51: selector de categorías del catálogo */
.product-editor-grid select.text-input {
  appearance: auto;
  cursor: pointer;
  background-color: #fff;
}
.category-custom-field {
  grid-column: 1 / -1;
}
.category-custom-field.hidden {
  display: none !important;
}


/* ===== v52: Centro de respaldos y migración ===== */
.backup-center-card { overflow:hidden; }
.backup-center-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:8px; }
.backup-center-heading h3 { margin:3px 0 0; }
.backup-version-pill,
.backup-compatible-pill {
  display:inline-flex; align-items:center; justify-content:center; border-radius:999px;
  padding:6px 10px; background:#f6ecee; color:var(--red-dark); border:1px solid rgba(118,15,36,.14);
  font-size:.72rem; font-weight:900; white-space:nowrap;
}
.backup-center-actions { display:grid; gap:8px; margin-top:12px; }
.backup-center-status { margin-top:10px; padding:10px 11px; border-radius:12px; background:#f7f6f2; border:1px solid rgba(80,64,48,.09); }
.backup-center-status span { display:block; font-size:.72rem; line-height:1.45; color:#695c54; font-weight:700; }
.backup-preview-card { width:min(760px, 94vw); max-height:92vh; overflow:auto; }
.backup-preview-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; padding-right:30px; }
.backup-preview-heading h2 { margin:4px 0 5px; }
.backup-preview-meta { display:grid; grid-template-columns:repeat(auto-fit, minmax(130px,1fr)); gap:10px; margin:18px 0; }
.backup-preview-meta > div { min-width:0; padding:13px; border-radius:14px; background:#faf8f5; border:1px solid rgba(118,15,36,.1); }
.backup-preview-meta span { display:block; color:#79676c; font-size:.7rem; font-weight:800; margin-bottom:5px; }
.backup-preview-meta strong { display:block; color:#2d2024; font-size:.92rem; overflow-wrap:anywhere; }
.backup-preview-section { margin:14px 0; }
.backup-preview-section h3 { margin:0 0 9px; font-size:.95rem; }
.backup-content-chips { display:flex; flex-wrap:wrap; gap:7px; }
.backup-content-chips span { padding:7px 9px; border-radius:999px; background:#fff; border:1px solid rgba(118,15,36,.14); color:#654f56; font-size:.72rem; font-weight:800; }
.backup-import-warning { margin:17px 0; padding:15px; border-radius:15px; border:1px solid rgba(185,121,0,.28); background:#fff9e7; color:#5f4815; }
.backup-import-warning strong { display:block; margin-bottom:6px; font-size:.96rem; }
.backup-import-warning p { margin:0; line-height:1.5; font-size:.82rem; }
.backup-preview-actions { display:grid; grid-template-columns:auto 1fr 1fr; gap:9px; align-items:stretch; }
.backup-preview-actions button { min-height:44px; }
@media (max-width: 720px) {
  .backup-preview-heading { flex-direction:column; }
  .backup-preview-meta { grid-template-columns:1fr 1fr; }
  .backup-preview-actions { grid-template-columns:1fr; }
}
.backup-center-status small { display:block; margin-top:7px; padding-top:7px; border-top:1px solid rgba(80,64,48,.08); color:#806f65; font-size:.68rem; line-height:1.4; }
.backup-center-actions button:disabled { opacity:.55; cursor:not-allowed; }

/* ===== v57 panel vendedor enfocado en chat ===== */
.vendor-head-actions{display:flex;align-items:stretch;gap:12px;flex-wrap:wrap;justify-content:flex-end}.vendor-catalog-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;text-decoration:none;white-space:nowrap}.vendor-chat-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 22px;border-bottom:1px solid #eee;background:#fff}.vendor-chat-toolbar strong{font-size:1rem}.vendor-chat-toolbar span{padding:7px 11px;border-radius:999px;background:#f3f3f3;font-size:.86rem}.vendor-chat-toolbar b{color:#b5121b}.vendor-dashboard-card .vendor-workspace{min-height:620px}.vendor-dashboard-card .vendor-item-list{background:#fafafa}
@media(max-width:800px){.vendor-head-actions{width:100%;justify-content:stretch}.vendor-catalog-button{width:100%}.vendor-chat-toolbar{align-items:flex-start;flex-direction:column}.vendor-dashboard-card .vendor-workspace{min-height:0}}


/* ===== v58 sesión exclusiva de vendedor ===== */
body.vendor-session {
  overflow: hidden;
  background: #f2f3f5;
}
body.vendor-session > .site-header,
body.vendor-session > main,
body.vendor-session > .footer,
body.vendor-session > .side-access,
body.vendor-session > #suggestionPanel,
body.vendor-session > #chatPanel {
  display: none !important;
}
body.vendor-session #vendorDashboardModal {
  display: flex !important;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: #eef0f3;
  backdrop-filter: none;
  z-index: 9999;
}
body.vendor-session #vendorDashboardModal .vendor-dashboard-card {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}
body.vendor-session #vendorDashboardModal .vendor-workspace {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.vendor-exclusive-head { background: #fff; }
.vendor-logout-button { min-height: 48px; white-space: nowrap; }
.public-catalog-view #loginButton { display: inline-flex !important; }
.public-catalog-view .vendor-only { display: none !important; }
@media (max-width: 800px) {
  body.vendor-session #vendorDashboardModal .vendor-dashboard-card { height: 100dvh; }
  .vendor-exclusive-head { padding: 18px; }
  .vendor-head-actions { display: grid; grid-template-columns: 1fr; }
  .vendor-connection-box { order: 3; }
}


/* ===== v59: centro exclusivo de atención del vendedor ===== */
.vendor-session-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.vendor-compact-action {
  width: auto !important;
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  font-size: .82rem !important;
  line-height: 1 !important;
  box-shadow: none !important;
}
.vendor-head-actions {
  align-items: center;
}
.vendor-exclusive-tabs {
  flex: 0 0 auto;
}
body.vendor-session #vendorDashboardModal .vendor-dashboard-card {
  display: flex;
  flex-direction: column;
}
body.vendor-session #vendorDashboardModal .vendor-workspace {
  flex: 1 1 auto;
  min-height: 0;
}
@media (max-width: 800px) {
  .vendor-session-actions {
    width: 100%;
    justify-content: stretch;
  }
  .vendor-compact-action {
    flex: 1 1 auto;
    text-align: center;
  }
  .vendor-exclusive-tabs {
    overflow-x: auto;
    padding-inline: 12px;
  }
  .vendor-exclusive-tabs button {
    white-space: nowrap;
  }
}


/* ===== v60: identidad visual del centro de atención y acceso público permanente ===== */
.public-catalog-view #loginButton {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  opacity: 1 !important;
}

body.vendor-session {
  background:
    radial-gradient(circle at 8% 6%, rgba(199, 24, 58, .10), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(224, 166, 39, .11), transparent 30%),
    #f5f1f3;
}
body.vendor-session #vendorDashboardModal {
  background: transparent;
}
body.vendor-session #vendorDashboardModal .vendor-dashboard-card {
  background: #fff;
}
.vendor-exclusive-head {
  position: relative;
  overflow: hidden;
  color: #fff;
  border-bottom: 0;
  background:
    linear-gradient(125deg, rgba(92, 5, 27, .98) 0%, rgba(151, 10, 43, .97) 55%, rgba(199, 24, 58, .94) 100%);
}
.vendor-exclusive-head::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -120px;
  top: -210px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  pointer-events: none;
}
.vendor-exclusive-head > * {
  position: relative;
  z-index: 1;
}
.vendor-exclusive-head .panel-kicker,
.vendor-exclusive-head h2,
.vendor-exclusive-head .muted {
  color: #fff;
}
.vendor-exclusive-head .muted {
  opacity: .82;
}
.vendor-exclusive-head .panel-kicker {
  color: #ffd8df;
  letter-spacing: .11em;
}
.vendor-exclusive-head .vendor-catalog-button {
  color: #7d0c27;
  border-color: rgba(255,255,255,.88);
  background: #fff;
}
.vendor-exclusive-head .vendor-catalog-button:hover {
  background: #fff5f7;
}
.vendor-exclusive-head .vendor-logout-button {
  color: #fff;
  border: 1px solid rgba(255,255,255,.34);
  background: rgba(255,255,255,.14);
  box-shadow: none;
}
.vendor-exclusive-head .vendor-logout-button:hover {
  background: rgba(255,255,255,.23);
}
.vendor-exclusive-head .vendor-connection-box {
  color: #2c2024;
  border-color: rgba(255,255,255,.58);
  background: rgba(255,255,255,.93);
  box-shadow: 0 12px 28px rgba(52, 4, 17, .16);
}
.vendor-exclusive-head .vendor-connection-box small {
  color: #6f6065;
}

.vendor-exclusive-tabs {
  gap: 10px;
  padding: 15px 22px;
  border-bottom: 1px solid #eadfe3;
  background: #fff9fa;
}
.vendor-exclusive-tabs button {
  min-height: 42px;
  border: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(73, 22, 37, .05);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.vendor-exclusive-tabs button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(73, 22, 37, .09);
}
.vendor-exclusive-tabs button:nth-child(1) {
  color: #a11131;
  border-color: #f0ccd5;
  background: #fff0f3;
}
.vendor-exclusive-tabs button:nth-child(2) {
  color: #88600a;
  border-color: #f0dfaa;
  background: #fff8df;
}
.vendor-exclusive-tabs button:nth-child(3) {
  color: #5f3b8e;
  border-color: #dfd0ef;
  background: #f7f0ff;
}
.vendor-exclusive-tabs button:nth-child(1).active {
  color: #fff;
  border-color: #b51235;
  background: linear-gradient(135deg, #d01b43, #8f0c2a);
}
.vendor-exclusive-tabs button:nth-child(2).active {
  color: #fff;
  border-color: #c98b12;
  background: linear-gradient(135deg, #e5aa2c, #a46b00);
}
.vendor-exclusive-tabs button:nth-child(3).active {
  color: #fff;
  border-color: #7450a0;
  background: linear-gradient(135deg, #9470bd, #5e397f);
}
.vendor-exclusive-tabs button b {
  background: rgba(255,255,255,.72);
  color: currentColor;
}
.vendor-exclusive-tabs button.active b {
  color: #fff;
  background: rgba(255,255,255,.22);
}

body.vendor-session #vendorDashboardModal .vendor-workspace {
  background: #fff;
}
.vendor-dashboard-card .vendor-item-list {
  border-right-color: #eadfe3;
  background: #faf6f7;
}
.vendor-list-row {
  position: relative;
  border-bottom-color: #ecE2e5;
  background: rgba(255,255,255,.52);
}
.vendor-list-row:hover {
  background: #fff;
}
.vendor-list-row.active {
  background: #fff;
  box-shadow: inset 5px 0 #c4183c, 0 8px 24px rgba(91, 19, 39, .07);
}
.vendor-list-row b {
  color: #2f2025;
}
.vendor-list-row .vendor-status.status-nuevo,
.vendor-list-row .vendor-status.status-pendiente {
  border: 1px solid #f0d37d;
}
.vendor-list-row .vendor-status.status-resuelto,
.vendor-list-row .vendor-status.status-atendida {
  border: 1px solid #b9dfc5;
}
.vendor-item-detail {
  background: #fff;
}
.vendor-empty {
  padding: 30px;
}
.vendor-empty span {
  display: inline-grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin-bottom: 14px;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff0f4, #f2e8ff);
  box-shadow: 0 13px 32px rgba(96, 52, 119, .13);
}
.vendor-empty h3 {
  color: #4b343c;
}
.vendor-detail-head {
  border-bottom-color: #eadfe3;
  background: linear-gradient(180deg, #fff 0%, #fffafb 100%);
}
.vendor-type {
  color: #b51235;
}
.vendor-messages {
  background:
    linear-gradient(rgba(255,255,255,.88), rgba(255,255,255,.88)),
    radial-gradient(circle at 10% 10%, #f3dbe2 0 2px, transparent 3px);
  background-size: auto, 24px 24px;
}
.vendor-message p {
  border: 1px solid #eee4e7;
}
.vendor-message.vendor p {
  border-color: #a70f31;
  background: linear-gradient(135deg, #cc1c44, #8d0d2a);
}
.vendor-reply {
  border-top-color: #eadfe3;
  background: #fffafb;
}
.vendor-reply textarea:focus {
  border-color: #c31a3d;
  box-shadow: 0 0 0 4px rgba(195, 26, 61, .10);
}
.vendor-quote-meta {
  background: #fffbef;
}
.vendor-quote-table thead {
  background: #fff7df;
}

@media (max-width: 800px) {
  .vendor-exclusive-head {
    background: linear-gradient(150deg, #720b27 0%, #bc1740 100%);
  }
  .vendor-exclusive-tabs {
    padding-block: 12px;
  }
}


/* ===== v61: respuesta estable y respaldo de conversaciones ===== */
.vendor-data-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px 18px;
  padding: 11px 22px;
  border-bottom: 1px solid #eadfe3;
  background: linear-gradient(180deg, #fff 0%, #fffafb 100%);
}
.vendor-data-toolbar > div:first-child {
  display: grid;
  gap: 2px;
}
.vendor-data-toolbar small { color: #78666d; }
.vendor-data-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.vendor-data-button { min-height: 36px; padding: 7px 12px; font-size: .78rem; }
.vendor-transfer-status {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
  color: #18723b;
  font-size: .78rem;
  font-weight: 750;
}
.vendor-transfer-status:empty { display: none; }
.vendor-transfer-status.error,
.vendor-reply-status.error { color: #b42318; }
.vendor-reply-status {
  min-height: 18px;
  margin: 7px 2px 0;
  color: #18723b;
  font-size: .78rem;
  font-weight: 750;
}
.vendor-reply-status:empty { display: none; }
.vendor-reply textarea { resize: vertical; }
@media (max-width: 800px) {
  .vendor-data-toolbar { grid-template-columns: 1fr; padding: 11px 14px; }
  .vendor-data-actions { justify-content: stretch; }
  .vendor-data-button { flex: 1 1 160px; }
}


/* ===== v62 presupuesto completo dentro del panel vendedor ===== */
.vendor-budget-detail-head { flex: 0 0 auto; }
.vendor-budget-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid #eadde0;
  background: #fffafb;
}
.vendor-budget-document {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px;
  background: #f1f2f4;
}
.vendor-budget-sheet.budget-sheet {
  width: min(980px, 100%);
  max-width: 980px;
  margin: 0 auto;
  box-sizing: border-box;
}
.vendor-budget-value {
  display: block;
  min-width: 0;
  padding: 0 4px 4px;
  border-bottom: 1.6px solid #111;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
.vendor-budget-sheet .budget-address {
  grid-template-columns: auto minmax(0, 1fr);
}
@media (max-width: 800px) {
  .vendor-budget-actions { flex-direction: column; }
  .vendor-budget-actions button { width: 100%; }
  .vendor-budget-document { padding: 10px; }
  .vendor-budget-sheet.budget-sheet { min-width: 720px; }
}


.vendor-budget-detail-head {
  align-items: flex-start;
}
.vendor-budget-actions {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.vendor-budget-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.vendor-quote-status-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(118,15,36,.14);
  background: #fff;
  box-shadow: 0 8px 20px rgba(26,18,25,.06);
}
.vendor-quote-status-card strong {
  display: block;
  margin-bottom: 2px;
  font-size: .92rem;
}
.vendor-quote-status-card small {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.35;
}
.vendor-quote-status-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  flex: 0 0 14px;
  box-shadow: 0 0 0 6px rgba(0,0,0,.04);
}
.vendor-quote-status-card.is-attended {
  border-color: rgba(26,130,58,.18);
  background: linear-gradient(135deg, rgba(240,251,244,.95), rgba(232,247,238,.98));
}
.vendor-quote-status-card.is-attended .vendor-quote-status-dot {
  background: #1f8a48;
  box-shadow: 0 0 0 6px rgba(31,138,72,.14);
}
.vendor-quote-status-card.is-pending {
  border-color: rgba(205,145,24,.18);
  background: linear-gradient(135deg, rgba(255,249,230,.95), rgba(255,244,204,.98));
}
.vendor-quote-status-card.is-pending .vendor-quote-status-dot {
  background: #c99012;
  box-shadow: 0 0 0 6px rgba(201,144,18,.14);
}
.vendor-action-toggle {
  min-width: 220px;
}
.vendor-action-toggle.is-attend {
  background: linear-gradient(135deg, #0f9f4b, #157a3a);
  box-shadow: 0 12px 24px rgba(15,159,75,.25);
}
.vendor-action-toggle.is-attend:hover {
  filter: brightness(1.03);
}
.vendor-action-toggle.is-reopen {
  border-color: rgba(201,144,18,.28);
  color: #9a6700;
  background: #fff8e6;
}
.vendor-action-toggle.is-reopen:hover {
  background: #fff1c8;
}
@media (max-width: 800px) {
  .vendor-budget-actions {
    align-items: stretch;
  }
  .vendor-budget-action-buttons {
    width: 100%;
    justify-content: stretch;
  }
  .vendor-budget-action-buttons button,
  .vendor-action-toggle,
  .vendor-quote-status-card {
    width: 100%;
    min-width: 0;
  }
}


/* ===== v66 estado visual mejorado para chats/sugerencias del vendedor ===== */
.vendor-chat-detail-head {
  align-items: flex-start;
}
.vendor-chat-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid #eadde0;
  background: #fffafb;
}
.vendor-chat-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.vendor-thread-status-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(118,15,36,.14);
  background: #fff;
  box-shadow: 0 8px 20px rgba(26,18,25,.06);
}
.vendor-thread-status-card strong { display:block; margin-bottom:2px; font-size:.92rem; }
.vendor-thread-status-card small { display:block; color: var(--muted); font-size:.76rem; line-height:1.35; }
.vendor-thread-status-dot {
  width: 14px; height: 14px; border-radius: 999px; flex: 0 0 14px;
  box-shadow: 0 0 0 6px rgba(0,0,0,.04);
}
.vendor-thread-status-card.is-progress {
  border-color: rgba(26,91,145,.18);
  background: linear-gradient(135deg, rgba(240,248,255,.95), rgba(230,242,255,.98));
}
.vendor-thread-status-card.is-progress .vendor-thread-status-dot {
  background: #135b91;
  box-shadow: 0 0 0 6px rgba(19,91,145,.14);
}
.vendor-thread-status-card.is-resolved {
  border-color: rgba(26,130,58,.18);
  background: linear-gradient(135deg, rgba(240,251,244,.95), rgba(232,247,238,.98));
}
.vendor-thread-status-card.is-resolved .vendor-thread-status-dot {
  background: #1f8a48;
  box-shadow: 0 0 0 6px rgba(31,138,72,.14);
}
.vendor-thread-status-card.is-new {
  border-color: rgba(205,145,24,.18);
  background: linear-gradient(135deg, rgba(255,249,230,.95), rgba(255,244,204,.98));
}
.vendor-thread-status-card.is-new .vendor-thread-status-dot {
  background: #c99012;
  box-shadow: 0 0 0 6px rgba(201,144,18,.14);
}
@media (max-width: 800px) {
  .vendor-chat-actions { align-items: stretch; }
  .vendor-chat-action-buttons,
  .vendor-thread-status-card,
  .vendor-chat-action-buttons button { width:100%; min-width:0; }
}

html[data-theme="dark"] .vendor-chat-actions,
html[data-theme="dark"] .vendor-budget-actions { background: rgba(255,255,255,.03); border-bottom-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .vendor-thread-status-card,
html[data-theme="dark"] .vendor-quote-status-card { background: rgba(255,255,255,.05); box-shadow: none; }
html[data-theme="dark"] .vendor-thread-status-card small,
html[data-theme="dark"] .vendor-quote-status-card small { color: #d3ccd0; }

/* ===== v63: selector claro / oscuro / sistema por contexto ===== */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.theme-picker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  font-size: .78rem;
  font-weight: 850;
}
.theme-picker select {
  min-height: 38px;
  padding: 7px 30px 7px 11px;
  border: 1px solid rgba(214,27,60,.22);
  border-radius: 999px;
  color: #3a252d;
  background: rgba(255,255,255,.96);
  font-weight: 800;
  cursor: pointer;
}
.theme-picker-header select { max-width: 112px; }
.login-theme-block {
  display: grid;
  gap: 6px;
  margin: 15px 0 17px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff8fa;
}
.login-theme-block .field-label { margin: 0; }
.login-theme-block small { color: var(--muted); line-height: 1.4; }
.vendor-theme-picker {
  padding: 5px 7px 5px 11px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.12);
}
.vendor-theme-picker select {
  min-height: 32px;
  padding-block: 5px;
  border-color: rgba(255,255,255,.42);
}

/* ===== v67: botones compactos de sol/luna para apariencia ===== */
.theme-icon-toggle {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(214,27,60,.20);
  border-radius: 999px;
  color: #3a252d;
  background: rgba(255,255,255,.96);
  box-shadow: 0 7px 18px rgba(118,15,36,.10);
  font-size: 1.22rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.theme-icon-toggle:hover {
  transform: translateY(-1px) rotate(-5deg);
  box-shadow: 0 10px 24px rgba(118,15,36,.16);
}
.theme-icon-toggle:active { transform: scale(.94); }
.theme-icon-toggle:focus-visible {
  outline: 3px solid rgba(214,27,60,.20);
  outline-offset: 3px;
}
.theme-icon-toggle span { display:block; transform: translateY(-1px); }
.login-theme-toggle-row {
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
}
.login-theme-toggle-row .field-label { display:block; }
.theme-icon-toggle-login { width: 46px; height: 46px; min-width:46px; font-size:1.35rem; }
.vendor-theme-toggle {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-color: rgba(255,255,255,.42);
  color: #fff;
  background: rgba(255,255,255,.15);
  box-shadow: none;
}
.vendor-theme-toggle:hover { background: rgba(255,255,255,.25); box-shadow:none; }
html[data-theme="dark"] .theme-icon-toggle-header,
html[data-theme="dark"] .theme-icon-toggle-login {
  color: #fff;
  background: #2b2024;
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 8px 20px rgba(0,0,0,.22);
}
@media (max-width: 720px) {
  .theme-icon-toggle-header { order:3; }
  .login-theme-toggle-row { grid-template-columns: minmax(0,1fr) auto; }
}

/* Tema oscuro general */
html[data-theme="dark"] {
  --ink: #f7eef1;
  --muted: #c4b2b9;
  --line: rgba(255,255,255,.14);
  --card: rgba(29,22,25,.985);
  --shadow: 0 18px 44px rgba(0,0,0,.38);
  color-scheme: dark;
}
html[data-theme="dark"] body {
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(214,27,60,.16), transparent 30%),
    radial-gradient(circle at 12% 8%, rgba(255,255,255,.035), transparent 22%),
    linear-gradient(180deg, #1d0d13 0%, #13090d 42%, #090507 100%);
}
html[data-theme="dark"] .site-header {
  background: rgba(15,9,12,.91) !important;
  border-bottom-color: rgba(255,255,255,.10);
  box-shadow: 0 12px 34px rgba(0,0,0,.38);
}
html[data-theme="dark"] .site-header .brand,
html[data-theme="dark"] .site-header .brand strong,
html[data-theme="dark"] .site-header .brand small,
html[data-theme="dark"] .site-header .search-wrap label {
  color: #fff !important;
}
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .theme-picker select,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .text-input {
  color: #f8f1f3 !important;
  border-color: rgba(255,255,255,.16) !important;
  background: #241a1e !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #9f8d94 !important; }
html[data-theme="dark"] .search-box input { background: transparent !important; }
html[data-theme="dark"] .search-box span,
html[data-theme="dark"] .search-box button { color: #e8dce0 !important; }

html[data-theme="dark"] .hero-content,
html[data-theme="dark"] .hero-panel,
html[data-theme="dark"] .filter-card,
html[data-theme="dark"] .catalog-toolbar,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .category-bar,
html[data-theme="dark"] .promo-section,
html[data-theme="dark"] .ad-carousel-section,
html[data-theme="dark"] .ad-root-panel,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .drawer-card,
html[data-theme="dark"] .floating-panel,
html[data-theme="dark"] .root-inbox-card,
html[data-theme="dark"] .backup-center-card {
  color: #f7eef1 !important;
  border-color: rgba(255,255,255,.13) !important;
  background: rgba(31,23,27,.985) !important;
  box-shadow: 0 18px 42px rgba(0,0,0,.28) !important;
}
html[data-theme="dark"] .section-title span,
html[data-theme="dark"] .catalog-toolbar h2,
html[data-theme="dark"] .filter-card h2,
html[data-theme="dark"] .filter-card h3,
html[data-theme="dark"] .product-card h3,
html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .modal-card h2,
html[data-theme="dark"] .modal-card h3,
html[data-theme="dark"] .drawer-card h2,
html[data-theme="dark"] .ad-carousel-section h2,
html[data-theme="dark"] .ad-admin-copy strong {
  color: #fff4f6 !important;
}
html[data-theme="dark"] .muted,
html[data-theme="dark"] .hero p,
html[data-theme="dark"] .catalog-toolbar p,
html[data-theme="dark"] .product-card p,
html[data-theme="dark"] .ad-carousel-head p,
html[data-theme="dark"] .ad-admin-copy small,
html[data-theme="dark"] .field-label,
html[data-theme="dark"] small { color: #c6b5bb; }

html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .secondary-btn,
html[data-theme="dark"] .wide-btn,
html[data-theme="dark"] .outline-btn,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .ad-mini-btn {
  color: #f6e9ed !important;
  border-color: rgba(255,255,255,.15) !important;
  background: #2b2024 !important;
}
html[data-theme="dark"] .chip.active,
html[data-theme="dark"] .primary-btn,
html[data-theme="dark"] .login-pill { color: #fff !important; background: linear-gradient(135deg, #e1264c, #8f0d2b) !important; }
html[data-theme="dark"] .product-image,
html[data-theme="dark"] .editor-preview-box,
html[data-theme="dark"] .ad-slide-media,
html[data-theme="dark"] .ad-editor-preview-media { background: #2b2427 !important; border-color: rgba(255,255,255,.10) !important; }
html[data-theme="dark"] .ad-slide,
html[data-theme="dark"] .ad-editor-preview,
html[data-theme="dark"] .ad-preview-card,
html[data-theme="dark"] .ad-admin-item-v44,
html[data-theme="dark"] .ad-publish-options,
html[data-theme="dark"] .promo-admin-item,
html[data-theme="dark"] .backup-center-status,
html[data-theme="dark"] .login-theme-block {
  color: #f7eef1 !important;
  border-color: rgba(255,255,255,.12) !important;
  background: #261c20 !important;
}
html[data-theme="dark"] .ad-editor-preview-copy p,
html[data-theme="dark"] .ad-library-header small { color: #c3b2b8 !important; }
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .filter-card,
html[data-theme="dark"] .catalog-toolbar { outline-color: rgba(255,255,255,.06); }

html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer-inner,
html[data-theme="dark"] .footer-column {
  color: #f4e9ed !important;
  border-color: rgba(255,255,255,.12) !important;
  background: #181115 !important;
}
html[data-theme="dark"] .footer p,
html[data-theme="dark"] .footer strong,
html[data-theme="dark"] .footer b,
html[data-theme="dark"] .footer .brand,
html[data-theme="dark"] .footer-note,
html[data-theme="dark"] .footer-note strong,
html[data-theme="dark"] .footer-column-title,
html[data-theme="dark"] .footer-link-name { color: #f4e9ed !important; }
html[data-theme="dark"] .footer-quick-link,
html[data-theme="dark"] .footer-cashea-box { background: #241a1e !important; border-color: rgba(255,255,255,.12) !important; }
html[data-theme="dark"] .footer-link-meta { color: #bcaab1 !important; }

/* Panel vendedor en oscuro */
html[data-theme="dark"] body.vendor-session { background: #10090c !important; }
html[data-theme="dark"] .vendor-dashboard-card,
html[data-theme="dark"] .vendor-workspace,
html[data-theme="dark"] .vendor-item-detail { background: #171014 !important; color: #f6edf0 !important; }
html[data-theme="dark"] .vendor-exclusive-head {
  background: linear-gradient(125deg, #3f0819 0%, #8d1230 54%, #b4163d 100%) !important;
}
html[data-theme="dark"] .vendor-exclusive-tabs,
html[data-theme="dark"] .vendor-data-toolbar,
html[data-theme="dark"] .vendor-reply,
html[data-theme="dark"] .vendor-budget-actions,
html[data-theme="dark"] .vendor-detail-head {
  color: #f6edf0 !important;
  border-color: rgba(255,255,255,.10) !important;
  background: #21171b !important;
}
html[data-theme="dark"] .vendor-dashboard-card .vendor-item-list { background: #140e11 !important; border-color: rgba(255,255,255,.10) !important; }
html[data-theme="dark"] .vendor-list-row { color: #f4e9ed; background: rgba(36,25,30,.74) !important; border-color: rgba(255,255,255,.08) !important; }
html[data-theme="dark"] .vendor-list-row:hover,
html[data-theme="dark"] .vendor-list-row.active { background: #2a1e23 !important; }
html[data-theme="dark"] .vendor-list-row b,
html[data-theme="dark"] .vendor-empty h3,
html[data-theme="dark"] .vendor-detail-head h3 { color: #fff4f6 !important; }
html[data-theme="dark"] .vendor-list-top small,
html[data-theme="dark"] .vendor-list-row span,
html[data-theme="dark"] .vendor-detail-head p,
html[data-theme="dark"] .vendor-empty,
html[data-theme="dark"] .vendor-data-toolbar small { color: #c3b2b8 !important; }
html[data-theme="dark"] .vendor-messages {
  background:
    linear-gradient(rgba(17,12,15,.93), rgba(17,12,15,.93)),
    radial-gradient(circle at 10% 10%, #5d2436 0 2px, transparent 3px) !important;
}
html[data-theme="dark"] .vendor-message.client p { color: #f6edf0; background: #2b2024 !important; border-color: rgba(255,255,255,.10) !important; }
html[data-theme="dark"] .vendor-message.system p { color: #ddd0d5; background: #352a2e !important; }
html[data-theme="dark"] .vendor-connection-box { color: #f8eef1 !important; background: #271c20 !important; border-color: rgba(255,255,255,.18) !important; }
html[data-theme="dark"] .vendor-exclusive-head .vendor-connection-box small { color: #c7b5bb !important; }
html[data-theme="dark"] .vendor-theme-picker { background: rgba(15,7,11,.34); }

/* Documentos se conservan claros para impresión y legibilidad */
html[data-theme="dark"] .invoice-sheet,
html[data-theme="dark"] .budget-sheet,
html[data-theme="dark"] .vendor-budget-sheet {
  color: #111 !important;
  background: #fff !important;
}
html[data-theme="dark"] .invoice-sheet *,
html[data-theme="dark"] .budget-sheet *,
html[data-theme="dark"] .vendor-budget-sheet * { color: inherit; }

@media (max-width: 980px) {
  .theme-picker-header select { max-width: 98px; }
  .header-actions { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .theme-icon-toggle-header { order: 3; }
}
@media print {
  html[data-theme="dark"], html[data-theme="light"] { color-scheme: light; }
  .invoice-sheet, .budget-sheet, .vendor-budget-sheet { color: #111 !important; background: #fff !important; }
}


/* ===== v68: corrección del panel de métricas ROOT en portada ===== */
.hero.public-hero.root-active #rootMetricsPanel.hero-panel {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  min-height: 330px;
  padding: 22px !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.16) !important;
  background: linear-gradient(145deg, #86162f 0%, #640f23 52%, #420813 100%) !important;
  box-shadow: 0 18px 42px rgba(74,8,25,.24) !important;
}
.hero.public-hero.root-active #rootMetricsPanel .metric-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 78px;
  padding: 20px 22px !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.17) !important;
  background: rgba(255,255,255,.085) !important;
  box-shadow: none !important;
}
.hero.public-hero.root-active #rootMetricsPanel .metric-card strong {
  color: #ffffff !important;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
}
.hero.public-hero.root-active #rootMetricsPanel .metric-card span {
  margin-top: 8px;
  color: rgba(255,255,255,.82) !important;
  font-size: .9rem;
  font-weight: 750;
}
html[data-theme="dark"] .hero.public-hero.root-active #rootMetricsPanel.hero-panel {
  color: #ffffff !important;
  border-color: rgba(255,255,255,.14) !important;
  background: linear-gradient(145deg, #5d1024 0%, #3c0916 58%, #25050d 100%) !important;
  box-shadow: 0 18px 42px rgba(0,0,0,.34) !important;
}
@media (max-width: 760px) {
  .hero.public-hero.root-active #rootMetricsPanel.hero-panel {
    min-height: 0;
  }
}

/* ===== v69: panel exclusivo de indicadores ADMIN ===== */
body.admin-session {
  overflow: hidden;
  background: #f3f4f7;
}
body.admin-session > .site-header,
body.admin-session > main,
body.admin-session > .footer,
body.admin-session > .side-access,
body.admin-session > #suggestionPanel,
body.admin-session > #chatPanel,
body.admin-session > #vendorDashboardModal {
  display: none !important;
}
body.admin-session #adminDashboardModal {
  display: flex !important;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: #f3f4f7;
  backdrop-filter: none;
  z-index: 10050;
}
body.admin-session #adminDashboardModal .admin-dashboard-card {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
}
.admin-dashboard-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: #f4f5f8;
}
.admin-dashboard-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex: 0 0 auto;
  padding: 22px 28px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(125deg, #55091a 0%, #8f102d 46%, #c71c43 100%);
}
.admin-dashboard-head::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.admin-dashboard-head > * { position: relative; z-index: 1; }
.admin-dashboard-head h2 { margin: 4px 0 5px; font-size: clamp(1.45rem, 2.3vw, 2.1rem); }
.admin-dashboard-head p { margin: 0; color: rgba(255,255,255,.78); }
.admin-kicker { font-size: .72rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; color: #ffdce4; }
.admin-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.admin-theme-toggle { border-color: rgba(255,255,255,.34) !important; background: rgba(255,255,255,.12) !important; color: #fff !important; }
.admin-compact-btn { width: auto !important; min-height: 38px !important; padding: 8px 15px !important; border-radius: 999px !important; font-size: .82rem !important; box-shadow: none !important; }
.admin-dashboard-head .outline-btn { border-color: rgba(255,255,255,.42); color: #fff; background: rgba(255,255,255,.08); }
.admin-dashboard-head .primary-btn { background: #fff; color: #8f102d; }

.admin-period-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  padding: 12px 22px;
  border-bottom: 1px solid #e6e1e3;
  background: #fff;
}
.admin-period-buttons { display: flex; align-items: center; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
.admin-period-buttons button {
  flex: 0 0 auto;
  border: 1px solid #eadde1;
  border-radius: 999px;
  padding: 8px 13px;
  color: #5d4750;
  background: #fff;
  font-weight: 850;
  cursor: pointer;
}
.admin-period-buttons button:hover { border-color: #c71c43; color: #a51232; }
.admin-period-buttons button.active { border-color: #a51232; color: #fff; background: linear-gradient(135deg, #c71c43, #7b0d27); }
.admin-custom-range { display: flex; align-items: center; gap: 8px; }
.admin-custom-range label { display: flex; align-items: center; gap: 6px; color: #6e5961; font-size: .76rem; font-weight: 800; }
.admin-custom-range input { min-height: 36px; border: 1px solid #e4dadd; border-radius: 10px; padding: 6px 9px; background: #fff; color: #2d2025; }
.admin-custom-range .outline-btn { min-height: 36px; padding: 7px 12px; }
.admin-period-summary { display: grid; justify-items: end; gap: 2px; white-space: nowrap; }
.admin-period-summary span { color: #8b757d; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.admin-period-summary strong { color: #7c1029; font-size: .9rem; }

.admin-data-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
  flex: 0 0 auto;
  padding: 11px 22px;
  border-bottom: 1px solid #e7dfe2;
  background: #fff9fa;
}
.admin-data-toolbar strong,
.admin-data-toolbar small { display: block; }
.admin-data-toolbar small { margin-top: 3px; color: #7c6870; }
.admin-data-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.admin-data-actions button { min-height: 34px; padding: 7px 11px; border-radius: 999px; font-size: .74rem; }
.admin-danger-btn { color: #af1835; border: 1px solid rgba(175,24,53,.2); }
.admin-data-status { grid-column: 1 / -1; min-height: 17px; margin: 0; color: #17743e; font-size: .76rem; font-weight: 800; }
.admin-data-status.error { color: #b42318; }

.admin-dashboard-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 20px 24px 40px;
}
.admin-data-notice {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px 15px;
  border: 1px solid #eadde0;
  border-radius: 15px;
  background: #fff;
  color: #6f5b63;
  box-shadow: 0 7px 22px rgba(75,31,46,.05);
}
.admin-data-notice strong { color: #4d2935; }
.admin-metric-section { margin-bottom: 22px; padding: 18px; border: 1px solid #e7dfe2; border-radius: 20px; background: #fff; box-shadow: 0 12px 32px rgba(65,31,43,.055); }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.admin-section-heading > div { display: flex; align-items: center; gap: 10px; }
.admin-section-heading > div > span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; font-size: .72rem; font-weight: 950; }
.admin-section-heading h3 { margin: 0; font-size: 1.18rem; }
.admin-section-heading small { color: #837078; }
.attention-section .admin-section-heading > div > span { color: #a60e2e; background: #fde9ee; }
.quotes-section .admin-section-heading > div > span { color: #966500; background: #fff1c9; }
.sales-section .admin-section-heading > div > span { color: #116c38; background: #e2f5e9; }
.inventory-section .admin-section-heading > div > span { color: #3b4899; background: #e8eafd; }

.admin-metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.admin-metric-card {
  --metric-accent: #b51235;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 142px;
  padding: 14px;
  border: 1px solid #eee5e8;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #fffafb);
}
.admin-metric-card[data-group="quotes"] { --metric-accent: #d19616; }
.admin-metric-card[data-group="sales"] { --metric-accent: #21884b; }
.admin-metric-card[data-group="inventory"] { --metric-accent: #5762b7; }
.admin-ring {
  --ring-value: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(var(--metric-accent) calc(var(--ring-value) * 1%), #eee7e9 0);
  transition: --ring-value 900ms cubic-bezier(.2,.7,.2,1);
}
.admin-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px #f0eaec; }
.admin-ring-content { position: relative; z-index: 1; display: grid; place-items: center; text-align: center; max-width: 75px; }
.admin-ring-content strong { font-size: 1.02rem; line-height: 1.05; color: #2a1c21; overflow-wrap: anywhere; }
.admin-ring-content span { margin-top: 3px; color: #8b747d; font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.admin-metric-copy h4 { margin: 0 0 6px; font-size: .93rem; }
.admin-metric-copy p { margin: 0; color: #7d6971; font-size: .75rem; line-height: 1.4; }
.admin-metric-copy .admin-metric-detail { display: inline-block; margin-top: 8px; padding: 5px 8px; border-radius: 999px; color: var(--metric-accent); background: color-mix(in srgb, var(--metric-accent) 10%, white); font-size: .67rem; font-weight: 850; }

.admin-ranking-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-top: 14px; }
.admin-ranking-card { padding: 15px; border: 1px solid #e7e1e3; border-radius: 17px; background: #fcfbfc; }
.admin-ranking-title { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.admin-ranking-title > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: #14733d; background: #e3f5e9; font-weight: 950; }
.admin-ranking-card:nth-child(2) .admin-ranking-title > span { color: #9a6400; background: #fff0c7; }
.admin-ranking-title strong,
.admin-ranking-title small { display: block; }
.admin-ranking-title small { color: #89757d; }
.admin-product-ranking { display: grid; gap: 8px; }
.admin-ranking-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px; border-radius: 12px; background: #fff; }
.admin-ranking-row img,
.admin-ranking-row .admin-ranking-placeholder { width: 36px; height: 36px; object-fit: cover; display: grid; place-items: center; border-radius: 9px; background: #f1edef; }
.admin-ranking-row strong,
.admin-ranking-row small { display: block; }
.admin-ranking-row strong { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-ranking-row small { color: #8b747d; font-size: .68rem; }
.admin-ranking-units { color: #7c1029; font-size: .74rem; font-weight: 900; white-space: nowrap; }
.admin-empty-data { padding: 16px; border: 1px dashed #e3d7db; border-radius: 13px; color: #8a747c; text-align: center; font-size: .78rem; }

.admin-methodology-card { padding: 17px; border-radius: 18px; color: #5f4b53; background: #eee9eb; }
.admin-methodology-card h3 { margin: 0 0 8px; color: #3a2830; }
.admin-methodology-card p { margin: 6px 0; font-size: .78rem; line-height: 1.5; }

@property --ring-value { syntax: "<number>"; inherits: false; initial-value: 0; }

html[data-theme="dark"] body.admin-session,
html[data-theme="dark"] body.admin-session #adminDashboardModal { background: #10090c !important; }
html[data-theme="dark"] .admin-dashboard-card { background: #130c0f; }
html[data-theme="dark"] .admin-period-toolbar,
html[data-theme="dark"] .admin-data-toolbar,
html[data-theme="dark"] .admin-metric-section,
html[data-theme="dark"] .admin-data-notice { border-color: rgba(255,255,255,.09); background: #21151a; color: #d7c9ce; }
html[data-theme="dark"] .admin-period-buttons button { border-color: rgba(255,255,255,.1); color: #d9cbd0; background: #2c1c22; }
html[data-theme="dark"] .admin-period-buttons button.active { color: #fff; background: linear-gradient(135deg, #c71c43, #7b0d27); }
html[data-theme="dark"] .admin-period-summary strong,
html[data-theme="dark"] .admin-data-notice strong,
html[data-theme="dark"] .admin-section-heading h3 { color: #fff2f6; }
html[data-theme="dark"] .admin-period-summary span,
html[data-theme="dark"] .admin-data-toolbar small,
html[data-theme="dark"] .admin-section-heading small { color: #bdaab1; }
html[data-theme="dark"] .admin-custom-range input { border-color: rgba(255,255,255,.1); background: #2a1b20; color: #fff; color-scheme: dark; }
html[data-theme="dark"] .admin-metric-card { border-color: rgba(255,255,255,.08); background: linear-gradient(145deg, #26191e, #21151a); }
html[data-theme="dark"] .admin-ring { background: conic-gradient(var(--metric-accent) calc(var(--ring-value) * 1%), #49353d 0); }
html[data-theme="dark"] .admin-ring::before { background: #21151a; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
html[data-theme="dark"] .admin-ring-content strong,
html[data-theme="dark"] .admin-metric-copy h4 { color: #fff2f6; }
html[data-theme="dark"] .admin-ring-content span,
html[data-theme="dark"] .admin-metric-copy p { color: #bdaab1; }
html[data-theme="dark"] .admin-ranking-card { border-color: rgba(255,255,255,.08); background: #1c1216; }
html[data-theme="dark"] .admin-ranking-row { background: #291b20; }
html[data-theme="dark"] .admin-ranking-row strong { color: #fff0f4; }
html[data-theme="dark"] .admin-methodology-card { color: #ccbfc4; background: #271a1f; }
html[data-theme="dark"] .admin-methodology-card h3 { color: #fff1f5; }

@media (max-width: 1050px) {
  .admin-period-toolbar { grid-template-columns: 1fr; }
  .admin-period-summary { justify-items: start; }
  .admin-data-toolbar { grid-template-columns: 1fr; }
  .admin-data-actions { justify-content: flex-start; }
}
@media (max-width: 760px) {
  body.admin-session #adminDashboardModal .admin-dashboard-card { height: 100dvh; }
  .admin-dashboard-head { align-items: flex-start; flex-direction: column; padding: 18px; }
  .admin-head-actions { width: 100%; justify-content: stretch; }
  .admin-compact-btn { flex: 1 1 auto; }
  .admin-period-toolbar,
  .admin-data-toolbar { padding-inline: 14px; }
  .admin-custom-range { align-items: stretch; flex-direction: column; }
  .admin-data-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .admin-dashboard-scroll { padding: 14px; }
  .admin-data-notice,
  .admin-section-heading { align-items: flex-start; flex-direction: column; }
  .admin-metric-card { grid-template-columns: 88px minmax(0, 1fr); }
  .admin-ring { width: 82px; height: 82px; }
  .admin-ring::before { inset: 9px; }
  .admin-ranking-grid { grid-template-columns: 1fr; }
}
.admin-dashboard-head #adminRefreshMetrics {
  border-color: rgba(255,255,255,.42) !important;
  color: #fff !important;
  background: rgba(255,255,255,.1) !important;
}
.admin-dashboard-head #adminRefreshMetrics:hover {
  background: rgba(255,255,255,.2) !important;
}


/* ===== v71 admin métricas circulares interactivas ===== */
.admin-pie-dashboard { display:grid; gap:18px; }
.admin-pie-showcase {
  display:grid; grid-template-columns: minmax(300px, 1.1fr) minmax(250px, .9fr); gap:18px; align-items:center;
  padding:18px; border-radius:26px; background:linear-gradient(180deg, rgba(255,251,252,.95), rgba(255,245,248,.9));
  border:1px solid rgba(118,15,36,.08); box-shadow:0 14px 30px rgba(118,15,36,.06);
}
.admin-pie-figure-wrap { display:grid; place-items:center; min-height:350px; }
.admin-pie-figure { --size: 320px; position:relative; width:var(--size); height:calc(var(--size) * .85); transform-style:preserve-3d; }
.admin-pie-figure-top,.admin-pie-figure-depth { position:absolute; inset:auto 0 0 0; margin:auto; width:82%; aspect-ratio:1/1; border-radius:50%; }
.admin-pie-figure-top { top:8px; bottom:auto; background:var(--pie-gradient); z-index:2; transform:translateY(0) rotateX(54deg); box-shadow:0 22px 26px rgba(48,14,34,.18), inset 0 12px 18px rgba(255,255,255,.16); animation:adminPieFloat 5s ease-in-out infinite; }
.admin-pie-figure-depth { top:30px; bottom:auto; background:var(--pie-gradient); filter:brightness(.72) saturate(.9); z-index:1; transform:translateY(20px) rotateX(54deg) scaleY(1.06); opacity:.98; }
.admin-pie-center-card { position:absolute; inset:34% auto auto 50%; transform:translateX(-50%); z-index:4; min-width:152px; max-width:196px; padding:12px 14px; border-radius:18px; background:#fff; border:1px solid rgba(118,15,36,.14); box-shadow:0 16px 28px rgba(26,18,25,.14); text-align:center; }
.admin-pie-center-card small { display:block; color:#866f77; font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; }
.admin-pie-center-card strong { display:block; margin-top:6px; font-size:1.45rem; color:#24171d; }
.admin-pie-center-card span { display:block; margin-top:3px; color:#5e4a51; font-size:.8rem; }
.admin-pie-callout { position:absolute; left:var(--callout-x); top:var(--callout-y); transform:translate(-50%, -50%); min-width:118px; max-width:156px; padding:10px 12px; border-radius:18px; border:2px solid var(--callout-color); background:#fff; color:#23161c; z-index:5; text-align:center; box-shadow:0 14px 28px rgba(35,22,28,.12); transition:transform .18s ease, box-shadow .18s ease, background .18s ease; }
.admin-pie-callout strong { display:block; font-size:1.35rem; line-height:1; color:#161015; }
.admin-pie-callout span { display:block; margin-top:5px; font-size:.74rem; line-height:1.25; color:#56454d; }
.admin-pie-callout::before { content:""; position:absolute; inset:auto auto -10px 50%; width:2px; height:18px; background:var(--callout-color); transform:translateX(-50%); opacity:.9; }
.admin-pie-callout::after { content:""; position:absolute; width:10px; height:10px; border-radius:999px; background:var(--callout-color); left:50%; bottom:-21px; transform:translateX(-50%); }
.admin-pie-callout:hover,.admin-pie-callout.active { transform:translate(-50%, -50%) scale(1.04); box-shadow:0 20px 34px rgba(35,22,28,.18); background:#fffdfd; }
.admin-pie-callout.active { outline:4px solid rgba(255,255,255,.56); }
.admin-pie-detail { display:grid; align-items:center; }
.admin-detail-card { border-radius:24px; border:1px solid rgba(118,15,36,.10); padding:18px 18px 20px; background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,248,250,.95)); box-shadow:0 12px 24px rgba(118,15,36,.08); }
.admin-detail-kicker { display:inline-block; padding:7px 12px; border-radius:999px; background:#fff1f5; color:#c41135; font-weight:800; font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; }
.admin-detail-card h4 { margin:12px 0 10px; font-size:1.25rem; color:#23161c; }
.admin-detail-value-row { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-bottom:10px; }
.admin-detail-value-row strong { font-size:2rem; line-height:1; color:#141013; }
.admin-detail-value-row span { color:#745f66; font-size:.84rem; }
.admin-detail-card p { margin:0; color:#5e4a51; line-height:1.55; }
.admin-detail-pill { display:inline-flex; margin-top:12px; padding:8px 12px; border-radius:999px; background:#f8e9ed; color:#a11935; font-weight:700; font-size:.78rem; }
.admin-detail-list { margin:14px 0 0; padding-left:18px; color:#49363d; line-height:1.55; }
.admin-detail-list li+li { margin-top:7px; }
.admin-pie-animate { animation:adminPieAppear .65s cubic-bezier(.18,.86,.3,1.05); }
@keyframes adminPieAppear { from { opacity:0; transform:translateY(14px) scale(.96); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes adminPieFloat { 0%,100% { transform:translateY(0) rotateX(54deg); } 50% { transform:translateY(-4px) rotateX(54deg); } }
html[data-theme='dark'] .admin-pie-showcase { background:linear-gradient(180deg, rgba(34,24,28,.96), rgba(22,15,18,.92)); border-color:rgba(255,255,255,.08); box-shadow:none; }
html[data-theme='dark'] .admin-pie-center-card,html[data-theme='dark'] .admin-pie-callout,html[data-theme='dark'] .admin-detail-card { background:#251b1f; color:#fff4f6; border-color:rgba(255,255,255,.12); box-shadow:none; }
html[data-theme='dark'] .admin-pie-center-card strong,html[data-theme='dark'] .admin-pie-callout strong,html[data-theme='dark'] .admin-detail-card h4,html[data-theme='dark'] .admin-detail-value-row strong { color:#fff4f6; }
html[data-theme='dark'] .admin-pie-center-card small,html[data-theme='dark'] .admin-pie-center-card span,html[data-theme='dark'] .admin-pie-callout span,html[data-theme='dark'] .admin-detail-card p,html[data-theme='dark'] .admin-detail-value-row span,html[data-theme='dark'] .admin-detail-list { color:#d6c4cb; }
html[data-theme='dark'] .admin-detail-kicker { background:#3a242c; color:#ff8ea9; }
html[data-theme='dark'] .admin-detail-pill { background:#3b2a31; color:#ff90ab; }
@media (max-width:1080px){ .admin-pie-showcase{grid-template-columns:1fr;} }
@media (max-width:760px){ .admin-pie-figure{--size:270px;} .admin-pie-showcase{padding:14px;} .admin-pie-callout{min-width:100px;max-width:128px;padding:8px 10px;} .admin-pie-callout strong{font-size:1.1rem;} }
@media (max-width:560px){ .admin-pie-figure-wrap{min-height:300px;} .admin-pie-figure{--size:230px;} .admin-pie-callout{position:relative;left:auto;top:auto;transform:none;margin:0 auto 10px;display:block;} .admin-pie-callout::before,.admin-pie-callout::after{display:none;} }

/* ===== v70 BETA selector multilingüe ===== */
.language-icon-toggle {
  width: 42px; height: 42px; display:inline-grid; place-items:center; flex:0 0 42px;
  border:1px solid rgba(118,15,36,.16); border-radius:999px; background:#fff;
  color:var(--ink); cursor:pointer; font-size:1.18rem; box-shadow:0 8px 20px rgba(118,15,36,.08);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.language-icon-toggle:hover { transform:translateY(-1px); box-shadow:0 11px 24px rgba(118,15,36,.14); }
.login-preference-actions { display:flex; align-items:center; gap:8px; }
.language-menu-backdrop { position:fixed; inset:0; z-index:10020; background:rgba(20,10,14,.26); backdrop-filter:blur(2px); opacity:0; pointer-events:none; transition:opacity .18s ease; }
.language-menu-backdrop.show { opacity:1; pointer-events:auto; }
.language-menu {
  position:fixed; z-index:10030; top:74px; right:18px; width:min(360px,calc(100vw - 28px));
  padding:14px; border:1px solid rgba(118,15,36,.16); border-radius:20px; background:#fff;
  color:#21191c; box-shadow:0 24px 70px rgba(30,13,20,.24); opacity:0; transform:translateY(-10px) scale(.98);
  pointer-events:none; transition:opacity .18s ease, transform .18s ease;
}
.language-menu.show { opacity:1; transform:translateY(0) scale(1); pointer-events:auto; }
.language-menu-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:3px 3px 11px; }
.language-menu-head strong,.language-menu-head small { display:block; }
.language-menu-head small { margin-top:2px; color:#806c73; font-size:.74rem; }
.language-menu-close { width:34px; height:34px; border:0; border-radius:999px; background:#f7eef1; color:#760f24; cursor:pointer; }
.language-menu-options { display:grid; gap:8px; }
.language-menu-options>button {
  display:grid; grid-template-columns:42px 1fr auto; align-items:center; gap:11px; width:100%; padding:11px 12px;
  border:1px solid #eadde1; border-radius:15px; background:#fff; color:#21191c; text-align:left; cursor:pointer;
}
.language-menu-options>button:hover { border-color:rgba(190,18,52,.38); background:#fff8fa; }
.language-menu-options>button.active { border-color:#c41135; background:#fff1f4; box-shadow:inset 4px 0 #c41135; }
.language-menu-options>button>span { font-size:1.55rem; }
.language-menu-options strong,.language-menu-options small { display:block; }
.language-menu-options small { margin-top:2px; color:#806c73; font-size:.72rem; }
.language-menu-options>button.active::after { content:'✓'; display:grid; place-items:center; width:24px; height:24px; border-radius:999px; background:#c41135; color:#fff; font-weight:900; }
.language-menu-note { margin:10px 3px 0; color:#806c73; font-size:.72rem; line-height:1.4; }
html[data-theme='dark'] .language-icon-toggle { background:#2b2024; color:#fff; border-color:rgba(255,255,255,.14); }
html[data-theme='dark'] .language-menu { background:#251b1f; color:#fff4f6; border-color:rgba(255,255,255,.12); }
html[data-theme='dark'] .language-menu-options>button { background:#2c2025; color:#fff4f6; border-color:rgba(255,255,255,.11); }
html[data-theme='dark'] .language-menu-options>button:hover,html[data-theme='dark'] .language-menu-options>button.active { background:#38232b; }
html[data-theme='dark'] .language-menu-head small,html[data-theme='dark'] .language-menu-options small,html[data-theme='dark'] .language-menu-note { color:#d0bdc4; }
@media(max-width:760px){ .language-menu{top:64px;right:10px}.language-icon-toggle{width:38px;height:38px;flex-basis:38px}.header-actions{gap:6px} }


/* ===== v73 métricas circulares limpias, accesibles e interactivas ===== */
.admin-pie-dashboard { display:grid; gap:16px; }
.admin-pie-showcase {
  display:grid;
  grid-template-columns:minmax(270px,.82fr) minmax(270px,1fr) minmax(280px,1.05fr);
  gap:18px;
  align-items:stretch;
  padding:20px;
  border-radius:26px;
  background:linear-gradient(145deg,#fff 0%,#fff8fa 100%);
  border:1px solid rgba(118,15,36,.09);
  box-shadow:0 18px 38px rgba(75,23,42,.07);
}
.admin-pie-chart-column { display:grid; align-content:center; justify-items:center; min-width:0; }
.admin-clean-donut { position:relative; width:min(300px,100%); aspect-ratio:1; display:grid; place-items:center; }
.admin-donut-svg { width:100%; height:100%; overflow:visible; transform:rotate(-90deg); filter:drop-shadow(0 14px 18px rgba(47,18,31,.12)); }
.admin-donut-track,.admin-donut-empty { fill:none; stroke:#eee5e8; stroke-width:20; }
.admin-donut-empty { stroke:#e6dde0; stroke-dasharray:84 16; opacity:.85; }
.admin-donut-segment {
  fill:none;
  stroke:var(--segment-color);
  stroke-width:20;
  stroke-linecap:butt;
  stroke-dasharray:0 100;
  stroke-dashoffset:var(--segment-offset);
  cursor:pointer;
  transition:stroke-width .2s ease,filter .2s ease,opacity .2s ease;
  animation:adminDonutDraw .72s cubic-bezier(.2,.82,.25,1) forwards;
  animation-delay:var(--segment-delay);
}
.admin-donut-segment:hover,.admin-donut-segment.active { stroke-width:25; filter:brightness(1.08) drop-shadow(0 0 4px rgba(0,0,0,.12)); }
.admin-donut-segment:focus-visible { outline:none; stroke-width:25; filter:drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px var(--segment-color)); }
.admin-donut-center {
  position:absolute;
  width:48%;
  aspect-ratio:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:12px;
  border-radius:50%;
  background:rgba(255,255,255,.96);
  box-shadow:0 12px 28px rgba(48,18,31,.13);
  pointer-events:none;
}
.admin-donut-center small { max-width:90%; color:#826d75; font-size:.67rem; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.admin-donut-center strong { margin-top:7px; color:#21161b; font-size:1.55rem; line-height:1; overflow-wrap:anywhere; }
.admin-donut-center span { max-width:94%; margin-top:6px; color:#624f56; font-size:.76rem; line-height:1.25; }
.admin-pie-instruction { max-width:300px; margin:8px 0 0; color:#806b73; font-size:.76rem; line-height:1.45; text-align:center; }
.admin-pie-legend { display:grid; gap:8px; align-content:center; min-width:0; }
.admin-pie-legend-item {
  display:grid;
  grid-template-columns:13px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  width:100%;
  padding:10px 12px;
  border:1px solid rgba(118,15,36,.09);
  border-radius:15px;
  background:#fff;
  color:#281a20;
  text-align:left;
  cursor:pointer;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.admin-pie-legend-item:hover { transform:translateX(3px); border-color:var(--legend-color); box-shadow:0 8px 18px rgba(74,23,41,.08); }
.admin-pie-legend-item.active { border-color:var(--legend-color); background:color-mix(in srgb,var(--legend-color) 8%,#fff); box-shadow:inset 4px 0 var(--legend-color),0 9px 20px rgba(74,23,41,.08); }
.admin-pie-legend-dot { width:11px; height:11px; border-radius:50%; background:var(--legend-color); box-shadow:0 0 0 4px color-mix(in srgb,var(--legend-color) 17%,transparent); }
.admin-pie-legend-copy { min-width:0; }
.admin-pie-legend-copy strong,.admin-pie-legend-copy small { display:block; }
.admin-pie-legend-copy strong { color:#2c1b22; font-size:.82rem; line-height:1.25; }
.admin-pie-legend-copy small { margin-top:3px; color:#88737b; font-size:.67rem; line-height:1.28; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.admin-pie-legend-item b { color:#24171d; font-size:.9rem; white-space:nowrap; }
.admin-pie-detail { min-width:0; display:grid; }
.admin-detail-card { height:100%; box-sizing:border-box; }
.admin-detail-variants { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:15px; }
.admin-detail-variants>div { min-width:0; padding:10px; border-radius:14px; background:#faf1f4; border:1px solid rgba(118,15,36,.07); }
.admin-detail-variants span,.admin-detail-variants strong { display:block; }
.admin-detail-variants span { color:#8b757d; font-size:.66rem; }
.admin-detail-variants strong { margin-top:5px; color:#321d25; font-size:.8rem; overflow-wrap:anywhere; }
.admin-detail-help { margin-top:14px !important; padding-top:12px; border-top:1px dashed rgba(118,15,36,.15); font-size:.73rem; }
.admin-metric-summary { border:1px solid rgba(118,15,36,.08); border-radius:18px; background:#fff; overflow:hidden; }
.admin-metric-summary>summary { padding:13px 16px; color:#6f1228; font-weight:850; cursor:pointer; list-style:none; }
.admin-metric-summary>summary::-webkit-details-marker { display:none; }
.admin-metric-summary>summary::after { content:"＋"; float:right; }
.admin-metric-summary[open]>summary::after { content:"−"; }
.admin-metric-summary .admin-metric-grid { padding:0 14px 14px; }
.admin-metric-card-selectable { cursor:pointer; transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.admin-metric-card-selectable:hover,.admin-metric-card-selectable.active { transform:translateY(-2px); border-color:#c41135; box-shadow:0 12px 24px rgba(118,15,36,.10); }
@keyframes adminDonutDraw { to { stroke-dasharray:var(--segment-size) var(--segment-gap); } }

html[data-theme="dark"] .admin-pie-showcase { background:linear-gradient(145deg,#251a1e,#191115); border-color:rgba(255,255,255,.08); box-shadow:none; }
html[data-theme="dark"] .admin-donut-track,html[data-theme="dark"] .admin-donut-empty { stroke:#403238; }
html[data-theme="dark"] .admin-donut-center { background:rgba(35,24,29,.97); box-shadow:0 12px 28px rgba(0,0,0,.25); }
html[data-theme="dark"] .admin-donut-center strong,html[data-theme="dark"] .admin-donut-center span { color:#fff2f6; }
html[data-theme="dark"] .admin-donut-center small,html[data-theme="dark"] .admin-pie-instruction { color:#cbb7bf; }
html[data-theme="dark"] .admin-pie-legend-item,html[data-theme="dark"] .admin-metric-summary { background:#24191e; color:#fff; border-color:rgba(255,255,255,.09); }
html[data-theme="dark"] .admin-pie-legend-item.active { background:color-mix(in srgb,var(--legend-color) 16%,#24191e); }
html[data-theme="dark"] .admin-pie-legend-copy strong,html[data-theme="dark"] .admin-pie-legend-item b { color:#fff2f6; }
html[data-theme="dark"] .admin-pie-legend-copy small { color:#c5b2ba; }
html[data-theme="dark"] .admin-detail-variants>div { background:#312229; border-color:rgba(255,255,255,.08); }
html[data-theme="dark"] .admin-detail-variants span { color:#bdaab2; }
html[data-theme="dark"] .admin-detail-variants strong { color:#fff2f6; }
html[data-theme="dark"] .admin-metric-summary>summary { color:#ffadc0; }

@media(max-width:1180px){ .admin-pie-showcase{grid-template-columns:minmax(260px,.9fr) minmax(270px,1fr)} .admin-pie-detail{grid-column:1/-1} }
@media(max-width:820px){ .admin-pie-showcase{grid-template-columns:1fr} .admin-clean-donut{width:min(280px,90vw)} .admin-pie-legend{grid-template-columns:1fr 1fr} .admin-pie-detail{grid-column:auto} }
@media(max-width:560px){ .admin-pie-showcase{padding:14px} .admin-pie-legend{grid-template-columns:1fr} .admin-detail-variants{grid-template-columns:1fr} .admin-pie-legend-copy small{white-space:normal} }
@media(prefers-reduced-motion:reduce){ .admin-donut-segment{animation:none;stroke-dasharray:var(--segment-size) var(--segment-gap)} .admin-pie-legend-item,.admin-metric-card-selectable{transition:none} }

/* ===== v75 galería múltiple de productos y pegado desde portapapeles ===== */
.product-gallery-editor {
  display:grid;
  gap:12px;
  padding:16px;
  border:1px solid rgba(118,15,36,.13);
  border-radius:20px;
  background:linear-gradient(180deg,#fff,#fff8fa);
}
.product-gallery-editor-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.product-gallery-editor-head > div > span {
  display:block;
  font-size:.88rem;
  font-weight:900;
  color:#4b343b;
}
.product-gallery-editor-head small {
  display:block;
  margin-top:4px;
  color:#736168;
  line-height:1.45;
}
.product-gallery-count {
  flex:0 0 auto;
  padding:7px 10px;
  border-radius:999px;
  background:#f9e9ee;
  color:#a51431;
  font-size:.76rem;
  font-weight:900;
}
.product-image-url-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
}
.product-image-url-row .outline-btn { white-space:nowrap; }
.product-gallery-file-field {
  display:flex;
  flex-direction:column;
  gap:7px;
}
.product-image-paste-zone {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  min-height:92px;
  padding:16px;
  border:2px dashed rgba(190,18,52,.32);
  border-radius:18px;
  background:rgba(255,244,247,.8);
  color:#5f3b46;
  cursor:text;
  outline:none;
  transition:border-color .18s ease,background .18s ease,transform .18s ease,box-shadow .18s ease;
}
.product-image-paste-zone:hover,
.product-image-paste-zone:focus {
  border-color:#c41135;
  background:#fff0f4;
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(118,15,36,.09);
}
.product-image-paste-zone strong,
.product-image-paste-zone small { display:block; }
.product-image-paste-zone small { margin-top:4px; color:#7b626b; line-height:1.4; }
.product-image-paste-icon { font-size:1.8rem; }
.editor-preview-box.product-gallery-preview {
  min-height:170px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  align-items:stretch;
  justify-content:stretch;
  gap:12px;
  padding:12px;
  overflow:visible;
}
.editor-preview-box.product-gallery-preview.is-empty { display:flex; }
.product-gallery-empty {
  margin:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  text-align:center;
  color:#806d74;
}
.product-gallery-empty > span { font-size:2rem; }
.product-gallery-empty strong,.product-gallery-empty small { display:block; }
.product-gallery-edit-item {
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
  border:1px solid rgba(118,15,36,.13);
  border-radius:16px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 8px 20px rgba(36,18,25,.07);
}
.product-gallery-edit-item.is-primary {
  border-color:#c41135;
  box-shadow:0 10px 24px rgba(196,17,53,.14);
}
.product-gallery-edit-image {
  aspect-ratio:4/3;
  display:grid;
  place-items:center;
  background:#f6f2f3;
  overflow:hidden;
}
.product-gallery-edit-image img {
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fff;
}
.product-gallery-edit-meta { padding:9px 10px 5px; }
.product-gallery-edit-meta strong,
.product-gallery-edit-meta span { display:block; }
.product-gallery-edit-meta strong { color:#3b252d; font-size:.82rem; }
.product-gallery-edit-meta span { margin-top:2px; color:#806b73; font-size:.68rem; }
.product-gallery-edit-actions {
  display:flex;
  gap:5px;
  padding:7px 9px 9px;
  margin-top:auto;
}
.product-gallery-edit-actions button {
  flex:1;
  min-width:30px;
  height:30px;
  border:1px solid rgba(118,15,36,.13);
  border-radius:9px;
  background:#fff7f9;
  color:#8f102a;
  font-weight:900;
  cursor:pointer;
}
.product-gallery-edit-actions button:hover { background:#f9e5eb; }
.product-gallery-card-badge {
  position:absolute;
  right:10px;
  bottom:10px;
  z-index:4;
  padding:6px 9px;
  border-radius:999px;
  background:rgba(31,18,24,.82);
  color:#fff;
  font-size:.69rem;
  font-weight:900;
  box-shadow:0 6px 16px rgba(0,0,0,.18);
  backdrop-filter:blur(5px);
}
.product-detail-gallery {
  display:grid;
  align-content:start;
  gap:10px;
  min-width:0;
}
.product-detail-main-frame {
  position:relative;
  min-height:320px;
  height:360px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fafafa;
}
.product-detail-main-frame > img {
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fff;
  transition:opacity .18s ease,transform .24s ease;
}
.product-gallery-nav {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:3;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:999px;
  background:rgba(30,18,24,.74);
  color:#fff;
  font-size:1.75rem;
  line-height:1;
  cursor:pointer;
  box-shadow:0 8px 22px rgba(0,0,0,.18);
  backdrop-filter:blur(5px);
}
.product-gallery-nav:hover { background:#a80f2d; }
.product-gallery-nav.previous { left:12px; }
.product-gallery-nav.next { right:12px; }
.product-gallery-counter {
  position:absolute;
  right:12px;
  bottom:12px;
  z-index:3;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(30,18,24,.76);
  color:#fff;
  font-size:.72rem;
  font-weight:900;
  backdrop-filter:blur(5px);
}
.product-detail-thumbnails {
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:2px 2px 7px;
  scrollbar-width:thin;
}
.product-detail-thumbnail {
  flex:0 0 72px;
  height:72px;
  padding:3px;
  border:2px solid transparent;
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  overflow:hidden;
  box-shadow:0 4px 12px rgba(25,15,20,.08);
}
.product-detail-thumbnail img { width:100%;height:100%;object-fit:cover;border-radius:8px; }
.product-detail-thumbnail.active { border-color:#c41135; box-shadow:0 6px 16px rgba(196,17,53,.18); }
html[data-theme="dark"] .product-gallery-editor {
  background:linear-gradient(180deg,#251b1f,#1d1518);
  border-color:rgba(255,255,255,.1);
}
html[data-theme="dark"] .product-gallery-editor-head > div > span,
html[data-theme="dark"] .product-gallery-edit-meta strong { color:#fff4f6; }
html[data-theme="dark"] .product-gallery-editor-head small,
html[data-theme="dark"] .product-image-paste-zone small,
html[data-theme="dark"] .product-gallery-edit-meta span { color:#cdbac1; }
html[data-theme="dark"] .product-image-paste-zone { background:#2c2025;color:#f6e9ed;border-color:rgba(255,121,153,.36); }
html[data-theme="dark"] .product-image-paste-zone:hover,
html[data-theme="dark"] .product-image-paste-zone:focus { background:#38232b;border-color:#ff7797; }
html[data-theme="dark"] .product-gallery-edit-item,
html[data-theme="dark"] .product-gallery-edit-actions button,
html[data-theme="dark"] .product-detail-thumbnail { background:#2b2024;border-color:rgba(255,255,255,.11); }
html[data-theme="dark"] .product-detail-main-frame { background:#21181c;border-color:rgba(255,255,255,.1); }
@media(max-width:760px){
  .product-image-url-row{grid-template-columns:1fr;}
  .product-image-url-row .outline-btn{width:100%;}
  .editor-preview-box.product-gallery-preview{grid-template-columns:repeat(2,minmax(0,1fr));}
  .product-detail-main-frame{height:300px;min-height:280px;}
}
@media(max-width:480px){
  .product-gallery-editor-head{flex-direction:column;}
  .editor-preview-box.product-gallery-preview{grid-template-columns:1fr;}
  .product-image-paste-zone{align-items:flex-start;}
  .product-detail-thumbnail{flex-basis:62px;height:62px;}
}


/* ===== v77 flujo de presupuesto y compra detal/mayor ===== */
.product-purchase-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.product-purchase-actions .status-pill { grid-column: 1 / -1; }
.product-purchase-actions .status-pill,
.product-purchase-actions .purchase-retail-btn,
.product-purchase-actions .purchase-wholesale-btn {
  min-height: 46px;
  width: 100%;
  padding: 9px 8px;
  font-size: 12px;
  line-height: 1.15;
}
.product-purchase-actions .edit-price { grid-column: 1 / -1; }
.purchase-wholesale-btn,
.detail-purchase-grid .outline-mayor {
  background: #fff7df;
  border: 1px solid #d89a08;
  color: #9b6800;
  box-shadow: none;
}
.purchase-wholesale-btn:hover,
.detail-purchase-grid .outline-mayor:hover { background: #ffefbd; }
.product-purchase-actions button:disabled,
.detail-purchase-grid button:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.detail-purchase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.detail-purchase-grid > * { width: 100%; min-height: 46px; }
.detail-purchase-grid .detail-edit-product { grid-column: 1 / -1; }
.quote-form-modal { z-index: 160; }
.quote-form-card {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: clamp(20px, 3vw, 32px);
  border-radius: 26px;
}
.quote-form-hero {
  padding-right: 42px;
  margin-bottom: 18px;
}
.quote-form-hero h2 { margin: 5px 0 8px; font-size: clamp(1.65rem, 3vw, 2.25rem); }
.quote-form-hero p { margin: 0; color: var(--muted); line-height: 1.55; }
.quote-form-order-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.quote-form-order-summary > div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}
.quote-form-order-summary span { display: block; color: var(--muted); font-size: 12px; }
.quote-form-order-summary strong { display: block; margin-top: 5px; font-size: 1.35rem; }
.quote-form-wholesale-status {
  border: 1px solid rgba(180, 35, 24, .22);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fff7f5;
  color: #5e353b;
}
.quote-form-wholesale-status.ok {
  border-color: rgba(22, 130, 58, .22);
  background: #f4fff7;
}
.quote-form-wholesale-status strong { display: block; margin-bottom: 6px; }
.quote-form-wholesale-status p { margin: 0; line-height: 1.5; }
.quote-form-wholesale-status ul { margin: 7px 0 0; padding-left: 20px; }
.quote-return-cart-btn { margin-top: 12px; }
.quote-client-panel-modal { margin: 0; background: #fffafd; }
.quote-client-grid label { display: grid; gap: 6px; color: #5c424a; font-size: 12px; font-weight: 800; }
.quote-client-grid label .text-input { font-weight: 500; }
.quote-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.quote-form-actions button { min-width: 190px; }
.quote-form-actions .primary-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
@media (max-width: 760px) {
  .product-purchase-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-purchase-actions .status-pill { grid-column: 1 / -1; }
  .product-purchase-actions .edit-price { grid-column: 1 / -1; }
  .detail-purchase-grid { grid-template-columns: 1fr; }
  .detail-purchase-grid .detail-edit-product { grid-column: auto; }
  .quote-form-order-summary { grid-template-columns: 1fr; }
  .quote-form-actions { display: grid; grid-template-columns: 1fr; }
  .quote-form-actions button { width: 100%; min-width: 0; }
}
html[data-theme="dark"] .quote-form-order-summary > div,
html[data-theme="dark"] .quote-client-panel-modal { background: #241a1e; }
html[data-theme="dark"] .quote-form-wholesale-status { background: #342126; color: #f4dfe5; }
html[data-theme="dark"] .quote-form-wholesale-status.ok { background: #172a20; color: #dcf8e6; }

/* ===== v78: contraste global consistente en modo claro y oscuro ===== */
:root,
html[data-theme="light"] {
  --surface-text: #24171d;
  --surface-muted: #6d5961;
  --surface-heading: #1d1217;
  --surface-input: #ffffff;
  --surface-input-text: #24171d;
}

html[data-theme="light"] body,
html[data-theme="light"] main,
html[data-theme="light"] .modal-card,
html[data-theme="light"] .drawer-card,
html[data-theme="light"] .floating-panel,
html[data-theme="light"] .product-card,
html[data-theme="light"] .filter-card,
html[data-theme="light"] .catalog-toolbar,
html[data-theme="light"] .category-bar,
html[data-theme="light"] .promo-section,
html[data-theme="light"] .ad-carousel-section,
html[data-theme="light"] .ad-root-panel,
html[data-theme="light"] .root-inbox-card,
html[data-theme="light"] .backup-center-card,
html[data-theme="light"] .vendor-dashboard-card,
html[data-theme="light"] .admin-dashboard-card,
html[data-theme="light"] .quote-client-panel,
html[data-theme="light"] .quote-validation-card,
html[data-theme="light"] .invoice-alert-box {
  color: var(--surface-text) !important;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] label,
html[data-theme="light"] legend,
html[data-theme="light"] .product-title-btn,
html[data-theme="light"] .drawer-head,
html[data-theme="light"] .drawer-head h2,
html[data-theme="light"] .modal-card h2,
html[data-theme="light"] .modal-card h3,
html[data-theme="light"] .quote-client-head h3,
html[data-theme="light"] .quote-validation-card strong,
html[data-theme="light"] .invoice-alert-box strong {
  color: var(--surface-heading) !important;
}

html[data-theme="light"] p,
html[data-theme="light"] small,
html[data-theme="light"] .muted,
html[data-theme="light"] .secondary,
html[data-theme="light"] .field-label,
html[data-theme="light"] .quote-client-copy,
html[data-theme="light"] .quote-help-note,
html[data-theme="light"] .quote-validation-card ul,
html[data-theme="light"] .admin-detail-card p,
html[data-theme="light"] .admin-detail-list {
  color: var(--surface-muted) !important;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select,
html[data-theme="light"] .text-input,
html[data-theme="light"] .search-box {
  color: var(--surface-input-text) !important;
  background-color: var(--surface-input) !important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #7f6d74 !important;
  opacity: 1;
}

/* Superficies oscuras o rojas conservan texto blanco en modo claro. */
html[data-theme="light"] .site-header,
html[data-theme="light"] .site-header *,
html[data-theme="light"] .top-strip,
html[data-theme="light"] .top-strip *,
html[data-theme="light"] .admin-dashboard-head,
html[data-theme="light"] .admin-dashboard-head *,
html[data-theme="light"] .vendor-exclusive-head,
html[data-theme="light"] .vendor-exclusive-head *,
html[data-theme="light"] .hero.public-hero.root-active #rootMetricsPanel,
html[data-theme="light"] .hero.public-hero.root-active #rootMetricsPanel *,
html[data-theme="light"] .primary-btn,
html[data-theme="light"] .login-pill,
html[data-theme="light"] .side-tab,
html[data-theme="light"] .status-pill.disponible,
html[data-theme="light"] .stock-badge.disponible {
  color: #ffffff !important;
}

html[data-theme="dark"] {
  --surface-text: #f8f1f3;
  --surface-muted: #d0c0c6;
  --surface-heading: #ffffff;
  --surface-input: #251b1f;
  --surface-input-text: #ffffff;
}

html[data-theme="dark"] body,
html[data-theme="dark"] main,
html[data-theme="dark"] section,
html[data-theme="dark"] article,
html[data-theme="dark"] aside,
html[data-theme="dark"] nav,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .drawer-card,
html[data-theme="dark"] .floating-panel,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .filter-card,
html[data-theme="dark"] .catalog-toolbar,
html[data-theme="dark"] .category-bar,
html[data-theme="dark"] .promo-section,
html[data-theme="dark"] .ad-carousel-section,
html[data-theme="dark"] .ad-root-panel,
html[data-theme="dark"] .root-inbox-card,
html[data-theme="dark"] .backup-center-card,
html[data-theme="dark"] .vendor-dashboard-card,
html[data-theme="dark"] .admin-dashboard-card,
html[data-theme="dark"] .quote-client-panel,
html[data-theme="dark"] .quote-validation-card,
html[data-theme="dark"] .invoice-alert-box,
html[data-theme="dark"] .admin-detail-card,
html[data-theme="dark"] .admin-ranking-card {
  color: var(--surface-text) !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] label,
html[data-theme="dark"] legend,
html[data-theme="dark"] strong,
html[data-theme="dark"] b,
html[data-theme="dark"] .product-title-btn,
html[data-theme="dark"] .drawer-head,
html[data-theme="dark"] .drawer-head h2,
html[data-theme="dark"] .quote-client-head h3,
html[data-theme="dark"] .quote-validation-card strong,
html[data-theme="dark"] .invoice-alert-box strong,
html[data-theme="dark"] .admin-section-heading h3,
html[data-theme="dark"] .admin-detail-card h4,
html[data-theme="dark"] .admin-ranking-title strong {
  color: var(--surface-heading) !important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] small,
html[data-theme="dark"] span,
html[data-theme="dark"] li,
html[data-theme="dark"] td,
html[data-theme="dark"] th,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .secondary,
html[data-theme="dark"] .field-label,
html[data-theme="dark"] .quote-client-copy,
html[data-theme="dark"] .quote-help-note,
html[data-theme="dark"] .quote-validation-card ul,
html[data-theme="dark"] .admin-detail-card p,
html[data-theme="dark"] .admin-detail-list,
html[data-theme="dark"] .admin-section-heading small,
html[data-theme="dark"] .admin-data-notice span {
  color: var(--surface-muted) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] option,
html[data-theme="dark"] .text-input,
html[data-theme="dark"] .search-box {
  color: var(--surface-input-text) !important;
  background-color: var(--surface-input) !important;
  border-color: rgba(255,255,255,.18) !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #b9a8ae !important;
  opacity: 1;
}

html[data-theme="dark"] .quote-client-panel,
html[data-theme="dark"] .quote-validation-card,
html[data-theme="dark"] .invoice-alert-box,
html[data-theme="dark"] .quote-item,
html[data-theme="dark"] .admin-detail-card,
html[data-theme="dark"] .admin-ranking-card,
html[data-theme="dark"] .admin-methodology-card,
html[data-theme="dark"] .admin-data-notice {
  background: #251b1f !important;
  border-color: rgba(255,255,255,.15) !important;
}
html[data-theme="dark"] .quote-validation-card.ok,
html[data-theme="dark"] .invoice-alert-box.ok {
  background: #173025 !important;
  border-color: rgba(102,224,157,.28) !important;
}
html[data-theme="dark"] .quote-item-warning {
  color: #ffd9d2 !important;
  background: #4a211d !important;
}
html[data-theme="dark"] .quote-mode-badge {
  color: #ffc1d0 !important;
  background: #46212b !important;
  border-color: rgba(255,193,208,.25) !important;
}
html[data-theme="dark"] .quote-mode-badge.mayor {
  color: #ffe1a3 !important;
  background: #483817 !important;
  border-color: rgba(255,225,163,.28) !important;
}
html[data-theme="dark"] .quote-required-pill,
html[data-theme="dark"] .admin-detail-kicker,
html[data-theme="dark"] .admin-detail-pill {
  color: #ffadc0 !important;
  background: #44232c !important;
}
html[data-theme="dark"] .quote-form-message { color: #ffb3a8 !important; }
html[data-theme="dark"] .quote-form-message.ok { color: #8fe1ae !important; }

/* Los presupuestos también adoptan el tema en pantalla; al imprimir vuelven a blanco y negro. */
@media screen {
  html[data-theme="dark"] .invoice-sheet,
  html[data-theme="dark"] .budget-sheet,
  html[data-theme="dark"] .vendor-budget-sheet {
    color: #f8f1f3 !important;
    background: #181115 !important;
    border-color: rgba(255,255,255,.20) !important;
  }
  html[data-theme="dark"] .invoice-sheet *,
  html[data-theme="dark"] .budget-sheet *,
  html[data-theme="dark"] .vendor-budget-sheet * {
    color: inherit !important;
    border-color: rgba(255,255,255,.24) !important;
  }
  html[data-theme="dark"] .budget-note,
  html[data-theme="dark"] .budget-total-box,
  html[data-theme="dark"] .budget-info-box,
  html[data-theme="dark"] .budget-table th,
  html[data-theme="dark"] .budget-table td {
    color: #f8f1f3 !important;
    border-color: rgba(255,255,255,.28) !important;
  }
}

/* Componentes con fondo de acción conservan contraste blanco. */
html[data-theme="dark"] .primary-btn,
html[data-theme="dark"] .login-pill,
html[data-theme="dark"] .side-tab,
html[data-theme="dark"] .status-pill.disponible,
html[data-theme="dark"] .stock-badge.disponible,
html[data-theme="dark"] .vendor-message.vendor p,
html[data-theme="dark"] .admin-dashboard-head,
html[data-theme="dark"] .admin-dashboard-head *,
html[data-theme="dark"] .vendor-exclusive-head,
html[data-theme="dark"] .vendor-exclusive-head *,
html[data-theme="dark"] .hero.public-hero.root-active #rootMetricsPanel,
html[data-theme="dark"] .hero.public-hero.root-active #rootMetricsPanel * {
  color: #ffffff !important;
}

@media print {
  html[data-theme="dark"] .invoice-sheet,
  html[data-theme="dark"] .budget-sheet,
  html[data-theme="dark"] .vendor-budget-sheet,
  html[data-theme="dark"] .invoice-sheet *,
  html[data-theme="dark"] .budget-sheet *,
  html[data-theme="dark"] .vendor-budget-sheet * {
    color: #111111 !important;
    background: #ffffff !important;
    border-color: #333333 !important;
  }
}

/* ===== v79 selector de disponibilidad en editor ROOT ===== */
.product-stock-editor-field {
  display:grid; gap:7px; align-content:start; padding:12px; border-radius:16px;
  background:linear-gradient(180deg, rgba(255,249,251,.96), rgba(255,244,247,.86));
  border:1px solid rgba(185,20,54,.13);
}
.product-stock-editor-field > span { font-weight:850; color:var(--ink); }
.product-stock-editor-field small { color:var(--muted); line-height:1.4; }
html[data-theme="dark"] .product-stock-editor-field { background:#281b20; border-color:rgba(255,255,255,.12); }
html[data-theme="dark"] .product-stock-editor-field > span { color:#fff; }
html[data-theme="dark"] .product-stock-editor-field small { color:#d4c3ca; }


/* ===== v80: contraste definitivo de búsqueda y acceso al carrito ===== */
html[data-theme="light"] .site-header .search-box {
  background: #ffffff !important;
  border-color: #d9d2d5 !important;
  box-shadow: 0 4px 14px rgba(43, 24, 32, .04) !important;
}
html[data-theme="light"] .site-header .search-box input,
html[data-theme="light"] .site-header .search-box input:focus,
html[data-theme="light"] .site-header .search-box input:not(:placeholder-shown) {
  color: #24171d !important;
  background: transparent !important;
  caret-color: #c41135 !important;
  -webkit-text-fill-color: #24171d !important;
  opacity: 1 !important;
}
html[data-theme="light"] .site-header .search-box input::placeholder {
  color: #78656c !important;
  -webkit-text-fill-color: #78656c !important;
  opacity: 1 !important;
}
html[data-theme="light"] .site-header .search-box > span,
html[data-theme="light"] .site-header #clearSearch {
  color: #5d4650 !important;
  -webkit-text-fill-color: #5d4650 !important;
}
html[data-theme="light"] .site-header #quoteButton,
html[data-theme="light"] .site-header #quoteButton span {
  color: #24171d !important;
  -webkit-text-fill-color: #24171d !important;
}
html[data-theme="light"] .site-header #quoteButton b,
html[data-theme="light"] .site-header #quoteCount {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="dark"] .site-header .search-box {
  background: #251b1f !important;
  border-color: rgba(255,255,255,.22) !important;
  box-shadow: 0 4px 18px rgba(0,0,0,.18) !important;
}
html[data-theme="dark"] .site-header .search-box input,
html[data-theme="dark"] .site-header .search-box input:focus,
html[data-theme="dark"] .site-header .search-box input:not(:placeholder-shown) {
  color: #ffffff !important;
  background: transparent !important;
  caret-color: #ff6f91 !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .site-header .search-box input::placeholder {
  color: #c6b6bc !important;
  -webkit-text-fill-color: #c6b6bc !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .site-header .search-box > span,
html[data-theme="dark"] .site-header #clearSearch,
html[data-theme="dark"] .site-header #quoteButton,
html[data-theme="dark"] .site-header #quoteButton span {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-theme="dark"] .site-header #quoteButton b,
html[data-theme="dark"] .site-header #quoteCount {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.site-header .search-box input {
  font-weight: 600;
}
.site-header .search-box:focus-within {
  border-color: #c41135 !important;
  box-shadow: 0 0 0 3px rgba(196,17,53,.12) !important;
}


/* ===== v81 gestión de categorías ROOT y contraste del vendedor ===== */
.category-manager-trigger { margin-top:10px; }
.category-manager-card { width:min(850px,calc(100vw - 28px)); max-height:calc(100vh - 34px); overflow:auto; }
.category-manager-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; padding-right:34px; }
.category-manager-head h2 { margin:5px 0 4px; }
.category-manager-create { margin-top:18px; padding:16px; border:1px solid rgba(181,18,53,.13); border-radius:18px; background:#fff8fa; }
.category-manager-create > label { display:block; margin-bottom:8px; font-weight:850; }
.category-manager-create-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; }
.category-manager-create small { display:block; margin-top:8px; color:#7a626a; }
.category-manager-columns { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:18px; }
.category-manager-columns section { min-width:0; border:1px solid rgba(117,15,36,.12); border-radius:18px; padding:14px; background:#fff; }
.category-manager-section-title { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:10px; }
.category-manager-section-title span { min-width:28px; height:28px; display:grid; place-items:center; border-radius:999px; background:#fff0f4; color:#bd1238; font-weight:900; }
.category-manager-list { display:grid; gap:8px; max-height:360px; overflow:auto; padding-right:3px; }
.category-manager-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:11px 12px; border:1px solid rgba(117,15,36,.10); border-radius:14px; background:#fffafb; }
.category-manager-row div { min-width:0; }
.category-manager-row strong,.category-manager-row small { display:block; }
.category-manager-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.category-manager-row small { margin-top:3px; color:#806a72; }
.category-remove-btn,.category-restore-btn { flex:0 0 auto; border:0; border-radius:999px; padding:8px 12px; font-weight:850; cursor:pointer; }
.category-remove-btn { background:#fff0f3; color:#bd1238; }
.category-remove-btn:hover { background:#ffdfe6; }
.category-remove-btn:disabled { cursor:not-allowed; opacity:.45; }
.category-restore-btn { background:#e8f8ee; color:#16723c; }
.category-restore-btn:hover { background:#d8f2e2; }
.category-manager-empty { padding:20px 10px; text-align:center; color:#806a72; }
.category-manager-note { margin-top:16px; padding:12px 14px; border-radius:14px; background:#fff7e7; color:#6e4c04; line-height:1.45; }
.category-manager-status { min-height:20px; margin:12px 2px 0; color:#16823a; font-weight:750; }
.category-manager-status.error { color:#b42318; }
html[data-theme="dark"] .category-manager-create,
html[data-theme="dark"] .category-manager-columns section,
html[data-theme="dark"] .category-manager-row { background:#251b1f !important; border-color:rgba(255,255,255,.13) !important; }
html[data-theme="dark"] .category-manager-row strong { color:#fff !important; }
html[data-theme="dark"] .category-manager-row small,
html[data-theme="dark"] .category-manager-create small,
html[data-theme="dark"] .category-manager-empty { color:#d2c0c7 !important; }
html[data-theme="dark"] .category-manager-note { background:#3d3119; color:#ffe7ad; }
@media(max-width:720px){ .category-manager-columns{grid-template-columns:1fr;} .category-manager-create-row{grid-template-columns:1fr;} }

/* Botón mayorista solicitado: fondo dorado y texto blanco en todas las vistas. */
.purchase-wholesale-btn,
.detail-purchase-grid .outline-mayor,
.promo-purchase-actions .purchase-wholesale-btn,
html[data-theme="light"] .purchase-wholesale-btn,
html[data-theme="light"] .detail-purchase-grid .outline-mayor,
html[data-theme="dark"] .purchase-wholesale-btn,
html[data-theme="dark"] .detail-purchase-grid .outline-mayor {
  color:#ffffff !important;
  background:linear-gradient(135deg,#d39a08 0%,#b97800 100%) !important;
  border-color:#b97800 !important;
  box-shadow:0 9px 20px rgba(185,120,0,.22) !important;
}
.purchase-wholesale-btn:hover,
.detail-purchase-grid .outline-mayor:hover {
  color:#ffffff !important;
  background:linear-gradient(135deg,#e0aa18 0%,#c88700 100%) !important;
  transform:translateY(-1px);
}
.purchase-wholesale-btn:disabled,
.detail-purchase-grid .outline-mayor:disabled {
  color:rgba(255,255,255,.82) !important;
  background:#a89978 !important;
  border-color:#a89978 !important;
  box-shadow:none !important;
}

/* Panel vendedor: encabezado siempre blanco y mensajes legibles en modo claro/oscuro. */
html[data-theme="light"] body.vendor-session .vendor-exclusive-head,
html[data-theme="dark"] body.vendor-session .vendor-exclusive-head {
  color:#ffffff !important;
  background:linear-gradient(125deg,#65091f 0%,#9f1035 55%,#c91c49 100%) !important;
}
html[data-theme="light"] body.vendor-session .vendor-exclusive-head .panel-kicker,
html[data-theme="light"] body.vendor-session .vendor-exclusive-head h2,
html[data-theme="light"] body.vendor-session .vendor-exclusive-head p,
html[data-theme="light"] body.vendor-session .vendor-exclusive-head .muted,
html[data-theme="dark"] body.vendor-session .vendor-exclusive-head .panel-kicker,
html[data-theme="dark"] body.vendor-session .vendor-exclusive-head h2,
html[data-theme="dark"] body.vendor-session .vendor-exclusive-head p,
html[data-theme="dark"] body.vendor-session .vendor-exclusive-head .muted {
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html[data-theme="light"] body.vendor-session .vendor-exclusive-head .vendor-catalog-button,
html[data-theme="dark"] body.vendor-session .vendor-exclusive-head .vendor-catalog-button {
  color:#ffffff !important;
  background:#8f0e2e !important;
  border-color:rgba(255,255,255,.58) !important;
  box-shadow:0 8px 18px rgba(55,0,18,.18);
}
html[data-theme="light"] body.vendor-session .vendor-exclusive-head .vendor-catalog-button:hover,
html[data-theme="dark"] body.vendor-session .vendor-exclusive-head .vendor-catalog-button:hover { background:#b0123b !important; }
html[data-theme="light"] body.vendor-session .vendor-exclusive-head .vendor-connection-box,
html[data-theme="dark"] body.vendor-session .vendor-exclusive-head .vendor-connection-box {
  color:#ffffff !important;
  background:rgba(101,9,31,.62) !important;
  border-color:rgba(255,255,255,.34) !important;
}
html[data-theme="light"] body.vendor-session .vendor-exclusive-head .vendor-connection-box strong,
html[data-theme="light"] body.vendor-session .vendor-exclusive-head .vendor-connection-box small,
html[data-theme="dark"] body.vendor-session .vendor-exclusive-head .vendor-connection-box strong,
html[data-theme="dark"] body.vendor-session .vendor-exclusive-head .vendor-connection-box small { color:#ffffff !important; }

html[data-theme="light"] body.vendor-session .vendor-item-detail,
html[data-theme="light"] body.vendor-session .vendor-detail-head,
html[data-theme="light"] body.vendor-session .vendor-data-toolbar,
html[data-theme="light"] body.vendor-session .vendor-chat-toolbar,
html[data-theme="light"] body.vendor-session .vendor-reply { color:#2a171e !important; }
html[data-theme="light"] body.vendor-session .vendor-detail-head h3,
html[data-theme="light"] body.vendor-session .vendor-detail-head strong,
html[data-theme="light"] body.vendor-session .vendor-data-toolbar strong,
html[data-theme="light"] body.vendor-session .vendor-chat-toolbar strong { color:#25141a !important; }
html[data-theme="light"] body.vendor-session .vendor-detail-head p,
html[data-theme="light"] body.vendor-session .vendor-detail-head small,
html[data-theme="light"] body.vendor-session .vendor-data-toolbar small,
html[data-theme="light"] body.vendor-session .vendor-list-row span,
html[data-theme="light"] body.vendor-session .vendor-list-row small { color:#6b525b !important; }
html[data-theme="light"] body.vendor-session .vendor-messages { background:#fffafb !important; }
html[data-theme="light"] body.vendor-session .vendor-message.client p {
  color:#2c171f !important;
  -webkit-text-fill-color:#2c171f !important;
  background:#ffffff !important;
  border:1px solid rgba(112,19,47,.12) !important;
}
html[data-theme="light"] body.vendor-session .vendor-message.vendor p,
html[data-theme="dark"] body.vendor-session .vendor-message.vendor p {
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  background:linear-gradient(135deg,#c41441,#970d31) !important;
  border:1px solid rgba(255,255,255,.16) !important;
}
html[data-theme="light"] body.vendor-session .vendor-message small { color:#674d56 !important; }
html[data-theme="light"] body.vendor-session .vendor-message.vendor small { color:#7c4658 !important; }
html[data-theme="light"] body.vendor-session .vendor-reply textarea {
  color:#2a171e !important;
  -webkit-text-fill-color:#2a171e !important;
  background:#ffffff !important;
  border-color:rgba(112,19,47,.16) !important;
}
html[data-theme="light"] body.vendor-session .vendor-reply textarea::placeholder { color:#7d656e !important; }


/* ===== v82 identidad visual Sonimax: encabezados y marcas de agua ===== */
.site-header {
  grid-template-columns: minmax(245px, 300px) minmax(320px, 1fr) auto;
}
.brand-sonimax-v82 {
  min-width:0;
  gap:10px;
}
.brand-sonimax-v82 img {
  width:96px !important;
  height:60px !important;
  object-fit:contain !important;
  border-radius:0 !important;
  box-shadow:none !important;
  filter:drop-shadow(0 7px 13px rgba(161,10,39,.14));
}
.brand-sonimax-v82 strong { font-size:1.04rem; }
.brand-sonimax-v82 small { font-size:.72rem; }

.internal-head-brand {
  display:flex;
  align-items:center;
  gap:15px;
  min-width:0;
}
.internal-head-brand > img {
  flex:0 0 auto;
  width:92px;
  height:60px;
  object-fit:contain;
  filter:drop-shadow(0 7px 14px rgba(68,0,19,.18));
}
.internal-head-brand > div { min-width:0; }
.root-head-brand-v82 > img { width:86px; height:56px; }
.admin-head-brand-v82 > img,
.vendor-head-brand-v82 > img { filter:drop-shadow(0 7px 14px rgba(31,0,10,.26)); }

/* Fondo de marca en el cierre del portal, siempre detrás del contenido. */
.footer {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:475px;
}
.footer::before {
  content:"";
  position:absolute;
  z-index:-1;
  left:50%;
  top:50%;
  width:min(1320px,96vw);
  height:min(780px,92%);
  transform:translate(-50%,-50%);
  background:url("../assets/logo-sonimax-transparent.png") center/contain no-repeat;
  opacity:.14;
  filter:drop-shadow(0 18px 38px rgba(99,6,23,.12)) saturate(1.03);
  pointer-events:none;
}
.footer::after {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  background:linear-gradient(90deg,rgba(255,255,255,.88),rgba(255,255,255,.69) 45%,rgba(255,255,255,.88));
  pointer-events:none;
}
.footer-inner { position:relative; z-index:1; }
.footer-brand-row img {
  width:78px !important;
  height:50px !important;
  object-fit:contain !important;
  border-radius:0 !important;
}

/* Marca de agua elegante para estados vacíos de atención. */
.vendor-empty,
.root-inbox-empty {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  width:min(680px,92%);
  min-height:350px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border-radius:30px;
}
.vendor-empty::before,
.root-inbox-empty::before {
  content:"";
  position:absolute;
  z-index:-2;
  inset:28px;
  background:url("../assets/logo-sonimax-transparent.png") center/contain no-repeat;
  opacity:.075;
  filter:blur(1.8px) saturate(.8);
  pointer-events:none;
}
.vendor-empty::after,
.root-inbox-empty::after {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  background:radial-gradient(circle at center,rgba(255,255,255,.74),rgba(255,255,255,.94) 67%,rgba(255,255,255,.99));
  pointer-events:none;
}
.vendor-empty > *,
.root-inbox-empty > * { position:relative; z-index:1; }
.vendor-empty span,
.root-inbox-empty span { box-shadow:0 13px 32px rgba(151,14,54,.12); }

html[data-theme="dark"] .footer::before { opacity:.18; filter:drop-shadow(0 22px 40px rgba(0,0,0,.28)) brightness(1.06) saturate(1.04); }
html[data-theme="dark"] .footer::after { background:linear-gradient(90deg,rgba(25,17,20,.92),rgba(25,17,20,.72) 45%,rgba(25,17,20,.92)); }
html[data-theme="dark"] .vendor-empty::before,
html[data-theme="dark"] .root-inbox-empty::before { opacity:.09; filter:blur(1.8px) brightness(1.14); }
html[data-theme="dark"] .vendor-empty::after,
html[data-theme="dark"] .root-inbox-empty::after { background:radial-gradient(circle at center,rgba(24,16,20,.67),rgba(24,16,20,.91) 68%,rgba(24,16,20,.98)); }

@media(max-width:1080px){
  .site-header { grid-template-columns:210px minmax(260px,1fr) auto; gap:14px; }
  .brand-sonimax-v82 img { width:78px !important; height:52px !important; }
  .brand-sonimax-v82 strong { font-size:.92rem; }
}
@media(max-width:760px){
  .site-header { grid-template-columns:1fr !important; }
  .brand-sonimax-v82 { justify-content:center; }
  .brand-sonimax-v82 img { width:112px !important; height:62px !important; }
  .internal-head-brand { align-items:flex-start; }
  .internal-head-brand > img { width:75px; height:52px; }
  .footer { min-height:auto; }
  .footer::before { width:108vw; height:64%; opacity:.11; }
  .vendor-empty,.root-inbox-empty { min-height:300px; width:96%; }
}

html[data-theme="dark"] .ad-carousel-brand {
  background: transparent;
  border: none;
  box-shadow: none;
}
html[data-theme="dark"] .ad-carousel-brand::after {
  content: none;
}
html[data-theme="dark"] .ad-carousel-brand-logo {
  filter: drop-shadow(0 16px 30px rgba(0,0,0,.42)) drop-shadow(0 4px 12px rgba(255,255,255,.04));
}
html[data-theme="light"] .ad-carousel-brand-logo {
  filter: drop-shadow(0 14px 26px rgba(176,18,51,.18)) drop-shadow(0 4px 10px rgba(0,0,0,.08));
}


/* ===== v86 identidad Cashea en rojo oscuro ===== */
.footer-cashea-box,
html[data-theme="light"] .footer-cashea-box,
html[data-theme="dark"] .footer-cashea-box {
  background: linear-gradient(135deg, #fff8fa 0%, #f8e7eb 100%) !important;
  border-color: rgba(122,16,40,.24) !important;
}
.footer-cashea-box .footer-column-title,
.footer-cashea-box .footer-cashea-text,
html[data-theme="light"] .footer-cashea-box .footer-column-title,
html[data-theme="light"] .footer-cashea-box .footer-cashea-text,
html[data-theme="dark"] .footer-cashea-box .footer-column-title,
html[data-theme="dark"] .footer-cashea-box .footer-cashea-text {
  color: #7a1028 !important;
  opacity: 1 !important;
}
.footer-cashea-logo {
  filter: drop-shadow(0 6px 12px rgba(122,16,40,.10));
}

/* ===== v99 logo balanceado y sin recorte en vendedores ===== */
.vendor-empty {
  width: min(980px, 94%);
  min-height: 430px;
  border-radius: 32px;
}
.vendor-empty::before {
  inset: 34px 72px;
  background-image: url("../assets/logo-sonimax-vendedor.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .34;
  filter: drop-shadow(0 16px 28px rgba(145, 10, 43, .12)) saturate(1.06) contrast(1.01);
}
.vendor-empty::after {
  background: radial-gradient(circle at center,
    rgba(255,255,255,.78) 0%,
    rgba(255,255,255,.87) 36%,
    rgba(255,255,255,.95) 72%,
    rgba(255,255,255,.988) 100%);
}
.vendor-empty > * {
  text-shadow: 0 1px 0 rgba(255,255,255,.97), 0 3px 12px rgba(255,255,255,.90);
}
html[data-theme="dark"] .vendor-empty::before {
  opacity: .38;
  filter: drop-shadow(0 18px 32px rgba(0,0,0,.36)) brightness(1.05) saturate(1.05);
}
html[data-theme="dark"] .vendor-empty::after {
  background: radial-gradient(circle at center,
    rgba(24,16,20,.62) 0%,
    rgba(24,16,20,.77) 42%,
    rgba(24,16,20,.92) 78%,
    rgba(24,16,20,.985) 100%);
}
html[data-theme="dark"] .vendor-empty > * {
  text-shadow: 0 2px 10px rgba(0,0,0,.82);
}
@media (max-width: 980px) {
  .vendor-empty::before {
    inset: 28px 48px;
  }
}
@media (max-width: 760px) {
  .vendor-empty {
    width: 96%;
    min-height: 330px;
  }
  .vendor-empty::before {
    inset: 26px 24px;
    background-size: contain;
    opacity: .30;
  }
  html[data-theme="dark"] .vendor-empty::before { opacity: .34; }
}


/* ===== v90 logos transparentes y paleta de colores de novedades ===== */
.agency-logos img,
.footer .agency-logos img {
  background: transparent !important;
  mix-blend-mode: normal;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.08));
}
html[data-theme="dark"] .agency-logos img,
html[data-theme="dark"] .footer .agency-logos img {
  background: transparent !important;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,.34)) brightness(1.04);
}
.ad-color-panel {
  margin-top:16px;
  padding:16px;
  border:1px solid rgba(176,18,51,.14);
  border-radius:18px;
  background:linear-gradient(180deg,#fff,#fff8fa);
}
.ad-color-panel-head { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:13px; }
.ad-color-panel-head strong { display:block; font-size:.98rem; color:#26191e; }
.ad-color-panel-head small { display:block; margin-top:4px; color:#766168; line-height:1.4; }
.ad-color-reset { min-height:38px; padding:8px 12px; white-space:nowrap; }
.ad-color-presets { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:13px; }
.ad-color-preset {
  display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:7px 11px;
  border:1px solid rgba(118,15,36,.14); border-radius:999px; background:#fff; color:#332229; font-weight:800;
}
.ad-color-preset span { width:19px; height:19px; border-radius:999px; box-shadow:0 0 0 2px #fff,0 0 0 3px rgba(0,0,0,.09); }
.ad-color-preset.sonimax span { background:linear-gradient(135deg,#fff7f8 50%,#b01233 50%); }
.ad-color-preset.claro span { background:linear-gradient(135deg,#fff 50%,#8f0d2b 50%); }
.ad-color-preset.dorado span { background:linear-gradient(135deg,#fff8e7 50%,#b57900 50%); }
.ad-color-preset.oscuro span { background:linear-gradient(135deg,#24191e 50%,#d9a10b 50%); }
.ad-color-grid { display:grid; grid-template-columns:repeat(2,minmax(210px,1fr)); gap:11px; }
.ad-color-field > span { display:block; margin-bottom:6px; color:#39262d; font-size:.78rem; font-weight:900; }
.ad-color-field > div { display:grid; grid-template-columns:48px 1fr; gap:8px; align-items:center; }
.ad-color-field input[type="color"] { width:48px; height:42px; padding:3px; border:1px solid rgba(118,15,36,.15); border-radius:12px; background:#fff; cursor:pointer; }
.ad-color-field .text-input { min-width:0; height:42px; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; text-transform:lowercase; }
.ad-slide, .ad-editor-preview { background:var(--ad-bg,#fff7f8) !important; }
.ad-slide-text h3, .ad-editor-preview-copy h3 { color:var(--ad-title,#1f1519) !important; }
.ad-slide-text p, .ad-editor-preview-copy p { color:var(--ad-text,#6f5a62) !important; }
.ad-slide-text small, .ad-editor-preview-copy small { background:var(--ad-badge-bg,#fff0f3) !important; color:var(--ad-badge-text,#8f0d2b) !important; }
.ad-slide-text .ad-slide-cta, .ad-editor-preview-copy a { background:var(--ad-button-bg,#b01233) !important; color:var(--ad-button-text,#fff) !important; }
html[data-theme="dark"] .ad-color-panel { background:linear-gradient(180deg,#291f23,#21181c); border-color:rgba(255,255,255,.1); }
html[data-theme="dark"] .ad-color-panel-head strong, html[data-theme="dark"] .ad-color-field > span { color:#fff3f6; }
html[data-theme="dark"] .ad-color-panel-head small { color:#cdbbc2; }
html[data-theme="dark"] .ad-color-preset { background:#302329; color:#fff3f6; border-color:rgba(255,255,255,.12); }
html[data-theme="dark"] .ad-color-field input[type="color"] { background:#241a1f; border-color:rgba(255,255,255,.13); }
@media(max-width:720px){
  .ad-color-panel-head { align-items:flex-start; flex-direction:column; }
  .ad-color-reset { width:100%; }
  .ad-color-grid { grid-template-columns:1fr; }
}

/* ===== v91: gestor completo del encabezado principal ===== */
#heroWelcomeSection.hero-hidden-v91 { display:none !important; }
.hero-content-v91 {
  --hero-background-1:#ffffff;
  --hero-background-2:#fff7f8;
  --hero-eyebrow-bg:#fff0f3;
  --hero-eyebrow-text:#b01233;
  --hero-title:#21171b;
  --hero-description:#66545b;
  --hero-primary-bg:#b01233;
  --hero-primary-text:#ffffff;
  --hero-secondary-bg:#ffffff;
  --hero-secondary-text:#21171b;
  --hero-border:#eadde2;
  --hero-shadow:#5f1024;
  --hero-shadow-rgba:rgba(95,16,36,.24);
  --hero-overlay-opacity:.15;
  background:linear-gradient(135deg,var(--hero-background-1),var(--hero-background-2)) !important;
  border:1px solid var(--hero-border) !important;
  box-shadow:0 20px 50px var(--hero-shadow-rgba) !important;
  color:var(--hero-title) !important;
  isolation:isolate;
  min-width:0;
}
.hero-content-v91::after { display:none !important; }
.hero-background-v91,
.hero-overlay-v91 { position:absolute; inset:-14px; pointer-events:none; }
.hero-background-v91 { z-index:-3; background-repeat:no-repeat; }
.hero-overlay-v91 { z-index:-2; background:linear-gradient(135deg,var(--hero-background-1),var(--hero-background-2)); opacity:var(--hero-overlay-opacity); }
.hero-layout-v91 { position:relative; z-index:1; min-height:inherit; display:grid; align-items:center; grid-template-columns:minmax(0,1fr); gap:26px; }
.hero-content-v91[data-image-mode="side"] .hero-layout-v91 { grid-template-columns:minmax(0,1.16fr) minmax(240px,.84fr); }
.hero-copy-v91 { min-width:0; text-align:left; }
.hero-content-v91[data-align="center"] .hero-copy-v91 { text-align:center; }
.hero-content-v91[data-align="right"] .hero-copy-v91 { text-align:right; }
.hero-content-v91[data-align="center"] .hero-copy-v91 h1,
.hero-content-v91[data-align="center"] .hero-copy-v91 p { margin-left:auto; margin-right:auto; }
.hero-content-v91[data-align="right"] .hero-copy-v91 h1,
.hero-content-v91[data-align="right"] .hero-copy-v91 p { margin-left:auto; }
.hero-content-v91[data-align="center"] .hero-actions { justify-content:center; }
.hero-content-v91[data-align="right"] .hero-actions { justify-content:flex-end; }
.hero-content-v91 .eyebrow { color:var(--hero-eyebrow-text) !important; background:var(--hero-eyebrow-bg) !important; border-color:var(--hero-border) !important; }
.hero-content-v91 h1 { color:var(--hero-title) !important; }
.hero-content-v91 p { color:var(--hero-description) !important; }
.hero-content-v91 #openCatalogButton { color:var(--hero-primary-text) !important; background:var(--hero-primary-bg) !important; border-color:var(--hero-primary-bg) !important; }
.hero-content-v91 #showOnlyAvailable { color:var(--hero-secondary-text) !important; background:var(--hero-secondary-bg) !important; border-color:var(--hero-border) !important; }
.hero-media-v91 { display:grid; place-items:center; min-height:220px; overflow:hidden; border-radius:24px; }
.hero-media-v91.hidden { display:none !important; }
.hero-media-v91 img { max-width:100%; max-height:360px; object-fit:contain; transition:.2s ease; }

.hero-manager-v91 {
  width:min(1240px,calc(100% - 44px));
  margin:0 auto 28px;
  border:1px solid rgba(176,18,51,.16);
  border-radius:28px;
  background:linear-gradient(180deg,#fff,#fff8fa);
  box-shadow:0 20px 52px rgba(77,10,29,.10);
  overflow:hidden;
}
.hero-manager-head-v91 { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:24px 26px; border-bottom:1px solid rgba(176,18,51,.10); }
.hero-manager-head-v91 h2 { margin:12px 0 6px; font-size:clamp(24px,3vw,34px); }
.hero-manager-head-v91 p { margin:0; color:var(--muted); }
.hero-manager-head-actions-v91 { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.hero-manager-status-v91 { display:inline-flex; padding:8px 12px; border-radius:999px; background:#edf9f1; color:#17733d; font-size:.78rem; font-weight:900; }
.hero-manager-body-v91 { padding:22px; }
.hero-manager-body-v91.hidden { display:none !important; }
.hero-manager-grid-v91 { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(340px,.8fr); gap:22px; align-items:start; }
.hero-editor-v91 { display:grid; gap:18px; min-width:0; }
.hero-editor-section-v91 { border:1px solid rgba(176,18,51,.12); border-radius:22px; padding:18px; background:#fff; box-shadow:0 10px 26px rgba(60,15,29,.05); }
.hero-editor-section-head-v91 { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:16px; }
.hero-editor-section-head-v91 strong { display:block; font-size:1.04rem; }
.hero-editor-section-head-v91 small { display:block; margin-top:3px; color:var(--muted); }
.hero-fields-grid-v91 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.hero-field-v91 { display:grid; gap:7px; min-width:0; font-size:.82rem; font-weight:850; }
.hero-field-wide-v91 { grid-column:1/-1; }
.hero-textarea-v91 { min-height:112px; resize:vertical; }
.hero-check-row-v91 { display:flex; gap:18px; flex-wrap:wrap; margin-top:14px; }
.hero-check-row-v91 label { display:inline-flex; align-items:center; gap:8px; font-size:.86rem; font-weight:800; }
.hero-inline-field-v91 { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; }
.hero-dropzone-v91 { margin-top:14px; min-height:112px; border:2px dashed rgba(176,18,51,.22); border-radius:18px; display:grid; place-items:center; text-align:center; padding:18px; background:#fff8fa; transition:.18s ease; }
.hero-dropzone-v91 strong,.hero-dropzone-v91 small { display:block; }
.hero-dropzone-v91 small { margin-top:5px; color:var(--muted); }
.hero-dropzone-v91.dragging { border-color:#b01233; background:#fff0f4; transform:scale(1.01); }
.hero-image-actions-v91 { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:12px; }
.hero-preset-row-v91 { display:flex; flex-wrap:wrap; gap:9px; margin-bottom:14px; }
.hero-preset-row-v91 button { border:1px solid rgba(176,18,51,.16); background:#fff; color:#5c313c; padding:9px 13px; border-radius:999px; font-weight:850; }
.hero-color-grid-v91 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.hero-color-grid-v91 label { display:grid; gap:7px; font-size:.78rem; font-weight:850; }
.hero-color-grid-v91 label > div { display:grid; grid-template-columns:48px minmax(0,1fr); gap:8px; }
.hero-color-grid-v91 input[type="color"] { width:48px; height:42px; padding:3px; border-radius:12px; border:1px solid var(--line); background:#fff; }
.hero-contrast-message-v91 { margin:14px 0 0; padding:10px 12px; border-radius:13px; background:#effaf3; color:#176b39; font-weight:750; font-size:.82rem; }
.hero-contrast-message-v91.warning { background:#fff5ec; color:#a34b00; }
.hero-preview-panel-v91 { position:sticky; top:18px; border:1px solid rgba(176,18,51,.12); border-radius:22px; padding:18px; background:#fff; box-shadow:0 14px 30px rgba(60,15,29,.07); }
.hero-preview-head-v91 strong { display:block; font-size:1.05rem; }
.hero-preview-head-v91 small { display:block; margin-top:3px; color:var(--muted); }
.hero-preview-controls-v91 { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; margin:14px 0; }
.hero-preview-controls-v91 > div { display:flex; gap:6px; }
.hero-preview-controls-v91 button { border:1px solid rgba(176,18,51,.13); background:#fff; color:#5a3540; border-radius:999px; padding:8px 10px; font-weight:800; font-size:.76rem; }
.hero-preview-controls-v91 button.active { background:#b01233; color:#fff; }
.hero-preview-viewport-v91 { border-radius:20px; padding:18px; overflow:auto; border:1px solid rgba(0,0,0,.08); transition:.18s ease; }
.hero-preview-viewport-v91.light { background:#f3f0f1; }
.hero-preview-viewport-v91.dark { background:#11090d; }
.hero-preview-viewport-v91.mobile { max-width:340px; margin-inline:auto; }
.hero-preview-card-v91 {
  --preview-background-1:#fff; --preview-background-2:#fff7f8; --preview-eyebrow-bg:#fff0f3; --preview-eyebrow-text:#b01233;
  --preview-title:#21171b; --preview-description:#66545b; --preview-primary-bg:#b01233; --preview-primary-text:#fff;
  --preview-secondary-bg:#fff; --preview-secondary-text:#21171b; --preview-border:#eadde2; --preview-shadow:#5f1024; --preview-overlay-opacity:.15;
  position:relative; isolation:isolate; overflow:hidden; border:1px solid var(--preview-border); border-radius:20px; padding:22px;
  background:linear-gradient(135deg,var(--preview-background-1),var(--preview-background-2)); box-shadow:0 16px 34px rgba(40,14,23,.14);
}
.hero-preview-background-v91,.hero-preview-overlay-v91 { position:absolute; inset:-8px; pointer-events:none; }
.hero-preview-background-v91 { z-index:-3; background-repeat:no-repeat; }
.hero-preview-overlay-v91 { z-index:-2; background:linear-gradient(135deg,var(--preview-background-1),var(--preview-background-2)); opacity:var(--preview-overlay-opacity); }
.hero-preview-layout-v91 { display:grid; grid-template-columns:1fr; gap:18px; align-items:center; }
.hero-preview-card-v91[data-image-mode="side"] .hero-preview-layout-v91 { grid-template-columns:minmax(0,1.1fr) minmax(130px,.9fr); }
.hero-preview-card-v91[data-align="center"] .hero-preview-copy-v91 { text-align:center; }
.hero-preview-card-v91[data-align="right"] .hero-preview-copy-v91 { text-align:right; }
.hero-preview-copy-v91 > span { display:inline-flex; padding:6px 9px; border-radius:999px; background:var(--preview-eyebrow-bg); color:var(--preview-eyebrow-text); font-size:.64rem; font-weight:900; }
.hero-preview-copy-v91 h3 { margin:12px 0 8px; color:var(--preview-title) !important; font-size:clamp(1.35rem,3vw,2.05rem); line-height:1.04; }
.hero-preview-copy-v91 p { margin:0; color:var(--preview-description) !important; font-size:.78rem; line-height:1.55; }
.hero-preview-copy-v91 > div { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.hero-preview-card-v91[data-align="center"] .hero-preview-copy-v91 > div { justify-content:center; }
.hero-preview-card-v91[data-align="right"] .hero-preview-copy-v91 > div { justify-content:flex-end; }
.hero-preview-copy-v91 button { border:1px solid transparent; border-radius:999px; padding:8px 11px; font-size:.7rem; font-weight:900; }
#heroPreviewPrimary { background:var(--preview-primary-bg); color:var(--preview-primary-text); }
#heroPreviewSecondary { background:var(--preview-secondary-bg); color:var(--preview-secondary-text); border-color:var(--preview-border); }
.hero-preview-media-v91 { display:grid; place-items:center; min-height:120px; overflow:hidden; border-radius:16px; }
.hero-preview-media-v91.hidden { display:none !important; }
.hero-preview-media-v91 img { max-width:100%; max-height:190px; object-fit:contain; }
.hero-preview-viewport-v91.mobile .hero-preview-layout-v91 { grid-template-columns:1fr !important; }
.hero-preview-viewport-v91.mobile .hero-preview-copy-v91 { text-align:center !important; }
.hero-preview-viewport-v91.mobile .hero-preview-copy-v91 > div { justify-content:center !important; }
.hero-manager-actions-v91 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-top:15px; }
.hero-manager-actions-v91 > * { width:100%; text-align:center; }
.hero-import-label-v91 { display:flex; align-items:center; justify-content:center; cursor:pointer; }
.hero-import-label-v91 input { display:none; }
#heroManagerMessage { margin:12px 0 0; min-height:20px; }
#heroManagerMessage.error { color:#b42318; }

html[data-theme="dark"] .hero-manager-v91 { background:linear-gradient(180deg,#241a1e,#171014); border-color:rgba(255,255,255,.10); box-shadow:0 22px 56px rgba(0,0,0,.32); }
html[data-theme="dark"] .hero-manager-head-v91 { border-color:rgba(255,255,255,.09); }
html[data-theme="dark"] .hero-editor-section-v91,
html[data-theme="dark"] .hero-preview-panel-v91 { background:#251b1f; border-color:rgba(255,255,255,.10); box-shadow:none; }
html[data-theme="dark"] .hero-dropzone-v91 { background:#2d2025; border-color:rgba(255,255,255,.14); }
html[data-theme="dark"] .hero-preset-row-v91 button,
html[data-theme="dark"] .hero-preview-controls-v91 button { background:#2d2025; color:#f5e9ed; border-color:rgba(255,255,255,.12); }
html[data-theme="dark"] .hero-preview-controls-v91 button.active { background:#c5163e; color:#fff; }
html[data-theme="dark"] .hero-manager-status-v91 { background:#173424; color:#aef0c7; }

@media(max-width:1080px){
  .hero-manager-grid-v91 { grid-template-columns:1fr; }
  .hero-preview-panel-v91 { position:static; }
}
@media(max-width:760px){
  .hero-content-v91[data-image-mode="side"] .hero-layout-v91 { grid-template-columns:1fr; }
  .hero-copy-v91 { text-align:center !important; }
  .hero-copy-v91 h1,.hero-copy-v91 p { margin-left:auto; margin-right:auto; }
  .hero-actions { justify-content:center !important; }
  .hero-manager-v91 { width:calc(100% - 24px); }
  .hero-manager-head-v91 { flex-direction:column; align-items:flex-start; padding:20px; }
  .hero-manager-head-actions-v91 { justify-content:flex-start; }
  .hero-manager-body-v91 { padding:12px; }
  .hero-fields-grid-v91,.hero-color-grid-v91 { grid-template-columns:1fr; }
  .hero-field-wide-v91 { grid-column:auto; }
  .hero-inline-field-v91 { grid-template-columns:1fr; }
  .hero-manager-actions-v91 { grid-template-columns:1fr; }
}
/* Las elecciones de root prevalecen sobre los temas globales. */
html[data-theme="light"] .hero-content-v91,
html[data-theme="dark"] .hero-content-v91 {
  background:linear-gradient(135deg,var(--hero-background-1),var(--hero-background-2)) !important;
  border-color:var(--hero-border) !important;
  box-shadow:0 20px 50px var(--hero-shadow-rgba) !important;
  color:var(--hero-title) !important;
}
html[data-theme="light"] .hero-content-v91 #heroWelcomeEyebrow,
html[data-theme="dark"] .hero-content-v91 #heroWelcomeEyebrow { color:var(--hero-eyebrow-text) !important; background:var(--hero-eyebrow-bg) !important; border-color:var(--hero-border) !important; }
html[data-theme="light"] .hero-content-v91 #heroWelcomeTitle,
html[data-theme="dark"] .hero-content-v91 #heroWelcomeTitle { color:var(--hero-title) !important; }
html[data-theme="light"] .hero-content-v91 #heroWelcomeDescription,
html[data-theme="dark"] .hero-content-v91 #heroWelcomeDescription { color:var(--hero-description) !important; }
html[data-theme="light"] .hero-content-v91 #openCatalogButton,
html[data-theme="dark"] .hero-content-v91 #openCatalogButton { color:var(--hero-primary-text) !important; background:var(--hero-primary-bg) !important; border-color:var(--hero-primary-bg) !important; }
html[data-theme="light"] .hero-content-v91 #showOnlyAvailable,
html[data-theme="dark"] .hero-content-v91 #showOnlyAvailable { color:var(--hero-secondary-text) !important; background:var(--hero-secondary-bg) !important; border-color:var(--hero-border) !important; }
#heroPreviewCard #heroPreviewTitle { color:var(--preview-title) !important; }
#heroPreviewCard #heroPreviewDescription { color:var(--preview-description) !important; }

/* ===== v92 Diseñador avanzado de métricas ADMIN ===== */
.admin-designer-launch { border-color:rgba(255,255,255,.48) !important; background:rgba(255,255,255,.12) !important; color:#fff !important; }
.admin-metric-designer-modal { z-index:10080; padding:14px; }
.admin-metric-designer-card {
  width:min(1480px,calc(100vw - 24px)); max-height:calc(100vh - 24px); padding:0; overflow:hidden;
  border-radius:28px; background:#fff; color:#24171d; box-shadow:0 30px 90px rgba(28,8,16,.32);
}
.admin-designer-head {
  display:flex; justify-content:space-between; gap:22px; align-items:center; padding:24px 28px;
  color:#fff; background:linear-gradient(135deg,#770a23,#c7143e 68%,#d52c56);
}
.admin-designer-head h2 { margin:5px 0 4px; font-size:clamp(1.55rem,2.4vw,2.35rem); color:#fff !important; }
.admin-designer-head p { margin:0; color:rgba(255,255,255,.86) !important; }
.admin-designer-head .admin-kicker { color:#fff !important; }
.admin-designer-head-actions { display:flex; flex-wrap:wrap; gap:9px; justify-content:flex-end; }
.admin-designer-head-actions .outline-btn { color:#fff !important; border-color:rgba(255,255,255,.42) !important; background:rgba(255,255,255,.10) !important; }
.admin-designer-head-actions .outline-btn:hover { background:rgba(255,255,255,.18) !important; }
.admin-designer-scroll { max-height:calc(100vh - 190px); overflow:auto; padding:22px 24px 30px; display:grid; gap:18px; background:#fbf8f9; }
.admin-designer-section { border:1px solid #eadfe3; border-radius:24px; padding:20px; background:#fff; box-shadow:0 10px 26px rgba(73,20,38,.05); }
.admin-designer-section-head { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:16px; }
.admin-designer-section-head > div { display:flex; align-items:center; gap:10px; }
.admin-designer-section-head > div > span { width:34px; height:34px; display:grid; place-items:center; border-radius:12px; background:#ffe9ef; color:#bd1237; font-weight:900; }
.admin-designer-section-head h3 { margin:0; font-size:1.12rem; }
.admin-designer-section-head small { color:#806b72; text-align:right; }
.admin-style-choice-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.admin-style-choice-grid button { position:relative; min-height:150px; padding:18px; display:flex; flex-direction:column; align-items:flex-start; gap:8px; text-align:left; border:2px solid #eee4e7; border-radius:22px; background:#fff; color:#24171d; transition:.18s ease; }
.admin-style-choice-grid button:hover,.admin-style-choice-grid button.active { transform:translateY(-2px); border-color:#c41236; box-shadow:0 14px 28px rgba(118,15,36,.12); }
.admin-style-choice-grid button.active::after { content:"Seleccionado"; position:absolute; top:12px; right:12px; border-radius:999px; padding:5px 9px; background:#c41236; color:#fff; font-size:.68rem; font-weight:900; }
.admin-style-choice-grid strong { font-size:1rem; }
.admin-style-choice-grid small { color:#79656d; line-height:1.4; }
.style-choice-icon { width:72px; height:50px; border-radius:14px; position:relative; overflow:hidden; background:#fff6f8; }
.circular-icon::before { content:""; position:absolute; width:38px; height:38px; border-radius:50%; left:16px; top:6px; background:conic-gradient(#c41236 0 42%,#d59a12 42% 66%,#168447 66% 84%,#5862bd 84%); }
.circular-icon::after { content:""; position:absolute; width:19px; height:19px; border-radius:50%; left:25px; top:15px; background:#fff; }
.executive-icon { display:grid; grid-template-columns:1fr 1fr; gap:5px; padding:7px; }
.executive-icon::before,.executive-icon::after { content:""; border-radius:7px; background:linear-gradient(180deg,#c41236 0 28%,#fff 28%); border:1px solid #eedce2; }
.mixed-icon::before { content:""; position:absolute; left:8px; bottom:8px; width:8px; height:20px; background:#c41236; box-shadow:14px -8px #d59a12,28px -2px #168447,42px -13px #5862bd; border-radius:4px 4px 0 0; }
.mixed-icon::after { content:""; position:absolute; right:7px; top:6px; width:18px; height:18px; border:5px solid #c41236; border-left-color:#ffe1e9; border-radius:50%; }
.admin-designer-control-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:16px; }
.admin-designer-control-grid label>span,.admin-section-style-grid label>span,.admin-designer-palette label>span,.admin-builder-grid label>span { display:block; margin-bottom:7px; font-size:.76rem; font-weight:900; color:#5c454e; }
.admin-designer-check { align-self:end; min-height:48px; border:1px solid #eadfe3; border-radius:14px; padding:10px 12px; }
.admin-section-style-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:14px; }
.admin-section-style-grid label { border:1px solid #eadfe3; border-radius:16px; padding:12px; background:#fffafb; }
.admin-section-style-grid input[type="color"] { width:100%; height:36px; margin-top:8px; border:0; border-radius:10px; background:transparent; }
.admin-designer-palette { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.admin-designer-palette label { border:1px solid #eadfe3; border-radius:16px; padding:12px; }
.admin-designer-palette label>div { display:grid; grid-template-columns:52px 1fr; gap:8px; }
.admin-designer-palette input[type="color"] { width:52px; height:44px; border:0; background:transparent; }
.admin-contrast-warning { margin-top:12px; border-radius:14px; padding:11px 13px; font-size:.82rem; font-weight:700; }
.admin-contrast-warning.ok { background:#eefbf3; color:#17663b; border:1px solid #caecd8; }
.admin-contrast-warning.warning { background:#fff8e8; color:#8a5a00; border:1px solid #f0dda7; }
.admin-contrast-warning button { border:0; border-radius:999px; margin-left:6px; padding:5px 9px; background:#24171d; color:#fff; font-weight:900; }
.admin-saved-dashboard-row { display:grid; grid-template-columns:minmax(180px,1fr) auto minmax(220px,1fr) auto auto; gap:10px; align-items:center; }
.admin-metric-builder-layout { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(290px,.6fr); gap:18px; align-items:start; }
.admin-builder-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.admin-builder-grid label { min-width:0; }
.admin-builder-grid label.wide { grid-column:1/-1; }
.admin-builder-grid textarea { resize:vertical; }
.admin-builder-grid input[type="color"] { width:100%; height:46px; border:1px solid #dfd2d6; border-radius:13px; background:#fff; }
.admin-builder-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:14px; }
.admin-metric-preview { position:sticky; top:0; border-radius:22px; padding:18px; background:linear-gradient(145deg,#fff,#fff4f7); border:1px solid #eadce1; box-shadow:0 16px 32px rgba(95,25,47,.08); }
.admin-metric-preview h3 { margin:8px 0 12px; }
.admin-preview-value { min-height:94px; display:grid; place-items:center; border-radius:18px; background:var(--preview-color); color:#fff; font-size:2rem; font-weight:900; box-shadow:0 12px 24px color-mix(in srgb,var(--preview-color) 24%,transparent); }
.admin-metric-preview dl { margin:14px 0; display:grid; gap:8px; }
.admin-metric-preview dl>div { display:grid; grid-template-columns:120px 1fr; gap:10px; padding-bottom:7px; border-bottom:1px solid #eee3e6; }
.admin-metric-preview dt { font-weight:900; font-size:.74rem; color:#765f67; }
.admin-metric-preview dd { margin:0; font-size:.8rem; }
.admin-preview-warning { margin:0; padding:10px 12px; border-radius:13px; font-size:.78rem; }
.admin-preview-warning.ok { background:#eefaf3; color:#17663b; }
.admin-preview-warning.warning { background:#fff7e4; color:#805300; }
.admin-custom-manager-list { display:grid; gap:9px; }
.admin-custom-manager-row { display:grid; grid-template-columns:28px 8px minmax(0,1fr) auto; gap:11px; align-items:center; border:1px solid #eadfe3; border-radius:16px; padding:11px 12px; background:#fff; }
.admin-custom-manager-row.dragging { opacity:.45; }
.admin-custom-manager-row.is-hidden { opacity:.58; background:#f6f2f3; }
.admin-drag-handle { cursor:grab; font-size:1.3rem; color:#9b8790; }
.admin-custom-manager-row>i { width:8px; height:46px; border-radius:999px; background:var(--row-color); }
.admin-custom-manager-row>div>strong { display:block; }
.admin-custom-manager-row>div>small,.admin-custom-manager-row>div>span { display:block; margin-top:3px; color:#806b72; font-size:.72rem; }
.admin-manager-actions { display:flex; flex-wrap:wrap; gap:5px; justify-content:flex-end; }
.admin-manager-actions button { border:1px solid #e4d7dc; border-radius:999px; padding:6px 9px; background:#fff; color:#7b1631; font-size:.7rem; font-weight:900; }
.admin-manager-actions button.danger { color:#b42318; background:#fff5f3; }
.admin-designer-footer { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:14px 24px; border-top:1px solid #e8dde1; background:#fff; }
.admin-designer-footer>div { display:flex; gap:10px; }
.admin-designer-footer p { margin:0; color:#17663b; font-weight:700; }
.admin-designer-footer p.error { color:#b42318; }

/* Aplicación de los tres modos visuales sobre las métricas nativas. */
.admin-metric-section[data-metric-style="executive"] .admin-pie-showcase { display:none; }
.admin-metric-section[data-metric-style="executive"] .admin-metric-grid { grid-template-columns:repeat(var(--designer-columns,4),minmax(0,1fr)); }
.admin-metric-section[data-metric-style="executive"] .admin-metric-card { grid-template-columns:1fr; min-height:176px; align-content:space-between; background:var(--designer-card,#fff); color:var(--designer-text,#24171d); border-top:5px solid var(--metric-accent); }
.admin-metric-section[data-metric-style="executive"] .admin-ring { width:62px; height:62px; justify-self:end; position:absolute; right:15px; top:15px; opacity:.95; }
.admin-metric-section[data-metric-style="executive"] .admin-metric-card { position:relative; }
.admin-metric-section[data-metric-style="executive"] .admin-metric-copy { padding-right:54px; }
.admin-metric-section[data-metric-style="executive"] .admin-metric-copy h4 { font-size:1rem; }
.admin-metric-section[data-metric-style="mixed"] .admin-pie-showcase { grid-template-columns:minmax(280px,.8fr) minmax(270px,1.2fr); }
.admin-metric-section[data-metric-style="mixed"] .admin-pie-figure-wrap { min-height:270px; }
.admin-metric-section[data-metric-style="mixed"] .admin-pie-figure { --size:250px; }
.admin-metric-section[data-metric-style="mixed"] .admin-metric-grid { grid-template-columns:repeat(var(--designer-columns,4),minmax(0,1fr)); }
.admin-metric-section[data-metric-style="circular"] .admin-metric-grid { grid-template-columns:repeat(var(--designer-columns,4),minmax(0,1fr)); }
#adminDashboardModal[data-metric-density="compact"] .admin-metric-section { padding:14px; }
#adminDashboardModal[data-metric-density="compact"] .admin-metric-card { padding:11px; min-height:130px; }
#adminDashboardModal[data-metric-density="expanded"] .admin-metric-section { padding:24px; }
#adminDashboardModal[data-metric-density="expanded"] .admin-metric-card { padding:20px; min-height:190px; }
#adminDashboardModal[data-metric-animations="off"] *,#adminDashboardModal[data-metric-animations="off"] *::before,#adminDashboardModal[data-metric-animations="off"] *::after { animation:none !important; transition:none !important; }

/* Métricas personalizadas conectadas. */
.admin-custom-metrics-section .admin-section-heading>div>span { color:#7c2160; background:#f8e8f4; }
.admin-custom-metrics-board { display:grid; gap:18px; }
.admin-custom-group { border:1px solid #eadfe3; border-radius:22px; padding:15px; background:rgba(255,255,255,.7); }
.admin-custom-group-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.admin-custom-group-head h4 { margin:0; }
.admin-custom-group-head span { border-radius:999px; padding:5px 9px; background:#f7eaf0; color:#8f2749; font-size:.7rem; font-weight:900; }
.admin-custom-grid { display:grid; grid-template-columns:repeat(var(--custom-columns,4),minmax(0,1fr)); gap:12px; }
.admin-custom-metric-card { --custom-card:#fff;--custom-text:#24171d; position:relative; display:grid; gap:13px; padding:16px; min-height:210px; border:1px solid color-mix(in srgb,var(--custom-color) 20%,#e5dadd); border-radius:20px; background:var(--custom-card); color:var(--custom-text); cursor:pointer; overflow:hidden; box-shadow:0 10px 24px rgba(72,18,37,.06); }
.admin-custom-metric-card::before { content:""; position:absolute; left:0; top:0; right:0; height:5px; background:var(--custom-color); }
.admin-custom-metric-visual { min-height:82px; }
.admin-custom-ring { width:82px; height:82px; border-radius:50%; display:grid; place-items:center; margin:auto; text-align:center; background:conic-gradient(var(--custom-color) var(--custom-progress),#eee5e8 0); position:relative; }
.admin-custom-ring::before { content:""; position:absolute; inset:10px; border-radius:50%; background:var(--custom-card); }
.admin-custom-ring strong,.admin-custom-ring span { position:relative; z-index:1; }
.admin-custom-ring strong { font-size:.86rem; }
.admin-custom-ring span { font-size:.58rem; color:#806b72; }
.admin-custom-executive,.admin-custom-mixed { display:none; }
.admin-custom-executive small { display:block; color:#806b72; text-transform:uppercase; font-weight:900; font-size:.65rem; }
.admin-custom-executive strong,.admin-custom-mixed>strong { display:block; margin-top:8px; font-size:1.8rem; }
.admin-custom-executive>div { height:8px; margin-top:13px; border-radius:999px; background:#eee5e8; overflow:hidden; }
.admin-custom-executive>div i { display:block; height:100%; width:var(--custom-progress); background:var(--custom-color); }
.admin-custom-bars { height:54px; display:flex; align-items:flex-end; gap:7px; margin-top:10px; }
.admin-custom-bars i { flex:1; border-radius:7px 7px 2px 2px; background:var(--custom-color); opacity:.38; }
.admin-custom-bars i:nth-child(1){height:35%}.admin-custom-bars i:nth-child(2){height:62%}.admin-custom-bars i:nth-child(3){height:48%}.admin-custom-bars i:nth-child(4){height:82%}.admin-custom-bars i:nth-child(5){height:var(--custom-progress)}
.admin-custom-metric-card.style-executive .admin-custom-ring,.admin-custom-metric-card.style-executive .admin-custom-mixed { display:none; }
.admin-custom-metric-card.style-executive .admin-custom-executive { display:block; }
.admin-custom-metric-card.style-mixed .admin-custom-ring,.admin-custom-metric-card.style-mixed .admin-custom-executive { display:none; }
.admin-custom-metric-card.style-mixed .admin-custom-mixed { display:block; }
.admin-custom-source { display:inline-flex; border-radius:999px; padding:5px 8px; background:color-mix(in srgb,var(--custom-color) 10%,transparent); color:var(--custom-color); font-size:.63rem; font-weight:900; }
.admin-custom-metric-copy h4 { margin:9px 0 6px; }
.admin-custom-metric-copy>p { margin:0; color:color-mix(in srgb,var(--custom-text) 68%,transparent); font-size:.78rem; line-height:1.45; }
.admin-custom-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.admin-custom-meta span { border-radius:999px; padding:5px 8px; background:#f5eef1; color:#715b64; font-size:.63rem; }
.admin-custom-detail { display:none; margin-top:12px; border-top:1px solid #eadfe3; padding-top:11px; }
.admin-custom-detail strong { display:block; margin-top:7px; font-size:.72rem; }
.admin-custom-detail p { margin:3px 0 0; font-size:.72rem; color:#715b64; }
.admin-custom-metric-card.expanded .admin-custom-detail { display:block; }
.admin-custom-metric-card.state-warning::after,.admin-custom-metric-card.state-critical::after { position:absolute; right:12px; top:12px; border-radius:999px; padding:4px 7px; color:#fff; font-size:.58rem; font-weight:900; }
.admin-custom-metric-card.state-warning::after { content:"Preventivo"; background:var(--designer-warning,#d59a12); }
.admin-custom-metric-card.state-critical::after { content:"Crítico"; background:var(--designer-critical,#c62d3f); }

/* ===== v92 Eliminación definitiva protegida ROOT ===== */
.product-delete-zone { display:flex; justify-content:space-between; align-items:center; gap:14px; margin:14px 0 4px; padding:14px; border:1px solid #f0c6c1; border-radius:18px; background:#fff7f5; }
.product-delete-zone strong { display:block; color:#9e1d13; }
.product-delete-zone small { display:block; margin-top:4px; color:#7e5a56; max-width:620px; }
.danger-outline-btn,.danger-solid-btn { border-radius:999px; padding:11px 15px; font-weight:900; }
.danger-outline-btn { border:1px solid #d92d20; color:#b42318; background:#fff; }
.danger-solid-btn { border:1px solid #b42318; color:#fff; background:linear-gradient(135deg,#d92d20,#9b1c14); box-shadow:0 10px 22px rgba(180,35,24,.22); }
.danger-solid-btn:disabled { opacity:.42; cursor:not-allowed; box-shadow:none; }
.permanent-delete-modal { z-index:10060; }
.permanent-delete-card { width:min(680px,calc(100vw - 28px)); border-radius:26px; padding:26px; }
.permanent-delete-icon { width:64px; height:64px; display:grid; place-items:center; border-radius:20px; margin-bottom:12px; background:#fff0ed; font-size:2rem; }
.permanent-delete-card h2 { margin:7px 0 9px; }
.permanent-delete-card>p { color:#72565c; line-height:1.55; }
.permanent-delete-summary { display:grid; gap:3px; margin:14px 0; padding:14px; border-radius:16px; background:#f8f3f5; }
.permanent-delete-summary strong { color:#a61b14; }
.permanent-delete-summary small { color:#806b72; }
.permanent-delete-warning { margin:14px 0; padding:14px 16px; border-radius:16px; border:1px solid #f0c6c1; background:#fff7f5; }
.permanent-delete-warning strong { color:#a61b14; }
.permanent-delete-warning ul { margin:8px 0 0; padding-left:18px; color:#6f5359; line-height:1.5; }
.permanent-delete-field { display:block; margin-top:14px; }
.permanent-delete-field span { display:block; margin-bottom:7px; font-weight:900; }
.permanent-delete-check { margin-top:11px; padding:11px; border:1px solid #eadfe3; border-radius:14px; }
.permanent-delete-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:16px; }

html[data-theme="dark"] .admin-metric-designer-card { background:#1d1519; color:#f7edf1; }
html[data-theme="dark"] .admin-designer-scroll { background:#171014; }
html[data-theme="dark"] .admin-designer-section,html[data-theme="dark"] .admin-style-choice-grid button,html[data-theme="dark"] .admin-section-style-grid label,html[data-theme="dark"] .admin-designer-palette label,html[data-theme="dark"] .admin-custom-manager-row,html[data-theme="dark"] .admin-designer-footer { background:#241a1e; color:#f7edf1; border-color:rgba(255,255,255,.10); }
html[data-theme="dark"] .admin-style-choice-grid small,html[data-theme="dark"] .admin-designer-section-head small,html[data-theme="dark"] .admin-designer-control-grid label>span,html[data-theme="dark"] .admin-section-style-grid label>span,html[data-theme="dark"] .admin-designer-palette label>span,html[data-theme="dark"] .admin-builder-grid label>span { color:#cdbbc2; }
html[data-theme="dark"] .admin-metric-preview { background:linear-gradient(145deg,#2b1e23,#21171b); color:#f7edf1; border-color:rgba(255,255,255,.10); }
html[data-theme="dark"] .admin-custom-group { background:rgba(36,26,30,.75); border-color:rgba(255,255,255,.10); }
html[data-theme="dark"] .admin-custom-metric-card { --custom-card:#241a1e;--custom-text:#f7edf1; }
html[data-theme="dark"] .admin-custom-meta span { background:#38292f; color:#dac9cf; }
html[data-theme="dark"] .product-delete-zone,html[data-theme="dark"] .permanent-delete-warning { background:#321b1b; border-color:#69302d; }
html[data-theme="dark"] .product-delete-zone small,html[data-theme="dark"] .permanent-delete-card>p,html[data-theme="dark"] .permanent-delete-warning ul { color:#dcc7c7; }
html[data-theme="dark"] .permanent-delete-summary,html[data-theme="dark"] .permanent-delete-check { background:#2b2024; border-color:rgba(255,255,255,.10); }

@media(max-width:1180px){
  .admin-builder-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .admin-section-style-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-saved-dashboard-row { grid-template-columns:1fr auto; }
  .admin-saved-dashboard-row select { grid-column:1/-1; }
  .admin-custom-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:900px){
  .admin-designer-head { align-items:flex-start; flex-direction:column; }
  .admin-style-choice-grid,.admin-designer-palette { grid-template-columns:1fr; }
  .admin-designer-control-grid { grid-template-columns:1fr 1fr; }
  .admin-metric-builder-layout { grid-template-columns:1fr; }
  .admin-metric-preview { position:static; }
  .admin-builder-grid { grid-template-columns:1fr 1fr; }
  .admin-custom-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-custom-manager-row { grid-template-columns:24px 6px 1fr; }
  .admin-manager-actions { grid-column:1/-1; justify-content:flex-start; }
}
@media(max-width:620px){
  .admin-metric-designer-modal { padding:0; }
  .admin-metric-designer-card { width:100vw; max-height:100vh; border-radius:0; }
  .admin-designer-scroll { max-height:calc(100vh - 214px); padding:14px; }
  .admin-designer-section { padding:14px; }
  .admin-designer-control-grid,.admin-section-style-grid,.admin-builder-grid,.admin-custom-grid { grid-template-columns:1fr; }
  .admin-designer-section-head { align-items:flex-start; flex-direction:column; }
  .admin-designer-section-head small { text-align:left; }
  .admin-designer-footer { align-items:stretch; flex-direction:column; }
  .admin-designer-footer>div { width:100%; }
  .admin-designer-footer button { flex:1; }
  .product-delete-zone,.permanent-delete-actions { align-items:stretch; flex-direction:column; }
}

/* ===== v93: visibilidad equilibrada del logo de fondo en modo oscuro ===== */
html[data-theme="dark"] .footer {
  background: #181115 !important;
}
html[data-theme="dark"] .footer-inner,
html[data-theme="dark"] .footer-column {
  background: transparent !important;
}
html[data-theme="dark"] .footer::before {
  width: min(1320px, 96vw);
  height: min(780px, 92%);
  background-image: url("../assets/logo-sonimax-transparent.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .42;
  filter: drop-shadow(0 20px 42px rgba(0,0,0,.34)) saturate(1.08) brightness(1.04);
  mix-blend-mode: normal;
}
html[data-theme="dark"] .footer::after {
  background: linear-gradient(
    90deg,
    rgba(24,17,21,.88) 0%,
    rgba(24,17,21,.54) 24%,
    rgba(24,17,21,.20) 50%,
    rgba(24,17,21,.54) 76%,
    rgba(24,17,21,.88) 100%
  );
}
html[data-theme="dark"] .footer-center,
html[data-theme="dark"] .footer-center p,
html[data-theme="dark"] .footer-center strong,
html[data-theme="dark"] .footer-bottom-note,
html[data-theme="dark"] .footer-service-note {
  text-shadow: 0 2px 8px rgba(0,0,0,.92), 0 0 2px rgba(0,0,0,.9);
}
@media (max-width: 760px) {
  html[data-theme="dark"] .footer::before {
    width: 112vw;
    height: 70%;
    opacity: .34;
  }
  html[data-theme="dark"] .footer::after {
    background: linear-gradient(
      180deg,
      rgba(24,17,21,.78),
      rgba(24,17,21,.30) 44%,
      rgba(24,17,21,.62)
    );
  }
}

/* ===== Parche v93.1: encabezado principal compatible con modo oscuro =====
   Solo afecta la presentación del bloque público de bienvenida. */
html[data-theme="dark"] #heroWelcomeCard.hero-content-v91 {
  background: linear-gradient(135deg, #24191e 0%, #35101d 100%) !important;
  border-color: #62404b !important;
  box-shadow: 0 22px 54px rgba(0,0,0,.46) !important;
  color: #fff4f6 !important;
}
html[data-theme="dark"] #heroWelcomeCard .hero-overlay-v91 {
  background: linear-gradient(135deg, #24191e, #35101d) !important;
}
html[data-theme="dark"] #heroWelcomeCard #heroWelcomeEyebrow {
  color: #ffffff !important;
  background: linear-gradient(135deg, #d21f48, #8f0d2b) !important;
  border-color: rgba(255,255,255,.16) !important;
}
html[data-theme="dark"] #heroWelcomeCard #heroWelcomeTitle {
  color: #fff4f6 !important;
  text-shadow: 0 2px 12px rgba(0,0,0,.34);
}
html[data-theme="dark"] #heroWelcomeCard #heroWelcomeDescription {
  color: #d8c7cd !important;
  text-shadow: 0 1px 8px rgba(0,0,0,.28);
}
html[data-theme="dark"] #heroWelcomeCard #openCatalogButton {
  color: #ffffff !important;
  background: linear-gradient(135deg, #e1264c, #8f0d2b) !important;
  border-color: #d21f48 !important;
  box-shadow: 0 12px 26px rgba(193,18,57,.30);
}
html[data-theme="dark"] #heroWelcomeCard #showOnlyAvailable {
  color: #f8edf1 !important;
  background: #35262c !important;
  border-color: #62404b !important;
}
html[data-theme="dark"] #heroWelcomeCard #showOnlyAvailable:hover {
  background: #432e36 !important;
  border-color: #815463 !important;
}

/* ===== v94 Personalización ROOT de la barra superior ===== */
.header-customizer-v94 {
  width:min(1240px,calc(100% - 44px));
  margin:0 auto 28px;
  border:1px solid rgba(176,18,51,.16);
  border-radius:24px;
  background:linear-gradient(180deg,#ffffff,#fff8fa);
  box-shadow:0 18px 46px rgba(77,10,29,.09);
  overflow:hidden;
}
.header-customizer-head-v94 {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:22px;
  padding:20px 24px;
  border-bottom:1px solid rgba(176,18,51,.10);
}
.header-customizer-head-v94 h2 { margin:10px 0 5px; font-size:clamp(22px,2.6vw,31px); }
.header-customizer-head-v94 p { margin:0; color:var(--muted); line-height:1.5; }
.header-customizer-head-actions-v94 { display:flex; align-items:center; justify-content:flex-end; gap:9px; flex-wrap:wrap; }
.header-customizer-status-v94 {
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:7px 11px;
  border-radius:999px;
  background:#f6edf0;
  color:#7b3447;
  font-size:.76rem;
  font-weight:900;
}
.header-customizer-status-v94.active { background:#eaf8ef; color:#14703a; }
.header-customizer-body-v94 { padding:18px 22px 22px; }
.header-customizer-body-v94.hidden { display:none !important; }
.header-customizer-toolbar-v94 {
  display:grid;
  grid-template-columns:minmax(220px,300px) minmax(250px,1fr);
  gap:12px 18px;
  align-items:end;
  padding:14px;
  margin-bottom:15px;
  border:1px solid rgba(176,18,51,.11);
  border-radius:18px;
  background:#ffffff;
}
.header-customizer-live-note-v94 { grid-column:1/-1; margin:0; color:var(--muted); font-size:.8rem; line-height:1.45; }
.header-customizer-grid-v94 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.header-customizer-card-v94 {
  min-width:0;
  padding:17px;
  border:1px solid rgba(176,18,51,.11);
  border-radius:20px;
  background:#ffffff;
  box-shadow:0 8px 22px rgba(60,15,29,.045);
}
.header-customizer-layout-card-v94 { grid-column:1/-1; }
.header-customizer-card-head-v94 { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.header-customizer-card-head-v94 strong { display:block; font-size:1rem; }
.header-customizer-card-head-v94 small { display:block; margin-top:3px; color:var(--muted); line-height:1.4; }
.header-customizer-fields-v94 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.header-customizer-field-v94 { display:grid; gap:7px; min-width:0; font-size:.8rem; font-weight:850; color:var(--ink); }
.header-customizer-field-v94 > span { line-height:1.35; }
.header-customizer-wide-v94 { grid-column:1/-1; }
.header-color-control-v94 { display:grid; grid-template-columns:46px minmax(0,1fr); gap:8px; }
.header-color-control-v94 input[type="color"] {
  width:46px;
  height:42px;
  padding:3px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.header-url-row-v94 { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.header-customizer-switch-v94 {
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:10px 12px;
  border:1px solid rgba(176,18,51,.11);
  border-radius:14px;
  background:#fff8fa;
  color:var(--ink);
  font-size:.82rem;
  font-weight:850;
}
.header-customizer-switch-v94 input { width:18px; height:18px; accent-color:#c41135; }
.header-customizer-image-status-v94 { margin:12px 0 0; min-height:20px; color:var(--muted); font-size:.8rem; }
.header-customizer-actions-v94 { display:flex; flex-wrap:wrap; gap:9px; margin-top:16px; }
.header-customizer-message-v94 { min-height:20px; margin:11px 2px 0; }
.header-customizer-message-v94.error { color:#b42318; }
.header-customizer-message-v94.ok { color:#16723b; }
.header-customizer-v94 input[aria-invalid="true"] { border-color:#c7293f !important; box-shadow:0 0 0 3px rgba(199,41,63,.12) !important; }

html[data-theme="dark"] .header-customizer-v94 {
  background:linear-gradient(180deg,#241a1e,#171014);
  border-color:rgba(255,255,255,.10);
  box-shadow:0 22px 56px rgba(0,0,0,.30);
}
html[data-theme="dark"] .header-customizer-head-v94 { border-color:rgba(255,255,255,.09); }
html[data-theme="dark"] .header-customizer-toolbar-v94,
html[data-theme="dark"] .header-customizer-card-v94 { background:#251b1f; border-color:rgba(255,255,255,.10); box-shadow:none; }
html[data-theme="dark"] .header-customizer-switch-v94 { background:#2d2025; border-color:rgba(255,255,255,.11); color:#f8eef1; }
html[data-theme="dark"] .header-customizer-status-v94 { background:#35262c; color:#e3cbd3; }
html[data-theme="dark"] .header-customizer-status-v94.active { background:#173424; color:#aef0c7; }
html[data-theme="dark"] .header-color-control-v94 input[type="color"] { background:#2d2025; border-color:rgba(255,255,255,.13); }
html[data-theme="dark"] .header-customizer-image-status-v94,
html[data-theme="dark"] .header-customizer-live-note-v94,
html[data-theme="dark"] .header-customizer-card-head-v94 small,
html[data-theme="dark"] .header-customizer-head-v94 p { color:#d0bdc4; }

/* Las variables de personalización prevalecen sobre las reglas históricas de tema. */
html .site-header.sonimax-header-customized {
  position:sticky;
  isolation:isolate;
  overflow:hidden;
  padding-top:var(--sx-header-pad-y,14px) !important;
  padding-bottom:var(--sx-header-pad-y,14px) !important;
  color:var(--sx-header-text,#ffffff) !important;
  background:var(--sx-header-background,linear-gradient(135deg,#160c11,#260d17)) !important;
  border-bottom:1px solid var(--sx-header-border,rgba(255,255,255,.16)) !important;
  box-shadow:0 12px 34px var(--sx-header-shadow,rgba(20,5,10,.24)) !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
html .site-header.sonimax-header-customized::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background-image:var(--sx-header-image,none);
  background-repeat:no-repeat;
  background-position:var(--sx-header-image-position,center);
  background-size:var(--sx-header-image-size,cover);
  opacity:var(--sx-header-image-opacity,0);
}
html .site-header.sonimax-header-customized::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:linear-gradient(90deg,rgba(0,0,0,.05),transparent 42%,rgba(0,0,0,.04));
}
html .site-header.sonimax-header-customized > * { position:relative; z-index:2; }
html .site-header.sonimax-header-static { position:relative !important; top:auto !important; }
html .site-header.sonimax-header-hide-subtitle .brand small { display:none !important; }

html .site-header.sonimax-header-customized .brand,
html .site-header.sonimax-header-customized .brand strong,
html .site-header.sonimax-header-customized .search-wrap,
html .site-header.sonimax-header-customized .search-wrap label {
  color:var(--sx-header-text,#ffffff) !important;
  -webkit-text-fill-color:var(--sx-header-text,#ffffff) !important;
  text-shadow:0 1px 2px rgba(0,0,0,.18) !important;
}
html .site-header.sonimax-header-customized .brand small {
  color:var(--sx-header-muted,#e6d8dd) !important;
  -webkit-text-fill-color:var(--sx-header-muted,#e6d8dd) !important;
}
html .site-header.sonimax-header-customized .search-box,
html .site-header.sonimax-header-customized .header-actions .icon-btn,
html .site-header.sonimax-header-customized .theme-icon-toggle-header,
html .site-header.sonimax-header-customized .language-icon-toggle {
  color:var(--sx-header-surface-text,#ffffff) !important;
  background:var(--sx-header-surface,#251b1f) !important;
  border-color:var(--sx-header-surface-border,rgba(255,255,255,.20)) !important;
  box-shadow:0 7px 18px var(--sx-header-control-shadow,rgba(0,0,0,.14)) !important;
}
html .site-header.sonimax-header-customized .search-box input,
html .site-header.sonimax-header-customized .search-box input:focus,
html .site-header.sonimax-header-customized .search-box input:not(:placeholder-shown),
html .site-header.sonimax-header-customized .search-box > span,
html .site-header.sonimax-header-customized #clearSearch,
html .site-header.sonimax-header-customized #quoteButton,
html .site-header.sonimax-header-customized #quoteButton span,
html .site-header.sonimax-header-customized #vendorPanelButton,
html .site-header.sonimax-header-customized #vendorPanelButton span {
  color:var(--sx-header-surface-text,#ffffff) !important;
  -webkit-text-fill-color:var(--sx-header-surface-text,#ffffff) !important;
}
html .site-header.sonimax-header-customized .search-box input::placeholder {
  color:var(--sx-header-surface-muted,#c9bbc0) !important;
  -webkit-text-fill-color:var(--sx-header-surface-muted,#c9bbc0) !important;
  opacity:1 !important;
}
html .site-header.sonimax-header-customized .search-box:focus-within {
  border-color:var(--sx-header-accent,#c41135) !important;
  box-shadow:0 0 0 3px var(--sx-header-focus,rgba(196,17,53,.18)) !important;
}
html .site-header.sonimax-header-customized #loginButton.login-pill {
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  background:linear-gradient(135deg,var(--sx-header-accent,#c41135),var(--sx-header-accent-dark,#7b0d29)) !important;
  border-color:transparent !important;
  box-shadow:0 9px 22px var(--sx-header-accent-shadow,rgba(196,17,53,.24)) !important;
}
html .site-header.sonimax-header-customized #quoteButton b,
html .site-header.sonimax-header-customized #quoteCount,
html .site-header.sonimax-header-customized #vendorUnreadCount {
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  background:var(--sx-header-accent,#c41135) !important;
}

@media(max-width:900px){
  .header-customizer-grid-v94 { grid-template-columns:1fr; }
  .header-customizer-layout-card-v94 { grid-column:auto; }
}
@media(max-width:760px){
  .header-customizer-v94 { width:calc(100% - 24px); }
  .header-customizer-head-v94 { flex-direction:column; align-items:flex-start; padding:18px; }
  .header-customizer-head-actions-v94 { justify-content:flex-start; }
  .header-customizer-body-v94 { padding:12px; }
  .header-customizer-toolbar-v94,
  .header-customizer-fields-v94 { grid-template-columns:1fr; }
  .header-customizer-wide-v94 { grid-column:auto; }
  .header-url-row-v94 { grid-template-columns:1fr; }
  .header-customizer-actions-v94 > * { width:100%; }
}


/* ===== v95 personalización del logo de novedades ===== */
.ad-brand-customizer-panel {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(176,18,51,.18);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffafb 0%, #fff 100%);
  box-shadow: 0 12px 30px rgba(122,16,40,.05);
}
.ad-brand-customizer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ad-brand-customizer-head strong { display:block; font-size:1rem; color:var(--ink); }
.ad-brand-customizer-head small { display:block; margin-top:5px; color:var(--muted); line-height:1.45; max-width:860px; }
.ad-brand-customizer-status {
  display:inline-flex; align-items:center; justify-content:center; padding:8px 12px; border-radius:999px;
  background:#f7e9ee; color:#8c1230; font-weight:900; font-size:.78rem; white-space:nowrap;
}
.ad-brand-customizer-status.active { background:#eaf8ef; color:#15713b; }
.ad-brand-customizer-grid {
  display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px;
}
.ad-brand-field {
  display:grid; gap:7px; min-width:0; color:var(--ink); font-size:.82rem; font-weight:900;
}
.ad-brand-field > span { line-height:1.35; }
.ad-brand-field-wide { grid-column:1 / -1; }
.ad-brand-field input[type="color"] {
  width:100%; min-height:46px; border-radius:14px; border:1px solid rgba(130,130,130,.24); background:#fff; padding:4px;
}
.ad-brand-field input[type="range"] { width:100%; accent-color:#b01233; }
.ad-brand-url-row { display:flex; gap:8px; align-items:center; }
.ad-brand-url-row .text-input { flex:1 1 auto; }
.ad-brand-check {
  grid-template-columns: 20px 1fr;
  align-items:center;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(176,18,51,.12);
  background:#fff;
}
.ad-brand-check input { width:18px; height:18px; accent-color:#b01233; }
.ad-brand-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:15px; }
.ad-brand-customizer-message { min-height:20px; margin:10px 2px 0; color:var(--muted); }
.ad-brand-customizer-message.error { color:#b42318; }
.ad-brand-customizer-message.ok { color:#16723b; }
.ad-carousel-brand {
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, backdrop-filter .25s ease, padding .25s ease;
}
.ad-carousel-brand-logo {
  transition: filter .25s ease, opacity .25s ease, transform .25s ease, max-width .25s ease, max-height .25s ease;
}
html[data-theme="dark"] .ad-brand-customizer-panel {
  background:linear-gradient(180deg, #241a1f 0%, #201519 100%);
  border-color:rgba(255,255,255,.10);
  box-shadow:none;
}
html[data-theme="dark"] .ad-brand-customizer-head small,
html[data-theme="dark"] .ad-brand-customizer-message { color:#d3c0c6; }
html[data-theme="dark"] .ad-brand-check {
  background:#2a1f24;
  border-color:rgba(255,255,255,.10);
  color:#f8eef1;
}
html[data-theme="dark"] .ad-brand-customizer-status { background:#37272d; color:#e3cad3; }
html[data-theme="dark"] .ad-brand-customizer-status.active { background:#173424; color:#aef0c7; }
html[data-theme="dark"] .ad-brand-field input[type="color"] { background:#22181c; border-color:rgba(255,255,255,.10); }
@media (max-width: 760px) {
  .ad-brand-customizer-head { flex-direction:column; }
  .ad-brand-customizer-grid { grid-template-columns:1fr; }
  .ad-brand-field-wide { grid-column:auto; }
  .ad-brand-url-row { flex-direction:column; align-items:stretch; }
  .ad-brand-actions > * { width:100%; }
}


/* ===== v102 cuentas de clientes y precio Gran Mayor ===== */
.account-access-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:4px 0 18px;padding:5px;border-radius:15px;background:#f4edf0}
.account-access-tabs button{border:0;border-radius:11px;padding:10px 8px;background:transparent;color:#6b4e58;font-weight:900;cursor:pointer}
.account-access-tabs button.active{background:#fff;color:#a90d2f;box-shadow:0 5px 14px rgba(60,20,32,.08)}
.account-access-view.hidden{display:none!important}.customer-register-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.customer-register-grid label{display:grid;gap:7px;font-size:.82rem;font-weight:900}.customer-register-grid .wide{grid-column:1/-1}.customer-consent{margin:14px 0}.text-action-btn{border:0;background:transparent;color:#a90d2f;padding:10px;font-weight:900;cursor:pointer}.account-form-message{min-height:20px;margin:10px 0 0;color:var(--muted)}.account-form-message.error{color:#b42318}.account-form-message.ok{color:#16723b}.customer-account-summary{margin:12px 0;padding:14px;border:1px solid rgba(176,18,51,.16);border-radius:14px;background:#fff8fa}.customer-account-summary strong,.customer-account-summary span{display:block}.customer-account-summary span{margin-top:5px;color:var(--muted)}
.grand-customer-admin{width:min(1200px,calc(100% - 32px));margin:24px auto;padding:22px;border:1px solid rgba(176,18,51,.16);border-radius:22px;background:#fff;box-shadow:0 16px 38px rgba(74,18,34,.06)}.grand-customer-admin-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.grand-customer-admin-head h2{margin:9px 0 6px}.grand-customer-admin-head p{margin:0;color:var(--muted);max-width:760px}.grand-customer-admin-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.grand-customer-admin-actions span{padding:8px 12px;border-radius:999px;background:#fff0f3;color:#9e1231;font-weight:900}.grand-customer-admin-list{display:grid;gap:10px;margin-top:18px}.grand-customer-row{display:grid;grid-template-columns:minmax(220px,1.2fr) minmax(180px,1fr) auto;gap:14px;align-items:center;padding:14px;border:1px solid #eadfe3;border-radius:16px;background:#fffafb}.grand-customer-row h3{margin:0 0 4px}.grand-customer-row p,.grand-customer-row small{margin:0;color:var(--muted)}.grand-customer-row-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.grand-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:.75rem;font-weight:900}.grand-status.pending{background:#fff1c8;color:#785400}.grand-status.approved{background:#dff4e6;color:#126234}.grand-status.rejected,.grand-status.suspended{background:#fee4e2;color:#9c1c13}
.customer-grand-price-box{margin-top:12px;border:1px solid rgba(181,121,0,.30);background:linear-gradient(135deg,#fff9e8,#fff3c7)}.customer-grand-price-box small{display:block;padding:0 12px 10px;color:#765200;font-weight:800}.grand-price strong{color:#9b6500!important}.customer-grand-detail{display:grid;gap:3px;margin:10px 0;padding:13px 15px;border-radius:15px;background:linear-gradient(135deg,#fff7dd,#ffe8a3);border:1px solid rgba(181,121,0,.28)}.customer-grand-detail span{font-weight:900;color:#725000}.customer-grand-detail strong{font-size:1.5rem;color:#9b6500}.grand-wholesale-btn{border:0;border-radius:999px;padding:11px 16px;background:linear-gradient(135deg,#d7a10b,#a66c00);color:#fff;font-weight:900;cursor:pointer}.quote-mode-badge.gran_mayor{background:#fff0b8;color:#775000}
html[data-theme="dark"] .account-access-tabs{background:#2b2025}html[data-theme="dark"] .account-access-tabs button.active{background:#3a2930;color:#fff}html[data-theme="dark"] .grand-customer-admin,html[data-theme="dark"] .grand-customer-row{background:#21171b;border-color:rgba(255,255,255,.10)}html[data-theme="dark"] .customer-account-summary{background:#2a1e23;border-color:rgba(255,255,255,.10)}
@media(max-width:760px){.account-access-tabs{grid-template-columns:1fr}.customer-register-grid{grid-template-columns:1fr}.customer-register-grid .wide{grid-column:auto}.grand-customer-admin-head{flex-direction:column}.grand-customer-row{grid-template-columns:1fr}.grand-customer-row-actions{justify-content:flex-start}}


/* ===== v103 acceso único y catálogo Gran Mayor exclusivo ===== */
.unified-login-card-v103 { width:min(520px,calc(100vw - 28px)); }
.unified-login-intro-v103 { margin:0 0 18px; line-height:1.55; text-align:center; }
.unified-login-small-links-v103 {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  margin:4px 0 0;
  color:var(--muted);
  font-size:.72rem;
}
.text-action-btn.compact {
  width:auto;
  padding:5px 3px;
  font-size:.72rem;
  font-weight:800;
  line-height:1.2;
}
#unifiedLoginFields.hidden { display:none!important; }
.customer-account-summary small { display:block; margin-top:8px; color:var(--muted); line-height:1.4; }
.public-price-box { margin-top:12px; background:#fff; border:1px solid rgba(176,18,51,.12); }
.public-detail-prices-v103 {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:12px 0;
}
.public-detail-prices-v103 > div {
  display:grid;
  gap:4px;
  padding:13px 15px;
  border-radius:14px;
  border:1px solid rgba(176,18,51,.13);
  background:#fff8fa;
}
.public-detail-prices-v103 span { color:var(--muted); font-size:.78rem; font-weight:850; }
.public-detail-prices-v103 strong { color:var(--ink); font-size:1.25rem; }
html[data-theme="dark"] .public-price-box,
html[data-theme="dark"] .public-detail-prices-v103 > div { background:#2a1e23; border-color:rgba(255,255,255,.10); }
html[data-theme="dark"] .unified-login-small-links-v103 { color:#cfbbc2; }
@media(max-width:520px){
  .unified-login-small-links-v103 { flex-wrap:wrap; }
  .public-detail-prices-v103 { grid-template-columns:1fr; }
}


/* ===== v104 acceso progresivo en dos pasos ===== */
.unified-login-step-v104.hidden,
#unifiedIdentityLinks.hidden,
#unifiedPasswordLinks.hidden,
.unified-forgot-link-v104.hidden { display:none !important; }
.unified-login-step-v104 { display:grid; gap:0; }
.unified-identity-summary-v104 {
  display:grid;
  gap:4px;
  margin:0 0 15px;
  padding:12px 14px;
  border:1px solid rgba(176,18,51,.14);
  border-radius:14px;
  background:#fff8fa;
  text-align:left;
}
.unified-identity-summary-v104 span {
  color:var(--muted);
  font-size:.7rem;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.unified-identity-summary-v104 strong {
  color:var(--ink);
  font-size:.95rem;
  overflow-wrap:anywhere;
}
.unified-forgot-link-v104 {
  justify-self:end;
  margin:2px 0 8px;
  padding:5px 0;
  font-size:.74rem;
}
.unified-password-preferences-v104 { margin-top:5px; }
#unifiedIdentityLinks { gap:5px; }
#unifiedIdentityLinks > span { font-size:.7rem; }
#unifiedPasswordLinks { margin-top:5px; }
html[data-theme="dark"] .unified-identity-summary-v104 {
  background:#2a1e23;
  border-color:rgba(255,255,255,.10);
}
@media(max-width:520px){
  .unified-forgot-link-v104 { justify-self:center; }
}


/* ===== v105 impresión robusta y compatible entre navegadores ===== */
@page {
  size: Letter portrait;
  margin: 8mm;
}
@media print {
  html { color-scheme: light !important; }
  body.vendor-print-page,
  body.vendor-print-page * {
    visibility: visible !important;
  }
  body.invoice-print-pending-v105 { cursor: progress; }
  body:not(.vendor-print-page) #invoiceModal {
    display: block !important;
    overflow: visible !important;
  }
  body:not(.vendor-print-page) #invoiceModal .invoice-modal-card {
    overflow: visible !important;
  }
  body:not(.vendor-print-page) #invoiceDraftContent {
    display: block !important;
    visibility: visible !important;
  }
}


/* ===== v106 videos MP4 en novedades ===== */
.ad-video-loading {
  min-height: 150px;
  width: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  font-size: 42px;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(176,18,51,.05), rgba(255,255,255,.8));
}
.ad-video-loading small { font-size: .78rem; font-weight: 850; }
.ad-slide-media video,
.ad-editor-preview-media video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: contain;
  background: #111;
}
.ad-slide.active .ad-slide-media:has(video) { background:#111; }
.ad-slide-media video::-webkit-media-controls-panel,
.ad-editor-preview-media video::-webkit-media-controls-panel { opacity:1; }
html[data-theme="dark"] .ad-video-loading { background: linear-gradient(135deg, rgba(176,18,51,.12), rgba(20,14,17,.82)); }


/* ===== v107 duración completa de videos en Novedades ===== */
.ad-slide-media:has(video), .ad-editor-preview-media:has(video) { overflow:hidden; background:#111; }
.ad-slide-media video, .ad-editor-preview-media video { max-height:clamp(220px,46vw,520px); }
@media (max-width:760px){ .ad-slide-media video, .ad-editor-preview-media video { min-height:210px; max-height:420px; } }


/* ===== v108 ajuste de tamaño multimedia en novedades ===== */
.ad-media-layout-panel {
  display: block;
  padding: 14px;
  border: 1px solid rgba(176,18,51,.15);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffafb 0%, #ffffff 100%);
}
.ad-media-layout-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.ad-media-layout-head strong,
.ad-media-layout-head small { display: block; }
.ad-media-layout-head strong { color: var(--ink); font-size: .92rem; }
.ad-media-layout-head small { margin-top: 4px; color: var(--muted); font-size: .76rem; line-height: 1.42; }
.ad-media-layout-reset { padding: 8px 11px; white-space: nowrap; }
.ad-media-layout-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(2, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.ad-media-layout-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.ad-media-layout-grid label > span {
  color: var(--ink);
  font-size: .78rem;
  font-weight: 900;
}
.ad-media-size-field input[type="range"] {
  width: 100%;
  accent-color: #b01233;
}
.ad-media-size-field b {
  color: #a30f2d;
  font-variant-numeric: tabular-nums;
}
.ad-slide-media img,
.ad-editor-preview-media img,
.ad-admin-thumb img,
.ad-slide-media video,
.ad-editor-preview-media video,
.ad-admin-thumb video {
  transform-origin: center center;
}
html[data-theme="dark"] .ad-media-layout-panel {
  background: linear-gradient(180deg, #2a1e23 0%, #24191e 100%);
  border-color: rgba(255,255,255,.10);
}
html[data-theme="dark"] .ad-media-layout-head small { color: #d2bec5; }
html[data-theme="dark"] .ad-media-size-field b { color: #f0a9ba; }
@media (max-width: 920px) {
  .ad-media-layout-grid { grid-template-columns: 1fr 1fr; }
  .ad-media-size-field { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .ad-media-layout-head { flex-direction: column; }
  .ad-media-layout-reset { width: 100%; }
  .ad-media-layout-grid { grid-template-columns: 1fr; }
  .ad-media-size-field { grid-column: auto; }
}


/* ===== v109 formas y marcos multimedia por novedad ===== */
.ad-media-shape-field {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(176,18,51,.12);
}
.ad-media-shape-title {
  color: var(--ink);
  font-size: .80rem;
  font-weight: 900;
}
.ad-media-shape-options {
  display: grid;
  grid-template-columns: repeat(7, minmax(82px, 1fr));
  gap: 8px;
}
.ad-media-shape-option {
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 80px;
  padding: 9px 7px;
  border: 1px solid rgba(176,18,51,.14);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .70rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.ad-media-shape-option:hover { transform: translateY(-1px); border-color: rgba(176,18,51,.34); }
.ad-media-shape-option.active {
  border-color: #b01233;
  background: #fff3f6;
  box-shadow: 0 0 0 3px rgba(176,18,51,.10);
}
.ad-media-shape-option i {
  width: 46px;
  height: 31px;
  display: block;
  border: 2px solid #b01233;
  background: linear-gradient(135deg, #fff, #f8dfe5);
}
.ad-media-shape-option .shape-rounded { border-radius: 10px; }
.ad-media-shape-option .shape-square { border-radius: 2px; }
.ad-media-shape-option .shape-soft { border-radius: 17px; }
.ad-media-shape-option .shape-capsule { border-radius: 999px; }
.ad-media-shape-option .shape-circle { width: 34px; height: 34px; border-radius: 50%; }
.ad-media-shape-option .shape-arch { height: 36px; border-radius: 50% 50% 8px 8px / 55% 55% 8px 8px; }
.ad-media-shape-option .shape-organic { width: 39px; height: 35px; border-radius: 38% 62% 48% 52% / 48% 38% 62% 52%; }

.ad-slide-media,
.ad-editor-preview-media,
.ad-admin-thumb {
  transition: border-radius .24s ease, box-shadow .24s ease, border-color .24s ease, transform .24s ease;
}
.ad-media-shape-square { border-radius: 3px !important; }
.ad-media-shape-rounded { border-radius: 18px !important; }
.ad-editor-preview-media.ad-media-shape-rounded { border-radius: 14px !important; }
.ad-admin-thumb.ad-media-shape-rounded { border-radius: 11px !important; }
.ad-media-shape-soft { border-radius: 36px !important; }
.ad-media-shape-capsule { border-radius: 999px !important; }
.ad-media-shape-circle {
  width: min(100%, 300px);
  aspect-ratio: 1 / 1;
  min-height: 0 !important;
  justify-self: center;
  border-radius: 50% !important;
}
.ad-editor-preview-media.ad-media-shape-circle {
  width: min(100%, 170px);
}
.ad-admin-thumb.ad-media-shape-circle {
  width: 58px;
  height: 58px;
  aspect-ratio: 1 / 1;
}
.ad-media-shape-arch { border-radius: 50% 50% 18px 18px / 42% 42% 18px 18px !important; }
.ad-media-shape-organic { border-radius: 38% 62% 48% 52% / 48% 38% 62% 52% !important; }

.ad-media-frame-clean { box-shadow: none; }
.ad-media-frame-soft {
  border-color: rgba(176,18,51,.16) !important;
  box-shadow: 0 16px 34px rgba(50,18,28,.14);
}
.ad-media-frame-outline {
  border: 3px solid var(--ad-button-bg, #b01233) !important;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.50);
}
.ad-media-frame-glow {
  border-color: var(--ad-button-bg, #b01233) !important;
  box-shadow: 0 0 0 4px var(--ad-badge-bg, #ffe8ee), 0 18px 38px rgba(176,18,51,.24);
}
html[data-theme="dark"] .ad-media-shape-field { border-color: rgba(255,255,255,.10); }
html[data-theme="dark"] .ad-media-shape-option {
  background: #2a1e23;
  border-color: rgba(255,255,255,.11);
  color: #f8eef1;
}
html[data-theme="dark"] .ad-media-shape-option.active {
  background: #3a2029;
  border-color: #f08da5;
  box-shadow: 0 0 0 3px rgba(240,141,165,.12);
}
html[data-theme="dark"] .ad-media-shape-option i {
  border-color: #f08da5;
  background: linear-gradient(135deg, #37252c, #5a2a36);
}
html[data-theme="dark"] .ad-media-frame-soft { box-shadow: 0 18px 38px rgba(0,0,0,.36); }
html[data-theme="dark"] .ad-media-frame-outline { box-shadow: inset 0 0 0 2px rgba(0,0,0,.22); }
html[data-theme="dark"] .ad-media-frame-glow { box-shadow: 0 0 0 4px rgba(176,18,51,.24), 0 20px 42px rgba(0,0,0,.42); }
@media (max-width: 1040px) {
  .ad-media-shape-options { grid-template-columns: repeat(4, minmax(82px, 1fr)); }
}
@media (max-width: 620px) {
  .ad-media-shape-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-media-shape-option { min-height: 72px; }
  .ad-slide-media.ad-media-shape-circle { width: min(88vw, 300px); }
}

/* ===== v110 editor inteligente de Novedades ===== */
.ad-text-style-panel,
.ad-media-collection-panel {
  display:block;
  padding:14px;
  border:1px solid rgba(176,18,51,.15);
  border-radius:16px;
  background:linear-gradient(180deg,#fffafb 0%,#fff 100%);
}
.ad-text-style-head,
.ad-media-collection-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:13px;
}
.ad-text-style-head strong,.ad-text-style-head small,
.ad-media-collection-head strong,.ad-media-collection-head small { display:block; }
.ad-text-style-head strong,.ad-media-collection-head strong { color:var(--ink);font-size:.92rem; }
.ad-text-style-head small,.ad-media-collection-head small { margin-top:4px;color:var(--muted);font-size:.76rem;line-height:1.42; }
#adMediaCollectionCount { color:#a30f2d;font-variant-numeric:tabular-nums; }
.ad-text-style-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(130px,1fr));
  gap:11px;
}
.ad-text-style-grid label { display:grid;gap:7px; }
.ad-text-style-grid label>span { color:var(--ink);font-size:.78rem;font-weight:900; }
.ad-media-url-row { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px; }
.ad-media-url-row .outline-btn { white-space:nowrap; }
.ad-media-item-list { display:grid;gap:9px; }
.ad-media-empty { margin:0;padding:16px;border:1px dashed rgba(176,18,51,.20);border-radius:13px;color:var(--muted);text-align:center;font-size:.79rem; }
.ad-media-item-card {
  display:grid;
  grid-template-columns:72px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  padding:9px;
  border:1px solid rgba(176,18,51,.12);
  border-radius:14px;
  background:#fff;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.ad-media-item-card.active { border-color:#b01233;box-shadow:0 0 0 3px rgba(176,18,51,.09); }
.ad-media-item-select { width:72px;height:55px;padding:0;border:0;border-radius:10px;overflow:hidden;background:#eee;cursor:pointer; }
.ad-media-item-select img,.ad-media-item-select video { width:100%;height:100%;object-fit:cover;display:block; }
.ad-media-thumb-placeholder { width:100%;height:100%;display:grid;place-items:center;font-size:25px; }
.ad-media-item-card>div:nth-child(2) { min-width:0; }
.ad-media-item-card strong,.ad-media-item-card small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.ad-media-item-card strong { color:var(--ink);font-size:.79rem; }
.ad-media-item-card small { margin-top:4px;color:var(--muted);font-size:.69rem; }
.ad-media-item-actions { display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end; }
.ad-media-item-actions button { padding:6px 8px;border:1px solid rgba(176,18,51,.17);border-radius:8px;background:#fff;color:#7f1028;font:inherit;font-size:.66rem;font-weight:900;cursor:pointer; }
.ad-media-item-actions button:disabled { opacity:.42;cursor:default; }
.ad-media-recommendation {
  margin-top:12px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  padding:13px;
  border-radius:14px;
  background:linear-gradient(135deg,#f7edf0,#fff);
  border:1px solid rgba(176,18,51,.13);
}
.ad-media-recommendation strong { color:#821028;font-size:.82rem; }
.ad-media-recommendation p { margin:5px 0 0;color:var(--muted);font-size:.74rem;line-height:1.45; }
.ad-media-recommendation .primary-btn { padding:9px 12px;white-space:nowrap; }
.ad-media-recommendation .primary-btn:disabled { opacity:.45;cursor:not-allowed; }

.ad-slide-header {
  display:block;
  margin-bottom:7px;
  color:var(--ad-header,#8f0d2b);
  font-size:.70rem;
  font-weight:950;
  letter-spacing:.075em;
  text-transform:uppercase;
}
.ad-header-style-pill .ad-slide-header {
  width:max-content;
  max-width:100%;
  padding:5px 9px;
  border-radius:999px;
  color:var(--ad-button-text,#fff);
  background:var(--ad-button-bg,#b01233);
  letter-spacing:.045em;
}
.ad-header-style-outline .ad-slide-header {
  width:max-content;
  max-width:100%;
  padding:4px 8px;
  border:1px solid var(--ad-header,#8f0d2b);
  border-radius:8px;
}
.ad-text-align-center { text-align:center; }
.ad-text-align-right { text-align:right; }
.ad-text-align-center .ad-slide-header,.ad-text-align-center>small,.ad-text-align-center .ad-slide-cta { margin-left:auto;margin-right:auto; }
.ad-text-align-right .ad-slide-header,.ad-text-align-right>small,.ad-text-align-right .ad-slide-cta { margin-left:auto; }
.ad-title-size-compact h3 { font-size:clamp(1.15rem,2.4vw,1.65rem)!important; }
.ad-title-size-impact h3 { font-size:clamp(1.75rem,4.2vw,3rem)!important;line-height:1.02!important; }
.ad-description-size-compact p { font-size:.84rem!important;line-height:1.42!important; }
.ad-description-size-large p { font-size:clamp(1rem,1.8vw,1.18rem)!important;line-height:1.65!important; }

.ad-media-stage { position:relative;width:100%;height:100%;min-height:inherit;display:grid;place-items:center;overflow:hidden;border-radius:inherit; }
.ad-media-stage>img,.ad-media-stage>video { width:100%;height:100%;min-height:inherit;display:block; }
.ad-inner-media-controls {
  position:absolute;
  left:10px;right:10px;bottom:10px;
  z-index:5;
  display:grid;
  grid-template-columns:32px minmax(0,1fr) 32px;
  align-items:center;
  gap:7px;
  pointer-events:none;
}
.ad-inner-media-controls>button,.ad-inner-media-controls>div>button { pointer-events:auto;cursor:pointer; }
.ad-inner-media-controls>button { width:32px;height:32px;border:0;border-radius:50%;background:rgba(20,14,17,.72);color:#fff;font-size:22px;line-height:1; }
.ad-inner-media-controls>div { display:flex;justify-content:center;gap:5px; }
.ad-inner-media-controls>div>button { width:7px;height:7px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.55); }
.ad-inner-media-controls>div>button.active { width:19px;border-radius:999px;background:#fff; }

.ad-palette-generator {
  display:grid;
  grid-template-columns:minmax(150px,.7fr) minmax(180px,1fr) auto auto;
  align-items:end;
  gap:10px;
  margin:13px 0;
  padding:12px;
  border:1px solid rgba(176,18,51,.12);
  border-radius:14px;
  background:#fff;
}
.ad-palette-generator label { display:grid;gap:7px; }
.ad-palette-generator label>span { color:var(--ink);font-size:.75rem;font-weight:900; }
.ad-palette-generator input[type="color"] { width:100%;height:42px;padding:3px;border:1px solid rgba(176,18,51,.16);border-radius:10px;background:#fff; }
.ad-color-contrast-report { margin-top:12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;border-radius:12px;font-size:.72rem; }
.ad-color-contrast-report strong { margin-right:auto; }
.ad-color-contrast-report span { padding:4px 7px;border-radius:999px;background:rgba(255,255,255,.65);font-weight:850; }
.ad-color-contrast-report.is-good { background:#eaf8ef;color:#176433;border:1px solid #bfe8cb; }
.ad-color-contrast-report.needs-review { background:#fff6df;color:#76520a;border:1px solid #f0d793; }
.ad-color-preset.oceano span { background:linear-gradient(135deg,#eff9ff 50%,#0877a8 50%); }
.ad-color-preset.bosque span { background:linear-gradient(135deg,#f1faf4 50%,#247348 50%); }
.ad-color-preset.violeta span { background:linear-gradient(135deg,#f8f3ff 50%,#7543a8 50%); }
.ad-color-preset.neutro span { background:linear-gradient(135deg,#f7f7f5 50%,#4e4d48 50%); }

html[data-theme="dark"] .ad-text-style-panel,
html[data-theme="dark"] .ad-media-collection-panel { background:linear-gradient(180deg,#2a1e23,#24191e);border-color:rgba(255,255,255,.10); }
html[data-theme="dark"] .ad-media-item-card,
html[data-theme="dark"] .ad-palette-generator { background:#2a1e23;border-color:rgba(255,255,255,.10); }
html[data-theme="dark"] .ad-media-item-actions button { background:#302127;color:#f2bac7;border-color:rgba(255,255,255,.12); }
html[data-theme="dark"] .ad-media-recommendation { background:linear-gradient(135deg,#342129,#24191e);border-color:rgba(255,255,255,.10); }
html[data-theme="dark"] .ad-media-recommendation strong { color:#f2a2b5; }
html[data-theme="dark"] .ad-palette-generator input[type="color"] { background:#24191e;border-color:rgba(255,255,255,.12); }
html[data-theme="dark"] .ad-color-contrast-report span { background:rgba(0,0,0,.18); }

@media(max-width:980px){
  .ad-text-style-grid { grid-template-columns:1fr 1fr; }
  .ad-palette-generator { grid-template-columns:1fr 1fr; }
}
@media(max-width:640px){
  .ad-text-style-head,.ad-media-collection-head { flex-direction:column; }
  .ad-text-style-head .outline-btn,.ad-media-collection-head .outline-btn { width:100%; }
  .ad-text-style-grid,.ad-palette-generator { grid-template-columns:1fr; }
  .ad-media-url-row { grid-template-columns:1fr; }
  .ad-media-item-card { grid-template-columns:58px minmax(0,1fr); }
  .ad-media-item-select { width:58px;height:50px; }
  .ad-media-item-actions { grid-column:1/-1;justify-content:flex-start; }
  .ad-media-recommendation { grid-template-columns:1fr; }
  .ad-media-recommendation .primary-btn { width:100%; }
}
.ad-slide-media,.ad-editor-preview-media { position:relative; }

/* Sonimax v111: indicador de sincronización Supabase */
.sonimax-cloud-status{position:fixed;right:16px;bottom:16px;z-index:99999;max-width:min(360px,calc(100vw - 32px));padding:9px 13px;border-radius:999px;background:#232126;color:#fff;font:600 12px/1.25 system-ui,-apple-system,"Segoe UI",sans-serif;box-shadow:0 8px 24px rgba(0,0,0,.22);opacity:.94}
.sonimax-cloud-status[data-kind="ok"]{background:#176b3a}.sonimax-cloud-status[data-kind="error"]{background:#9f1d2f}.sonimax-cloud-status[data-kind="working"]{background:#584b22}
@media print{.sonimax-cloud-status{display:none!important}}
.catalog-backup-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--accent, #8e1631) 28%, transparent);
  border-radius: 22px;
  background: var(--card, #fff);
  box-shadow: 0 12px 34px rgba(38, 12, 20, .08);
}
.catalog-backup-head,
.catalog-backup-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.catalog-backup-head h2 { margin: 4px 0 0; }
.catalog-backup-actions { justify-content: flex-start; margin: 16px 0; }
