/* La cuenta de RukianLab: el armazón (menú lateral y contenido) y las piezas que
   comparten sus páginas. Usa los colores, tipos y botones de assets/css/styles.css. */

.app [hidden], .dlg [hidden] { display: none !important; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.app { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }

/* --- menú lateral --------------------------------------------------------- */
/* El menú lateral va sobre el contenido: al estar pegado (sticky) forma su propia
   capa, y sin z-index los avisos y el menú de la cuenta quedaban detrás. */
.side {
  position: sticky; top: 0; z-index: 10; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 24px;
  padding: 22px 14px 18px; background: var(--bg-2); border-right: 1px solid var(--line); overflow-y: auto;
}
.side .brand { padding: 0 8px; }
.side__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Campana de avisos */
.bell {
  position: relative; width: 38px; height: 38px; border-radius: 11px; border: 0; background: none; color: var(--text-2);
  display: grid; place-items: center; cursor: pointer; transition: color .2s, background .2s;
}
.bell:hover, .bell[aria-expanded="true"] { color: var(--text); background: rgba(var(--tint), .07); }
.bell .ico { width: 20px; height: 20px; }
.bell b {
  position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--obra); color: #fff; font: 600 10.5px/17px var(--mono); text-align: center; box-shadow: 0 0 0 2px var(--bg-2);
}
.menu--avisos { position: fixed; left: 20px; top: 66px; width: min(380px, calc(100vw - 32px)); max-height: min(540px, calc(100dvh - 90px)); overflow: auto; padding: 8px; }
.avisos__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.avisos__head b { font-size: 15px; font-weight: 500; }
.menu .avisos__head button { width: auto; padding: 4px 8px; font-size: 13px; color: var(--brand-ink); }
.menu a.aviso { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 12px; padding: 10px 26px 10px 10px; white-space: normal; }
.aviso__icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--tint), .06); }
.menu .aviso__icon .ico { width: 16px; height: 16px; color: var(--text-2); }
.aviso--seguridad .aviso__icon, .aviso--prueba .aviso__icon { background: rgba(var(--crm-rgb), .14); }
.menu .aviso--seguridad .aviso__icon .ico, .menu .aviso--prueba .aviso__icon .ico { color: var(--crm-ink); }
.aviso--cobro .aviso__icon { background: rgba(var(--obra-rgb), .12); }
.menu .aviso--cobro .aviso__icon .ico { color: var(--obra-ink); }
.aviso--producto .aviso__icon, .aviso--cuenta .aviso__icon { background: rgba(var(--brand-rgb), .12); }
.menu .aviso--producto .aviso__icon .ico, .menu .aviso--cuenta .aviso__icon .ico { color: var(--brand-ink); }
.aviso b { display: block; font-size: 14px; font-weight: 500; line-height: 1.35; }
.aviso span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-3); line-height: 1.45; }
.aviso time { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.aviso.is-nueva::after { content: ''; position: absolute; top: 16px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.aviso:not(.is-nueva) b { color: var(--text-2); font-weight: 400; }
.avisos__vacio { padding: 28px 12px; text-align: center; color: var(--text-3); font-size: 14px; }

/* Aviso de arriba cuando un cobro falló */
.alerta {
  max-width: 1120px; margin: 0 auto 28px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px;
  background: rgba(var(--obra-rgb), .09); border: 1px solid rgba(var(--obra-rgb), .3);
}
.alerta--narrow { max-width: 820px; }
.alerta > .ico { width: 22px; height: 22px; color: var(--obra-ink); }
.alerta div { flex: 1 1 280px; display: grid; gap: 2px; }
.alerta b { font-size: 15px; font-weight: 500; }
.alerta span { font-size: 14px; color: var(--text-2); }
.alerta__acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.alerta .btn { height: 38px; padding: 0 16px; font-size: 14px; }
.side__nav { display: grid; gap: 2px; }
.side__nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  font-size: 14px; color: var(--text-2); transition: color .2s, background .2s;
}
.side__nav a:hover { color: var(--text); background: rgba(var(--tint), .05); }
.side__nav a[aria-current="page"] { color: var(--text); background: rgba(var(--tint), .07); font-weight: 500; }
.side__nav a[aria-current="page"] .ico { color: var(--brand-ink); }
.side__nav b { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--text-3); }
.side__foot { margin-top: auto; display: grid; gap: 12px; }
.side__help { padding: 14px; border-radius: 14px; background: rgba(var(--tint), .03); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); line-height: 1.5; }
.side__help a { display: inline-block; margin-top: 6px; color: var(--brand-ink); font-weight: 500; }
.side__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }

