/* Panel de cliente: estructura tipo GitHub (barra superior, menú lateral y ventana de trabajo a todo el ancho). */
:root {
    --fondo: #ffffff;
    --fondo-suave: #f6f8fa;
    --hover: #eff2f5;
    --borde: #d1d9e0;
    --borde-suave: #d1d9e0b3;
    --texto: #1f2328;
    --texto-2: #59636e;
    --enlace: #0969da;
    --verde: #1f883d;
    --verde-oscuro: #1a7f37;
    --radio: 6px;
    --alto-top: 56px;
    --ancho-side: 264px;
    /* Estados (revisión de Remi, 2026-12-01): antes iban escritos a mano en cada regla. */
    --aviso: #9a6700;
    --rojo: #cf222e;
    --enlace-suave: #ddf4ff;
    --rojo-suave: #ffebe9;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--fondo);
    color: var(--texto);
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
}
a { color: var(--enlace); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; font-weight: 600; margin: 0 0 4px; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--texto-2); }
.top .only-mobile { display: none; }

/* Barra superior */
.top {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 12px;
    height: var(--alto-top); padding: 0 16px;
    background: var(--fondo-suave); border-bottom: 1px solid var(--borde);
}
.icon-btn {
    display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
    background: transparent; border: 1px solid var(--borde); border-radius: var(--radio);
    color: var(--texto-2); cursor: pointer; fill: currentColor;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--texto); flex: none; }
