/* SD LIVE — Public Styles
   Design: inspired by tiktok-live-monitoring-webui (dark theme)

   ⚠️ AQUÍ NO VA UN @import DE GOOGLE FONTS. NUNCA. (v6.28)

   Hasta la v6.27 la línea siguiente era:
       @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk...')

   Y era la razón principal de que la app saliera en blanco al abrirla. Un
   @import a un dominio externo dentro de la hoja principal encadena tres
   viajes ANTES de que se pinte un solo pixel: bajar este archivo (290 KB) →
   parsearlo → descubrir el import → DNS+TLS a fonts.googleapis.com → recibir
   ese CSS → DNS+TLS a fonts.gstatic.com. En datos móviles son segundos de
   pantalla vacía.

   Las fuentes ahora las encola TAH_Public::enqueue_assets() como hoja aparte y
   NO bloqueante, en paralelo con ésta. Si vuelves a necesitar una familia,
   añádela allí — no aquí.
*/

/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
    /* Centinela para el splash (v6.29). Desde que esta hoja se carga sin
       bloquear, el splash necesita saber CUÁNDO se aplicó de verdad para
       poder retirarse: lo comprueba leyendo esta variable. No la borres —
       si desaparece, el splash se queda hasta su tope de 2,5 s siempre. */
    --tah-css-ready:    1;

    --tah-bg:           #080B10;
    --tah-bg-card:      #0F1620;
    --tah-bg-input:     #0a0f16;
    --tah-bg-muted:     #131C28;
    --tah-border:       #20303F;
    --tah-border-hover: #33475a;
    --tah-text:         #EAF1F6;
    --tah-text-muted:   #8298A8;
    --tah-text-subtle:  #556676;
    --tah-primary:      #E8A13A;
    --tah-primary-dim:  rgba(232,161,58,0.15);
    --tah-secondary:    #2FB4D9;
    --tah-secondary-dim:rgba(47,180,217,0.14);
    --tah-success:      #3FBE8F;
    --tah-success-dim:  rgba(63,190,143,0.12);
    --tah-warning:      #E8A13A;
    --tah-danger:       #E0574A;
    --tah-live:         #E0574A;
    --tah-radius:       0.9rem;
    --tah-radius-sm:    0.6rem;
    --tah-radius-full:  9999px;
    --tah-shadow:       0 4px 24px rgba(0,0,0,.5);
    --tah-shadow-sm:    0 2px 8px rgba(0,0,0,.35);
    --tah-font:         'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --tah-font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --tah-font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
    --tah-transition:   0.18s ease;
}

/* ── Base ──────────────────────────────────────────────────────────────── */
.tah-dashboard,
.tah-register-wrap {
    font-family: var(--tah-font);
    color: var(--tah-text);
    -webkit-font-smoothing: antialiased;
    background: var(--tah-bg);
    min-height: 100vh;
}

/* Force dark theme with explicit values for all elements inside tah-dashboard */
.tah-dashboard {
    --tah-bg:           #080B10;
    --tah-bg-card:      #0F1620;
    --tah-bg-input:     #0a0f16;
    --tah-bg-muted:     #131C28;
    --tah-border:       #20303F;
    --tah-border-hover: #33475a;
    --tah-text:         #EAF1F6;
    --tah-text-muted:   #8298A8;
    --tah-text-subtle:  #556676;
    --tah-primary:      #E8A13A;
    --tah-primary-dim:  rgba(232,161,58,0.15);
    --tah-secondary:    #2FB4D9;
    --tah-secondary-dim:rgba(47,180,217,0.14);
    --tah-success:      #3FBE8F;
    --tah-success-dim:  rgba(63,190,143,0.12);
    --tah-warning:      #E8A13A;
    --tah-danger:       #E0574A;
    --tah-live:         #E0574A;
    --tah-font:         'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --tah-font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --tah-font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
    background: #080B10;
}

/* Override WordPress theme styles on dashboard page */
body.tah-dashboard-page,
body.tah-dashboard-page #content,
body.tah-dashboard-page .entry-content,
body.tah-dashboard-page .site-content,
body.tah-dashboard-page .site-main {
    background: #080B10 !important;
}

/* ── Notices ────────────────────────────────────────────────────────────── */
.tah-notice {
    padding: 12px 16px;
    border-radius: var(--tah-radius-sm);
    margin: 12px 0;
    font-size: .88rem;
    font-weight: 500;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tah-notice-warning { background: rgba(245,158,11,.1); color: #fbbf24; border-color: rgba(245,158,11,.25); }
.tah-notice-info    { background: color-mix(in srgb, var(--tah-secondary) 8%, transparent); color: var(--tah-secondary); border-color: color-mix(in srgb, var(--tah-secondary) 20%, transparent); }
.tah-notice-error   { background: rgba(239,68,68,.1);  color: #f87171; border-color: rgba(239,68,68,.25); }
.tah-notice-success { background: var(--tah-success-dim); color: var(--tah-success); border-color: rgba(34,197,94,.25); }

/* ── Dashboard wrapper ──────────────────────────────────────────────────── */
.tah-dashboard {
    max-width: 1040px;
    margin: 0 auto;
    padding: 8px 0 40px;
}

/* ── Agency logo ────────────────────────────────────────────────────────── */
.tah-dash-agency-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 16px 8px;
}
.tah-dash-agency-logo img {
    max-height: 64px;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.tah-dash-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--tah-bg-card);
    border: 1px solid #ffffff;
    border-radius: var(--tah-radius);
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--tah-shadow-sm);
}

.tah-avatar-btn {
    position: relative !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: var(--tah-radius-sm) !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}
.tah-avatar-btn:hover .tah-avatar-edit-icon { opacity: 1; }

.tah-dash-avatar,
.tah-avatar-btn > span:first-child {
    position: absolute !important;
    inset: 0 !important;
    border-radius: var(--tah-radius-sm);
    background: linear-gradient(135deg, var(--tah-primary) 0%, #F2C071 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.tah-avatar-btn img.tah-avatar-img,
#tah-avatar-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tah-avatar-edit-icon {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0,0,0,.7);
    border-radius: 50%;
    font-size: .6rem;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--tah-transition);
}

.tah-dash-info { flex: 1; min-width: 0; }
.tah-dash-info h2 {
    margin: 0;
    color: var(--tah-text);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tah-dash-info p {
    margin: 3px 0 0;
    color: var(--tah-text-muted);
    font-size: .78rem;
}

.tah-dash-status {
    font-size: .72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--tah-radius-full);
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--tah-success-dim);
    color: var(--tah-success);
    border: 1px solid rgba(34,197,94,.2);
    white-space: nowrap;
}
.tah-dash-status.tah-status-suspended {
    background: rgba(239,68,68,.1);
    color: #f87171;
    border-color: rgba(239,68,68,.2);
}

/* Grupo de botones de acción del header. En escritorio conserva el gap:14px
   del header (14px de gap + margin-left:8px de los pills = misma separación
   que antes de agruparlos, así el escritorio no cambia). En móvil se recoloca
   como su propia fila (ver el @media ≤720px). */
.tah-dash-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ── Mobile header (≤ 720px): foto + usuario + estado arriba;
   "Panel · fecha" abajo de la foto. Los botones (wallet/compartir) se
   ocultan porque ya están en el bottom-nav. */
@media (max-width: 720px) {
    .tah-dash-header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        column-gap: 6px;
        row-gap: 8px;
        padding: 14px;
        align-items: center;
    }
    /* "Desestructuramos" el contenedor info para que el h2 y la p
       participen directamente en el grid del padre */
    .tah-dash-info { display: contents; }

    .tah-avatar-btn {
        grid-row: 1;
        grid-column: 1;
        width: 46px !important;
        height: 46px !important;
    }
    .tah-dash-info h2 {
        grid-row: 1;
        grid-column: 2;
        align-self: center;
        font-size: .9rem;
        line-height: 1.2;
        margin: 0;
        letter-spacing: -.01em;
        /* Estirado (default) para llenar la columna: el texto arranca pegado a
           la foto y trunca con "…" en el borde, mostrando el máximo posible. */
    }
    .tah-dash-status {
        grid-row: 1;
        grid-column: 3;
        align-self: center;
        font-size: .62rem;
        padding: 3px 7px;
        justify-self: end;      /* compacto y al borde, deja más ancho al nombre */
    }
    /* "Panel · 2026-05" va abajo de la foto, ancho completo */
    .tah-dash-info p {
        grid-row: 2;
        grid-column: 1 / -1;
        margin: 0;
        font-size: .75rem;
        color: var(--tah-text-muted);
    }
    /* Los botones de acción van en su PROPIA fila (row 3), como una fila
       flexible de ancho completo. Así los 4 (Iniciar Live, ARENA, avisos,
       actualizar) caben juntos y "Actualizar" ya no cae solo en otra línea. */
    .tah-dash-actions {
        grid-row: 3;
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .tah-dash-actions > * { margin-left: 0; }   /* el gap del flex ya separa */
    /* En móvil estos ya están en el bottom-nav */
    .tah-dash-actions .tah-wallet-trigger,
    .tah-dash-actions .tah-affiliate-share-btn {
        display: none !important;
    }
}

/* Móviles muy estrechos: badge de estado más compacto + h2 más pequeño */
@media (max-width: 380px) {
    .tah-dash-header { padding: 12px; column-gap: 6px; }
    .tah-dash-info h2  { font-size: .85rem; }
    .tah-dash-status {
        font-size: .6rem;
        padding: 2px 6px;
    }
}

/* ── Metrics grid ───────────────────────────────────────────────────────── */
.tah-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .tah-metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

.tah-metric-card {
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    padding: 18px 16px;
    text-align: center;
    box-shadow: var(--tah-shadow-sm);
    transition: transform var(--tah-transition), border-color var(--tah-transition), box-shadow var(--tah-transition);
    position: relative;
    overflow: hidden;
}
.tah-metric-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--tah-transition);
    pointer-events: none;
}
.tah-metric-card:hover {
    transform: translateY(-2px);
    border-color: var(--tah-border-hover);
    box-shadow: var(--tah-shadow);
}

/* Colored accent strip on top */
.tah-metric-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    border-radius: var(--tah-radius) var(--tah-radius) 0 0;
}

.tah-metric-diamonds::after { background: var(--tah-secondary); }
.tah-metric-viewers::after  { background: var(--tah-primary); }
.tah-metric-likes::after    { background: #ff4d6d; }
.tah-metric-gifts::after    { background: var(--tah-warning); }
.tah-metric-sessions::after { background: #a78bfa; }
.tah-metric-peak::after     { background: #f97316; }

/* Placeholder when no metrics data */
.tah-metrics-placeholder {
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    padding: 40px 24px;
    text-align: center;
    margin-bottom: 20px;
}
.tah-metrics-placeholder-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: .7;
}
.tah-metrics-placeholder h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tah-text);
}
.tah-metrics-placeholder p {
    margin: 0;
    font-size: .85rem;
    color: var(--tah-text-muted);
    line-height: 1.5;
}

.tah-metric-icon {
    font-size: 1.4rem;
    margin-bottom: 8px;
    display: block;
    line-height: 1;
}
.tah-metric-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--tah-text);
    line-height: 1;
    letter-spacing: -.03em;
    margin-bottom: 4px;
}
.tah-metric-label {
    font-size: .72rem;
    color: var(--tah-text-muted);
    font-weight: 500;
    letter-spacing: .02em;
}

/* ── Prize progress ─────────────────────────────────────────────────────── */
.tah-prizes-section { margin-bottom: 20px; }
.tah-prizes-section h3 {
    font-size: .8rem;
    font-weight: 600;
    color: var(--tah-text-muted);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.tah-prize-bar-wrap {
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--tah-shadow-sm);
    transition: border-color var(--tah-transition);
    border-left: 3px solid var(--tah-primary);
}
.tah-prize-bar-wrap:hover { border-color: var(--tah-border-hover); }
.tah-prize-achieved {
    border-left-color: var(--tah-success);
}

.tah-prize-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--tah-radius-sm);
    flex-shrink: 0;
    border: 1px solid var(--tah-border);
}

.tah-prize-bar-info { flex: 1; min-width: 0; }
.tah-prize-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.tah-prize-name {
    font-weight: 600;
    font-size: .9rem;
    color: var(--tah-text);
}
.tah-prize-pct {
    font-size: .8rem;
    font-weight: 700;
    color: var(--tah-primary);
}
.tah-prize-achieved .tah-prize-pct { color: var(--tah-success); }
.tah-prize-desc {
    font-size: .75rem;
    color: var(--tah-text-muted);
    margin: 0 0 8px;
}

.tah-progress-track {
    background: rgba(255,255,255,.06);
    border-radius: var(--tah-radius-full);
    height: 6px;
    overflow: hidden;
    margin-bottom: 6px;
}
.tah-progress-fill {
    height: 100%;
    border-radius: var(--tah-radius-full);
    background: linear-gradient(90deg, var(--tah-primary), #F2C071);
    transition: width .8s ease;
}
.tah-prize-achieved .tah-progress-fill {
    background: linear-gradient(90deg, var(--tah-success), #86efac);
}
.tah-prize-bar-footer {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    color: var(--tah-text-subtle);
}

/* ── Backstage data section ─────────────────────────────────────────────── */
.tah-backstage-section { margin-bottom: 20px; }
.tah-backstage-section h3 {
    font-size: .8rem;
    font-weight: 600;
    color: var(--tah-text-muted);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin: 0 0 12px;
}
.tah-backstage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.tah-backstage-item {
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius-sm);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tah-backstage-label {
    font-size: .7rem;
    font-weight: 600;
    color: var(--tah-text-subtle);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.tah-backstage-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tah-text);
    line-height: 1.2;
}
.tah-backstage-highlight {
    color: var(--tah-secondary);
}

/* ── Refresh / Logout row ───────────────────────────────────────────────── */
.tah-refresh-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: .75rem;
    color: var(--tah-text-subtle);
}
.tah-btn-refresh,
.tah-btn-logout {
    background: transparent !important;
    border: 1px solid var(--tah-border) !important;
    border-radius: var(--tah-radius-full) !important;
    padding: 5px 12px !important;
    cursor: pointer !important;
    font-size: .75rem !important;
    color: var(--tah-text-muted) !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: border-color var(--tah-transition), color var(--tah-transition) !important;
    box-shadow: none !important;
    font-family: var(--tah-font) !important;
}
.tah-btn-refresh:hover,
.tah-btn-logout:hover {
    border-color: var(--tah-primary) !important;
    color: var(--tah-primary) !important;
}

/* ── Push notification section ──────────────────────────────────────────── */
.tah-push-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--tah-border);
}
.tah-push-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tah-push-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--tah-border);
    color: var(--tah-text-muted);
    border-radius: var(--tah-radius-full);
    padding: 7px 16px;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--tah-transition), color var(--tah-transition), border-color var(--tah-transition);
    font-family: var(--tah-font);
}
.tah-push-btn:hover {
    background: rgba(255,255,255,.08);
    color: var(--tah-text);
    border-color: var(--tah-border-hover);
}
.tah-push-btn.tah-push-active {
    background: var(--tah-primary-dim);
    border-color: var(--tah-primary);
    color: var(--tah-primary);
}
.tah-notif-history-btn { color: var(--tah-text-muted); }
.tah-push-msg { font-size: .75rem; min-height: 18px; text-align: center; color: var(--tah-text-muted); }

/* ── Register form ──────────────────────────────────────────────────────── */
.tah-register-wrap {
    display: flex;
    justify-content: center;
    padding: 32px 16px;
    min-height: 60vh;
    align-items: center;
}
.tah-register-card {
    background: var(--tah-bg-card);
    border: 1px solid #ffffff;
    border-radius: var(--tah-radius);
    padding: 36px 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--tah-shadow);
    text-align: center;
}
.tah-reg-logo-wrap { display: flex; justify-content: center; margin-bottom: 20px; }
.tah-reg-logo { max-height: 80px; max-width: 200px; object-fit: contain; }
.tah-register-card h2 {
    margin: 0 0 6px;
    color: var(--tah-text);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -.03em;
}
.tah-reg-subtitle {
    color: var(--tah-text-muted);
    font-size: .85rem;
    margin-bottom: 24px;
}

.tah-reg-referral {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tah-primary) 10%, transparent);
    color: var(--tah-primary);
    border: 1px solid color-mix(in srgb, var(--tah-primary) 35%, transparent);
    font-size: .82rem;
    font-weight: 500;
}
.tah-reg-referral-icon { font-size: 1rem; line-height: 1; }
.tah-reg-referral strong { color: #fafaf9; font-weight: 700; }

/* ── Icon system ────────────────────────────────────────────────────────── */
.tah-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.tah-icon-gold { color: #f59e0b; }
.tah-icon-cyan { color: var(--tah-secondary); }
.tah-icon-pink { color: var(--tah-primary); }

/* ── Layout utilities ───────────────────────────────────────────────────── */
.tah-section-spaced { margin-top: 24px; }
.tah-section-title {
    margin: 0;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 1rem; font-weight: 700; color: var(--tah-text);
}
.tah-section-header-flex {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
}

/* ── Affiliate share button (usa color SECUNDARIO de la marca) ────────────
   !important obligatorio: el wp_head del plugin fuerza estilos globales a
   todos los <button> con !important, así que sin esto no ganamos. */
.tah-affiliate-share-btn {
    margin-left: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tah-secondary) 8%, transparent) !important;
    color: var(--tah-secondary) !important;
    border: 1px solid color-mix(in srgb, var(--tah-secondary) 45%, transparent) !important;
    font-size: .78rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background var(--tah-transition), border-color var(--tah-transition), color var(--tah-transition);
}
.tah-affiliate-share-btn:hover {
    background: var(--tah-secondary-dim) !important;
    border-color: var(--tah-secondary) !important;
    color: var(--tah-secondary) !important;
}
.tah-affiliate-share-btn--secondary { margin-left: 0; }
/* El icono SVG dentro del botón hereda el color del padre */
.tah-affiliate-share-btn svg { stroke: var(--tah-secondary) !important; }

/* ── Prize bars ─────────────────────────────────────────────────────────── */
.tah-prize-affiliate .tah-progress-fill {
    background: linear-gradient(90deg, var(--tah-primary), var(--tah-secondary));
}
.tah-prize-tag {
    display: inline-block;
    padding: 1px 7px;
    margin-right: 6px;
    border-radius: 10px;
    background: var(--tah-secondary-dim);
    color: var(--tah-secondary);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: middle;
}
.tah-prize-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    font-size: 1.6rem;
}

/* ── Affiliate modal ────────────────────────────────────────────────────── */
.tah-affiliate-modal {
    position: fixed; inset: 0; z-index: 100000;
    display: flex; align-items: center; justify-content: center;
}
.tah-affiliate-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
}
.tah-affiliate-modal-card {
    position: relative; z-index: 1;
    width: min(420px, 92vw);
    background: #1c1917;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 22px 22px 18px;
    color: var(--tah-text);
    box-shadow: var(--tah-shadow);
}
.tah-affiliate-modal-card h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--tah-text); }
.tah-affiliate-modal-help { margin: 0 0 14px; font-size: .82rem; color: var(--tah-text-muted); line-height: 1.45; }
.tah-affiliate-modal-close {
    position: absolute; top: 8px; right: 12px;
    background: none; border: none;
    color: var(--tah-text-subtle);
    font-size: 1.4rem; cursor: pointer; padding: 4px 8px;
}
.tah-affiliate-link-row { display: flex; gap: 8px; margin-bottom: 12px; }
.tah-affiliate-link-row input {
    flex: 1; min-width: 0;
    padding: 8px 10px; border-radius: 8px;
    background: #0d0c0b; color: var(--tah-text);
    border: 1px solid rgba(255,255,255,.12);
    font-size: .8rem; font-family: ui-monospace, SFMono-Regular, monospace;
}
.tah-affiliate-action-btn {
    padding: 8px 14px; border-radius: 8px;
    border: none; cursor: pointer;
    background: var(--tah-primary); color: #fff;
    font-weight: 600; font-size: .82rem;
    transition: background var(--tah-transition);
}
.tah-affiliate-action-btn:hover { background: #e62547; }
.tah-affiliate-action-btn.copied { background: var(--tah-success); }
.tah-affiliate-share-row { display: flex; gap: 8px; }
.tah-affiliate-share-link {
    flex: 1; text-align: center;
    padding: 9px 0; border-radius: 8px;
    background: rgba(255,255,255,.05);
    color: var(--tah-text);
    text-decoration: none;
    font-size: .8rem; font-weight: 500;
    border: 1px solid rgba(255,255,255,.08);
    transition: background var(--tah-transition);
}
.tah-affiliate-share-link:hover { background: rgba(255,255,255,.1); color: var(--tah-text); }

.tah-affiliate-qr-details { margin-top: 12px; }
.tah-affiliate-qr-details summary {
    cursor: pointer; font-size: .78rem;
    color: var(--tah-text-muted);
    padding: 6px 0; list-style: none; user-select: none;
}
.tah-affiliate-qr-details summary::-webkit-details-marker { display: none; }
.tah-affiliate-qr-details summary::before { content: '▸ '; transition: transform .15s; display: inline-block; }
.tah-affiliate-qr-details[open] summary::before { content: '▾ '; }
.tah-affiliate-qr { text-align: center; padding: 12px 0 4px; }
.tah-affiliate-qr img {
    background: #fff; padding: 8px;
    border-radius: 10px;
    display: block; margin: 0 auto;
    max-width: 220px; height: auto;
}
.tah-affiliate-qr p { margin: 10px 0 0; font-size: .76rem; color: var(--tah-text-subtle); }

/* ── Referrals list ─────────────────────────────────────────────────────── */
.tah-referrals-section { background: rgba(255,255,255,.02); border-radius: 14px; padding: 16px 18px; }
.tah-referrals-empty { margin: 12px 0 0; font-size: .85rem; color: var(--tah-text-muted); line-height: 1.5; }
.tah-referrals-stats { margin: 10px 0 8px; font-size: .85rem; color: var(--tah-text-muted); }
.tah-referrals-stats strong { color: var(--tah-primary); font-weight: 700; }
.tah-referrals-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.tah-referral-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 8px;
    background: rgba(255,255,255,.03);
    font-size: .85rem;
}
.tah-referral-item.is-qualified { background: var(--tah-success-dim); }
.tah-referral-status {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: var(--tah-text-subtle);
    font-weight: 700; font-size: .75rem;
    flex-shrink: 0;
}
.tah-referral-item.is-qualified .tah-referral-status { background: var(--tah-success); color: #fff; }
.tah-referral-name { flex: 1; min-width: 0; font-weight: 600; color: var(--tah-text); }
.tah-referral-meta { font-size: .76rem; color: var(--tah-text-muted); text-align: right; }

/* ── iOS install banner ─────────────────────────────────────────────────── */
.tah-ios-install {
    display: flex; align-items: center; gap: 12px;
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--tah-primary-dim), var(--tah-secondary-dim));
    border: 1px solid color-mix(in srgb, var(--tah-primary) 30%, transparent);
    color: var(--tah-text);
    font-size: .82rem;
    line-height: 1.4;
}
/* `display: flex` de arriba pisa el `[hidden] { display: none }` del navegador
   porque tienen la misma especificidad y este viene después. Forzamos. */
.tah-ios-install[hidden] { display: none !important; }
.tah-ios-install-icon { font-size: 1.5rem; flex-shrink: 0; }
.tah-ios-install-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tah-ios-install-text strong { color: var(--tah-primary); font-weight: 700; }
.tah-ios-install-close {
    flex-shrink: 0; background: none; border: none;
    color: var(--tah-text-muted);
    font-size: 1.4rem; cursor: pointer; padding: 0 6px; line-height: 1;
}

/* ── Checklist ──────────────────────────────────────────────────────────── */
.tah-checklist {
    margin: 14px 0 18px;
    padding: 16px 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--tah-primary) 8%, transparent), color-mix(in srgb, var(--tah-secondary) 8%, transparent));
    border: 1px solid color-mix(in srgb, var(--tah-primary) 20%, transparent);
    border-radius: 14px;
    color: var(--tah-text);
    position: relative;
}
.tah-checklist-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tah-checklist-head strong { display: block; font-size: 1rem; }
.tah-checklist-progress-label { display: block; font-size: .75rem; color: var(--tah-text-muted); margin-top: 2px; }
.tah-checklist .tah-onboarding-close {
    background: none; border: none;
    color: var(--tah-text-muted);
    cursor: pointer;
    font-size: 1.3rem; line-height: 1; padding: 0 4px;
}
.tah-checklist-bar {
    height: 6px;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    margin: 12px 0 14px;
    overflow: hidden;
}
.tah-checklist-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tah-primary), var(--tah-secondary));
    transition: width .3s ease;
}
.tah-checklist-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.tah-checklist-list li { display: flex; align-items: center; gap: 10px; font-size: .85rem; padding: 4px 0; }
.tah-checklist-check {
    width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.08);
    color: var(--tah-text-subtle);
    font-weight: 700; font-size: .8rem;
}
.tah-checklist-list li.is-done .tah-checklist-check { background: var(--tah-success); color: #fff; }
.tah-checklist-list li.is-done .tah-checklist-label { text-decoration: line-through; color: var(--tah-text-subtle); }
.tah-checklist-label { flex: 1; }
.tah-checklist-cta { font-size: .78rem; color: var(--tah-primary); text-decoration: none; font-weight: 600; }
.tah-checklist-cta:hover { color: #F2C071; }

/* ── Hero metric ────────────────────────────────────────────────────────── */
.tah-hero {
    margin: 14px 0 18px;
    padding: 22px 24px;
    border-radius: 18px;
    background:
        radial-gradient(120% 200% at 0% 0%, color-mix(in srgb, var(--tah-primary) 18%, transparent), transparent 50%),
        radial-gradient(120% 200% at 100% 100%, color-mix(in srgb, var(--tah-secondary) 14%, transparent), transparent 50%),
        #0a0a0a;
    border: 1px solid rgba(255,255,255,.08);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
}
.tah-hero-main { display: flex; flex-direction: column; }
.tah-hero-label { font-size: .72rem; color: var(--tah-text-muted); text-transform: uppercase; letter-spacing: .08em; }
.tah-hero-value {
    font-size: 2.6rem; font-weight: 800; line-height: 1.05;
    background: linear-gradient(90deg, var(--tah-primary), var(--tah-secondary));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 2px 0 4px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Diamante animado: rota sutilmente + brillo pulsante para llamar la atención */
.tah-hero-diamond {
    display: inline-block;
    font-size: 2.2rem;
    line-height: 1;
    /* El emoji no se pinta con background-clip, así que lo dejamos opaco */
    -webkit-text-fill-color: initial;
    color: initial;
    animation: tah-diamond-spin 2.4s ease-in-out infinite;
    transform-origin: center;
    filter: drop-shadow(0 0 0 transparent);
    will-change: transform, filter;
}
@keyframes tah-diamond-spin {
    0%   { transform: rotate(-8deg) scale(1);    filter: drop-shadow(0 0 0 transparent); }
    25%  { transform: rotate(0deg)  scale(1.08); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tah-secondary) 75%, transparent)); }
    50%  { transform: rotate(8deg)  scale(1);    filter: drop-shadow(0 0 0 transparent); }
    75%  { transform: rotate(0deg)  scale(1.08); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tah-secondary) 75%, transparent)); }
    100% { transform: rotate(-8deg) scale(1);    filter: drop-shadow(0 0 0 transparent); }
}

/* Respeta a usuarios con motion reducida */
@media (prefers-reduced-motion: reduce) {
    .tah-hero-diamond { animation: none; }
}
.tah-hero-period { font-size: .72rem; color: var(--tah-text-subtle); }
.tah-hero-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; max-width: 60%; }
.tah-hero-chip {
    padding: 8px 12px; border-radius: 999px; font-size: .8rem;
    background: rgba(255,255,255,.05);
    color: var(--tah-text);
    border: 1px solid rgba(255,255,255,.08);
}
.tah-hero-chip strong { color: var(--tah-primary); }
.tah-hero-chip-win {
    background: var(--tah-success-dim);
    border-color: rgba(34,197,94,.3);
    color: #4ade80;
}
@media (max-width: 540px) {
    .tah-hero { padding: 16px 18px; }
    .tah-hero-value { font-size: 2rem; }
    .tah-hero-side { max-width: 100%; align-items: flex-start; }
}

/* ── Win celebration animations ─────────────────────────────────────────── */
@keyframes tah-pulse-win {
    0%   { transform: scale(1);     box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
    50%  { transform: scale(1.015); box-shadow: 0 0 0 10px rgba(34,197,94,0); }
    100% { transform: scale(1);     box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.tah-prize-bar-wrap.tah-just-won {
    animation: tah-pulse-win 1.2s ease-out 2;
    border: 1px solid rgba(34,197,94,.5);
}
.tah-toast {
    position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--tah-success), #16a34a);
    color: #fff; padding: 14px 20px; border-radius: 14px;
    font-weight: 700; font-size: .95rem;
    box-shadow: 0 10px 40px rgba(34,197,94,.4);
    z-index: 200000; opacity: 0;
    transition: opacity .25s, transform .25s;
}
.tah-toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ── Bottom navigation ──────────────────────────────────────────────────── */
.tah-bottom-nav { display: none; }
@media (max-width: 720px) {
    .tah-bottom-nav {
        display: flex; justify-content: space-around;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
        background: rgba(0, 2, 2, .96);
        backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255,255,255,.1);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }
    .tah-dashboard { padding-bottom: 84px; }
}
.tah-bottom-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 4px; color: var(--tah-text-muted);
    text-decoration: none; font-size: .65rem;
    transition: color var(--tah-transition);
}
.tah-bottom-nav-item.is-active, .tah-bottom-nav-item:hover { color: var(--tah-primary); }

/* ── Empty state ────────────────────────────────────────────────────────── */
.tah-empty-state {
    margin: 18px 0;
    padding: 28px 22px;
    text-align: center;
    background: rgba(255,255,255,.02);
    border: 1px dashed rgba(255,255,255,.15);
    border-radius: 16px;
}
.tah-empty-icon { display: block; font-size: 2.4rem; margin-bottom: 6px; }
.tah-empty-state h3 { margin: 8px 0 6px; font-size: 1.05rem; color: var(--tah-text); }
.tah-empty-state p  { margin: 4px 0; font-size: .9rem; color: var(--tah-text-muted); line-height: 1.5; }
.tah-empty-hint     { font-size: .82rem !important; color: var(--tah-text-subtle) !important; margin-top: 12px !important; }

/* ── Leaderboard ────────────────────────────────────────────────────────── */
.tah-leaderboard-section { background: rgba(255,255,255,.02); border-radius: 14px; padding: 16px 18px; }
.tah-lb-optout-btn {
    background: color-mix(in srgb, var(--tah-secondary) 6%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--tah-secondary) 45%, transparent) !important;
    color: var(--tah-secondary) !important;
    font-size: .78rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--tah-transition), border-color var(--tah-transition);
}
.tah-lb-optout-btn:hover {
    background: var(--tah-secondary-dim) !important;
    border-color: var(--tah-secondary) !important;
    color: var(--tah-secondary) !important;
}
.tah-leaderboard { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 4px; }
.tah-leaderboard li {
    display: grid; grid-template-columns: 50px 1fr; gap: 10px; align-items: center;
    padding: 8px 12px; border-radius: 8px;
    background: rgba(255,255,255,.03);
    font-size: .85rem;
}
.tah-leaderboard li.is-self {
    background: linear-gradient(90deg, color-mix(in srgb, var(--tah-primary) 15%, transparent), color-mix(in srgb, var(--tah-secondary) 8%, transparent));
    border: 1px solid color-mix(in srgb, var(--tah-primary) 35%, transparent);
}
.tah-lb-rank { font-weight: 700; color: var(--tah-primary); }
.tah-lb-name { font-weight: 500; color: var(--tah-text); }
.tah-lb-name small { color: var(--tah-text-muted); }
.tah-lb-value { font-variant-numeric: tabular-nums; color: var(--tah-secondary); font-weight: 600; }
.tah-lb-optout-info { color: var(--tah-text-muted); font-size: .85rem; }
.tah-forgot-actions { display: flex; gap: 8px; }
.tah-btn-grow { flex: 1; }
.tah-label-hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--tah-text-subtle);
}

/* Visually hidden pero accesible para screen readers + sigue siendo clickeable por JS */
.tah-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Avatar upload: botón + input URL lado a lado */
.tah-avatar-upload-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.tah-avatar-upload-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    font-size: .82rem;
    font-weight: 600;
}
.tah-avatar-url-input {
    flex: 1;
    min-width: 0;
}
.tah-upload-status {
    display: block;
    margin-top: 6px;
    color: var(--tah-text-subtle);
    font-size: .72rem;
}
@media (max-width: 540px) {
    .tah-avatar-upload-row { flex-direction: column; }
    .tah-avatar-upload-btn { width: 100%; }
}

.tah-form-group { text-align: left; margin-bottom: 14px; }
.tah-form-group label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--tah-text-muted);
    margin-bottom: 5px;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.tah-form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid var(--tah-border) !important;
    border-radius: var(--tah-radius-sm);
    font-size: .9rem;
    font-family: var(--tah-font);
    color: var(--tah-text) !important;
    background: var(--tah-bg-input) !important;
    transition: border-color var(--tah-transition), box-shadow var(--tah-transition);
}
.tah-form-group input::placeholder { color: var(--tah-text-subtle) !important; }
.tah-form-group input:focus {
    outline: none !important;
    border-color: var(--tah-primary) !important;
    box-shadow: 0 0 0 3px var(--tah-primary-dim) !important;
}
.tah-form-group small {
    display: block;
    font-size: .72rem;
    color: var(--tah-text-subtle);
    margin-top: 4px;
}
.tah-required { color: var(--tah-primary); }

/* Phone row in register */
.tah-phone-row {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100%;
}
.tah-phone-code-select {
    width: 140px !important;
    max-width: 140px !important;
    min-width: 140px !important;
    flex-shrink: 0 !important;
    padding: 9px 8px;
    border: 1px solid var(--tah-border) !important;
    border-radius: var(--tah-radius-sm);
    font-size: .85rem;
    font-family: var(--tah-font);
    color: var(--tah-text) !important;
    background: var(--tah-bg-input) !important;
    box-sizing: border-box;
}
.tah-phone-number-input {
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
}

.tah-btn-primary {
    width: 100%;
    padding: 11px;
    background: var(--tah-primary);
    color: #fff;
    border: none;
    border-radius: var(--tah-radius-sm);
    font-size: .95rem;
    font-weight: 600;
    font-family: var(--tah-font);
    cursor: pointer;
    transition: opacity var(--tah-transition), transform var(--tah-transition);
    margin-top: 8px;
    letter-spacing: -.01em;
}
.tah-btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.tah-btn-primary:active { transform: translateY(0); }
.tah-btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Profile panel ──────────────────────────────────────────────────────── */
.tah-profile-panel {
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--tah-shadow-sm);
}
.tah-profile-inner { padding: 18px 20px; }
.tah-profile-inner h3 {
    margin: 0 0 14px;
    color: var(--tah-text);
    font-size: .9rem;
    font-weight: 600;
}

.tah-profile-avatar-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}
.tah-profile-avatar-preview img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--tah-primary);
}
.tah-profile-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tah-primary), #F2C071);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    border: 2px solid var(--tah-primary);
}

.tah-profile-fields { display: flex; flex-direction: column; gap: 10px; }
.tah-profile-field label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--tah-text-muted);
    margin-bottom: 4px;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.tah-profile-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 11px;
    background: var(--tah-bg-input);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius-sm);
    color: var(--tah-text) !important;
    font-size: .88rem;
    font-family: var(--tah-font);
    transition: border-color var(--tah-transition);
}
.tah-profile-field input:focus {
    outline: none;
    border-color: var(--tah-primary);
    box-shadow: 0 0 0 2px var(--tah-primary-dim);
}

.tah-btn-secondary {
    padding: 8px 13px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--tah-border);
    color: var(--tah-text-muted);
    border-radius: var(--tah-radius-sm);
    cursor: pointer;
    font-size: .85rem;
    font-family: var(--tah-font);
    font-weight: 500;
    white-space: nowrap;
    transition: border-color var(--tah-transition), color var(--tah-transition), background var(--tah-transition);
}
.tah-btn-secondary:hover {
    border-color: var(--tah-border-hover);
    color: var(--tah-text);
    background: rgba(255,255,255,.08);
}