.me { position: relative; flex: 1; min-width: 0; }
.me__btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 1px solid transparent; border-radius: 12px;
  background: none; color: var(--text); text-align: left; cursor: pointer; transition: background .2s, border-color .2s;
}
.me__btn:hover, .me__btn[aria-expanded="true"] { background: rgba(var(--tint), .05); border-color: var(--line); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: rgba(var(--brand-rgb), .16); color: var(--brand-ink); font-weight: 600; font-size: 14px; text-transform: uppercase;
}
.avatar--lg { width: 56px; height: 56px; font-size: 22px; }
.me__txt { min-width: 0; display: grid; line-height: 1.3; }
.me__txt b { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me__txt span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .menu { left: 0; right: 0; bottom: calc(100% + 8px); }

/* --- menús desplegables --------------------------------------------------- */
.menu {
  position: absolute; z-index: 20; min-width: 220px; padding: 6px; border-radius: 14px;
  background: var(--menu-bg); border: 1px solid var(--line-2);
  box-shadow: 0 18px 50px -12px rgba(var(--shadow), calc(.6 * var(--shadow-k)));
  animation: menu-in .18s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--text); font-size: 14px; text-align: left; cursor: pointer;
}
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: rgba(var(--tint), .06); outline: none; }
.menu .ico { width: 16px; height: 16px; color: var(--text-3); }
.menu hr { margin: 6px 4px; border: 0; border-top: 1px solid var(--line); }
.menu .is-danger { color: var(--obra-ink); }
.menu .is-danger .ico { color: currentColor; }

/* --- contenido ------------------------------------------------------------ */
.main { min-width: 0; padding: 36px 44px 96px; }
.main__inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 40px; }
.main__inner--narrow { max-width: 820px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.head h1 { font-size: clamp(30px, 3.2vw, 40px); letter-spacing: -.04em; }
.head p { margin-top: 10px; color: var(--text-2); font-size: 15px; max-width: 620px; }
.head p b { color: var(--text); font-weight: 500; }
.head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--text-3); }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--text); }
.crumbs .ico { width: 14px; height: 14px; }

.shelf { display: grid; gap: 18px; scroll-margin-top: 24px; }
.shelf__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.shelf__head h2 { font-size: 22px; letter-spacing: -.03em; }
.shelf__head p { margin-top: 4px; font-size: 14px; color: var(--text-3); }

.btn .ico { width: 17px; height: 17px; }
.btn--danger { background: rgba(var(--obra-rgb), .12); color: var(--obra-ink); border-color: rgba(var(--obra-rgb), .3); }
.btn--danger:hover { background: rgba(var(--obra-rgb), .2); }
.btn--solid-danger { background: var(--obra); color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .75; }
.link { border: 0; padding: 0; background: none; color: var(--brand-ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-underline-offset: 3px; }
.link:hover { text-decoration: underline; }
.link--danger { color: var(--obra-ink); }
.muted { color: var(--text-3); font-size: 13px; }

/* Resumen de arriba */
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sum {
  display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s;
}
a.sum:hover { border-color: var(--line-2); }
.sum__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--tint), .05); color: var(--text-2); }
.sum__icon--ok { background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); }
.sum__icon--warn { background: rgba(var(--crm-rgb), .14); color: var(--crm-ink); }
.sum span { display: block; font-size: 13px; color: var(--text-3); }
.sum b { display: block; font-size: 16px; font-weight: 500; letter-spacing: -.01em; }