.brand:hover { text-decoration: none; }
/* Logo de la web: cinco fichas con las tintas de Atrio, Orbe, Remi, Fiscalis y Tempore */
.brand-mark { display: flex; gap: 2px; }
.brand-mark i { width: 6px; height: 18px; border-radius: 2px; background: #12a37f; }
.brand-mark i:nth-child(2) { background: #ff6a4d; }
.brand-mark i:nth-child(3) { background: #4a5bff; }
.brand-mark i:nth-child(4) { background: #8a4dff; }
.brand-mark i:nth-child(5) { background: #f2a516; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; }
.crumbs a { color: var(--texto); padding: 2px 6px; border-radius: var(--radio); }
.crumbs a:hover { background: var(--hover); text-decoration: none; }
.crumbs [aria-current] { font-weight: 600; padding: 2px 6px; }
.sep { color: var(--texto-2); }
.top-menu { display: flex; gap: 2px; margin-left: auto; }
.top-menu a { color: var(--texto); padding: 6px 10px; border-radius: var(--radio); white-space: nowrap; }
.top-menu a:hover { background: var(--hover); text-decoration: none; }
.top-end { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid var(--borde); }
.search input {
    width: 200px; height: 32px; padding: 0 10px; font: inherit;
    border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo);
}
.balance {
    height: 32px; display: inline-flex; align-items: center; padding: 0 10px;
    border: 1px solid var(--borde); border-radius: var(--radio); color: var(--texto);
    font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap;
}
.balance:hover { background: var(--hover); text-decoration: none; }
.avatar {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    background: var(--enlace-suave); color: #0550ae; font-weight: 600; font-size: 12px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

/* Menú lateral + ventana de trabajo, a todo el ancho */
.shell { display: grid; grid-template-columns: var(--ancho-side) minmax(0, 1fr); min-height: calc(100vh - var(--alto-top)); }
.side {
    position: sticky; top: var(--alto-top); align-self: start;
    height: calc(100vh - var(--alto-top)); overflow-y: auto;
    padding: 12px 12px; background: var(--fondo); border-right: 1px solid var(--borde);
    display: flex; flex-direction: column;
}
.tool { display: flex; align-items: center; gap: 10px; padding: 2px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--borde-suave); }
.tool-mark {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; flex: none;
    background: var(--tinta); color: #fff; font-weight: 700; font-size: 17px;
}
.tool-name { font-weight: 600; font-size: 16px; }
.tool-sub { color: var(--texto-2); font-size: 12px; }
.side-item {
    position: relative; display: flex; align-items: center; gap: 8px;
    padding: 4px 8px; border-radius: var(--radio); color: var(--texto);
}
.side-item:hover { background: var(--hover); text-decoration: none; }
.side-item.is-active { background: #818b981a; font-weight: 600; }
.side-item.is-active::before {
    content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 4px;
    border-radius: 0 6px 6px 0; background: var(--tinta);
}
.side-item .counter, .side-item .label { margin-left: auto; }

.work { padding: 24px 32px; min-width: 0; }
.work-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--borde-suave);
}
.btn {
    display: inline-flex; align-items: center; height: 32px; padding: 0 12px; white-space: nowrap;
    border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave);
    color: var(--texto); font-weight: 500;
}
.btn:hover { text-decoration: none; background: var(--hover); }
.suggest-field { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--borde-suave); }
.suggest-field .field { margin-bottom: 0; }
.btn-primary { background: var(--verde); border-color: #1f232826; color: #fff; }
.btn-primary:hover { background: var(--verde-oscuro); }
/* Herramientas con su color en todo el panel (Remi): botones, pasos hechos, selecciones y estados. */
body.tinted { --verde: var(--tinta); --verde-oscuro: color-mix(in srgb, var(--tinta) 85%, #000); }
.tinted .label-done { border-color: color-mix(in srgb, var(--tinta) 40%, transparent); }

/* Pestañas de filtro dentro de la ventana */
.subtabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--borde-suave); overflow-x: auto; }
.subtab { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px; margin-bottom: 6px; border-radius: var(--radio); color: var(--texto); white-space: nowrap; }
.subtab:hover { background: var(--hover); text-decoration: none; }
.subtab.is-active { font-weight: 600; }
.subtab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; border-radius: 2px; background: var(--tinta); }
.counter {
    display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 2em;
    background: #818b981f; font-size: 12px; font-weight: 500; line-height: 18px; text-align: center;
}

/* Lista tipo issues */
.box { border: 1px solid var(--borde); border-radius: var(--radio); }
.row { display: flex; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--borde-suave); }
.row:first-child { border-top: 0; }
.row:hover { background: var(--fondo-suave); }
.row-main { flex: 1; min-width: 0; }
.row-title { color: var(--texto); font-weight: 600; font-size: 15px; }
.row-main .muted { font-size: 12px; margin-top: 2px; }
/* Botones de un recuadro: abajo a la derecha, en todas las herramientas. */
.box-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.box-actions form { margin: 0; }
.row-end { color: var(--texto-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-end:has(form) { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.row-end form { margin: 0; }
.rweb-more { padding: 12px 16px 16px; border-top: 1px solid var(--borde-suave); }
.rweb-more summary { cursor: pointer; color: var(--enlace); font-size: 14px; }
.state { width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; flex: none; border: 2px solid; }
.state-running { border-color: var(--aviso); }
.state-done { border-color: var(--verde); background: var(--verde); }
.state-undone { border-color: var(--texto-2); }
.label {
    display: inline-block; margin-left: 6px; padding: 0 7px; border: 1px solid var(--borde);
    border-radius: 2em; font-size: 12px; font-weight: 500; line-height: 18px; color: var(--texto-2);
    vertical-align: 1px; white-space: nowrap;
}
.label-running { color: var(--aviso); border-color: #d4a72c66; }
.label-done { color: var(--verde-oscuro); border-color: #4ac26b66; }
.empty { padding: 32px 16px; text-align: center; color: var(--texto-2); }
.empty-box { padding: 48px 16px; text-align: center; }
.empty-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }

/* Pantallas medianas: los recursos se esconden antes que la ruta */
@media (max-width: 1100px) {
    .top-menu { display: none; }
    .top-end { margin-left: auto; }
}
/* Móvil: el menú lateral pasa a cajón */
@media (max-width: 768px) {
    .top .only-mobile { display: inline-grid; }
    .brand-name, .crumbs a:first-of-type, .crumbs .sep:first-child { display: none; }
    .top-end { border-left: 0; padding-left: 0; flex-shrink: 0; }
    /* Sin ruta en el móvil: el título de cada página ya dice dónde estás y deja sitio a los créditos. */
    .crumbs { display: none; }
    .shell { grid-template-columns: 1fr; }
    .side {
        position: fixed; left: 0; top: var(--alto-top); z-index: 15; width: 85vw; max-width: 320px;
        transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 8px 24px #424a5333;
    }
    .side-open .side { transform: none; }
    .work { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* Alta, entrada y recuperación (como la entrada de GitHub) */
.auth { background: var(--fondo-suave); }
.auth-main { width: 100%; max-width: 360px; margin: 0 auto; padding: 40px 16px; }
.auth-brand { justify-content: center; margin-bottom: 16px; }
.auth-title { text-align: center; font-size: 24px; font-weight: 300; letter-spacing: -.5px; margin-bottom: 16px; }
.auth-box { padding: 16px; background: var(--fondo); border: 1px solid var(--borde); border-radius: var(--radio); }
.auth-box p + p, .auth-box p + form { margin-top: 12px; }
.auth-alt { margin-top: 16px; padding: 16px; text-align: center; border: 1px solid var(--borde); border-radius: var(--radio); }
.field { display: block; margin-bottom: 16px; font-weight: 600; }
.field input {
    display: block; width: 100%; height: 32px; margin-top: 6px; padding: 0 12px; font: inherit; font-weight: 400;
    border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo);
}
.field input:focus, .search input:focus { outline: 2px solid var(--enlace); outline-offset: -1px; border-color: var(--enlace); }
.field-row { display: flex; justify-content: space-between; font-weight: 600; }
.field-row a { font-weight: 400; font-size: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 16px; }
.check input { margin-top: 3px; }
.hint { display: block; margin-top: 6px; color: var(--texto-2); font-size: 12px; font-weight: 400; }
.btn-block { width: 100%; justify-content: center; cursor: pointer; font: inherit; font-weight: 500; }
.flash { margin-bottom: 16px; padding: 12px 16px; border: 1px solid #54aeff66; border-radius: var(--radio); background: var(--enlace-suave); }
.flash-error { border-color: #ff818266; background: var(--rojo-suave); }
.inline { display: inline; }
.link { padding: 0; border: 0; background: none; color: var(--enlace); font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* Pantallas reales del panel */
.work-sub { font-size: 16px; font-weight: 600; margin: 24px 0 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card { padding: 16px; }
.card-label { font-size: 12px; font-weight: 600; color: var(--texto-2); }
.card-value { font-size: 20px; font-weight: 600; margin: 4px 0; }
.dot-lg { width: 12px; height: 12px; margin-top: 5px; }
.state-bad { border-color: var(--rojo); background: var(--rojo); }
.label-bad { color: var(--rojo); border-color: #ff818266; }
a.label:hover { text-decoration: none; background: var(--hover); }
.form-box { padding: 24px; }
.form-box .btn { cursor: pointer; font: inherit; font-weight: 500; }
/* Formularios a todo el ancho (usuario, 2026-11-20): los campos cortos van de dos en dos, lo largo ocupa la fila entera
   y los botones quedan abajo a la derecha. */
form.form-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
form.form-box > * { grid-column: 1 / -1; }
form.form-box > .field:has(> input:not([type=checkbox]):not([type=radio]):not([type=file])),
form.form-box > .field:has(> select) { grid-column: auto; }
form.form-box > .btn, .form-box > .btn, .form-box > form > .btn:last-child { justify-self: end; display: flex; width: fit-content; margin: 8px 0 0 auto; }
@media (max-width: 760px) { form.form-box { grid-template-columns: minmax(0, 1fr); } form.form-box > .field { grid-column: 1 / -1; } }
.field-error { display: block; margin-top: 6px; color: var(--rojo); font-size: 12px; font-weight: 400; }
.side-btn { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.row form { margin: 0; }
.row > .label, .row > form { align-self: center; }
.btn[aria-disabled="true"] { color: var(--texto-2); cursor: not-allowed; }
.amount-in { color: var(--verde-oscuro); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }

/* Lotes (4.3) */
.state-quoted { border-color: var(--enlace); }
.label-quoted { color: var(--enlace); border-color: #54aeff66; }
.label-undone { color: var(--texto-2); }
.field select, .field textarea {
    display: block; width: 100%; margin-top: 6px; padding: 6px 12px; font: inherit; font-weight: 400;
    border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo);
}
.field textarea { resize: vertical; }
.field select:focus, .field textarea:focus { outline: 2px solid var(--enlace); outline-offset: -1px; border-color: var(--enlace); }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; }
fieldset.field legend { margin-bottom: 6px; }
fieldset.field .check { font-weight: 400; margin-bottom: 8px; }
fieldset.field .check input { display: inline; width: auto; height: auto; margin: 3px 0 0; }
.approve { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.progress { height: 8px; margin: 8px 0; border-radius: 4px; background: var(--hover); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--verde); }
h1 .label { vertical-align: middle; font-size: 12px; }

/* Informe y deshacer (4.4) */
.report-head { margin-top: 24px; align-items: center; }
.report-head .work-sub { margin: 0; }
.btn-danger { color: var(--rojo); cursor: pointer; font: inherit; font-weight: 500; }
.btn-danger:hover { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.change { margin-top: 4px; font-size: 13px; overflow-wrap: anywhere; }
.change del { color: var(--rojo); }
.change ins { color: var(--verde-oscuro); text-decoration: none; }

/* Otras herramientas, plegadas en el menú lateral */

/* Recarga de saldo (Saldo) */
.topup { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topup .btn { cursor: pointer; font: inherit; font-weight: 500; }
.topup-gift { margin-left: 4px; padding: 1px 6px; border-radius: 999px; font-size: 12px; background: #1f883d1f; color: var(--verde-oscuro); }
.topup-note { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; }
.btn-primary .topup-gift { background: #ffffff33; color: #fff; }

/* Asistente de nuevo lote: pasos, tarjetas de elección, selector de productos y barra inferior. */
.steps { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 20px; padding: 0; list-style: none; font-size: 13px; }
.step { display: flex; align-items: center; color: var(--texto-2); }
.step + .step::before { content: ""; width: 24px; height: 1px; margin: 0 8px; background: var(--borde); }
.step > a, .step > span { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; color: inherit; }
.step-n {
    display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--borde);
    border-radius: 50%; font-size: 12px; font-weight: 600; background: var(--fondo);
}
.step.is-current { color: var(--texto); font-weight: 600; }
.step.is-current .step-n { border-color: var(--texto); background: var(--texto); color: var(--fondo); }
.step.is-done .step-n { border-color: var(--verde); background: var(--verde); color: #fff; }
.step.is-done a:hover { color: var(--enlace); text-decoration: none; }
.steps-done { display: flex; align-items: center; margin-left: 12px; color: var(--verde-oscuro); font-weight: 600; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
.choice {
    display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--borde);
    border-radius: var(--radio); background: var(--fondo); color: var(--texto); cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
a.choice:hover, .choice:hover { border-color: var(--enlace); text-decoration: none; }
a.choice:focus-visible, .choice:has(input:focus-visible) { outline: 2px solid var(--enlace); outline-offset: 2px; }
.choice-title { font-size: 16px; font-weight: 600; }
.style-choices { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 8px; }
.style-choices .choice { gap: 2px; padding: 10px 12px 10px 36px; }
.style-choices .choice-radio input[type=radio] { left: 13px; top: 13px; }
.style-choices .choice-title { font-size: 14px; }
.style-choices .choice-text { font-size: 12.5px; line-height: 1.4; }
.style-own-wrap { display: flex; gap: 8px; margin: 4px 0 8px; }
.style-own-wrap[hidden] { display: none; }
.style-own { flex: 1; min-width: 0; height: 32px; padding: 0 10px; font: inherit; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); }
.style-own:focus { outline: 2px solid var(--enlace); outline-offset: -1px; border-color: var(--enlace); }
.style-saved { margin-bottom: 20px; }
.style-fact { margin-right: 12px; white-space: nowrap; }
.style-fact strong { color: var(--texto); font-weight: 500; }
.style-save .style-own { display: block; width: 100%; max-width: 360px; margin-top: 8px; }
.style-save .style-own[hidden] { display: none; }
.choice-text { color: var(--texto-2); font-size: 14px; }
.choice-go { margin-top: auto; padding-top: 8px; color: var(--enlace); font-weight: 500; }
.choice-radio { position: relative; padding-left: 48px; }
.choice-radio input { position: absolute; left: 20px; top: 23px; margin: 0; accent-color: var(--verde); }
.choice-radio:has(input:checked) { border-color: var(--verde); box-shadow: 0 0 0 1px var(--verde); }
.scope { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0 0 4px; padding: 0; border: 0; }
.picker-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.picker-search input {
    width: 260px; max-width: 100%; height: 32px; padding: 0 10px; font: inherit;
    border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo);
}
.picker-search input:focus { outline: 2px solid var(--enlace); outline-offset: -1px; border-color: var(--enlace); }
.picker-cat select {
    height: 32px; max-width: 320px; padding: 0 8px; font: inherit; border: 1px solid var(--borde);
    border-radius: var(--radio); background: var(--fondo-suave);
}
.picker.is-off { opacity: .45; }
.pick-row { cursor: pointer; align-items: flex-start; }
.pick-row input { margin-top: 4px; accent-color: var(--verde); }
.pick-row .row-main .muted { display: block; }
.pick-flags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 45%; white-space: normal; }
@media (max-width: 640px) { .pick-flags { max-width: none; justify-content: flex-start; flex-basis: 100%; padding-left: 26px; } }
[data-list].is-loading { opacity: .6; }
.wizard-nav { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.wizard-nav .btn { cursor: pointer; font: inherit; font-weight: 500; }
.wizard-nav .btn-primary { margin-left: auto; }
.wizard-nav .btn:disabled { opacity: .5; cursor: not-allowed; }
.wizard-bar {
    position: sticky; bottom: 0; z-index: 2; margin: 24px -16px 0; padding: 12px 16px;
    border-top: 1px solid var(--borde); background: color-mix(in srgb, var(--fondo) 92%, transparent); backdrop-filter: blur(6px);
}
.wizard-count { margin: 0; color: var(--texto-2); }
.wizard-count strong { color: var(--texto); }
@media (max-width: 640px) {
    .step + .step::before { width: 10px; margin: 0 4px; }
    .step:not(.is-current) > * { font-size: 0; gap: 0; }
    .step:not(.is-current) .step-n { font-size: 12px; }
        .wizard-count { flex: 1; font-size: 13px; }
}
.wizard-primary { margin-left: auto; }
.wizard-bar form { margin: 0; }
.drop {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 32px 16px;
    border: 2px dashed var(--borde); border-radius: var(--radio); background: var(--fondo-suave); text-align: center; cursor: pointer;
}
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop:hover, .drop.is-over, .drop:has(input:focus-visible) { border-color: var(--enlace); background: var(--enlace-suave); }
.drop.has-file { border-style: solid; border-color: var(--verde); }
.drop-title { font-weight: 600; color: var(--texto); }
.upload { max-width: 640px; }
.map-row { align-items: center; cursor: default; }
.map-row .row-main .muted { display: block; }
.map-row select, .review-options select {
    height: 32px; width: 280px; max-width: 100%; padding: 0 8px; font: inherit;
    border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave);
}
.review-options { max-width: none; }
.review-options .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
.preview { width: 100%; border-collapse: collapse; font-size: 14px; }
.preview th, .preview td { padding: 8px 16px; border-top: 1px solid var(--borde-suave); text-align: left; white-space: nowrap; }
.preview th { border-top: 0; color: var(--texto-2); font-size: 12px; font-weight: 600; background: var(--fondo-suave); }
.preview td:first-child { white-space: normal; min-width: 200px; font-weight: 500; }
/* Columna de casillas: solo lo que ocupa la casilla, sin el hueco de 200 px de la columna de nombre. */
.preview td:first-child:has(> input[type="checkbox"]:only-child), .preview th:first-child:has(> input[type="checkbox"]:only-child) { width: 1%; min-width: 0; }
.fails { margin-top: 16px; }
.fails summary { padding: 10px 16px; cursor: pointer; font-weight: 600; color: var(--aviso); }
form.is-loading { opacity: .6; pointer-events: none; }
@media (max-width: 640px) {
    .map-row { flex-direction: column; align-items: stretch; }
    .map-row select { width: 100%; }
}
.guide { margin-top: 8px; }
.guide > summary { cursor: pointer; list-style-position: inside; }
.guide-steps { margin: 0; padding: 0; list-style: none; counter-reset: paso; display: grid; gap: 16px; max-width: 760px; }
.guide-step { position: relative; padding: 16px 16px 16px 60px; counter-increment: paso; }
.guide-step::before {
    content: counter(paso); position: absolute; left: 16px; top: 14px; display: grid; place-items: center;
    width: 28px; height: 28px; border-radius: 50%; background: var(--texto); color: var(--fondo); font-weight: 600;
}
.guide-step h3 { margin: 2px 0 8px; font-size: 16px; }
.guide-step p { margin: 0 0 8px; }
.guide-step .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.guide-step code { padding: 1px 5px; border-radius: 4px; background: var(--fondo-suave); font-size: 13px; }
.perms { margin: 4px 0 12px; border: 1px solid var(--borde-suave); border-radius: var(--radio); }
.perms td, .perms th { text-align: center; }
.perms td:first-child, .perms th:first-child { text-align: left; min-width: 0; }
.tick { color: var(--verde); font-weight: 700; }
.tick-optional { color: var(--enlace); }
.topup-other input {
    width: 84px; height: 32px; padding: 0 8px; font: inherit; text-align: right;
    border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo);
}
.topup-other input:focus { outline: 2px solid var(--enlace); outline-offset: -1px; border-color: var(--enlace); }
.work-head:has(.topup-bar) { flex-wrap: wrap; align-items: center; }
.topup-bar { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.topup-bar .topup { flex-wrap: wrap; row-gap: 22px; }
.topup-bar .topup .btn { white-space: nowrap; }
.topup-other { padding-left: 16px; border-left: 1px solid var(--borde); }

/* Navegación: botón de nuevo lote, Configuración al pie y menú de la cuenta */
.account-menu { position: relative; }
.account-menu > summary { list-style: none; cursor: pointer; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:focus-visible { outline: 2px solid var(--enlace); outline-offset: 2px; }
.account-pop {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; padding: 6px;
    border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); box-shadow: 0 8px 24px #8c959f33;
}
.account-email { padding: 6px 8px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--borde-suave); color: var(--texto-2); font-size: 12px; overflow-wrap: anywhere; }
.account-pop a, .account-pop button {
    display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: var(--radio); background: none;
    color: var(--texto); font: inherit; text-align: left; cursor: pointer;
}
.account-pop a:hover, .account-pop button:hover { background: var(--hover); text-decoration: none; }
.account-pop form { margin: 0; }
.ico { flex: none; color: var(--texto-2); }
.side-item.is-active .ico, .side-item.is-open .ico { color: var(--texto); }
.chev { margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid var(--texto-2); border-bottom: 1.5px solid var(--texto-2); transform: rotate(-45deg); transition: transform .15s; }

.top-menu a { display: inline-flex; align-items: center; gap: 6px; }

/* Selector de herramienta: arriba del menú; debajo, solo las opciones de la herramienta elegida. */
.switcher { position: relative; margin-bottom: 4px; }
.switcher > summary { list-style: none; cursor: pointer; border-radius: var(--radio); }
.switcher > summary::-webkit-details-marker { display: none; }
.switcher > summary:hover { background: var(--hover); }
.tool-text { display: flex; flex-direction: column; min-width: 0; }
.switcher[open] .chev { transform: rotate(-135deg); }
.switcher .chev { transform: rotate(45deg); }
.switcher-menu {
    position: absolute; z-index: 20; top: calc(100% - 8px); left: 0; right: 0;
    padding: 6px; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio);
    box-shadow: 0 8px 24px rgba(140, 149, 159, .2);
}
.switcher-title { margin: 4px 8px 6px; font-size: 12px; font-weight: 600; color: var(--texto-2); }
.switcher-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--texto); text-decoration: none; font-size: 14px; }
.switcher-item:hover { background: var(--hover); }
.switcher-check { margin-left: auto; color: var(--verde-oscuro); }
.switcher-all { margin-top: 4px; border-top: 1px solid var(--borde-suave); border-radius: 0 0 6px 6px; padding-top: 8px; color: var(--texto-2); }
.tool-mark-sm { width: 22px; height: 22px; border-radius: 5px; font-size: 12px; }

.bill { padding: 12px 16px; border-top: 1px solid var(--borde-suave); background: var(--fondo); font-size: 14px; }
.bill-line { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; color: var(--texto-2); }
.bill-total { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--borde-suave); color: var(--texto); font-weight: 600; }
.bill .muted { margin-top: 6px; }

.group-bill { padding: 12px 16px; display: grid; gap: 10px; justify-items: start; }
.group-day { padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.group-option { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.group-option > span { display: flex; flex-direction: column; gap: 2px; }
.group-option input { margin-top: 4px; }

/* Recarga recomendada: una etiqueta encima y un pulso suave para señalar el camino más corto. */
.topup-suggest { position: relative; display: inline-flex; }
.topup-badge {
    position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
    padding: 1px 8px; border-radius: 999px; background: var(--verde-oscuro); color: #fff;
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.btn-pulse { animation: topup-pulse 1.6s ease-in-out infinite; }
.btn-pulse:hover, .btn-pulse:focus-visible { animation: none; }
/* Parpadea entre verde y blanco, solo con el color (sin sombras ni halos); al pasar el ratón se queda verde. */
@keyframes topup-pulse {
    0%, 100% { background: var(--verde); color: #fff; }
    50% { background: #fff; color: var(--verde-oscuro); border-color: var(--verde); }
}
@media (prefers-reduced-motion: reduce) { .btn-pulse { animation: none; } }
.topup-bar:has(.topup-suggest) { padding-top: 18px; }

/* Informe del lote: el texto escrito, para leerlo sin ir a la tienda */
.change-text { margin: 4px 0 8px; }
.change-text summary { cursor: pointer; color: var(--enlace); font-size: 13px; }
.change-html { margin-top: 8px; padding: 12px 16px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave); font-size: 13px; line-height: 1.55; }
.change-html > :first-child { margin-top: 0; }
.change-html > :last-child { margin-bottom: 0; }
.report-head form { display: inline-block; }
.tip { padding: 12px 16px; margin-bottom: 16px; border-color: var(--enlace); }

/* Fotos de Atrio: selector en el asistente y miniaturas en el informe */
.change-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.change-photos img { display: block; width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--borde); border-radius: var(--radio); background: #fff; }
.change-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.change-alt code { padding: 2px 6px; border: 1px solid var(--borde); border-radius: var(--radio); background: #fff; }
.task-row { cursor: pointer; align-items: flex-start; }
.task-row input { margin-top: 4px; accent-color: var(--verde); }
.task-row .row-main .muted { display: block; }
.choice-radio select.style-own { position: static; display: block; width: 100%; margin-top: 8px; }

/* Ficha del informe: foto, datos, estado y edición */
.ficha { align-items: flex-start; gap: 16px; }
.ficha-photo { flex: 0 0 120px; width: 120px; height: 120px; display: grid; place-items: center; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave); overflow: hidden; }
.ficha-photo img { width: 100%; height: 100%; object-fit: contain; }
.ficha-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ficha-actions { display: flex; gap: 8px; }
.ficha-actions form { margin: 0; }
.ficha-actions .label { align-self: center; margin-left: 0; }
.ficha-specs-inline .label { margin: 0 0 6px; }
.ficha-info { margin: 4px 0 8px; }
.ficha-edit { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--borde); border-radius: var(--radio); }
.ficha-edit .field { display: block; margin-bottom: 10px; font-weight: 500; font-size: 13px; }
.ficha-edit .field input { display: block; width: 100%; height: 32px; margin-top: 4px; padding: 0 10px; font: inherit; font-weight: 400; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); }
.field-label { margin: 8px 0 4px; font-weight: 500; font-size: 13px; }
.ficha-editable { min-height: 60px; outline: none; background: var(--fondo); }
.ficha-editable:focus { border-color: var(--enlace); box-shadow: 0 0 0 1px var(--enlace); }
.ficha-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.draft-tip form { margin-top: 8px; }
@media (max-width: 640px) { .ficha { flex-wrap: wrap; } .ficha-photo { width: 96px; height: 96px; flex-basis: 96px; } }
.ficha-actions-bottom { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--borde-suave); }
.lote-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.lote-amount .muted { font-size: 12px; }
.lote-delete { margin: 0 0 0 4px; align-self: center; }
.lote-delete .icon-btn { border-color: transparent; }
.lote-delete .icon-btn:hover { color: var(--rojo); border-color: #ff818266; }
.lote-amount .paid { color: var(--verde-oscuro); }

/* Menú: secciones Cuenta y Ajustes, y el + de Lotes */
.side-heading { margin: 16px 8px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-2); }
.side-row { display: flex; align-items: center; gap: 4px; }
.side-row .side-item { flex: 1; min-width: 0; }
.side-plus { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--borde); border-radius: var(--radio); color: var(--verde-oscuro); background: var(--fondo); }
.side-plus:hover { background: var(--hover); text-decoration: none; }
.settings-form { padding: 16px; max-width: 480px; margin-bottom: 20px; }
.settings-form .field { margin-bottom: 12px; }

/* Asistente: ver el texto actual de un producto antes de marcarlo */
.pick-peek { display: inline-block; margin-top: 6px; }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12.5px; }
.pick-content { display: block; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave); font-size: 13px; line-height: 1.5; cursor: default; }
.pick-content[hidden] { display: none; }
.pick-block { display: block; }
.pick-block + .pick-block { margin-top: 8px; }
.pick-block strong { display: block; font-size: 12px; color: var(--texto-2); font-weight: 600; }

/* Progreso del lote en directo */
.live-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.live-pct { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.progress span { transition: width .8s ease; }
.progress.is-live span { background-image: linear-gradient(90deg, transparent 0, rgba(255,255,255,.35) 50%, transparent 100%); background-size: 200% 100%; animation: live-shine 1.6s linear infinite; }
@keyframes live-shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.live-stats { display: flex; flex-wrap: wrap; gap: 24px; margin: 12px 0 4px; }
.live-stats div { display: flex; flex-direction: column; }
.live-stats strong { font-size: 18px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .live-dot, .progress.is-live span { animation: none; } .progress span { transition: none; } }
.photo-upload { align-items: center; gap: 16px; }
.photo-upload input[type=file] { margin-top: 8px; font-size: 13px; }
.photo-hint { font-size: 12px; margin-top: 4px; }
.photo-ask { margin: 8px 0 6px; font-weight: 500; }
.photo-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.photo-pick .btn { cursor: pointer; gap: 6px; }

/* Fotos de una ficha y barra final del informe */
.ficha-fotos { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--borde); border-radius: var(--radio); }
.ficha-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.ficha-thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; }
.ficha-thumb img { width: 88px; height: 88px; object-fit: contain; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave); }
.ficha-thumb:has(input:checked) img { opacity: .35; border-color: var(--rojo); }
.finish-bar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; padding: 12px 16px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); box-shadow: 0 -4px 12px rgba(31,35,40,.08); }

/* Recomendación del asistente: etiqueta, gancho y precio de cada opción */
.choice .label { margin-left: 6px; padding: 0 7px; font-size: 11px; font-weight: 500; line-height: 18px; vertical-align: 1px; }
.choice-price { display: block; margin-top: 8px; font-size: 12.5px; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.advice { margin: -4px 0 12px; font-size: 13px; }
.side-heading { display: flex; align-items: center; gap: 6px; }
.side-heading .ico { width: 13px; height: 13px; }

/* Asistente, paso 1: «Así está tu tienda» */
.health-head { display: flex; justify-content: space-between; padding: 10px 16px; background: var(--fondo-suave); border-bottom: 1px solid var(--borde); border-radius: var(--radio) var(--radio) 0 0; font-size: 13px; font-weight: 600; }
.health-head span + span { color: var(--texto-2); font-weight: 400; }
.health-group { padding: 14px 16px 4px; font-size: 12px; font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: .02em; }
.health-group .muted { text-transform: none; font-weight: 400; letter-spacing: 0; }
.health-group ~ .health-group { margin-top: 4px; border-top: 1px solid var(--borde); }
.health-row { align-items: center; cursor: pointer; }
.health-group + .health-row { border-top: 0; }
.health-row input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--verde); }
.health-row .row-main .muted { display: block; }
.health-row.is-empty { cursor: default; }
.health-row.is-empty .row-title { color: var(--texto-2); font-weight: 500; }
.health-count { flex: none; min-width: 44px; padding: 1px 10px; border-radius: 999px; background: #fff8c5; color: var(--aviso); font-size: 12px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.health-count.is-ok { background: none; color: var(--verde-oscuro); font-weight: 500; }
.health-count.is-quiet { background: var(--hover); color: var(--texto-2); font-weight: 500; }
.health-foot { margin-top: 12px; font-size: 12px; }
@media (max-width: 640px) {
    .health-stats { grid-template-columns: 1fr; }
    .health-stat + .health-stat { border-left: 0; border-top: 1px solid var(--borde-suave); }
    .health-stat { flex-direction: row; align-items: baseline; gap: 10px; padding: 10px 16px; }
    .health-stat strong { font-size: 22px; }
}

/* Asistente, paso 2: pestañas y filas de la lista */
.pick-tabs { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 16px; border-bottom: 1px solid var(--borde); }
.pick-tabs button { position: relative; padding: 8px 2px 10px; border: 0; background: none; font: inherit; color: var(--texto-2); cursor: pointer; }
.pick-tabs button:hover { color: var(--texto); }
.pick-tabs button[aria-current] { color: var(--texto); font-weight: 600; }
.pick-tabs button[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: #fd8c73; }
.pick-tabs .counter { margin-left: 4px; }
.pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--fondo-suave); border-bottom: 1px solid var(--borde); border-radius: var(--radio) var(--radio) 0 0; font-size: 13px; color: var(--texto-2); }
.pick-head .check { color: var(--texto); }
.pick-head input { accent-color: var(--verde); }
.pick-row .pick-peek { display: inline; margin: 0; font-size: 12px; }
.pick-missing { color: var(--aviso); font-size: 12px; font-weight: 500; }
.pick-ok { color: var(--verde-oscuro); font-size: 12px; }
.scope[hidden], .picker-cat[hidden] { display: none; }
.work-head:has(> .tip) { flex-direction: column; align-items: stretch; gap: 12px; }