/* ── Notification history modal ─────────────────────────────────────────── */
.tah-notif-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}
.tah-notif-modal {
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    width: 100%;
    max-width: 440px;
    max-height: 78vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--tah-shadow);
}
.tah-notif-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--tah-border);
    font-weight: 600;
    font-size: .9rem;
    color: var(--tah-text);
}
.tah-notif-modal-header button {
    background: none;
    border: none;
    color: var(--tah-text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color var(--tah-transition);
}
.tah-notif-modal-header button:hover { color: var(--tah-text); }
.tah-notif-modal-body { overflow-y: auto; padding: 10px 14px; flex: 1; }
.tah-notif-loading, .tah-notif-empty {
    text-align: center;
    color: var(--tah-text-muted);
    padding: 24px;
    font-size: .85rem;
}
.tah-notif-item {
    display: block;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    color: inherit;
    text-decoration: none;
    transition: background var(--tah-transition), border-color var(--tah-transition);
}
.tah-notif-item:last-child { margin-bottom: 0; }
.tah-notif-item-title { font-weight: 600; color: var(--tah-text); font-size: .85rem; margin-bottom: 3px; }
.tah-notif-item-body  { color: var(--tah-text-muted); font-size: .78rem; margin-bottom: 5px; line-height: 1.4; }
.tah-notif-item-date  { color: var(--tah-text-subtle); font-size: .7rem; }
.tah-notif-item-link:hover {
    background: rgba(255,255,255,.06);
    border-color: var(--tah-border-hover);
}

/* ── AI Chat floating button ─────────────────────────────────────────────
   El FAB del agente: usa la foto configurada en Branding como fondo y
   un borde grueso del color SECUNDARIO de la marca. Si no hay foto,
   cae al estilo original (círculo primario con icono SVG).
   NOTA: NO usamos el shorthand `background:` porque sería reset implícito
   de background-image, y haría que el style inline (con la URL del avatar)
   nunca gane sobre el !important del CSS. */
#tah-ai-chat-toggle {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 99999 !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background-color: var(--tah-primary) !important;
    background-position: center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    color: #fff !important;
    border: 3px solid var(--tah-secondary) !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
    padding: 0 !important;
    box-shadow:
        0 4px 18px color-mix(in srgb, var(--tah-secondary) 35%, transparent),
        0 0 0 2px color-mix(in srgb, var(--tah-secondary) 25%, transparent) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform var(--tah-transition), box-shadow var(--tah-transition) !important;
    overflow: visible !important;
}
/* ── Agente de agencia (v6.20) ─────────────────────────────────────────────
   El de los paneles del manager y de la agencia. Ids propios y no las mismas
   del chat del creador: compartirlas le habría traído también su JavaScript,
   que apunta a otra acción. Todo lo de dentro —burbujas, cabecera, campo— sí
   reutiliza las clases .tah-chat-*, que son las mismas. */
#tah-staff-agent-toggle {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 99999;
    width: 60px; height: 60px;
    border-radius: 50%;
    background-color: var(--tah-primary);
    background-position: center; background-size: cover; background-repeat: no-repeat;
    color: #fff;
    border: 3px solid var(--tah-secondary);
    padding: 0;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 18px color-mix(in srgb, var(--tah-secondary) 35%, transparent);
    transition: transform var(--tah-transition);
}
#tah-staff-agent-toggle.has-avatar { background-color: var(--tah-bg-card); }
#tah-staff-agent-toggle:hover { transform: scale(1.08); }
body.tah-staff-agent-open #tah-staff-agent-toggle { display: none; }

#tah-staff-agent-panel {
    position: fixed;
    bottom: 96px; right: 24px;
    z-index: 99998;
    width: min(420px, calc(100vw - 48px));
    height: min(620px, calc(100vh - 140px));
    display: none;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    box-shadow: 0 18px 60px rgba(0,0,0,.55);
}
#tah-staff-agent-panel.is-open { display: flex; }

/* En móvil ocupa la pantalla: un panel de 420px en un teléfono no sirve. */
@media (max-width: 720px) {
    #tah-staff-agent-panel {
        inset: 0;
        width: 100%; height: 100%;
        border-radius: 0;
        border: none;
    }
}

#tah-staff-agent-close {
    background: rgba(255,255,255,.08);
    border: none; color: #fff;
    width: 28px; height: 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}
#tah-staff-agent-close:hover { background: rgba(255,255,255,.15); }

/* Es un <a> desde v6.19.3 (lleva a la Línea Directa), no un <button>. */
#tah-ai-chat-toggle { text-decoration: none !important; }
#tah-ai-chat-toggle.has-avatar {
    /* Si la foto falla al cargar, se ve un fondo oscuro neutro en vez del rosa */
    background-color: var(--tah-bg-card) !important;
}
#tah-ai-chat-toggle:hover {
    transform: scale(1.08) !important;
    box-shadow:
        0 6px 26px color-mix(in srgb, var(--tah-secondary) 55%, transparent),
        0 0 0 3px color-mix(in srgb, var(--tah-secondary) 35%, transparent) !important;
}

/* Punto verde "en línea" sobre el FAB, estilo WhatsApp */
.tah-ai-chat-toggle-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--tah-bg, #080B10);
    pointer-events: none;
}

/* En mobile el bottom nav está fijo abajo: subimos el FAB para no
   superponerlo sobre "Perfil". Bottom nav ≈ 60px + safe-area. */
@media (max-width: 720px) {
    #tah-ai-chat-toggle {
        bottom: calc(76px + env(safe-area-inset-bottom)) !important;
        right: 16px !important;
    }
}

/* ── AI Chat panel ──────────────────────────────────────────────────────── */
#tah-ai-chat-panel {
    position: fixed !important;
    bottom: 88px !important;
    right: 24px !important;
    z-index: 99998 !important;
    width: 360px;
    height: 520px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    box-shadow: var(--tah-shadow);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(.97);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
}
#tah-ai-chat-panel.tah-chat-open {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: all;
}

/* Chat header */
.tah-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--tah-primary) 0%, #c8193e 100%);
    color: #fff;
    flex-shrink: 0;
}
.tah-chat-header-left { display: flex; align-items: center; gap: 10px; }
.tah-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    position: relative;
}
/* Cuando hay imagen de fondo, ocultar el SVG fallback */
.tah-chat-avatar.has-image > svg { display: none; }
/* Punto verde de "en línea" estilo WhatsApp */
.tah-chat-presence-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.1);
}
.tah-chat-header-info { display: flex; flex-direction: column; line-height: 1.2; }
.tah-chat-header-name  { font-weight: 700; font-size: .88rem; }
.tah-chat-header-status { font-size: .68rem; opacity: .85; color: #b2f5c8; }
#tah-ai-chat-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background var(--tah-transition), color var(--tah-transition);
    line-height: 1;
}
#tah-ai-chat-close:hover { background: rgba(255,255,255,.15); color: #fff; }

/* Chat messages area */
.tah-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--tah-bg-muted);
}
.tah-chat-messages::-webkit-scrollbar { width: 4px; }
.tah-chat-messages::-webkit-scrollbar-track { background: transparent; }
.tah-chat-messages::-webkit-scrollbar-thumb { background: var(--tah-border-hover); border-radius: 4px; }

/* Row contenedor de cada mensaje (estilo WhatsApp con avatar al lado) */
.tah-chat-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 92%;
}
.tah-chat-msg-row-ai   { align-self: flex-start; }
.tah-chat-msg-row-user { align-self: flex-end; justify-content: flex-end; }

/* Avatar inline junto a cada mensaje del AI */
.tah-chat-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--tah-primary);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    overflow: hidden;
}
.tah-chat-msg-avatar.has-image { background-color: transparent; }
.tah-chat-msg-avatar span { line-height: 1; }

/* Chat bubbles */
.tah-chat-msg {
    padding: 8px 12px 7px;
    font-size: .88rem;
    line-height: 1.45;
    word-break: break-word;
    position: relative;
    max-width: 100%;
}
.tah-chat-msg-ai {
    background: var(--tah-bg-card);
    color: var(--tah-text);
    border: 1px solid var(--tah-border);
    /* Esquina superior izquierda más pequeña (la "cola" apunta al avatar) */
    border-radius: 4px 14px 14px 14px;
}
.tah-chat-msg-user {
    background: var(--tah-primary);
    color: #fff;
    /* Esquina superior derecha más pequeña, simétrico al AI */
    border-radius: 14px 4px 14px 14px;
}
.tah-chat-typing {
    background: var(--tah-bg-card);
    color: var(--tah-text-muted);
    border: 1px solid var(--tah-border);
    border-radius: 4px 14px 14px 14px;
    padding: 10px 14px;
    font-size: .82rem;
}
.tah-chat-typing-dots { display: inline-flex; gap: 3px; align-items: center; }
.tah-chat-typing-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--tah-text-muted);
    animation: tah-dot-bounce .9s infinite ease-in-out;
}
.tah-chat-typing-dots span:nth-child(2) { animation-delay: .15s; }
.tah-chat-typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes tah-dot-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%           { transform: translateY(-4px); }
}

/* Chat input area */
.tah-chat-input-wrap {
    display: flex;
    gap: 8px;
    padding: 10px 11px;
    background: var(--tah-bg-card);
    border-top: 1px solid var(--tah-border);
    flex-shrink: 0;
    align-items: center;
}
#tah-chat-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 20px;
    background: var(--tah-bg-input);
    border: 1px solid var(--tah-border);
    color: var(--tah-text) !important;
    font-size: .88rem;
    font-family: var(--tah-font);
    line-height: 1.4;
    outline: none;
    resize: none;
    transition: border-color var(--tah-transition), height var(--tah-transition);
    /* Auto-grow: empieza en 1 línea, máx 5 líneas (~140px) */
    min-height: 40px;
    max-height: 140px;
    overflow-y: auto;
}
#tah-chat-input::placeholder { color: var(--tah-text-subtle); }
#tah-chat-input:focus { border-color: var(--tah-primary); }
#tah-chat-input:disabled { opacity: .6; cursor: not-allowed; }

/* Chips de sugerencias iniciales */
.tah-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 12px 10px;
    background: var(--tah-bg-card);
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,.04);
}
.tah-chat-suggestions.is-hidden { display: none; }
.tah-chat-suggestion-chip {
    background: color-mix(in srgb, var(--tah-primary) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--tah-primary) 25%, transparent);
    color: var(--tah-primary);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: .78rem;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.2;
    font-family: var(--tah-font);
    transition: background var(--tah-transition), transform var(--tah-transition);
    text-align: left;
}
.tah-chat-suggestion-chip:hover {
    background: color-mix(in srgb, var(--tah-primary) 18%, transparent);
    transform: translateY(-1px);
}
.tah-chat-suggestion-chip:active { transform: translateY(0); }

/* Acciones del header del chat (reset, close) */
.tah-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.tah-chat-header-btn {
    background: rgba(255, 255, 255, .12);
    border: none;
    color: rgba(255, 255, 255, .85);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--tah-transition);
}
.tah-chat-header-btn:hover { background: rgba(255, 255, 255, .22); color: #fff; }
#tah-chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--tah-primary);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--tah-transition), opacity var(--tah-transition);
}
#tah-chat-send:hover { opacity: .9; transform: scale(1.06); }
#tah-chat-send:active { transform: scale(.95); }

/* ── Mobile AI Chat — full screen ───────────────────────────────────────── */
@media (max-width: 767px) {
    #tah-ai-chat-panel {
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: none !important;
        border-radius: 0 !important;
        opacity: 1 !important;
        transform: translateY(110%) !important;
        transition: transform .3s cubic-bezier(.4,0,.2,1) !important;
        box-shadow: none !important;
    }
    #tah-ai-chat-panel.tah-chat-open { transform: translateY(0) !important; }

    /* Ocultar el botón flotante mientras el chat está abierto para que no
       se superponga al botón de enviar mensaje. */
    body.tah-chat-active #tah-ai-chat-toggle { display: none !important; }
    .tah-chat-header { padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); }
    .tah-chat-messages { padding: 12px; gap: 8px; }
    .tah-chat-msg { font-size: .9rem; padding: 9px 12px 7px; }
    #tah-chat-input { font-size: 16px !important; }
    #tah-chat-send  { width: 44px; height: 44px; }
    .tah-chat-input-wrap { padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }

    .tah-metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .tah-register-card { padding: 28px 20px; }
}

/* ── Login page ─────────────────────────────────────────────────────────── */
.tah-login-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 32px 16px;
    background: var(--tah-bg);
}
.tah-login-card {
    background: var(--tah-bg-card);
    border: 1px solid #ffffff;
    border-radius: var(--tah-radius);
    padding: 40px 36px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--tah-shadow);
    text-align: center;
}
.tah-login-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}
.tah-login-logo {
    max-height: 90px;
    max-width: 220px;
    object-fit: contain;
    display: block;
}
.tah-login-title {
    margin: 0 0 6px;
    color: var(--tah-text);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -.03em;
}
.tah-login-subtitle {
    color: var(--tah-text-muted);
    font-size: .85rem;
    margin-bottom: 28px;
}
.tah-password-wrap {
    position: relative;
}
.tah-password-wrap input {
    padding-right: 42px !important;
}
.tah-toggle-pwd {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--tah-text-subtle);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color var(--tah-transition);
}
.tah-toggle-pwd:hover { color: var(--tah-text); }

@media (max-width: 480px) {
    .tah-login-card { padding: 28px 20px; }
}

/* ── Elementor overrides ────────────────────────────────────────────────── */
.tah-elementor-metrics .tah-metrics-grid { margin-bottom: 0; }

/* ─────────────────────────────────────────────────────────────────────────
   v5.0.9 — UX upgrades: wizard, password strength, spinners, benefits,
   login extras, onboarding, profile logout
   ───────────────────────────────────────────────────────────────────────── */

/* Card de beneficios en registro */
.tah-reg-benefits {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: color-mix(in srgb, var(--tah-primary) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--tah-primary) 20%, transparent);
    border-radius: var(--tah-radius-sm);
    padding: 12px 14px;
    margin-bottom: 18px;
    text-align: left;
}
.tah-benefit {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--tah-text-muted);
}
.tah-benefit-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

/* Indicador de pasos */
.tah-step-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 22px;
    gap: 4px;
}
.tah-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.tah-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid var(--tah-border);
    color: var(--tah-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    font-weight: 700;
    transition: all .25s ease;
}
.tah-step-label {
    font-size: .68rem;
    color: var(--tah-text-subtle);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}
.tah-step.active .tah-step-num {
    background: var(--tah-primary);
    border-color: var(--tah-primary);
    color: #fff;
    box-shadow: 0 0 0 4px var(--tah-primary-dim);
}
.tah-step.active .tah-step-label { color: var(--tah-text); }
.tah-step.done .tah-step-num {
    background: var(--tah-success);
    border-color: var(--tah-success);
    color: #fff;
}
.tah-step.done .tah-step-num::before { content: '✓'; }
.tah-step.done .tah-step-num span { display: none; }
.tah-step-line {
    flex: 1;
    height: 2px;
    background: var(--tah-border);
    margin: 0 4px;
    margin-bottom: 18px;
}

/* Acciones del wizard */
.tah-step-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.tah-step-actions .tah-btn-secondary { flex: 0 0 auto; padding: 10px 16px; }
.tah-step-actions .tah-btn-primary { flex: 1; margin-top: 0; }
.tah-step-panel[hidden] { display: none !important; }

/* Input con error */
.tah-input-error {
    border-color: var(--tah-danger) !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.15) !important;
    animation: tah-shake .3s ease;
}
@keyframes tah-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
.tah-field-hint { display: block; font-size: .72rem; color: var(--tah-text-subtle); margin-top: 4px; }

/* Medidor de fuerza de contraseña */
.tah-pwd-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tah-pwd-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,.1);
    border-radius: 2px;
    overflow: hidden;
}
.tah-pwd-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--tah-danger);
    transition: width .25s ease, background .25s ease;
}
.tah-pwd-label {
    font-size: .72rem;
    color: var(--tah-text-subtle);
    min-width: 88px;
    text-align: right;
    font-weight: 600;
}

/* Botón con spinner */
.tah-btn-primary, .tah-btn-secondary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.tah-btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tah-spin .7s linear infinite;
}
.tah-btn-primary.tah-loading .tah-btn-spinner { display: inline-block; }
.tah-btn-primary.tah-loading .tah-btn-label { opacity: .6; }
.tah-btn-primary.tah-loading,
.tah-btn-secondary.tah-loading { cursor: wait; pointer-events: none; }
@keyframes tah-spin { to { transform: rotate(360deg); } }

/* Footer del registro */
.tah-reg-footer {
    margin-top: 16px;
    font-size: .8rem;
    color: var(--tah-text-muted);
    text-align: center;
}
.tah-reg-footer a {
    color: var(--tah-primary) !important;
    text-decoration: none;
    font-weight: 600;
}
.tah-reg-footer a:hover { opacity: .85; }

/* Login: extras (recordarme + olvidé) */
.tah-login-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8rem;
    margin: -4px 0 14px;
    color: var(--tah-text-muted);
}
.tah-remember {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}
.tah-remember input { width: auto; margin: 0; }
#tah-forgot-link {
    color: var(--tah-secondary) !important;
    text-decoration: none;
    font-weight: 500;
}
#tah-forgot-link:hover { text-decoration: underline; }
#tah-forgot-form { text-align: left; }

/* Panel de avatar: divisor + logout */
.tah-profile-divider {
    height: 1px;
    background: var(--tah-border);
    margin: 18px 0 14px;
}
.tah-profile-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tah-text-muted) !important;
    font-size: .85rem;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--tah-radius-sm);
    border: 1px solid var(--tah-border);
    transition: all var(--tah-transition);
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    font-weight: 500;
}
.tah-profile-logout:hover {
    background: rgba(239,68,68,.1);
    color: #f87171 !important;
    border-color: rgba(239,68,68,.3);
}

/* Onboarding card */
.tah-onboarding-card {
    position: relative;
    background: linear-gradient(135deg, color-mix(in srgb, var(--tah-primary) 8%, transparent), color-mix(in srgb, var(--tah-secondary) 6%, transparent));
    border: 1px solid var(--tah-primary);
    border-radius: var(--tah-radius);
    padding: 20px 22px;
    margin: 14px 0;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--tah-primary) 12%, transparent);
}
.tah-onboarding-card h3 {
    margin: 0 0 8px;
    color: var(--tah-text);
    font-size: 1.05rem;
    font-weight: 700;
}
.tah-onboarding-card p {
    color: var(--tah-text-muted);
    font-size: .88rem;
    margin: 0 0 14px;
}
.tah-onboarding-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tah-onboarding-steps li {
    color: var(--tah-text);
    font-size: .87rem;
    line-height: 1.5;
    padding-left: 4px;
}
.tah-onboarding-steps strong { color: var(--tah-text); }
.tah-onboarding-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: var(--tah-text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: color var(--tah-transition);
}
.tah-onboarding-close:hover { color: var(--tah-text); }
.tah-onboarding-card .tah-btn-primary { width: auto; padding: 9px 22px; }

/* Mejorar focus visible global (a11y) */
.tah-form-group input:focus-visible,
.tah-form-group select:focus-visible,
.tah-btn-primary:focus-visible,
.tah-btn-secondary:focus-visible {
    outline: 2px solid var(--tah-secondary) !important;
    outline-offset: 2px;
}

/* Mobile tweaks para wizard */
@media (max-width: 480px) {
    .tah-step-label { display: none; }
    .tah-reg-benefits { padding: 10px 12px; }
    .tah-benefit { font-size: .78rem; }
    .tah-step-actions { flex-direction: column-reverse; }
    .tah-step-actions .tah-btn-secondary { width: 100%; }
}

/* ─────────────────────────────────────────────────────────────────────────
   v5.0.12 — Admin Dashboard (panel agencia con stats y tareas)
   ───────────────────────────────────────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════════════════════
   PANEL DE LA AGENCIA (v6.10 — reconstruido)

   Un solo patrón: cada métrica es una .tah-ad-card con su cifra y su barra, y
   el detalle vive siempre en la ventana emergente.

   Antes había cinco componentes para pintar lo mismo — .tah-ad-wallet-holders,
   .tah-ad-wallet-withdrawals, .tah-ad-ranking-table, .tah-ad-prize-list y
   .tah-ad-drill-list — más dos paletas conviviendo (la vieja de TikTok con
   #FE2C55/#25F4EE junto a la industrial del tema). Aquí todo pasa por
   .tah-ad-card y .tah-ad-list, y los colores salen de las variables.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Ancho completo de la pantalla.
   El panel se sirve por shortcode, así que nace dentro del contenedor del tema
   —que suele encajonarlo en 1200px o menos— y además tenía un max-width propio
   de 1400px. En un monitor de escritorio eso dejaba dos franjas negras a los
   lados y las tarjetas apretadas en el centro.
   El margen negativo simétrico saca el bloque de ese contenedor y lo lleva al
   ancho de la ventana; el padding vuelve a meter el aire por dentro, ahora
   proporcional al tamaño de pantalla. */
.tah-admin-dashboard {
    font-family: var(--tah-font);
    color: var(--tah-text);
    background: var(--tah-bg);
    min-height: 100vh;
    width: auto;
    max-width: none;
    margin-inline: calc(50% - 50vw);
    padding: 22px clamp(14px, 2.6vw, 46px) 60px;
}
body.tah-dashboard-page .tah-admin-dashboard { background: transparent; }
/* Ese 100vw incluye la barra de scroll vertical, así que sin esto el estirón
   provoca unos píxeles de scroll horizontal en toda la página. */
body.tah-admin-dashboard-page { overflow-x: hidden; }

/* Señal sutil mientras el panel se reemplaza. Sin spinner: el refresco tarda
   décimas y un spinner parpadeando cada minuto distrae más de lo que informa. */
.tah-admin-dashboard.is-refreshing #tah-ad-content { opacity: .55; transition: opacity .15s ease; }

/* ── Cabecera ───────────────────────────────────────────────────────────── */
.tah-ad-header {
    display: flex; flex-wrap: wrap; gap: 14px;
    align-items: center; justify-content: space-between;
    padding-bottom: 16px; margin-bottom: 20px;
    border-bottom: 1px solid var(--tah-border);
}
.tah-ad-header-info { display: flex; align-items: center; gap: 13px; }
.tah-ad-logo { width: 44px; height: 44px; border-radius: var(--tah-radius-sm); object-fit: cover; }
.tah-ad-header h1 {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    margin: 0; font-family: var(--tah-font-display);
    font-size: 1.35rem; font-weight: 700; color: var(--tah-text);
}
.tah-ad-header p { margin: 2px 0 0; font-size: .8rem; color: var(--tah-text-muted); }

/* Quién tiene la sesión abierta */
.tah-ad-whoami {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 3px 12px 3px 3px;
    background: var(--tah-bg-muted);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius-full);
    font-family: var(--tah-font);
    font-size: .78rem; font-weight: 600;
    color: var(--tah-text-muted);
    white-space: nowrap;
}
.tah-ad-whoami-av {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: block;
}
.tah-ad-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tah-ad-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius-sm);
    color: var(--tah-text);
    font-family: inherit; font-size: .8rem; font-weight: 600;
    text-decoration: none; cursor: pointer;
    transition: border-color var(--tah-transition), color var(--tah-transition);
}
.tah-ad-btn:hover { border-color: var(--tah-primary); color: var(--tah-primary); }
.tah-ad-btn:disabled { opacity: .6; cursor: default; }

/* ── Título de sección ──────────────────────────────────────────────────── */
.tah-ad-section-title {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    margin: 30px 0 12px;
    font-family: var(--tah-font-display);
    font-size: 1.02rem; font-weight: 700; color: var(--tah-text);
}
.tah-ad-section-count {
    font-family: var(--tah-font-mono);
    font-size: .68rem; font-weight: 500;
    letter-spacing: .04em;
    color: var(--tah-text-subtle);
    background: var(--tah-bg-muted);
    border-radius: var(--tah-radius-full);
    padding: 3px 9px;
}
.tah-ad-section-link {
    margin-left: auto;
    font-size: .76rem; font-weight: 600;
    color: var(--tah-secondary); text-decoration: none;
}
.tah-ad-section-link:hover { text-decoration: underline; }

/* ── Rejilla y tarjeta: el componente central del panel ─────────────────── */
/* Reparto sin huecos.
   Con `grid` + auto-fill, una sección de 4 tarjetas en un ancho donde caben 6
   dejaba dos columnas vacías al final: el bloque quedaba corto y desalineado
   respecto a la sección de 6. Flex reparte el sobrante entre las tarjetas que
   hay, así que TODA fila llena el ancho —incluida la última, que con grid es
   justo la que se queda coja. */
.tah-ad-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
}
.tah-ad-card {
    /* Crece para llenar, encoge si hace falta, y no baja de 230px: por debajo
       de eso la cifra y su etiqueta empiezan a partirse. */
    flex: 1 1 230px;
    position: relative;
    display: flex; flex-direction: column;
    padding: 14px 15px 15px;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    min-width: 0;
}
/* Una tarjeta sola no debe estirarse a lo ancho de un monitor entero. */
.tah-ad-grid > .tah-ad-card:only-child { max-width: 460px; }
.tah-ad-card-label {
    font-family: var(--tah-font-mono);
    font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--tah-text-subtle);
    margin-bottom: 5px;
}
.tah-ad-card-name {
    font-size: .82rem; font-weight: 600; line-height: 1.3;
    color: var(--tah-text-muted);
    margin-bottom: 7px;
}
.tah-ad-card-value {
    font-family: var(--tah-font-display);
    font-size: 1.68rem; font-weight: 700; line-height: 1.1;
    color: var(--tah-text);
    word-break: break-word;
}
.tah-ad-card-source {
    margin-top: 7px;
    font-size: .7rem; line-height: 1.4;
    color: var(--tah-text-subtle);
}
.tah-ad-card-detail {
    margin-top: 7px;
    font-size: .7rem; line-height: 1.55;
    color: var(--tah-text-muted);
}
.tah-ad-card-detail b    { color: var(--tah-text); }
.tah-ad-card-detail span { color: var(--tah-text-subtle); }
.tah-ad-warn-text        { color: var(--tah-warning); }

/* Barra de avance. Una sola en todo el panel. */
.tah-ad-bar {
    height: 5px; margin-top: 9px;
    border-radius: var(--tah-radius-full);
    background: var(--tah-bg-muted);
    overflow: hidden;
}
.tah-ad-bar > div {
    height: 100%; border-radius: inherit;
    transition: width .4s ease;
}

/* Mini-gráfica de serie mensual */
.tah-ad-spark { margin-top: 9px; height: 30px; }
.tah-ad-spark svg { width: 100%; height: 100%; display: block; }

/* Imagen del premio dentro de su tarjeta */
.tah-ad-prize-img {
    width: 100%; height: 84px;
    margin-top: 9px;
    object-fit: cover;
    border-radius: var(--tah-radius-sm);
    border: 1px solid var(--tah-border);
}
.tah-ad-prize-img.is-fallback {
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem;
    background: var(--tah-bg-muted);
}

/* ── Tarjeta clicable ───────────────────────────────────────────────────── */
.tah-ad-drill {
    cursor: pointer;
    transition: border-color var(--tah-transition), transform var(--tah-transition);
}
.tah-ad-drill:hover,
.tah-ad-drill:focus-visible { border-color: var(--tah-primary); transform: translateY(-2px); }
.tah-ad-drill:focus-visible { outline: 2px solid var(--tah-primary); outline-offset: 2px; }
.tah-ad-drill::after {
    content: '⤢';
    position: absolute; top: 9px; right: 11px;
    font-size: .72rem; color: var(--tah-text-subtle);
    opacity: 0; transition: opacity var(--tah-transition);
}
.tah-ad-drill:hover::after { opacity: 1; }

/* ── Notas, avisos y pies ───────────────────────────────────────────────── */
.tah-ad-note {
    background: rgba(255,255,255,.03);
    border: 1px dashed var(--tah-border);
    border-radius: var(--tah-radius-sm);
    padding: 16px;
    color: var(--tah-text-subtle);
    font-size: .8rem; line-height: 1.5;
    text-align: center;
}
.tah-ad-note a    { color: var(--tah-secondary); }
.tah-ad-note code {
    font-family: var(--tah-font-mono); font-size: .92em;
    background: var(--tah-bg-muted); padding: 1px 5px; border-radius: 4px;
}
.tah-ad-foot {
    margin: 9px 0 0;
    font-size: .7rem; line-height: 1.5;
    color: var(--tah-text-subtle);
}
.tah-ad-warning {
    display: flex; flex-wrap: wrap; gap: 12px;
    align-items: center; justify-content: space-between;
    margin-top: 14px; padding: 14px 16px;
    background: rgba(232,161,58,.08);
    border: 1px solid rgba(232,161,58,.35);
    border-radius: var(--tah-radius);
}
.tah-ad-warning strong { color: var(--tah-primary); font-size: .88rem; }
.tah-ad-warning p      { margin: 4px 0 0; font-size: .76rem; color: var(--tah-text-muted); }