/* Filtros */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip[aria-pressed="true"] { color: var(--btn-fg); background: var(--btn-bg); border-color: transparent; font-weight: 500; }
.chip b { font-family: var(--mono); font-size: 11px; font-weight: 500; opacity: .7; }

.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 17px; height: 17px; }
.search .input { padding-left: 42px; height: 42px; border-radius: 999px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

/* --- tarjeta de producto -------------------------------------------------- */
.prod {
  position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 18px; min-width: 0;
  padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
  animation: card-in .45s var(--ease) both;
}
.prod::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(70% 55% at 0% 0%, rgba(var(--accent-rgb), .11), transparent 70%);
}
.prod:hover { border-color: rgba(var(--accent-rgb), .35); transform: translateY(-2px); box-shadow: 0 16px 40px -20px rgba(var(--accent-rgb), .45); }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } }
.prod__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.prod__id { min-width: 0; display: grid; gap: 3px; }
.prod__id h3 { font-size: 17px; letter-spacing: -.02em; line-height: 1.2; }
.prod__id h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.prod__id span { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod__more {
  width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--text-3);
  display: grid; place-items: center; cursor: pointer; transition: color .2s, background .2s;
}
.prod__more:hover, .prod__more[aria-expanded="true"] { color: var(--text); background: rgba(var(--tint), .07); }
.prod .menu { top: 58px; right: 14px; }
.prod__stat { display: grid; gap: 8px; }
.prod__stat b { font-size: 24px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.prod__stat small { font-size: 13px; color: var(--text-2); }
.prod__actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.prod__actions .btn { flex: 1 1 auto; height: 42px; font-size: 14px; }
.prod__note { font-size: 13px; color: var(--text-3); }
.prod__note a, .prod__note button { border: 0; padding: 0; background: none; color: var(--accent-ink); font: inherit; font-weight: 500; cursor: pointer; }
.prod__note a:hover, .prod__note button:hover { text-decoration: underline; text-underline-offset: 3px; }

.pill {
  justify-self: start; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .02em; white-space: nowrap;
  background: rgba(var(--tint), .06); color: var(--text-2);
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok { background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); }
.pill--trial { background: rgba(var(--crm-rgb), .14); color: var(--crm-ink); }
.pill--beta { background: rgba(var(--rfid-rgb), .14); color: var(--rfid-ink); }
.pill--danger { background: rgba(var(--obra-rgb), .12); color: var(--obra-ink); }
.pill--plain::before { display: none; }

.bar { height: 6px; border-radius: 6px; background: rgba(var(--tint), .08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.facts--rule { padding-top: 16px; border-top: 1px solid var(--line); }
.facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts dt { font-size: 12px; color: var(--text-3); }
.facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }

/* --- franja de tus productos (Inicio) ------------------------------------- */
.dock { display: flex; gap: 12px; overflow-x: auto; padding: 4px; margin: -4px; scrollbar-width: thin; }
.atajo {
  position: relative; isolation: isolate; flex: 0 0 auto; width: 228px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center;
  padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s var(--ease);
}
.atajo::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(80% 70% at 0% 0%, rgba(var(--accent-rgb), .12), transparent 70%); }
.atajo:hover { border-color: rgba(var(--accent-rgb), .4); transform: translateY(-2px); }
.atajo__txt { min-width: 0; display: grid; gap: 2px; }
.atajo__txt b { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atajo__txt a:hover { text-decoration: underline; text-underline-offset: 3px; }
.atajo__txt span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atajo__txt .is-warn { color: var(--obra-ink); }
.atajo .btn { grid-column: 1 / -1; height: 36px; font-size: 13.5px; }
.atajo--mas { place-content: center; justify-items: center; text-align: center; grid-template-columns: 1fr; border-style: dashed; color: var(--text-2); font-size: 14px; }
.atajo--mas:hover { color: var(--text); border-color: var(--line-3); }
.atajo--mas .ico { width: 22px; height: 22px; }

/* Primeros pasos */
.start { display: grid; gap: 16px; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid rgba(var(--brand-rgb), .3); position: relative; isolation: isolate; overflow: hidden; }
.start::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 90% at 100% 0%, rgba(var(--brand-rgb), .1), transparent 70%); }
.start__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.start__head h2 { font-size: 19px; letter-spacing: -.02em; }
.start__head p { margin-top: 4px; font-size: 14px; color: var(--text-3); }
.start ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.start li a { height: 100%; display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg); transition: border-color .2s; }
.start li a:hover { border-color: rgba(var(--brand-rgb), .5); }
.start li i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--mono); font-size: 12px; border: 1.5px solid var(--line-3); color: var(--text-2); }
.start li b { font-size: 14px; font-weight: 500; line-height: 1.35; }
.start li span { font-size: 13px; color: var(--text-3); line-height: 1.4; }
.start li.is-done a { background: none; border-style: dashed; }
.start li.is-done i { background: var(--brand); border-color: transparent; color: var(--btn-fg); }
.start li.is-done b { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-3); }
.start__bar { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.start__bar .bar { flex: 1; --accent: var(--brand); }

/* Grupos del catálogo */
.grupo { display: grid; gap: 14px; }
.grupo + .grupo { margin-top: 18px; }
.grupo__head { display: flex; align-items: baseline; gap: 10px; }
.grupo__head h3 { font-size: 16px; letter-spacing: -.01em; }
.grupo__head span { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.cat__desc { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.cat__price { font-size: 15px; color: var(--text-2); }
.cat__price b { color: var(--text); font-weight: 500; }
.prod:target { border-color: rgba(var(--accent-rgb), .6); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .15); }
.prod__actions .btn--ghost { flex: 0 1 auto; }
.filtros { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* --- tarjetas de catálogo ------------------------------------------------- */
.disc { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.dcard {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px; border-radius: 16px;
  background: rgba(var(--tint), .015); border: 1px solid var(--line); transition: border-color .2s, background .2s;
}
a.dcard:hover, .dcard:has(a:hover) { border-color: rgba(var(--accent-rgb), .35); background: rgba(var(--accent-rgb), .04); }
.dcard h3 { font-size: 15px; letter-spacing: -.01em; }
.dcard p { margin-top: 2px; font-size: 13px; color: var(--text-3); line-height: 1.45; }
.dcard__cta { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 500; color: var(--accent-ink); }
.dcard__cta .ico { width: 14px; height: 14px; }
.dcard .pill { margin-top: 8px; }

/* --- paneles y listas ----------------------------------------------------- */
.card {
  display: grid; gap: 18px; padding: 22px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); min-width: 0; scroll-margin-top: 24px;
}
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.card__head h2 { font-size: 18px; letter-spacing: -.02em; }
.card__head h3 { font-size: 16px; letter-spacing: -.01em; }
.card__head p { margin-top: 4px; font-size: 14px; color: var(--text-3); max-width: 560px; }
.card--danger { border-color: rgba(var(--obra-rgb), .28); }
.card--accent { position: relative; isolation: isolate; overflow: hidden; }
.card--accent::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 80% at 0% 0%, rgba(var(--accent-rgb), .12), transparent 70%); }
.cards { display: grid; gap: 16px; }
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.rows { display: grid; margin: -4px 0; }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--tint), .05); color: var(--text-2); }
.row__icon--ok { background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); }
.row__icon--warn { background: rgba(var(--crm-rgb), .14); color: var(--crm-ink); }
.row__main { min-width: 0; display: grid; gap: 2px; }
.row__main b { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* El texto de apoyo de una fila; las pastillas y etiquetas que van dentro conservan lo suyo. */
.row__main span:not(.pill):not(.tag) { font-size: 13px; color: var(--text-3); }
.row__side { display: flex; align-items: center; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.row__amount { font-family: var(--mono); font-size: 14px; font-weight: 500; white-space: nowrap; }
.row .btn { height: 36px; padding: 0 14px; font-size: 13px; }
.tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); font-weight: 500; }
.tag--warn { background: rgba(var(--crm-rgb), .14); color: var(--crm-ink); }