/* Asistente, paso 3: una fila por cosa a arreglar, con sus opciones debajo */
.fix-row { padding: 16px; border-top: 1px solid var(--borde-suave); }
.fix-row:first-child { border-top: 0; }
.fix-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.fix-head h2 { margin: 0; }
.fix-gap { flex: none; color: var(--aviso); font-size: 12px; font-weight: 500; }
.fix-gap.is-quiet { color: var(--texto-2); }
.fix-q { margin-bottom: 10px; }
.fix-row .choices { margin-top: 10px; }
.fix-select select { margin-top: 10px; height: 32px; padding: 0 8px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave); font: inherit; }
.fix-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 16px; background: var(--fondo-suave); border-top: 1px solid var(--borde); border-radius: 0 0 var(--radio) var(--radio); }
.fix-total strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.fix-total .muted { flex-basis: 100%; font-size: 12px; }

/* Revisión uno a uno (paso 6) */
.review-head { align-items: flex-start; }
.review-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.review-top { display: flex; gap: 20px; padding: 16px; }
.review-photo { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 160px; min-height: 160px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave); overflow: hidden; color: var(--texto-2); font-size: 13px; }
.review-photo img { width: 100%; height: auto; display: block; }
.review-photo.is-missing { border-style: dashed; border-color: #d4a72c; background: #fff8c5; color: var(--aviso); }
.review-upload { font-size: 13px; padding-bottom: 8px; }
.review-data { flex: 1; min-width: 0; }
.review-was { margin-top: -6px; margin-bottom: 8px; font-size: 12px; }
.field.is-missing input { border-color: #d4a72c; background: #fffdf0; }
.review-text { padding: 16px; border-top: 1px solid var(--borde-suave); }
.review-text-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-text-head h2 { margin: 0; }
.review-text-head .muted { font-size: 12px; }
.review-text-head .segmented { margin-left: auto; }
.review-old { color: var(--texto-2); background: var(--fondo-suave); }
.segmented { display: inline-flex; padding: 2px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave); }
.segmented button { padding: 2px 10px; border: 1px solid transparent; border-radius: 5px; background: none; font: inherit; font-size: 12px; color: var(--texto-2); cursor: pointer; }
.segmented button[aria-pressed=true] { background: var(--fondo); border-color: var(--borde); color: var(--texto); font-weight: 600; }
.review-foot { padding: 14px 16px; background: var(--fondo-suave); border-top: 1px solid var(--borde); border-radius: 0 0 var(--radio) var(--radio); }
.review-warn { margin-bottom: 10px; color: var(--aviso); font-size: 13px; }
.review-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.review-actions .btn { cursor: pointer; font: inherit; font-weight: 500; }
/* El aviso de lo que queda, a la izquierda; los botones, a la derecha. */
.review-left { order: -1; margin-right: auto; font-size: 12px; }
@media (max-width: 640px) {
    .review-top { flex-direction: column; }
    .review-photo { width: 100%; min-height: 120px; }
    .review-text-head { flex-wrap: wrap; }
    .review-left { margin-right: 0; flex-basis: 100%; }
}

/* Paso 4: una fila por pregunta, opciones en píldoras */
.style-saved > summary { display: flex; align-items: baseline; gap: 6px; padding: 10px 16px; cursor: pointer; font-weight: 500; list-style: none; }
.style-saved > summary::-webkit-details-marker { display: none; }
.style-saved > summary::before { content: ""; align-self: center; width: 6px; height: 6px; margin-right: 4px; border: solid var(--texto-2); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform .15s ease-out; }
.style-saved[open] > summary::before { transform: rotate(45deg); }
.style-saved[open] > summary { border-bottom: 1px solid var(--borde-suave); }
.style-saved-names { margin-left: auto; font-size: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.style-saved .row { align-items: center; }
.style-row { margin: 0; border-width: 1px 0 0; border-style: solid; border-color: var(--borde-suave); min-width: 0; }
.style-row:first-child { border-top: 0; }
.style-row legend { float: left; width: 100%; margin-bottom: 10px; padding: 0; }
.pills { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 1px solid var(--borde); border-radius: 999px; background: var(--fondo); font-size: 14px; cursor: pointer; transition: background-color .12s ease-out, border-color .12s ease-out; }
.pill input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.pill:hover { background: var(--fondo-suave); }
.pill:has(input:checked) { border-color: var(--verde); background: #dafbe1; font-weight: 600; box-shadow: inset 0 0 0 1px var(--verde); }
.pill:has(input:focus-visible) { outline: 2px solid var(--enlace); outline-offset: 2px; }
.pill-own:not(:has(input:checked)) { border-style: dashed; color: var(--texto-2); }
.style-row .style-own-wrap { margin: 10px 0 0; }
.style-hint { margin-top: 8px; font-size: 13px; min-height: 1.4em; }
.style-rec { margin-left: 4px; color: var(--verde-oscuro); font-weight: 600; }
.style-save { flex-direction: column; gap: 8px; }
.style-save .check { margin: 0; }
.style-save .style-own { flex: none; width: 100%; max-width: 320px; }
.style-save .style-own[hidden] { display: none; }

/* Paso 5: qué se va a hacer, precio cerrado y un solo botón */
.quote-list { margin: 0; }
.quote-row { display: grid; grid-template-columns: 140px 1fr; gap: 4px 16px; padding: 12px 16px; border-top: 1px solid var(--borde-suave); font-size: 14px; }
.quote-row:first-child { border-top: 0; }
.quote-row dt { color: var(--texto-2); }
.quote-row dd { margin: 0; min-width: 0; }
.quote-row dd .muted { margin-top: 2px; font-size: 12.5px; }
.quote-dd-end { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.quote-total { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding: 16px; background: var(--fondo-suave); border-top: 1px solid var(--borde); border-radius: 0 0 var(--radio) var(--radio); }
.quote-total .muted { font-size: 12.5px; }
.quote-price { margin: 2px 0 4px; font-size: 32px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.quote-balance { text-align: right; }
.quote-balance-value { margin: 2px 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Presupuesto: los avisos, a lo ancho; el botón de aprobar o recargar, abajo a la derecha. */
.quote-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-top: 16px; }
.quote-actions > * { align-self: stretch; }
.quote-actions > form, .quote-actions > .btn { align-self: flex-end; margin: 0; }
.quote-actions > .alta-cuota { align-self: stretch; }
.quote-actions .btn-block { width: auto; height: 40px; padding: 0 20px; font-size: 15px; }
.quote-actions > .muted { font-size: 13px; text-align: right; }
.quote-short { padding: 10px 16px; border: 1px solid #d4a72c; border-radius: var(--radio); background: #fff8c5; color: #7d4e00; font-size: 14px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--enlace); font: inherit; font-size: 13px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--enlace); outline-offset: 2px; border-radius: 3px; }
#cambiar-lote { align-self: flex-start; margin-top: 8px; }
@media (max-width: 600px) {
    .quote-row { grid-template-columns: 1fr; }
    .quote-balance { text-align: left; }
}

/* Paso 1: revisión en directo y gráfico del catálogo */
.scan { margin-bottom: 16px; padding: 16px 20px; overflow: hidden; transition: opacity .4s ease-out, max-height .45s ease-out, margin .45s ease-out, padding .45s ease-out; max-height: 200px; }
.scan.is-leaving { opacity: 0; max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }

@media (prefers-reduced-motion: reduce) { .scan { transition: none; } }

/* Paso 1: parte de la tienda (categoría y marca) y las dos fuentes, archivo del día y lectura del momento. */
.scope { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: 13px; color: var(--texto-2); }
.scope select { max-width: 320px; height: 32px; padding: 0 10px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave); color: var(--texto); font: inherit; font-size: 14px; }
.sources { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
.source { min-width: 0; padding: 14px 18px; }
.source + .source { border-left: 1px solid var(--borde); }
.source-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 600; }
.source-name i { width: 8px; height: 8px; border-radius: 50%; background: #818b98; }
.source.is-live .source-name i { background: var(--verde); box-shadow: 0 0 0 3px #1f883d26; }
.source-tag { padding: 0 7px; border-radius: 999px; background: var(--enlace-suave); color: var(--enlace); font-size: 11.5px; font-weight: 600; }
.source-when { margin-top: 4px; font-size: 13px; color: var(--texto-2); }
.source-when strong { color: var(--texto); font-weight: 600; font-variant-numeric: tabular-nums; }
.source-when.is-error { color: #d1242f; }
.source-act { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12.5px; color: var(--texto-2); }
.source-bar { height: 6px; margin: 10px 0 0; }
.donut-legend.is-compare li { grid-template-columns: 10px 1fr 64px 64px 52px; }
.donut-legend .donut-cols { padding-bottom: 2px; color: var(--texto-2); font-size: 12px; font-weight: 600; }
.donut-cols span:not(:first-of-type), .donut-legend .was { text-align: right; }
.donut-legend .was, .health-cols .was { color: var(--texto-2); font-variant-numeric: tabular-nums; }
.donut-note { margin-top: 8px; font-size: 12px; color: var(--texto-2); }
.health-cols { flex: none; display: grid; grid-template-columns: 64px 64px 52px; gap: 8px; align-items: center; text-align: right; font-size: 13px; }
.health-head .health-cols { color: var(--texto-2); font-size: 12px; }
.health-cols .health-count { justify-self: end; }
.delta { color: var(--texto-2); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.delta.is-better { color: var(--verde-oscuro); }
.delta.is-worse { color: var(--aviso); }
@media (max-width: 720px) {
    .sources { grid-template-columns: 1fr; }
    .source + .source { border-left: 0; border-top: 1px solid var(--borde); }
        }

/* Lote: lo contratado frente a lo escrito y lo que se cobra de verdad. */
.settle { padding: 16px 20px; }
.settle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 12px; }
.settle-grid dt { font-size: 12px; color: var(--texto-2); }
.settle-grid dd { margin: 2px 0 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.settle-grid dd .muted { display: block; font-size: 12px; font-weight: 400; }
.settle-grid .is-final dd { color: var(--verde-oscuro); }
.settle-leg { margin: 0 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); }
.settle-leg.is-bill { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--borde, #d0d7de); color: var(--verde-oscuro); }
.settle-grid.is-quote dd { color: var(--texto-2); }
.settle > .muted { font-size: 13px; }
@media (max-width: 720px) { .settle-grid { grid-template-columns: 1fr 1fr; } }
.settle-extra { margin-top: 12px; padding: 12px 14px; border: 1px solid #d4a72c66; border-radius: var(--radio); background: #fff8c5; font-size: 13.5px; }
.settle-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 10px; }
/* La acción principal, la última de la fila (abajo a la derecha). */
.settle-actions .btn-primary, .review-actions .btn-primary { order: 1; }
.review-lock { margin: 0 0 12px; font-size: 13px; }
.finish-bar[hidden] { display: none; }
.report-note { margin: -4px 0 12px; font-size: 13px; }
.ficha-photo-up { margin-top: 8px; }
.ficha-specs-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ficha-specs-inline label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--texto-2); }
.ficha-specs-inline input { width: 90px; height: 32px; padding: 0 8px; border: 1px solid var(--borde); border-radius: var(--radio); font: inherit; font-size: 14px; color: var(--texto); }
/* La barra de publicar: el texto se encoge y, si no cabe (móvil), los botones bajan a su propia línea, a la derecha. */
.finish-bar { flex-wrap: wrap; }
.finish-bar > .muted { flex: 1 1 280px; min-width: 0; }
.finish-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex: 0 1 auto; margin-left: auto; }
.finish-bar.is-armed { border-color: #d4a72c; background: #fff8c5; }
.label.is-new { animation: validada .45s cubic-bezier(.16, 1, .3, 1); }
@keyframes validada { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .label.is-new { animation: none; } }

.is-pending { color: var(--aviso); }
.side-heading-first { margin-top: 8px; }
/* Sangría: los títulos de bloque quedan a la izquierda de sus opciones */
.side-heading + nav { padding-left: 12px; }
.side-heading + nav .side-item.is-active::before { left: -24px; }

/* Ayuda de la tarifa: botón «?» junto a cada concepto y modal con el fondo difuminado */
.help-btn {
    display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 4px; padding: 0;
    border: 1px solid var(--borde); border-radius: 50%; background: var(--fondo-suave); color: var(--texto-2);
    font: 600 11px/1 inherit; vertical-align: 2px; cursor: pointer;
}
.help-btn:hover, .help-btn:focus-visible { color: var(--texto); border-color: var(--texto-2); }
.help-modal {
    width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 24px 28px; overflow-y: auto;
    border: 1px solid var(--borde); border-radius: 12px; background: var(--fondo); color: var(--texto);
    box-shadow: 0 16px 48px rgb(0 0 0 / .18);
}
.help-modal::backdrop { background: rgb(15 20 25 / .25); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.help-close {
    position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: var(--radio);
    background: transparent; color: var(--texto-2); font-size: 22px; line-height: 1; cursor: pointer;
}
.help-close:hover { background: var(--hover); color: var(--texto); }
.help-body h2 { margin: 0 32px 12px 0; font-size: 20px; }
.help-body h3 { margin: 18px 0 6px; font-size: 14px; }
.help-body p, .help-body li { font-size: 14px; line-height: 1.55; }
.help-body ul { margin: 0 0 12px; padding-left: 20px; }
.help-example { padding: 10px 12px; border-radius: var(--radio); background: var(--fondo-suave); }

/* Resumen: primeros pasos plegables */
.steps-fold { margin-top: 16px; }
.steps-fold > summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; }
.steps-fold > summary::-webkit-details-marker { display: none; }
.steps-fold > summary .chev { margin-left: 0; transform: rotate(45deg); }
.steps-fold[open] > summary .chev { transform: rotate(-135deg); }
.steps-fold[open] > summary { border-bottom: 1px solid var(--borde-suave); }
.steps-count { font-size: 13px; color: var(--aviso); }
.steps-count.is-done { color: var(--verde); font-weight: 600; }
.steps-bar { flex: 1; max-width: 160px; height: 6px; margin-left: auto; border-radius: 3px; background: var(--borde-suave); overflow: hidden; }
.steps-bar > span { display: block; height: 100%; background: var(--verde); }

/* Resumen: «Tu tienda ahora», dashboard en directo */
.ahora-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.ahora-head .work-sub { margin: 0; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border: 1px solid var(--borde); border-radius: 999px; font-size: 12px; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.live-read { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.live-read .state { width: 8px; height: 8px; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
/* Sin tarjetas sueltas: 5 en fila; en mediano, 2 + 3; en móvil, 2 + 2 + 1 a todo el ancho */
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } .kpis > .kpi { grid-column: span 2; } .kpis > .kpi:nth-child(-n+2) { grid-column: span 3; } }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis > .kpi, .kpis > .kpi:nth-child(-n+2) { grid-column: auto; } .kpis > .kpi:last-child { grid-column: 1 / -1; } }
.kpi { padding: 14px 16px; }
.kpi p { margin: 0; }
.kpi-value { white-space: nowrap; font-size: clamp(17px, 1.5vw, 24px); font-weight: 600; margin: 4px 0 2px !important; font-variant-numeric: tabular-nums; }
.kpi-value.is-warn { color: var(--aviso); }
.kpi .muted { font-size: 12px; }
.kpi-ring { display: flex; align-items: center; gap: 14px; }
.ring { --p: 0; flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
    background: conic-gradient(var(--verde) calc(var(--p) * 1%), var(--borde-suave) 0); }
.ring > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--fondo); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid > .dash-panel:first-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-panel { padding: 14px 16px; }
.dash-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.dash-panel-head h3 { margin: 0; font-size: 14px; }
.dash-panel-head .muted { font-size: 12px; }
.dash-empty { margin: 8px 0; font-size: 13px; }
.meter { margin: 10px 0; }
.meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.meter-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-bar { height: 6px; margin-top: 5px; border-radius: 3px; background: var(--borde-suave); overflow: hidden; }
.meter-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--tinta); transition: width .4s ease; }
.meter-sm { margin: 8px 0; }
.tag { margin-left: 4px; padding: 0 6px; border: 1px solid var(--borde); border-radius: 999px; font-size: 11px; color: var(--texto-2); }
.tag-atrio { border-color: color-mix(in srgb, var(--tinta) 40%, transparent); color: var(--tinta); }
.stat { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--borde-suave); border-radius: var(--radio); color: var(--texto); }
.stat:hover { background: var(--hover); text-decoration: none; }
.stat .muted { font-size: 12px; }
.empty-dash { padding: 16px; margin-top: 12px; }
@media (max-width: 640px) { .dash-grid { grid-template-columns: 1fr; } }

/* «?» en la esquina de cada tarjeta y panel del resumen */
.kpi, .dash-panel { position: relative; }
.help-corner { position: absolute; top: 10px; right: 10px; margin: 0; }
.dash-panel-head { padding-right: 26px; }

/* Guía: índice, pasos con miniatura y consejos */
.gd-index { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin: 4px 0 8px; }
@media (max-width: 1280px) { .gd-index { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .gd-index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gd-index a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid var(--borde); border-radius: 999px; font-size: 13px; color: var(--texto); }
.gd-index a:hover { background: var(--hover); text-decoration: none; }
.gd-index span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--tinta); color: #fff; font-size: 11px; font-weight: 600; }
.gd-step { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 32px 0; border-top: 1px solid var(--borde-suave); scroll-margin-top: 72px; }
.gd-step:first-of-type { border-top: 0; }
.gd-n { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tinta); }
.gd-step h2, .gd-tips h2 { margin: 0 0 10px; font-size: 20px; }
.gd-text p, .gd-text li { font-size: 14px; line-height: 1.6; }
.gd-text ul, .gd-text ol { margin: 8px 0 0; padding-left: 20px; }
.gd-text li { margin: 4px 0; }
.gd-fig { margin: 0; padding: 24px; border-radius: 12px; background: var(--fondo-suave); border: 1px solid var(--borde-suave); }
.gd-tips { padding: 32px 0; border-top: 1px solid var(--borde-suave); scroll-margin-top: 72px; }
.gd-tip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gd-tip { padding: 14px 16px; }
.gd-tip h3 { margin: 0 0 6px; font-size: 14px; }
.gd-tip p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--texto-2); }
@media (max-width: 1100px) { .gd-tip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .gd-step { grid-template-columns: 1fr; gap: 16px; } .gd-tip-grid { grid-template-columns: 1fr; } }