/* ── Lista unificada: la usan la ventana de detalle y cualquier listado ─── */
.tah-ad-list { list-style: none; margin: 0; padding: 0; }
.tah-ad-list-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 0;
    border-top: 1px solid rgba(255,255,255,.06);
}
.tah-ad-list-item:first-child { border-top: none; }
.tah-ad-list-pos {
    flex: 0 0 auto; min-width: 32px;
    padding-top: 2px;
    font-family: var(--tah-font-mono);
    font-size: .72rem; color: var(--tah-text-subtle);
}
.tah-ad-list-main { flex: 1 1 auto; min-width: 0; }
.tah-ad-list-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.tah-ad-list-user {
    min-width: 0;
    font-size: .85rem; font-weight: 600; color: var(--tah-text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tah-ad-list-user small {
    display: block; font-weight: 400;
    font-size: .72rem; color: var(--tah-text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tah-ad-list-val {
    flex: 0 0 auto;
    font-family: var(--tah-font-mono);
    font-size: .82rem; font-weight: 700; color: var(--tah-text);
}
.tah-ad-list-meta {
    margin-top: 4px;
    font-size: .7rem; line-height: 1.4;
    color: var(--tah-text-subtle);
}

/* ── Ventana de detalle ─────────────────────────────────────────────────── */
.tah-ad-drill-modal {
    position: fixed; inset: 0; z-index: 999997;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.tah-ad-drill-modal[hidden] { display: none !important; }
.tah-ad-drill-overlay {
    position: absolute; inset: 0;
    background: rgba(4,7,11,.86);
    backdrop-filter: blur(4px);
}
.tah-ad-drill-box {
    position: relative; z-index: 1;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    padding: 20px 22px 22px;
    max-width: 720px; width: 100%;
    max-height: 88vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    animation: tahDrillIn .22s ease-out;
}
@keyframes tahDrillIn {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.tah-ad-drill-box h3 {
    margin: 0 0 3px; padding-right: 40px;
    font-family: var(--tah-font-display);
    font-size: 1.15rem; color: var(--tah-text);
}
.tah-ad-drill-sub { margin: 0 0 15px; font-size: .78rem; color: var(--tah-text-muted); }
.tah-ad-drill-close {
    position: absolute; top: 10px; right: 12px;
    background: transparent; border: none;
    color: var(--tah-text-muted);
    font-size: 1.7rem; line-height: 1; cursor: pointer;
    padding: 2px 9px; border-radius: 50%;
}
.tah-ad-drill-close:hover { background: rgba(255,255,255,.08); color: var(--tah-text); }
body.tah-ad-drill-locked { overflow: hidden; }

/* ── Tabla (solo la de managers, que tiene 9 columnas comparables) ──────── */
.tah-ad-table-wrap {
    overflow-x: auto;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
}
.tah-ad-table { width: 100%; border-collapse: collapse; font-size: .8rem; min-width: 720px; }
.tah-ad-table th {
    padding: 11px 12px; text-align: left;
    font-size: .68rem; font-weight: 600;
    letter-spacing: .04em;
    color: var(--tah-text-subtle);
    border-bottom: 1px solid var(--tah-border);
    white-space: nowrap;
}
/* Las 8 columnas de cifras van a la derecha (.tah-ad-num) y su título tiene que
   ir con ellas: alineado a la izquierda, el encabezado quedaba en un borde de la
   celda y el número en el otro, y con 8 columnas no se sabía cuál era cuál. */
.tah-ad-table th:not(:first-child) { text-align: right; }
.tah-ad-table td {
    padding: 10px 12px;
    border-top: 1px solid rgba(255,255,255,.05);
    color: var(--tah-text);
}
.tah-ad-num { text-align: right; font-family: var(--tah-font-mono); }
.tah-ad-table-empty { text-align: center; color: var(--tah-text-subtle); padding: 22px 12px !important; }

.tah-ad-mgr-periods { margin-left: auto; display: inline-flex; gap: 4px; }
.tah-ad-mgr-pbtn {
    padding: 4px 11px;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius-full);
    color: var(--tah-text-muted);
    font-family: inherit; font-size: .72rem; font-weight: 600;
    cursor: pointer;
    transition: all var(--tah-transition);
}
.tah-ad-mgr-pbtn:hover      { border-color: var(--tah-primary); color: var(--tah-text); }
.tah-ad-mgr-pbtn.is-active  { background: var(--tah-primary); border-color: var(--tah-primary); color: #1a1206; }
.tah-ad-mgr-user   { display: flex; align-items: center; gap: 9px; }
.tah-ad-mgr-avatar { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; }
.tah-ad-mgr-user strong { display: block; font-size: .82rem; color: var(--tah-text); }
.tah-ad-mgr-user small  { display: block; font-size: .68rem; color: var(--tah-text-subtle); }

/* ── Responsive ─────────────────────────────────────────────────────────────
   El panel ocupa el ancho de la ventana en cualquier tamaño; lo que cambia por
   tramo es cuántas tarjetas caben antes de saltar de fila (lo decide el
   flex-basis) y cuánto aire llevan por dentro. */

/* Monitores anchos: se permite una tarjeta más generosa para que 4 no queden
   estiradas de forma exagerada en 2560px. */
@media (min-width: 1800px) {
    .tah-ad-card       { flex-basis: 290px; }
    .tah-ad-card-value { font-size: 1.85rem; }
    .tah-ad-grid       { gap: 14px; }
}

/* Portátil / escritorio pequeño */
@media (max-width: 1180px) {
    .tah-ad-card { flex-basis: 210px; }
}

/* Tableta */
@media (max-width: 900px) {
    .tah-admin-dashboard { padding: 18px clamp(12px, 2.4vw, 22px) 54px; }
    .tah-ad-card         { flex-basis: 190px; }
    .tah-ad-card-value   { font-size: 1.5rem; }
}

/* Móvil: dos columnas fijas. Aquí el reparto elástico no ayuda —una fila de
   tres tarjetas de 110px es ilegible—, así que se fija el ancho a la mitad
   descontando el hueco. */
@media (max-width: 720px) {
    .tah-admin-dashboard { padding: 14px 12px 50px; }
    .tah-ad-header       { gap: 10px; }
    .tah-ad-header h1    { font-size: 1.12rem; gap: 8px; }
    .tah-ad-whoami       { font-size: .72rem; padding: 2px 10px 2px 2px; }
    .tah-ad-whoami-av    { width: 20px; height: 20px; }
    .tah-ad-header-actions { width: 100%; }
    .tah-ad-header-actions .tah-ad-btn { flex: 1 1 auto; justify-content: center; }

    .tah-ad-grid       { gap: 9px; }
    .tah-ad-card       { flex: 1 1 calc(50% - 5px); }
    .tah-ad-card       { padding: 12px 12px 13px; }
    .tah-ad-card-value { font-size: 1.32rem; }
    .tah-ad-card-name  { font-size: .76rem; }
    .tah-ad-grid > .tah-ad-card:only-child { max-width: none; }

    /* En táctil no hay hover: la señal de "se puede abrir" va siempre visible */
    .tah-ad-drill::after { opacity: .55; }

    .tah-ad-drill-modal { padding: 0; }
    .tah-ad-drill-box {
        max-width: 100vw; width: 100vw;
        max-height: 100dvh; min-height: 100dvh;
        border-radius: 0; border: none;
        padding: max(16px, env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
    }
}

/* Móviles estrechos: una sola columna, o la cifra no cabe */
@media (max-width: 400px) {
    .tah-ad-card       { flex: 1 1 100%; }
    .tah-ad-card-value { font-size: 1.42rem; }
}

/* ─── SD Coin Wallet ──────────────────────────────────────────────────────── */
/* Botón en el header del dashboard */
.tah-wallet-trigger {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 10px;
    margin-left: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255,193,7,.18), rgba(232,161,58,.18)) !important;
    border: 1px solid rgba(255,193,7,.45) !important;
    color: #fde68a !important;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--tah-transition), background var(--tah-transition), box-shadow var(--tah-transition);
    box-shadow: 0 2px 10px rgba(232,161,58,.18);
}
.tah-wallet-trigger:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(255,193,7,.28), rgba(232,161,58,.28)) !important;
    box-shadow: 0 4px 16px rgba(232,161,58,.3);
}
.tah-wallet-trigger-icon { font-size: 1rem; line-height: 1; }
.tah-wallet-trigger-amount { font-variant-numeric: tabular-nums; color: #fff7d6; }
.tah-wallet-trigger-code   { font-size: .68rem; opacity: .85; letter-spacing: .04em; }

/* Modal overlay + card */
.tah-wallet-modal {
    position: fixed; inset: 0; z-index: 100001;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.tah-wallet-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}
.tah-wallet-modal-card {
    position: relative; z-index: 1;
    width: min(460px, 96vw);
    max-height: 92vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #1c1917 0%, #0d0908 100%);
    border: 1px solid rgba(255,193,7,.25);
    border-radius: 20px;
    padding: 24px 22px 20px;
    color: var(--tah-text);
    box-shadow: 0 28px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,193,7,.12);
    animation: tah-wallet-pop .25s ease-out;
}
@keyframes tah-wallet-pop {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.tah-wallet-modal-close {
    position: absolute; top: 10px; right: 14px;
    background: rgba(255,255,255,.06) !important;
    border: none !important;
    color: var(--tah-text-subtle) !important;
    font-size: 1.5rem; line-height: 1;
    cursor: pointer; padding: 2px 10px 4px;
    border-radius: 50%;
    transition: background var(--tah-transition), color var(--tah-transition);
}
.tah-wallet-modal-close:hover {
    background: rgba(255,255,255,.14) !important;
    color: #fff !important;
}

/* Hero / saldo grande */
.tah-wallet-hero {
    text-align: center;
    padding: 6px 0 18px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    margin-bottom: 14px;
}
.tah-wallet-hero-coin {
    font-size: 2.6rem;
    line-height: 1;
    margin-bottom: 6px;
    filter: drop-shadow(0 4px 12px rgba(232,161,58,.4));
    animation: tah-wallet-spin 3.5s ease-in-out infinite;
    display: inline-block;
}
@keyframes tah-wallet-spin {
    0%, 100% { transform: rotateY(0deg); }
    50%      { transform: rotateY(180deg); }
}
.tah-wallet-hero-title {
    margin: 4px 0 2px;
    font-size: 1.05rem;
    color: var(--tah-text);
    font-weight: 700;
}
.tah-wallet-hero-subtitle {
    margin: 0 0 14px;
    color: var(--tah-text-subtle);
    font-size: .78rem;
}
.tah-wallet-hero-balance {
    display: inline-flex; align-items: baseline; gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(255,193,7,.12), rgba(232,161,58,.12));
    border: 1px solid rgba(255,193,7,.3);
    border-radius: 14px;
    margin-bottom: 8px;
}
.tah-wallet-hero-amount {
    font-size: 2.1rem;
    font-weight: 800;
    color: #fde68a;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.tah-wallet-hero-code {
    font-size: .85rem;
    color: #fbbf24;
    letter-spacing: .06em;
    font-weight: 700;
}
.tah-wallet-hero-rate {
    margin: 0;
    color: var(--tah-text-subtle);
    font-size: .72rem;
}
.tah-wallet-hero-usd {
    margin: 4px 0 4px;
    color: #4ade80;
    font-size: .92rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}

/* Stats row */
.tah-wallet-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.tah-wallet-stat {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex; flex-direction: column; gap: 2px;
}
.tah-wallet-stat-label {
    font-size: .68rem;
    color: var(--tah-text-subtle);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.tah-wallet-stat-value {
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.tah-wallet-stat-earn  { color: #22c55e; }
.tah-wallet-stat-spent { color: #f59e0b; }

/* History */
.tah-wallet-history {
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    padding: 12px 4px 6px 14px;
}
.tah-wallet-history-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.tah-wallet-history-header h4 {
    margin: 0; font-size: .85rem; color: var(--tah-text);
    font-weight: 700; letter-spacing: .02em;
}
.tah-wallet-history-refresh {
    background: rgba(255,255,255,.06) !important;
    border: none !important;
    color: var(--tah-text-muted) !important;
    border-radius: 50%;
    width: 28px; height: 28px;
    line-height: 1;
    cursor: pointer; font-size: 1rem;
    transition: transform .3s ease, color var(--tah-transition);
}
.tah-wallet-history-refresh:hover {
    color: #fff !important;
    transform: rotate(90deg);
}
.tah-wallet-history-body {
    max-height: 240px;
    overflow-y: auto;
    padding-right: 8px;
}
.tah-wallet-history-body::-webkit-scrollbar { width: 4px; }
.tah-wallet-history-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.15);
    border-radius: 4px;
}
.tah-wallet-history-loading,
.tah-wallet-history-empty {
    color: var(--tah-text-subtle);
    font-size: .78rem;
    padding: 18px 6px;
    text-align: center;
    font-style: italic;
}
.tah-wallet-tx {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.tah-wallet-tx:last-child { border-bottom: none; }
.tah-wallet-tx-icon {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    flex-shrink: 0;
}
.tah-wallet-tx-credit .tah-wallet-tx-icon {
    background: rgba(34,197,94,.15);
    color: #4ade80;
}
.tah-wallet-tx-debit .tah-wallet-tx-icon {
    background: rgba(245,158,11,.15);
    color: #fbbf24;
}
.tah-wallet-tx-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 1px;
}
.tah-wallet-tx-title {
    font-size: .82rem;
    color: var(--tah-text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tah-wallet-tx-meta {
    font-size: .68rem;
    color: var(--tah-text-subtle);
}
.tah-wallet-tx-amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: .92rem;
    text-align: right;
    flex-shrink: 0;
}
.tah-wallet-tx-credit .tah-wallet-tx-amount { color: #4ade80; }
.tah-wallet-tx-debit  .tah-wallet-tx-amount { color: #fbbf24; }

.tah-wallet-footer-note {
    margin: 14px 0 0;
    padding: 10px 12px;
    background: rgba(255,255,255,.03);
    border-radius: 10px;
    font-size: .72rem;
    color: var(--tah-text-subtle);
    text-align: center;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .tah-wallet-trigger-code { display: none; }
    .tah-wallet-hero-amount  { font-size: 1.8rem; }
}

/* ── Wallet action buttons (transferir / mi cuenta) ────────────────────── */
.tah-wallet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.tah-wallet-action-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: .88rem;
    font-weight: 700;
    border: none !important;
    cursor: pointer;
    transition: transform var(--tah-transition), box-shadow var(--tah-transition);
    line-height: 1.1;
}
.tah-wallet-action-btn:hover { transform: translateY(-1px); }
.tah-wallet-action-transfer {
    background: linear-gradient(135deg, #E8A13A 0%, #C77A1E 100%) !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(232,161,58,.32);
}
.tah-wallet-action-transfer:hover {
    box-shadow: 0 8px 26px rgba(232,161,58,.45);
}
.tah-wallet-action-bank {
    background: rgba(255,255,255,.06) !important;
    color: #fafaf9 !important;
    border: 1px solid rgba(255,255,255,.1) !important;
}
.tah-wallet-action-bank:hover {
    background: rgba(255,255,255,.1) !important;
}

/* ── Transferencia / formularios ────────────────────────────────────────── */
.tah-transfer-card {
    width: min(560px, 96vw);
}
.tah-bank-card {
    width: min(520px, 96vw);
}
.tah-transfer-help {
    margin: 0 0 14px;
    color: var(--tah-text-muted);
    font-size: .84rem;
    line-height: 1.5;
}
.tah-transfer-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
.tah-transfer-summary > div {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex; flex-direction: column;
    gap: 2px;
}
.tah-transfer-sum-label {
    font-size: .68rem;
    color: var(--tah-text-subtle);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.tah-transfer-sum-value {
    font-size: 1rem;
    color: #fafaf9;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tah-transfer-section {
    margin: 14px 0 10px;
    font-size: .8rem;
    color: var(--tah-text);
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding-bottom: 6px;
}

.tah-transfer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 12px;
}
.tah-transfer-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tah-transfer-field--full {
    grid-column: 1 / -1;
}
.tah-transfer-field label {
    font-size: .72rem;
    color: var(--tah-text-muted);
    font-weight: 600;
    letter-spacing: .02em;
}
.tah-transfer-field input,
.tah-transfer-field select {
    background: rgba(255,255,255,.04) !important;
    border: 1px solid rgba(255,255,255,.1) !important;
    border-radius: 8px;
    padding: 9px 11px;
    color: #fafaf9 !important;
    font-size: .88rem;
    transition: border-color var(--tah-transition), background var(--tah-transition);
    outline: none;
    width: 100%;
}
.tah-transfer-field input:focus,
.tah-transfer-field select:focus {
    border-color: #E8A13A !important;
    background: rgba(255,255,255,.06) !important;
}
.tah-transfer-field input::placeholder { color: var(--tah-text-subtle); }

/* Forzar fondo oscuro y texto claro en las opciones del dropdown.
   Firefox y algunos navegadores ignoran el estilo del <select> en los <option>. */
.tah-transfer-field select option,
.tah-transfer-field select optgroup,
#tah-transfer-modal select option,
#tah-bank-modal select option {
    background-color: #1c1917 !important;
    color: #fafaf9 !important;
}
.tah-transfer-field select option:hover,
.tah-transfer-field select option:checked,
#tah-transfer-modal select option:checked,
#tah-bank-modal select option:checked {
    background-color: #E8A13A !important;
    color: #fff !important;
}
/* Datalist (autocomplete del banco) en algunos navegadores */
input[list]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .5; }

/* Hint debajo del campo de banco */
.tah-bank-hint {
    font-size: .68rem;
    color: var(--tah-text-subtle);
    opacity: .75;
    margin-top: 2px;
}

/* ── Tarjeta resumen de cuenta bancaria en modal Transferir ─────────────── */
.tah-bank-summary {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: background var(--tah-transition);
}
.tah-bank-summary.is-set {
    background: rgba(34,197,94,.06);
    border: 1px solid rgba(34,197,94,.25);
}
.tah-bank-summary.is-empty {
    background: rgba(245,158,11,.08);
    border: 1px solid rgba(245,158,11,.35);
}
.tah-bank-summary-icon {
    font-size: 1.6rem;
    line-height: 1;
    margin-top: 2px;
    flex-shrink: 0;
}
.tah-bank-summary-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.tah-bank-summary-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tah-bank-summary-row strong {
    font-size: .92rem;
    color: #fafaf9;
    font-weight: 700;
}
.tah-bank-summary-row span {
    font-size: .7rem;
    color: var(--tah-text-muted);
    background: rgba(255,255,255,.06);
    padding: 1px 8px;
    border-radius: 999px;
}
.tah-bank-summary-account {
    font-size: .82rem;
    color: #86efac;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    letter-spacing: .02em;
}
.tah-bank-summary-holder {
    font-size: .78rem;
    color: var(--tah-text-muted);
}
.tah-bank-summary-country {
    font-size: .68rem;
    color: var(--tah-text-subtle);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: 2px;
}
.tah-bank-summary-edit {
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    color: #fafaf9 !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-size: .74rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    flex-shrink: 0;
    transition: background var(--tah-transition), border-color var(--tah-transition);
}
.tah-bank-summary-edit:hover {
    background: rgba(255,255,255,.12) !important;
    border-color: rgba(255,255,255,.25) !important;
}

/* Estado: cuenta vacía */
.tah-bank-summary-empty {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}
.tah-bank-summary-empty-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-top: 2px;
    flex-shrink: 0;
}
.tah-bank-summary-empty strong {
    display: block;
    color: #fbbf24;
    font-size: .92rem;
    margin-bottom: 4px;
}
.tah-bank-summary-empty p {
    margin: 0 0 10px;
    color: var(--tah-text-muted);
    font-size: .78rem;
    line-height: 1.5;
}
.tah-bank-summary-cta {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #fff !important;
    border: none !important;
    padding: 9px 14px !important;
    border-radius: 8px !important;
    font-size: .82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(245,158,11,.3);
    transition: transform var(--tah-transition), box-shadow var(--tah-transition);
}
.tah-bank-summary-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245,158,11,.45);
}

/* La sección Wallet del panel usaba .tah-ad-wallet-* : cuatro tarjetas propias
   más dos paneles de listas (Top 5 saldos y Retiros recientes) que repetían lo
   que ya muestra la ventana de detalle. Ahora usa .tah-ad-card como el resto
   del panel, así que ese bloque se eliminó entero. */

.tah-transfer-equiv {
    margin-top: 4px;
    padding: 8px 10px;
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.2);
    border-radius: 8px;
    font-size: .78rem;
    color: #86efac;
    font-variant-numeric: tabular-nums;
}

/* Desglose de transferencia: bruto - GAS = neto */
.tah-transfer-breakdown {
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
}
.tah-transfer-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    color: var(--tah-text-muted);
}
.tah-transfer-breakdown-row small { opacity: .55; }
.tah-transfer-breakdown-gas {
    color: #fbbf24;
    border-bottom: 1px dashed rgba(255,255,255,.08);
    padding-bottom: 6px;
}
.tah-transfer-breakdown-net {
    color: #86efac;
    margin-top: 6px;
    padding-top: 8px;
    font-size: .95rem;
}
.tah-transfer-breakdown-net strong {
    font-size: 1rem;
}

.tah-transfer-save {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 8px;
    font-size: .82rem;
    color: var(--tah-text-muted);
    cursor: pointer;
}
.tah-transfer-save input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: #E8A13A;
}

.tah-transfer-trm-note {
    background: rgba(59,130,246,.08);
    border: 1px solid rgba(59,130,246,.2);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .74rem;
    color: #93c5fd;
    margin-bottom: 12px;
    line-height: 1.45;
}

.tah-transfer-buttons {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.tah-transfer-submit {
    flex: 1;
    background: linear-gradient(135deg, #E8A13A, #C77A1E) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--tah-transition), box-shadow var(--tah-transition), opacity var(--tah-transition);
    box-shadow: 0 6px 18px rgba(232,161,58,.3);
}
.tah-transfer-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(232,161,58,.45);
}
.tah-transfer-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
}
.tah-transfer-cancel {
    background: rgba(255,255,255,.06) !important;
    color: var(--tah-text-muted) !important;
    border: 1px solid rgba(255,255,255,.1) !important;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: .88rem;
}
.tah-transfer-cancel:hover {
    background: rgba(255,255,255,.1) !important;
    color: #fafaf9 !important;
}

.tah-transfer-response {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: .82rem;
    line-height: 1.5;
    display: none;
}
.tah-transfer-response.show { display: block; }
.tah-transfer-response.is-ok {
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(34,197,94,.3);
    color: #86efac;
}
.tah-transfer-response.is-err {
    background: rgba(239,68,68,.12);
    border: 1px solid rgba(239,68,68,.3);
    color: #fca5a5;
}

@media (max-width: 520px) {
    .tah-wallet-actions { grid-template-columns: 1fr; }
    .tah-transfer-grid  { grid-template-columns: 1fr; }
    .tah-transfer-summary { grid-template-columns: 1fr; }
}

/* ============================================================
   📬 BANDEJA DE MENSAJES DEL CREADOR (v5.17)
   Botón campana en header + modal con lista personal/general.
   ============================================================ */