.note { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5;
  background: rgba(var(--geo-rgb), .08); color: var(--text-2); border: 1px solid rgba(var(--geo-rgb), .2); }
.note .ico { width: 18px; height: 18px; color: var(--geo-ink); margin-top: 1px; }
.note b { color: var(--text); font-weight: 500; }
.note--warn { background: rgba(var(--crm-rgb), .08); border-color: rgba(var(--crm-rgb), .25); }
.note--warn .ico { color: var(--crm-ink); }
.note--ok { background: rgba(var(--brand-rgb), .07); border-color: rgba(var(--brand-rgb), .22); }
.note--ok .ico { color: var(--brand-ink); }
.note--danger { background: rgba(var(--obra-rgb), .07); border-color: rgba(var(--obra-rgb), .25); }
.note--danger .ico { color: var(--obra-ink); }

/* --- formularios ---------------------------------------------------------- */
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > label, .field__label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field__hint { font-size: 13px; color: var(--text-3); }
.input {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--text);
  font: inherit; font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2385929a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: var(--line-3); }
.input:focus { outline: none; border-color: rgba(var(--brand-rgb), .75); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .15); }
.input[readonly] { color: var(--text-2); background: rgba(var(--tint), .03); }
.input[aria-invalid="true"] { border-color: rgba(var(--obra-rgb), .8); box-shadow: 0 0 0 4px rgba(var(--obra-rgb), .12); }
.check { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 14px; color: var(--text-2); line-height: 1.5; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); }
.check a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* Interruptor */
.onoff { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: rgba(var(--tint), .14); transition: background .2s; }
.onoff::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: transform .25s var(--ease); }
.onoff[aria-checked="true"] { background: var(--brand); }
.onoff[aria-checked="true"]::after { transform: translateX(18px); }
.onoff[disabled] { opacity: .55; cursor: not-allowed; }