/* Miniaturas de pantallas del panel (ilustraciones de la guía) */
.mk { font-size: 12px; color: var(--texto); }
.mk-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); box-shadow: 0 6px 20px rgb(0 0 0 / .06); }
.mk-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mk-row b { font-size: 13px; }
.mk-dot { width: 10px; height: 10px; border-radius: 50%; }
.mk-muted { color: var(--texto-2); margin: 0; }
.mk-big { margin: 0; font-size: 22px; font-weight: 600; }
.mk-big small { font-size: 12px; font-weight: 400; color: var(--texto-2); }
.mk-btn { display: inline-block; align-self: flex-start; padding: 4px 10px; border: 1px solid var(--borde); border-radius: 6px; background: var(--fondo-suave); font-weight: 500; }
.mk-primary { background: var(--verde); border-color: var(--verde); color: #fff; }
.mk-chip { align-self: flex-start; padding: 1px 8px; border: 1px solid var(--borde); border-radius: 999px; color: var(--texto-2); }
.mk-ok { border-color: color-mix(in srgb, var(--verde) 40%, transparent); color: var(--verde); }
.mk-okt { color: var(--verde); }
.mk-label { margin: 0 0 -6px; color: var(--texto-2); font-weight: 600; }
.mk-input { padding: 5px 8px; border: 1px solid var(--borde); border-radius: 6px; background: var(--fondo); color: var(--texto-2); }
.mk-ring { --p: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(var(--verde) calc(var(--p) * 1%), var(--borde-suave) 0); }
.mk-ring span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--fondo); font-size: 10px; font-weight: 600; }
.mk-meter span { display: block; margin-bottom: 3px; }
.mk-meter i { display: block; height: 5px; border-radius: 3px; background: var(--borde-suave); overflow: hidden; }
.mk-meter b { display: block; height: 100%; background: var(--tinta); }
.mk-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; text-align: center; }
.mk-steps span { display: flex; flex-direction: column; align-items: center; gap: 3px; font-weight: 600; color: var(--texto-2); }
.mk-steps span::before { content: ""; display: none; }
.mk-steps span { padding-top: 4px; }
.mk-steps .is-on { color: var(--verde); }
.mk-steps small { font-size: 9px; font-weight: 400; color: var(--texto-2); }
.mk-total { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 6px; background: var(--fondo-suave); }
.mk-lines { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.mk-lines i { display: block; height: 6px; border-radius: 3px; background: var(--borde-suave); }
.mk-dl { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--borde-suave); }
.mk-dl:first-child { border-top: 0; }
.mk-final { font-size: 13px; border-top: 1px solid var(--borde); }

