/* ═══════════════════════════════════════════════════════════════
   SOLÍS FM DIGITAL — Portal · capa SaaS del dashboard
   Se carga DESPUÉS de portal.css y solo toca .dash-wrapper.
   Regla de color: azul de marca (#1E90FF) SOLO en CTAs, estado activo
   y navegación clave. Todo lo demás: neutros + semánticos (ok/warn/error).
═══════════════════════════════════════════════════════════════ */

.dash-wrapper {
    /* --brand* viven ahora en portal.css :root (una sola fuente para todo el portal) */
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
    --surface-1: #11161E;
    --surface-2: #151B25;
    --line:      rgba(255, 255, 255, .08);
    --line-hi:   rgba(255, 255, 255, .16);
}

/* ── Layout: más ancho, grid de 12 columnas ───────────────────── */
.dash-wrapper .dash-main { max-width: 1120px; padding: var(--sp-6) var(--sp-5); }

/* ── Topbar: sin glow cian, usuario con avatar ────────────────── */
.dash-wrapper .dash-logo img { filter: none; }
.dash-wrapper .dash-logo-fallback { color: var(--color-text-hi); }

/* ── Bienvenida: compacta, sin franja de color ────────────────── */
.dash-wrapper .dash-welcome {
    padding: var(--sp-4) var(--sp-5);
    background: var(--surface-1);
    border-radius: 16px;
    margin-bottom: var(--sp-4);
}
.dash-wrapper .dash-welcome::before { display: none; }
.dash-wrapper .dash-avatar {
    width: 48px; height: 48px;
    background: var(--surface-2);
    border: 1px solid var(--line-hi);
    color: var(--color-text-hi);
    box-shadow: none;
}
.dash-wrapper .dash-welcome h1 { font-size: 1.3rem; }

/* ═══ BLOQUE 1 — Resumen (KPIs): lo primero que se lee ═════════ */
.dash-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
}
.kpi {
    background: var(--surface-1);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: var(--sp-4) var(--sp-5);
    min-width: 0;
    display: flex; flex-direction: column; gap: var(--sp-2);
    transition: border-color 180ms ease, background 180ms ease;
}
.kpi:hover { border-color: var(--line-hi); background: var(--surface-2); }
.kpi-label {
    font-size:.75rem; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: var(--color-text-lo);
}
.kpi-value {
    font-family: var(--font-display); font-weight: 800;
    font-size: 1.55rem; line-height: 1.15; letter-spacing: -.02em;
    color: var(--color-text-hi);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.kpi-sub { font-size: .8rem; color: var(--color-text-mid); }
.kpi.is-warn  .kpi-value { color: var(--color-warn); }
.kpi.is-error .kpi-value { color: var(--color-error); }
.kpi.is-ok    .kpi-value { color: var(--color-text-hi); }

/* Insignia de estado con punto "vivo" */
.status-pill {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .8rem; font-weight: 700;
    padding: 4px 12px 4px 10px; border-radius: 999px;
    width: fit-content;
}
.status-pill::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
}
.status-pill.is-activo { color: var(--color-ok); background: var(--color-ok-bg); }
.status-pill.is-activo::before { animation: sfm-pulse 2s ease-out infinite; }
.status-pill.is-warn   { color: var(--color-warn);  background: var(--color-warn-bg); }
.status-pill.is-error  { color: var(--color-error); background: var(--color-error-bg); }
@keyframes sfm-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0, 217, 163, .55); }
    70%  { box-shadow: 0 0 0 7px rgba(0, 217, 163, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 217, 163, 0); }
}

/* ═══ BLOQUE 2 — Cards de información: neutras, alineadas ══════ */
.dash-wrapper .dash-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
}
.dash-wrapper .dash-card {
    background: var(--surface-1);
    border-radius: 16px;
    padding: var(--sp-4) var(--sp-5);
    box-shadow: none;
    align-items: center;
}
.dash-wrapper .dash-card:hover {
    transform: none;
    background: var(--surface-2);
    border-color: var(--line-hi);
    box-shadow: none;
}
.dash-wrapper .dash-card-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    color: var(--color-text-mid);
}
.dash-wrapper .dash-card-label { letter-spacing: .08em; }
.dash-wrapper .dash-link { color: var(--color-text-mid); transition: color 150ms; }
.dash-wrapper .dash-link:hover { color: var(--brand); text-decoration: none; }