/* Opciones de a dos o tres (mensual / anual, boleta / factura) */
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(var(--tint), .05); border: 1px solid var(--line); }
.seg button { height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--text-2); font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); font-weight: 500; box-shadow: 0 1px 3px rgba(var(--shadow), calc(.3 * var(--shadow-k))); }
.seg em { font-family: var(--mono); font-size: 10.5px; color: var(--brand-ink); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.stepper button { width: 42px; height: 44px; border: 0; background: none; color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: rgba(var(--tint), .06); color: var(--text); }
.stepper button[disabled] { opacity: .35; pointer-events: none; }
.stepper output { min-width: 48px; text-align: center; font-family: var(--mono); font-size: 16px; font-weight: 500; }

/* Tarjetas elegibles (planes, forma de pago) */
.options { display: grid; gap: 12px; }
.options--plans { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.opt {
  position: relative; display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: 16px; text-align: left; width: 100%;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.opt:hover { border-color: var(--line-3); }
.opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .2); background: rgba(var(--accent-rgb), .04); }
.opt__mark { position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-3); display: grid; place-items: center; }
.opt[aria-checked="true"] .opt__mark { border-color: var(--accent); background: var(--accent); color: #12162e; }
.opt__mark .ico { width: 12px; height: 12px; stroke-width: 3; opacity: 0; }
.opt[aria-checked="true"] .opt__mark .ico { opacity: 1; }
.opt__name { font-size: 16px; font-weight: 500; padding-right: 28px; }
.opt__price { font-size: 26px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.opt__price small { font-size: 13px; font-weight: 400; color: var(--text-3); letter-spacing: 0; margin-left: 4px; }
.opt__desc { font-size: 13px; color: var(--text-3); line-height: 1.45; }
.opt ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.opt li { display: grid; grid-template-columns: 14px 1fr; gap: 8px; }
.opt li::before { content: ''; width: 10px; height: 6px; margin-top: 6px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg); }
.opt__badge { justify-self: start; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: rgba(var(--accent-rgb), .14); color: var(--accent-ink); }
.opt--row { grid-template-columns: 40px 1fr; align-items: center; gap: 14px; }
.opt--row .opt__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--tint), .06); color: var(--text-2); }
.opt--row span { display: block; font-size: 13px; color: var(--text-3); }