/* Guía: paso largo (conexión de la tienda) */
.gd-step-long { align-items: start; }
.gd-text h3 { margin: 18px 0 4px; font-size: 15px; }
.gd-perms { margin: 8px 0 4px; }
.gd-step-long .gd-fig { position: sticky; top: 72px; display: grid; gap: 14px; }
@media (max-width: 760px) { .gd-step-long .gd-fig { position: static; } }

/* Mercator: señales de cada oferta del catálogo */
.signals { margin: 2px 0 6px; padding-left: 18px; }
.signals li { margin: 1px 0; }

/* Asistente para conectar la tienda: cada paso con su estado */
.wizard-steps { margin-top: 16px; }
.wizard-steps h3 .label { vertical-align: 2px; }
.guide-step.is-done::before { content: "✔"; background: var(--verde); }
.guide-step.is-bad::before { content: "✖"; background: var(--rojo); }
.guide-step.is-pending { color: var(--texto-2); }
.guide-step.is-pending::before { background: var(--borde); color: var(--texto-2); }
.guide-step.is-pending h3 { margin-bottom: 0; }
.guide-step .flash { margin: 0 0 12px; }
.step-done { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.step-done p { margin: 0; overflow-wrap: anywhere; }
.click-steps { margin: 0 0 8px; padding-left: 20px; }
.click-steps li { margin-bottom: 4px; }
.perms-check td, .perms-check th { text-align: left; }
.cross { color: var(--rojo); font-weight: 700; }
.ready { margin-bottom: 16px; }
.guide-form { padding: 16px; max-width: 760px; }

/* Cupón de bienvenida, aviso de prueba y recarga automática */
.auto-topup { padding: 16px; max-width: 760px; }
.auto-topup .check { display: flex; gap: 8px; align-items: center; font-weight: 600; margin-bottom: 12px; }
.auto-fields { display: flex; flex-wrap: wrap; gap: 16px; }
.auto-fields .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.with-unit { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.auto-fields input, .auto-fields select { height: 32px; padding: 0 8px; font: inherit; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); width: 110px; }
.auto-fields select { width: auto; }
.admin { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }

/* Help desk: incidencias como conversación */
.incident { margin-bottom: 8px; }
.incident-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; cursor: pointer; list-style: none; font-weight: 600; }
.incident-head::-webkit-details-marker { display: none; }
.incident-thread { padding: 0 16px 16px; border-top: 1px solid var(--borde); }
.incident-msg { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--borde); border-radius: var(--radio); white-space: pre-line; }
.incident-msg p { margin: 0; }
.incident-msg .card-label { margin-bottom: 4px; }
.incident-msg.is-support { background: var(--fondo-suave); }
.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
p.filters { justify-content: flex-start; gap: 8px; }
.segmented a { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid transparent; border-radius: 5px; font-size: 13px; color: var(--texto-2); }
.segmented a:hover { color: var(--texto); text-decoration: none; }
.segmented a[aria-current=page] { background: var(--fondo); border-color: var(--borde); color: var(--texto); font-weight: 600; }
.filters-selects { display: flex; gap: 8px; }
.filters-selects select { height: 30px; padding: 0 8px; font: inherit; font-size: 13px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); }
.kpi-link { display: block; color: inherit; }
.kpi-link:hover { background: var(--hover); text-decoration: none; }
.board-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
@media (max-width: 900px) { .board-2 { grid-template-columns: 1fr; } }