.tah-inbox-trigger,
.tah-refresh-trigger {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    margin-left: 8px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.04);
    border-radius: 50%;
    cursor: pointer;
    transition: all .15s ease;
}
.tah-inbox-trigger:hover {
    background: rgba(224,87,74,.18);
    border-color: rgba(224,87,74,.45);
    transform: translateY(-1px);
}
.tah-refresh-trigger:hover {
    background: rgba(47,180,217,.18);
    border-color: rgba(47,180,217,.45);
    transform: translateY(-1px);
}
.tah-refresh-icon { font-size: 1.1rem; line-height: 1; display: inline-block; }
.tah-refresh-trigger.is-spinning .tah-refresh-icon { animation: tah-refresh-spin .6s linear; }
@keyframes tah-refresh-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.tah-inbox-icon { font-size: 1.1rem; line-height: 1; }
.tah-inbox-badge {
    position: absolute; top: -4px; right: -4px;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: #ef4444; color: #fff;
    border: 2px solid #080B10;
    border-radius: 999px;
    font-size: .68rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

.tah-inbox-modal {
    position: fixed; inset: 0; z-index: 100001;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.tah-inbox-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.72); backdrop-filter: blur(6px);
}
.tah-inbox-modal-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 540px; max-height: 85vh;
    background: #0d1414; border: 1px solid rgba(255,255,255,.18);
    border-radius: 16px; padding: 22px 22px 18px;
    overflow-y: auto; color: #fafaf9;
    box-shadow: 0 18px 60px rgba(0,0,0,.6);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.tah-inbox-modal-close {
    position: absolute; top: 12px; right: 14px;
    width: 32px; height: 32px;
    border: 1px solid rgba(255,255,255,.18); border-radius: 50%;
    background: #121b1b; color: #fff;
    font-size: 20px; line-height: 1; cursor: pointer;
}
.tah-inbox-modal-close:hover { background: #ef4444; }

.tah-inbox-head {
    display: flex; justify-content: space-between; align-items: center;
    padding-right: 44px; padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.10);
    margin-bottom: 12px;
}
.tah-inbox-head h3 { margin: 0; font-size: 16px; }
.tah-inbox-mark-all {
    background: transparent; border: 1px solid rgba(255,255,255,.18);
    color: #a8a29e; padding: 5px 10px; border-radius: 7px;
    font-size: 11px; cursor: pointer; font-family: inherit;
}
.tah-inbox-mark-all:hover { color: #fff; border-color: #22d3ee; }

.tah-inbox-filters {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
}
.tah-inbox-filter {
    padding: 5px 11px; font-size: 11px; font-weight: 600;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
    border-radius: 999px; color: #a8a29e; cursor: pointer;
    font-family: inherit;
}
.tah-inbox-filter:hover { color: #fff; }
.tah-inbox-filter.is-active {
    background: #E8A13A; border-color: #E8A13A; color: #fff;
}

.tah-inbox-list { display: flex; flex-direction: column; gap: 8px; }
.tah-inbox-loading,
.tah-inbox-empty {
    padding: 30px; text-align: center;
    color: #a8a29e; font-size: 13px;
}

.tah-inbox-item {
    padding: 12px 14px; border-radius: 10px;
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
    cursor: pointer; transition: all .15s ease;
}
.tah-inbox-item:hover { background: rgba(255,255,255,.06); }
.tah-inbox-item.is-unread {
    background: rgba(47,180,217,.06);
    border-left: 3px solid #22d3ee;
}

.tah-inbox-item-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 8px; margin-bottom: 4px;
}
.tah-inbox-item-title { font-size: 14px; font-weight: 600; color: #fff; }
.tah-inbox-item.is-unread .tah-inbox-item-title { color: #22d3ee; }
.tah-inbox-item-date { font-size: 11px; color: #78716c; white-space: nowrap; }
.tah-inbox-item-body {
    margin: 0 0 6px; font-size: 12px; color: #d6d3d1; line-height: 1.45;
    word-wrap: break-word;
}
.tah-inbox-item-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tah-inbox-tag {
    font-size: 10px; padding: 2px 8px; border-radius: 999px;
    background: rgba(255,255,255,.06); color: #a8a29e;
    border: 1px solid rgba(255,255,255,.10);
}
.tah-inbox-tag.is-personal { background: rgba(47,180,217,.12); color: #22d3ee; border-color: rgba(47,180,217,.30); }
.tah-inbox-tag.is-general  { background: rgba(168,162,158,.10); color: #a8a29e; }
.tah-inbox-tag.is-unread   { background: rgba(239,68,68,.15); color: #fca5a5; border-color: rgba(239,68,68,.30); }

/* ============================================================
   📬 BANDEJA · Modal de DETALLE (mensaje completo)
   Se abre encima del modal de bandeja al tocar una notificación.
   ============================================================ */
.tah-inbox-detail-modal {
    position: fixed; inset: 0; z-index: 100002;  /* encima del modal de bandeja (100001) */
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.tah-inbox-detail-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.82); backdrop-filter: blur(8px);
}
.tah-inbox-detail-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 480px; max-height: 80vh;
    background: #0d1414; border: 1px solid rgba(255,255,255,.18);
    border-radius: 16px; padding: 28px 24px 22px;
    overflow-y: auto; color: #fafaf9;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: tah-inbox-pop .25s ease;
}
@keyframes tah-inbox-pop {
    from { opacity: 0; transform: scale(.94) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.tah-inbox-detail-close {
    position: absolute; top: 14px; right: 16px;
    width: 32px; height: 32px;
    border: 1px solid rgba(255,255,255,.20); border-radius: 50%;
    background: #121b1b; color: #fff;
    font-size: 20px; line-height: 1; cursor: pointer;
    transition: all .15s ease;
}
.tah-inbox-detail-close:hover {
    background: #ef4444; border-color: #ef4444;
    transform: scale(1.05);
}

.tah-inbox-detail-tags {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px;
    padding-right: 44px;  /* espacio para el botón de cerrar */
}
.tah-inbox-detail-title {
    margin: 0 0 8px;
    font-size: 19px; font-weight: 700; color: #fff !important;
    padding-right: 44px;
    line-height: 1.3;
    word-wrap: break-word;
}
.tah-inbox-detail-date {
    font-size: 12px; color: #a8a29e; margin-bottom: 16px;
}
.tah-inbox-detail-body {
    font-size: 15px; line-height: 1.55; color: #e7e5e4 !important;
    padding: 16px 18px;
    background: rgba(255,255,255,.04);
    border-left: 3px solid #22d3ee;
    border-radius: 8px;
    margin-bottom: 18px;
    white-space: pre-wrap; word-wrap: break-word;
}
.tah-inbox-detail-body:empty { display: none; }
.tah-inbox-detail-actions {
    display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
}
.tah-inbox-detail-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 9px;
    font-size: 13px; font-weight: 600;
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
    transition: all .15s ease;
    font-family: inherit;
}
.tah-inbox-detail-btn-primary {
    background: #E8A13A; color: #fff;
}
.tah-inbox-detail-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.tah-inbox-detail-btn-ghost {
    background: transparent; color: #a8a29e;
    border-color: rgba(255,255,255,.18);
}
.tah-inbox-detail-btn-ghost:hover { color: #fff; border-color: #a8a29e; }

/* ============================================================
   🧑‍💼 GESTIÓN POR MANAGER (admin-dashboard)
   ============================================================ */
.tah-ad-mgr-period-toggle .tah-ad-mgr-pbtn {
    padding: 5px 12px; font-size: 12px; font-weight: 600;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
    color: #a8a29e; border-radius: 999px;
    cursor: pointer; font-family: inherit; transition: all .15s ease;
}
.tah-ad-mgr-period-toggle .tah-ad-mgr-pbtn:hover { color: #fff; border-color: rgba(255,255,255,.25); }
.tah-ad-mgr-period-toggle .tah-ad-mgr-pbtn.is-active {
    background: #E8A13A; border-color: #E8A13A; color: #fff;
}

.tah-ad-mgr-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.tah-ad-mgr-total-card {
    padding: 12px 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;
}
.tah-ad-mgr-total-lbl {
    font-size: 11px; color: #a8a29e;
    text-transform: uppercase; letter-spacing: .04em;
}
.tah-ad-mgr-total-val {
    font-size: 22px; font-weight: 800; color: #fafaf9 !important;
    margin-top: 4px; font-variant-numeric: tabular-nums;
}

.tah-ad-mgr-table-wrap {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    overflow: hidden; overflow-x: auto;
    margin-bottom: 20px;
}
.tah-ad-mgr-table { width: 100%; border-collapse: collapse; font-size: 13px; color: #fafaf9; }
.tah-ad-mgr-table thead th {
    text-align: left; padding: 12px 14px;
    background: rgba(255,255,255,.05);
    color: #a8a29e; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 1px solid rgba(255,255,255,.10);
}
.tah-ad-mgr-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    color: #fafaf9 !important;
}
.tah-ad-mgr-table tbody tr:last-child td { border-bottom: none; }
.tah-ad-mgr-table tbody tr:hover { background: rgba(255,255,255,.04); }
.tah-ad-mgr-table .tah-ad-mgr-num {
    text-align: right; font-variant-numeric: tabular-nums;
}
.tah-ad-mgr-empty { text-align: center; color: #a8a29e !important; padding: 24px !important; }

.tah-ad-mgr-user { display: flex; align-items: center; gap: 10px; }
.tah-ad-mgr-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.tah-ad-mgr-user strong { display: block; font-weight: 600; }
.tah-ad-mgr-user small { display: block; color: #78716c; font-size: 11px; }

/* ============================================================
   🔔 BANNER OBLIGATORIO · Activar notificaciones PWA
   Aparece en el dashboard del creador si NO tiene suscripción activa.
   ============================================================ */
.tah-push-mandatory-banner {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; margin: 12px 0 18px;
    background: linear-gradient(135deg, rgba(232,161,58,.20) 0%, rgba(232,161,58,.05) 100%);
    border: 1px solid rgba(232,161,58,.45);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(232,161,58,.16);
    animation: tah-push-pulse 2.5s ease-in-out infinite;
}
@keyframes tah-push-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(232,161,58,.16); }
    50%      { box-shadow: 0 4px 24px rgba(232,161,58,.30); }
}
.tah-push-mandatory-icon {
    font-size: 32px; line-height: 1;
    flex-shrink: 0;
}
.tah-push-mandatory-text {
    flex: 1; min-width: 0;
    color: #fafaf9;
}
.tah-push-mandatory-text strong {
    display: block; font-size: 14px; font-weight: 700;
    margin-bottom: 2px; color: #fff !important;
}
.tah-push-mandatory-text span {
    display: block; font-size: 12px; color: #d6d3d1 !important;
    line-height: 1.4;
}
.tah-push-mandatory-cta {
    flex-shrink: 0;
    padding: 10px 18px;
    background: #fff; color: #C77A1E !important;
    border: none; border-radius: 999px;
    font-size: 13px; font-weight: 700;
    cursor: pointer; font-family: inherit;
    transition: all .15s ease;
    white-space: nowrap;
}
.tah-push-mandatory-cta:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(255,255,255,.25);
}
@media (max-width: 560px) {
    .tah-push-mandatory-banner { flex-direction: column; text-align: center; padding: 14px; }
    .tah-push-mandatory-cta    { width: 100%; }
}

/* ============================================================
   🔴 LIVE — Botón header + Modal stream en tiempo real (v5.20)
   ============================================================ */

/* Botón LIVE en el header */
.tah-live-trigger {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px 7px 12px;
    margin-left: 8px;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff !important;
    border-radius: 999px;
    font-size: .85rem; font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(239,68,68,.7);
    animation: tah-live-pulse-shadow 1.8s ease-in-out infinite;
    transition: transform .15s ease;
    font-family: inherit;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.tah-live-trigger:hover { transform: translateY(-1px) scale(1.03); }
@keyframes tah-live-pulse-shadow {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
    70%  { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.tah-live-pulse {
    width: 10px; height: 10px; border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px rgba(255,255,255,.9);
    animation: tah-live-blink 1.2s ease-in-out infinite;
}
@keyframes tah-live-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .4; transform: scale(.8); }
}
.tah-live-label { letter-spacing: .08em; }
.tah-live-viewers {
    padding: 2px 8px; background: rgba(0,0,0,.30);
    border-radius: 999px; font-size: .72rem; font-weight: 700;
}

/* Botón "Iniciar Live" (antes de transmitir) */
.tah-live-start-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    margin-left: 8px;
    background: linear-gradient(135deg, #E0574A, #c23f34);
    border: 1px solid rgba(224,87,74,.5);
    color: #fff !important;
    border-radius: 999px;
    font-size: .85rem; font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(224,87,74,.28);
    transition: all .15s ease;
    font-family: inherit;
}
.tah-live-start-btn:hover {
    background: linear-gradient(135deg, #e86a5e, #d0473b);
    transform: translateY(-1px);
}
.tah-live-start-btn:disabled {
    opacity: .5; cursor: wait;
}

/* Botón "Terminar Live" (cuando hay sesión activa) */
.tah-live-stop-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    margin-left: 8px;
    background: rgba(120,113,108,.20);
    border: 1px solid rgba(255,255,255,.20);
    color: #fff !important;
    border-radius: 999px;
    font-size: .82rem; font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
}
.tah-live-stop-btn:hover { background: rgba(120,113,108,.35); }

/* Botón "ARENA" — acceso al entrenador de batallas PK.
   Gradiente oro→rosa (paleta del arena) para diferenciarlo del "Iniciar Live".
   color/text-decoration con !important y especificidad de clase para ganarle a
   la regla global "a { color:#E8A13A !important }" que inyecta el dashboard. */
.tah-arena-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    margin-left: 8px;
    background: linear-gradient(135deg, rgba(232,161,58,.22), rgba(232,161,58,.06));
    border: 1px solid rgba(232,161,58,.55);
    color: #fff !important;
    border-radius: 999px;
    font-size: .85rem; font-weight: 800; letter-spacing: .5px;
    text-decoration: none !important;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
    white-space: nowrap;
}
.tah-arena-btn:hover {
    background: linear-gradient(135deg, rgba(232,161,58,.36), rgba(232,161,58,.12));
    transform: translateY(-1px);
    color: #fff !important;
}

/* Modal del live */
.tah-live-modal {
    position: fixed; inset: 0; z-index: 100003;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    overscroll-behavior: contain; /* el gesto no se propaga al fondo */
}
.tah-live-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.85); backdrop-filter: blur(8px);
}
.tah-live-modal-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 1100px; max-height: 92vh;
    background: #0d1414; border: 1px solid rgba(239,68,68,.40);
    border-radius: 16px; padding: 18px 20px 16px;
    color: #fafaf9 !important;
    box-shadow: 0 0 60px rgba(239,68,68,.25), 0 24px 80px rgba(0,0,0,.7);
    overflow: hidden;
    display: flex; flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.tah-live-modal-close {
    position: absolute; top: 12px; right: 14px; z-index: 10;
    width: 32px; height: 32px;
    border: 1px solid rgba(255,255,255,.20); border-radius: 50%;
    background: #121b1b; color: #fff;
    font-size: 20px; line-height: 1; cursor: pointer;
}
.tah-live-modal-close:hover { background: #ef4444; border-color: #ef4444; }

.tah-live-modal-head {
    display: flex; justify-content: space-between; align-items: center;
    padding-right: 44px; padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.10);
    margin-bottom: 14px;
    flex-wrap: wrap; gap: 8px;
}
.tah-live-modal-title-wrap { display: flex; align-items: center; gap: 10px; }
.tah-live-modal-title-wrap h3 {
    margin: 0; font-size: 17px; font-weight: 700;
    color: #fff !important;
}
.tah-live-modal-duration {
    padding: 3px 10px; background: rgba(255,255,255,.06);
    border-radius: 999px;
    font-size: 11px; color: #a8a29e; font-variant-numeric: tabular-nums;
}
.tah-live-modal-status { font-size: 12px; color: #22c55e; font-weight: 600; }
.tah-live-modal-status.is-disconnected { color: #ef4444; }
.tah-live-modal-status.is-ended { color: #a8a29e; }
.tah-live-modal-lastpoll {
    font-size: 10px; color: #6b7280;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    margin-left: auto;
}
.tah-live-modal-lastpoll:empty { display: none; }

/* Stats grid */
.tah-live-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.tah-live-stat {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;
}
.tah-live-stat-icon { font-size: 20px; }
.tah-live-stat-label { font-size: 10px; color: #a8a29e; text-transform: uppercase; letter-spacing: .04em; }
.tah-live-stat-value {
    font-size: 18px; font-weight: 800; color: #fff !important;
    font-variant-numeric: tabular-nums;
    transition: color .3s ease;
}
.tah-live-stat-value.is-bumped { color: #22c55e !important; }

/* Grid principal: LOLA en una sola columna */
.tah-live-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    flex: 1; min-height: 0;
}
.tah-live-grid--solo { grid-template-columns: 1fr; }

/* Feed de eventos */
.tah-live-feed-wrap {
    display: flex; flex-direction: column;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    overflow: hidden;
    min-height: 320px;
}
.tah-live-feed-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px;
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.tah-live-feed-head h4 { margin: 0; font-size: 13px; color: #fff !important; }
.tah-live-autoscroll-label {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; color: #a8a29e; cursor: pointer;
}
.tah-live-feed {
    flex: 1; min-height: 0;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex; flex-direction: column; gap: 6px;
    max-height: 50vh;
}
.tah-live-feed-empty {
    text-align: center; padding: 30px;
    color: #78716c; font-size: 13px;
}

.tah-live-event {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 7px 10px;
    background: rgba(255,255,255,.02);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    animation: tah-live-event-in .25s ease-out;
    word-wrap: break-word;
}
@keyframes tah-live-event-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tah-live-event-icon { font-size: 14px; flex-shrink: 0; line-height: 1.2; }
.tah-live-event-content { flex: 1; min-width: 0; color: #d6d3d1 !important; }
.tah-live-event-content strong { color: #fff !important; }
.tah-live-event-time {
    font-size: 10px; color: #78716c; flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.tah-live-event.evt-gift     { background: rgba(232,161,58,.10); border-left: 3px solid #E8A13A; }
.tah-live-event.evt-follow   { background: rgba(47,180,217,.08); border-left: 3px solid #22d3ee; }
.tah-live-event.evt-share    { background: rgba(168,85,247,.08); border-left: 3px solid #a855f7; }
.tah-live-event.evt-like_milestone { background: rgba(245,158,11,.08); border-left: 3px solid #f59e0b; }

/* Panel LOLA */
.tah-live-lola-wrap {
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, rgba(47,180,217,.06) 0%, rgba(255,255,255,.02) 100%);
    border: 1px solid rgba(47,180,217,.20);
    border-radius: 12px;
    overflow: hidden;
}
.tah-live-lola-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px;
    background: rgba(47,180,217,.08);
    border-bottom: 1px solid rgba(47,180,217,.15);
}
.tah-live-lola-head h4 { margin: 0; font-size: 13px; color: #22d3ee !important; }
.tah-live-lola-status { font-size: 10px; color: #a8a29e; }
.tah-live-lola-list {
    flex: 1; overflow-y: auto;
    padding: 10px 14px;
    display: flex; flex-direction: column; gap: 8px;
    max-height: 60vh;
    min-height: 280px;
}
.tah-live-lola-empty {
    text-align: center; padding: 20px 10px;
    color: #78716c; font-size: 12px;
    line-height: 1.4;
}
/* LOLA semáforo: VERDE (info/good) / AMARILLO (warning) / ROJO (danger) */
.tah-live-lola-item {
    padding: 10px 12px; border-radius: 9px;
    background: rgba(34,197,94,.08);
    border-left: 3px solid #22c55e;   /* verde por defecto */
    font-size: 12px;
    line-height: 1.45;
    animation: tah-live-event-in .3s ease-out;
}
.tah-live-lola-item.is-warning { border-left-color: #f59e0b; background: rgba(245,158,11,.08); }
.tah-live-lola-item.is-danger {
    border-left-color: #ef4444;
    background: rgba(239,68,68,.10);
    animation: tah-live-event-in .3s ease-out, tah-live-danger-pulse 1.5s ease-in-out infinite 0.5s;
}
@keyframes tah-live-danger-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
    50%      { box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}
.tah-live-lola-title { font-weight: 700; color: #fff !important; margin-bottom: 3px; }
.tah-live-lola-msg   { color: #d6d3d1 !important; }
.tah-live-lola-meta  { font-size: 10px; color: #78716c; margin-top: 4px; display: flex; gap: 8px; }

/* Tag "PENALIDAD" arriba del título cuando el item es danger */
.tah-live-lola-penalty-tag {
    display: inline-block;
    padding: 2px 8px;
    margin-bottom: 6px;
    background: #ef4444;
    color: #fff !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    border-radius: 999px;
    text-transform: uppercase;
}

/* Banner danger persistente arriba del modal */
.tah-live-danger-banner {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; margin: 0 0 12px;
    background: linear-gradient(90deg, rgba(239,68,68,.20) 0%, rgba(239,68,68,.06) 100%);
    border: 1px solid rgba(239,68,68,.50);
    border-radius: 10px;
    animation: tah-live-danger-banner-in .25s ease-out, tah-live-banner-pulse 2s ease-in-out infinite 0.5s;
}
@keyframes tah-live-danger-banner-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tah-live-banner-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
    50%      { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.tah-live-danger-icon { font-size: 26px; flex-shrink: 0; }
.tah-live-danger-text { flex: 1; min-width: 0; }
.tah-live-danger-text strong { display: block; color: #fff !important; font-size: 13px; margin-bottom: 2px; }
.tah-live-danger-text span { display: block; font-size: 12px; color: #fecaca !important; }
.tah-live-danger-dismiss {
    flex-shrink: 0;
    padding: 7px 14px;
    background: #fff; color: #dc2626 !important;
    border: none; border-radius: 999px;
    font-size: 12px; font-weight: 700;
    cursor: pointer; font-family: inherit;
}
.tah-live-danger-dismiss:hover { transform: scale(1.04); }

/* ═══════════════════════════════════════════════════════════════════════ */
/*  LMS — Academia (v5.29.0)                                              */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Fuentes empaquetadas para diplomas. document.fonts.ready debe resolver
   antes de que html2canvas dispare para que el PDF use la tipografía. */
@font-face {
    font-family: 'Playfair Display';
    font-style: normal; font-weight: 400; font-display: block;
    src: url('../fonts/playfair-display-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal; font-weight: 700; font-display: block;
    src: url('../fonts/playfair-display-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal; font-weight: 400; font-display: block;
    src: url('../fonts/montserrat-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal; font-weight: 700; font-display: block;
    src: url('../fonts/montserrat-700.woff2') format('woff2');
}

.tah-lms { margin-top: 36px; }
.tah-lms-header h2 { margin: 0 0 6px; font-size: 1.6rem; }
.tah-lms-subtitle { color: #a8a29e; margin-top: 0; }
.tah-lms-section-title { margin-top: 28px; font-size: 1.1rem; }

.tah-lms-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px; margin: 18px 0;
}
.tah-lms-stat-card {
    display: flex; gap: 12px; align-items: center;
    padding: 14px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.1);
}
.tah-lms-stat-icon { font-size: 1.8rem; }
.tah-lms-stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #a8a29e; }
.tah-lms-stat-value { font-size: 1.4rem; font-weight: 700; color: #fafaf9; }

.tah-lms-chart-wrap {
    margin: 18px 0; padding: 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
}
.tah-lms-chart-wrap h3 { margin: 0 0 10px; font-size: .95rem; color: #d6d3d1; }
.tah-lms-chart-wrap canvas { width: 100%; max-width: 100%; height: auto; }

.tah-lms-course-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px; margin: 12px 0;
}
.tah-lms-course-card {
    position: relative;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px; padding: 14px;
    display: flex; flex-direction: column; gap: 8px;
}
.tah-lms-course-card h4 { margin: 0; font-size: 1rem; color: #fafaf9; }

/* Tarjetas en el orden definido por el admin: numeración + acento de progreso */
.tah-lms-course-grid--ordered .tah-lms-course-card { padding-top: 16px; }
.tah-lms-course-order {
    position: absolute; top: 10px; right: 10px;
    min-width: 26px; height: 26px; padding: 0 7px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .82rem; font-weight: 700; line-height: 1; color: #fafaf9;
    background: var(--tah-primary, #E8A13A);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.tah-lms-course-card--done { border-color: rgba(47,180,217,.4); }
.tah-lms-course-card--done .tah-lms-course-order { background: #2FB4D9; color: #00302f; }
.tah-lms-course-status { color: #a8a29e; }
.tah-lms-course-thumb {
    height: 120px; background-size: cover; background-position: center;
    border-radius: 8px; background-color: rgba(255,255,255,.06);
}
.tah-lms-course-desc { color: #a8a29e; font-size: .85rem; margin: 0; }
.tah-lms-course-reward { font-size: .78rem; color: #a8a29e; }
.tah-lms-progress-bar {
    width: 100%; height: 8px;
    background: rgba(255,255,255,.08);
    border-radius: 999px; overflow: hidden;
}
.tah-lms-progress-fill {
    height: 100%; background: var(--tah-primary, #E8A13A);
    transition: width .3s ease;
}
.tah-lms-progress-big { height: 14px; }

.tah-lms-cert-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.tah-lms-cert-tile {
    background: linear-gradient(135deg, rgba(232,161,58,.1), rgba(47,180,217,.08));
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px; padding: 14px;
    display: flex; flex-direction: column; gap: 6px;
}
.tah-lms-cert-tile-title { font-weight: 700; color: #fafaf9; }
.tah-lms-cert-tile-date { font-size: .78rem; color: #a8a29e; }
.tah-lms-cert-tile-badge { color: #f87171; font-size: .82rem; }
.tah-lms-cert-revoked { opacity: .6; }

/* ── Botón "Tus certificados" (abre el modal de diplomas) ──────────────── */
.tah-lms-certs-trigger {
    width: 100%;
    display: flex; align-items: center; gap: 14px;
    text-align: left; cursor: pointer;
    background: linear-gradient(135deg, rgba(232,161,58,.12), rgba(47,180,217,.08));
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px; padding: 16px 18px;
    transition: border-color .15s ease, transform .12s ease;
}
.tah-lms-certs-trigger:hover { border-color: rgba(255,255,255,.28); }
.tah-lms-certs-trigger:active { transform: scale(.99); }
.tah-lms-certs-trigger-icon { font-size: 1.6rem; line-height: 1; }
.tah-lms-certs-trigger-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tah-lms-certs-trigger-title { font-weight: 700; color: #fafaf9; }
.tah-lms-certs-trigger-sub { font-size: .82rem; color: #a8a29e; }
.tah-lms-certs-trigger-chevron { font-size: 1.6rem; color: #a8a29e; line-height: 1; }

/* ── Modal: lista de certificados / diplomas ───────────────────────────── */
.tah-lms-certs-modal {
    position: fixed; inset: 0; z-index: 999997;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 20px;
}
.tah-lms-certs-modal[hidden] { display: none !important; }
.tah-lms-certs-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,2,2,.88);
    backdrop-filter: blur(4px);
}
.tah-lms-certs-modal-box {
    position: relative; z-index: 1;
    margin: auto;
    background: #0d1414;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 14px;
    padding: 22px 24px 24px;
    max-width: 760px; width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    animation: tahQuizModalIn .25s ease-out;
}
.tah-lms-certs-modal-title { margin: 0 0 16px; font-size: 1.3rem; color: #fafaf9; }
.tah-lms-certs-modal-close {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease;
}
.tah-lms-certs-modal-close:hover { background: rgba(255,255,255,.2); }

/* ── Modal: lista de cursos (mismo patrón visual que el de certificados) ── */
/* El scroll vive en el CONTENEDOR (no en la caja interna): así, aunque el
   modal esté anidado dentro del modal "Academia" (que también scrollea), el
   gesto de scroll se queda en este modal y no se "escapa" al de atrás. La
   caja se centra cuando es corta (margin:auto) y se alinea arriba —siendo
   alcanzable por scroll— cuando hay muchos cursos. */
.tah-lms-courses-modal {
    position: fixed; inset: 0; z-index: 999997;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
}
.tah-lms-courses-modal[hidden] { display: none !important; }
.tah-lms-courses-modal-overlay {
    position: fixed; inset: 0;        /* fixed: cubre toda la pantalla aunque el contenedor scrollee */
    background: rgba(0,2,2,.88);
    backdrop-filter: blur(4px);
}
.tah-lms-courses-modal-box {
    position: relative; z-index: 1;
    margin: auto;                     /* centra en vertical cuando es corta; permite scroll cuando es alta */
    background: #0d1414;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 14px;
    padding: 22px 24px 24px;
    max-width: 860px; width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    animation: tahQuizModalIn .25s ease-out;
}
.tah-lms-courses-modal-title { margin: 0 0 16px; font-size: 1.3rem; color: #fafaf9; }
.tah-lms-courses-modal-close {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease;
}
.tah-lms-courses-modal-close:hover { background: rgba(255,255,255,.2); }

/* Mientras el modal de cursos está abierto ocultamos la bottom-nav (z-index
   9000) y el FAB de IA (z-index 99999): al estar fuera del contexto de
   apilamiento del modal "Academia", quedarían por encima y taparían el último
   curso, impidiendo abrirlo. */
body.tah-courses-modal-open .tah-bottom-nav,
body.tah-courses-modal-open #tah-ai-chat-toggle { display: none !important; }

/* ── Botón "Cursos" para escritorio (en móvil se usa la bottom-nav) ─────── */
.tah-academia-desktop-btn { display: none; }
@media (min-width: 721px) {
    .tah-academia-desktop-btn {
        display: inline-flex; align-items: center; gap: 8px;
        position: fixed; top: 18px; right: 18px; z-index: 8000;
        padding: 10px 18px; border-radius: 999px; cursor: pointer;
        background: var(--tah-primary, #E8A13A); color: #fff;
        border: none; font-weight: 700; font-size: .92rem;
        box-shadow: 0 6px 20px rgba(0,0,0,.35);
        transition: transform .12s ease, filter .15s ease;
    }
    .tah-academia-desktop-btn:hover { filter: brightness(1.08); }
    .tah-academia-desktop-btn:active { transform: scale(.97); }
}

.tah-lms-course-detail {
    margin-top: 20px; padding: 18px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
}
.tah-lms-loading { padding: 30px; text-align: center; color: #a8a29e; }
.tah-lms-completion-banner {
    margin: 14px 0; padding: 14px;
    background: rgba(34,197,94,.15);
    border: 1px solid rgba(34,197,94,.4);
    border-radius: 10px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

.tah-lms-lesson-list { list-style: none; padding: 0; margin: 14px 0; }
.tah-lms-lesson-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; margin-bottom: 6px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
}
.tah-lms-lesson-item.is-done { border-color: rgba(34,197,94,.5); }
.tah-lms-lesson-item.is-locked { opacity: .55; }
.tah-lms-lesson-status {
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .9rem;
}
.tah-lms-lesson-item.is-done .tah-lms-lesson-status {
    background: #22c55e; color: #022c1e;
}
.tah-lms-lesson-title { flex: 1; }
.tah-lms-lesson-title small { display: block; color: #a8a29e; font-size: .7rem; margin-top: 2px; }
.tah-lms-locked-label { color: #a8a29e; font-size: .75rem; }

.tah-lms-lesson-view {
    margin-top: 18px; padding: 18px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
}
.tah-lms-lesson-h { margin: 10px 0 14px; font-size: 1.2rem; }
.tah-lms-lesson-content {
    line-height: 1.6;
}
.tah-lms-lesson-content img,
.tah-lms-lesson-content iframe,
.tah-lms-lesson-content video {
    max-width: 100%; border-radius: 8px; margin: 8px 0;
}
.tah-lms-lesson-actions { margin-top: 16px; }

.tah-lms-quiz-rules { color: #a8a29e; font-size: .85rem; margin: 6px 0 14px; }
.tah-lms-quiz-form fieldset {
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px; padding: 12px 14px;
    margin: 10px 0;
}
.tah-lms-quiz-form legend { padding: 0 8px; font-weight: 700; }
.tah-lms-quiz-a {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; margin: 4px 0;
    background: rgba(255,255,255,.04);
    border-radius: 8px; cursor: pointer;
}
.tah-lms-quiz-a:hover { background: rgba(255,255,255,.08); }
.tah-lms-quiz-result { margin-top: 14px; padding: 12px; border-radius: 10px; }
.tah-lms-quiz-pass { background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.4); padding: 10px; border-radius: 8px; }
.tah-lms-quiz-fail { background: rgba(239,68,68,.15); color: #fca5a5; border: 1px solid rgba(239,68,68,.4); padding: 10px; border-radius: 8px; }

/* ── Quiz modo tarjetas: una pregunta a la vez ───────────────────────────
   Reemplaza el scroll largo por un flow tipo Typeform: marcas respuesta,
   la card hace fade-out y entra la siguiente. Al contestar la última,
   se dispara el submit del form (la lógica de envío no cambia). */
.tah-lms-quiz-form[data-mode="cards"] .tah-lms-quiz-cards {
    position: relative;
}
.tah-lms-quiz-form[data-mode="cards"] .tah-lms-quiz-card {
    display: none;
    animation: tahQuizCardIn .35s cubic-bezier(.2,.7,.2,1);
}
.tah-lms-quiz-form[data-mode="cards"] .tah-lms-quiz-card.is-active {
    display: block;
}
.tah-lms-quiz-form[data-mode="cards"] .tah-lms-quiz-card.is-leaving {
    animation: tahQuizCardOut .2s ease-in forwards;
}
@keyframes tahQuizCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tahQuizCardOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-20px); }
}
.tah-lms-quiz-form[data-mode="cards"] .tah-lms-quiz-card legend {
    font-size: 1.05rem; line-height: 1.4; margin-bottom: 12px;
}
.tah-lms-quiz-form[data-mode="cards"] .tah-lms-quiz-a {
    padding: 14px 14px;
    min-height: 52px;
    font-size: 1rem;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.tah-lms-quiz-form[data-mode="cards"] .tah-lms-quiz-a:active {
    transform: scale(.98);
}
.tah-lms-quiz-form[data-mode="cards"] .tah-lms-quiz-a:has(input:checked) {
    background: rgba(232,161,58,.14);
    border-color: rgba(232,161,58,.55);
}
.tah-lms-quiz-card-hint {
    color: #a8a29e; font-size: .8rem; margin: 10px 0 0;
}
.tah-lms-quiz-progress {
    display: flex; align-items: center; gap: 10px;
    margin: 4px 0 14px;
}
.tah-lms-quiz-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,.08);
    border-radius: 3px;
    overflow: hidden;
}
.tah-lms-quiz-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--tah-primary, #E8A13A);
    border-radius: 3px;
    transition: width .3s ease;
}
.tah-lms-quiz-progress-text {
    color: #a8a29e; font-size: .8rem;
    font-variant-numeric: tabular-nums;
    min-width: 44px; text-align: right;
}
.tah-lms-quiz-nav {
    display: flex; gap: 10px; align-items: center;
    margin-top: 16px;
}
.tah-lms-quiz-nav .tah-lms-quiz-prev { flex: 0 0 auto; }
.tah-lms-quiz-nav .tah-lms-quiz-next,
.tah-lms-quiz-nav .tah-lms-quiz-submit { flex: 1; min-height: 48px; }
.tah-lms-quiz-nav button[disabled] {
    opacity: .4; cursor: not-allowed; pointer-events: none;
}

/* Botones genéricos del LMS (refuerzan los del plugin sin reinventar) */
.tah-lms .tah-btn-primary,
.tah-lms-course-detail .tah-btn-primary,
.tah-verify-page .tah-btn-primary {
    background: var(--tah-primary, #E8A13A); color: #fff;
    border: none; padding: 9px 18px; border-radius: 999px;
    font-weight: 700; cursor: pointer; font-size: .9rem;
}
.tah-lms .tah-btn-primary:hover { filter: brightness(1.1); }
.tah-lms .tah-btn-ghost,
.tah-lms-course-detail .tah-btn-ghost,
.tah-verify-page .tah-btn-ghost {
    background: transparent; color: #fafaf9;
    border: 1px solid rgba(255,255,255,.2);
    padding: 8px 14px; border-radius: 999px;
    cursor: pointer; font-size: .85rem;
}

/* ── Vista del diploma del creador ─────────────────────────────────────── */
.tah-lms-cert-view {
    margin-top: 24px;
}
.tah-lms-cert-toolbar {
    display: flex; gap: 10px; align-items: center;
    justify-content: space-between; margin-bottom: 14px;
}
.tah-lms-cert-note { color: #a8a29e; font-size: .85rem; }
.tah-lms-cert-stage {
    background: #e5e5e5; padding: 24px; border-radius: 14px;
    display: flex; justify-content: center;
}
.tah-lms-cert-verify { color: #a8a29e; font-size: .8rem; text-align: center; margin-top: 10px; }
.tah-lms-cert-verify a { color: #2FB4D9; }

/* ════════════════════════════════════════════════════════════════════════ */
/*  Diploma (.tah-cert) — usado por el creador y el preview admin          */
/* ════════════════════════════════════════════════════════════════════════ */

/* =====================================================================
   DIPLOMA SD LIVE AGENCY — diseño visual v5.31.3
   Wrapper externo .tah-cert (compat con el JS de paintQR y downloadPDF).
   Estructura interna sigue el spec entregado (.diploma + .dip-*).
   Formato: A4 horizontal (1.414:1).
   ===================================================================== */

.tah-cert {
    --cert-bg-ink:    #000202;
    --cert-red:       #FE2C55;
    --cert-cy:        #25F4EE;
    --cert-gold:      #ffb800;
    --cert-gold-soft: #ffd23f;
    --cert-lola:      #ff2d95;
    --cert-ink:       #fafaf9;
    --cert-mut:       #a8a29e;
    --cert-fd:        'Bebas Neue', sans-serif;
    --cert-fc:        'Cinzel', serif;
    --cert-fu:        'Montserrat', sans-serif;
    --cert-fm:        'Space Mono', monospace;
    --cert-fsign:     'Great Vibes', cursive;

    width: 100%; max-width: 1100px;
    aspect-ratio: 1.414/1;
    position: relative;
    font-family: var(--cert-fu);
    color: var(--cert-ink);
    box-sizing: border-box;
}

.tah-cert .diploma {
    position: absolute; inset: 0;
    /* Background base ligeramente aclarado respecto a la versión inicial
       (#050608 → #0e1118) para que la marca de agua sea visible sin perder
       el look dark del diseño. */
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(254,44,85,.10), transparent 60%),
        radial-gradient(ellipse 70% 60% at 50% 100%, rgba(37,244,238,.08), transparent 60%),
        linear-gradient(160deg, #0e1118 0%, #181b24 50%, #0e1118 100%);
    border-radius: 6px;
    overflow: hidden;
    display: flex; flex-direction: column; align-items: center;
    padding: 4% 6% 3.5%;
    box-shadow: 0 40px 100px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.04);
}
/* textura grid sutil */
.tah-cert .diploma::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(37,244,238,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37,244,238,.025) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 80%);
            mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 80%);
}
/* Marca de agua: imagen centrada de fondo (logo / sello) en baja opacidad.
   Se posiciona por encima del background pero detrás del contenido (.dip-inner).
   Sólo se renderiza si --cert-watermark está definido en el inline style. */
.tah-cert .diploma::after {
    content: '';
    position: absolute; inset: 0;
    background-image: var(--cert-watermark, none);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 55% auto;
    opacity: .07;
    pointer-events: none;
    z-index: 1;
    /* Mezclamos con el fondo para que la marca tome el color dominante (cyan)
       sin verse plana ni gris muerto. */
    filter: grayscale(.4) contrast(.9);
    mix-blend-mode: screen;
}

/* marco doble + esquinas glitch */
.tah-cert .diploma-frame {
    position: absolute; inset: 18px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 4px;
    pointer-events: none;
}
.tah-cert .diploma-frame::before {
    content: ''; position: absolute; inset: 6px;
    border: 1px solid rgba(255,255,255,.06);
}
.tah-cert .corner {
    position: absolute; width: 46px; height: 46px;
    pointer-events: none; z-index: 3;
}
.tah-cert .corner::before, .tah-cert .corner::after {
    content: ''; position: absolute;
    background: linear-gradient(90deg, var(--cert-red), var(--cert-cy));
}
.tah-cert .corner::before { width: 100%; height: 2px; }
.tah-cert .corner::after  { height: 100%; width: 2px; }
.tah-cert .corner.tl { top: 14px; left: 14px; }
.tah-cert .corner.tl::before { top: 0; left: 0; }
.tah-cert .corner.tl::after  { top: 0; left: 0; }
.tah-cert .corner.tr { top: 14px; right: 14px; }
.tah-cert .corner.tr::before { top: 0; right: 0; }
.tah-cert .corner.tr::after  { top: 0; right: 0; }
.tah-cert .corner.bl { bottom: 14px; left: 14px; }
.tah-cert .corner.bl::before { bottom: 0; left: 0; }
.tah-cert .corner.bl::after  { bottom: 0; left: 0; }
.tah-cert .corner.br { bottom: 14px; right: 14px; }
.tah-cert .corner.br::before { bottom: 0; right: 0; }
.tah-cert .corner.br::after  { bottom: 0; right: 0; }

/* contenido */
.tah-cert .dip-inner {
    position: relative; z-index: 2;
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
}

.tah-cert .dip-logo-plate {
    display: inline-flex; align-items: center; justify-content: center;
    background: #000; border-radius: 10px;
    padding: 10px 22px; margin-bottom: 1.4%;
    box-shadow: 0 0 30px rgba(37,244,238,.12), 0 0 0 1px rgba(255,255,255,.06);
}
.tah-cert .dip-logo {
    height: clamp(56px, 8vw, 96px); width: auto;
    object-fit: contain; display: block;
}

.tah-cert .dip-kicker {
    font-family: var(--cert-fm);
    font-size: clamp(9px, 1.1vw, 13px);
    letter-spacing: .42em; text-transform: uppercase;
    color: var(--cert-cy);
    margin-bottom: 1.6%; padding-left: .42em;
    display: flex; align-items: center; gap: 14px;
}
.tah-cert .dip-kicker::before, .tah-cert .dip-kicker::after {
    content: ''; width: 34px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--cert-cy));
}
.tah-cert .dip-kicker::after { background: linear-gradient(90deg, var(--cert-cy), transparent); }

.tah-cert .dip-title {
    font-family: var(--cert-fc); font-weight: 800;
    font-size: clamp(26px, 4.4vw, 52px);
    line-height: 1; letter-spacing: .02em;
    color: #fff;
    margin-bottom: .4%;
}
.tah-cert .dip-title .grad {
    color: var(--cert-cy);
    text-shadow: 0 0 18px rgba(37,244,238,.45);
}
.tah-cert .dip-sub {
    font-family: var(--cert-fu);
    font-size: clamp(10px, 1.25vw, 15px); font-weight: 500;
    color: var(--cert-mut); letter-spacing: .04em;
    margin-bottom: 2.4%;
}

.tah-cert .dip-otorga {
    font-family: var(--cert-fu);
    font-size: clamp(9px, 1.1vw, 13px); font-weight: 600;
    letter-spacing: .28em; text-transform: uppercase;
    color: var(--cert-gold);
    margin-bottom: 1.2%;
}

.tah-cert .dip-name {
    font-family: var(--cert-fd);
    font-size: clamp(34px, 6.4vw, 78px);
    line-height: .96; letter-spacing: .02em;
    color: #fff;
    text-shadow:
        -2px 0 0 rgba(254,44,85,.55),
        2px 0 0 rgba(37,244,238,.55),
        0 0 36px rgba(255,255,255,.18);
    padding: 0 .3em 2px;
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, transparent, var(--cert-red), var(--cert-cy), transparent) 1;
    min-width: 40%; max-width: 92%;
    overflow-wrap: break-word; word-break: break-word;
}

.tah-cert .dip-body {
    font-family: var(--cert-fu);
    font-size: clamp(11px, 1.5vw, 18px); line-height: 1.6;
    color: #e7e5e4;
    max-width: 76%; margin: 2.4% 0 0;
    font-weight: 400;
}
.tah-cert .dip-body .curso { display: inline; font-weight: 800; color: var(--cert-cy); }
.tah-cert .dip-body b { color: #fff; font-weight: 700; }

/* pie: firma | sello | fecha | QR */
.tah-cert .dip-foot {
    margin-top: auto; width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 3.5%;
    align-items: end;
    padding-top: 2%; padding-bottom: 1.5%;
}
.tah-cert .dip-sign {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tah-cert .dip-sign-img {
    height: clamp(46px, 6.5vw, 78px); width: auto;
    object-fit: contain; margin-bottom: -4px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,.3));
}
.tah-cert .dip-sign-line {
    width: 78%; max-width: 230px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
}
.tah-cert .dip-sign-role {
    font-family: var(--cert-fm);
    font-size: clamp(7px, .85vw, 10px); color: var(--cert-mut);
    letter-spacing: .12em; text-transform: uppercase;
    margin-top: 6px;
}

/* sello / medalla central */
.tah-cert .dip-seal {
    position: relative;
    width: clamp(74px, 10vw, 118px);
    height: clamp(74px, 10vw, 118px);
    display: flex; align-items: center; justify-content: center;
}
.tah-cert .dip-seal-ring {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, var(--cert-lola), #ff6bc1, var(--cert-lola), #c41e6f, var(--cert-lola));
    padding: 2px;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    animation: tah-cert-spin 14s linear infinite;
}
.tah-cert .dip-seal-inner {
    position: absolute; inset: 7px; border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, #15171c, #070809);
    border: 1px solid rgba(255,255,255,.12);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 1px;
}
.tah-cert .dip-seal-star {
    font-size: clamp(20px, 2.8vw, 34px); line-height: 1;
    color: var(--cert-gold);
    filter: drop-shadow(0 0 10px rgba(255,184,0,.85));
}
.tah-cert .dip-seal-txt {
    font-family: var(--cert-fd);
    font-size: clamp(10px, 1.3vw, 16px);
    letter-spacing: .12em; color: var(--cert-gold-soft);
    line-height: .9;
}
.tah-cert .dip-seal-sub {
    font-family: var(--cert-fm);
    font-size: 6.5px; letter-spacing: .18em;
    color: var(--cert-mut); text-transform: uppercase;
}
@keyframes tah-cert-spin { to { transform: rotate(360deg); } }

.tah-cert .dip-date {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tah-cert .dip-date-val {
    font-family: var(--cert-fu);
    font-size: clamp(10px, 1.15vw, 14px);
    font-weight: 700; color: #fff;
}
.tah-cert .dip-date-line {
    width: 78%; max-width: 230px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
    margin-top: 4px;
}
.tah-cert .dip-date-role {
    font-family: var(--cert-fm);
    font-size: clamp(7px, .85vw, 10px); color: var(--cert-mut);
    letter-spacing: .12em; text-transform: uppercase;
    margin-top: 6px;
}

/* QR de verificación */
.tah-cert .dip-qr {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.tah-cert .dip-qr-box {
    position: relative;
    width: clamp(58px, 8vw, 92px);
    height: clamp(58px, 8vw, 92px);
    background: #fff; border-radius: 8px; padding: 5px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 6px 18px -6px rgba(0,0,0,.6);
}
.tah-cert .tah-cert-qr {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.tah-cert .tah-cert-qr canvas,
.tah-cert .tah-cert-qr img {
    width: 100% !important; height: 100% !important;
    display: block; border-radius: 3px;
}
.tah-cert .dip-qr-label {
    font-family: var(--cert-fm);
    font-size: clamp(7px, .8vw, 9px); color: var(--cert-mut);
    letter-spacing: .1em; text-transform: uppercase;
}

/* LOLA mini en esquina */
.tah-cert .dip-lola {
    position: absolute; top: 6%; right: 6%; z-index: 4;
    display: flex; align-items: center; gap: 9px;
    background: linear-gradient(135deg, rgba(255,45,149,.12), rgba(37,244,238,.05));
    border: 1px solid rgba(255,45,149,.3);
    border-radius: 50px;
    padding: 5px 14px 5px 5px;
}
.tah-cert .dip-lola-av {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background-size: 140%; background-position: 50% 25%;
    border: 1.5px solid var(--cert-lola);
    box-shadow: 0 0 10px rgba(255,45,149,.5);
}
.tah-cert .dip-lola-tx {
    font-family: var(--cert-fm);
    font-size: 8px; letter-spacing: .1em; line-height: 1.3;
    text-align: left; color: #f0f0f0;
}
.tah-cert .dip-lola-tx b {
    color: var(--cert-lola); display: block;
    font-family: var(--cert-fd);
    font-size: 11px; letter-spacing: .12em;
}

/* folio / id */
.tah-cert .dip-folio {
    position: absolute; top: 6%; left: 6%; z-index: 4;
    font-family: var(--cert-fm);
    font-size: 9px; letter-spacing: .1em;
    color: var(--cert-mut);
    text-align: left; line-height: 1.5;
}
.tah-cert .dip-folio b { color: var(--cert-cy); }

/* Fallback minimalista cuando no hay plantilla */
.tah-cert-fallback {
    background: #fff; color: #1c1917;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 1rem;
    text-align: center; padding: 40px;
}

/* Print del diploma (cuando se imprime directo desde el browser) */
@media print {
    @page { size: A4 landscape; margin: 0; }
    .tah-cert {
        max-width: none; width: 100vw; height: 100vh; aspect-ratio: auto;
    }
    .tah-cert .diploma { border-radius: 0; box-shadow: none; }
    .tah-cert .dip-seal-ring { animation: none; }
}

/* ── Modal "Academia" (se abre desde el bottom-nav del dashboard) ──────── */
/* z-index 8500 va POR DEBAJO del bottom-nav (z-index:9000) para que la
   barra inferior siga visible y el creador pueda navegar a otras pestañas. */
.tah-academia-modal {
    position: fixed; inset: 0; z-index: 8500;
    display: flex; align-items: stretch; justify-content: center;
}
.tah-academia-modal[hidden] { display: none !important; }
.tah-academia-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(0,2,2,.94);
    backdrop-filter: blur(6px);
}
.tah-academia-modal-box {
    position: relative; z-index: 1;
    background: #080B10;
    width: 100%; max-width: 1100px;
    max-height: 100vh; overflow-y: auto;
    padding: calc(56px + env(safe-area-inset-top)) 20px calc(100px + env(safe-area-inset-bottom));
    animation: tahAcademiaIn .28s ease-out;
}
@keyframes tahAcademiaIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tah-academia-modal-close {
    position: fixed;
    top: calc(14px + env(safe-area-inset-top));
    right: calc(16px + env(safe-area-inset-right));
    z-index: 10;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease;
}
.tah-academia-modal-close:hover { background: rgba(255,255,255,.2); }
/* Dentro del modal Academia, eliminamos el margin-top de la sección LMS
   para que no quede espacio en blanco arriba del título */
.tah-academia-modal .tah-lms { margin-top: 0; }

/* ── Modal flotante del quiz (se abre auto al terminar el video) ───────── */
.tah-lms-quiz-modal {
    position: fixed; inset: 0; z-index: 999998;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.tah-lms-quiz-modal[hidden] { display: none !important; }
.tah-lms-quiz-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(0,2,2,.86);
    backdrop-filter: blur(4px);
}
.tah-lms-quiz-modal-box {
    position: relative; z-index: 1;
    background: #0d1414;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 14px;
    padding: 20px 24px 24px;
    max-width: 900px; width: 100%;
    max-height: 92vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    animation: tahQuizModalIn .25s ease-out;
}
body.tah-lms-modal-locked { overflow: hidden; }
.tah-lms-lesson-header { margin-bottom: 14px; }
.tah-lms-lesson-header h3 { margin: 0 0 4px; font-size: 1.3rem; color: #fafaf9; }
.tah-lms-lesson-hint { margin: 0; color: #a8a29e; font-size: .85rem; }
.tah-lms-autoembed,
.tah-lms-lesson-content iframe {
    width: 100%; aspect-ratio: 16/9; max-height: 60vh;
    border: none; border-radius: 10px;
    background: #000;
    margin: 10px 0;
}

/* ── Reproductor custom (oculta el branding de YouTube/Vimeo) ──────────── */
.tah-video-player {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin: 14px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.tah-video-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 60vh;
    background: #000;
    overflow: hidden;
}
.tah-video-frame-slot,
.tah-video-frame-slot iframe,
.tah-video-native {
    position: absolute; inset: 0;
    width: 100% !important; height: 100% !important;
    border: 0; display: block;
    background: #000;
}
.tah-video-native { object-fit: contain; }
/* El iframe / video nativo NO recibe interacción directa: todo pasa por el
   clickshield. Esto evita la UI nativa de YouTube y los controles default
   del navegador en HTML5 <video> (no le ponemos controls). */
.tah-video-frame-slot iframe,
.tah-video-native { pointer-events: none; }
/* Sólo ocultamos la badge "SD LIVE" para videos locales (ya son white-label) */
.tah-video-player-local .tah-video-brand { display: none; }
.tah-video-clickshield {
    position: absolute; inset: 0;
    z-index: 5;
    cursor: pointer;
    background: transparent;
}
.tah-video-bigplay {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.5));
}
.tah-video-bigplay.show { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }

.tah-video-loading {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 7;
}
.tah-video-loading span {
    display: block; width: 44px; height: 44px;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: var(--tah-primary, #E8A13A);
    border-radius: 50%;
    animation: tahVideoSpin .9s linear infinite;
}
@keyframes tahVideoSpin { to { transform: rotate(360deg); } }

/* Marca de agua de la agencia (esquina, para tapar el branding de YouTube) */
.tah-video-brand {
    position: absolute; top: 10px; right: 14px; z-index: 6;
    font-size: .72rem; font-weight: 700;
    color: rgba(255,255,255,.75);
    letter-spacing: .08em; text-transform: uppercase;
    background: rgba(0,0,0,.45);
    padding: 4px 9px; border-radius: 999px;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.tah-video-controls {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    background: linear-gradient(180deg, #0d1414, #050a0a);
    border-top: 1px solid rgba(255,255,255,.06);
}
.tah-vctrl {
    background: transparent; border: none;
    color: #fafaf9; cursor: pointer;
    padding: 6px 10px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s ease;
}
.tah-vctrl:hover  { background: rgba(255,255,255,.08); }
.tah-vctrl:active { transform: scale(.95); }
.tah-vctrl-mute.is-muted { opacity: .55; }
.tah-vctrl-progress {
    flex: 1;
    position: relative;
    height: 8px;
    cursor: pointer;
    display: flex; align-items: center;
}
.tah-vctrl-progress-bg {
    position: absolute; inset: 3px 0;
    background: rgba(255,255,255,.12);
    border-radius: 3px;
}
.tah-vctrl-progress-fill {
    position: absolute; left: 0; top: 3px; bottom: 3px;
    background: var(--tah-primary, #E8A13A);
    border-radius: 3px;
    width: 0%;
    transition: width .15s linear;
}
.tah-vctrl-progress:hover .tah-vctrl-progress-bg { background: rgba(255,255,255,.18); }
.tah-vctrl-time {
    color: #d6d3d1;
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
    min-width: 92px;
    text-align: right;
}

/* Fullscreen: cuando el stage está en pantalla completa, llenar todo */
.tah-video-stage:fullscreen,
.tah-video-stage:-webkit-full-screen {
    width: 100vw; height: 100vh; max-height: 100vh;
    aspect-ratio: auto;
}

/* ── Mobile: el modal de contenido y el video ocupan toda la pantalla ──── */
@media (max-width: 720px) {
    .tah-lms-quiz-modal { padding: 0; }
    .tah-lms-quiz-modal-box {
        max-width: 100vw;
        width: 100vw;
        max-height: 100vh;
        min-height: 100vh;
        max-height: 100dvh;
        min-height: 100dvh;
        height: 100dvh;
        border-radius: 0;
        padding: 0;
        border: none;
        background: #000;
        display: flex; flex-direction: column;
        overflow: hidden;
    }
    .tah-lms-quiz-modal-close {
        position: fixed;
        top: max(10px, env(safe-area-inset-top));
        right: 10px;
        z-index: 100;
        background: rgba(0,0,0,.6);
        border: 1px solid rgba(255,255,255,.25);
        border-radius: 50%;
        width: 42px; height: 42px;
        font-size: 1.6rem;
        color: #fff;
    }
    #tah-lms-content-modal-body {
        flex: 1 1 auto;
        min-height: 0;
        display: flex; flex-direction: column;
        background: #000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 0;
    }
    /* Vista de lección con video: ocupa toda la pantalla */
    .tah-lms-lesson-view {
        flex: 1;
        display: flex; flex-direction: column;
        background: #000;
        padding: 0;
        margin: 0;
        border-radius: 0;
        border: none;
    }
    .tah-lms-lesson-header {
        padding: max(12px, env(safe-area-inset-top)) 56px 8px 14px;
        background: #000;
        margin-bottom: 0;
    }
    .tah-lms-lesson-header h3 { font-size: 1.05rem; }
    .tah-lms-lesson-hint { font-size: .78rem; }
    .tah-lms-lesson-content {
        flex: 1;
        display: flex; flex-direction: column;
        padding: 0;
        min-height: 0;
    }
    .tah-video-player {
        flex: 1;
        margin: 0;
        border-radius: 0;
        display: flex; flex-direction: column;
        box-shadow: none;
    }
    .tah-video-stage {
        flex: 1;
        aspect-ratio: auto;
        max-height: none;
        min-height: 60vh;
    }
    .tah-video-controls {
        padding: 10px 14px max(10px, env(safe-area-inset-bottom));
    }
    .tah-lms-lesson-actions {
        padding: 12px 14px max(14px, env(safe-area-inset-bottom));
        background: rgba(0,0,0,.6);
        border-top: 1px solid rgba(255,255,255,.12);
        margin-top: 0;
    }
    /* ── Quiz en modo tarjetas: ocupa toda la pantalla y la nav inferior
       (Atrás / Siguiente) queda fija. Ya no necesitamos scroll porque
       solo se muestra UNA pregunta a la vez. ─────────────────────────── */
    .tah-lms-quiz {
        flex: 1;
        display: flex; flex-direction: column;
        background: #0d1414;
        padding: calc(max(14px, env(safe-area-inset-top)) + 4px) 16px 0;
        overflow: visible;
        min-height: 0;
    }
    /* El botón "← Cerrar quiz" interno se oculta en móvil porque el
       modal ya tiene su propio botón X en la esquina superior. */
    .tah-lms-quiz > .tah-lms-lesson-close {
        display: none;
    }
    /* En la vista de quiz, el contenido descriptivo NO debe estirarse
       (la regla `.tah-lms-lesson-content { flex: 1 }` de arriba es para
       la vista de video; aquí la sobreescribimos). */
    .tah-lms-quiz > .tah-lms-lesson-content {
        flex: 0 0 auto;
        display: block;
        padding: 0;
        margin: 0 0 10px;
        font-size: .88rem;
        line-height: 1.4;
        color: #a8a29e;
    }
    .tah-lms-quiz .tah-lms-lesson-h {
        font-size: 1.1rem;
        line-height: 1.3;
        margin: 0 0 8px;
    }
    .tah-lms-quiz .tah-lms-quiz-rules {
        font-size: .76rem;
        line-height: 1.35;
        margin: 0 0 14px;
    }
    .tah-lms-quiz-form[data-mode="cards"] {
        flex: 1;
        display: flex; flex-direction: column;
        min-height: 0;
    }
    .tah-lms-quiz-cards {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -4px;     /* deja respirar el borde de la card */
        padding: 0 4px;
    }
    .tah-lms-quiz-form[data-mode="cards"] .tah-lms-quiz-card {
        margin: 0;
        border: none;
        padding: 0;
        background: transparent;
    }
    .tah-lms-quiz-form[data-mode="cards"] .tah-lms-quiz-card legend {
        font-size: 1.05rem;
        line-height: 1.35;
        padding: 0;
        margin-bottom: 14px;
        font-weight: 700;
    }
    .tah-lms-quiz-form[data-mode="cards"] .tah-lms-quiz-a {
        padding: 14px 14px;
        margin: 8px 0;
        font-size: .98rem;
    }
    .tah-lms-quiz-nav {
        padding: 12px 0 max(14px, env(safe-area-inset-bottom));
        margin-top: 4px;
        border-top: 1px solid rgba(255,255,255,.06);
    }

    /* Mientras el modal de contenido está abierto, ocultamos el bottom-nav
       de la app y el FAB de chat (LOLA): hacen ruido visual sobre el quiz
       y, en iOS, el FAB se monta en un stacking context distinto y termina
       tapando la card aunque tenga z-index menor. Usamos clase en body
       (fallback de :has() para iOS Safari viejito). */
    body.tah-content-modal-open .tah-bottom-nav,
    body.tah-content-modal-open #tah-ai-chat-toggle {
        display: none !important;
    }
}
.tah-lms-lesson-content { color: #d6d3d1; line-height: 1.55; }
.tah-lms-lesson-actions {
    display: flex; justify-content: space-between; gap: 10px;
    margin-top: 18px; padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.08);
    align-items: center; flex-wrap: wrap;
}
.tah-lms-review-hint {
    color: #22c55e; font-size: .82rem;
    background: rgba(34,197,94,.12);
    padding: 4px 10px; border-radius: 999px;
    border: 1px solid rgba(34,197,94,.35);
}
@keyframes tahQuizModalIn {
    from { opacity: 0; transform: translateY(20px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.tah-lms-quiz-modal-close {
    position: absolute; top: 10px; right: 14px;
    background: transparent; border: none;
    color: rgba(255,255,255,.6);
    font-size: 1.8rem; line-height: 1; cursor: pointer;
    padding: 4px 10px; border-radius: 50%;
}
.tah-lms-quiz-modal-close:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ── Toast de LIVCOINs ganados (esquina inferior derecha) ──────────────── */
.tah-lms-toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 999999;
    background: linear-gradient(135deg, #f59e0b, #eab308);
    color: #1c1917; font-weight: 700;
    padding: 14px 22px; border-radius: 12px;
    box-shadow: 0 8px 24px rgba(245,158,11,.45);
    transform: translateY(20px); opacity: 0;
    transition: transform .35s ease, opacity .35s ease;
    pointer-events: none;
}
.tah-lms-toast[hidden] { display: none !important; }
.tah-lms-toast.tah-lms-toast-show {
    transform: translateY(0); opacity: 1;
}
.tah-lms-toast strong { color: #1c1917; }

/* ── Página pública de verificación ────────────────────────────────────── */
.tah-verify-page {
    max-width: 600px; margin: 60px auto; padding: 20px;
    color: #fafaf9;
    box-sizing: border-box;
}
.tah-verify-header { text-align: center; margin-bottom: 24px; }
.tah-verify-header h1 { font-size: 1.75rem; margin: 0 0 8px; line-height: 1.2; }
.tah-verify-header p  { margin: 0; opacity: .75; font-size: .95rem; }
.tah-verify-logo {
    max-width: 100px;
    max-height: 80px;
    width: auto; height: auto;
    margin: 0 auto 12px;
    display: block;
    object-fit: contain;
}
.tah-verify-card {
    padding: 28px; border-radius: 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    text-align: center;
    box-sizing: border-box;
}
.tah-verify-card h2 { font-size: 1.4rem; margin: 0 0 14px; }
.tah-verify-icon { font-size: 3rem; margin-bottom: 10px; }
.tah-verify-valid  { border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.06); }
.tah-verify-invalid{ border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.06); }
.tah-verify-revoked{ border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.06); }
.tah-verify-data {
    display: grid; grid-template-columns: 1fr 2fr; gap: 8px 18px;
    text-align: left; margin-top: 20px;
}
.tah-verify-data dt { color: #a8a29e; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.tah-verify-data dd { margin: 0; font-weight: 600; word-break: break-word; overflow-wrap: anywhere; }
.tah-verify-data dd code {
    font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .82rem;
    background: rgba(255,255,255,.06);
    padding: 4px 8px;
    border-radius: 6px;
    word-break: break-all;
    overflow-wrap: anywhere;
    display: inline-block;
    max-width: 100%;
}
.tah-verify-form { display: flex; gap: 8px; margin-top: 14px; }
.tah-verify-form input { flex: 1; padding: 10px 14px; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); color: #fafaf9; min-width: 0; }

/* ── Verificador en móvil ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .tah-verify-page {
        margin: 24px auto;
        padding: 16px 14px;
        max-width: 100%;
    }
    .tah-verify-header { margin-bottom: 16px; }
    .tah-verify-header h1 { font-size: 1.3rem; }
    .tah-verify-header p  { font-size: .85rem; }
    .tah-verify-logo {
        max-width: 70px;
        max-height: 56px;
        margin-bottom: 8px;
    }
    .tah-verify-card {
        padding: 20px 16px;
        border-radius: 12px;
    }
    .tah-verify-card h2 { font-size: 1.15rem; }
    .tah-verify-icon { font-size: 2.4rem; }
    /* En móvil: label arriba, valor abajo (single column) para que el código
       de verificación y demás textos largos no se desborden */
    .tah-verify-data {
        grid-template-columns: 1fr;
        gap: 2px 0;
        margin-top: 16px;
    }
    .tah-verify-data dt {
        font-size: .72rem;
        margin-top: 10px;
    }
    .tah-verify-data dt:first-child { margin-top: 0; }
    .tah-verify-data dd {
        font-size: .95rem;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255,255,255,.06);
    }
    .tah-verify-data dd:last-child { border-bottom: none; }
    .tah-verify-data dd code {
        font-size: .75rem;
        padding: 3px 6px;
    }
    .tah-verify-form {
        flex-direction: column;
    }
}

/* Variante del modal-card cuando hosteamos la pantalla nueva del streamer.
   Lo dejamos transparente y sin padding para que el .tah-sl-screen ocupe
   todo el área, manteniendo el botón cerrar por encima. */
.tah-live-modal-card--streamer {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    max-width: 480px;
}
.tah-live-modal-card--streamer .tah-live-modal-close {
    top: 12px; right: 12px;
    z-index: 60;
    background: rgba(0,0,0,.7);
    border: 1px solid rgba(255,255,255,.2);
}
.tah-live-modal-card--streamer .tah-sl-screen {
    max-height: 92vh;
    overflow-y: auto;
    /* El scroll vive DENTRO del copiloto: contain evita que el gesto se
       propague al fondo de la app al llegar al tope (scroll chaining). */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* =====================================================================
   SD LIVE · INTERFAZ DEL STREAMER EN TIEMPO REAL  (sección "screen")
   Implementación del spec entregado: 2 luces (Momentum/Safety) + 1
   tarjeta de instrucción + critical takeover. Prefijo .tah-sl- para
   no chocar con otros estilos. Vive dentro del modal del live.
   ===================================================================== */

.tah-sl-screen {
    --tah-sl-bg:#0E0D14;
    --tah-sl-panel:#16151F;
    --tah-sl-panel-2:#1E1C2A;
    --tah-sl-line:#2A2838;
    --tah-sl-lilac:#6B5CE7;
    --tah-sl-lilac-soft:#8E82F0;
    --tah-sl-white:#F4F2FF;
    --tah-sl-muted:#8B8898;
    --tah-sl-green:#2FD179;
    --tah-sl-amber:#F5B23E;
    --tah-sl-red:#F5544E;
    --tah-sl-cyan:#3FC8E0;

    position: relative;
    background: var(--tah-sl-bg);
    color: var(--tah-sl-white);
    border: 1px solid #211F2E;
    border-radius: 24px;
    overflow: hidden;
    min-height: 600px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hanken Grotesk", Roboto, sans-serif;
}

/* Topbar */
.tah-sl-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--tah-sl-line);
}
.tah-sl-brand { display: flex; align-items: center; gap: 8px; }
.tah-sl-brand-dot {
    width: 22px; height: 22px; border-radius: 7px;
    background: linear-gradient(135deg, var(--tah-sl-lilac), #4A3DC0);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 12px; color: #fff;
}
.tah-sl-brand b {
    font-weight: 700; font-size: 13px; letter-spacing: -.01em;
}
.tah-sl-live-pill {
    display: flex; align-items: center; gap: 6px;
    background: rgba(245,84,78,.12);
    border: 1px solid rgba(245,84,78,.4);
    color: #FF8C88;
    border-radius: 999px; padding: 4px 10px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
}
.tah-sl-live-pill .tah-sl-blink {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--tah-sl-red);
    animation: tah-sl-blink 1.4s infinite;
}
.tah-sl-timer {
    font-size: 11px; font-weight: 600;
    color: var(--tah-sl-muted);
    font-variant-numeric: tabular-nums;
}

/* Rótulos de sección */
.tah-sl-seclabel {
    display: flex; align-items: center; gap: 8px;
    padding: 0 18px; margin: 16px 0 9px;
    font-size: 10px; font-weight: 700;
    letter-spacing: .2em; text-transform: uppercase;
    color: var(--tah-sl-muted);
}
.tah-sl-seclabel::after {
    content: ""; flex: 1; height: 1px; background: var(--tah-sl-line);
}

/* Zona de estado: 2 luces */
.tah-sl-status { display: flex; gap: 11px; padding: 0 16px; }
.tah-sl-orb-card {
    flex: 1; display: flex; align-items: center; gap: 11px;
    background: var(--tah-sl-panel);
    border: 1px solid var(--tah-sl-line);
    border-radius: 16px; padding: 14px 12px;
}
.tah-sl-orb {
    position: relative;
    width: 38px; height: 38px; border-radius: 50%;
    flex-shrink: 0;
    transition: background .4s, box-shadow .4s;
}
.tah-sl-orb::after {
    content: ""; position: absolute; inset: 8px;
    border-radius: 50%; background: rgba(255,255,255,.16);
}
.tah-sl-orb.is-green { background: var(--tah-sl-green); box-shadow: 0 0 16px rgba(47,209,121,.55); }
.tah-sl-orb.is-amber { background: var(--tah-sl-amber); box-shadow: 0 0 16px rgba(245,178,62,.55); }
.tah-sl-orb.is-red   { background: var(--tah-sl-red);   box-shadow: 0 0 18px rgba(245,84,78,.7);
                       animation: tah-sl-pulseRed 1s infinite; }
.tah-sl-orb-meta .tah-sl-ttl {
    margin-bottom: 3px;
    font-size: 10px; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--tah-sl-muted);
}
.tah-sl-orb-meta .tah-sl-val {
    font-weight: 700; font-size: 15px; letter-spacing: -.01em;
    transition: color .3s;
}
.tah-sl-val.is-green { color: var(--tah-sl-green); }
.tah-sl-val.is-amber { color: var(--tah-sl-amber); }
.tah-sl-val.is-red   { color: var(--tah-sl-red); }

/* Zona de instrucción: tarjeta */
.tah-sl-instr-wrap { padding: 0 16px 18px; }
.tah-sl-instr {
    position: relative;
    background: var(--tah-sl-panel-2);
    border: 1px solid var(--tah-sl-line);
    border-radius: 20px;
    padding: 20px 18px 20px 20px;
    overflow: hidden;
    transition: border-color .35s;
}
.tah-sl-instr::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0;
    width: 5px;
    background: var(--tah-sl-cat-color, var(--tah-sl-lilac));
    transition: background .35s;
}
.tah-sl-instr.is-flash { animation: tah-sl-flash .55s ease; }
/* Brillo de aviso: cuando llega una nueva alerta/sugerencia, la tarjeta
   "Qué hacer ahora" pulsa con el color de la categoría (rojo = riesgo,
   verde = rendimiento, etc.) para que el creador la note sin distraerse. */
.tah-sl-instr.is-alert-glow { animation: tah-sl-glow 1s ease-in-out 3; }
.tah-sl-instr.is-flash.is-alert-glow {
    animation: tah-sl-flash .55s ease, tah-sl-glow 1s ease-in-out 3;
}
.tah-sl-cat-tag {
    display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: 14px; padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px; font-weight: 700;
    letter-spacing: .13em; text-transform: uppercase;
    color: var(--tah-sl-cat-color, var(--tah-sl-lilac-soft));
    background: color-mix(in srgb, var(--tah-sl-cat-color, var(--tah-sl-lilac)) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--tah-sl-cat-color, var(--tah-sl-lilac)) 35%, transparent);
}
.tah-sl-cat-tag .tah-sl-tdot {
    width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}
.tah-sl-instr-body { display: flex; align-items: center; gap: 15px; }
.tah-sl-icon-box {
    width: 56px; height: 56px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 15px; font-size: 27px;
    background: color-mix(in srgb, var(--tah-sl-cat-color, var(--tah-sl-lilac)) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--tah-sl-cat-color, var(--tah-sl-lilac)) 30%, transparent);
    overflow: hidden;
}
/* Avatar de LOLA en la tarjeta de instrucción (reemplaza al emoji cuando
   hay imagen configurada en Branding → avatar del chat IA). */
.tah-sl-icon-box .tah-sl-icon-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}
/* Feed de eventos en tiempo real (websocket de TikTok + moderación AV).
   Feed único: las detecciones de la app de moderación (buenas y malas) se
   muestran aquí mismo, lo que libera espacio y da más aire al popup. */
.tah-sl-feed {
    max-height: 240px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex; flex-direction: column; gap: 6px;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
}
.tah-sl-feed-empty {
    font-size: 12px; color: #8B8898; padding: 6px 0;
}
.tah-sl-feed-item {
    display: flex; align-items: baseline; gap: 7px;
    font-size: 12.5px; line-height: 1.35;
    color: #D8D5E2;
    animation: tahSlFeedIn .25s ease;
}
@keyframes tahSlFeedIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}
.tah-sl-feed-time {
    flex-shrink: 0; font-size: 10px; color: #6E6B7B;
    font-variant-numeric: tabular-nums;
}
.tah-sl-feed-ico { flex-shrink: 0; }
.tah-sl-feed-txt { word-break: break-word; }
.tah-sl-feed-item.is-gift   .tah-sl-feed-txt { color: #F5B23E; font-weight: 600; }
.tah-sl-feed-item.is-follow .tah-sl-feed-txt { color: #2FD179; }
.tah-sl-feed-item.is-risk   .tah-sl-feed-txt { color: #F5544E; font-weight: 600; }
.tah-sl-feed-item.is-pos    .tah-sl-feed-txt { color: #2FD179; font-weight: 600; }
.tah-sl-instr-text {
    font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: -.02em;
    color: var(--tah-sl-white);
}
.tah-sl-instr-sub {
    margin-top: 5px; font-size: 12.5px; line-height: 1.4;
    color: var(--tah-sl-muted);
}
.tah-sl-instr-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 16px; padding-top: 13px;
    border-top: 1px solid var(--tah-sl-line);
}
.tah-sl-instr-foot .tah-sl-hint {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; color: var(--tah-sl-muted);
}
.tah-sl-priobars { display: flex; gap: 3px; }
.tah-sl-priobars i {
    width: 14px; height: 4px; border-radius: 2px;
    background: var(--tah-sl-line);
}
.tah-sl-priobars i.is-on { background: var(--tah-sl-cat-color, var(--tah-sl-lilac)); }

/* Leyenda */
.tah-sl-legend {
    display: flex; gap: 14px; padding: 12px 16px;
    background: var(--tah-sl-panel);
    border-top: 1px solid var(--tah-sl-line);
}
.tah-sl-legend .tah-sl-lg { display: flex; align-items: flex-start; gap: 8px; flex: 1; }
.tah-sl-legend .tah-sl-lk {
    width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px;
    border-radius: 5px;
    border: 1px solid var(--tah-sl-line);
}
.tah-sl-legend .tah-sl-lk.is-orb { border-radius: 50%; background: var(--tah-sl-green); }
.tah-sl-legend .tah-sl-lk.is-card { background: var(--tah-sl-lilac); }
.tah-sl-legend .tah-sl-lg p {
    font-size: 10.5px; line-height: 1.35; color: var(--tah-sl-muted); margin: 0;
}
.tah-sl-legend .tah-sl-lg p b {
    display: block; font-size: 11px; font-weight: 700;
    color: var(--tah-sl-white);
}

/* Critical takeover */
.tah-sl-critical {
    position: absolute; inset: 0; z-index: 50;
    display: none;
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 28px 24px;
    background: radial-gradient(circle at 50% 35%, #7A1410, #3A0807 75%);
    animation: tah-sl-critIn .3s ease;
}
.tah-sl-critical.is-show { display: flex; }
.tah-sl-critical::before {
    content: ""; position: absolute; inset: 0;
    border: 3px solid var(--tah-sl-red); border-radius: 24px;
    animation: tah-sl-critBorder 1s infinite;
    pointer-events: none;
}
.tah-sl-crit-tag {
    margin-bottom: 22px; padding: 7px 16px;
    border-radius: 999px;
    font-size: 11px; font-weight: 800;
    letter-spacing: .22em; text-transform: uppercase;
    color: #FFD2CF;
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.25);
}
.tah-sl-crit-icon {
    font-size: 54px; margin-bottom: 8px;
    animation: tah-sl-shake 1.1s infinite;
}
.tah-sl-crit-text {
    margin-bottom: 10px;
    font-weight: 800; font-size: 26px; line-height: 1.15; letter-spacing: -.02em;
    color: #fff;
}
.tah-sl-crit-sub {
    max-width: 280px; margin: 0 auto 22px;
    font-size: 13px; line-height: 1.45; color: #FFC9C6;
}
.tah-sl-crit-count {
    width: 96px; height: 96px; margin: 0 auto 8px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,.25);
    background: rgba(0,0,0,.25);
}
.tah-sl-crit-count b {
    font-weight: 800; font-size: 34px; line-height: 1; color: #fff;
    font-variant-numeric: tabular-nums;
}
.tah-sl-crit-count span {
    margin-top: 3px; font-size: 9px;
    letter-spacing: .14em; text-transform: uppercase; color: #FFC9C6;
}
.tah-sl-crit-op {
    display: inline-flex; align-items: center; gap: 7px;
    margin: 14px 0 18px; font-size: 11px; color: #FFB3AF;
}
.tah-sl-crit-op .tah-sl-pgreen {
    width: 7px; height: 7px; border-radius: 50%;
    background: #FF6B66;
    animation: tah-sl-blink 1.1s infinite;
}
.tah-sl-crit-btn {
    padding: 13px 26px;
    border: none; border-radius: 11px;
    background: #fff; color: #7A1410;
    font-weight: 700; font-size: 13px;
    cursor: pointer; transition: background .15s;
}
.tah-sl-crit-btn:hover { background: #FFE9E8; }

/* Métricas en vivo (números reales) — carrusel horizontal: al pasar de 4
   tarjetas la fila se desliza lateralmente con snap, sin romper el diseño. */
.tah-sl-metrics {
    display: flex; flex-wrap: nowrap;
    gap: 8px; padding: 0 16px 6px;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;            /* Firefox: oculta la barra, deja el swipe */
    overscroll-behavior-x: contain;
}
.tah-sl-metrics::-webkit-scrollbar { display: none; }  /* WebKit/Blink */
.tah-sl-metric {
    display: flex; flex-direction: column; align-items: center;
    gap: 2px; padding: 11px 6px;
    flex: 0 0 auto; min-width: 86px;  /* tamaño fijo → la fila hace scroll */
    scroll-snap-align: start;
    background: var(--tah-sl-panel);
    border: 1px solid var(--tah-sl-line);
    border-radius: 14px; text-align: center;
}
/* Tarjetas tocables: abren el popup con el detalle (quién regaló/comentó…). */
.tah-sl-metric.is-tappable {
    cursor: pointer;
    transition: transform .12s ease, border-color .15s ease, background .15s ease;
}
.tah-sl-metric.is-tappable::after {
    content: "›";
    position: absolute; top: 7px; right: 9px;
    font-size: 13px; line-height: 1; color: var(--tah-sl-muted);
    opacity: .55; transition: opacity .15s ease;
}
.tah-sl-metric.is-tappable {
    position: relative;
}
.tah-sl-metric.is-tappable:hover,
.tah-sl-metric.is-tappable:focus-visible {
    transform: translateY(-2px);
    border-color: var(--tah-sl-lilac);
    background: var(--tah-sl-panel-2);
    outline: none;
}
.tah-sl-metric.is-tappable:hover::after,
.tah-sl-metric.is-tappable:focus-visible::after { opacity: 1; }
.tah-sl-metric.is-tappable:active { transform: translateY(0) scale(.98); }
.tah-sl-metric-icon { font-size: 16px; line-height: 1; }
.tah-sl-metric-val {
    font-weight: 800; font-size: 18px; line-height: 1.1;
    color: var(--tah-sl-white);
    font-variant-numeric: tabular-nums;
}
.tah-sl-metric-lbl {
    font-size: 9px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--tah-sl-muted);
}
.tah-sl-metric-sub {
    font-size: 10px; font-weight: 600; color: var(--tah-sl-muted);
    font-variant-numeric: tabular-nums;
}

/* Popup de detalle de métrica (quién regaló / comentó / siguió / entró).
   Vive a nivel superior, por encima del modal del live (z-index 100003).
   Colores explícitos: no hereda las variables --tah-sl-* del .tah-sl-screen. */
.tah-sl-metric-modal {
    position: fixed; inset: 0; z-index: 100004;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.tah-sl-metric-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.82); backdrop-filter: blur(8px);
}
.tah-sl-metric-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 420px; max-height: 78vh;
    display: flex; flex-direction: column;
    background: #16151F; border: 1px solid #2A2838;
    border-radius: 18px; padding: 20px 18px 16px;
    color: #F4F2FF;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
    animation: tah-inbox-pop .22s ease;
}
.tah-sl-metric-close {
    position: absolute; top: 12px; right: 14px;
    width: 30px; height: 30px;
    border: 1px solid rgba(255,255,255,.18); border-radius: 50%;
    background: #1E1C2A; color: #fff;
    font-size: 19px; line-height: 1; cursor: pointer;
    transition: all .15s ease;
}
.tah-sl-metric-close:hover { background: #F5544E; border-color: #F5544E; transform: scale(1.05); }
.tah-sl-metric-modal-head {
    display: flex; align-items: center; gap: 10px;
    padding-right: 40px; margin-bottom: 14px;
}
.tah-sl-metric-modal-ico {
    width: 40px; height: 40px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; font-size: 20px;
    background: rgba(107,92,231,.16); border: 1px solid rgba(107,92,231,.32);
}
.tah-sl-metric-modal-title {
    margin: 0; font-size: 17px; font-weight: 800; color: #F4F2FF;
    line-height: 1.25; letter-spacing: -.01em;
}
.tah-sl-metric-modal-body {
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    margin: 0 -4px; padding: 0 4px;
}
.tah-sl-metric-modal-loading,
.tah-sl-metric-modal-empty {
    font-size: 13px; color: #8B8898; text-align: center;
    padding: 26px 10px; font-style: italic;
}
.tah-sl-mlist { display: flex; flex-direction: column; gap: 4px; }
.tah-sl-mrow {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 8px; border-radius: 11px;
    background: rgba(255,255,255,.03);
}
.tah-sl-mrow-av {
    width: 34px; height: 34px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 14px; font-weight: 800;
    color: #F4F2FF;
    background: linear-gradient(135deg, #6B5CE7, #4A3DC0);
}
.tah-sl-mrow-av.is-rank { background: none; font-size: 19px; }
.tah-sl-mrow-main { flex: 1; min-width: 0; }
.tah-sl-mrow-name {
    font-size: 13.5px; font-weight: 700; color: #F4F2FF;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tah-sl-mrow-sub {
    font-size: 12px; color: #B8B5C6; line-height: 1.35;
    margin-top: 1px; word-break: break-word;
}
.tah-sl-mrow-sub.is-gift { color: #F5B23E; font-weight: 600; font-variant-numeric: tabular-nums; }
.tah-sl-mrow-time {
    flex-shrink: 0; font-size: 10px; color: #6E6B7B;
    font-variant-numeric: tabular-nums; align-self: flex-start; margin-top: 3px;
}

/* Barra de meta de diamantes */
.tah-sl-goal { padding: 12px 16px 0; }
.tah-sl-goal-head {
    display: flex; justify-content: space-between;
    font-size: 11px; font-weight: 700; color: var(--tah-sl-muted);
    margin-bottom: 6px;
}
.tah-sl-goal-head span:last-child {
    color: var(--tah-sl-amber); font-variant-numeric: tabular-nums;
}
.tah-sl-goal-track {
    height: 8px; border-radius: 999px;
    background: var(--tah-sl-panel-2); overflow: hidden;
}
.tah-sl-goal-fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--tah-sl-amber), #FFD27A);
    transition: width .4s ease;
}

/* Informe final del live */
.tah-sl-report {
    position: absolute; inset: 0; z-index: 60;
    display: none;
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 28px 24px;
    background: radial-gradient(circle at 50% 25%, #1B2540, #0E0D14 78%);
    overflow-y: auto;
    animation: tah-sl-critIn .3s ease;
}
.tah-sl-report.is-show { display: flex; }
.tah-sl-report-icon { font-size: 46px; margin-bottom: 10px; }
.tah-sl-report-title {
    font-weight: 800; font-size: 22px; line-height: 1.2;
    letter-spacing: -.02em; color: var(--tah-sl-white);
    margin-bottom: 14px;
}
.tah-sl-report-body {
    max-width: 320px; margin: 0 auto 18px;
    font-size: 13.5px; line-height: 1.55; color: #C9C7D6;
    white-space: pre-wrap;
}
.tah-sl-report-loading { color: var(--tah-sl-muted); font-style: italic; }
.tah-sl-report-stats {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
    margin-bottom: 22px;
}
.tah-sl-report-chip {
    display: flex; flex-direction: column; align-items: center;
    min-width: 64px; padding: 9px 12px;
    background: var(--tah-sl-panel); border: 1px solid var(--tah-sl-line);
    border-radius: 12px;
}
.tah-sl-report-chip b {
    font-size: 14px; font-weight: 800; color: var(--tah-sl-white);
    font-variant-numeric: tabular-nums;
}
.tah-sl-report-chip span {
    font-size: 9px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--tah-sl-muted); margin-top: 2px;
}

/* Animaciones */
@keyframes tah-sl-blink {
    0%,100% { opacity: 1; }
    50%     { opacity: .25; }
}
@keyframes tah-sl-pulseRed {
    0%,100% { box-shadow: 0 0 14px rgba(245,84,78,.5); }
    50%     { box-shadow: 0 0 26px rgba(245,84,78,.95); }
}
@keyframes tah-sl-flash {
    0%   { transform: scale(.985); opacity: .4; }
    100% { transform: scale(1);    opacity: 1; }
}
@keyframes tah-sl-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 transparent;
        border-color: var(--tah-sl-line);
    }
    40% {
        box-shadow: 0 0 26px 5px color-mix(in srgb, var(--tah-sl-cat-color, var(--tah-sl-lilac)) 60%, transparent);
        border-color: var(--tah-sl-cat-color, var(--tah-sl-lilac));
    }
}
@keyframes tah-sl-critIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes tah-sl-critBorder {
    0%,100% { opacity: .35; }
    50%     { opacity: 1; }
}
@keyframes tah-sl-shake {
    0%,100% { transform: rotate(0); }
    25%     { transform: rotate(-9deg); }
    75%     { transform: rotate(9deg); }
}

@media (max-width: 430px) {
    .tah-sl-instr-text { font-size: 18px; }
    .tah-sl-crit-text { font-size: 22px; }
    .tah-sl-metrics { gap: 6px; padding: 0 12px 6px; }
    .tah-sl-metric { padding: 9px 3px; min-width: 78px; }
    .tah-sl-metric-val { font-size: 16px; }
    .tah-sl-metric-lbl { font-size: 8px; letter-spacing: .04em; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   v6 — SISTEMA DE PESTAÑAS TIPO APP (Instagram/TikTok)
   ---------------------------------------------------------------------------
   En escritorio (>720px) las vistas son transparentes al layout
   (display:contents) y todo se ve apilado como siempre.
   En móvil, tah-ui.js marca body.tah-has-tabs y body.tah-tab-<tab>;
   solo la vista activa es visible y la bottom-nav navega entre ellas.
   ═══════════════════════════════════════════════════════════════════════════ */

.tah-view { display: contents; }

/* La vista LIVE solo existe en móvil: en escritorio sus controles
   equivalentes viven en el header del dashboard. */
@media (min-width: 721px) {
    #tah-view-live { display: none; }
}

/* ── Filas de perfil (Recompensas / Invitar) ────────────────────────────── */
.tah-profile-row {
    display: flex; align-items: center; gap: 12px;
    width: 100%;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    color: var(--tah-text);
    font: inherit; text-align: left; cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.tah-profile-row:hover { border-color: var(--tah-primary); }
.tah-profile-row-icon { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.tah-profile-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tah-profile-row-info strong { font-size: .9rem; }
.tah-profile-row-info small  { color: var(--tah-text-muted); font-size: .72rem; }
.tah-profile-row-value {
    color: var(--tah-text-muted); font-size: .85rem; font-weight: 700;
    white-space: nowrap; flex-shrink: 0;
}
/* Las filas de perfil y el CTA del checklist llevan las clases FUNCIONALES
   .tah-wallet-trigger / .tah-affiliate-share-btn (son los triggers de JS),
   pero NO deben heredar el estilo de píldora del header (que usa !important). */
.tah-profile-row.tah-wallet-trigger,
.tah-profile-row.tah-affiliate-share-btn {
    display: flex !important;
    margin-left: 0 !important;
    padding: 14px 16px !important;
    border-radius: var(--tah-radius) !important;
    background: var(--tah-bg-card) !important;
    border: 1px solid var(--tah-border) !important;
    color: var(--tah-text) !important;
    box-shadow: none !important;
    font-size: inherit !important;
    font-weight: normal !important;
}
.tah-profile-row.tah-wallet-trigger:hover,
.tah-profile-row.tah-affiliate-share-btn:hover {
    transform: none !important;
    background: var(--tah-bg-card) !important;
    border-color: var(--tah-primary) !important;
    box-shadow: none !important;
    color: var(--tah-text) !important;
}
.tah-checklist-cta.tah-affiliate-share-btn {
    display: inline !important;
    background: none !important;
    border: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: var(--tah-primary) !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    font-family: inherit;
    cursor: pointer;
}
.tah-checklist-cta.tah-affiliate-share-btn:hover { color: #F2C071 !important; }

/* ── Hub de la pestaña LIVE ─────────────────────────────────────────────── */
.tah-live-hub { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.tah-live-hub-idle,
.tah-live-hub-active {
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    padding: 28px 20px;
    text-align: center;
}
.tah-live-hub-icon { font-size: 2.4rem; margin-bottom: 8px; }
.tah-live-hub-idle h3 { margin: 0 0 8px; font-size: 1.1rem; }
.tah-live-hub-idle p,
.tah-live-hub-active p { color: var(--tah-text-muted); font-size: .85rem; margin: 0 0 16px; }
.tah-live-hub-start,
.tah-live-hub-open {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; max-width: 320px;
    background: linear-gradient(135deg, #E0574A, #c23f34) !important; /* v6.67.1: rojo pleno con !important (pedido) */
    box-shadow: 0 0 22px rgba(224,87,74,.35) !important;
    color: #fff; border: 0; border-radius: 12px;
    padding: 14px 20px; font-size: 1rem; font-weight: 800; cursor: pointer;
    transition: filter .15s ease, transform .1s ease;
}
.tah-live-hub-start:active,
.tah-live-hub-open:active { transform: scale(.97); }
.tah-live-hub-start:disabled { opacity: .6; cursor: wait; }
.tah-live-hub-stop {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 10px;
    background: none; border: 1px solid var(--tah-border);
    color: var(--tah-text-muted); border-radius: 10px;
    padding: 10px 18px; font-size: .85rem; cursor: pointer;
}
.tah-live-hub-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(232, 161, 58, .12);
    color: var(--tah-primary);
    border-radius: 999px; padding: 6px 14px;
    font-weight: 800; font-size: .85rem; letter-spacing: .06em;
    margin-bottom: 10px;
}
.tah-live-hub-arena {
    display: flex; align-items: center; gap: 12px;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    padding: 14px 16px;
    color: var(--tah-text); text-decoration: none;
    transition: border-color .15s ease;
}
.tah-live-hub-arena:hover { border-color: var(--tah-primary); }
.tah-live-hub-arena-icon { font-size: 1.3rem; }
.tah-live-hub-arena-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tah-live-hub-arena-info small { color: var(--tah-text-muted); font-size: .72rem; }

/* Estados en-vivo / sin-vivo del hub (body.tah-is-live lo pone public.js) */
.tah-live-hub-active { display: none; }
body.tah-is-live .tah-live-hub-active { display: block; }
body.tah-is-live .tah-live-hub-idle   { display: none; }

/* ── Botones de la bottom-nav (5 pestañas) ──────────────────────────────── */
.tah-tab-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: 0; cursor: pointer;
    padding: 6px 2px 4px;
    color: var(--tah-text-muted);
    font-size: .62rem; font-weight: 600; font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease;
}
.tah-tab-btn.is-active { color: var(--tah-primary); }
.tah-tab-btn .tah-icon, .tah-tab-btn svg { display: block; }

/* Pestaña central LIVE: círculo elevado estilo TikTok */
.tah-tab-btn-live { position: relative; }
.tah-tab-live-circle {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 50%;
    margin-top: -20px;
    background: linear-gradient(135deg, var(--tah-live, #E0574A), #c23f34);
    color: #fff;
    box-shadow: 0 4px 14px rgba(224, 87, 74, .45);
    transition: transform .12s ease;
}
.tah-tab-btn-live:active .tah-tab-live-circle { transform: scale(.94); }
.tah-tab-live-dot {
    display: none;
    position: absolute; top: -1px; right: -1px;
    width: 12px; height: 12px; border-radius: 50%;
    background: #ff1744; border: 2px solid #080B10;
    animation: tahTabLivePulse 1.4s ease-in-out infinite;
}
body.tah-is-live .tah-tab-live-dot { display: block; }
@keyframes tahTabLivePulse {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%      { transform: scale(1.35); opacity: .6; }
}

/* ── Indicador de pull-to-refresh (PWA standalone) ──────────────────────── */
.tah-ptr {
    position: fixed; top: calc(6px + env(safe-area-inset-top)); left: 50%;
    transform: translateX(-50%);
    z-index: 100010;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    display: none; align-items: center; justify-content: center;
    color: var(--tah-text-muted); font-size: 1.1rem; font-weight: 800;
    transition: color .15s ease;
}
.tah-ptr.is-visible { display: flex; }
.tah-ptr.is-ready   { color: var(--tah-primary); }
.tah-ptr.is-loading .tah-ptr-icon { display: inline-block; animation: tahPtrSpin .7s linear infinite; }
@keyframes tahPtrSpin { to { transform: rotate(360deg); } }

/* ── Comportamiento móvil del sistema de pestañas ───────────────────────── */
@media (max-width: 720px) {

    /* Solo la vista activa es visible */
    body.tah-has-tabs .tah-view { display: none; }
    body.tah-has-tabs.tah-tab-home     #tah-view-home,
    body.tah-has-tabs.tah-tab-misiones #tah-view-misiones,
    body.tah-has-tabs.tah-tab-wallet   #tah-view-wallet,
    body.tah-has-tabs.tah-tab-invitar  #tah-view-invitar,
    body.tah-has-tabs.tah-tab-live     #tah-view-live,
    body.tah-has-tabs.tah-tab-perfil   #tah-view-perfil { display: block; }

    /* v6.2: Iniciar Live / Arena / LIVE / Terminar / 🔔 / 🔄 viven ahora en la
       profcard del Inicio (estilo mockup), así que ya no se ocultan en móvil.
       Solo el refresh sobra en PWA standalone (existe pull-to-refresh). */
    @media (display-mode: standalone) {
        body.tah-has-tabs #tah-refresh-trigger { display: none !important; }
    }

    /* Pestaña Perfil: el panel de edición se muestra siempre (es la pestaña),
       y "Cancelar" sobra porque no hay nada que plegar. */
    body.tah-has-tabs.tah-tab-perfil #tah-profile-panel { display: block !important; }
    body.tah-has-tabs.tah-tab-perfil #tah-profile-cancel { display: none; }

    /* Academia como vista de pestaña: el elemento del modal se re-estiliza
       como página estática (sin overlay, sin botón de cerrar, sin animación) */
    .tah-academia-modal.tah-academia-as-view {
        position: static; z-index: auto; display: block;
    }
    .tah-academia-modal.tah-academia-as-view .tah-academia-modal-overlay,
    .tah-academia-modal.tah-academia-as-view .tah-academia-modal-close { display: none; }
    .tah-academia-modal.tah-academia-as-view .tah-academia-modal-box {
        position: static; max-width: none; max-height: none;
        overflow: visible; background: transparent;
        padding: 8px 0 0; animation: none;
    }

    /* La nav nueva es un poco más alta por el botón central elevado */
    body.tah-has-tabs .tah-dashboard { padding-bottom: 96px; }
    body.tah-has-tabs .tah-bottom-nav { padding-top: 8px; }

    /* Transición de pestañas más ágil que el crossfade por defecto */
    ::view-transition-old(root),
    ::view-transition-new(root) { animation-duration: .18s; }
}
@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Tema industrial v6.1 — tipografías display / mono
   (al final para ganar en cascada a los font-family de cada componente)
   ═══════════════════════════════════════════════════════════════════════ */
.tah-dashboard h2,
.tah-dashboard h3,
.tah-dash-info h2,
.tah-hero-value,
.tah-btn-primary,
.tah-btn-secondary,
.tah-live-start-btn,
.tah-live-hub-start,
.tah-live-hub-idle h3,
.tah-arena-btn,
.tah-prize-name,
.tah-prize-pct,
.tah-section-title,
.tah-tab-btn,
.tah-profile-row-info strong,
.tah-checklist-head strong,
.tah-backstage-value,
.tah-empty-state h3,
.tah-wallet-hero-title,
.tah-wallet-hero-amount,
.tah-wallet-stat-value {
    font-family: var(--tah-font-display);
}
.tah-hero-label,
.tah-hero-period,
.tah-backstage-label,
.tah-prize-tag,
.tah-checklist-progress-label,
.tah-profile-field label,
.tah-dash-status,
.tah-wallet-stat-label,
.tah-wallet-hero-code {
    font-family: var(--tah-font-mono);
}

/* Botón primario ámbar: texto oscuro para contraste (mayor especificidad) */
.tah-dashboard .tah-btn-primary { color: #1a1206; }

/* ═══════════════════════════════════════════════════════════════════════
   Academia (LMS) — acabado tema industrial v6.1
   (override al final: las clases .tah-lms-* traían grises/fuentes viejas)
   ═══════════════════════════════════════════════════════════════════════ */
.tah-lms-header h2 { font-family: var(--tah-font-display); font-weight: 700; color: var(--tah-text); font-size: 1.7rem; }
.tah-lms-subtitle  { color: var(--tah-text-muted); font-size: .9rem; }
.tah-lms-section-title {
    font-family: var(--tah-font-mono); font-size: .72rem; letter-spacing: .16em;
    text-transform: uppercase; color: var(--tah-text-subtle); font-weight: 600;
    display: flex; align-items: center; gap: 10px; margin-top: 26px;
}
.tah-lms-section-title::after { content: ""; flex: 1; height: 1px; background: var(--tah-border); }

.tah-lms-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tah-lms-stat-card {
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
}
.tah-lms-stat-label { font-family: var(--tah-font-mono); color: var(--tah-text-subtle); font-size: .62rem; letter-spacing: .08em; }
.tah-lms-stat-value { font-family: var(--tah-font-display); color: var(--tah-text); }

.tah-lms-certs-trigger { border-radius: var(--tah-radius); border-color: var(--tah-border); }
.tah-lms-certs-trigger-title   { font-family: var(--tah-font-display); color: var(--tah-text); }
.tah-lms-certs-trigger-sub     { color: var(--tah-text-muted); }
.tah-lms-certs-trigger-chevron { color: var(--tah-text-subtle); }

.tah-lms-course-card,
.tah-lms-cert-tile {
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
}
.tah-lms-course-card--done { border-color: var(--tah-secondary); }
.tah-lms-course-card h4    { font-family: var(--tah-font-display); color: var(--tah-text); }
.tah-lms-course-desc,
.tah-lms-course-status,
.tah-lms-course-reward     { color: var(--tah-text-muted); }
.tah-lms-course-thumb      { background-color: var(--tah-bg-input); }
.tah-lms-cert-tile-title   { font-family: var(--tah-font-display); color: var(--tah-text); }
.tah-lms-cert-tile-date    { color: var(--tah-text-muted); }
.tah-lms-progress-bar      { background: var(--tah-bg-input); border: 1px solid var(--tah-border); }

.tah-lms-courses-modal-box,
.tah-lms-certs-modal-box {
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: 18px;
}
.tah-lms-courses-modal-title,
.tah-lms-certs-modal-title { font-family: var(--tah-font-display); color: var(--tah-text); }
.tah-lms-chart-wrap    { background: var(--tah-bg-card); border: 1px solid var(--tah-border); border-radius: var(--tah-radius); }
.tah-lms-chart-wrap h3 { font-family: var(--tah-font-mono); text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; color: var(--tah-text-subtle); }

/* Lista de cursos INLINE (estilo lista del mockup; reemplaza el modal "Tus cursos") */
.tah-lms-course-list {
    display: flex; flex-direction: column;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    padding: 2px 15px; margin: 12px 0;
}
.tah-lms-course-row {
    display: flex; align-items: center; gap: 12px; width: 100%;
    text-align: left; cursor: pointer;
    background: none; border: 0; border-top: 1px solid var(--tah-border);
    padding: 13px 0; font-family: var(--tah-font);
}
.tah-lms-course-row:first-child { border-top: none; }
.tah-lms-course-row:hover .tah-lms-course-row-title { color: var(--tah-primary); }
.tah-lms-course-row-ico {
    width: 40px; height: 40px; flex: none; border-radius: 11px;
    background: var(--tah-bg-muted); border: 1px solid var(--tah-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; background-size: cover; background-position: center;
}
.tah-lms-course-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tah-lms-course-row-title { font-family: var(--tah-font-display); font-weight: 600; font-size: 14px; color: var(--tah-text); }
.tah-lms-course-row-status { font-family: var(--tah-font-mono); font-size: 11px; color: var(--tah-text-muted); }
.tah-lms-course-row.is-done .tah-lms-course-row-status { color: var(--tah-success); }
.tah-lms-course-row-chev { color: var(--tah-text-subtle); font-size: 20px; line-height: 1; }

/* Filas de diploma inline (mismo contenedor .tah-lms-course-list) */
.tah-lms-cert-row {
    display: flex; align-items: center; gap: 12px;
    border-top: 1px solid var(--tah-border); padding: 13px 0;
}
.tah-lms-cert-row:first-child { border-top: none; }
.tah-lms-cert-row.is-revoked { opacity: .55; }
.tah-lms-cert-dl {
    flex: none; width: 40px; height: 40px; border-radius: 11px;
    background: var(--tah-secondary-dim);
    border: 1px solid rgba(47,180,217,.4);
    color: var(--tah-secondary); font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease;
}
.tah-lms-cert-dl:hover { background: rgba(47,180,217,.22); }
.tah-lms-cert-badge { font-family: var(--tah-font-mono); font-size: 10px; letter-spacing: .04em; color: var(--tah-danger); }

/* ═══════════════════════════════════════════════════════════════════════
   v6.2 — "La Resistencia": componentes del prototipo (Código app sdlive)
   Tokens nuevos + profcard + misiones + bottom-sheet + invitar + wallet view
   ═══════════════════════════════════════════════════════════════════════ */
.tah-dashboard {
    /* v6.14 · La Red — el cian de la puerta de entrada. Solo se usa en el
       tercer botón de la fila de Inicio; dentro de La Red cada sala manda su
       propio color y este no vuelve a aparecer. */
    --tah-red-cyan:       #22D3EE;
    --tah-violet:         #9B8CE8;
    --tah-violet-dim:     rgba(155,140,232,.14);
    --tah-steel:          #6FA0C0;
    --tah-primary-deep:   #C77A1E;
    --tah-secondary-deep: #1E88A8;
}

/* ── Profcard (Home): avatar + identidad + acciones Live/Arena/campana ─── */
.tah-profcard {
    border: 1px solid var(--tah-border);
    border-radius: 20px;
    padding: 16px;
    margin: 10px 12px 0;
    background: linear-gradient(160deg, rgba(47,180,217,.08), rgba(15,22,32,.3));
}
.tah-prof-top { display: flex; align-items: center; gap: 12px; }
.tah-profcard .tah-avatar-btn { margin: 0; }
.tah-prof-id { flex: 1; min-width: 0; }
.tah-prof-handle {
    font-family: var(--tah-font-display); font-weight: 600;
    font-size: 15px; color: var(--tah-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tah-prof-name { font-size: 12px; color: var(--tah-text-muted); }
.tah-badge-active {
    font-family: var(--tah-font-mono); font-size: 9px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--tah-success);
    border: 1px solid rgba(63,190,143,.4); border-radius: 20px;
    padding: 4px 9px; display: flex; align-items: center; gap: 5px; flex: none;
}
.tah-badge-active::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--tah-success);
}
.tah-badge-active.is-inactive { color: var(--tah-danger); border-color: rgba(224,87,74,.4); }
.tah-badge-active.is-inactive::before { background: var(--tah-danger); }
.tah-prof-sub {
    font-family: var(--tah-font-mono); font-size: 10px; color: var(--tah-text-subtle);
    letter-spacing: .06em; text-transform: uppercase; margin: 12px 0;
}
.tah-prof-actions { display: flex; gap: 9px; }
.tah-pa {
    flex: 1; border: none; border-radius: 12px; padding: 12px;
    font-family: var(--tah-font-display); font-weight: 600; font-size: 14px;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    cursor: pointer; color: #fff; text-decoration: none; line-height: 1;
}
.tah-pa.tah-pa-live  { background: linear-gradient(135deg,#E0574A,#c23f34) !important; border: 1px solid rgba(224,87,74,.7) !important; color: #fff !important; box-shadow: 0 0 22px rgba(224,87,74,.35) !important; } /* v6.67.1: rojo pleno con !important (el wp_head fuerza estilos a todos los <button>) */
.tah-pa.tah-pa-arena { background: linear-gradient(90deg,#4a350f,#7a5a1e); border: 1px solid rgba(232,161,58,.5); }

/* v6.14 · La Red — tercer botón de la fila. El cian no compite con el rojo del
   live ni con el ámbar de la Arena, y en clave ciberpunk se lee como "red /
   conexión" sin necesidad de explicarlo. */
.tah-pa.tah-pa-red {
    background: linear-gradient(170deg, rgba(34,211,238,.26), rgba(10,66,80,.55));
    border: 1px solid rgba(34,211,238,.6);
    color: #B4EEF8;
    box-shadow: 0 0 22px rgba(34,211,238,.16);
    position: relative;
}
.tah-pa.tah-pa-red:hover { color: #E4FBFF; }
.tah-red-badge {
    position: absolute; top: -7px; right: -5px;
    min-width: 20px; height: 20px; padding: 0 6px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: #E0574A; /* v6.67: alerta de mensajes en rojo (pedido) */
    border: 2px solid #080B10;
    color: #fff;
    font-size: .66rem; font-weight: 700; line-height: 1;
}
.tah-pa:hover { filter: brightness(1.15); color: #fff; }
.tah-pa-bell {
    width: 46px; flex: none; border-radius: 12px;
    background: var(--tah-bg-muted); border: 1px solid var(--tah-border);
    position: relative; color: var(--tah-text); font-size: 17px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.tah-pa-bell .tah-inbox-badge {
    position: absolute; top: -6px; right: -6px;
    background: var(--tah-danger); color: #fff; font-size: 9px; font-weight: 700;
    border-radius: 20px; padding: 2px 5px; line-height: 1.2;
}
/* Estado "en vivo" del profcard (body.tah-is-live lo alterna en public.js) */
.tah-prof-actions .tah-live-trigger,
.tah-prof-actions .tah-live-stop-btn { flex: 1; }

/* ── Tarjeta "Hoy · Llama" ──────────────────────────────────────────────── */
.tah-today {
    border: 1px solid rgba(232,161,58,.3); border-radius: 18px;
    padding: 15px; margin: 12px 12px 0;
    background: linear-gradient(160deg, rgba(232,161,58,.1), rgba(15,22,32,.3));
}
.tah-today.is-done { border-color: rgba(63,190,143,.35); background: linear-gradient(160deg, rgba(63,190,143,.09), rgba(15,22,32,.3)); }
.tah-today-eye {
    font-family: var(--tah-font-mono); font-size: 10px; letter-spacing: .16em;
    color: var(--tah-primary); text-transform: uppercase;
}
.tah-today.is-done .tah-today-eye { color: var(--tah-success); }
.tah-today-main { display: flex; gap: 13px; align-items: center; margin: 11px 0 13px; }
.tah-today-flame { font-size: 32px; filter: grayscale(.3) brightness(.9); }
.tah-today.is-done .tah-today-flame { filter: none; }
.tah-today-t {
    font-family: var(--tah-font-display); font-weight: 600; font-size: 16px;
    color: var(--tah-text); line-height: 1.15;
}
.tah-today-s { font-size: 12px; color: var(--tah-text-muted); margin-top: 3px; line-height: 1.4; }
.tah-today-s b { color: var(--tah-primary); }
.tah-today-btn {
    width: 100%; border: none; border-radius: 12px; padding: 13px;
    font-family: var(--tah-font-display); font-weight: 600; font-size: 15px;
    background: linear-gradient(90deg, var(--tah-primary), var(--tah-primary-deep));
    color: #1a1206; cursor: pointer;
}
.tah-today-btn:hover { filter: brightness(1.08); }

/* ── Tarjeta LOLA (abre el chat IA) ─────────────────────────────────────── */
.tah-lola-card {
    display: flex; gap: 12px; border: 1px solid var(--tah-border);
    border-radius: 16px; padding: 14px; margin: 12px 12px 0;
    background: var(--tah-bg-card); cursor: pointer; width: calc(100% - 24px);
    text-align: left; font-family: var(--tah-font);
    /* <a> desde v6.19.3: mismo destino que el botón flotante. */
    text-decoration: none; color: inherit; box-sizing: border-box;
}
.tah-lola-card:hover { border-color: var(--tah-border-hover); }
.tah-lola-av {
    flex: none; width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg,#c4568f,#7d3fd0);
    display: flex; align-items: center; justify-content: center; font-size: 19px;
    background-size: cover; background-position: center;
}
.tah-lola-name {
    font-family: var(--tah-font-display); font-weight: 700; font-size: 13px;
    color: #e29ac4; letter-spacing: .02em;
}
.tah-lola-msg { font-size: 12.5px; color: var(--tah-text-muted); line-height: 1.5; margin-top: 3px; }

/* ── Tu Base (retención) ───────────────────────────────────────────────── */
.tah-base {
    border: 1px solid rgba(47,180,217,.3); border-radius: 18px;
    padding: 16px; margin: 12px 12px 0; overflow: hidden;
    background: linear-gradient(160deg, rgba(47,180,217,.1), rgba(15,22,32,.35) 60%);
}
.tah-base-eye {
    font-family: var(--tah-font-mono); font-size: 10px; letter-spacing: .14em;
    color: var(--tah-secondary); text-transform: uppercase;
}
.tah-base-t {
    font-family: var(--tah-font-display); font-weight: 700; font-size: 19px;
    color: var(--tah-text); line-height: 1.1; margin-top: 6px;
}
.tah-base-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 14px 0 13px; }
.tah-bcell {
    background: rgba(8,11,16,.5); border: 1px solid var(--tah-border);
    border-radius: 12px; padding: 11px;
}
.tah-bcell .tah-bi { font-size: 18px; }
.tah-bcell .tah-bt {
    font-family: var(--tah-font-display); font-weight: 600; font-size: 12.5px;
    color: var(--tah-text); margin-top: 5px; line-height: 1.15;
}
.tah-bcell .tah-bs { font-size: 10.5px; color: var(--tah-text-subtle); margin-top: 2px; }
.tah-base-hold {
    background: rgba(8,11,16,.5); border: 1px solid var(--tah-border);
    border-radius: 12px; padding: 12px 13px;
}
.tah-bh-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 0; font-size: 12.5px; color: var(--tah-text-muted);
    width: 100%; background: none; border: none; font-family: var(--tah-font);
}
.tah-bh-row b { font-family: var(--tah-font-display); font-weight: 700; color: var(--tah-text); font-size: 14px; }
button.tah-bh-row { cursor: pointer; }
.tah-bh-note {
    font-size: 11px; color: var(--tah-secondary); margin-top: 8px; line-height: 1.4;
    border-top: 1px solid var(--tah-border); padding-top: 9px;
}

/* ── Conquista (tarjeta compacta Home) ─────────────────────────────────── */
.tah-cq {
    background: rgba(8,11,16,.5); border: 1px solid rgba(232,161,58,.3);
    border-radius: 12px; padding: 13px; margin-top: 9px;
}
.tah-cq-head { display: flex; justify-content: space-between; align-items: center; }
.tah-cq-eye {
    font-family: var(--tah-font-mono); font-size: 10px; letter-spacing: .1em;
    color: var(--tah-primary); text-transform: uppercase;
}
.tah-cq-pct { font-family: var(--tah-font-display); font-weight: 700; color: var(--tah-primary); font-size: 15px; }
.tah-cq-t { font-family: var(--tah-font-display); font-weight: 600; font-size: 15px; color: var(--tah-text); margin-top: 7px; }
.tah-cq-bar {
    height: 7px; background: var(--tah-bg-input); border: 1px solid var(--tah-border);
    border-radius: 7px; margin-top: 8px; overflow: hidden;
}
.tah-cq-bar i {
    display: block; height: 100%; border-radius: 7px;
    background: linear-gradient(90deg, var(--tah-primary), var(--tah-primary-deep));
}
.tah-cq-foot {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 8px; font-size: 10.5px; color: var(--tah-text-muted);
}
.tah-cq-unlock { color: var(--tah-primary); }

/* ── Títulos de sección estilo mockup ──────────────────────────────────── */
.tah-seclabel {
    font-family: var(--tah-font-mono); font-size: 10.5px; letter-spacing: .18em;
    text-transform: uppercase; color: var(--tah-text-subtle);
    margin: 22px 16px 11px; display: flex; align-items: center; gap: 9px;
}
.tah-seclabel::after { content: ""; flex: 1; height: 1px; background: var(--tah-border); }

/* ── "Pasando ahora" (Home) ────────────────────────────────────────────── */
.tah-happening {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--tah-border); border-radius: 14px;
    padding: 13px; margin: 0 12px 9px; cursor: pointer;
    background: var(--tah-bg-card); width: calc(100% - 24px);
    text-align: left; font-family: var(--tah-font);
}
.tah-happening:hover { border-color: var(--tah-border-hover); }
.tah-happening.is-event { border-color: rgba(155,140,232,.3); }
.tah-happening.is-arena { border-color: rgba(232,161,58,.3); }
.tah-hp-ico {
    width: 38px; height: 38px; border-radius: 11px; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 700;
    background: var(--tah-bg-muted); color: var(--tah-text-muted);
}
.tah-happening.is-event .tah-hp-ico { background: var(--tah-violet-dim); color: var(--tah-violet); }
.tah-happening.is-arena .tah-hp-ico { background: var(--tah-primary-dim); color: var(--tah-primary); }
.tah-hp-body { flex: 1; min-width: 0; }
.tah-hp-t { font-family: var(--tah-font-display); font-weight: 600; font-size: 14px; color: var(--tah-text); }
.tah-hp-s { font-size: 11px; color: var(--tah-text-subtle); margin-top: 1px; }
.tah-hp-timer {
    font-family: var(--tah-font-mono); font-size: 10px; color: var(--tah-text-muted);
    border: 1px solid var(--tah-border); border-radius: 20px; padding: 4px 9px; flex: none;
}
.tah-mini-cta {
    width: calc(100% - 24px); margin: 6px 12px 0; background: none;
    border: 1px solid var(--tah-border); border-radius: 12px; padding: 13px;
    color: var(--tah-secondary); font-family: var(--tah-font-display);
    font-weight: 600; font-size: 14px; cursor: pointer;
}
.tah-mini-cta:hover { border-color: var(--tah-secondary); }

/* ── Campaña (héroe de Misiones) ───────────────────────────────────────── */
.tah-campaign {
    position: relative; border: 1px solid var(--tah-border); border-radius: 18px;
    padding: 16px; margin: 10px 12px 0; overflow: hidden;
    background: linear-gradient(160deg, rgba(232,161,58,.10), rgba(15,22,32,.4) 55%);
}
.tah-campaign::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.010) 3px 4px);
}
.tah-camp-eyebrow {
    font-family: var(--tah-font-mono); font-size: 10px; letter-spacing: .22em;
    color: var(--tah-primary); text-transform: uppercase;
    display: flex; align-items: center; gap: 7px;
}
.tah-camp-pulse {
    width: 7px; height: 7px; border-radius: 50%; background: var(--tah-primary);
    box-shadow: 0 0 0 3px rgba(232,161,58,.18); animation: tah-camp-pl 2.4s infinite;
}
@keyframes tah-camp-pl { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.tah-camp-title {
    font-family: var(--tah-font-display); font-weight: 700; font-size: 22px;
    color: var(--tah-text); margin: 8px 0 4px; line-height: 1.05;
}
.tah-camp-sub { font-size: 12.5px; color: var(--tah-text-muted); line-height: 1.45; max-width: 30ch; }
.tah-camp-count { position: absolute; top: 15px; right: 16px; text-align: right; }
.tah-camp-count b {
    font-family: var(--tah-font-display); font-size: 22px; color: var(--tah-text);
    display: block; line-height: 1;
}
.tah-camp-count span {
    font-family: var(--tah-font-mono); font-size: 8.5px; letter-spacing: .14em;
    color: var(--tah-text-subtle); text-transform: uppercase;
}

/* ── Tarjeta de misión ─────────────────────────────────────────────────── */
.tah-mission {
    --c: var(--tah-primary);
    position: relative; background: var(--tah-bg-card);
    border: 1px solid var(--tah-border); border-radius: 16px;
    padding: 14px 15px; margin: 0 12px 11px; overflow: hidden;
    display: grid; grid-template-columns: 44px 1fr auto; gap: 13px;
    align-items: center; cursor: pointer; transition: border-color .15s;
    width: calc(100% - 24px); text-align: left; font-family: var(--tah-font);
    color: var(--tah-text);
}
.tah-mission:hover, .tah-mission:active { border-color: var(--c); }
.tah-mission::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--c);
}
.tah-mi-ico {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 21px;
    background: color-mix(in srgb, var(--c) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.tah-mi-title { font-family: var(--tah-font-display); font-weight: 600; font-size: 16px; color: var(--tah-text); line-height: 1.1; }
.tah-mi-desc { font-size: 11.5px; color: var(--tah-text-muted); margin-top: 2px; line-height: 1.35; }
.tah-mi-bar {
    height: 6px; background: var(--tah-bg-input); border-radius: 6px;
    margin-top: 9px; overflow: hidden; border: 1px solid var(--tah-border);
}
.tah-mi-fill {
    height: 100%; border-radius: 6px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--c) 60%, transparent), var(--c));
}
.tah-mi-right { text-align: right; align-self: start; padding-top: 2px; }
.tah-mi-metric { font-family: var(--tah-font-display); font-weight: 700; font-size: 16px; color: var(--c); line-height: 1; white-space: nowrap; }
.tah-mi-metric small { font-size: 10px; color: var(--tah-text-subtle); font-weight: 500; }
.tah-mi-grade {
    font-family: var(--tah-font-mono); font-size: 8.5px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--tah-text-muted); margin-top: 4px;
    border: 1px solid var(--tah-border); border-radius: 20px; padding: 2px 7px;
    display: inline-block;
}
.tah-mission .tah-chev { position: absolute; right: 12px; bottom: 11px; color: var(--tah-text-subtle); font-size: 12px; }

/* ── v6.8: rango del creador (A–J) en la tarjeta de la Llama ───────────── */
.tah-mi-rank {
    font-family: var(--tah-font-mono); font-size: 9px; letter-spacing: .08em;
    text-transform: uppercase; vertical-align: middle; margin-left: 6px;
    padding: 2px 7px; border-radius: 20px; white-space: nowrap;
    color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}

/* Escalera de rangos dentro del bottom-sheet de la Llama */
.tah-ladder { display: flex; flex-direction: column; gap: 4px; }
.tah-lvrow {
    display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: 10px;
    background: var(--tah-bg-input); border: 1px solid var(--tah-border);
}
.tah-lvrow.is-me {
    background: color-mix(in srgb, var(--c) 12%, var(--tah-bg-input));
    border-color: color-mix(in srgb, var(--c) 45%, transparent);
}
.tah-lvr {
    font-family: var(--tah-font-display); font-weight: 700; font-size: 14px;
    text-align: center; color: var(--tah-text-muted);
}
.tah-lvrow.is-me .tah-lvr { color: var(--c); }
.tah-lvd { font-size: 11px; color: var(--tah-text-muted); }
.tah-lvp { font-family: var(--tah-font-mono); font-size: 12px; color: var(--tah-text); white-space: nowrap; }
.tah-lvrow.is-me .tah-lvp { color: var(--c); }
.tah-lvnote { font-size: 11px; color: var(--tah-text-subtle); margin-top: 8px; line-height: 1.4; }
.tah-mission.tah-conquista-card {
    background: linear-gradient(160deg, rgba(232,161,58,.12), var(--tah-bg-card) 60%);
    border-color: rgba(232,161,58,.35);
}

/* ── Premios en camino (fila estilo mockup) ────────────────────────────── */
.tah-prize-row {
    display: flex; align-items: center; gap: 12px;
    background: var(--tah-bg-card); border: 1px solid var(--tah-border);
    border-radius: 14px; padding: 12px 14px; margin: 0 12px 10px;
}
.tah-prize-row.is-won { border-color: rgba(63,190,143,.4); }
.tah-pz-ico { font-size: 24px; flex: none; }
.tah-pz-img {
    width: 40px; height: 40px; flex: none; border-radius: 10px;
    object-fit: cover; border: 1px solid var(--tah-border);
}
.tah-pz-body { flex: 1; min-width: 0; }
.tah-pz-t { font-family: var(--tah-font-display); font-weight: 600; font-size: 13.5px; color: var(--tah-text); }
.tah-pz-s { font-size: 11px; color: var(--tah-text-subtle); margin-top: 1px; }
.tah-pz-bar {
    height: 5px; background: var(--tah-bg-input); border-radius: 5px;
    margin-top: 7px; overflow: hidden; border: 1px solid var(--tah-border);
}
.tah-pz-fill { height: 100%; background: linear-gradient(90deg, var(--tah-primary), var(--tah-primary-deep)); }
.tah-prize-row.is-won .tah-pz-fill { background: var(--tah-success); }
.tah-pz-pct { font-family: var(--tah-font-display); font-weight: 700; font-size: 15px; color: var(--tah-primary); flex: none; }
.tah-prize-row.is-won .tah-pz-pct { color: var(--tah-success); }

/* ── Misiones bloqueadas (fase 2) ──────────────────────────────────────── */
.tah-locked-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0 12px; }
.tah-lk {
    background: var(--tah-bg-card); border: 1px dashed var(--tah-border);
    border-radius: 12px; padding: 13px; display: flex; align-items: center;
    gap: 9px; opacity: .65;
}
.tah-lk .tah-lki { font-size: 14px; filter: grayscale(1); }
.tah-lk .tah-lkt { font-family: var(--tah-font-display); font-weight: 600; font-size: 13px; color: var(--tah-text-muted); }
.tah-lk-note { font-size: 11px; color: var(--tah-text-subtle); text-align: center; margin: 10px 16px 0; line-height: 1.4; }

/* ── Bottom-sheet de misión ────────────────────────────────────────────── */
.tah-sheet-wrap { position: fixed; inset: 0; z-index: 100000; display: none; }
.tah-sheet-wrap.open { display: block; }
.tah-sheet-bg { position: absolute; inset: 0; background: rgba(2,4,7,.72); backdrop-filter: blur(3px); }
.tah-sheet {
    --c: var(--tah-secondary);
    position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto;
    max-width: 560px; background: var(--tah-bg);
    border-top: 1px solid var(--c); border-radius: 26px 26px 0 0;
    padding: 8px 20px 30px; max-height: 84%; overflow-y: auto;
    box-shadow: 0 -20px 50px rgba(0,0,0,.6);
    animation: tah-sheet-rise .28s cubic-bezier(.2,.8,.2,1);
}
.tah-sheet::-webkit-scrollbar { display: none; }
@keyframes tah-sheet-rise { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .tah-sheet { animation: none; } }
.tah-grab { width: 38px; height: 4px; background: var(--tah-border); border-radius: 4px; margin: 8px auto 16px; }
.tah-sh-head { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.tah-sh-ico {
    width: 50px; height: 50px; border-radius: 14px; flex: none;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
    background: color-mix(in srgb, var(--c) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
}
.tah-sh-eyebrow {
    font-family: var(--tah-font-mono); font-size: 9.5px; letter-spacing: .16em;
    text-transform: uppercase; color: var(--c);
}
.tah-sh-title {
    font-family: var(--tah-font-display); font-weight: 700; font-size: 22px;
    color: var(--tah-text); line-height: 1.05; margin-top: 2px;
}
.tah-sh-block { margin-bottom: 18px; }
.tah-sh-block h4 {
    font-family: var(--tah-font-mono); font-size: 10px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--tah-text-subtle); margin: 0 0 8px;
    display: flex; align-items: center; gap: 8px;
}
.tah-sh-block h4::after { content: ""; flex: 1; height: 1px; background: var(--tah-border); }
.tah-sh-block p { font-size: 13.5px; color: var(--tah-text-muted); line-height: 1.55; margin: 0; }
.tah-sh-block p b { color: var(--tah-text); }
.tah-sh-prog { background: var(--tah-bg-card); border: 1px solid var(--tah-border); border-radius: 15px; padding: 15px; }
.tah-sh-prog .tah-sh-big { font-family: var(--tah-font-display); font-weight: 700; font-size: 30px; color: var(--c); line-height: 1; }
.tah-sh-prog .tah-sh-big small { font-size: 15px; color: var(--tah-text-subtle); font-weight: 500; }
.tah-sh-prog .tah-sh-cap { font-size: 12px; color: var(--tah-text-muted); margin-top: 3px; }
.tah-sh-prog .tah-sh-bar {
    height: 8px; background: var(--tah-bg-input); border: 1px solid var(--tah-border);
    border-radius: 8px; margin-top: 12px; overflow: hidden;
}
.tah-sh-prog .tah-sh-bar i {
    display: block; height: 100%; border-radius: 8px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), var(--c));
}
.tah-sh-steps { list-style: none; margin: 0; padding: 0; }
.tah-sh-steps li {
    display: flex; gap: 10px; align-items: flex-start; font-size: 13px;
    color: var(--tah-text-muted); padding: 6px 0; line-height: 1.4;
}
.tah-sh-steps li .tah-dot {
    flex: none; width: 18px; height: 18px; border-radius: 50%;
    border: 1.5px solid var(--tah-border); display: flex; align-items: center;
    justify-content: center; font-size: 10px; margin-top: 1px; color: var(--tah-text-subtle);
}
.tah-sh-steps li.done .tah-dot { background: var(--c); border-color: var(--c); color: #04101a; }
.tah-sh-steps li.done { color: var(--tah-text); }
.tah-sh-reward {
    display: flex; align-items: center; gap: 11px;
    background: color-mix(in srgb, var(--tah-primary) 8%, var(--tah-bg-card));
    border: 1px solid rgba(232,161,58,.28); border-radius: 13px; padding: 12px 14px;
}
.tah-sh-reward .tah-rico { font-size: 22px; }
.tah-sh-reward .tah-rt { font-family: var(--tah-font-display); font-weight: 600; font-size: 13.5px; color: var(--tah-text); }
.tah-sh-reward .tah-rs { font-size: 11px; color: var(--tah-text-subtle); margin-top: 1px; }
.tah-sh-axel {
    display: flex; gap: 10px; align-items: flex-start;
    background: linear-gradient(135deg, rgba(47,180,217,.09), transparent);
    border: 1px solid rgba(47,180,217,.25); border-radius: 13px;
    padding: 12px 14px; margin-top: 14px;
}
.tah-sh-axel .tah-ax { flex: none; font-size: 18px; }
.tah-sh-axel .tah-axt { font-size: 12px; color: var(--tah-text-muted); line-height: 1.45; }
.tah-sh-axel .tah-axt b { color: var(--tah-secondary); font-family: var(--tah-font-display); }
.tah-sh-close {
    width: 100%; border-radius: 13px; padding: 14px;
    font-family: var(--tah-font-display); font-weight: 600; font-size: 15px;
    background: var(--tah-bg-muted); border: 1px solid var(--tah-border);
    color: var(--tah-text); margin-top: 6px; cursor: pointer;
}
.tah-sh-close:hover { border-color: var(--tah-border-hover); }

/* ── Vista Wallet (contenido del antiguo modal como página) ───────────── */
.tah-wallet-view { padding: 0 12px; }
.tah-wtitle { text-align: center; margin: 14px 0 4px; }
.tah-wtitle .tah-wcoin { font-size: 30px; }
.tah-wtitle h2 {
    font-family: var(--tah-font-display); font-weight: 700; font-size: 20px;
    color: var(--tah-text); margin: 6px 0 0; letter-spacing: .04em;
}
.tah-wtitle p { font-size: 12px; color: var(--tah-text-subtle); margin: 2px 0 0; }
.tah-wallet-view .tah-wallet-hero { margin-top: 6px; }

/* ── Vista Invitar ─────────────────────────────────────────────────────── */
.tah-inv-hero {
    border: 1px solid var(--tah-border); border-radius: 18px; padding: 16px;
    margin: 10px 12px 0;
    background: linear-gradient(160deg, rgba(155,140,232,.12), rgba(15,22,32,.3));
}
.tah-inv-hero h2 { font-family: var(--tah-font-display); font-weight: 700; font-size: 19px; color: var(--tah-text); margin: 0; }
.tah-inv-hero p { font-size: 12.5px; color: var(--tah-text-muted); line-height: 1.45; margin: 6px 0 0; }
.tah-inv-link { display: flex; gap: 8px; margin-top: 13px; }
.tah-inv-link .tah-inv-lk {
    flex: 1; background: var(--tah-bg-input); border: 1px solid var(--tah-border);
    border-radius: 10px; padding: 11px; font-family: var(--tah-font-mono);
    font-size: 11px; color: var(--tah-text-muted); overflow: hidden;
    white-space: nowrap; text-overflow: ellipsis; min-width: 0;
}
.tah-inv-link .tah-inv-cp {
    border: none; border-radius: 10px; padding: 0 16px;
    background: var(--tah-secondary); color: #04101a;
    font-family: var(--tah-font-display); font-weight: 600; font-size: 13px; cursor: pointer;
}
.tah-inv-link .tah-inv-cp:hover { filter: brightness(1.1); }
.tah-inv-progress {
    border: 1px solid var(--tah-border); border-radius: 14px; padding: 14px;
    margin: 12px 12px 0; background: var(--tah-bg-card);
}
.tah-inv-progress .tah-ip-t { display: flex; justify-content: space-between; align-items: baseline; }
.tah-inv-progress .tah-ip-name { font-family: var(--tah-font-display); font-weight: 600; font-size: 14px; color: var(--tah-text); }
.tah-inv-progress .tah-ip-pct { font-family: var(--tah-font-display); font-weight: 700; color: var(--tah-violet); }
.tah-inv-progress .tah-ip-d { font-size: 11px; color: var(--tah-text-subtle); margin: 4px 0 9px; }
.tah-inv-bar {
    height: 7px; background: var(--tah-bg-input); border-radius: 6px;
    overflow: hidden; border: 1px solid var(--tah-border);
}
.tah-inv-bar div { height: 100%; background: linear-gradient(90deg, var(--tah-violet), #7d6fd0); }
.tah-honor {
    border: 1px solid var(--tah-border); border-radius: 16px; padding: 15px;
    margin: 14px 12px 0; background: var(--tah-bg-card);
}
.tah-honor h3 {
    font-family: var(--tah-font-display); font-weight: 600; font-size: 15px;
    color: var(--tah-text); display: flex; align-items: center; gap: 8px; margin: 0 0 4px;
}
.tah-honor .tah-honor-note { font-size: 11px; color: var(--tah-text-subtle); margin: 0 0 12px; }
.tah-hrow {
    display: flex; align-items: center; gap: 11px; padding: 9px 0;
    border-top: 1px solid var(--tah-border);
}
.tah-hrow:first-of-type { border-top: none; }
.tah-hrow .tah-pos { font-family: var(--tah-font-display); font-weight: 700; font-size: 14px; width: 26px; color: var(--tah-text-muted); flex: none; text-align: center; }
.tah-hrow .tah-medal { font-size: 17px; width: 26px; text-align: center; flex: none; }
.tah-hrow .tah-hn { flex: 1; font-family: var(--tah-font-mono); font-size: 12.5px; color: var(--tah-text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tah-hrow.is-me {
    background: linear-gradient(90deg, rgba(47,180,217,.1), transparent);
    border-radius: 10px; margin: 0 -8px; padding: 9px 8px; border-top: none;
}
.tah-hrow.is-me .tah-hn { color: var(--tah-secondary); }

/* ── Bottom-nav: botón central "Inicio" con aro ámbar ─────────────────── */
.tah-tab-ring {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--tah-bg-muted); border: 1px solid var(--tah-primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 2px; transform: translateY(-4px);
}
.tah-tab-btn.is-active .tah-tab-ring { box-shadow: 0 0 16px rgba(232,161,58,.4); }
.tah-tab-ring svg { stroke: var(--tah-primary); }

/* En escritorio los márgenes laterales de 12px sobran (el contenedor ya centra) */
@media (min-width: 721px) {
    .tah-profcard, .tah-today, .tah-lola-card, .tah-base, .tah-campaign,
    .tah-happening, .tah-mini-cta, .tah-mission, .tah-prize-row,
    .tah-inv-hero, .tah-inv-progress, .tah-honor {
        margin-left: 0; margin-right: 0; width: 100%;
    }
    .tah-locked-grid { margin-left: 0; margin-right: 0; grid-template-columns: repeat(4, 1fr); }
    .tah-seclabel { margin-left: 4px; margin-right: 4px; }
    .tah-wallet-view { padding: 0; }
    .tah-sheet { border: 1px solid var(--tah-border); border-top-color: var(--c); border-radius: 20px; bottom: 40px; }
}

/* ── v6.2 overrides de compatibilidad ──────────────────────────────────────
   La píldora vieja del wallet (.tah-wallet-trigger del header, con !important)
   no debe aplicar a la fila del wallet dentro de "Tu Base". */
.tah-base-hold .tah-bh-row.tah-wallet-trigger {
    display: flex !important;
    margin-left: 0 !important;
    padding: 5px 0 !important;
    border-radius: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--tah-text-muted) !important;
    font-size: 12.5px !important;
    font-weight: normal !important;
}
.tah-base-hold .tah-bh-row.tah-wallet-trigger:hover {
    transform: none !important;
    background: none !important;
    box-shadow: none !important;
}
.tah-base-hold .tah-bh-row.tah-wallet-trigger:hover b { color: var(--tah-primary); }
.tah-base-hold .tah-bh-row .tah-wallet-trigger-amount { color: inherit; }
.tah-base-hold .tah-bh-row .tah-wallet-trigger-code { font-size: 11px; opacity: .8; }

/* Botones del profcard en estado ocupado */
.tah-pa:disabled { opacity: .5; cursor: wait; }

/* El pa-bell hereda el tamaño correcto aunque lleve clases viejas de trigger */
.tah-prof-actions .tah-pa-bell {
    width: 46px !important; height: auto !important;
    margin-left: 0 !important; border-radius: 12px !important;
    background: var(--tah-bg-muted) !important;
    border: 1px solid var(--tah-border) !important;
}

/* La tarjeta "happening" también puede ser un enlace (Arena) */
a.tah-happening { text-decoration: none !important; }

/* ═══════════════════════════════════════════════════════════════════════
   v6.2.2 — Paleta fija del prototipo en TODA la página del dashboard.
   El branding configurable (admin → Branding) ya no sobrescribe la app:
   se re-declaran los tokens de marca en el body de la página para que
   también los elementos fuera de .tah-dashboard (chat IA, modales de
   transferencia/banco/bandeja/live) usen ámbar/cian del mockup.
   ═══════════════════════════════════════════════════════════════════════ */
body.tah-dashboard-page {
    --tah-primary:       #E8A13A;
    --tah-primary-dim:   rgba(232,161,58,.15);
    --tah-secondary:     #2FB4D9;
    --tah-secondary-dim: rgba(47,180,217,.14);
}

/* Brillos radiales del fondo del prototipo (.phone del HTML):
   cian arriba-derecha + ámbar arriba-izquierda, muy sutiles.

   La primera capa es el velo negro de la cabecera: el logo de la agencia trae
   su propio fondo negro sólido y sobre el fondo de la app (#080B10, y encima
   los brillos) se recortaba como un rectángulo. Va ARRIBA de los brillos para
   que la franja del logo sea negro puro, y se desvanece a transparente para
   que los brillos y el color de fondo reaparezcan sin ningún borde.

   Los topes van en px, no en %, para que el degradado no se estire con el alto
   de la página: la franja negra mide siempre lo mismo aunque la vista sea larga. */
.tah-dashboard {
    background-image:
        linear-gradient(180deg, #000 0px, #000 120px, rgba(0,0,0,0) 300px),
        radial-gradient(700px 340px at 82% -2%, rgba(47,180,217,.09), transparent 62%),
        radial-gradient(600px 300px at 10% 6%,  rgba(232,161,58,.06), transparent 60%);
    background-repeat: no-repeat;
}

/* ═══════════════════════════════════════════════════════════════════════
   v6.2.3 — LA ACADEMIA estilo prototipo (#v-cursos del HTML)
   Hero + anillo, stats compactas, resume, ruta timeline y tira de diplomas.
   Acentos: rosa LOLA #c4568f / #e29ac4 · activo en ámbar.
   ═══════════════════════════════════════════════════════════════════════ */
.tah-ac-hero {
    display: flex; gap: 12px; align-items: center;
    border: 1px solid var(--tah-border); border-radius: 18px; padding: 16px;
    background: linear-gradient(160deg, rgba(196,86,143,.12), rgba(15,22,32,.35) 60%);
    margin-top: 8px;
}
.tah-ac-hero-l { flex: 1; min-width: 0; }
.tah-ac-eye {
    font-family: var(--tah-font-mono); font-size: 10px; letter-spacing: .12em;
    color: #e29ac4; text-transform: uppercase;
}
.tah-ac-h {
    font-family: var(--tah-font-display); font-weight: 700; font-size: 22px;
    color: var(--tah-text); line-height: 1.08; margin: 7px 0 5px;
}
.tah-ac-sub { font-size: 11.5px; color: var(--tah-text-muted); line-height: 1.4; }
.tah-ac-ring { position: relative; width: 80px; height: 80px; flex: none; }
.tah-ac-ring svg { transform: rotate(-90deg); width: 80px; height: 80px; }
.tah-ac-ring .tah-rbg { fill: none; stroke: var(--tah-border); stroke-width: 6; }
.tah-ac-ring .tah-rfg { fill: none; stroke: #c4568f; stroke-width: 6; stroke-linecap: round; }
.tah-ac-ring-t {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.tah-ac-ring-t b { font-family: var(--tah-font-display); font-weight: 700; font-size: 22px; color: var(--tah-text); line-height: 1; }
.tah-ac-ring-t span { font-size: 10px; color: var(--tah-text-subtle); }

.tah-ac-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.tah-acs {
    background: var(--tah-bg-card); border: 1px solid var(--tah-border);
    border-radius: 12px; padding: 11px 6px; text-align: center;
}
.tah-acs .tah-acsi { font-size: 16px; }
.tah-acs .tah-acsv { font-family: var(--tah-font-display); font-weight: 700; font-size: 18px; color: var(--tah-text); margin-top: 3px; }
.tah-acs .tah-acsl { font-size: 9px; color: var(--tah-text-subtle); margin-top: 1px; }

.tah-ac-resume {
    display: block; width: 100%; text-align: left; cursor: pointer;
    border: 1px solid rgba(232,161,58,.35); border-radius: 15px; padding: 14px;
    margin-top: 12px; font-family: var(--tah-font);
    background: linear-gradient(160deg, rgba(232,161,58,.1), var(--tah-bg-card) 60%);
}
.tah-ac-resume:hover { border-color: var(--tah-primary); }
.tah-ac-resume-top {
    font-family: var(--tah-font-mono); font-size: 10px; letter-spacing: .1em;
    color: var(--tah-primary); text-transform: uppercase;
}
.tah-ac-resume-title { font-family: var(--tah-font-display); font-weight: 600; font-size: 16px; color: var(--tah-text); margin: 8px 0 9px; }
.tah-ac-resume-bar {
    height: 7px; background: var(--tah-bg-input); border: 1px solid var(--tah-border);
    border-radius: 7px; overflow: hidden;
}
.tah-ac-resume-bar div { height: 100%; background: linear-gradient(90deg, var(--tah-primary), var(--tah-primary-deep, #C77A1E)); }
.tah-ac-resume-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--tah-text-muted); }
.tah-ac-resume-foot span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tah-ac-resume-lvc { color: var(--tah-primary); font-family: var(--tah-font-display); font-weight: 600; flex: none; }

/* ── Ruta de aprendizaje (timeline) ────────────────────────────────────── */
.tah-ac-route { position: relative; }
.tah-rnode { position: relative; display: flex; gap: 13px; padding-bottom: 11px; }
.tah-rnode::before {
    content: ""; position: absolute; left: 15px; top: 32px; bottom: -2px;
    width: 2px; background: var(--tah-border);
}
.tah-rnode:last-child::before { display: none; }
.tah-rnode.is-done::before { background: #c4568f; }
.tah-rdot {
    flex: none; width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--tah-font-display); font-weight: 700; font-size: 13px;
    z-index: 2; background: var(--tah-bg-muted);
    border: 2px solid var(--tah-border); color: var(--tah-text-subtle);
}
.tah-rnode.is-done .tah-rdot { background: #c4568f; border-color: #c4568f; color: #fff; }
.tah-rnode.is-active .tah-rdot {
    background: var(--tah-primary); border-color: var(--tah-primary);
    color: #1a1206; box-shadow: 0 0 14px rgba(232,161,58,.4);
}
.tah-rcard {
    flex: 1; min-width: 0; background: var(--tah-bg-card);
    border: 1px solid var(--tah-border); border-radius: 13px;
    padding: 12px 14px; margin-top: -2px; text-align: left; cursor: pointer;
    font-family: var(--tah-font); color: var(--tah-text);
    transition: border-color .15s;
}
.tah-rcard:hover, .tah-rcard:active { border-color: var(--tah-primary); }
.tah-rcard.is-completed:hover { border-color: #c4568f; }
.tah-rcard.is-hot {
    border-color: rgba(232,161,58,.45);
    background: linear-gradient(160deg, rgba(232,161,58,.1), var(--tah-bg-card));
}
.tah-rcard.is-completed {
    border-color: rgba(196,86,143,.35);
    background: linear-gradient(160deg, rgba(196,86,143,.08), var(--tah-bg-card));
}
.tah-rnode:not(.is-done):not(.is-active) .tah-rcard { opacity: .6; }
.tah-rc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.tah-rc-n {
    font-family: var(--tah-font-mono); font-size: 9.5px; letter-spacing: .08em;
    color: var(--tah-text-subtle); text-transform: uppercase;
}
.tah-rc-lvc { font-family: var(--tah-font-display); font-weight: 600; font-size: 11px; color: var(--tah-primary); flex: none; }
.tah-rc-lvc.is-done { color: #c4568f; }
.tah-rc-t { font-family: var(--tah-font-display); font-weight: 600; font-size: 14.5px; color: var(--tah-text); line-height: 1.15; }
.tah-rc-s { font-size: 11px; color: var(--tah-text-muted); margin-top: 3px; line-height: 1.35; }
.tah-rc-bar {
    height: 6px; background: var(--tah-bg-input); border: 1px solid var(--tah-border);
    border-radius: 6px; margin-top: 9px; overflow: hidden;
}
.tah-rc-bar div { height: 100%; background: linear-gradient(90deg, var(--tah-primary), var(--tah-primary-deep, #C77A1E)); }
.tah-rc-btn {
    display: block; width: 100%; border-radius: 10px; padding: 10px;
    font-family: var(--tah-font-display); font-weight: 600; font-size: 13px;
    background: linear-gradient(90deg, var(--tah-primary), var(--tah-primary-deep, #C77A1E));
    color: #1a1206; margin-top: 10px; text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Tira de diplomas ──────────────────────────────────────────────────── */
.tah-dip-strip { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 4px; }
.tah-dip-strip::-webkit-scrollbar { display: none; }
.tah-dip {
    flex: none; background: var(--tah-bg-card); border: 1px solid var(--tah-border);
    border-radius: 12px; padding: 12px 14px;
    font-family: var(--tah-font-display); font-weight: 600; font-size: 12px;
    color: var(--tah-text); display: flex; flex-direction: column; gap: 6px;
    align-items: center; min-width: 92px; max-width: 140px; text-align: center;
    cursor: pointer;
}
.tah-dip span { font-size: 22px; }
button.tah-dip:hover { border-color: var(--tah-primary); }
.tah-dip.is-locked { opacity: .5; color: var(--tah-text-subtle); cursor: default; }

/* v6.2.4 — módulo bloqueado en la ruta secuencial */
.tah-rcard.is-locked { cursor: default; }
.tah-rcard.is-locked:hover { border-color: var(--tah-border); }
.tah-rnode.is-locked .tah-rcard { opacity: .55; }
.tah-rnode.is-locked .tah-rdot { font-size: 12px; }
.tah-rcard.is-locked .tah-rc-lvc { color: var(--tah-text-subtle); }
.tah-rcard.is-locked .tah-rc-s { color: var(--tah-primary); opacity: .9; }

/* ═══════════════════════════════════════════════════════════════════════
   v6.2.6 — Correcciones de la revisión de código
   ═══════════════════════════════════════════════════════════════════════ */

/* Animación de premio recién ganado para el markup v6.2 (.tah-prize-row).
   La regla vieja apuntaba a .tah-prize-bar-wrap, que ya no existe. */
.tah-prize-row.tah-just-won {
    animation: tah-pulse-win 1.2s ease-out 2;
    border-color: rgba(63,190,143,.6);
}

/* La fila "🪙 LIVCOIN" de Tu Base sí debe mostrar el código de moneda en
   pantallas pequeñas (la regla vieja del pill del header lo ocultaba ≤480px). */
@media (max-width: 480px) {
    .tah-bh-row .tah-wallet-trigger-code { display: inline; }
}

/* Gutters móviles unificados: las secciones heredadas del layout viejo iban
   de borde a borde mientras las tarjetas v6.2 llevan 12px de margen lateral.
   (Los longhands van después del shorthand original → ganan en cascada.) */
@media (max-width: 720px) {
    .tah-hero,
    .tah-checklist,
    .tah-backstage-section,
    .tah-refresh-info,
    .tah-empty-state,
    .tah-live-hub,
    .tah-push-section,
    #tah-profile-panel {
        margin-left: 12px;
        margin-right: 12px;
    }
    .tah-profile-row {
        margin-left: 12px;
        margin-right: 12px;
        width: calc(100% - 24px);
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   v6.3.2 — Axel como cara del copiloto (feed + sheet de misiones)
   ═══════════════════════════════════════════════════════════════════════ */
.tah-sl-feed-ico.has-avatar { padding: 0; overflow: hidden; }
.tah-sl-feed-avatar {
    width: 22px; height: 22px; border-radius: 50%;
    object-fit: cover; display: block;
    border: 1px solid rgba(47,180,217,.5);
}
.tah-sl-feed-item.is-axel .tah-sl-feed-txt { color: var(--tah-secondary); }
.tah-ax-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    object-fit: cover; flex: none;
    border: 1.5px solid rgba(47,180,217,.5);
}

/* ═══════════════════════════════════════════════════════════════════════
   v6.4.0 — Senda del recluta + mapa de distritos + copiloto Parte B
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Senda del recluta (timeline de instrucción, sin candados) ─────────── */
.tah-path { position: relative; padding: 0 12px 6px; }
.tah-pnode { position: relative; display: flex; gap: 14px; padding-bottom: 14px; }
.tah-pnode::before {
    content: ""; position: absolute; left: 15px; top: 32px; bottom: -2px;
    width: 2px; background: var(--tah-border);
}
.tah-pnode:last-child::before { display: none; }
.tah-pnode.is-done::before { background: var(--tah-secondary); }
.tah-pdot {
    flex: none; width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--tah-font-display); font-weight: 700; font-size: 13px;
    z-index: 2; background: var(--tah-bg-muted);
    border: 2px solid var(--tah-border); color: var(--tah-text-subtle);
}
.tah-pnode.is-done .tah-pdot { background: var(--tah-secondary); border-color: var(--tah-secondary); color: #04101a; }
.tah-pnode.is-active .tah-pdot {
    background: var(--tah-primary); border-color: var(--tah-primary);
    color: #1a1206; box-shadow: 0 0 14px rgba(232,161,58,.4);
}
.tah-pcard {
    flex: 1; min-width: 0; background: var(--tah-bg-card);
    border: 1px solid var(--tah-border); border-radius: 13px;
    padding: 12px 14px; margin-top: -2px;
}
.tah-pcard.is-hot {
    border-color: rgba(232,161,58,.45);
    background: linear-gradient(160deg, rgba(232,161,58,.1), var(--tah-bg-card));
}
.tah-pcard.is-grad {
    border-color: rgba(232,161,58,.4);
    background: linear-gradient(160deg, rgba(232,161,58,.1), var(--tah-bg-card));
}
.tah-pnode:not(.is-done):not(.is-active) .tah-pcard { opacity: .6; }
.tah-pt {
    font-family: var(--tah-font-display); font-weight: 600; font-size: 14.5px;
    color: var(--tah-text); display: flex; align-items: center; gap: 8px;
}
.tah-ptag {
    font-family: var(--tah-font-mono); font-size: 8.5px; letter-spacing: .1em;
    text-transform: uppercase; background: var(--tah-primary); color: #1a1206;
    border-radius: 20px; padding: 2px 7px;
}
.tah-ps { font-size: 11.5px; color: var(--tah-text-muted); margin-top: 3px; line-height: 1.4; }
@media (min-width: 721px) { .tah-path { padding-left: 0; padding-right: 0; } }

/* ── La Última Luz: mapa de 4 distritos (sheet) ────────────────────────── */
.tah-city-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tah-cz {
    border-radius: 11px; padding: 11px; background: var(--tah-bg-input);
    border: 1px solid var(--tah-border); position: relative; overflow: hidden;
}
.tah-cz.is-lit {
    background: linear-gradient(160deg, rgba(155,140,232,.22), var(--tah-bg-input));
    border-color: rgba(155,140,232,.55);
    box-shadow: 0 0 14px rgba(155,140,232,.2);
}
.tah-cz.is-mine { outline: 2px solid var(--tah-violet); outline-offset: 1px; }
.tah-cz-top { display: flex; justify-content: space-between; align-items: center; }
.tah-cz-g { font-family: var(--tah-font-display); font-weight: 700; font-size: 18px; color: var(--tah-violet); }
.tah-cz-p { font-family: var(--tah-font-display); font-weight: 700; font-size: 15px; color: var(--tah-violet); }
.tah-cz-n {
    font-family: var(--tah-font-mono); font-size: 9px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--tah-text-muted); margin: 2px 0 7px;
}
.tah-cz-bar {
    height: 5px; background: #070c12; border-radius: 5px; overflow: hidden;
    border: 1px solid var(--tah-border);
}
.tah-cz-bar i {
    display: block; height: 100%; border-radius: 5px;
    background: linear-gradient(90deg, var(--tah-violet), #7d6fd0);
}
.tah-city-note {
    font-size: 11px; color: var(--tah-text-subtle); text-align: center;
    margin-top: 10px; line-height: 1.4;
}

/* ── Copiloto · Parte B (mockup): métricas en carrusel deslizable ──────── */
.tah-sl-metrics {
    display: flex !important;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}
.tah-sl-metrics::-webkit-scrollbar { display: none; }
.tah-sl-metrics .tah-sl-metric {
    flex: 0 0 auto;
    min-width: 132px;
    scroll-snap-align: start;
    padding: 16px 12px;
    border-radius: 16px;
}
.tah-sl-metrics .tah-sl-metric-val {
    font-size: 26px;
    font-family: var(--tah-font-display);
    font-weight: 700;
}
.tah-sl-swipehint {
    font-family: var(--tah-font-mono); font-size: 9px; letter-spacing: .12em;
    color: var(--tah-text-subtle); text-transform: uppercase;
}

/* Topbar: timer grande a la derecha */
.tah-sl-timer {
    font-family: var(--tah-font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: .04em;
}

/* Feed como tarjetas con monto a la derecha */
.tah-sl-feed-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: 12px;
    padding: 9px 11px;
    margin-bottom: 6px;
}
.tah-sl-feed-item.is-gift { border-color: rgba(232,161,58,.3); }
.tah-sl-feed-item.is-risk { border-color: rgba(224,87,74,.35); }
.tah-sl-feed-item.is-pos  { border-color: rgba(63,190,143,.3); }
.tah-sl-feed-amt {
    margin-left: auto; flex: none;
    font-family: var(--tah-font-display); font-weight: 700; font-size: 13px;
    color: var(--tah-success);
}

/* Pie "COPILOTO · VISTA PRINCIPAL" */
.tah-sl-footer {
    text-align: center;
    font-family: var(--tah-font-mono); font-size: 10px; letter-spacing: .22em;
    text-transform: uppercase; color: var(--tah-text-subtle);
    padding: 12px 0 4px;
}
.tah-sl-footer b { color: var(--tah-secondary); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════
   v6.4.2 — La Última Luz completa (como el prototipo):
   Tu distrito con manzanas + ciudad de 8 facciones + El Faro
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Tu distrito ───────────────────────────────────────────────────────── */
.tah-dist {
    --fc: var(--tah-violet);
    border: 1px solid color-mix(in srgb, var(--fc) 40%, transparent);
    border-radius: 15px; padding: 14px; margin-bottom: 12px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 8%, #0a0f16), #080d14);
}
.tah-dist-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.tah-dist-badge {
    flex: none; width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--fc) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--fc) 45%, transparent);
}
.tah-dg { font-family: var(--tah-font-display); font-weight: 700; font-size: 20px; color: var(--fc); }
.tah-dist-name { flex: 1; }
.tah-dl {
    font-family: var(--tah-font-mono); font-size: 9px; letter-spacing: .14em;
    color: var(--tah-text-subtle); text-transform: uppercase;
}
.tah-dn { font-family: var(--tah-font-display); font-weight: 700; font-size: 17px; color: var(--tah-text); }
.tah-dist-mem {
    font-family: var(--tah-font-mono); font-size: 10px; color: var(--tah-text-muted);
    border: 1px solid var(--tah-border); border-radius: 20px; padding: 5px 9px; flex: none;
}
.tah-dist-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
    padding: 10px; background: #070c12; border-radius: 10px;
    border: 1px solid var(--tah-border);
}
.tah-blk {
    aspect-ratio: 1; border-radius: 3px; background: #0d1622;
    border: 1px solid #16222e; position: relative;
}
.tah-blk.on { opacity: .65; box-shadow: 0 0 6px currentColor; }
.tah-blk.on::after {
    content: ""; position: absolute; inset: 26% 30%;
    background: #fff; opacity: .7; border-radius: 1px;
}
.tah-dist-prog {
    display: grid; grid-template-columns: auto 1fr; gap: 4px 12px;
    align-items: center; margin: 13px 0 12px;
}
.tah-dp-pct {
    font-family: var(--tah-font-display); font-weight: 700; font-size: 38px;
    color: var(--fc); line-height: .9; grid-row: 1/3;
}
.tah-dp-l { font-size: 11px; color: var(--tah-text-muted); line-height: 1.3; align-self: center; }
.tah-dp-bar {
    grid-column: 1/3; height: 8px; background: var(--tah-bg-input);
    border: 1px solid var(--tah-border); border-radius: 8px; overflow: hidden;
}
.tah-dp-bar i { display: block; height: 100%; border-radius: 8px; box-shadow: 0 0 8px currentColor; }
.tah-dist-note {
    font-size: 11px; color: var(--tah-text-subtle); line-height: 1.45;
    text-align: center;
}

/* ── La ciudad · 8 facciones (cada una con su color vía --fc) ─────────── */
.tah-city8-label {
    font-family: var(--tah-font-mono); font-size: 10px; letter-spacing: .16em;
    text-transform: uppercase; color: var(--tah-text-subtle);
    margin: 4px 0 9px; display: flex; align-items: center; gap: 8px;
}
.tah-city8-label::after { content: ""; flex: 1; height: 1px; background: var(--tah-border); }
.tah-cz { --fc: var(--tah-violet); }
.tah-cz .tah-cz-g, .tah-cz .tah-cz-p { color: var(--fc); }
.tah-cz.is-lit {
    background: linear-gradient(160deg, color-mix(in srgb, var(--fc) 22%, #0a0f16), #0a0f16);
    border-color: color-mix(in srgb, var(--fc) 55%, transparent);
    box-shadow: 0 0 14px color-mix(in srgb, var(--fc) 25%, transparent);
}
.tah-cz.is-half {
    background: linear-gradient(160deg, color-mix(in srgb, var(--fc) 11%, #0a0f16), #0a0f16);
    border-color: color-mix(in srgb, var(--fc) 35%, transparent);
}
.tah-cz.is-dark { background: rgba(8,11,16,.6); }
.tah-cz.is-dark .tah-cz-g, .tah-cz.is-dark .tah-cz-p { opacity: .5; }
.tah-cz.is-mine { outline: 2px solid var(--fc); outline-offset: 1px; }
.tah-cz-you {
    position: absolute; top: 9px; right: 34px;
    font-family: var(--tah-font-mono); font-size: 8px; font-weight: 700;
    background: var(--fc); color: #04101a; border-radius: 10px; padding: 1px 6px;
}

/* ── El Faro central ───────────────────────────────────────────────────── */
.tah-faro {
    display: flex; gap: 12px; align-items: center; margin-top: 11px;
    padding: 13px; border-radius: 12px;
    background: linear-gradient(160deg, rgba(232,161,58,.1), #0a0f16);
    border: 1px dashed rgba(232,161,58,.4);
}
.tah-faro.is-lit {
    border-style: solid; border-color: var(--tah-primary);
    box-shadow: 0 0 20px rgba(232,161,58,.35);
}
.tah-faro-i { font-size: 22px; flex: none; }
.tah-faro-t { font-family: var(--tah-font-display); font-weight: 700; font-size: 14px; color: var(--tah-text); }
.tah-faro-s { font-size: 11px; color: var(--tah-text-muted); line-height: 1.4; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════════
   v6.4.3 — Línea de medallas en la profcard (ganadas a color, resto tenue)
   ═══════════════════════════════════════════════════════════════════════ */
.tah-medals {
    display: flex; gap: 6px; margin: 0 0 12px;
    overflow-x: auto; cursor: pointer; padding-bottom: 2px;
}
.tah-medals::-webkit-scrollbar { display: none; }
.tah-medal {
    flex: 1 0 auto; min-width: 50px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: rgba(8,11,16,.5); border: 1px solid var(--tah-border);
    border-radius: 10px; padding: 7px 6px 6px; position: relative;
}
.tah-medal-ico { font-size: 16px; line-height: 1; }
.tah-medal-l {
    font-family: var(--tah-font-mono); font-size: 7.5px; letter-spacing: .06em;
    text-transform: uppercase; color: var(--tah-text-muted); white-space: nowrap;
}
.tah-medal-x {
    position: absolute; top: -5px; right: -3px;
    font-family: var(--tah-font-display); font-size: 8.5px; font-weight: 700;
    background: var(--tah-primary); color: #1a1206;
    border-radius: 10px; padding: 1px 5px;
}
.tah-medal.is-earned {
    border-color: rgba(232,161,58,.45);
    background: linear-gradient(160deg, rgba(232,161,58,.14), rgba(8,11,16,.5));
    box-shadow: 0 0 10px rgba(232,161,58,.15);
}
.tah-medal.is-earned .tah-medal-l { color: var(--tah-primary); }
.tah-medal.is-locked { opacity: .45; }
.tah-medal.is-locked .tah-medal-ico { filter: grayscale(1); }

/* ═══════════════════════════════════════════════════════════════════════════
   v6.9 — Selector de videos del módulo (patrón Crehana / Teachable)

   Se pinta dentro de #tah-lms-content-modal-body cuando el creador toca un
   módulo en el que ya tiene avance: en vez de caer en el primer video, elige
   cuál repasar. Los quizzes ya aprobados no llegan hasta aquí.
   ═══════════════════════════════════════════════════════════════════════════ */
.tah-mp { padding: 4px 0 8px; }

.tah-mp-head { margin-bottom: 16px; }
.tah-mp-eye {
    font-family: var(--tah-font-mono);
    font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--tah-secondary); margin-bottom: 5px;
}
.tah-mp-title {
    font-family: var(--tah-font-display);
    font-size: 1.32rem; font-weight: 700; line-height: 1.2;
    color: var(--tah-text); margin: 0 0 11px;
}
.tah-mp-bar {
    height: 5px; border-radius: var(--tah-radius-full);
    background: var(--tah-bg-muted); overflow: hidden;
}
.tah-mp-bar > div {
    height: 100%; border-radius: inherit;
    background: linear-gradient(90deg, var(--tah-primary), var(--tah-secondary));
    transition: width .4s ease;
}
.tah-mp-meta {
    margin-top: 7px; font-size: .8rem; color: var(--tah-text-muted);
}
.tah-mp-empty { padding: 24px 4px; color: var(--tah-text-muted); }

/* ── Grid de miniaturas: 2 columnas en móvil, 3 en pantallas anchas ─────── */
.tah-mp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
@media (min-width: 760px) {
    .tah-mp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Tarjeta de video ───────────────────────────────────────────────────── */
.tah-mpc {
    display: flex; flex-direction: column;
    text-align: left; width: 100%;
    padding: 0; overflow: hidden;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: var(--tah-radius);
    color: var(--tah-text);
    font-family: inherit;
    cursor: pointer;
    transition: border-color var(--tah-transition), transform var(--tah-transition);
}
button.tah-mpc:hover,
button.tah-mpc:active { border-color: var(--tah-primary); transform: translateY(-2px); }

.tah-mpc-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--tah-bg-muted), var(--tah-bg-input));
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
}
/* Placeholder cuando no se pudo derivar miniatura (Vimeo, contenido sin video) */
.tah-mpc-ph {
    display: flex; align-items: center; gap: 6px;
    font-size: 1.15rem; color: var(--tah-text-subtle);
}
.tah-mpc-ph b {
    font-family: var(--tah-font-display);
    font-size: 1.5rem; color: var(--tah-text-muted);
}
/* Velo para que el texto del badge se lea sobre cualquier miniatura */
.tah-mpc-thumb::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(8,11,16,0) 45%, rgba(8,11,16,.72) 100%);
    pointer-events: none;
}
.tah-mpc-badge {
    position: absolute; top: 7px; right: 7px; z-index: 1;
    min-width: 24px; height: 24px; padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--tah-radius-full);
    background: rgba(8,11,16,.82);
    border: 1px solid var(--tah-border);
    font-size: .78rem; line-height: 1;
}

.tah-mpc-body { padding: 9px 11px 11px; }
.tah-mpc-n {
    font-family: var(--tah-font-mono);
    font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--tah-text-subtle); margin-bottom: 3px;
}
.tah-mpc-t {
    font-size: .88rem; font-weight: 600; line-height: 1.28;
    color: var(--tah-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.tah-mpc-cta {
    margin-top: 7px; font-size: .74rem; font-weight: 600;
    color: var(--tah-text-muted);
}

/* ── Estado: ya vista ───────────────────────────────────────────────────── */
.tah-mpc.is-done .tah-mpc-badge {
    background: var(--tah-success); border-color: var(--tah-success);
    color: #06120d; font-weight: 700;
}
.tah-mpc.is-done .tah-mpc-thumb { filter: saturate(.75); }
.tah-mpc.is-done .tah-mpc-cta   { color: var(--tah-success); }

/* ── Estado: la que le toca ─────────────────────────────────────────────── */
.tah-mpc.is-current {
    border-color: var(--tah-primary);
    box-shadow: 0 0 0 1px var(--tah-primary-dim), 0 6px 20px rgba(232,161,58,.12);
}
.tah-mpc.is-current .tah-mpc-badge {
    background: var(--tah-primary); border-color: var(--tah-primary);
    color: #1a1206; font-weight: 700;
}
.tah-mpc.is-current .tah-mpc-cta { color: var(--tah-primary); }

/* ── Estado: bloqueada (se ve, no se abre — igual que Teachable) ────────── */
.tah-mpc.is-locked { cursor: default; opacity: .5; }
.tah-mpc.is-locked:hover { border-color: var(--tah-border); transform: none; }
.tah-mpc.is-locked .tah-mpc-thumb { filter: grayscale(1) brightness(.7); }

/* ── Quiz suelto pendiente: no tiene miniatura, se distingue por color ──── */
.tah-mpc.is-quiz .tah-mpc-thumb {
    background: linear-gradient(135deg, rgba(47,180,217,.16), var(--tah-bg-input));
}

.tah-mp-foot { margin-top: 18px; }

/* ── Móvil: el modal de contenido es fullscreen y sin padding propio ────── */
@media (max-width: 720px) {
    .tah-mp {
        padding: max(14px, env(safe-area-inset-top)) 14px
                 calc(18px + env(safe-area-inset-bottom));
        background: var(--tah-bg);
        min-height: 100%;
    }
    .tah-mp-title  { font-size: 1.15rem; padding-right: 44px; }
    .tah-mp-grid   { gap: 10px; }
    .tah-mpc-t     { font-size: .82rem; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   FONDO 3D (v6.53) — "hyperspace con estelas"

   Tres capas fijas detrás del contenido, en las cuatro vistas grandes:
   dashboard del creador, panel de la agencia, panel del manager y La Red.

     .tah-bg3d-atmos  z-0  negro de base + degradados de color
     #tah-bg3d        z-1  canvas con las partículas y sus estelas
     .tah-bg3d-scan   z-2  líneas de barrido
     contenido        z-3  (ver el bloque de "contenido por encima")

   ⚠️ DESDE LA v6.53 EL CANVAS SE CUBRE, NO SE BORRA. El motor pinta cada
   fotograma encima del anterior con #000202 al 34 % — es lo que deja el
   rastro de las estelas. A los ~20 fotogramas (un tercio de segundo) el
   lienzo ya es opaco, así que LOS DEGRADADOS DE .tah-bg3d-atmos DEJAN DE
   VERSE mientras la animación corre. Esa capa sigue haciendo falta por lo
   otro que hace: garantizar el negro de base antes del primer fotograma,
   con la pestaña parada, y en modo "reducir movimiento" — donde el motor
   no pinta rastro y los degradados sí se ven.

   Si algún día se quiere recuperar el color del "aire" CON las estelas
   puestas, el sitio es mover .tah-bg3d-atmos POR ENCIMA del canvas y
   quitarle su `background-color`; no vale con subirle la opacidad.

   Dos cosas que hay que respetar al tocar esto:

   1) Los selectores llevan `html body` y `!important` a propósito. El plugin
      inyecta en wp_head un `<style>` con `.entry-content * { background:
      #080B10 !important }` para forzar el tema oscuro sobre el tema de
      WordPress, y esa regla alcanzaría a estas capas y machacaría sus
      degradados dejando el fondo plano.

   2) El contenido necesita z-index explícito. Un canvas `position:fixed` con
      z-index 1 se pinta POR ENCIMA de todo lo que no esté posicionado, así que
      sin esto las partículas taparían el dashboard entero.
   ═══════════════════════════════════════════════════════════════════════════ */

html body .tah-bg3d-atmos {
    position: fixed; inset: 0;
    z-index: 0;
    pointer-events: none;
    /* v6.53 · el MISMO negro con el que el canvas pinta su rastro (#000202).
       Con #000 se ve una costura de dos tonos en el instante en que arranca
       la animación, y otra al parar la pestaña. */
    background-color: #000202 !important;
    background-image:
        radial-gradient(ellipse 70% 50% at 50%  0%, rgba(var(--tah-bg3d-cyan),    .10), transparent 55%),
        radial-gradient(ellipse 60% 50% at 15% 78%, rgba(var(--tah-bg3d-magenta), .07), transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 45%, rgba(var(--tah-bg3d-gold),    .05), transparent 55%) !important;
}

html body #tah-bg3d {
    position: fixed; inset: 0;
    width: 100vw; height: 100vh;
    z-index: 1;
    pointer-events: none;
    display: block;
    background: transparent !important;
}

html body .tah-bg3d-scan {
    position: fixed; inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: .3;
    background: repeating-linear-gradient(
        180deg,
        rgba(255,255,255,.026) 0 1px,
        transparent 1px 3px
    ) !important;
}

/* Colores de los DEGRADADOS del "aire". Separados del resto de variables del
   tema para poder retocarlos sin tocar la paleta de la interfaz.

   v6.53 · las partículas ya NO salen de aquí: el motor nuevo lleva su propia
   paleta de seis colores en la constante COLORS de public.js. Estas tres
   variables solo pintan los degradados de .tah-bg3d-atmos. */
:root {
    --tah-bg3d-cyan:    0,229,255;
    --tah-bg3d-magenta: 255,45,149;
    --tah-bg3d-gold:    255,184,0;
}

/* ── Contenido por encima del fondo ─────────────────────────────────────── */
.tah-dashboard,
.tah-admin-dashboard,
.tah-mgr {
    position: relative;
    z-index: 3;
    background: transparent !important;
}

/* Los overlays del plugin (modales, bottom-sheets, la ventana de detalle del
   panel) ya viven en z-index altísimos, así que no hace falta tocarlos: quedan
   por encima de las tres capas sin más. */

/* ── Accesibilidad y batería ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    /* El JS ya no anima en este caso (pinta un solo fotograma). Bajamos además
       el barrido, que en estático es lo que más molesta a la vista. */
    html body .tah-bg3d-scan { opacity: .12; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODO TV (v6.13) — el panel de la agencia en una pantalla de la oficina

   Se activa con el botón "Pantalla completa": el JS pide fullscreen sobre
   <html> y pone la clase .tah-tv. Dos motivos para hacerlo así y no con
   fullscreen sobre el panel:

     · En pantalla completa el navegador solo pinta el elemento elegido y sus
       descendientes. El fondo 3D vive FUERA del contenedor del panel, así que
       si el fullscreen fuera del panel, el fondo desaparecería.
     · Sacando el panel del flujo con position:fixed tapamos de paso la
       cabecera y el pie del tema de WordPress, que en pantalla completa de
       <html> sí se verían.

   El tamaño de letra no es un capricho: a tres metros, las cifras normales del
   panel no se leen. Todo lo que se agranda aquí es texto de lectura a
   distancia; los controles se quedan como están porque en un TV no se tocan.
   ═══════════════════════════════════════════════════════════════════════════ */

html.tah-tv .tah-admin-dashboard {
    position: fixed;
    inset: 0;
    z-index: 9990;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: clamp(18px, 2vw, 40px) clamp(20px, 2.5vw, 56px) clamp(24px, 3vw, 60px);
    -webkit-overflow-scrolling: touch;
}

/* Cifras y rótulos, escalados para lectura a distancia */
html.tah-tv .tah-ad-header h1     { font-size: clamp(1.6rem, 2.2vw, 2.6rem); }
html.tah-tv .tah-ad-header p      { font-size: clamp(.95rem, 1.05vw, 1.25rem); }
html.tah-tv .tah-ad-section-title { font-size: clamp(1.25rem, 1.5vw, 1.9rem); margin-top: clamp(26px, 2.4vw, 44px); }
html.tah-tv .tah-ad-section-count { font-size: clamp(.8rem, .85vw, 1rem); }
html.tah-tv .tah-ad-card-value    { font-size: clamp(2.1rem, 2.9vw, 3.6rem); }
html.tah-tv .tah-ad-card-name     { font-size: clamp(1rem, 1.15vw, 1.4rem); }
html.tah-tv .tah-ad-card-label    { font-size: clamp(.72rem, .8vw, .95rem); }
html.tah-tv .tah-ad-card-source   { font-size: clamp(.85rem, .95vw, 1.1rem); }
html.tah-tv .tah-ad-bar           { height: 8px; }
html.tah-tv .tah-ad-card          { padding: clamp(16px, 1.5vw, 26px); }
html.tah-tv .tah-ad-grid          { gap: clamp(12px, 1.2vw, 22px); }
html.tah-tv .tah-ad-table         { font-size: clamp(.9rem, 1vw, 1.15rem); }
html.tah-tv .tah-ad-table th      { font-size: clamp(.78rem, .85vw, .95rem); }
html.tah-tv .tah-ad-foot          { font-size: clamp(.82rem, .9vw, 1rem); }

/* El fondo 3D tiene que quedar detrás del panel fijo, no delante */
html.tah-tv .tah-bg3d-atmos { z-index: 9987; }
html.tah-tv #tah-bg3d       { z-index: 9988; }
html.tah-tv .tah-bg3d-scan  { z-index: 9989; }

/* Sin ratón, el puntero se queda clavado en mitad de la pantalla.
   El JS pone .tah-tv-idle tras unos segundos sin movimiento. */
html.tah-tv-idle,
html.tah-tv-idle * { cursor: none !important; }

/* La ventana de detalle debe seguir por encima del panel fijo */
html.tah-tv .tah-ad-drill-modal { z-index: 9995; }

/* En pantallas muy anchas (un TV 4K) las tarjetas no deben quedar gigantes:
   con más ancho, más tarjetas por fila en vez de tarjetas enormes. */
@media (min-width: 2000px) {
    html.tah-tv .tah-ad-card { flex-basis: 340px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   VENTANA DE AVISO (v6.37)

   La que se abre sola al entrar a la app. Vive en public.css y no en red.css
   porque sale en las dos pantallas —el panel y La Red— y esta hoja es la que
   cargan ambas.

   Sobre el z-index: el splash usa 2147483000 y se quita del DOM al terminar.
   Esta se queda por debajo a propósito; si por lo que fuera coincidieran, es
   preferible que gane el splash (que siempre se va) a que una ventana tape
   una pantalla de carga que todavía está trabajando.
   ══════════════════════════════════════════════════════════════════════════ */
.tah-npop {
    position: fixed; inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(5px);
    animation: tah-npop-bg .2s ease;
}
.tah-npop[hidden] { display: none; }
@keyframes tah-npop-bg { from { opacity: 0; } to { opacity: 1; } }

.tah-npop-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--tah-bg-card);
    border: 1px solid var(--tah-border);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,.6);
    animation: tah-npop-in .26s cubic-bezier(.2,.8,.3,1);
}
@keyframes tah-npop-in {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

/* La barra del tiempo que queda. Es la única señal de que se va a cerrar
   sola: sin ella, el cierre automático parece que la app se rompió. */
.tah-npop-bar {
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,.10);
    z-index: 2;
}
.tah-npop-bar i {
    display: block; height: 100%; width: 100%;
    background: var(--tah-primary);
    transform-origin: left center;
    transform: scaleX(1);
}
/* Al tocar la ventana el contador se detiene, y la barra tiene que decirlo:
   se apaga a gris para que se vea que ya no corre el tiempo. */
.tah-npop.is-held .tah-npop-bar i { background: var(--tah-text-subtle); }

.tah-npop-x {
    position: absolute; top: 12px; right: 12px;
    z-index: 3;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff; font-size: 15px; line-height: 1;
    cursor: pointer;
}
.tah-npop-x:active { background: rgba(0,0,0,.8); }

.tah-npop-img { background: #000; line-height: 0; flex-shrink: 0; }
.tah-npop-img img {
    display: block;
    width: 100%; height: auto;
    max-height: 46vh;
    object-fit: cover;
}

.tah-npop-body {
    padding: 16px 18px 4px;
    overflow-y: auto;
}
.tah-npop-ttl {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 1.05rem; font-weight: 600;
    color: var(--tah-text);
    line-height: 1.3;
    margin-bottom: 6px;
}
.tah-npop-txt {
    font-size: .88rem; line-height: 1.55;
    color: var(--tah-text-muted);
    overflow-wrap: anywhere;
}

.tah-npop-foot {
    display: flex; gap: 10px;
    padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
    flex-shrink: 0;
}
.tah-npop-foot > * { flex: 1; }
.tah-npop-go, .tah-npop-ok {
    display: flex; align-items: center; justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: .88rem; font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.tah-npop-go {
    background: var(--tah-primary);
    border: 1px solid var(--tah-primary);
    color: #12161C !important;
}
.tah-npop-ok {
    background: transparent;
    border: 1px solid var(--tah-border);
    color: var(--tah-text-muted);
}
.tah-npop-ok:active { border-color: var(--tah-border-hover); }

@media (prefers-reduced-motion: reduce) {
    .tah-npop, .tah-npop-card { animation: none; }
    /* La transición de la barra NO se apaga aquí: runBar() la escribe en el
       atributo style, que gana a cualquier regla de esta hoja. Lo resuelve
       public.js consultando la misma media query desde JavaScript. */
}


/* ═══════════════════════════════════════════════════════════════════════════
   MIS INFORMES (v6.56) — pantalla completa con cuatro pestañas
   Pintado por src/js/informes.js. Prefijo tah-inf-.
   Paleta y acabado del prototipo "Informes del Streamer" (fondo negro,
   dorado E0A957 / cian 5BB0D3 / rosa B55C8C, Sora + Inter + JetBrains Mono),
   acotados a .tah-inf para no tocar el resto del dashboard. Dos fuentes de
   datos, una por tarjeta: "Oficial · Backstage" (dorado) o "Copiloto" (cian).
   ═══════════════════════════════════════════════════════════════════════════ */
body.tah-inf-open { overflow: hidden; }
.tah-hero[data-informes] { cursor: pointer; transition: border-color var(--tah-transition), transform var(--tah-transition); }
.tah-hero[data-informes]:hover { border-color: rgba(232,161,58,.45); }
.tah-hero[data-informes]:active { transform: scale(.995); }
.tah-hero-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: .78rem; font-weight: 700; color: var(--tah-primary); }
.tah-hero-link::after { content: '\203A'; font-size: 1rem; line-height: 1; }

.tah-inf {
    --bg: #030303;
    --surface: #0B0E15; --surface-2: #111520; --surface-3: #1A2030;
    --line: #1C2331; --line-2: #2A3344;
    --ink: #F4F5F7; --ink-2: #A7ADBA; --muted: #6E7585;
    --gold: #E0A957; --gold-d: #BA853A; --gold-deep: #3B2E14; --gold-line: #8A6A2E;
    --cyan: #5BB0D3; --cyan-d: #3A98BF; --cyan-deep: #12303A; --cyan-line: #2F6E86;
    --pink: #B55C8C;
    --good: #66BB91; --good-ink: #7FD3A6; --warn: #EC835A; --crit: #d03b3b; --crit-ink: #F07A7A;
    --fs: "Sora", "Inter", system-ui, sans-serif;
    --fi: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --fm: "JetBrains Mono", ui-monospace, monospace;
    position: fixed; inset: 0; z-index: 1200; background: var(--bg); color: var(--ink); display: flex; flex-direction: column;
    opacity: 0; transform: translateY(12px); transition: opacity .18s ease, transform .18s ease;
    font-family: var(--fi); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
.tah-inf.is-open { opacity: 1; transform: none; }
.tah-inf[hidden] { display: none !important; }
.tah-inf * { box-sizing: border-box; }
.tah-inf .num { font-variant-numeric: tabular-nums; }
.tah-inf h2, .tah-inf h3 { font-family: var(--fs); margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.tah-inf button:focus-visible, .tah-inf a:focus-visible, .tah-inf [tabindex]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* meteoros de fondo (los pinta informes.js) */
.tah-inf-meteors { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.tah-inf-top, .tah-inf-tabs, .tah-inf-body { position: relative; z-index: 1; }

/* cabecera: logo SD LIVE + título, chip del usuario y cierre */
.tah-inf-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 0; max-width: 488px; width: 100%; margin: 0 auto; }
.tah-inf-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tah-inf-logo { display: flex; flex-direction: column; align-items: center; line-height: .9; padding: 2px 4px; }
.tah-inf-logo .sd { font-family: var(--fs); font-weight: 800; font-size: 9px; letter-spacing: .12em; color: #fff; }
.tah-inf-logo .lv { font-family: var(--fs); font-weight: 800; font-style: italic; font-size: 19px; letter-spacing: -.02em; color: #fff; text-shadow: -1px 0 6px #E0A957cc, 1px 0 8px #5BB0D3cc, 0 0 16px #5BB0D355; }
.tah-inf-title { font-family: var(--fi); font-weight: 800; font-size: 15px; line-height: 1.1; }
.tah-inf-sub { font-size: 12px; color: var(--muted); }
.tah-inf-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.tah-inf-who { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; font-weight: 600; max-width: 150px; }
.tah-inf-who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tah-inf-who .av { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 10px; font-weight: 800; background: linear-gradient(135deg, #E7BC73, #E0A957); color: #2a1c05; }
.tah-inf-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 14px; cursor: pointer; }
.tah-inf-close:hover { border-color: var(--gold); color: var(--gold); }

.tah-inf-tabs { display: flex; gap: 6px; padding: 12px 14px 10px; overflow-x: auto; scrollbar-width: none; max-width: 488px; width: 100%; margin: 0 auto; }
.tah-inf-tabs::-webkit-scrollbar { display: none; }
.tah-inf-tab { flex: 0 0 auto; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 600 13px/1 var(--fi); padding: 9px 13px; border-radius: 999px; cursor: pointer; }
.tah-inf-tab:hover { color: var(--ink); }
.tah-inf-tab.is-active { color: #F2C877; background: linear-gradient(180deg, #4A3918, var(--gold-deep)); border-color: var(--gold); }
.tah-inf-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 14px calc(40px + env(safe-area-inset-bottom, 0px)); }
.tah-inf-panel { display: flex; flex-direction: column; gap: 14px; max-width: 460px; margin: 6px auto 0; }
@media (prefers-reduced-motion: no-preference) { .tah-inf-panel { animation: tah-inf-rise .35s ease both; } @keyframes tah-inf-rise { from { transform: translateY(6px); } to { transform: none; } } }
.tah-inf-panel[hidden] { display: none !important; }
.tah-inf-foot { max-width: 460px; margin: 18px auto 0; font-size: 11.5px; color: var(--muted); text-align: center; }

/* estados */
.tah-inf-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px 16px; color: var(--ink-2); font-size: 13.5px; }
.tah-inf-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--gold); animation: tah-inf-spin .8s linear infinite; }
@keyframes tah-inf-spin { to { transform: rotate(360deg); } }
.tah-inf-empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--line-2); border-radius: 18px; background: linear-gradient(180deg, #0E121BF2, #0A0D14F2); }
.tah-inf-empty-ico { font-size: 38px; margin-bottom: 8px; }
.tah-inf-empty h3 { font-size: 17px; color: #fff; margin-bottom: 6px; }
.tah-inf-empty p { margin: 0 auto; max-width: 320px; color: var(--ink-2); font-size: 13.5px; }
.tah-inf-btn { margin-top: 14px; border: 1px solid var(--gold); background: linear-gradient(180deg, #4A3918, var(--gold-deep)); color: #F2C877; padding: 9px 16px; border-radius: 999px; font: 700 13px var(--fi); cursor: pointer; }

/* selector de lives */
.tah-inf-picks { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tah-inf-picks::-webkit-scrollbar { display: none; }
.tah-inf-pick { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 12px; padding: 7px 10px; font: 500 11.5px var(--fi); cursor: pointer; }
.tah-inf-pick b { color: var(--ink); font-size: 12px; }
.tah-inf-pick.is-active { border-color: var(--gold); background: linear-gradient(180deg, #4A3918, var(--gold-deep)); color: #F2C877; }
.tah-inf-pick.is-active b { color: #fff; }

/* hero: borde superior dorado, glow cálido, número en degradado dorado → rosa */
.tah-inf-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 20px 18px 18px; border: 1px solid #5a4326;
    box-shadow: inset 0 0 0 1px #E0A9571f, 0 12px 46px #B55C8C1f;
    background: radial-gradient(380px 200px at 100% 0%, #E0A9572b, transparent 65%), radial-gradient(340px 220px at 0% 110%, #5BB0D322, transparent 65%), linear-gradient(170deg, #0F121AF5, #07080CF5); }
.tah-inf-hero::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 2; background: linear-gradient(90deg, #FFD66B, #FF8B73 55%, #FF6090); }
.tah-inf-hero .eyebrow { font-family: var(--fm); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #D5D8DF; }
.tah-inf-hero h2 { font-size: 23px; font-weight: 700; margin-top: 6px; color: #fff; }
.tah-inf-hero .date { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.tah-inf-hero .bignum { display: flex; align-items: baseline; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.tah-inf-hero .bignum .v { font-family: var(--fs); font-weight: 700; font-size: 46px; line-height: 1; letter-spacing: -.02em;
    background: linear-gradient(90deg, #FFD777 0%, #FFB655 42%, #FF8B73 68%, #FF6090 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.tah-inf-hero .bignum .u { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.tah-inf-hero .usd { margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tah-inf-hero .usd .money { font-family: var(--fs); font-weight: 700; font-size: 18px; color: var(--gold); }
.tah-inf-hero .usd .aprox { font-size: 11px; color: var(--muted); }
.tah-inf-delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 12.5px; padding: 3px 8px; border-radius: 999px; }
.tah-inf-delta.up { color: var(--good-ink); background: #66BB9122; }
.tah-inf-delta.down { color: var(--crit-ink); background: #d03b3b22; }
.tah-inf-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 16px; }
.tah-inf-kpi { position: relative; overflow: hidden; background: #030303aa; border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.tah-inf-kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; border-radius: 14px 14px 0 0; }
.tah-inf-kpi .k { font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.tah-inf-kpi .v { font-family: var(--fs); font-size: 20px; font-weight: 700; margin-top: 2px; color: #fff; }
.tah-inf-kpi .v small { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.tah-inf-kpi .x { font-size: 11.5px; color: var(--muted); }
/* acento por posición: 1 dorado · 2 cian · 3 rosa · 4 verde (y se repite) */
.tah-inf-kpi:nth-child(4n+1) { border-color: #8A6A2E88; background: radial-gradient(130% 120% at 0% 0%, #E0A9571f, #030303aa 60%); box-shadow: 0 6px 20px #E0A9571a; }
.tah-inf-kpi:nth-child(4n+1)::before { background: linear-gradient(90deg, #FFD66B, #E0A95700); }
.tah-inf-kpi:nth-child(4n+2) { border-color: #2F6E8688; background: radial-gradient(130% 120% at 0% 0%, #5BB0D31f, #030303aa 60%); box-shadow: 0 6px 20px #3DD5FF14; }
.tah-inf-kpi:nth-child(4n+2)::before { background: linear-gradient(90deg, #3DD5FF, #5BB0D300); }
.tah-inf-kpi:nth-child(4n+3) { border-color: #B55C8C99; background: radial-gradient(130% 120% at 0% 0%, #B55C8C26, #030303aa 60%); box-shadow: 0 6px 20px #FF4D9D14; }
.tah-inf-kpi:nth-child(4n+3)::before { background: linear-gradient(90deg, #FF4D9D, #B55C8C00); }
.tah-inf-kpi:nth-child(4n+4) { border-color: #2E8F6299; background: radial-gradient(130% 120% at 0% 0%, #2FD27F1f, #030303aa 60%); box-shadow: 0 6px 20px #2FD27F14; }
.tah-inf-kpi:nth-child(4n+4)::before { background: linear-gradient(90deg, #2FD27F, #2FD27F00); }

/* pastillas de fuente */
.tah-inf-pill { font-family: var(--fm); font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 3px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tah-inf-pill.oficial { color: var(--gold); border-color: #E0A95766; background: #3B2E1499; }
.tah-inf-pill.copiloto { color: var(--cyan); border-color: #5BB0D355; background: #12303A99; }
.tah-inf-pill.manager { color: #E3A6C6; border-color: #B55C8C66; background: #B55C8C1a; }
.tah-inf-pill.lola { color: var(--cyan); border-color: #5BB0D355; background: #12303A99; }

/* tarjetas */
.tah-inf-card { background: linear-gradient(180deg, #0E121BF2, #0A0D14F2); border: 1px solid var(--line-2); border-radius: 18px; padding: 16px; }
.tah-inf-card h3 { font-size: 16.5px; font-weight: 700; color: #fff; }
.tah-inf-card .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tah-inf-cardhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.tah-inf-cardhead .src { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.tah-inf-card.coach { border: 1px solid var(--cyan-line); background: linear-gradient(170deg, #12303A88, #0B0E15 55%); }
.tah-inf-card.moment { border: 1px solid var(--gold-line); background: linear-gradient(160deg, #3B2E14cc, #0B0E15 65%); }
.tah-inf-card.moment .big { font-family: var(--fs); font-weight: 700; font-size: 26px; color: var(--gold); }
.tah-inf-card p.body { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.tah-inf-card p.body b { color: var(--ink); }
.tah-inf-card.moment p.body { margin-top: 6px; }
.tah-inf-grouptitle { font-family: var(--fm); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); margin: 4px 0 8px; }
.tah-inf-grouptitle.gold { color: var(--gold); }
.tah-inf-note { font-size: 12.5px; color: var(--ink-2); margin: 10px 0 0; }
.tah-inf-note b { color: var(--ink); }
.tah-inf-official { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tah-inf-official .ov { font-family: var(--fs); font-weight: 700; font-size: 26px; color: var(--gold); white-space: nowrap; }
.tah-inf-official .ov small { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.tah-inf-official .os { flex: 1; min-width: 180px; font-size: 12.5px; color: var(--ink-2); }

/* listas */
.tah-inf-two { display: grid; grid-template-columns: 1fr; gap: 10px; }
.tah-inf-li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 11px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: left; color: var(--ink); text-decoration: none; width: 100%; font-family: var(--fi); }
.tah-inf-card.coach .tah-inf-li { background: #030303aa; }
.tah-inf-li .ico { flex: 0 0 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-weight: 900; font-size: 12.5px; color: #fff; }
.tah-inf-li .ico.good { background: var(--good); } .tah-inf-li .ico.warn { background: var(--warn); color: #2a1206; } .tah-inf-li .ico.crit { background: var(--crit); }
.tah-inf-li .lt { font-weight: 600; font-size: 13.5px; }
.tah-inf-li .ls { font-size: 12px; color: var(--muted); margin-top: 1px; }
.tah-inf-li .lbl { font-family: var(--fm); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-right: 6px; }
.tah-inf .lbl.good { color: var(--good-ink); } .tah-inf .lbl.warn { color: var(--warn); } .tah-inf .lbl.crit { color: var(--crit-ink); } .tah-inf .lbl.gold { color: var(--gold); }
.tah-inf-plan { display: flex; flex-direction: column; gap: 8px; counter-reset: p; }
.tah-inf-plan .tah-inf-li { align-items: center; cursor: pointer; }
.tah-inf-plan .tah-inf-li::before { counter-increment: p; content: counter(p); flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; background: var(--pink); color: #fff; }
.tah-inf-plan .tah-inf-li:hover { border-color: var(--line-2); }

/* gráficas */
.tah-inf-chart { width: 100%; height: auto; display: block; overflow: visible; }
.tah-inf-axis { fill: var(--muted); font: 500 10.5px var(--fi); }
.tah-inf-grid { stroke: var(--line); stroke-width: 1; }
.tah-inf-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.tah-inf-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tah-inf-scale { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 10px; }
.tah-inf-scale .sw { width: 16px; height: 10px; border-radius: 3px; display: inline-block; }
.tah-inf-scale .sw.prov { background: repeating-linear-gradient(45deg, #5E4419 0 3px, transparent 3px 6px); border: 1px solid #86612A; }
.tah-inf-scale .sk { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; }

/* podio */
.tah-inf-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin-top: 4px; }
.tah-inf-podium .pod { text-align: center; border-radius: 14px 14px 8px 8px; padding: 10px 6px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.tah-inf-podium .av { width: 44px; height: 44px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--surface-3); position: relative; }
.tah-inf-podium .p1 .av { width: 54px; height: 54px; box-shadow: 0 0 0 2px var(--gold), 0 0 22px #E0A95766; }
.tah-inf-podium .p2 .av { box-shadow: 0 0 0 2px #B9C3D6; } .tah-inf-podium .p3 .av { box-shadow: 0 0 0 2px #C98A55; }
.tah-inf-podium .medal { position: absolute; bottom: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; font-size: 10.5px; font-weight: 900; display: grid; place-items: center; color: #1a1300; }
.tah-inf-podium .p1 .medal { background: var(--gold); } .tah-inf-podium .p2 .medal { background: #B9C3D6; } .tah-inf-podium .p3 .medal { background: #C98A55; }
.tah-inf-podium .n { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tah-inf-podium .dv { font-family: var(--fs); font-size: 15px; font-weight: 700; margin-top: 2px; }
.tah-inf-podium .lv { font-size: 10.5px; color: var(--muted); }
.tah-inf-podium .p1 { padding-top: 14px; background: linear-gradient(180deg, #E0A95726, var(--surface-2)); border-color: #8A6A2E88; }
.tah-inf-rank { margin-top: 10px; }
.tah-inf-rank .rrow { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 7px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.tah-inf-rank .p { color: var(--muted); font-weight: 700; }
.tah-inf-rank .bar { height: 4px; border-radius: 4px; background: var(--gold-d); margin-top: 4px; }
.tah-inf-rank .dv { font-weight: 700; }
.tah-inf-tag { font-family: var(--fm); font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--good-ink); background: #66BB9122; padding: 1px 6px; border-radius: 5px; vertical-align: 1px; }

/* barra partida */
.tah-inf-split { display: flex; gap: 2px; height: 30px; border-radius: 8px; overflow: hidden; }
.tah-inf-split > div { display: flex; align-items: center; padding: 0 9px; font-size: 12px; font-weight: 800; color: #0b0803; min-width: 0; white-space: nowrap; overflow: hidden; }
.tah-inf-split .a { background: var(--gold-d); }
.tah-inf-split .b { background: var(--cyan-d); color: #03141c; justify-content: flex-end; }
.tah-inf-splitlab { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-top: 6px; gap: 8px; }
.tah-inf-splitlab b { color: var(--ink); }

/* chat */
.tah-inf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tah-inf-chips .chat { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; font-size: 13px; }
.tah-inf-chips .chat b { font-size: 11.5px; color: var(--ink-2); font-weight: 800; }

/* navegación semana / mes */
.tah-inf-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tah-inf-navbtn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.tah-inf-navbtn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.tah-inf-navbtn:disabled { opacity: .3; cursor: default; }
.tah-inf-navlab { font-family: var(--fs); font-weight: 600; font-size: 14px; text-align: center; }
.tah-inf-dots { display: flex; gap: 6px; margin-top: 8px; }
.tah-inf-dots .dot7 { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); }
.tah-inf-dots .dot7 i { display: block; height: 8px; border-radius: 8px; margin-bottom: 5px; background: var(--surface-3); }
.tah-inf-dots .dot7.on i { background: linear-gradient(90deg, #CC9143, var(--gold)); }

/* metas de TikTok */
.tah-inf-goal { margin-top: 10px; }
.tah-inf-goal .gl { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; }
.tah-inf-goal .gl b { color: var(--ink); }
.tah-inf-goal .gbar { height: 12px; border-radius: 12px; background: var(--surface-3); overflow: hidden; }
.tah-inf-goal .gbar > div { height: 100%; border-radius: 12px; background: linear-gradient(90deg, #CC9143, var(--gold)); }
.tah-inf-goal .gbar > div.done { background: linear-gradient(90deg, #3FBE8F, var(--good-ink)); }

/* alertas de donadores */
.tah-inf-alert { display: flex; gap: 10px; align-items: center; padding: 11px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.tah-inf-alert + .tah-inf-alert { margin-top: 8px; }
.tah-inf-alert .av { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--surface-3); }
.tah-inf-alert .av.good { box-shadow: 0 0 0 2px var(--good); } .tah-inf-alert .av.warn { box-shadow: 0 0 0 2px var(--warn); } .tah-inf-alert .av.gold { box-shadow: 0 0 0 2px var(--gold); }
.tah-inf-alert .t { font-size: 13px; font-weight: 600; } .tah-inf-alert .s { font-size: 12px; color: var(--muted); }
.tah-inf-alert .lbl { font-family: var(--fm); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-right: 6px; }

/* calendario */
.tah-inf-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tah-inf-cal .h { font-size: 10.5px; text-align: center; color: var(--muted); font-weight: 700; padding-bottom: 2px; }
.tah-inf-cal .c { aspect-ratio: 1; border-radius: 7px; display: flex; align-items: flex-start; padding: 4px 5px; font-size: 10px; font-weight: 700; color: #ffffffcc; min-width: 0; }
.tah-inf-cal .c.blank { background: transparent; }
.tah-inf-cal .c.future { background: transparent; color: var(--muted); opacity: .5; }
.tah-inf-cal .c.off { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); }
.tah-inf-cal .c.prov { background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.25) 0 3px, transparent 3px 6px); border: 1px solid #86612A; }
.tah-inf-cal .c.best { outline: 2px solid #fff; outline-offset: 1px; }
.tah-inf-cal .c.est { border: 1px dotted rgba(255,255,255,.55); }

/* stats / badges */
.tah-inf-stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tah-inf-stats3 .st { padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.tah-inf-stats3 .k { font-size: 11px; color: var(--muted); font-weight: 600; }
.tah-inf-stats3 .v { font-family: var(--fs); font-size: 19px; font-weight: 700; margin-top: 2px; color: #fff; }
.tah-inf-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tah-inf-badge { padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: flex; gap: 10px; align-items: center; min-width: 0; }
.tah-inf-badge .b { flex: 0 0 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-family: var(--fs); font-weight: 800; font-size: 12px; color: #2a1c05; background: linear-gradient(135deg, #E7BC73, var(--gold)); }
.tah-inf-badge .b.t { background: linear-gradient(135deg, #98D8ED, var(--cyan)); color: #04202b; }
.tah-inf-badge .b.l { background: linear-gradient(135deg, #D78AB3, var(--pink)); color: #fff; }
.tah-inf-badge .bt { font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.tah-inf-badge .bs { font-size: 11px; color: var(--muted); }

/* mapa de calor */
.tah-inf-heat { display: grid; grid-template-columns: 34px repeat(6, 1fr); gap: 3px; align-items: center; }
.tah-inf-heat .h { font-size: 9.5px; color: var(--muted); text-align: center; }
.tah-inf-heat .d { font-size: 11px; color: var(--ink-2); font-weight: 600; }
.tah-inf-heat .c { aspect-ratio: 1.6; border-radius: 5px; min-width: 0; }
.tah-inf-heat .c.peak { outline: 2px solid #fff; outline-offset: 1px; }

/* tooltip */
.tah-inf-tip { position: fixed; z-index: 1300; pointer-events: none; background: #030303F2; border: 1px solid var(--line-2); color: var(--ink); padding: 7px 10px; border-radius: 10px; font-size: 12px; line-height: 1.35; box-shadow: 0 8px 24px #0008; max-width: 230px; font-family: var(--fi); }
.tah-inf-tip b { font-weight: 800; }
.tah-inf-tip .m { color: var(--ink-2); }
.tah-inf [data-tip] { cursor: default; }

@media (prefers-reduced-motion: reduce) {
    .tah-inf { transition: none; }
    .tah-inf-spin { animation: none; }
}

/* ── Mis informes · tarjetas KPI tocables y hoja de detalle (v6.56) ──────── */
.tah-inf-kpi.is-tap { cursor: pointer; padding-right: 26px; transition: transform .12s ease, filter .12s ease; }
.tah-inf-kpi.is-tap:hover { filter: brightness(1.12); }
.tah-inf-kpi.is-tap:active { transform: scale(.985); }
.tah-inf-kpi .tap { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 18px; line-height: 1; color: var(--ink-2); opacity: .7; }
.tah-inf-kpi.is-tap:hover .tap { color: var(--gold); opacity: 1; }

.tah-inf-sheet { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: center; }
.tah-inf-sheet[hidden] { display: none !important; }
.tah-inf-sheet-backdrop { position: absolute; inset: 0; background: rgba(3,3,3,.72); opacity: 0; transition: opacity .18s ease; }
.tah-inf-sheet.is-open .tah-inf-sheet-backdrop { opacity: 1; }
.tah-inf-sheet-panel { position: relative; width: 100%; max-width: 488px; max-height: 88%; display: flex; flex-direction: column;
    background: linear-gradient(180deg, #0E121B, #0A0D14); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 46px #000c, inset 0 1px 0 #E0A95733; transform: translateY(24px); opacity: 0; transition: transform .2s ease, opacity .18s ease; }
.tah-inf-sheet.is-open .tah-inf-sheet-panel { transform: none; opacity: 1; }
.tah-inf-sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 10px auto 0; }
.tah-inf-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 16px 12px; border-bottom: 1px solid var(--line); }
.tah-inf-sheet-title { font-family: var(--fs); font-weight: 700; font-size: 17px; color: #fff; line-height: 1.15; }
.tah-inf-sheet-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tah-inf-sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.tah-inf-sheet-body .tah-inf-stats3 .x { font-size: 10.5px; color: var(--ink-2); }
@media (min-width: 721px) {
    .tah-inf-sheet { align-items: center; }
    .tah-inf-sheet-panel { border-radius: 22px; border-bottom: 1px solid var(--line-2); max-height: 82%; }
}

/* filas de detalle */
.tah-inf-rows { margin-top: 12px; }
.tah-inf-rows .row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.tah-inf-rows .row:first-child { border-top: 0; }
.tah-inf-rows .row.is-link { cursor: pointer; }
.tah-inf-rows .row.is-link:hover .n { color: var(--gold); }
.tah-inf-rows .row.is-future { opacity: .45; }
.tah-inf-rows .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--surface-3); color: var(--ink); }
.tah-inf-rows .av.ok { box-shadow: 0 0 0 2px var(--gold); }
.tah-inf-rows .p { width: 34px; text-align: center; color: var(--muted); font-weight: 800; }
.tah-inf-rows .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tah-inf-rows .s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.tah-inf-rows .bar { height: 3px; border-radius: 3px; background: var(--gold-d); margin-top: 5px; opacity: .8; }
.tah-inf-rows .x { color: var(--ink-2); font-size: 12px; white-space: nowrap; text-align: right; }
.tah-inf-rows .x b { color: var(--ink); font-size: 13px; }

/* ── Inicio · fila de dos tarjetas: diamantes del mes + widget del último live (v6.58) ── */
.tah-hero-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 18px; align-items: stretch; }
.tah-hero.tah-hero-in-row { margin: 0; padding: 16px 16px 14px; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 10px; min-width: 0; }
.tah-hero.tah-hero-in-row .tah-hero-main { min-width: 0; }
.tah-hero.tah-hero-in-row .tah-hero-value { font-size: 2rem; }
.tah-hero.tah-hero-in-row .tah-hero-diamond { font-size: 1.7rem; }
.tah-hero.tah-hero-in-row .tah-hero-side { max-width: 100%; align-items: flex-start; }
.tah-hero.tah-hero-in-row .tah-hero-chip { font-size: .74rem; padding: 6px 10px; }
.tah-hero-widget { display: flex; }
.tah-hero-widget .tah-hero-label { color: var(--tah-primary); }
.tah-hero-wdate { font-size: .74rem; color: var(--tah-text-muted); margin-top: 2px; }
.tah-hero-wvalue { display: inline-flex; align-items: center; gap: 6px; font-size: 1.5rem; font-weight: 800; line-height: 1.1; margin-top: 4px; color: #fff; font-family: var(--tah-font-display); }
.tah-hero-wvalue span { font-size: 1.2rem; }
.tah-hero-spark { width: 100%; height: 46px; display: block; margin: 6px 0 4px; overflow: visible; }
.tah-hero-wmeta { font-size: .72rem; color: var(--tah-text-subtle); line-height: 1.35; }
.tah-hero-widget.is-empty { justify-content: flex-start; }
.tah-hero-wempty { font-size: 2rem; line-height: 1; margin: 6px 0 4px; filter: grayscale(.4); }
@media (max-width: 380px) {
    .tah-hero-row { gap: 8px; }
    .tah-hero.tah-hero-in-row { padding: 13px 12px 12px; }
    .tah-hero.tah-hero-in-row .tah-hero-value { font-size: 1.6rem; }
    .tah-hero-wvalue { font-size: 1.25rem; }
}

/* Mis informes · el resumen del live con sus saltos de línea, como en La Emisora */
.tah-inf-report { white-space: pre-line; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.6; color: var(--ink); }

/* Mis informes abiertos: el botón flotante de LOLA se retira para que el informe se lea entero (v6.58.1) */
body.tah-inf-open #tah-ai-chat-toggle { display: none !important; }

/* ── Mis informes · lo que avisó el copiloto (v6.59) ─────────────────────── */
.tah-inf-kind { font-family: var(--fm); font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; margin-right: 6px; vertical-align: 1px; background: var(--surface-3); color: var(--ink-2); }
.tah-inf-kind.crit { background: #d03b3b22; color: var(--crit-ink); }
.tah-inf-kind.warn { background: #EC835A22; color: var(--warn); }
.tah-inf-kind.good { background: #66BB9122; color: var(--good-ink); }
.tah-inf-kind.gold { background: #3B2E1499; color: var(--gold); }
.tah-inf-kind.cyan { background: #12303A99; color: var(--cyan); }
.tah-inf-kind.perf { background: #2FD17922; color: #2FD179; }
.tah-inf-rows .av.crit { box-shadow: 0 0 0 2px var(--crit); }
.tah-inf-rows .av.warn { box-shadow: 0 0 0 2px var(--warn); }
.tah-inf-rows .av.good { box-shadow: 0 0 0 2px var(--good); }
.tah-inf-rows .av.gold { box-shadow: 0 0 0 2px var(--gold); }
.tah-inf-rows .av.cyan { box-shadow: 0 0 0 2px var(--cyan); }
.tah-inf-rows .av.perf { box-shadow: 0 0 0 2px #2FD179; }
.tah-inf-rows .n b { color: var(--gold); font-size: 12px; }
.tah-inf-more { width: 100%; margin-top: 12px; }

/* v6.59.1 · sin desborde horizontal en Mis informes: las celdas de la cuadrícula pueden encoger y el texto largo se parte */
.tah-inf-body { overflow-x: hidden; }
.tah-inf-card, .tah-inf-hero, .tah-inf-panel { min-width: 0; overflow-wrap: anywhere; }
.tah-inf-rows .row > div { min-width: 0; }
.tah-inf-rows .s { overflow-wrap: anywhere; white-space: normal; }
.tah-inf-rows .row.is-alert .n { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }
.tah-inf-rows .row.is-alert .x { white-space: normal; text-align: right; max-width: 72px; font-size: 11.5px; line-height: 1.3; }
.tah-inf-rows .row.is-alert .x small { display: block; font-size: 10px; color: var(--muted); }
.tah-inf-kpi .k, .tah-inf-kpi .x { overflow-wrap: anywhere; }
.tah-inf-chips .chat { max-width: 100%; overflow-wrap: anywhere; }