/* --- dos columnas: contenido y resumen ----------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.split__aside { position: sticky; top: 24px; display: grid; gap: 16px; }
.total { display: grid; gap: 12px; }
.total__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); }
.total__row b { color: var(--text); font-weight: 500; font-family: var(--mono); }
.total__row--big { padding-top: 12px; border-top: 1px solid var(--line); font-size: 16px; color: var(--text); }
.total__row--big b { font-size: 22px; }

/* Pasos de la compra */
.trail { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.trail li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.trail li + li::before { content: ''; width: 24px; height: 1px; background: var(--line-3); margin-right: 2px; }
.trail i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--mono); font-size: 12px; border: 1px solid var(--line-3); }
.trail li[aria-current="step"] { color: var(--text); font-weight: 500; }
.trail li[aria-current="step"] i { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; }
.trail li.is-done i { background: rgba(var(--brand-rgb), .16); color: var(--brand-ink); border-color: transparent; }

/* Listo */
.done { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 40px 24px; }
.done h1 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -.04em; }
.done p { color: var(--text-2); max-width: 520px; }
.orb { position: relative; width: 88px; height: 88px; border-radius: 28px; display: grid; place-items: center; background: var(--brand); color: var(--btn-fg); animation: pop .5s var(--ease); }
.orb .ico { width: 42px; height: 42px; stroke-width: 2.4; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .15s var(--ease) forwards; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Vacío */
.empty {
  display: grid; justify-items: center; gap: 14px; padding: 48px 24px; border-radius: var(--radius-lg); text-align: center;
  border: 1px dashed var(--line-3); background: rgba(var(--tint), .015);
}
.empty h3 { font-size: 22px; letter-spacing: -.03em; }
.empty p { max-width: 440px; color: var(--text-2); font-size: 15px; }
.empty__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* Pestañas que llevan a cada parte de una página larga */
.jump { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: -8px 0 0; padding: 10px 0;
  background: linear-gradient(var(--bg) 75%, transparent); }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--text-2); border: 1px solid transparent; }
.jump a:hover { color: var(--text); background: rgba(var(--tint), .05); }
.jump a.is-on { color: var(--text); border-color: var(--line-2); background: var(--surface); }

/* Preguntas */
.qa { display: grid; }
.qa details { border-top: 1px solid var(--line); }
.qa details:first-child { border-top: 0; }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none; font-size: 15px; font-weight: 500; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .ico { color: var(--text-3); transition: transform .25s var(--ease); }
.qa details[open] summary .ico { transform: rotate(180deg); }
.qa details p { padding: 0 0 18px; color: var(--text-2); font-size: 14px; line-height: 1.6; max-width: 680px; }

/* Códigos de respaldo */
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.codes code { font-family: var(--mono); font-size: 15px; letter-spacing: .04em; padding: 6px 8px; text-align: center; }

/* --- diálogos ------------------------------------------------------------- */
.dlg { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line-2); border-radius: 22px;
  background: var(--menu-bg); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); overflow: auto; }