/* Asistente de puesta en marcha */
.wz-count { margin: 0 0 8px; font-size: 13px; }
.wz-nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.wz-nav-end { display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wz-options { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; border: 0; }
.wz-options .choice { display: block; cursor: pointer; }
.wz-options .choice-title, .wz-options .choice-text { display: block; }
.wz-section { margin-bottom: 8px; }
.wz-section > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 12px 16px; cursor: pointer; }
.wz-section > summary { position: relative; padding-right: 40px; list-style: none; }
.wz-section > summary::-webkit-details-marker { display: none; }
.wz-section > summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; line-height: 1; color: var(--texto-2); }
.wz-section[open] > summary::after { content: "−"; }
.wz-section > summary:hover { background: var(--borde-suave); }
.wz-section > summary .muted { flex-basis: 100%; font-size: 13px; }
.wz-section[open] > summary { border-bottom: 1px solid var(--borde-suave); }
.wz-gap { margin-top: 16px; }
.wz-preview { max-width: 400px; height: 560px; overflow: hidden; }
.wz-preview iframe { width: 100%; height: 100%; border: 0; }
.wz-cta { margin-bottom: 16px; }
.wz-cta .steps-bar { display: block; max-width: none; margin: 8px 0 12px; }
.wz-cta .steps-bar > span { display: block; height: 100%; background: var(--tinta); }
.form-box + .form-box { margin-top: 16px; }
.wz-list { margin: 8px 0; padding-left: 20px; }
.wz-list li { margin-bottom: 6px; }
.wz-key { max-width: 760px; }
.wz-key td { font-size: 13px; }

/* Menú lateral con grupos plegables, para que quepa */
.side-fold > summary { display: flex; align-items: center; cursor: pointer; list-style: none; }
.side-fold > summary::-webkit-details-marker { display: none; }
.side-fold > summary .chev { margin-left: auto; transform: rotate(45deg); }
.side-fold[open] > summary .chev { transform: rotate(-135deg); }
.side-fold > summary:hover { color: var(--texto, inherit); }

/* Subir ficheros: se pulsa o se arrastra */
.dz { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--borde); border-radius: var(--radio); background: #fff; color: var(--texto-2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dz:hover, .dz.is-over { border-color: var(--tinta); background: color-mix(in srgb, var(--tinta) 6%, #fff); color: var(--tinta); }
.dz:focus-within { outline: 2px solid var(--tinta); outline-offset: 2px; }
.dz.is-filled { border-style: solid; border-color: var(--tinta); }
.dz input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dz-title { font-weight: 600; color: var(--texto, inherit); overflow-wrap: anywhere; }
.dz-hint { font-size: 12px; font-weight: 400; color: var(--texto-2); }

/* Lo encontrado en la web del cliente */
.wz-progress { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.wz-progress li { display: flex; align-items: center; gap: 8px; color: var(--texto-2); }
.wz-progress li span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--borde); font-size: 12px; }
.wz-progress li.is-done { color: inherit; }
.wz-progress li.is-done span { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.wz-progress li.is-now { color: inherit; font-weight: 600; }
.wz-progress li.is-now span { border-color: var(--tinta); color: var(--tinta); }
.wz-found { white-space: pre-line; }
.wz-from-web { display: block; margin-top: 6px; color: var(--tinta); font-size: 12px; font-weight: 600; }
.wz-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.wz-product { padding: 10px; }
.wz-product img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; margin-bottom: 8px; }
.wz-product .row-title { font-size: 13px; }

/* Clave ya guardada: verde a propósito, es una confirmación que no debe pasar por alto */
.key-saved { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #4ac26b; border-radius: var(--radio); background: #dafbe1; color: #116329; font-weight: 600; }
.key-saved span { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: #1a7f37; color: #fff; font-size: 13px; }
.key-change { margin-bottom: 16px; }
.key-change > summary { cursor: pointer; color: var(--enlace); font-size: 13px; margin-bottom: 8px; }

/* Indicador del asistente: una sola línea, con el color de la herramienta */
.wz-steps { display: grid; grid-template-columns: repeat(var(--pasos), minmax(0, 1fr)); margin: 0 0 24px; padding: 0; list-style: none; }
.wz-steps li { position: relative; text-align: center; }
.wz-steps li + li::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--borde); }
.wz-steps li.is-done::before, .wz-steps li.is-current::before { background: var(--tinta); }
.wz-steps a { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--texto-2); text-decoration: none; }
.wz-step-n { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--borde); border-radius: 50%; background: #fff; font-size: 13px; font-weight: 600; }
.wz-step-label { font-size: 12px; line-height: 1.25; }
.wz-steps a:hover .wz-step-label { text-decoration: underline; }
.wz-steps .is-done .wz-step-n { border-color: var(--tinta); background: var(--tinta); color: #fff; }
.wz-steps .is-current .wz-step-n { border-color: var(--tinta); background: #fff; color: var(--tinta); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tinta) 25%, transparent); }
.wz-steps .is-current a { color: var(--tinta); font-weight: 600; }
@media (max-width: 720px) { .wz-step-label { display: none; } .wz-steps .is-current .wz-step-label { display: none; } .wz-step-n { width: 24px; height: 24px; font-size: 12px; } .wz-steps li + li::before { top: 11px; } }

.recurring-check { max-width: 340px; margin: 0 0 8px; font-size: 12px; font-weight: 400; }

/* Productos que conoce Remi */
.wz-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-bottom: 16px; }
.wz-filter .field { flex: 1 1 220px; margin: 0; }
.product-row { align-items: center; }
.product-row img, .product-noimg { flex: none; width: 48px; height: 48px; border-radius: 6px; object-fit: contain; background: var(--borde-suave); }

/* Alta de una herramienta: bajo el nombre, a todo el ancho de la fila. */
.plan-row:has(.alta-cuota) { flex-wrap: wrap; }
.plan-row:has(.alta-cuota) .row-main { flex: 1 1 60%; }
.alta-cuota { flex: 1 1 100%; display: grid; gap: 8px; justify-items: start; }
.alta-cuota .recurring-check { max-width: 560px; margin: 0; }
.alta-cuota > button { justify-self: end; }

/* Móvil: menú lateral compacto para que se vea entero, hasta Incidencias, sin desplazarse. */
@media (max-width: 768px) {
    .side { height: calc(100dvh - var(--alto-top)); padding: 10px 12px; }
    .tool { padding-bottom: 10px; margin-bottom: 4px; }
    .side-heading { margin: 14px 8px 2px; }
    .side-heading-first { margin-top: 6px; }
    .side-item { padding: 5px 8px; }
}
.import-steps .row { align-items: center; }
.map-include { margin: 0; white-space: nowrap; align-items: center; font-size: 13px; color: var(--texto-2); }
.map-include input { margin-top: 0; }
.import-summary .row-main .muted, .import-steps .row-main .muted { display: block; margin-top: 4px; }
.ficha-specs-inline input.is-propuesto { border-color: var(--enlace); }
/* Ventana e instalación: ajustes a la izquierda y la ventana de prueba a la derecha, siempre a la vista. */
.rwin-split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.rwin-try { position: sticky; top: 16px; }
.rwin-frame { height: 600px; overflow: hidden; padding: 0; }
.rwin-frame iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 1100px) { .rwin-split { grid-template-columns: minmax(0, 1fr); } .rwin-try { position: static; } .rwin-frame { max-width: 400px; } }
/* Revisión de fichas del lote: la ficha completa, campo a campo, con su salud (2026-11-25). */
.campos-resumen { margin: 4px 0 8px; font-size: 13px; }
.campos-rev { display: grid; gap: 6px; }
.campo-rev { padding: 6px 10px; border: 1px solid var(--borde); border-radius: var(--radio); }
.campo-rev.is-cambio { border-color: var(--enlace); }
.campo-rev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.campo-rev-head .label { margin: 0; }
.campo-rev-origen { color: var(--texto-2); font-size: 12px; }
.campo-rev-origen.is-cambio { color: var(--enlace); font-weight: 600; }
.campo-rev-editar { margin-left: auto; font-size: 12px; }
.campo-rev-valor { margin: 4px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.campo-rev-motivo { margin: 2px 0 0; font-size: 12px; }
.ficha-estado { margin-bottom: 16px; padding: 12px 16px; }
.deficiente-box { margin-bottom: 16px; }
.deficiente-box textarea { width: 100%; padding: 8px 10px; font: inherit; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); color: var(--texto); }
.asistente-deficientes { margin-bottom: 16px; }