/* ═══ BLOQUE 3 — Tabla de servicios: columnas estrictas ════════ */
.dash-wrapper .dash-actions-label {
    font-size:.75rem; letter-spacing: .08em; color: var(--color-text-lo);
    margin: 0 0 var(--sp-3);
}
.dash-wrapper .dash-services { margin-bottom: var(--sp-5); }
.dash-wrapper .dash-services-list {
    background: var(--surface-1);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    display: flex; flex-direction: column; gap: 0;
}
.dash-wrapper .svc-row {
    background: transparent;
    border: 0; border-radius: 0;
    border-bottom: 1px solid var(--line);
    padding: var(--sp-4) var(--sp-5);
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center; gap: var(--sp-4);
    transition: background 150ms ease, box-shadow 150ms ease;
}
.dash-wrapper .svc-row:last-child { border-bottom: 0; }
.dash-wrapper .svc-row:hover {
    background: var(--surface-2);
    box-shadow: inset 2px 0 0 var(--brand);   /* navegación/foco: único uso de azul en la fila */
    border-color: var(--line);
}
.dash-wrapper .svc-name { font-size: .92rem; }
.dash-wrapper .svc-row-meta { gap: var(--sp-4); justify-content: flex-end; }
.dash-wrapper .svc-fecha {
    font-variant-numeric: tabular-nums; min-width: 150px; justify-content: flex-end;
}
.dash-wrapper .svc-pago-badge {
    min-width: 76px; text-align: center; justify-content: center;
}
/* Categorías: neutras (el color vive en el estado, no en la categoría) */
.dash-wrapper .svc-cat-tag,
.dash-wrapper .svc-cat-streaming,
.dash-wrapper .svc-cat-hosting,
.dash-wrapper .svc-cat-dominios,
.dash-wrapper .svc-cat-diseno {
    background: rgba(255, 255, 255, .06);
    color: var(--color-text-mid);
    border-color: var(--line);
    min-width: 78px; text-align: center;
}

/* ═══ BLOQUE 4 — CTAs: el ÚNICO uso fuerte del azul ════════════ */
.dash-wrapper .dash-cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--sp-4);
}
.dash-wrapper .dash-cta-banner,
.dash-wrapper .dash-cta-purple,
.dash-wrapper .dash-cta-amber {
    background: var(--surface-1);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: var(--sp-5);
    display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-4);
    transition: border-color 180ms ease, background 180ms ease;
}
.dash-wrapper .dash-cta-banner::before { display: none; }
.dash-wrapper .dash-cta-banner:hover { border-color: var(--line-hi); background: var(--surface-2); }
.dash-wrapper .dash-cta-eyebrow,
.dash-wrapper .dash-cta-purple .dash-cta-eyebrow,
.dash-wrapper .dash-cta-amber .dash-cta-eyebrow { color: var(--color-text-lo); }
.dash-wrapper .dash-cta-title { font-size: 1.05rem; }

.dash-wrapper .btn-cta,
.dash-wrapper .btn-cta-purple,
.dash-wrapper .btn-cta-amber {
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 10px;
    min-height: 44px;
    padding: 0 var(--sp-5);
    box-shadow: none;
    font-weight: 700;
    justify-content: center;
    position: relative;
    transition: background 150ms ease, transform 120ms ease, box-shadow 150ms ease;
}
.dash-wrapper .btn-cta:hover,
.dash-wrapper .btn-cta-purple:hover,
.dash-wrapper .btn-cta-amber:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(30, 144, 255, .32);
}
.dash-wrapper .btn-cta:active,
.dash-wrapper .btn-cta-purple:active,
.dash-wrapper .btn-cta-amber:active {
    background: var(--brand-press); transform: translateY(0); box-shadow: none;
}
.dash-wrapper .btn-cta:focus-visible,
.dash-wrapper .em-btn:focus-visible,
.dash-wrapper .svc-row a:focus-visible {
    outline: 2px solid var(--brand-ring); outline-offset: 3px;
}