.dlg::backdrop { background: rgba(10, 12, 13, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg[open] { animation: dlg-in .25s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dlg form { display: grid; gap: 18px; padding: 26px; }
.dlg h2 { font-size: 22px; letter-spacing: -.03em; }
.dlg p { color: var(--text-2); font-size: 15px; line-height: 1.55; }
.dlg__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); }
.dlg__icon .ico { width: 24px; height: 24px; }
.dlg__icon--danger { background: rgba(var(--obra-rgb), .12); color: var(--obra-ink); }
.dlg__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.dlg__actions .btn { min-width: 120px; }

/* Pantalla de espera (ir al banco, pedir la huella) */
.wait { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(var(--veil), .82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wait__box { display: grid; justify-items: center; gap: 16px; text-align: center; padding: 24px; }
.wait__box b { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.wait__box span { color: var(--text-2); font-size: 14px; max-width: 340px; }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(var(--brand-rgb), .25); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* El aviso corto es el del sitio (.toast, en styles.css); aquí va abajo. */
.app ~ .toast { top: auto; bottom: 24px; transform: translate(-50%, 8px); }
.app ~ .toast.is-on { transform: translate(-50%, 0); }

/* --- barra del prototipo -------------------------------------------------- */
.proto {
  position: fixed; z-index: 30; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--nav-bg); color: #eef1f2;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .5); font-family: var(--mono); font-size: 11.5px;
}
.proto b { font-weight: 500; color: #d6f9ab; letter-spacing: .06em; text-transform: uppercase; }
.proto span { color: #b3bcc1; }
.proto button { border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; padding: 5px 9px; background: none; color: #b3bcc1; font: inherit; cursor: pointer; }
.proto button:hover { color: #eef1f2; border-color: rgba(255, 255, 255, .3); }
.proto .proto__x { border: 0; padding: 5px 7px; }
.proto[hidden] { display: none; }

/* --- pantallas angostas --------------------------------------------------- */
@media (max-width: 1080px) {
  .summary { grid-template-columns: 1fr 1fr; }
  .summary .sum:last-child { grid-column: 1 / -1; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split__aside { position: static; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: sticky; z-index: 15; height: auto; min-width: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px;
    padding: 12px 16px 0; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible;
    background: rgba(var(--veil), .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .side .brand { padding: 0; }
  .side__top { flex: 1; min-width: 0; }
  .menu--avisos { left: auto; right: 16px; top: 60px; }
  .side__foot { margin: 0; display: flex; align-items: center; gap: 8px; }
  .start ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side__help, .me__txt { display: none; }
  .me { flex: none; }
  .me__btn { padding: 2px; }
  .me .menu { left: auto; right: 0; bottom: auto; top: calc(100% + 8px); }
  .side__row { padding: 0; }
  .side__nav { order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .side__nav::-webkit-scrollbar { display: none; }
  .side__nav a { flex: none; padding: 12px 10px; border-radius: 0; border-bottom: 2px solid transparent; }
  .side__nav a[aria-current="page"] { background: none; border-bottom-color: var(--brand); }
  .side__nav a .ico, .side__nav b { display: none; }
  .main { padding: 28px 16px 120px; }
  .main__inner { gap: 32px; }
  .jump { top: 104px; }
  .cards--2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .summary { grid-template-columns: 1fr; }
  .summary .sum:last-child { grid-column: auto; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .head .btn, .head__actions { width: 100%; }
  .head__actions .btn { flex: 1; }
  .form__row, .facts--3 { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: auto minmax(0, 1fr); }
  .row__side { grid-column: 1 / -1; justify-content: flex-start; padding-left: 54px; }
  .start ol { grid-template-columns: minmax(0, 1fr); }
  .alerta__acciones, .alerta__acciones .btn { width: 100%; }
  .card { padding: 18px; }
  .dlg form { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .prod, .menu, .dlg[open], .orb, .orb .ico { animation: none; }
  .orb .ico { stroke-dashoffset: 0; }
  .prod:hover { transform: none; }
}