/* Estilos que estaban en línea en las vistas (auditoría 2026-12-01, punto 32), con las variables de este archivo. */
/* Lote: marca corregida, fotos elegidas y barras de publicación */
.marca-cambio { margin: 4px 0 0; font-size: 13px; }
.fotos-elegidas { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.fotos-elegidas img { width: 72px; height: 72px; object-fit: contain; background: #fff; border: 1px solid var(--borde); border-radius: 6px; }
[data-publicando] .progreso, .finish-bar .progreso { display: block; height: 8px; border-radius: 4px; background: var(--borde); overflow: hidden; margin: 8px 0; max-width: 520px; }
.finish-bar .progreso { margin: 8px 0 0; max-width: 420px; }
[data-publicando] .progreso span, .finish-bar .progreso span { display: block; height: 100%; background: var(--verde); transform-origin: left; transition: transform .4s ease; }
@media (prefers-reduced-motion: reduce) { [data-publicando] .progreso span, .finish-bar .progreso span { transition: none; } }

/* Fotos candidatas (ficha del producto, fotos de un producto y propuesta del distribuidor) */
.fotos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.foto-cand { display: flex; flex-direction: column; gap: 4px; cursor: pointer; font-size: 13px; }
.foto-cand img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border: 1px solid var(--borde); border-radius: 6px; }
.presupuesto-pie { display: flex; justify-content: flex-end; gap: 8px; margin: 8px 0 0; }
.propuesta-producto + .propuesta-producto { border-top: 1px solid var(--borde); }

/* Ficha de un producto: campos, editor y fotos de la tienda */
.campo .row-end { white-space: nowrap; align-self: flex-start; }
.campo-check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.campo details { margin-top: 8px; }
.motivo p { margin: 4px 0 0; }
.campo details summary { cursor: pointer; color: var(--enlace); }
.campo textarea, .campo input[type=text] { width: 100%; margin: 8px 0; font: inherit; padding: 8px; box-sizing: border-box; }
.campo-valor { max-width: 80ch; }
.fotos-tienda { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.fotos-tienda img { width: 96px; height: 96px; object-fit: contain; background: #fff; border: 1px solid var(--borde); border-radius: 6px; }
.acciones-ficha .muted { margin-right: auto; align-self: center; max-width: 70ch; }
.campo-html p, .campo-html ul, .campo-html ol { margin: 0 0 8px; }
.campo-html img { max-width: 100%; height: auto; }
.editor { margin: 8px 0; border: 1px solid var(--borde); border-radius: 6px; }
.editor-barra { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--borde); }
.editor-barra button { font: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid var(--borde); border-radius: 4px; background: transparent; cursor: pointer; }
.editor-barra button[aria-pressed=true] { background: var(--enlace); color: #fff; }
.editor-area { padding: 10px; outline: none; overflow: auto; }
.editor textarea { margin: 0; border: 0; border-radius: 0 0 6px 6px; font-family: ui-monospace, monospace; font-size: 13px; }
@media (max-width: 640px) { .campo { flex-direction: column; } .campo .row-end { white-space: normal; } }

/* Asistente: preguntas, propuestas e instrucciones */
.asistente-grupo { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.asistente-grupo legend { margin-bottom: 8px; }
.choice.is-off { opacity: .5; cursor: default; }
button.choice { font: inherit; text-align: left; width: 100%; }
.choice select { margin-top: 4px; max-width: 100%; }
.asistente-propuesta { color: var(--texto); }
.asistente-propuesta:hover { text-decoration: none; background: var(--hover); }
.asistente-propuesta .row-end { color: var(--enlace); font-weight: 500; }
.asistente-instrucciones { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; }
.asistente-instrucciones textarea { width: 100%; padding: 8px 10px; font: inherit; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); color: var(--texto); }

/* Cronos · asistente de puesta en marcha */
.cr-url { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 400; }
.cr-url input { margin-top: 0; }
.cr-url .btn { margin-top: 0; white-space: nowrap; }
.cr-sectors { margin-bottom: 8px; }
.cr-stack > .cr-card { margin-bottom: 12px; }
.cr-card { padding: 16px; min-width: 0; }
.cr-new { border-style: dashed; }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 16px; }
.cr-short { max-width: 120px; }
.field input.cr-color { width: 64px; padding: 2px; }
.cr-range { display: inline-flex; align-items: center; gap: 6px; }
.cr-range input { height: 32px; padding: 0 8px; font: inherit; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); }
.cr-week td { vertical-align: top; }
.cr-week td .field-error { white-space: normal; }
.cr-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 12px; font-weight: 400; }
.cr-checks label { display: inline-flex; align-items: center; gap: 6px; }
.cr-ask { display: none; border: 1px solid var(--borde); border-radius: var(--radio); padding: 12px 16px 4px; margin: 0 0 12px; }
.cr-ask textarea { width: 100%; }
.cr-opt-row { display: grid; grid-template-columns: minmax(140px, 1fr) 90px 120px 64px auto; gap: 8px; align-items: center; }
.cr-opt-row input, .cr-opt-row select { height: 32px; padding: 0 8px; font: inherit; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); }
@media (max-width: 560px) { .cr-opt-row { grid-template-columns: 1fr 1fr; } }
.cr-per { display: grid; gap: 6px; margin: 6px 0 4px; }
.cr-per-row { display: grid; grid-template-columns: minmax(140px, 1fr) 150px 120px; gap: 8px; align-items: center; }
.cr-per-row label { display: inline-flex; align-items: center; gap: 6px; }
.cr-per-row select, .cr-per-row input[type=number] { height: 32px; padding: 0 8px; font: inherit; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); }
@media (max-width: 560px) { .cr-per-row { grid-template-columns: 1fr 1fr; } .cr-per-row label { grid-column: 1 / -1; } }
.cr-shift { margin: 0 0 12px; }
.cr-shift > summary { cursor: pointer; color: var(--enlace); margin-bottom: 8px; }
.cr-delete { margin: 0; color: var(--texto-2); }
.cr-left { justify-content: flex-start; }
.cr-first { margin-top: 0; }
.cr-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; margin: 0 0 16px; }
.cr-legend dt { font-weight: 600; }
.cr-legend dd { margin: 2px 0 0; color: var(--texto-2); font-size: 13px; }
.cr-pay select, .cr-pay input { height: 32px; padding: 0 8px; font: inherit; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); }
.cr-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 24px; align-items: start; }
@media (max-width: 900px) { .cr-page-grid { grid-template-columns: 1fr; } }
.cr-link code { font-size: 14px; }
.cr-phone { padding: 20px; border-top: 4px solid var(--cr-accent); }
.cr-phone h2 { margin: 0 0 6px; font-size: 18px; }
.cr-phone-tag { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.cr-services { list-style: none; margin: 12px 0; padding: 0; }
.cr-services li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--borde-suave); }
.cr-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-slot { padding: 6px 12px; border: 1px solid var(--cr-accent); border-radius: var(--radio); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
    .cr-week thead, .cr-pay thead { display: none; }
    .cr-week, .cr-week tbody, .cr-pay, .cr-pay tbody { display: block; width: 100%; }
    .cr-week tr, .cr-pay tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 16px; border-top: 1px solid var(--borde-suave); }
    .cr-week td, .cr-pay td { display: block; padding: 0; border: 0; min-width: 0 !important; white-space: normal; }
    .cr-week td:nth-child(n+3), .cr-pay td:first-child { grid-column: 1 / -1; }
    .cr-week td:nth-child(4)::before { content: "Segunda franja (opcional)"; display: block; margin-bottom: 4px; color: var(--texto-2); font-size: 12px; }
    .cr-pay td:nth-child(2) select { width: 100%; }
}
.cr-code { margin: 6px 0 16px; padding: 10px 12px; overflow-x: auto; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave); font-size: 13px; }
.cr-inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.cr-inline-form .field { flex: 1 1 260px; margin-bottom: 0; }
.cr-hook { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--borde-suave); }
.cr-hook .row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 320px; }
.cr-hook code { word-break: break-all; }
.cr-hook-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.cr-hook-actions form { margin: 0; }