/* Botones de emisora (circuitos): secundario neutro, principal azul */
.dash-wrapper .em-btn {
    min-height: 40px; display: inline-flex; align-items: center;
    background: transparent; border: 1px solid var(--line-hi);
    color: var(--color-text-hi); border-radius: 10px; padding: 0 var(--sp-4);
    transition: background 150ms, border-color 150ms;
}
.dash-wrapper .em-btn:hover { background: rgba(255, 255, 255, .06); border-color: var(--color-text-lo); }
.dash-wrapper .em-btn-pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.dash-wrapper .em-btn-pri:hover { background: var(--brand-hover); border-color: var(--brand-hover); }

/* Estado de carga (se activa por JS al hacer clic) */
.is-loading { pointer-events: none; opacity: .85; }
.is-loading > span,
.is-loading > svg { opacity: .0; }
.is-loading::after {
    content: ''; position: absolute; inset: 0; margin: auto;
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
    animation: sfm-spin .7s linear infinite;
}
@keyframes sfm-spin { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 860px) {
    .dash-kpis { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .dash-wrapper .dash-main { padding: var(--sp-4) var(--sp-4); }
    .dash-wrapper .svc-row { grid-template-columns: 1fr; gap: var(--sp-2); }
    .dash-wrapper .svc-row-meta { justify-content: space-between; }
    .dash-wrapper .svc-fecha { min-width: 0; justify-content: flex-start; }
    .dash-wrapper .dash-cta-grid { grid-template-columns: 1fr; }
    .dash-wrapper .btn-cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .status-pill.is-activo::before,
    .is-loading::after { animation: none; }
    .dash-wrapper * { transition-duration: 0ms !important; }
}

/* ═══ MENÚ LATERAL ═════════════════════════════════════════════ */
.dash-side { display: none; }
.side-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 10px;
    background: transparent; border: 1px solid var(--line-hi);
    color: var(--color-text-hi); cursor: pointer;
    transition: background 150ms;
}
.side-toggle:hover { background: rgba(255,255,255,.06); }
.dash-side-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; }
.dash-side-scrim[hidden] { display: none; }

/* Móvil / tablet: panel deslizable */
@media (max-width: 1023.98px) {
    .dash-side {
        display: flex; flex-direction: column;
        position: fixed; top: 0; bottom: 0; left: 0; width: 272px; max-width: 86vw;
        z-index: 50; transform: translateX(-100%);
        transition: transform 220ms cubic-bezier(.22,1,.36,1);
    }
    .dash-side.is-open { transform: none; }
    .dash-wrapper .dash-topbar { gap: var(--sp-3); justify-content: flex-start; }
    .dash-wrapper .dash-topbar-right { margin-left: auto; }
}

/* Escritorio: sidebar fijo a la izquierda */
@media (min-width: 1024px) {
    .dash-wrapper {
        display: grid;
        grid-template-columns: 248px minmax(0, 1fr);
        grid-template-rows: auto 1fr auto;
        grid-template-areas: "side top" "side main" "side foot";
    }
    .dash-side { display: flex; flex-direction: column; grid-area: side;
        position: sticky; top: 0; height: 100dvh; align-self: start; }
    .dash-wrapper .dash-topbar { grid-area: top; }
    .dash-wrapper .dash-main   { grid-area: main; }
    .dash-wrapper .dash-footer { grid-area: foot; }
    .side-toggle, .dash-side-scrim { display: none !important; }
    .dash-wrapper .dash-logo { display: none; }          /* el logo vive en el sidebar */
    .dash-wrapper .dash-topbar { justify-content: flex-end; }
}

.dash-side {
    background: var(--surface-1);
    border-right: 1px solid var(--line);
    padding: var(--sp-5) var(--sp-3) var(--sp-4);
    overflow-y: auto;
}
.dash-side-brand {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: 0 var(--sp-3) var(--sp-5); text-decoration: none;
    font-family: var(--font-display); font-weight: 800; font-size: .92rem;
    color: var(--color-text-hi);
}
.dash-side-brand img { height: 32px; width: auto; }
.dash-side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dash-side-group {
    font-size:.75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    color: var(--color-text-lo); padding: 0 var(--sp-3) var(--sp-2);
}
.side-link {
    display: flex; align-items: center; gap: var(--sp-3);
    min-height: 44px; padding: 0 var(--sp-3);
    border-radius: 10px; text-decoration: none;
    font-size: .88rem; font-weight: 500; color: var(--color-text-mid);
    position: relative;
    transition: background 150ms ease, color 150ms ease;
}
.side-link svg { flex-shrink: 0; opacity: .85; }
.side-link:hover { background: rgba(255,255,255,.06); color: var(--color-text-hi); }
.side-link:active { background: rgba(255,255,255,.1); }
.side-link:focus-visible { outline: 2px solid var(--brand-ring); outline-offset: 2px; }
.side-link.is-active {
    background: var(--brand-dim); color: #fff; font-weight: 600;
}
.side-link.is-active svg { color: var(--brand); opacity: 1; }
.side-link.is-active::before {
    content: ''; position: absolute; left: -12px; top: 10px; bottom: 10px;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.dash-side-foot { border-top: 1px solid var(--line); padding-top: var(--sp-4); margin-top: var(--sp-4); }
.side-user { display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-2); min-width: 0; }
.side-user-av {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-2); border: 1px solid var(--line-hi);
    font-size: .78rem; font-weight: 700; color: var(--color-text-hi);
}
.side-user-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-user-tx strong { font-size: .82rem; color: var(--color-text-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-tx small { font-size:.75rem; color: var(--color-text-lo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .dash-side { transition: none; } }

/* ═══ Cards de información: 2 columnas amplias, valor en una línea ═══ */
.dash-wrapper .dash-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.dash-wrapper .dash-card { gap: var(--sp-4); padding: var(--sp-5); min-height: 92px; }
.dash-wrapper .dash-card > div:last-child {
    display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1;
}
.dash-wrapper .dash-card-label { margin-bottom: 0; }
.dash-wrapper .dash-card-value {
    font-size: 1.05rem; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    overflow-wrap: normal; word-break: normal; min-width: 0;
}
.dash-wrapper .dash-link { margin-top: 2px; max-width: 100%; min-width: 0; font-size: .85rem; }
.dash-wrapper .dash-link-val {
    font-family: var(--font-ui); font-weight: 700; font-size: 1.05rem;
    color: var(--color-text-hi); line-height: 1.3;
}
.dash-wrapper .dash-link-val span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.dash-wrapper .dash-link-val svg { flex-shrink: 0; }
.dash-wrapper .dash-link-val:hover { color: var(--brand); }

/* ═══ Detalles de la cuenta: lista de definición (patrón Stripe/Vercel) ═══ */
.acct {
    background: var(--surface-1); border: 1px solid var(--line);
    border-radius: 16px; margin-bottom: var(--sp-5); overflow: hidden;
}
.acct-title {
    font-family: var(--font-ui); font-size: .95rem; font-weight: 700;
    color: var(--color-text-hi); padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--line); margin: 0;
}
.acct-list { margin: 0; }
.acct-row {
    display: grid; grid-template-columns: 200px minmax(0, 1fr);
    align-items: center; gap: var(--sp-4);
    padding: 0 var(--sp-5); min-height: 56px;
    border-bottom: 1px solid var(--line);
    transition: background 150ms;
}
.acct-row:last-child { border-bottom: 0; }
.acct-row:hover { background: var(--surface-2); }
.acct-row dt { font-size: .82rem; color: var(--color-text-mid); font-weight: 500; }
.acct-row dd {
    margin: 0; display: flex; align-items: center; gap: var(--sp-3);
    min-width: 0; justify-content: space-between;
}
.acct-val {
    font-size: .92rem; font-weight: 600; color: var(--color-text-hi);
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acct-plan {
    font-size: .8rem; font-weight: 700; color: var(--color-text-hi);
    background: rgba(255,255,255,.07); border: 1px solid var(--line-hi);
    padding: 3px 12px; border-radius: 999px;
}
.acct-act {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
    min-height: 32px; padding: 0 var(--sp-3);
    font: 600 .78rem var(--font-ui); color: var(--color-text-mid);
    background: transparent; border: 1px solid var(--line-hi); border-radius: 8px;
    text-decoration: none; cursor: pointer;
    transition: background 150ms, color 150ms, border-color 150ms;
}
.acct-act:hover { color: var(--color-text-hi); background: rgba(255,255,255,.06); border-color: var(--color-text-lo); }
.acct-act:active { background: rgba(255,255,255,.1); }
.acct-act:focus-visible { outline: 2px solid var(--brand-ring); outline-offset: 2px; }
.acct-act.is-done { color: var(--color-ok); border-color: rgba(0,217,163,.4); }
@media (max-width: 640px) {
    .acct-row { grid-template-columns: 1fr; gap: 2px; padding: var(--sp-3) var(--sp-4); }
    .acct-title { padding: var(--sp-3) var(--sp-4); }
}

/* Detalles de la cuenta: tono azul pizarra, un poco más claro que el fondo */
.acct {
    background: #182131;
    border-color: rgba(120, 160, 220, .16);
}
.acct-title { background: rgba(255, 255, 255, .03); border-bottom-color: rgba(120, 160, 220, .16); }
.acct-row { border-bottom-color: rgba(120, 160, 220, .12); }
.acct-row:hover { background: #1d283a; }
.acct-plan { background: rgba(120, 160, 220, .14); border-color: rgba(120, 160, 220, .28); }

/* === Foco visible global (todo el portal) === */
html body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
html body :is(input, select, textarea):focus-visible { outline-offset: 0; }

/* === Errores de campo (formulario de configuracion) === */
.field-err { margin: 6px 0 0; font-size: .8125rem; font-weight: 600; color: var(--color-error); }
[aria-invalid="true"] { border-color: var(--color-error) !important; }

/* ═══════════════════════════════════════════════════════════════
   SISTEMA DE BOTONES  (estilo SaaS plano)
   Primario  = azul sólido, UNO por pantalla
   Secundario= borde sutil, fondo transparente
   Terciario = solo texto (Volver, Cancelar)
   Peligro   = rojo suave
   Icono     = cuadrado 44px
   Sin MAYÚSCULAS ni espaciado de letras; sin sombras de brillo.
═══════════════════════════════════════════════════════════════ */
:root { --btn-h: 44px; --btn-r: 10px; }

/* — Primario — */
.btn-login, .btn-prog-save, .wiz-btn.next {
    min-height: var(--btn-h); border-radius: var(--btn-r);
    background: var(--brand); color: #fff; border: 1px solid var(--brand);
    font: 600 .9rem/1 var(--font-ui); letter-spacing: 0; text-transform: none;
    box-shadow: none; position: relative;
    transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn-login { padding: 0 1.25rem; }
.btn-login::after { display: none; }
.btn-login:hover, .btn-prog-save:hover, .wiz-btn.next:hover {
    background: var(--brand-hover); border-color: var(--brand-hover);
    transform: none; box-shadow: none; filter: none;
}
.btn-login:active, .btn-prog-save:active, .wiz-btn.next:active {
    background: var(--brand-press); border-color: var(--brand-press); transform: scale(.98);
}
.btn-login:disabled, .btn-prog-save:disabled, .wiz-btn:disabled, .enc-btn-danger:disabled {
    opacity: .5; cursor: not-allowed; transform: none;
}

/* — Secundario — */
.btn-secondary-link, .btn-back, .btn-add-loc, .btn-new-prog, .btn-add-prog, .btn-prog-cancel, .pview-btn, .wiz-btn.back {
    min-height: var(--btn-h); border-radius: var(--btn-r);
    background: transparent; color: var(--color-text-hi);
    border: 1px solid var(--line-hi, rgba(255,255,255,.16)); border-style: solid;
    font: 600 .875rem/1 var(--font-ui); letter-spacing: 0; text-transform: none;
    padding: 0 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn-secondary-link:hover, .btn-back:hover, .btn-add-loc:hover, .btn-new-prog:hover, .btn-add-prog:hover,
.btn-prog-cancel:hover, .pview-btn:hover, .wiz-btn.back:hover {
    background: rgba(255,255,255,.06); border-color: var(--color-text-lo); color: #fff;
}
.btn-secondary-link:active, .btn-back:active, .btn-add-loc:active, .btn-new-prog:active, .btn-add-prog:active,
.btn-prog-cancel:active, .pview-btn:active { background: rgba(255,255,255,.1); transform: scale(.98); }
.pview-btn.active { background: var(--brand-dim); border-color: var(--brand); color: #fff; }
.btn-secondary-link { width: auto; }

/* — Terciario (volver): sin borde — */
.btn-back { border-color: transparent; color: var(--color-text-mid); min-height: 40px; padding: 0 .75rem 0 .5rem; }
.btn-back:hover { border-color: transparent; background: rgba(255,255,255,.06); color: #fff; }
#enc-view #enc-add-opcion.btn-back { border-color: var(--line-hi, rgba(255,255,255,.16)); color: var(--color-text-hi); padding: 0 1rem; }

/* — Peligro — */
.btn-logout, #enc-view .cfg-section .enc-btn-danger {
    min-height: 40px; border-radius: var(--btn-r);
    background: transparent; color: var(--color-error);
    border: 1px solid rgba(255,77,106,.35);
    font: 600 .8125rem/1 var(--font-ui); letter-spacing: 0; text-transform: none;
}
.btn-logout:hover, #enc-view .cfg-section .enc-btn-danger:hover { background: var(--color-error-bg); border-color: var(--color-error); }
#enc-view .cfg-section .enc-btn-danger { min-height: var(--btn-h); }

/* — Icono (editar / borrar / quitar) — */
.btn-edit-prog, .btn-del-prog, .btn-rm-prog, #enc-view .cfg-section .enc-op-del {
    width: 44px; height: 44px; border-radius: var(--btn-r);
    background: transparent; border: 1px solid transparent; color: var(--color-text-mid);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-edit-prog:hover { background: var(--brand-dim); color: var(--brand); }
.btn-del-prog:hover, .btn-rm-prog:hover, #enc-view .cfg-section .enc-op-del:hover { background: var(--color-error-bg); color: var(--color-error); border-color: transparent; }
.btn-rm-prog { position: absolute; top: .4rem; right: .5rem; }

/* — Selectores de opción (días, duración): chips planos, activo = azul sólido — */
.dia-btn, .day-chip, #enc-view .cfg-section .enc-dur-pill {
    min-height: 40px; border-radius: 8px;
    background: transparent; border: 1px solid var(--line-hi, rgba(255,255,255,.16));
    color: var(--color-text-mid); font-family: var(--font-ui); font-weight: 600; box-shadow: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.dia-btn { width: 40px; padding: 0; }
.day-chip { padding: 0 12px; display: inline-flex; align-items: center; }
#enc-view .cfg-section .enc-dur-pill { padding: 0 14px; }
.dia-btn:hover, .day-chip:hover, #enc-view .cfg-section .enc-dur-pill:hover { color: #fff; border-color: var(--color-text-lo); }
.dia-btn.active, .day-chip.active, #enc-view .cfg-section .enc-dur-pill.active {
    background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: none;
}

/* — Carga: el botón conserva su ancho; el texto se oculta y aparece el spinner — */
.btn-login.is-loading, .btn-prog-save.is-loading, #enc-view .cfg-section .enc-btn-danger.is-loading { color: transparent !important; }
.btn-login.is-loading > *, .btn-prog-save.is-loading > * { opacity: 0; }

/* ═══ Superficies planas y tipografía de interfaz ═══ */
.cfg-section, .dash-card, .banco-card, .prog-card, .em-row { box-shadow: none; }
.cfg-section { background: var(--surface-1); border-color: var(--line); }
.cfg-section:hover { border-color: var(--line-hi); }
.dash-wrapper h1, .dash-wrapper h2, .dash-wrapper h3,
.cfg-page-header h2, .cfg-section-name, .dash-welcome h1 {
    font-family: var(--font-ui); font-weight: 700; letter-spacing: -.01em;
}
.dash-wrapper { font-variant-numeric: tabular-nums; }

/* ═══ Encuestas: estados de carga / vacío / error ═══ */
.enc-state { display: none; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 16px;
    background: var(--surface-1); border: 1px solid var(--line); }
.enc-state.is-on { display: flex; }
.enc-state-ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center;
    background: rgba(255,255,255,.06); color: var(--color-text-mid); }
.enc-state-tx { flex: 1; min-width: 0; }
.enc-state-tx strong { display: block; font-size: .95rem; color: var(--color-text-hi); }
.enc-state-tx span { font-size: .8125rem; color: var(--color-text-mid); }
.enc-state.is-error { border-color: rgba(255,77,106,.3); }
.enc-state.is-error .enc-state-ic { background: var(--color-error-bg); color: var(--color-error); }
.enc-skel { display: none; flex-direction: column; gap: 10px; padding: 20px; border-radius: 16px;
    background: var(--surface-1); border: 1px solid var(--line); }
.enc-skel.is-on { display: flex; }
.enc-skel i { display: block; height: 14px; border-radius: 6px;
    background: linear-gradient(90deg, var(--surface-2) 25%, rgba(255,255,255,.08) 50%, var(--surface-2) 75%);
    background-size: 200% 100%; animation: skel-move 1.2s linear infinite; }
.enc-skel i:nth-child(1) { width: 55%; height: 18px; }
.enc-skel i:nth-child(3) { width: 80%; }
@keyframes skel-move { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .enc-skel i { animation: none; } }

/* SolísBot: opciones que son enlaces a una sección + botón de menú */
.sfm-opt-go { display: block; text-decoration: none; color: var(--brand); border-color: rgba(30,144,255,.35); font-weight: 600; }
.sfm-opt-go:hover { background: var(--brand-dim); border-color: var(--brand); color: #fff; }
.sfm-opt { min-height: 40px; }
.sfm-opt-back { color: var(--color-text-mid); }
.sfm-bubble { line-height: 1.5; }
.sfm-chat-body { overflow-x: hidden; }
.sfm-opts { max-width: 100%; align-self: stretch; }
.sfm-opt { max-width: 100%; white-space: normal; text-align: left; box-sizing: border-box; }

/* Menú lateral: opción futura (Ranking / Radiolix) — visible, atenuada, no clicable */
.side-link.is-soon { opacity: .6; cursor: not-allowed; }
.side-link.is-soon:hover { background: transparent; color: var(--color-text-mid); }
.side-pill {
    margin-left: auto; font-style: normal; font-size: .75rem; font-weight: 700;
    padding: 2px 8px; border-radius: 999px;
    background: var(--brand-dim); color: var(--brand); border: 1px solid rgba(30,144,255,.3);
}

/* ═══ Cuenta suspendida: aviso en modo restringido ═══ */
.susp-banner {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 18px 20px; margin-bottom: 16px; border-radius: 16px;
    background: var(--color-error-bg); border: 1px solid rgba(255,77,106,.4);
}
.susp-ic { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px;
    background: rgba(255,77,106,.16); color: var(--color-error); }
.susp-tx { flex: 1; min-width: 240px; }
.susp-tx strong { display: block; font-size: 1rem; color: var(--color-text-hi); margin-bottom: 4px; }
.susp-tx p { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--color-text-mid); }
.susp-tx p strong { display: inline; font-size: inherit; color: var(--color-text-hi); }
.btn-login.susp-cta { width: auto; margin-top: 0; padding: 0 20px; flex-shrink: 0; }

.side-pill { white-space: nowrap; }
.side-pill-lock { display: inline-flex; align-items: center; padding: 4px 7px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.sfm-bubble svg { width: 18px; height: 18px; vertical-align: -3px; }