/* Cronos · agenda */
.cr-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cr-bar-nav, .cr-bar-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cr-bar-tools form { margin: 0; }
.cr-bar-title { font-size: 20px; margin: 0 0 0 6px; }
.cr-bar-date { height: 28px; padding: 0 8px; border: 1px solid var(--borde); border-radius: var(--radio); font: inherit; font-size: 13px; }
.cr-seg { display: inline-flex; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; }
.cr-seg a { padding: 4px 12px; font-size: 13px; color: var(--texto); text-decoration: none; }
.cr-seg a + a { border-left: 1px solid var(--borde); }
.cr-seg a.is-active { background: var(--fondo-suave); font-weight: 600; }
.cr-day-count { margin: 0 0 10px; }
.cr-bk-pendiente, .cr-bk-por_pagar { --bk: #fff8c5; --bk-borde: #d4a72c; }
.cr-bk-confirmada { --bk: #ddf4ff; --bk-borde: #54aeff; }
.cr-bk-completada { --bk: #dafbe1; --bk-borde: #4ac26b; }
.cr-bk-planton { --bk: #ffebe9; --bk-borde: #ff8182; }

.cr-day { overflow-x: auto; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); }
.cr-day-head, .cr-day-body { display: grid; grid-template-columns: 52px repeat(var(--cols), minmax(150px, 1fr)); min-width: calc(52px + var(--cols) * 150px); }
.cr-day-head { border-bottom: 1px solid var(--borde); background: var(--fondo-suave); position: sticky; top: 0; z-index: 3; }
.cr-col-head { padding: 8px 10px; font-weight: 600; font-size: 13px; border-left: 1px solid var(--borde-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-day-body { position: relative; background-image: repeating-linear-gradient(to bottom, var(--borde-suave) 0 1px, transparent 1px var(--hour)); }
.cr-gutter { position: relative; }
.cr-gutter span { position: absolute; right: 6px; transform: translateY(2px); font-size: 11px; color: var(--texto-2); }
.cr-col { position: relative; border-left: 1px solid var(--borde-suave); background: repeating-linear-gradient(135deg, var(--fondo-suave) 0 6px, var(--fondo) 6px 12px); }
.cr-col .cr-shift { position: absolute; left: 0; right: 0; background: var(--fondo); }
.cr-free { position: absolute; left: 0; right: 0; z-index: 1; display: flex; align-items: center; padding: 0 8px; font-size: 12px; color: var(--enlace); text-decoration: none; }
.cr-free span { opacity: 0; }
.cr-free:hover { background: #ddf4ff80; }
.cr-free:hover span { opacity: 1; }
.cr-block { position: absolute; left: 0; right: 0; z-index: 1; padding: 2px 8px; font-size: 11px; color: var(--texto-2); background: repeating-linear-gradient(135deg, #eaeef2 0 6px, #f6f8fa 6px 12px); overflow: hidden; }
.cr-bk { position: absolute; left: 3px; right: 3px; z-index: 2; display: flex; flex-direction: column; padding: 3px 8px; overflow: hidden; border-radius: 4px; border-left: 3px solid var(--bk-borde); background: var(--bk); color: var(--texto); text-decoration: none; font-size: 12px; line-height: 1.3; }
.cr-bk strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-bk span { color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-bk:hover { filter: brightness(.97); }

.cr-weekgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; }
.cr-wday { min-height: 220px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cr-wday + .cr-wday { border-left: 1px solid var(--borde-suave); }
.cr-wday header { display: flex; justify-content: space-between; align-items: center; }
.cr-wday header a:first-child { color: var(--texto); text-decoration: none; font-size: 13px; text-transform: capitalize; }
.cr-wday header strong { font-size: 16px; }
.cr-wday.is-today header strong, .cr-mday.is-today .cr-mnum { color: #fff; background: var(--enlace); border-radius: 999px; padding: 0 7px; }
.cr-plus { width: 22px; height: 22px; display: grid; place-items: center; border-radius: var(--radio); color: var(--texto-2); text-decoration: none; }
.cr-plus:hover { background: var(--hover); color: var(--texto); }
.cr-wbk { display: block; padding: 5px 7px; border-radius: 4px; border-left: 3px solid var(--bk-borde); background: var(--bk); color: var(--texto); text-decoration: none; font-size: 12px; line-height: 1.35; overflow: hidden; }
.cr-wbk span { display: block; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-empty { font-size: 12px; margin: 0; }

.cr-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; background: var(--borde-suave); gap: 1px; }
.cr-mhead { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--texto-2); background: var(--fondo-suave); }
.cr-mday { min-height: 104px; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; background: var(--fondo); color: var(--texto); text-decoration: none; min-width: 0; }
.cr-mday:hover { background: var(--hover); }
.cr-mday.is-out { background: var(--fondo-suave); color: var(--texto-2); }
.cr-mnum { font-size: 13px; font-weight: 600; align-self: flex-start; }
.cr-mcount { font-size: 12px; color: var(--enlace); }
.cr-mline { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 5px; border-left: 2px solid var(--bk-borde, transparent); }

.cr-pick { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.cr-pick .field { flex: 1 1 180px; margin-bottom: 0; }
.cr-repeat { display: flex; gap: 12px; flex-wrap: wrap; }
.cr-repeat .field { flex: 1 1 150px; }
.cr-slots { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.cr-slot input { position: absolute; opacity: 0; }
.cr-slot span { display: inline-block; padding: 6px 12px; border: 1px solid var(--borde); border-radius: var(--radio); font-size: 13px; cursor: pointer; }
.cr-slot input:checked + span { background: var(--enlace); border-color: var(--enlace); color: #fff; }
.cr-slot input:focus-visible + span { outline: 2px solid var(--enlace); outline-offset: 2px; }
.cr-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.cr-dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; }
.cr-dl dt { color: var(--texto-2); }
.cr-dl dd { margin: 0; }
.cr-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cr-actions form { margin: 0; display: flex; gap: 8px; align-items: center; }
.cr-inline-check { font-size: 13px; color: var(--texto-2); display: inline-flex; gap: 4px; align-items: center; }

@media (max-width: 900px) {
    .cr-weekgrid { grid-template-columns: 1fr; }
    .cr-wday { min-height: 0; }
    .cr-wday + .cr-wday { border-left: 0; border-top: 1px solid var(--borde-suave); }
    .cr-mday { min-height: 56px; padding: 4px; }
    .cr-mline { display: none; }
    .cr-mcount { font-size: 11px; }
    .cr-grid2, .cr-dl { grid-template-columns: 1fr; }
    .cr-dl dt { margin-top: 6px; }
}
.cr-price { font-size: 12px; color: var(--fg-muted, #656d76); font-weight: 400; margin-left: 6px; }
.cr-disabled { opacity: .6; }

/* Atlas · asistente de configuración */
.at-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.at-main { min-width: 0; }
.at-fee { position: sticky; top: 16px; padding: 16px; }
.at-fee h2 { margin: 0 0 4px; font-size: 14px; }
.at-fee-total { margin: 0; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.at-fee .bill { margin: 12px -16px; }
.at-fee-note { margin: 0; font-size: 12.5px; }
.at-section { padding: 16px; margin-bottom: 16px; }
.at-section h2 { margin: 0 0 12px; font-size: 16px; }
.at-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.at-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choices + .at-grid, .choices + .hint + .at-grid { margin-top: 24px; } /* aire entre los sectores y los campos de debajo */
.at-prefix { display: flex; align-items: center; gap: 6px; }
.at-prefix input { min-width: 0; }
.at-days { margin-bottom: 16px; }
.at-input { padding: 12px 16px; border-bottom: 1px solid var(--borde-suave); }
.at-input:last-child { border-bottom: 0; }
.at-input > .check { margin: 0; font-weight: 600; }
.at-input-detail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; margin-top: 12px; }
.at-input-detail .field { font-weight: 500; font-size: 13px; }
.at-input:not(:has(.at-on:checked)) .at-input-detail { display: none; }
.at-custom + .at-custom { padding-top: 12px; border-top: 1px dashed var(--borde-suave); }
.at-dept { border-left: 4px solid var(--dep); }
.at-dept-head { margin-bottom: 8px; }
.at-dept-head .label { margin-left: 8px; }
.at-dept:not(:has(.at-dept-on:checked)) .at-dept-body { display: none; }
.at-role { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--borde-suave); }
.at-role-name { font-weight: 600; }
.at-role .hint { display: block; }
.at-count { width: 64px; }
.at-head-pick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.at-head-pick input { width: 200px; }
.at-head-pick:has(option[value="agente"]:checked) input { display: none; }
.at-dept-title { margin: 8px 0 12px; padding-left: 10px; border-left: 4px solid var(--dep); font-size: 16px; }
.at-personas { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 24px; }
.at-persona { padding: 16px; }
.at-persona .field { font-size: 13px; }
.at-persona-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.at-persona-head .hint { display: block; }
.at-avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--dep); color: #fff; font-weight: 600; }
.at-sign { margin: 0 0 8px; font-size: 13px; color: var(--texto-2); }
@media (max-width: 900px) {
    .at-layout { grid-template-columns: 1fr; }
    .at-grid, .at-grid-3, .at-input-detail { grid-template-columns: 1fr; }
    .at-fee { position: static; order: -1; }
    .at-role { flex-wrap: wrap; }
    .at-head-pick { justify-content: flex-start; }
    .at-personas { grid-template-columns: 1fr; }
}

/* ── Atlas, fase 3: menú por grupos, tarjeta del asistente, barra inferior y Mesa ── */
.side-card { display: block; margin: 8px 8px 4px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--tinta) 35%, transparent); border-radius: var(--radio); background: color-mix(in srgb, var(--tinta) 7%, var(--fondo)); color: var(--texto); }
.side-card:hover { text-decoration: none; background: color-mix(in srgb, var(--tinta) 12%, var(--fondo)); }
.side-card-title { display: block; font-weight: 600; font-size: 13.5px; }
.side-card-text { display: block; margin-top: 2px; font-size: 12.5px; color: var(--texto-2); }
.side-card-bar { display: block; height: 4px; margin-top: 8px; border-radius: 2px; background: var(--borde-suave); overflow: hidden; }
.side-card-bar span { display: block; height: 100%; background: var(--tinta); }
.side-heading .counter { margin-left: 6px; }
.side-swatch { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--sw); }
.side-swatch-lg { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: 1px; }
.side-item .side-swatch { margin: 0 3px; }
.side-pulse { flex: none; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--verde); animation: live-pulse 2s ease-in-out infinite; }
.side-item .side-pulse + .counter { margin-left: auto; }
.side-item .side-pulse:last-child { margin-left: auto; }
.bottom-bar { display: none; }
@media (max-width: 768px) {
    .bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 14; display: flex; border-top: 1px solid var(--borde); background: var(--fondo); padding-bottom: env(safe-area-inset-bottom); }
    .bottom-bar a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 52px; color: var(--texto-2); font-weight: 500; }
    .bottom-bar a { border-top: 2px solid transparent; }
    .bottom-bar a.is-active { color: var(--texto); font-weight: 600; border-top-color: var(--tinta); }
    .bottom-bar a:hover { text-decoration: none; }
    .work.has-bottom-bar { padding-bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) { .side-pulse { animation: none; } }

.at-trays { flex-wrap: wrap; row-gap: 0; overflow: visible; }
.at-trays .subtab.is-empty { color: var(--texto-2); }
.at-trays .counter { margin-left: 2px; }
.at-tray { margin-bottom: 24px; scroll-margin-top: 16px; }
.at-tray > h2 { margin: 0 0 12px; font-size: 16px; }
.at-tray-group { margin: 16px 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); }
.at-prop { padding: 14px 16px; margin-bottom: 12px; border-left: 3px solid var(--dep); scroll-margin-top: 16px; }
.at-prop.is-urgent { border-color: #cf222e66; border-left-color: #cf222e; }
.at-prop-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.at-prop-head .at-avatar { width: 32px; height: 32px; font-size: 13px; }
.at-prop-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.at-prop-who .muted { font-size: 12.5px; }
.at-prop-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; }
.at-prop-tags .tag { margin-left: 0; }
.at-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.at-badge-money { background: #fff8c5; border: 1px solid #d4a72c99; color: #7d4e00; }
.at-badge-urgent { background: #ffebe9; border: 1px solid #ff818266; color: #a40e26; }
.at-status-atascada { border-color: #ff818299; color: #a40e26; }
.at-status-hecha { border-color: #4ac26b99; color: #116329; }
.at-prop-title { margin: 10px 0 4px; font-size: 15px; }
.at-prop-summary { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.at-prop-question { margin: 12px 0 8px; font-weight: 600; }
.at-prop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.at-prop-actions form { margin: 0; }
.at-prop-hint { margin: 6px 0 0; font-size: 12.5px; }
.at-prop-forms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.at-prop-form > summary { list-style: none; cursor: pointer; }
.at-prop-form > summary::-webkit-details-marker { display: none; }
.at-prop-form[open] { flex-basis: 100%; }
.at-prop-form[open] > summary { margin-bottom: 8px; background: var(--hover); }
.at-prop-form form { padding: 12px; border: 1px solid var(--borde-suave); border-radius: var(--radio); background: var(--fondo-suave); }
.at-prop-form .field { margin-bottom: 10px; }
.at-prop-form textarea, .at-prop-form input[type="text"] { width: 100%; }
.at-prop-more, .at-prop-trace { margin-top: 10px; }
.at-prop-more > summary, .at-prop-trace > summary { cursor: pointer; color: var(--enlace); font-size: 13.5px; }
.at-prop-trace > summary { color: var(--texto-2); font-size: 12.5px; }
.at-prop-trace ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--texto-2); }
.at-example { margin-top: 8px; padding: 12px; border: 1px solid var(--borde-suave); border-radius: var(--radio); background: var(--fondo-suave); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.5; }
.at-example-ficha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.at-prop-task { display: grid; gap: 4px; margin: 10px 0 0; font-size: 13.5px; }
.at-prop-task div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; }
.at-prop-task dt { color: var(--texto-2); }
.at-prop-task dd { margin: 0; overflow-wrap: anywhere; }
.at-prop-alert { margin: 10px 0 0; padding: 8px 10px; border-radius: var(--radio); background: #ffebe9; color: #a40e26; font-size: 13.5px; }
.at-prop-note { margin: 10px 0 0; font-size: 13.5px; color: var(--texto-2); }
@media (max-width: 600px) {
    .at-prop-tags { margin-left: 0; flex-basis: 100%; }
    .at-prop-task div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

.at-big { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.at-big-btn { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; color: var(--texto); }
.at-big-btn:hover { text-decoration: none; background: var(--fondo-suave); }
.at-big-btn.is-hot { border-color: #cf222e66; }
.at-big-n { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.at-big-label { font-weight: 600; }
.at-big .muted { font-size: 12.5px; }
.at-depts, .at-team { margin: 0; padding: 0; list-style: none; }
.at-depts li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--borde-suave); }
.at-depts li:last-child { border-bottom: 0; }
.at-depts a { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.at-depts-state { font-size: 13px; color: var(--texto-2); text-align: right; }
.at-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.at-col { padding: 12px; }
.at-col h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; }
.at-col-item { display: flex; flex-direction: column; padding: 8px; border-radius: var(--radio); color: var(--texto); font-size: 13.5px; }
.at-col-item:hover { background: var(--hover); text-decoration: none; }
.at-col-item .muted { font-size: 12px; }
.at-col-empty { margin: 0; padding: 8px; font-size: 13px; }
.at-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.at-team li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.at-eyebrow { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.at-soon { padding: 24px 16px; text-align: center; }
.at-soon p:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .at-big { grid-template-columns: repeat(2, minmax(0, 1fr)); } .at-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .at-depts li { grid-template-columns: minmax(0, 1fr) auto; } .at-depts-state { grid-column: 1 / -1; text-align: left; } }

/* ── Atlas, fase 4: conexiones, motor y arranque ── */
.at-conns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.at-conn { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; min-width: 0; }
.at-conns > .at-conn:last-child:nth-child(even) { grid-column: 1 / -1; }
.at-conn-main { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--tinta) 45%, transparent); }
.at-conn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.at-conn-head h3 { margin: 0; font-size: 15px; }
.at-conn-state { margin-left: 0; white-space: nowrap; }
.at-conn-state.is-conectada { border-color: #4ac26b99; color: #116329; }
.at-conn-state.is-error { border-color: #ff818299; color: #a40e26; }
.at-conn-state.is-falta_paso { border-color: #d4a72c99; color: #7d4e00; }
.at-conn-ex { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.at-conn-unlocks { margin: 0; font-size: 13px; font-weight: 500; }
.at-conn-facts { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--texto-2); overflow-wrap: anywhere; }
.at-conn-test { color: #116329; }
.at-conn-test.is-bad { color: #a40e26; }
.at-conn .at-prop-form { margin-top: 4px; }
.at-conn-later { margin: auto 0 0; padding-top: 4px; }
.at-conn select, .at-conn input[type="text"], .at-conn input[type="email"], .at-conn input[type="password"] { width: 100%; }
.at-steps { margin: 0 0 12px; padding-left: 20px; line-height: 1.6; }
.at-steps li.is-done { color: var(--texto-2); text-decoration: line-through; text-decoration-color: #4ac26b; }
.at-code { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-suave); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.at-bridge { border-color: color-mix(in srgb, var(--tinta) 45%, transparent); }
.at-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.at-table th, .at-table td { padding: 8px; border-bottom: 1px solid var(--borde-suave); text-align: left; vertical-align: top; }
.at-table th { font-weight: 600; color: var(--texto-2); white-space: nowrap; }
.at-error { display: block; color: #a40e26; }
.at-big-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.at-big-n-sm { font-size: 20px; }
.at-launched { border-color: #4ac26b99; }
@media (max-width: 900px) { .at-conns { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .at-big-3 { grid-template-columns: minmax(0, 1fr); } }

/* Revisión de Remi (2026-12-01): foco visible en todo lo que se pulsa, y botones de 44 px en pantallas táctiles. */
:where(a, button, summary, [tabindex]):focus-visible { outline: 2px solid var(--enlace); outline-offset: 2px; }
@media (pointer: coarse) {
    .btn, .btn-sm, .link-btn { min-height: 44px; }
    .btn-sm { height: auto; padding: 0 14px; }
}
