.table i.fa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25em;
    height: 1.25em;
}

.module-action-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

* {
    box-sizing: border-box;
}

:root {
    --theme-radius-sm: 8px;
    --theme-radius-md: 14px;
    --theme-radius-lg: 20px;
    --theme-radius-pill: 999px;
    --theme-shadow-1: 0 4px 14px rgba(0, 0, 0, 0.08);
    --theme-shadow-2: 0 8px 24px rgba(0, 0, 0, 0.15);
    --theme-shadow-3: 0 12px 32px rgba(0, 0, 0, 0.18);
    --theme-control-padding-y: 0.5rem;
    --theme-control-padding-x: 1rem;
    --theme-control-font-size: 0.95rem;
    --theme-card-body-padding: 1.5rem;
    --theme-focus-ring-color: #0ea5e9;
    --theme-star-color: #f4b400;
    --theme-star-color-rgb: 244, 180, 0;
    --theme-font-heading-primary: "Playfair Display", Georgia, "Times New Roman", serif;
    --theme-font-heading-secondary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --theme-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --theme-font-size-body: 1rem;
    --theme-heading-scale: 1;
    --theme-text-title: var(--theme-on-background, var(--theme-quaternary, #343a40));
    --theme-text-subtitle: rgba(var(--theme-on-background-rgb, var(--theme-quaternary-rgb, 52, 58, 64)), 0.78);
    --theme-text-body: var(--theme-on-background, var(--theme-quaternary, #343a40));
    --theme-text-muted: rgba(var(--theme-on-background-rgb, var(--theme-quaternary-rgb, 52, 58, 64)), 0.68);
    --theme-text-title-on-surface: var(--theme-on-tertiary, #1f2937);
    --theme-text-subtitle-on-surface: rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.78);
    --theme-text-body-on-surface: var(--theme-on-tertiary, #1f2937);
    --theme-text-muted-on-surface: rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.68);
    --theme-control-bg: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
    --theme-control-bg-focus: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.28);
    --theme-control-border: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.7);
    --theme-control-border-focus: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.95);
    --theme-control-text: #111827;
    --theme-control-placeholder: rgba(17, 24, 39, 0.72);
    /* Superficie de tarjetas/paneles: blanca en claro, oscura en oscuro.
       Las superficies deben usar var(--theme-surface) + var(--theme-on-surface)
       en vez de #fff hardcodeado, así el texto se lee en ambos modos. */
    --theme-surface: #ffffff;
    --theme-surface-2: #f4f6f9;
    --theme-on-surface: #1f2937;
    --theme-on-surface-muted: rgba(31, 41, 55, 0.66);

}

body.theme-mode-light {
    --theme-control-text: #111827;
    --theme-control-placeholder: rgba(17, 24, 39, 0.72);
}

body.theme-mode-dark {
    --theme-control-text: #ffffff;
    --theme-control-placeholder: rgba(255, 255, 255, 0.78);
    --theme-surface: #1b2230;
    --theme-surface-2: #232c3c;
    --theme-on-surface: #e8edf5;
    --theme-on-surface-muted: rgba(232, 237, 245, 0.66);
}

/* Full-bleed home sections use width:100vw, which includes the vertical
   scrollbar width and overflows the viewport by ~15px (a phantom horizontal
   scrollbar + sections cut off on the right). overflow-x:hidden on <body>
   doesn't catch it because the overflow lives at the <html> level, so clip it
   here. clip (not hidden) avoids turning <html> into a scroll container, so
   vertical position:sticky keeps working. */
html {
    overflow-x: clip;
}

body {
    font-family: var(--theme-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif);
    font-size: var(--theme-font-size-body, 1rem);
    background-color: var(--theme-background, #f5f5f7);
    color: var(--theme-text-body, var(--theme-on-background, var(--theme-quaternary, #343a40)));
    line-height: 1.6;
    width: 100%;
    /* clip (not hidden): hidden makes the browser compute overflow-y as auto,
       turning <body> into a scroll container and breaking vertical
       position:sticky on all descendants (admin/teacher sidebars). clip stops
       the phantom horizontal scrollbar the same way without that side effect.
       Mirrors the html{overflow-x:clip} rule a few lines above. */
    overflow-x: clip;
}

:where(
    p,
    span,
    li,
    a,
    label,
    small,
    strong,
    em,
    figcaption,
    blockquote,
    dt,
    dd,
    td,
    th,
    button,
    input,
    select,
    textarea,
    option,
    .form-text,
    .form-label,
    .nav-link,
    .dropdown-item,
    .btn,
    .badge,
    .alert,
    .table,
    .accordion-body,
    .card-text,
    .text-muted
) {
    font-family: var(--theme-font-body, inherit);
    color: inherit;
}

h1,
.display-1,
.display-2,
.display-3,
.display-4 {
    font-family: var(--theme-font-heading-primary, var(--theme-font-body, inherit));
}

h2,
h3,
h4,
h5,
h6,
.card-title,
.modal-title,
.accordion-button {
    font-family: var(--theme-font-heading-secondary, var(--theme-font-body, inherit));
}

h1 {
    font-size: calc(2.25rem * var(--theme-heading-scale, 1));
}


/* Global title/readability mapping to theme palette */
h1,
h2,
h3,
h4,
h5,
h6,
.page-header-title,
.page-header-title i,
.page-back-link,
.page-subtitle {
    color: var(--theme-text-title, var(--theme-on-background, var(--theme-quaternary, #343a40)));
}

.modal-title {
    color: var(--theme-text-title-on-surface, var(--theme-on-tertiary, #1f2937));
}

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.panel-card h1,
.panel-card h2,
.panel-card h3,
.panel-card h4,
.panel-card h5,
.panel-card h6,
.settings-card h1,
.settings-card h2,
.settings-card h3,
.settings-card h4,
.settings-card h5,
.settings-card h6,
.dashboard-card h1,
.dashboard-card h2,
.dashboard-card h3,
.dashboard-card h4,
.dashboard-card h5,
.dashboard-card h6 {
    color: var(--theme-text-title-on-surface, var(--theme-on-tertiary, #1f2937));
}

.page-subtitle,
.lead,
.form-text,
.small.text-muted,
small.text-muted,
p.text-muted {
    color: var(--theme-text-subtitle, rgba(var(--theme-on-background-rgb, var(--theme-quaternary-rgb, 52, 58, 64)), 0.78));
}

.card .page-subtitle,
.card .lead,
.card .form-text,
.card .small.text-muted,
.card small.text-muted,
.card p.text-muted,
.panel-card .page-subtitle,
.panel-card .lead,
.panel-card .form-text,
.panel-card .small.text-muted,
.panel-card small.text-muted,
.panel-card p.text-muted,
.settings-card .page-subtitle,
.settings-card .lead,
.settings-card .form-text,
.settings-card .small.text-muted,
.settings-card small.text-muted,
.settings-card p.text-muted,
.dashboard-card .page-subtitle,
.dashboard-card .lead,
.dashboard-card .form-text,
.dashboard-card .small.text-muted,
.dashboard-card small.text-muted,
.dashboard-card p.text-muted {
    color: var(--theme-text-subtitle-on-surface, rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.78));
}

.text-muted {
    color: var(--theme-text-muted, rgba(var(--theme-on-background-rgb, var(--theme-quaternary-rgb, 52, 58, 64)), 0.68)) !important;
}

.card .text-muted,
.panel-card .text-muted,
.settings-card .text-muted,
.dashboard-card .text-muted {
    color: var(--theme-text-muted-on-surface, rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.68)) !important;
}

.theme-text-title {
    color: var(--theme-text-title, var(--theme-on-background, var(--theme-quaternary, #343a40))) !important;
}

.theme-text-subtitle {
    color: var(--theme-text-subtitle, rgba(var(--theme-on-background-rgb, var(--theme-quaternary-rgb, 52, 58, 64)), 0.78)) !important;
}

.theme-text-body {
    color: var(--theme-text-body, var(--theme-on-background, var(--theme-quaternary, #343a40))) !important;
}

.theme-text-title-on-surface {
    color: var(--theme-text-title-on-surface, var(--theme-on-tertiary, #1f2937)) !important;
}

.theme-text-subtitle-on-surface {
    color: var(--theme-text-subtitle-on-surface, rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.78)) !important;
}

.theme-text-body-on-surface {
    color: var(--theme-text-body-on-surface, var(--theme-on-tertiary, #1f2937)) !important;
}

.modal-content {
    color: var(--theme-text-body-on-surface, var(--theme-on-tertiary, #1f2937));
}

.modal-content .modal-title {
    color: var(--theme-text-title-on-surface, var(--theme-on-tertiary, #1f2937));
}

.modal-content .text-muted {
    color: var(--theme-text-muted-on-surface, rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.68)) !important;
}

h2 {
    font-size: calc(1.75rem * var(--theme-heading-scale, 1));
}

h3 {
    font-size: calc(1.35rem * var(--theme-heading-scale, 1));
}

/* OJO: especificidad (0,2,1). Le gana a cualquier `.clase i` (0,1,1) y a
   cualquier `.clase` suelta, esté donde esté y en el archivo que sea. Por eso
   toda estrella de rating que deba ir dorada necesita `!important` (buscar
   "--theme-star-color" para verlas todas). Las estrellas decorativas SÍ deben
   caer acá: siguen la paleta del tenant. */
i.fa-solid:not([class*="text-"]),
i.fa-regular:not([class*="text-"]),
i.fa-brands:not([class*="text-"]),
i.fas:not([class*="text-"]),
i.far:not([class*="text-"]),
i.fab:not([class*="text-"]) {
    color: var(--theme-primary, #9ed0c5);
}

/* Excepción: dentro de un badge SÓLIDO el ícono tiene que heredar el color del
   badge. Si cae en la regla de arriba queda del mismo color que su propio
   fondo (--theme-primary sobre --bs-primary) y se vuelve invisible. */
.badge.text-bg-primary i {
    color: inherit !important;
}

.content-wrapper {
    width: 100%;
}

.site-footer {
    /* El texto/bordes del footer salen de --theme-on-footer, que contrasta con el
       fondo REAL del footer (--theme-footer): footer oscuro -> texto claro, footer
       claro -> texto oscuro. (El público fuerza footer oscuro y setea su on-footer
       claro en home-rubro.css.) NO usar on-surface: depende del modo, no del bg. */
    --footer-text: var(--theme-on-footer);
    --footer-text-strong: var(--theme-on-footer);
    --footer-text-soft: rgba(var(--theme-on-footer-rgb), 0.72);
    --footer-text-muted: rgba(var(--theme-on-footer-rgb), 0.66);
    --footer-text-heading: rgba(var(--theme-on-footer-rgb), 0.68);
    --footer-divider: rgba(var(--theme-on-footer-rgb), 0.2);
    --footer-social-bg: rgba(var(--theme-on-footer-rgb), 0.1);
    --footer-social-border: rgba(var(--theme-on-footer-rgb), 0.28);
    --footer-pill-bg: rgba(var(--theme-on-footer-rgb), 0.08);
    --footer-pill-border: rgba(var(--theme-on-footer-rgb), 0.28);
    padding: 0;
    color: var(--footer-text);
    margin-bottom: 0;
    width: 100%;
}

.site-footer__shell {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Match Bootstrap .container (used by the navbar) so footer content lines up
   with the navbar margins at every breakpoint instead of spilling wider. */
.site-footer__inner {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 12px;
}

@media (min-width: 576px) {
    .site-footer__inner { max-width: 540px; }
}

@media (min-width: 768px) {
    .site-footer__inner { max-width: 720px; }
}

@media (min-width: 992px) {
    .site-footer__inner { max-width: 960px; }
}

@media (min-width: 1200px) {
    .site-footer__inner { max-width: 1140px; }
}

@media (min-width: 1400px) {
    .site-footer__inner { max-width: 1320px; }
}

.site-footer__top {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1.15fr 1.25fr;
    gap: 2.5rem;
    align-items: start;
    padding: 2.75rem 0 0;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.site-footer__brand-header {
    display: flex;
    gap: 14px;
    align-items: center;
}

.site-footer__logo-wrap {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background-color: rgba(var(--theme-on-footer-rgb), 0.06);
    border: 1px solid rgba(var(--theme-on-footer-rgb), 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.site-footer__logo {
    max-width: 44px;
    max-height: 44px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.site-footer__brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-footer__name {
    color: var(--footer-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.site-footer__tagline {
    color: var(--footer-text-soft);
    font-size: 13px;
}

.site-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.site-footer__social-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--footer-social-border);
    background-color: var(--footer-social-bg);
    color: var(--footer-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    text-decoration: none;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.site-footer__social-btn:hover,
.site-footer__social-btn:focus {
    color: var(--footer-text);
    border-color: rgba(var(--theme-on-footer-rgb), 0.4);
    background-color: rgba(var(--theme-on-footer-rgb), 0.14);
    text-decoration: none;
}

.site-footer__col {
    min-width: 0;
}

.site-footer__heading {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--footer-text-heading);
    font-weight: 600;
    margin: 0 0 12px;
}

.site-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer__list li {
    margin-bottom: 8px;
}

.site-footer__list li:last-child {
    margin-bottom: 0;
}

.site-footer__list a,
.site-footer__list-static {
    color: var(--footer-text-strong);
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 120ms ease;
}

.site-footer__list a:hover,
.site-footer__list a:focus {
    color: var(--theme-brand-accent, var(--footer-text));
    text-decoration: none;
}

.site-footer__list-icon {
    /* !important: pisa la regla global i.fa-* { color: primary } (site.css:295),
       que en footer claro deja el icono en gold crudo lavado. */
    color: var(--footer-text-soft) !important;
    font-size: 16px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.site-footer__email-link {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.site-footer__email-text {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.site-footer__divider {
    height: 1px;
    background-color: var(--footer-divider);
    margin: 2rem 0 0;
    border: 0;
}

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 1rem 0;
}

.site-footer__copy {
    color: var(--footer-text-muted);
    font-size: 13px;
}

.site-footer__attribution {
    color: var(--footer-text-strong);
    font-size: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--footer-pill-bg);
    border: 1px solid var(--footer-pill-border);
    border-radius: 8px;
    padding: 6px 12px;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.site-footer__attribution:hover,
.site-footer__attribution:focus {
    color: var(--footer-text);
    text-decoration: none;
    background-color: rgba(var(--theme-on-footer-rgb), 0.12);
    border-color: rgba(var(--theme-on-footer-rgb), 0.3);
}

.site-footer__attribution-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--theme-brand-accent, var(--footer-text));
    display: inline-block;
}

.site-footer__attribution-brand {
    color: var(--footer-text);
    font-weight: 700;
}

.site-footer__attribution-icon {
    font-size: 11px;
    color: var(--footer-text-soft) !important; /* pisa i.fa-* global (ver list-icon) */
}

@media (max-width: 768px) {
    .site-footer__shell {
        padding: 0;
    }

    .site-footer__top {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 1.25rem;
        padding: 1.75rem 0 0;
    }

    /* marca arriba a todo el ancho; Enlaces + Medios en 2 columnas;
       Contacto a ancho completo abajo para que el mail nunca se corte */
    .site-footer__brand        { grid-column: 1 / -1; grid-row: 1; }
    .site-footer__col--links   { grid-column: 1;      grid-row: 2; }
    .site-footer__col--pay     { grid-column: 2;      grid-row: 2; }
    .site-footer__col--contact { grid-column: 1 / -1; grid-row: 3; }

    .site-footer__brand {
        width: 100%;
        gap: 1rem;
    }

    .site-footer__social {
        width: 100%;
        justify-content: flex-start;
    }

    .site-footer__col {
        min-width: 0;
    }

    .site-footer__divider {
        margin: 1.25rem 0 0;
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 1rem 0 1.25rem;
    }
}

.sweet-navbar {
    background-color: rgba(var(--theme-navbar-rgb, 158, 208, 197), 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

    .sweet-navbar .navbar-brand {
        font-weight: 600;
        letter-spacing: -0.3px;
    }

        .sweet-navbar .navbar-brand img {
            background: transparent;
            border-radius: 0;
            padding: 0;
        }

    .sweet-navbar .navbar-logo-pill {
        background: #fff;
        border-radius: 8px;
        padding: 4px 10px;
        display: inline-flex;
        align-items: center;
        line-height: 1;
    }

        /* Altura del logo por CSS (antes iba inline en cada layout): en mobile con
           sesión se achica junto al título, y un style inline no se puede pisar. */
        .sweet-navbar .navbar-logo-pill img {
            height: 2.2em;
            width: auto;
        }

    .sweet-navbar .nav-link {
        color: #fff;
        font-weight: 500;
        transition: opacity 0.3s ease;
    }

        .sweet-navbar .nav-link:hover,
        .sweet-navbar .nav-link:focus {
            color: #fff;
            opacity: 0.75;
        }

    .sweet-navbar .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.5);
    }

    .sweet-navbar .navbar-toggler-icon {
        filter: brightness(0) invert(1);
    }

.sweet-navbar .navbar-user-pill {
    min-height: 42px;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.3rem 0.7rem 0.3rem 0.35rem;
    background: var(--theme-surface, #fff);
    border: 1px solid rgba(255, 255, 255, 0.75);
    color: var(--theme-quaternary, #1f2937) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    opacity: 1;
}

.sweet-navbar .navbar-user-pill:hover,
.sweet-navbar .navbar-user-pill:focus,
.sweet-navbar .navbar-user-pill.show {
    color: var(--theme-quaternary, #1f2937) !important;
    opacity: 1;
    background: var(--theme-surface, #fff);
}

.sweet-navbar .navbar-user-pill img {
    width: 32px !important;
    height: 32px !important;
    margin-right: 0.35rem !important;
}

.sweet-navbar .navbar-user-pill::after {
    color: var(--theme-primary, #9ed0c5);
    margin-left: 0.15rem;
}

.sweet-navbar .navbar-icon-pill {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 0;
    background: var(--theme-surface, #fff);
    border: 1px solid rgba(255, 255, 255, 0.75);
    color: var(--theme-primary, #9ed0c5) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    opacity: 1;
}

.sweet-navbar .navbar-icon-pill:hover,
.sweet-navbar .navbar-icon-pill:focus,
.sweet-navbar .navbar-icon-pill.show {
    background: var(--theme-surface, #fff);
    color: var(--theme-primary, #9ed0c5) !important;
    opacity: 1;
}

.sweet-navbar .navbar-icon-pill .notif-count-inline {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1.1rem;
    height: 1.1rem;
    justify-content: center;
    margin-left: 0;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--theme-surface, #fff);
    color: var(--theme-quaternary, #1f2937);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
    text-shadow: none;
    font-size: 0.68rem;
}

.navbar-nav {
    gap: 0.5rem;
}

/* Avatar como disparador del menú de usuario en mobile (reemplaza al toggler
   hamburguesa cuando hay sesión). Solo se renderiza con .d-lg-none. */
.sweet-navbar .navbar-avatar-toggle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.sweet-navbar .navbar-avatar-toggle__img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px #fff;
}

@media (max-width: 991.98px) {
    .sweet-navbar .navbar-collapse {
        background-color: rgba(var(--theme-navbar-rgb, 158, 208, 197), 0.95);
        border-radius: var(--theme-radius-lg, 20px);
        padding: 0.75rem 1rem;
        margin-top: 0.75rem;
        box-shadow: var(--theme-shadow-2, 0 8px 24px rgba(0, 0, 0, 0.15));
    }

    /* Navbar con sesión iniciada: una sola fila
       [logo] [título] ......... [campana] [sobre] [avatar].
       El título se achica y elide para que entre siempre (el nombre de la
       academia lo pone cada tenant y puede ser largo). */
    .sweet-navbar--session .navbar-brand {
        font-size: 0.95rem;
        min-width: 0;
        flex: 1 1 auto;
    }

    .sweet-navbar--session .navbar-brand-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sweet-navbar--session .navbar-logo-pill {
        flex: none;
        padding: 3px 8px;
    }

    .sweet-navbar--session .navbar-logo-pill img {
        height: 1.9em;
    }

    .sweet-navbar--session .navbar-icon-pill {
        width: 40px;
        height: 40px;
    }
}

.dropdown-menu {
    border-radius: var(--theme-radius-lg, 20px);
    box-shadow: var(--theme-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.18));
    border: none;
    background-color: var(--theme-background, #f5f5f7);
}

.dropdown-menu .dropdown-item,
.dropdown-menu .btn-link {
    color: var(--bs-dropdown-link-color);
    text-decoration: none;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .btn-link:hover,
.dropdown-menu .btn-link:focus {
    color: var(--bs-dropdown-link-hover-color);
}

.modal-content,
.accordion-item,
.accordion-button,
.page-link,
.list-group-item,
.input-group-text,
.nav-pills .nav-link,
.nav-tabs .nav-link,
.badge {
    border-radius: var(--theme-radius-md, 14px);
}

.btn {
    border-radius: var(--theme-radius-pill, 999px);
    font-weight: 500;
    padding: var(--theme-control-padding-y, 0.5rem) var(--theme-control-padding-x, 1rem);
    font-size: var(--theme-control-font-size, 0.95rem);
    line-height: 1.25;
    min-height: calc(2.35rem + 2px);
    font-family: var(--theme-font-body, inherit);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    vertical-align: middle;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.app-popup-modal .modal-header {
    background-color: var(--theme-primary, #9ed0c5);
    color: #fff;
}

.app-popup-modal .modal-title,
.app-popup-modal .modal-body,
.app-popup-modal .modal-footer {
    font-family: var(--theme-font-body, inherit);
}

.app-popup-modal .modal-title {
    color: #fff;
}

.app-popup-modal .btn-close {
    filter: brightness(0) invert(1);
}

.form-control,
.form-select {
    padding: var(--theme-control-padding-y, 0.5rem) var(--theme-control-padding-x, 1rem);
    font-size: var(--theme-control-font-size, 0.95rem);
    line-height: 1.25;
    min-height: calc(2.35rem + 2px);
    font-family: var(--theme-font-body, inherit);
    border-radius: var(--theme-radius-md, 14px);
    border: 1px solid var(--theme-control-border);
    background-color: var(--theme-control-bg);
    color: var(--theme-control-text);
}

.form-select {
    padding-right: 2.5rem;
    background-position: right 0.85rem center;
}

.form-control[type="date"],
.form-control[type="time"],
.form-control[type="datetime-local"],
.form-control[type="month"] {
    min-width: min(11rem, 100%);
    padding-right: 2.25rem;
}

.form-control::placeholder,
.form-select::placeholder,
.login-modal .input-group input::placeholder,
.register-modal .input-group input::placeholder,
.playlist-search::placeholder {
    color: var(--theme-control-placeholder);
    opacity: 1;
}

.btn-sm,
.form-control-sm,
.form-select-sm {
    min-height: calc(2rem + 2px);
    line-height: 1.2;
}

.form-control-color,
.form-check-input {
    border-radius: var(--theme-radius-sm, 8px);
}

.form-control-color {
    border-color: var(--theme-control-border);
    background-color: var(--theme-control-bg);
}

.form-switch .form-check-input {
    width: 2.8rem;
    height: 1.45rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--theme-quaternary-rgb), 0.4);
    background-color: rgba(var(--theme-quaternary-rgb), 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23ffffff'/%3E%3C/svg%3E");
    background-position: left center;
    cursor: pointer;
    transition: background-position .2s ease, background-color .2s ease, border-color .2s ease;
}

.form-switch .form-check-input:checked {
    background-color: var(--theme-primary, #9ed0c5);
    border-color: var(--theme-primary, #9ed0c5);
    background-position: right center;
}

.form-switch .form-check-input:focus {
    border-color: var(--theme-focus-ring-color);
    box-shadow: 0 0 0 .2rem rgba(var(--theme-focus-ring-rgb), 0.25);
}

:where(a, button, input, select, textarea, .btn, .nav-link):focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0);
    box-shadow: 0 0 0 0.2rem var(--theme-focus-ring-color, #0ea5e9);
}


    .btn:hover,
    .btn:focus {
        transform: translateY(-1px);
        box-shadow: var(--theme-shadow-2, 0 8px 24px rgba(0, 0, 0, 0.15));
    }

.btn-primary {
    background-color: var(--theme-primary, #9ed0c5);
    border-color: var(--theme-primary, #9ed0c5);
    color: var(--theme-on-primary, #fff);
}

    .btn-primary:hover,
    .btn-primary:active,
    .btn-primary:focus {
        background-color: var(--theme-primary, #9ed0c5);
        border-color: var(--theme-primary, #9ed0c5);
        color: var(--theme-on-primary, #fff);
    }

.btn-secondary {
    background-color: var(--theme-secondary, #6c757d);
    border-color: var(--theme-secondary, #6c757d);
    color: var(--theme-on-secondary, #fff);
}

    .btn-secondary:hover,
    .btn-secondary:active,
    .btn-secondary:focus {
        background-color: var(--theme-secondary, #6c757d);
        border-color: var(--theme-secondary, #6c757d);
        color: var(--theme-on-secondary, #fff);
    }

.btn-outline-primary {
    color: var(--theme-primary-interactive, var(--theme-primary, #9ed0c5));
    border-color: var(--theme-primary-interactive, var(--theme-primary, #9ed0c5));
    background-color: var(--theme-tertiary);
}

    .btn-outline-primary:hover,
    .btn-outline-primary:active,
    .btn-outline-primary:focus {
        color: #fff;
        background-color: var(--theme-primary-interactive, var(--theme-primary, #9ed0c5));
        border-color: var(--theme-primary-interactive, var(--theme-primary, #9ed0c5));
    }

.btn-success {
    background-color: var(--theme-success, #198754);
    border-color: var(--theme-success, #198754);
    color: #fff;
}

.btn-success:hover,
.btn-success:active,
.btn-success:focus {
    background-color: var(--theme-success, #198754);
    border-color: var(--theme-success, #198754);
    color: #fff;
}

.btn-outline-success {
    color: var(--theme-success, #198754);
    border-color: var(--theme-success, #198754);
}

.btn-outline-success:hover,
.btn-outline-success:active,
.btn-outline-success:focus {
    background-color: var(--theme-success, #198754);
    border-color: var(--theme-success, #198754);
    color: #fff;
}

.btn-danger {
    background-color: var(--theme-danger, #dc3545);
    border-color: var(--theme-danger, #dc3545);
    color: #fff;
}

.btn-danger:hover,
.btn-danger:active,
.btn-danger:focus {
    background-color: var(--theme-danger, #dc3545);
    border-color: var(--theme-danger, #dc3545);
    color: #fff;
}

.btn-outline-danger {
    color: var(--theme-danger, #dc3545);
    border-color: var(--theme-danger, #dc3545);
}

.btn-outline-danger:hover,
.btn-outline-danger:active,
.btn-outline-danger:focus {
    background-color: var(--theme-danger, #dc3545);
    border-color: var(--theme-danger, #dc3545);
    color: #fff;
}

body.theme-button-outline .btn-primary,
body.theme-button-outline .btn-success,
body.theme-button-outline .btn-danger {
    background-color: transparent;
}

body.theme-button-outline .btn-primary {
    color: var(--theme-primary, #9ed0c5);
    border-color: var(--theme-primary, #9ed0c5);
}

body.theme-button-outline .btn-success {
    color: var(--theme-success, #198754);
    border-color: var(--theme-success, #198754);
}

body.theme-button-outline .btn-danger {
    color: var(--theme-danger, #dc3545);
    border-color: var(--theme-danger, #dc3545);
}

body.theme-button-outline .btn-primary:hover,
body.theme-button-outline .btn-primary:focus,
body.theme-button-outline .btn-primary:active {
    background-color: var(--theme-primary, #9ed0c5);
    color: #fff;
}

body.theme-button-outline .btn-success:hover,
body.theme-button-outline .btn-success:focus,
body.theme-button-outline .btn-success:active {
    background-color: var(--theme-success, #198754);
    color: #fff;
}

body.theme-button-outline .btn-danger:hover,
body.theme-button-outline .btn-danger:focus,
body.theme-button-outline .btn-danger:active {
    background-color: var(--theme-danger, #dc3545);
    color: #fff;
}

body.theme-button-soft .btn-primary,
body.theme-button-soft .btn-success,
body.theme-button-soft .btn-danger {
    border-width: 1px;
    background-image: none;
}

body.theme-button-soft .btn-primary {
    color: var(--theme-primary, #9ed0c5);
    background-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.16);
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.45);
}

body.theme-button-soft .btn-success {
    color: var(--theme-success, #198754);
    background-color: rgba(var(--theme-success-rgb, 25, 135, 84), 0.16);
    border-color: rgba(var(--theme-success-rgb, 25, 135, 84), 0.45);
}

body.theme-button-soft .btn-danger {
    color: var(--theme-danger, #dc3545);
    background-color: rgba(var(--theme-danger-rgb, 220, 53, 69), 0.16);
    border-color: rgba(var(--theme-danger-rgb, 220, 53, 69), 0.45);
}

body.theme-button-soft .btn-primary:hover,
body.theme-button-soft .btn-primary:focus,
body.theme-button-soft .btn-primary:active {
    background-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.24);
    color: var(--theme-primary, #9ed0c5);
}

body.theme-button-soft .btn-success:hover,
body.theme-button-soft .btn-success:focus,
body.theme-button-soft .btn-success:active {
    background-color: rgba(var(--theme-success-rgb, 25, 135, 84), 0.24);
    color: var(--theme-success, #198754);
}

body.theme-button-soft .btn-danger:hover,
body.theme-button-soft .btn-danger:focus,
body.theme-button-soft .btn-danger:active {
    background-color: rgba(var(--theme-danger-rgb, 220, 53, 69), 0.24);
    color: var(--theme-danger, #dc3545);
}

.badge.bg-success {
    background-color: var(--theme-success, #198754) !important;
}

.badge.bg-danger {
    background-color: var(--theme-danger, #dc3545) !important;
}

.text-success {
    color: var(--theme-success, #198754) !important;
}

.text-danger {
    color: var(--theme-danger, #dc3545) !important;
}

.scroll-section {
    scroll-margin-top: 110px;
    margin: 5rem 0;
    padding: 0;
    min-height: auto;
}

#inicio.scroll-section {
    margin-top: 2.75rem;
}

    .scroll-section h3,
    .scroll-section h2 {
        font-size: 2.25rem;
        font-weight: 700;
        letter-spacing: -0.3px;
        text-align: center;
        margin-bottom: 2.5rem;
    }

#inicio .p-5 {
    border-radius: var(--theme-radius-lg, 20px);
    box-shadow: var(--theme-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.18));
}

.home-hero-banner {
    --hero-accent: var(--theme-primary, #a8cec8);
    --hero-border: rgba(255, 255, 255, 0.16);
    --hero-bg: #0f0520;
    --hero-subtle: rgba(255, 255, 255, 0.92);
    --hero-text-color: #fff;
    --hero-badge-color: var(--theme-primary, #a8cec8);
    --hero-badge-border: currentColor;
    --hero-badge-bg: rgba(var(--theme-primary-rgb, 168, 206, 200), 0.14);
    --hero-btn-a-bg: var(--theme-primary, #a8cec8);
    --hero-btn-a-color: #fff;
    --hero-btn-a-border: #fff;
    --hero-btn-b-bg: #fff;
    --hero-btn-b-color: var(--theme-primary, #a8cec8);
    --hero-btn-b-border: var(--theme-primary, #a8cec8);
    --hero-char-a: rgba(255, 216, 238, 0.68);
    --hero-char-b: rgba(190, 231, 255, 0.68);
    --hero-char-c: rgba(170, 255, 215, 0.68);
    position: relative;
    overflow: hidden;
    background: var(--hero-bg) !important;
    color: var(--hero-text-color);
    border: 1px solid var(--hero-border);
    min-height: 310px;
}

.home-hero-banner::before,
.home-hero-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: none;
}

.home-hero-banner > * {
    position: relative;
    z-index: 2;
}

.home-hero-arte,
.home-hero-musica,
.home-hero-tecnica,
.home-hero-tech,
.home-hero-biz,
.home-hero-fit,
.home-hero-otros {
    color: #fff;
}

.home-hero-edu {
    color: #212121;
}


.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.35rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--hero-badge-border);
    background: var(--hero-badge-bg);
    color: var(--hero-badge-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.home-hero-badge-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: currentColor;
    animation: dotPulse 2s ease-in-out infinite;
}

.home-hero-title {
    font-size: clamp(2.3rem, 5.4vw, 4.2rem);
    font-family: var(--theme-font-heading-primary);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.01em;
    text-transform: none;
}

.home-hero-title em {
    font-style: italic;
    color: var(--hero-text-color);
}

.home-hero-title,
.home-hero-title i,
.home-hero-title [data-hero-title-main] {
    color: var(--hero-text-color);
}

.home-hero-title-text,
.home-hero-description {
    white-space: pre-line;
}

#inicio .lead {
    font-size: 1.06rem;
    color: var(--hero-subtle);
    margin-inline: auto;
    max-width: 630px;
    line-height: 1.75;
}

.home-hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.home-hero-actions .btn {
    min-width: 185px;
    border-width: 1.5px;
    border-radius: 999px;
    padding: 0.72rem 1.6rem;
    font-weight: 700;
}

.home-hero-btn-a {
    background: var(--hero-btn-a-bg);
    color: var(--hero-btn-a-color);
    border-color: var(--hero-btn-a-border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.home-hero-btn-b {
    background: var(--hero-btn-b-bg);
    color: var(--hero-btn-b-color);
    border-color: var(--hero-btn-b-border);
}

.home-hero-btn-a:hover,
.home-hero-btn-a:focus,
.home-hero-btn-a:active {
    background: #fff !important;
    color: var(--theme-primary, #a8cec8) !important;
    border-color: #fff !important;
    transform: translateY(-2px);
}

.home-hero-btn-b:hover,
.home-hero-btn-b:focus,
.home-hero-btn-b:active {
    background: var(--theme-primary, #a8cec8);
    color: #fff !important;
    border-color: var(--theme-primary, #a8cec8) !important;
    transform: translateY(-2px);
}

.home-hero-banner .home-hero-btn-a {
    background: var(--theme-primary, #a8cec8) !important;
    color: #fff !important;
    border-color: #fff !important;
}

.home-hero-banner .home-hero-btn-b {
    background: #fff !important;
    color: var(--theme-primary, #a8cec8) !important;
    border-color: var(--theme-primary, #a8cec8) !important;
}

.home-hero-banner .home-hero-btn-a:hover,
.home-hero-banner .home-hero-btn-a:focus,
.home-hero-banner .home-hero-btn-a:active {
    background: #fff !important;
    color: var(--theme-primary, #a8cec8) !important;
    border-color: #fff !important;
}

.home-hero-banner .home-hero-btn-b:hover,
.home-hero-banner .home-hero-btn-b:focus,
.home-hero-banner .home-hero-btn-b:active {
    background: var(--theme-primary, #a8cec8) !important;
    color: #fff !important;
    border-color: var(--theme-primary, #a8cec8) !important;
}

.home-hero-banner .home-hero-badge {
    color: var(--theme-primary, #a8cec8) !important;
    border-color: currentColor !important;
    background: rgba(var(--theme-primary-rgb, 168, 206, 200), 0.14) !important;
}

.home-hero-arte {
    --hero-accent: #ff93d6;
    --hero-border: rgba(255, 100, 180, 0.15);
    --hero-bg: #0f0520;
}

.home-hero-arte::before {
    background: radial-gradient(ellipse 60% 55% at 20% 30%, rgba(194, 24, 91, 0.35) 0%, transparent 70%),
                radial-gradient(ellipse 50% 60% at 80% 70%, rgba(106, 13, 173, 0.4) 0%, transparent 70%);
}

.home-hero-arte::after {
    background: radial-gradient(circle, rgba(255, 133, 194, 0.12) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
}

.hero-petals {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-petals span {
    position: absolute;
    color: var(--hero-char-a);
    font-size: 1.05rem;
    animation: floatUp 9s linear infinite;
}

.home-hero-musica {
    --hero-accent: #42e7ff;
    --hero-char-b: rgba(120, 238, 255, 0.72);
    --hero-char-c: rgba(179, 248, 255, 0.64);
    --hero-border: rgba(99, 218, 255, 0.1);
    --hero-bg: linear-gradient(160deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.home-hero-musica::before {
    background: radial-gradient(ellipse 50% 80% at 15% 50%, rgba(0, 188, 212, 0.15) 0%, transparent 70%),
                radial-gradient(ellipse 40% 60% at 85% 40%, rgba(103, 58, 183, 0.2) 0%, transparent 70%);
}

.home-hero-musica .home-hero-title,
.home-hero-fit .home-hero-title {
    font-family: "Bebas Neue", var(--theme-font-heading-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-hero-musica .home-hero-title em {
    font-style: normal;
    text-shadow: 0 0 28px rgba(66, 231, 255, 0.6);
}

.home-hero-musica .home-hero-btn-a {
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3), inset 0 0 20px rgba(0, 229, 255, 0.08);
}

.hero-bars {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 124px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding: 0 12px;
    opacity: 0.42;
}

.hero-bar {
    flex: 1;
    height: var(--bar-h);
    background: linear-gradient(180deg, rgba(102, 233, 255, 0.98), rgba(102, 233, 255, 0.03));
    border-radius: 3px 3px 0 0;
    transform-origin: bottom;
    opacity: var(--bar-o, 0.6);
    animation: barAnim var(--bar-d) ease-in-out infinite alternate;
    animation-delay: var(--bar-delay, 0s);
    will-change: transform, filter;
}

.hero-notes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-notes span {
    position: absolute;
    color: var(--hero-char-b);
    text-shadow: 0 0 10px rgba(66, 231, 255, 0.35);
    animation: noteFloat 8.2s ease-in-out infinite;
}

.hero-notes span:nth-child(1) { left: 8%; bottom: 14%; font-size: 1.05rem; animation-delay: -0.3s; }
.hero-notes span:nth-child(2) { left: 20%; bottom: 12%; font-size: 0.84rem; animation-delay: -2.3s; }
.hero-notes span:nth-child(3) { left: 35%; bottom: 16%; font-size: 0.95rem; animation-delay: -1.4s; }
.hero-notes span:nth-child(4) { left: 52%; bottom: 11%; font-size: 1.1rem; animation-delay: -3.5s; }
.hero-notes span:nth-child(5) { left: 68%; bottom: 15%; font-size: 1.3rem; animation-delay: -2.9s; }
.hero-notes span:nth-child(6) { left: 83%; bottom: 13%; font-size: 1.12rem; animation-delay: -4.1s; }

.home-hero-tecnica {
    --hero-accent: #ffbc45;
    --hero-border: rgba(255, 167, 38, 0.2);
    --hero-bg: #1c1408;
}

.home-hero-tecnica::before {
    background: radial-gradient(ellipse 60% 60% at 10% 20%, rgba(255, 111, 0, 0.2) 0%, transparent 70%),
                radial-gradient(ellipse 50% 50% at 90% 80%, rgba(255, 193, 7, 0.12) 0%, transparent 70%);
}

.home-hero-tecnica::after {
    background-image: linear-gradient(rgba(255, 167, 38, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 167, 38, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.home-hero-tecnica .home-hero-title {
    font-family: "Syne", var(--theme-font-heading-primary);
}

.home-hero-tecnica .home-hero-title em,
.home-hero-fit .home-hero-title em {
    font-style: normal;
}

.home-hero-tech {
    --hero-accent: #00ff88;
    --hero-char-c: rgba(120, 255, 199, 0.72);
    --hero-border: rgba(0, 255, 136, 0.1);
    --hero-bg: #020b18;
}

.home-hero-tech::before {
    background: radial-gradient(ellipse 55% 55% at 80% 20%, rgba(0, 230, 118, 0.12) 0%, transparent 70%),
                radial-gradient(ellipse 45% 65% at 10% 80%, rgba(0, 145, 234, 0.15) 0%, transparent 70%);
}

.home-hero-tech .home-hero-title,
.home-hero-tech .lead,
.home-hero-tech .home-hero-actions .btn {
    font-family: "Space Mono", var(--theme-font-body);
}

.home-hero-tech .home-hero-title em {
    font-style: normal;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.55);
}

.hero-matrix {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.72;
    overflow: hidden;
}

.hero-matrix-column {
    position: absolute;
    top: -170%;
    width: 0.95rem;
    height: 310%;
    display: grid;
    grid-template-rows: repeat(14, minmax(0, 1fr));
    place-items: center;
    transform: translate3d(var(--matrix-x, 0), -26%, 0);
    animation: matrixFall var(--matrix-speed, 7s) linear infinite;
}

.hero-matrix-glyph {
    color: var(--matrix-color, var(--hero-char-c));
    font-family: "Space Mono", monospace;
    font-size: 0.74rem;
    letter-spacing: 0.07em;
    text-align: center;
    font-style: normal;
    line-height: 1;
    opacity: var(--matrix-opacity, 0.45);
    text-shadow: 0 0 8px color-mix(in srgb, var(--matrix-color, #00ff88) 72%, #ffffff), 0 0 18px color-mix(in srgb, var(--matrix-color, #00ff88) 48%, #8fffe8);
    animation: matrixPulse var(--matrix-fade-speed, 1.6s) steps(5, end) infinite,
               matrixHueShift var(--matrix-hue-speed, 3s) linear infinite;
    animation-delay: calc(var(--matrix-fade-delay, 0s) * -1), calc(var(--matrix-fade-delay, 0s) * -0.6);
}

.home-hero-biz {
    --hero-accent: #e0bf63;
    --hero-char-a: rgba(224, 191, 99, 0.55);
    --hero-char-b: rgba(189, 214, 255, 0.52);
    --hero-char-c: rgba(150, 235, 198, 0.5);
    --hero-border: rgba(212, 175, 55, 0.2);
    --hero-bg: linear-gradient(160deg, #0d1117 0%, #0d1b2a 100%);
}

.home-hero-biz::before {
    background: radial-gradient(ellipse 50% 60% at 70% 30%, rgba(212, 175, 55, 0.1) 0%, transparent 70%),
                radial-gradient(ellipse 40% 50% at 20% 75%, rgba(30, 100, 200, 0.1) 0%, transparent 70%);
}

.home-hero-biz .home-hero-title {
    font-family: "Crimson Pro", var(--theme-font-heading-primary);
    font-weight: 600;
}


.hero-biz-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(224, 191, 99, 0.15) 1px, transparent 1px), linear-gradient(90deg, rgba(224, 191, 99, 0.12) 1px, transparent 1px);
    background-size: 38px 38px;
    opacity: 0.45;
}

.hero-biz-candles {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 7px;
    pointer-events: none;
    opacity: 0.72;
}

.hero-biz-candle {
    position: relative;
    width: 7px;
    height: var(--candle-h, 22px);
    margin-bottom: var(--candle-o, 0px);
    border-radius: 2px;
}

.hero-biz-candle::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -7px;
    bottom: -7px;
    width: 1px;
    background: currentColor;
    opacity: 0.75;
}

.hero-biz-candle.is-positive {
    background: rgba(85, 220, 167, 0.9);
    color: rgba(85, 220, 167, 0.95);
}

.hero-biz-candle.is-negative {
    background: rgba(237, 114, 114, 0.86);
    color: rgba(237, 114, 114, 0.92);
}

.home-hero-fit {
    --hero-accent: #68f6ba;
    --hero-border: rgba(100, 255, 120, 0.12);
    --hero-bg: linear-gradient(135deg, #0d2010 0%, #0a1a0a 60%, #1a1000 100%);
}

.home-hero-fit::before {
    background: radial-gradient(ellipse 60% 60% at 20% 30%, rgba(56, 142, 60, 0.25) 0%, transparent 70%),
                radial-gradient(ellipse 50% 50% at 80% 70%, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
}

.home-hero-edu {
    --hero-accent: #e6499b;
    --hero-border: rgba(0, 0, 0, 0.06);
    --hero-bg: linear-gradient(150deg, #fef9f0 0%, #fff8e1 50%, #fce4ec 100%);
    --hero-subtle: #757575;
    color: #212121;
}

.home-hero-edu .home-hero-title {
    font-family: "Nunito Sans", var(--theme-font-heading-primary);
    color: #212121;
}

.home-hero-edu .home-hero-title em {
    font-style: normal;
    background: linear-gradient(135deg, #f06292, #ba68c8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-hero-edu .home-hero-btn-b {
    background: #fff;
}

.hero-edu-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-edu-deco-item {
    position: absolute;
    color: color-mix(in srgb, var(--hero-accent, #e6499b) 72%, #ffffff);
    opacity: var(--edu-opacity, 0.45);
    text-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    filter: brightness(var(--edu-brightness, 1));
    animation: eduFloat var(--edu-float-duration, 6.4s) ease-in-out infinite,
               eduTwinkle var(--edu-twinkle-duration, 2.4s) ease-in-out infinite;
}

.hero-fit-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-fit-deco i {
    position: absolute;
    color: rgba(207, 255, 233, 0.44);
    filter: drop-shadow(0 8px 24px rgba(18, 95, 60, 0.32));
    animation: fitPulse 4.8s ease-in-out infinite;
}

.hero-fit-deco i:nth-child(1) { left: 8%; top: 18%; font-size: 1.32rem; animation-delay: -0.5s; }
.hero-fit-deco i:nth-child(2) { right: 12%; top: 20%; font-size: 1.18rem; animation-delay: -1.5s; }
.hero-fit-deco i:nth-child(3) { left: 14%; bottom: 20%; font-size: 1.22rem; animation-delay: -2.2s; }
.hero-fit-deco i:nth-child(4) { right: 16%; bottom: 16%; font-size: 1.28rem; animation-delay: -3.3s; }

.home-hero-otros {
    --hero-accent: #a9b6ff;
    --hero-border: rgba(150, 150, 255, 0.1);
    --hero-bg: #0c0c14;
}

.home-hero-otros::before {
    background: radial-gradient(ellipse 60% 60% at 30% 40%, rgba(63, 81, 181, 0.2) 0%, transparent 70%),
                radial-gradient(ellipse 50% 50% at 70% 60%, rgba(156, 39, 176, 0.15) 0%, transparent 70%),
                radial-gradient(ellipse 40% 40% at 80% 10%, rgba(0, 188, 212, 0.1) 0%, transparent 70%);
}

.home-hero-otros .home-hero-title {
    font-family: "Righteous", var(--theme-font-heading-primary);
    letter-spacing: 0.01em;
}

.home-hero-otros .home-hero-title em {
    font-style: normal;
}


.hero-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-stars span {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--hero-char-c);
    animation: dotPulse 3s ease-in-out infinite;
}

/* Accesibilidad: detiene las animaciones decorativas de los heros */
@media (prefers-reduced-motion: reduce) {
    .home-hero-badge-dot,
    .hero-petals span,
    .hero-bar,
    .hero-notes span,
    .hero-matrix-column,
    .hero-matrix-glyph,
    .hero-edu-deco-item,
    .hero-fit-deco i,
    .hero-stars span {
        animation: none !important;
    }
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 0.88; }
    50% { transform: scale(1.45); opacity: 0.5; }
}

@keyframes floatUp {
    0% { transform: translateY(8px) rotate(0deg); opacity: 0; }
    20% { opacity: 0.45; }
    90% { opacity: 0.24; }
    100% { transform: translateY(-28px) rotate(24deg); opacity: 0; }
}

@keyframes barAnim {
    0% { transform: scaleY(var(--bar-min, 0.18)); filter: brightness(0.76); }
    50% { transform: scaleY(calc((var(--bar-min, 0.18) + var(--bar-max, 1.5)) / 2)); filter: brightness(1.02); }
    100% { transform: scaleY(var(--bar-max, 1.6)); filter: brightness(1.32); }
}

@keyframes fitPulse {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-8px) scale(1.14); opacity: 0.58; }
}

@keyframes eduFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(4deg); }
}

@keyframes eduTwinkle {
    0%, 100% { opacity: calc(var(--edu-opacity, 0.45) * 0.32); }
    35% { opacity: calc(var(--edu-opacity, 0.45) * 0.95); }
    70% { opacity: calc(var(--edu-opacity, 0.45) * 0.56); }
}

@keyframes noteFloat {
    0% { transform: translate3d(0, 16px, 0) rotate(-8deg); opacity: 0; }
    14% { opacity: 0.68; }
    72% { opacity: 0.42; }
    100% { transform: translate3d(0, -80px, 0) rotate(10deg); opacity: 0; }
}

@keyframes matrixFall {
    0% { transform: translate3d(var(--matrix-x, 0), -26%, 0); }
    100% { transform: translate3d(calc(var(--matrix-x, 0) * -1), 112%, 0); }
}

@keyframes matrixPulse {
    0%, 100% { opacity: calc(var(--matrix-opacity, 0.45) * var(--matrix-pulse-min, 0.28)); filter: brightness(0.64) blur(0); }
    20% { opacity: calc(var(--matrix-opacity, 0.45) * 0.84); filter: brightness(1.06); }
    45% { opacity: calc(var(--matrix-opacity, 0.45) * 0.46); filter: brightness(0.72); }
    70% { opacity: calc(var(--matrix-opacity, 0.45) * var(--matrix-pulse-max, 1.12)); filter: brightness(var(--matrix-brightness-peak, 1.4)); }
}

@keyframes matrixHueShift {
    0%, 100% {
        color: color-mix(in srgb, var(--matrix-color, #00ff88) 88%, #9effff);
    }
    38% {
        color: color-mix(in srgb, var(--matrix-color, #00ff88) 74%, #00d4ff);
    }
    72% {
        color: color-mix(in srgb, var(--matrix-color, #00ff88) 68%, #aaff00);
    }
}

.card {
    border-radius: var(--theme-radius-lg, 20px);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
    color: var(--theme-on-tertiary, #1f2937);
    background-color: var(--bs-tertiary-bg, var(--theme-tertiary, #9ed0c5));
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card .card-title,
.card .fw-semibold,
.card .fw-bold {
    color: var(--theme-on-tertiary, #1f2937);
}

.card .text-muted {
    color: rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.72) !important;
}

    .card:hover {
        transform: translateY(-6px);
        box-shadow: var(--theme-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.18));
    }


body.theme-depth-soft3d .btn,
body.theme-depth-soft3d .form-control,
body.theme-depth-soft3d .form-select,
body.theme-depth-soft3d .card {
    border-width: 1px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08)), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body.theme-depth-soft3d .btn:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}

body.theme-depth-soft3d .card:hover {
    box-shadow: var(--theme-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.18)), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.card-body {
    padding: var(--theme-card-body-padding, 1.5rem);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-text {
    color: rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.78);
    font-size: 0.95rem;
    line-height: 1.6;
}

.teacher-modal .teacher-tabs .nav-link {
    border-radius: var(--theme-radius-pill, 999px);
    color: #6e6e73;
    background-color: var(--theme-surface);
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-right: 0.5rem;
}

.teacher-modal .teacher-tabs .nav-link.active {
    color: #fff;
    background: var(--theme-primary, #9ed0c5);
    border-color: transparent;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.teacher-modal .teacher-tabs {
    gap: 0.5rem;
}

#editTeacherModal .modal-dialog {
    width: min(100% - 2rem, 900px);
    max-width: 900px;
}

#editTeacherModal .modal-body {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.teacher-modal .teacher-panel {
    background: var(--theme-surface);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.teacher-modal .network-icon,
.teacher-modal .bank-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(158, 208, 197, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.teacher-modal .network-icon i,
.teacher-modal .bank-icon i {
    color: var(--theme-primary, #9ed0c5);
}

@media (max-width: 767.98px) {
    .teacher-modal .teacher-tabs .nav-link {
        width: 100%;
        justify-content: center;
    }

    .teacher-modal .teacher-tabs {
        flex-direction: column;
    }
}

.card-img-top {
    border-radius: 20px 20px 0 0;
}

.card-header,
.card-footer {
    background-color: transparent;
    border-color: rgba(0, 0, 0, 0.08);
}

.admin-layout {
    flex: 1 0 auto;
}

.admin-layout .admin-shell {
    display: flex;
    min-height: 0;
}

.admin-layout .admin-sidebar {
    width: 280px;
    background-color: var(--theme-quaternary, #343a40);
    color: var(--theme-on-background, #1f2937);
    position: sticky;
    top: 70px;
    align-self: flex-start;
    height: calc(100vh - 70px);
    overflow-y: auto;
    transition: width 0.2s ease, transform 0.2s ease;
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.12);
}

.admin-layout .admin-sidebar {
    --admin-sidebar-text: var(--theme-on-quaternary, #f8f9fa);
    --admin-sidebar-text-muted: rgba(var(--theme-on-quaternary-rgb, 248, 249, 250), 0.75);
    --admin-sidebar-hover-bg: rgba(var(--theme-on-quaternary-rgb, 248, 249, 250), 0.10);
    --admin-sidebar-search-bg: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.24);
    --admin-sidebar-search-text: var(--theme-on-quaternary, #f8f9fa);
}

.admin-layout .admin-sidebar-search,
.admin-layout .admin-sidebar input[type="search"],
.admin-layout .admin-sidebar input[type="text"] {
    background-color: var(--admin-sidebar-search-bg);
    border-color: var(--admin-sidebar-text-muted);
    color: var(--admin-sidebar-search-text);
    outline: none;
}

.admin-layout .admin-sidebar input:focus,
.admin-layout .admin-sidebar input[type="search"]:focus {
    background-color: var(--admin-sidebar-search-bg);
    border-color: var(--admin-sidebar-text-muted) !important;
    box-shadow: none !important;
    color: var(--admin-sidebar-search-text);
}

.admin-layout .admin-sidebar input::placeholder {
    color: rgba(255, 255, 255, 0.92);
    opacity: 1;
}

.admin-layout .admin-sidebar__header {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
}

.admin-layout .admin-sidebar__collapse {
    border-color: var(--admin-sidebar-text-muted);
    color: var(--admin-sidebar-text);
}

    .admin-layout .admin-sidebar__collapse:hover,
    .admin-layout .admin-sidebar__collapse:focus {
        color: var(--admin-sidebar-text);
        border-color: var(--admin-sidebar-text);
    }

.admin-layout .admin-tree {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 1rem;
}

.admin-layout .admin-tree__section {
    padding: 0 0.75rem;
}

.admin-layout .admin-tree__toggle {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--admin-sidebar-text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
    font-weight: 600;
    text-align: left;
}

    .admin-layout .admin-tree__toggle:hover,
    .admin-layout .admin-tree__toggle:focus {
        color: var(--admin-sidebar-text);
        opacity: 0.85;
    }

.admin-layout .admin-tree__direct {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0.75rem;
    padding: 0.5rem 0.25rem;
    border-radius: 10px;
    color: var(--admin-sidebar-text);
    font-weight: 600;
    text-decoration: none;
}

    .admin-layout .admin-tree__direct:hover,
    .admin-layout .admin-tree__direct:focus {
        color: var(--admin-sidebar-text);
        background-color: var(--admin-sidebar-hover-bg);
    }

.admin-layout .admin-tree__chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.admin-layout .admin-tree__section.is-open .admin-tree__chevron {
    transform: rotate(180deg);
}

.admin-layout .admin-tree__items {
    list-style: none;
    padding: 0.25rem 0 0.25rem 2.2rem;
    margin: 0;
    display: none;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-layout .admin-tree__section.is-open .admin-tree__items {
    display: flex;
}

.admin-layout .admin-tree__link {
    color: var(--admin-sidebar-text-muted);
    text-decoration: none;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
}

.admin-layout .admin-tree__group-label {
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    list-style: none;
    margin: 0.75rem 0 0.1rem;
    padding: 0 0.4rem;
    text-transform: uppercase;
}

    .admin-layout .admin-tree__link:hover,
    .admin-layout .admin-tree__link:focus {
        color: var(--admin-sidebar-text);
        background-color: var(--admin-sidebar-hover-bg);
    }

.admin-layout .admin-tree__link.is-active,
.admin-layout .admin-tree__direct.is-active {
    color: var(--admin-sidebar-text);
    background-color: var(--admin-sidebar-hover-bg);
    font-weight: 600;
}

.admin-layout .admin-content {
    flex: 1;
    padding: 1.5rem 2rem 2rem;
    min-width: 0;
}

.admin-layout .admin-mobile-toggle {
    display: none;
    margin-bottom: 1rem;
}

.admin-sidebar-collapsed .admin-sidebar {
    width: 80px;
}

.admin-sidebar-collapsed .admin-sidebar__collapse-text,
.admin-sidebar-collapsed .admin-tree__label,
.admin-sidebar-collapsed .admin-tree__chevron,
.admin-sidebar-collapsed .admin-sidebar__search {
    display: none;
}

.admin-sidebar-collapsed .admin-tree__items {
    display: none;
    padding-left: 0.75rem;
}

.admin-sidebar-collapsed .admin-tree__toggle {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.admin-sidebar-collapsed .admin-tree__direct {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 991.98px) {
    .admin-layout .admin-sidebar {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        max-width: 100%;
        transform: translateX(-100%);
        height: calc(100vh - 70px);
        z-index: 1050;
    }

    .admin-layout .admin-mobile-toggle {
        display: block;
    }

    .admin-layout .admin-content {
        padding: 1.5rem;
    }

    .admin-sidebar-collapsed .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-open .admin-sidebar__search,
    .admin-sidebar-open .admin-tree__label,
    .admin-sidebar-open .admin-tree__chevron {
        display: inline-block;
    }

    .admin-sidebar-open .admin-sidebar__search {
        display: block;
    }

    .admin-sidebar-open .admin-tree__items {
        display: none;
        padding-left: 2.2rem;
    }

    .admin-sidebar-open .admin-tree__section.is-open .admin-tree__items {
        display: flex;
    }

    .admin-sidebar-open .admin-tree__toggle {
        justify-content: flex-start;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .admin-sidebar-open .admin-tree__direct {
        justify-content: flex-start;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .admin-layout .admin-tree__toggle,
    .admin-layout .admin-tree__direct {
        min-height: 44px;
    }

    .admin-layout .admin-tree__link {
        display: flex;
        width: 100%;
        min-height: 44px;
    }
}

/*
 * Admin sidebar: always use its own dark background regardless of the global theme mode.
 * In dark mode --theme-quaternary flips to a light value (it represents text color),
 * so we explicitly restore the dark-sidebar palette here.
 */
body.theme-mode-dark:not(.saas-admin-home) .admin-sidebar {
    background-color: #343a40;
    --admin-sidebar-text: #f8f9fa;
    --admin-sidebar-text-muted: rgba(248, 249, 250, 0.75);
    --admin-sidebar-hover-bg: rgba(248, 249, 250, 0.10);
    --admin-sidebar-search-bg: rgba(158, 208, 197, 0.24);
    --admin-sidebar-search-text: #f8f9fa;
}

.card-footer {
    padding: 0 1.5rem 1.5rem;
}

.course-editor {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 0 2rem;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

.course-editor {
    display: grid;
    gap: 1.25rem;
}

.course-editor__header {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.24);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.course-editor__surface {
    background: var(--theme-surface);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
    border-radius: 20px;
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
    overflow: hidden;
}

.subscription-editor-shell {
    display: grid;
    gap: 1.25rem;
}

.subscription-panel {
    display: grid;
    gap: 14px;
}

.subscription-panel__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .9fr);
    gap: 1rem;
    align-items: start;
}

.subscription-panel__main,
.subscription-panel__side {
    display: grid;
    gap: 1rem;
}

.subscription-surface--primary {
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.28);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.subscription-surface--secondary .course-editor__surface-header {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.08);
}

.course-editor__surface-header {
    padding: .85rem 1rem;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.12);
    border-bottom: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18);
}

.course-editor__surface-body {
    padding: clamp(.9rem, 1.4vw, 1.2rem);
}

.course-editor__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .7rem;
    border-radius: 999px;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.16);
    color: var(--theme-secondary, #6c757d);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.course-editor__lede {
    margin: .25rem 0 0;
    color: var(--theme-text-subtitle-on-surface, rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.78));
    font-size: .95rem;
}

.course-editor__section-intro {
    display: grid;
    gap: .35rem;
    margin-bottom: 1rem;
}

.course-editor__section-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.course-editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.course-editor__stack {
    display: grid;
    gap: 1rem;
}

.subscription-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .9fr);
    gap: 1rem;
}

.subscription-settings-stack,
.subscription-audience-layout {
    display: grid;
    gap: 1rem;
}

.subscription-settings-card {
    display: grid;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: var(--theme-surface);
}

.subscription-settings-card--muted {
    background: #faf9f7;
}

.subscription-fields-grid {
    margin: 0;
}

.subscription-toggle-list,
.subscription-choice-list {
    display: grid;
    gap: .75rem;
}

.course-editor__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.14);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
}

.course-editor__empty-state {
    padding: 1rem 1.1rem;
    border: 1px dashed rgba(var(--theme-primary-rgb, 158, 208, 197), 0.42);
    border-radius: 14px;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.08);
    color: var(--theme-text-subtitle-on-surface, rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.78));
}

.course-editor__empty-state strong {
    color: var(--theme-text-title-on-surface, var(--theme-on-tertiary, #1f2937));
}

.audience-picker {
    display: grid;
    gap: .65rem;
    padding: .95rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    background: var(--theme-surface);
}

.audience-picker__control {
    display: flex;
    gap: .75rem;
    align-items: center;
}

.audience-combobox-input {
    min-height: 40px;
}

.audience-combobox-add {
    min-width: 108px;
    white-space: nowrap;
}

.course-inline-divider {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.15);
}

.course-inline-divider-theme {
    border-top-color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.15);
}

.course-inline-check {
    accent-color: var(--theme-primary, #1D9E75);
    width: 15px;
    height: 15px;
}

.course-inline-hours {
    max-width: 160px;
}

.course-inline-datetime {
    max-width: 240px;
    min-width: 220px;
}

.course-inline-sm-title {
    font-size: 13px;
}

.course-inline-sm-text {
    font-size: 12px;
}

.cursor-pointer {
    cursor: pointer;
}

.audience-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    min-height: 2.4rem;
}

.audience-chip-list__empty {
    margin: 0;
    color: #6c757d;
    font-size: .95rem;
}

.audience-chip {
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.9);
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
    color: #0d3b30;
    border-radius: 999px;
    padding: .38rem .72rem;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-weight: 600;
    max-width: 100%;
}

.subscription-audience-note {
    padding: .85rem 1rem;
}

.audience-chip i {
    opacity: .75;
}

.course-editor__badge {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--theme-primary, #9ed0c5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.course-editor__card {
    border-radius: 20px;
}

.course-editor__title {
    font-size: 1.02rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

.course-editor__section-title {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.media-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.media-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--theme-surface);
    border-radius: 16px;
}

.media-grip {
    color: #adb5bd;
    font-size: 1.1rem;
}

.media-preview {
    width: 64px;
    height: 64px;
    border-radius: 13px;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

    .media-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.media-preview__placeholder {
    color: #adb5bd;
    font-size: 1.2rem;
    display: none;
}

.media-preview.is-empty img {
    display: none;
}

.media-preview.is-empty .media-preview__placeholder {
    display: inline-flex;
}

.media-fields {
    min-width: 0;
}

.media-select {
    width: 160px;
}

.class-images-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.class-image-item .form-control[readonly] {
    background-color: var(--theme-surface);
}

.subscription-workbench__tabs {
    display: flex;
    gap: .45rem;
    padding: .55rem;
    margin-bottom: 1rem;
    background: var(--theme-surface);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    position: sticky;
    top: .75rem;
    z-index: 20;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.course-editor-shell-full {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.course-search-icon {
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--theme-text-muted);
    font-size: 13px;
    pointer-events: none;
}

.course-modal-scroll {
    max-height: 70vh;
    overflow-y: auto;
}

.module-block {
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1.5px solid transparent;
}

.module-block-info {
    background: rgba(var(--theme-primary-rgb), 0.08);
    border-color: rgba(var(--theme-primary-rgb), 0.35);
}

.module-block-warning {
    background: rgba(var(--theme-warning-rgb, 234, 179, 8), 0.08);
    border-color: rgba(var(--theme-warning-rgb, 234, 179, 8), 0.35);
}

.module-block-surface {
    background: var(--theme-tertiary);
    border-color: rgba(var(--theme-quaternary-rgb), 0.15);
}

.module-block-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.module-block-title-info {
    color: var(--theme-text-title-on-surface);
}

.module-block-title-muted {
    color: var(--theme-text-muted);
}

.module-block-icon {
    font-size: 11px;
}

.module-block-icon-muted {
    color: var(--theme-text-muted);
}

.subscription-workbench__tab {
    border: 0;
    background: transparent;
    color: #5f5a53;
    border-radius: 14px;
    padding: .78rem 1.05rem;
    font-size: .92rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.subscription-workbench__tab.is-active {
    background: var(--theme-primary, #1D9E75);
    color: #fff;
    box-shadow: 0 8px 18px rgba(29, 158, 117, 0.22);
}

.subscription-workbench-form .form-control,
.subscription-workbench-form .form-select {
    min-height: 40px;
    padding-top: .5rem;
    padding-bottom: .5rem;
    border-radius: 12px;
}

.subscription-workbench-form textarea.form-control {
    min-height: 104px;
}

.subscription-workbench-form .form-label {
    margin-bottom: .35rem;
    font-size: .92rem;
    font-weight: 600;
}

.subscription-panel.is-hidden {
    display: none !important;
}

.subscription-sticky-actions {
    position: sticky;
    bottom: .75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    padding: .65rem 1rem;
    background: var(--theme-surface);
}

.subscription-sticky-actions__status {
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .9rem;
    font-weight: 600;
    color: #7a5b07;
    background: #fff6d8;
    border: 1px solid #efd17b;
    padding: .55rem .9rem;
    border-radius: 999px;
}

.subscription-sticky-actions--spaced {
    margin-top: 2rem;
}

.subscription-sticky-actions__buttons {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
}

.subscription-sticky-actions__status span {
    width: .5rem;
    height: .5rem;
    border-radius: 999px;
    background: #c88f00;
}

.subscription-sort-option.is-active,
.create-subscription-sort-option.is-active {
    background: var(--theme-primary, #1D9E75) !important;
    border-color: var(--theme-primary, #1D9E75) !important;
    color: #fff !important;
}

.subscription-workbench-form[data-editor-mode="edit"] .accordion-item[data-module],
.subscription-workbench-form[data-editor-mode="edit"] .accordion-item[data-class] {
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.subscription-workbench-form[data-editor-mode="edit"] .accordion-item[data-class] .accordion-button {
    background: var(--theme-surface);
    box-shadow: none;
    border: 0;
    min-height: 56px;
}

.subscription-workbench-form[data-editor-mode="edit"] .accordion-item[data-class] .accordion-button:not(.collapsed) {
    background: #f7fbfa;
    color: inherit;
}

.subscription-workbench-form[data-editor-mode="edit"] .delete-class,
.subscription-workbench-form[data-editor-mode="edit"] .delete-module {
    border-radius: 0;
    border-left: 1px solid rgba(220, 53, 69, .25);
    background: #fff6f7;
}

.subscription-workbench-form[data-editor-mode="edit"] .subscription-content-settings {
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: #faf9f7;
}

.subscription-workbench-form[data-editor-mode="edit"] .show-all-classes-btn {
    width: 100%;
    border-style: dashed;
}

.subscription-content-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.subscription-content-intro__title {
    font-size: 1rem;
    font-weight: 700;
}

.subscription-content-intro__badge {
    display: inline-flex;
    align-items: center;
    padding: .45rem .75rem;
    border-radius: 999px;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.16);
    color: #0d3b30;
    font-size: .88rem;
    font-weight: 700;
}

.subscription-content-callout {
    padding: .85rem 1rem;
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.28);
    border-radius: 14px;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.08);
    color: rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.84);
}

.subscription-add-class-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    background: var(--theme-surface);
}

.subscription-add-class-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.subscription-add-class-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.subscription-add-class-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem 1rem;
}

.subscription-add-class-card__description,
.subscription-add-class-card__playlist {
    grid-column: 1 / -1;
}

.subscription-content-settings__row {
    display: grid;
    grid-template-columns: minmax(260px, .95fr) minmax(0, 1.4fr);
    gap: 1rem;
    align-items: end;
}

.subscription-content-settings__search,
.subscription-content-settings__sort {
    display: grid;
    gap: .5rem;
}

body:has(.subscription-workbench-form) {
    background: #ece9e1;
}

.subscription-workbench-form[data-editor-mode="edit"] #modulesAcc > .accordion-item[data-module] {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.subscription-workbench-form[data-editor-mode="edit"] #modulesAcc > .accordion-item[data-module] > .accordion-header {
    display: none;
}

.subscription-workbench-form[data-editor-mode="edit"] #modulesAcc > .accordion-item[data-module] > .accordion-collapse {
    display: block !important;
    visibility: visible;
}

.subscription-workbench-form[data-editor-mode="edit"] #modulesAcc > .accordion-item[data-module] > .accordion-collapse > .accordion-body {
    padding: 0;
}

.subscription-workbench-form[data-editor-mode="edit"] .subscription-class-toggle {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .8rem .95rem;
}

.subscription-workbench-form[data-editor-mode="edit"] .subscription-class-toggle .ed-type-badge {
    margin-left: .5rem;
    margin-right: .5rem;
}

.subscription-workbench-form[data-editor-mode="edit"] .subscription-class-toggle__icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.16);
    color: var(--theme-primary, #1D9E75);
    flex-shrink: 0;
}

.subscription-workbench-form[data-editor-mode="edit"] .subscription-class-toggle__content {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.subscription-workbench-form[data-editor-mode="edit"] .subscription-class-toggle__title {
    font-weight: 700;
    color: var(--theme-on-surface);
}

.subscription-workbench-form[data-editor-mode="edit"] .subscription-class-toggle__meta {
    font-size: .84rem;
    color: #6b7280;
}

.subscription-workbench-form[data-editor-mode="edit"] .subscription-class-delete {
    align-self: center;
    border-radius: 12px;
    min-width: 38px;
    background: var(--theme-surface);
}

.module-info-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: .85rem;
    font-size: .92rem;
    color: var(--theme-text-title-on-surface);
}

.module-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
    gap: .75rem;
    width: 100%;
}

.module-form__field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.module-form__field--title,
.module-form__field--price {
    width: auto;
}

.module-form__field--description {
    grid-column: 1 / -1;
    width: auto;
}

@media (max-width: 768px) {
    .module-form {
        grid-template-columns: 1fr;
    }
}

.module-form__title {
    width: 100%;
}

.module-form__price {
    width: 100%;
}

.module-form__description {
    width: 100%;
    resize: vertical;
}

.subscription-class-toggle__title--mobile {
    display: none;
}


@media (max-width: 768px) {
    .page-header-bar {
        margin-top: clamp(3.25rem, 10vw, 4.5rem);
    }

    .course-editor.subscription-editor-shell {
        margin-top: clamp(1.5rem, 6vw, 2.5rem);
    }

    .subscription-panel__layout {
        grid-template-columns: 1fr;
    }

    .subscription-settings-grid {
        grid-template-columns: 1fr;
    }

    .subscription-add-class-card__grid,
    .subscription-content-settings__row {
        grid-template-columns: 1fr;
    }

    .course-editor__header,
    .course-editor__surface-header,
    .course-editor__surface-body,
    .course-editor__actions {
        padding: 1.25rem;
    }

    .course-editor__actions {
        justify-content: stretch;
    }

    .course-editor__actions .btn,
    .course-editor__toolbar .btn {
        width: 100%;
    }

    .media-item {
        flex-direction: column;
        align-items: stretch;
    }

    .media-grip {
        align-self: flex-start;
    }

    .media-select {
        width: 100%;
    }

    .course-editor,
    .subscription-editor-shell {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .subscription-workbench__tabs {
        top: .5rem;
        border-radius: 14px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
        gap: .4rem;
        padding: .55rem;
        margin-bottom: 1.15rem;
    }

    .subscription-panel,
    .subscription-editor-shell .course-editor__surface {
        scroll-margin-top: 5.5rem;
    }

    .subscription-workbench-form[data-editor-mode="edit"] .subscription-class-toggle {
        gap: .45rem;
        padding: .7rem .75rem;
    }

    .subscription-workbench-form[data-editor-mode="edit"] .subscription-class-toggle .ed-type-badge {
        margin-left: .25rem;
        margin-right: .35rem;
        font-size: .72rem;
        padding: .2rem .45rem;
    }

    .subscription-workbench-form[data-editor-mode="edit"] .subscription-class-toggle__title {
        font-size: .95rem;
        line-height: 1.25;
        word-break: break-word;
    }

    .subscription-workbench-form[data-editor-mode="edit"] .subscription-class-toggle__meta {
        font-size: .78rem;
        line-height: 1.2;
    }

    .subscription-class-toggle__title--full {
        display: none;
    }

    .subscription-class-toggle__title--mobile {
        display: block;
    }

    .module-form {
        display: flex;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: .65rem;
        padding: 0 !important;
        box-sizing: border-box;
    }

    .module-form__field, .module-form__field--title, .module-form__field--price, .module-form__field--description {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        float: none !important;
        box-sizing: border-box;
    }

    .module-form .form-control, .module-form .form-select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .subscription-workbench-form[data-editor-mode="edit"] .module-form {
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
    }

    .subscription-workbench-form[data-editor-mode="edit"] .module-form__field {
        width: 100%;
    }

    .subscription-workbench-form[data-editor-mode="edit"] .module-form .form-control {
        width: 100%;
        margin-right: 0 !important;
    }

    .subscription-workbench-form[data-editor-mode="edit"] .module-form__field--title {
        order: 1;
    }

    .subscription-workbench-form[data-editor-mode="edit"] .module-form__field--price {
        order: 2;
    }

    .subscription-workbench-form[data-editor-mode="edit"] .module-form__field--description {
        order: 3;
    }

    .subscription-workbench-form[data-editor-mode="edit"] .module-form__description {
        min-height: 88px;
    }

    .subscription-add-class-card {
        gap: .85rem;
        padding: .85rem;
    }

    .subscription-add-class-card__actions {
        gap: .55rem;
    }

    .subscription-add-class-card__actions .btn,
    .subscription-add-class-card__actions .ed-add-btn {
        font-size: .9rem;
        padding-inline: .85rem;
    }

    .ed-stats-bar {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .ed-price-grid {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .subscription-add-class-card__grid {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .audience-picker__control {
        flex-direction: column;
    }

    .subscription-sticky-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        border-radius: 0;
        bottom: 0;
        box-sizing: border-box;
    }

    .subscription-sticky-actions__buttons {
        display: flex;
        justify-content: flex-end;
        gap: .75rem;
        width: auto;
    }

    .subscription-sticky-actions__buttons .btn {
        flex: 0 0 auto;
        min-width: 7rem;
        text-align: center;
    }

    .subscription-sticky-actions__status {
        margin-right: auto;
        margin-bottom: 0;
        justify-content: flex-start;
    }

    /* Section cards: full width */
    .ed-sec {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Audience pills: left-align text */
    .audience-chip {
        text-align: left;
    }

    /* Nueva clase: reorder inside module body so it appears between stats and classes */
    .accordion-item[data-module] > .accordion-collapse > .accordion-body {
        display: flex;
        flex-direction: column;
    }

    .accordion-item[data-module] > .accordion-collapse > .accordion-body > .row {
        order: 1;
    }

    .accordion-item[data-module] > .accordion-collapse > .accordion-body > h5,
    .accordion-item[data-module] > .accordion-collapse > .accordion-body > .add-class-form,
    .accordion-item[data-module] > .accordion-collapse > .accordion-body > .module-nueva-clase-mobile {
        order: 2;
    }

    .accordion-item[data-module] > .accordion-collapse > .accordion-body > .accordion {
        order: 3;
    }

    .accordion-item[data-module] > .accordion-collapse > .accordion-body > .ed-show-all-btn {
        order: 4;
    }

    .subscription-workbench-form[data-editor-mode="edit"] #modulesAcc,
    .subscription-workbench-form[data-editor-mode="edit"] #modulesAcc .accordion,
    .subscription-workbench-form[data-editor-mode="edit"] #modulesAcc .accordion-item,
    .subscription-workbench-form[data-editor-mode="edit"] #modulesAcc .accordion-button,
    .subscription-workbench-form[data-editor-mode="edit"] #modulesAcc .module-nueva-clase-mobile,
    .subscription-workbench-form[data-editor-mode="edit"] #modulesAcc .add-class-form {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .subscription-workbench-form[data-editor-mode="edit"] #modulesAcc .accordion-body > .row {
        margin-left: 0;
        margin-right: 0;
    }

    .subscription-workbench-form[data-editor-mode="edit"] #modulesAcc .video-actions .btn,
    .subscription-workbench-form[data-editor-mode="edit"] #modulesAcc .playlist-btn {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .accordion-body, .accordion-item {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .ed-sec, .ed-sec-body, .ed-sec-head {
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
}

.not-enrolled {
    background-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.15);
}

.completed-course {
    background-color: rgba(0, 0, 0, 0.04);
}

#quienes,
#contacto {
    max-width: 1400px;
}

.public-info-section .container.public-info-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(var(--theme-primary-rgb, 158, 208, 197), 0.12) 100%);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.25);
    border-radius: 24px;
    padding: clamp(2rem, 3vw, 3rem);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
}

.public-info-section .container.public-info-card h3 {
    margin-bottom: 1.5rem;
}


#quienes .about-us-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(var(--theme-secondary-rgb, 212, 164, 184), 0.08) 100%);
    border: 1px solid rgba(var(--theme-secondary-rgb, 212, 164, 184), 0.22);
    box-shadow:
        0 4px 6px rgba(var(--theme-secondary-rgb, 212, 164, 184), 0.08),
        0 20px 48px rgba(var(--theme-secondary-rgb, 212, 164, 184), 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: var(--theme-quaternary, #4a3038);
}

#quienes .about-us-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

#quienes .about-us-header h3 {
    margin: 0;
    font-family: var(--theme-font-heading-secondary, "Cormorant Garamond", serif);
    font-weight: 600;
    color: var(--theme-quaternary, #3a2a2e);
}

#quienes .about-us-header-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--theme-primary, #9ed0c5);
    box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
    font-size: 0.95rem;
}

#quienes .about-us-header-icon i {
    color: #fff;
}

#quienes .about-us-divider {
    height: 1px;
    margin: 1.5rem 0;
    background: linear-gradient(to right, transparent, rgba(var(--theme-secondary-rgb, 212, 164, 184), 0.3), transparent);
}

#quienes .about-us-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

#quienes .about-us-intro {
    border-left: 2px solid rgba(var(--theme-secondary-rgb, 212, 164, 184), 0.5);
    padding-left: 1rem;
}

#quienes .about-us-intro p,
#quienes .about-us-description {
    margin: 0;
    line-height: 1.65;
}

#quienes .about-us-intro p {
    font-size: 1.35rem;
    font-family: var(--theme-font-heading-secondary, "Cormorant Garamond", serif);
    color: var(--theme-quaternary, #4a3038);
}

#quienes .about-us-description {
    font-size: 1rem;
    color: rgba(var(--theme-quaternary-rgb, 74, 48, 56), 0.8);
}

#quienes .about-us-year {
    color: var(--theme-secondary, #d4a4b8);
    font-weight: 600;
}

#quienes .about-us-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.3rem;
}

#quienes .about-us-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    color: var(--theme-secondary, #b85a72);
    background: rgba(var(--theme-secondary-rgb, 212, 164, 184), 0.1);
    border: 1px solid rgba(var(--theme-secondary-rgb, 212, 164, 184), 0.32);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

#quienes .about-us-tag i {
    font-size: 0.52rem;
}

#quienes .about-us-tag:hover {
    transform: translateY(-2px);
    background-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
    color: var(--theme-secondary, #d4a4b8);
}

#contacto .list-unstyled {
    margin: 0;
}

#contacto .contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.25);
    border-radius: 13px;
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

#contacto .contact-item:hover {
    background-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.12);
    transform: translateX(4px);
}

    #contacto .contact-item:last-child {
        border-bottom: none;
    }

#contacto a {
    color: inherit;
}

#contacto .contact-link {
    display: inline-flex;
    align-items: center;
    color: inherit;
    transition: color 0.2s ease;
}

#contacto .contact-item:hover .contact-link,
#contacto .contact-item:hover > i {
    color: var(--theme-secondary, #d4a4b8);
}

#contacto .social-row {
    gap: 0.45rem;
}

#contacto .social-btn {
    width: 1.8rem;
    height: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

#contacto .social-btn:hover {
    transform: translateY(-2px);
    background-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
    color: var(--theme-secondary, #d4a4b8);
}

.scroll-section .fa-solid {
    color: var(--theme-primary, #9ed0c5);
}

.section-title {
    text-align: center;
}

.form-control,
.form-select {
    border-radius: 14px;
    border-color: var(--theme-control-border);
    background-color: var(--theme-control-bg);
    color: var(--theme-control-text);
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--theme-control-border-focus);
        background-color: var(--theme-control-bg-focus);
        box-shadow: 0 0 0 0.2rem rgba(var(--theme-primary-rgb, 158, 208, 197), 0.25);
    }

@media (max-width: 767px) {
    #inicio .p-5 {
        padding: 2.5rem 1.5rem;
    }

    .scroll-section h3,
    .scroll-section h2 {
        font-size: 1.75rem;
    }

    .public-info-section .container.public-info-card {
        padding: 2rem 1.5rem;
    }
}

.carousel-item {
    transition: transform 2.8s ease-in-out;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(var(--theme-tertiary-rgb, 158, 208, 197), 0.8);
    border-radius: 50%;
}

.playlist-list {
    list-style: none;
    padding-left: 0;
}

    .playlist-list li {
        display: flex;
        align-items: center;
    }

        .playlist-list li i.fa {
            width: 1.25em;
            text-align: center;
        }

        .playlist-list li a {
            flex-grow: 1;
            margin-left: 0.25rem;
            text-decoration: none;
        }

        .playlist-list li .duration {
            margin-right: 0.5rem;
            white-space: nowrap;
        }

        .playlist-list li .remove-video {
            border: 1px solid #dc3545;
            background: none;
            color: #dc3545;
            cursor: pointer;
            border-radius: 3px;
        }

.material-list,
.materials-list {
    list-style: none;
    padding-left: 0;
}

    .material-item,
    .materials-list li {
        display: flex;
        align-items: center;
        padding: 8px 12px;
        border-bottom: 1px solid #eee;
    }

        .material-item,
        .materials-list li.material-item {
            justify-content: space-between;
        }

        .material-left i,
        .materials-list li i.fa {
            font-size: 20px;
        }

        .material-left,
        .materials-list li .material-left {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            flex-grow: 1;
        }

        .material-info a,
        .materials-list li .material-info a {
            text-decoration: none;
        }

        .material-actions,
        .materials-list li .material-actions {
            display: flex;
            gap: 8px;
        }

        .btn-edit,
        .materials-list li .btn-edit {
            background-color: transparent;
            color: #ffc107;
            border: 1px solid #ffc107;
            padding: 4px 8px;
            border-radius: 4px;
        }

        .btn-delete,
        .materials-list li .btn-delete {
            background-color: transparent;
            color: #dc3545;
            border: 1px solid #dc3545;
            padding: 4px 8px;
            border-radius: 4px;
        }

.login-overlay {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 2rem 1rem;
}

.login-modal {
    width: 100%;
    max-width: 380px;
    background: var(--theme-background, #fff);
    color: var(--theme-on-background, #1f2937);
    padding: 2rem 2rem 1.75rem;
    border-radius: var(--theme-radius-lg, 20px);
    border: 1px solid rgba(var(--theme-on-background-rgb, 31,41,55), 0.08);
    box-shadow: var(--theme-shadow-2, 0 8px 24px rgba(0, 0, 0, 0.15));
    text-align: left;
    position: relative;
    font-family: inherit;
}

    .login-modal__icon {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18);
        color: var(--theme-primary, #9ed0c5);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 1rem;
        font-size: 18px;
    }

    .login-modal__close {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 30px;
        height: 30px;
        border-radius: 8px;
        background: rgba(var(--theme-on-background-rgb, 31,41,55), 0.06);
        border: 1px solid rgba(var(--theme-on-background-rgb, 31,41,55), 0.1);
        color: var(--theme-on-background, #1f2937);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        font-size: 14px;
        padding: 0;
        opacity: 0.85;
    }

    .login-modal__close:hover {
        background: rgba(var(--theme-on-background-rgb, 31,41,55), 0.12);
        opacity: 1;
    }

    .login-modal h2 {
        margin: 0 0 4px;
        font-size: 18px;
        font-weight: 600;
        text-align: left;
        color: var(--theme-on-background, #1f2937);
        display: block;
    }

    .login-modal__subtitle {
        font-size: 13px;
        color: rgba(var(--theme-on-background-rgb, 31,41,55), 0.7);
        margin: 0 0 1.4rem;
        line-height: 1.5;
    }

    .login-modal .input-group {
        position: relative;
        margin-bottom: 12px;
        width: 100%;
        flex-wrap: nowrap;
    }

        .login-modal .input-group i:not(.toggle-password):not(.validation-icon) {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--theme-primary, #9ed0c5) !important;
            z-index: 2;
            pointer-events: none;
            font-size: 14px;
            width: 16px;
            text-align: center;
        }

#mediaCarousel .carousel-item,
#homeCarousel .carousel-item {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    #mediaCarousel .carousel-item img,
    #homeCarousel .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    #mediaCarousel .carousel-item video,
    #homeCarousel .carousel-item video {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.login-modal .input-group input,
.login-modal .input-group .form-control {
    width: 100%;
    padding: 10px 42px;
    border: 1.5px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.5);
    border-radius: 0;
    font-size: 14px;
    background-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.06);
    color: var(--theme-on-background, var(--theme-control-text));
    box-sizing: border-box;
    transition: border-color 0.15s, background-color 0.15s;
}

.login-modal .input-group input:focus,
.login-modal .input-group .form-control:focus {
    border-color: var(--theme-primary, #9ed0c5);
    background-color: var(--theme-background, #fff);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 158, 208, 197), 0.15);
    outline: none;
}

.login-modal .password-group .toggle-password {
    right: 14px;
    color: var(--theme-primary, #9ed0c5);
}

.login-modal .btn-login {
    width: 100%;
    padding: 11px 16px;
    background-color: var(--theme-primary, #9ed0c5);
    border: none;
    color: #fff;
    font-weight: 500;
    border-radius: var(--theme-radius-md, 10px);
    margin-top: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: filter 0.15s;
}

.login-modal .btn-login:hover {
    filter: brightness(0.92);
}

.login-modal .btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border-radius: var(--theme-radius-md, 10px);
    border: 1.5px solid rgba(var(--theme-on-background-rgb, 31, 41, 55), 0.18);
    background: var(--theme-background, #fff);
    color: var(--theme-on-background, #1f2937);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color 0.15s;
}

.login-modal .btn-google i {
    color: #ea4335;
}

.login-modal .btn-google:hover {
    background: rgba(var(--theme-on-background-rgb, 31, 41, 55), 0.05);
    color: var(--theme-on-background, #1f2937);
}

.login-modal .divider {
    margin: 1.25rem 0;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: rgba(var(--theme-on-background-rgb, 31, 41, 55), 0.55);
}

    .login-modal .divider::before,
    .login-modal .divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: rgba(var(--theme-on-background-rgb, 31, 41, 55), 0.15);
        position: static;
        left: auto;
        right: auto;
        top: auto;
    }

    .login-modal .divider span {
        background: transparent;
        padding: 0;
        color: inherit;
    }

.login-modal .register-link {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--theme-primary, #9ed0c5);
    text-decoration: none;
    text-align: center;
}

.login-modal .register-link:hover {
    text-decoration: underline;
}

#loginModal .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
}

.progress-thin {
    height: 4px;
}

.btn-hidden-mobile {
    display: none;
}

.licensing-days-input {
    width: 120px;
}

.session-grid-size-auto {
    width: auto;
}

.smc-avatar-inline {
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 10px;
}

.smc-avatar-fallback {
    width: 100%;
    height: 100%;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border-radius: 10px;
}

.smc-name-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.register-modal {
    width: 320px;
    background: var(--theme-surface);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    font-family: inherit;
}

    .register-modal h2 {
        margin-bottom: 20px;
    }

    .register-modal .input-group {
        position: relative;
        margin-bottom: 15px;
        width: 100%;
    }

        .register-modal .input-group i:not(.toggle-password):not(.validation-icon) {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--theme-primary, #9ed0c5) !important;
            z-index: 2;
            pointer-events: none;
        }

        .register-modal .input-group input {
            width: 100%;
            padding: 10px 35px 10px 35px;
            border: 1px solid var(--theme-control-border);
            border-radius: 5px;
            background-color: var(--theme-control-bg);
            color: var(--theme-control-text);
        }

    .register-modal .btn-mail,
    .register-modal .btn-google {
        width: 100%;
        padding: 10px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        margin-bottom: 10px;
        font-weight: bold;
        color: white;
        text-decoration: none;
        display: block;
        font-size: 15px;
    }

    .register-modal .btn-mail {
        background-color: var(--theme-primary, #9ed0c5);
    }

    .register-modal .btn-google {
        background-color: #db4437;
    }

        .register-modal .btn-mail i,
        .register-modal .btn-google i {
            margin-right: 8px;
        }

    .register-modal .divider {
        margin: 15px 0;
        text-align: center;
        position: relative;
    }

        .register-modal .divider span {
            background: var(--theme-surface);
            padding: 0 10px;
            color: #888;
        }

        .register-modal .divider::before {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            top: 50%;
            height: 1px;
            background: #ccc;
            z-index: 0;
        }

    .register-modal .login-link {
        display: inline-block;
        margin-top: 15px;
        font-size: 0.9em;
        color: var(--theme-primary, #9ed0c5);
        text-decoration: none;
    }

.register-choice .modal-dialog {
    max-width: 380px;
}

.register-choice-card {
    position: relative;
    padding: 2rem 2rem 1.75rem;
    background-color: var(--theme-tertiary, #ffffff);
    color: var(--theme-text-body-on-surface, var(--theme-on-tertiary, #1f2937));
    border: 0.5px solid rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.12);
    border-radius: var(--theme-radius-lg, 20px);
    box-shadow: var(--theme-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.18));
}

.register-choice-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.18);
    border-radius: 8px;
    color: var(--theme-text-muted-on-surface, rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.68));
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

    .register-choice-close:hover {
        background-color: rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.06);
        color: var(--theme-text-title-on-surface, var(--theme-on-tertiary, #1f2937));
    }

.register-choice-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18);
    color: var(--theme-primary, #9ed0c5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 18px;
}

.register-choice-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--theme-text-title-on-surface, var(--theme-on-tertiary, #1f2937));
    margin: 0 0 4px;
    font-family: var(--theme-font-heading-secondary, var(--theme-font-body, inherit));
}

.register-choice-subtitle {
    font-size: 13px;
    color: var(--theme-text-subtitle-on-surface, rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.78));
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.register-choice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border-radius: var(--theme-radius-md, 14px);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
    line-height: 1.25;
}

.register-choice-btn-google {
    background-color: var(--theme-tertiary, #ffffff);
    border: 1.5px solid rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.18);
    color: var(--theme-text-title-on-surface, var(--theme-on-tertiary, #1f2937));
}

    .register-choice-btn-google:hover {
        background-color: rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.05);
        color: var(--theme-text-title-on-surface, var(--theme-on-tertiary, #1f2937));
    }

.register-choice-btn-email {
    background-color: var(--theme-primary, #9ed0c5);
    border: 1.5px solid var(--theme-primary, #9ed0c5);
    color: var(--theme-on-primary, #ffffff);
}

    .register-choice-btn-email:hover {
        background-color: var(--theme-primary-interactive, var(--theme-primary, #9ed0c5));
        border-color: var(--theme-primary-interactive, var(--theme-primary, #9ed0c5));
        color: var(--theme-on-primary, #ffffff);
        filter: brightness(0.95);
    }

.register-choice-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1.25rem 0;
    color: var(--theme-text-muted-on-surface, rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.68));
    font-size: 12px;
    text-align: center;
}

    .register-choice-divider::before,
    .register-choice-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.12);
    }

    .register-choice-divider span {
        white-space: nowrap;
    }

.register-choice-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 12px;
    color: var(--theme-text-muted-on-surface, rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.68));
}

    .register-choice-footer a {
        color: var(--theme-primary, #9ed0c5);
        text-decoration: none;
        font-weight: 500;
    }

        .register-choice-footer a:hover {
            text-decoration: underline;
        }

.password-group {
    position: relative;
}

    .password-group .toggle-password {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        border: none;
        background: transparent;
        padding: 0;
        cursor: pointer;
        color: var(--theme-primary, #9ed0c5);
        z-index: 2;
    }

    .password-group .validation-icon {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        z-index: 2;
    }

.password-strength {
    height: 4px;
}

.navbar-nav .nav-link.active {
    font-weight: bold;
    text-decoration: underline;
}

/* Hover effect for the login button on the home page */
.login-toggle-btn:hover,
.login-toggle-btn:active,
.login-toggle-btn:focus {
    background-color: #fff;
    color: var(--theme-primary, #9ed0c5);
    border-color: var(--theme-primary, #9ed0c5);
}

@media (max-width: 576px) {
    .home-auth-btn {
        font-size: 1.05rem;
        padding: 0.75rem 1.6rem;
        width: min(82vw, 260px);
        display: inline-flex;
        justify-content: center;
    }

    .home-hero-banner {
        padding: 2.2rem 1.25rem !important;
    }

    .home-hero-badge {
        font-size: 0.72rem;
        padding: 0.35rem 0.75rem;
    }

    #inicio .lead {
        font-size: 1.05rem;
    }
}

.accordion-button.class-viewed {
    background-color: #f0f0f0;
    color: #6c757d;
}

.accordion-item.class-viewed > .accordion-header > .accordion-button {
    background-color: #f0f0f0;
    color: #6c757d;
}

#sideMenu {
    display: none;
}

/* Nav de puntos del home público (solo desktop ancho) */
@media (min-width: 1400px) {
    #sideMenu {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
        top: 50%;
        left: 1.25rem;
        z-index: 1020;
    }

    #sideMenu .nav-link {
        position: relative;
        width: 12px;
        height: 12px;
        padding: 0;
        border-radius: 50%;
        background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
        border: 1px solid rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.15);
        transition: background 0.2s ease, transform 0.2s ease;
    }

    #sideMenu .nav-link > span {
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
        white-space: nowrap;
        font-size: 0.78rem;
        font-weight: 600;
        color: var(--theme-quaternary, #343a40);
        background: var(--theme-tertiary, #f8f9fa);
        border: 1px solid rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.12);
        border-radius: 999px;
        padding: 3px 12px;
        box-shadow: var(--theme-shadow-1, 0 4px 16px rgba(15, 23, 42, 0.08));
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.15s ease;
    }

    #sideMenu .nav-link:hover,
    #sideMenu .nav-link:focus-visible,
    #sideMenu .nav-link.active {
        background: var(--theme-primary, #9ed0c5);
        transform: scale(1.2);
    }

    #sideMenu .nav-link:hover > span,
    #sideMenu .nav-link:focus-visible > span {
        opacity: 1;
    }
}

#homeScroll {
    margin-left: 0;
}

#messageMenu {
    width: 180px;
    padding-left: 0;
    margin-left: -0.75rem;
}

    #messageMenu .nav-link {
        color: var(--theme-on-surface);
        padding: .25rem 0;
        white-space: nowrap;
    }

        #messageMenu .nav-link.active {
            font-weight: bold;
            text-decoration: underline;
        }

.recipient-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.recipient-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
}

    .recipient-badge img {
        width: 20px;
        height: 20px;
        object-fit: cover;
        border-radius: 50%;
        margin-right: 0.25rem;
    }

/* Para columna en grilla de enviados */
.grid-recipients {
    max-width: 50ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#recipientDropdown {
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

@media (max-width: 767.98px) {
    #messageMenu {
        width: 100%;
        margin-bottom: 1rem;
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    #composeForm .form-control,
    #composeForm button[type="submit"] {
        padding: 0.75rem;
        font-size: 1rem;
    }
}
/* Icon picker */
#iconPickerModal .icon-grid {
    display: flex;
    flex-wrap: wrap;
    max-height: 300px;
    overflow-y: auto;
}

    #iconPickerModal .icon-grid i {
        font-size: 35px;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        margin: 5px;
    }

/* Center all modals and avoid jump when closing */
.modal.fade {
    display: none !important;
}

    .modal.fade.show {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

.modal-dialog {
    margin: 0;
}

/* Account dashboard cards */
.account-page #accountSummary .card,
.account-page #supportCard {
    color: var(--theme-quaternary, #343a40);
    background: rgba(var(--theme-tertiary-rgb, 248, 249, 250), 0.94);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.24);
}

.account-page #accountSummary .card .card-title,
.account-page #supportCard .card-title,
.account-page #accountSummary .card .fw-semibold {
    color: var(--theme-quaternary, #343a40);
}

.account-page #accountSummary .card .text-muted,
.account-page #supportCard .text-muted {
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.72) !important;
}

.account-page #accountSummary .progress {
    background-color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.2);
}

/* Account popups */
.account-modal .modal-dialog {
    max-width: 720px;
    width: calc(100% - 2rem);
}

@media (min-width: 768px) {
    .account-modal .modal-dialog {
        min-width: 560px;
    }
}

.account-modal .modal-content {
    border-radius: 18px;
    border: 1px solid var(--theme-border, rgba(31, 61, 50, 0.08));
    background: var(--theme-surface, #f7f9f8);
    color: var(--theme-on-surface, #1f3d32);
    box-shadow: 0 24px 60px rgba(15, 40, 30, 0.18);
}

.account-modal .modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--theme-border, rgba(31, 61, 50, 0.08));
    background: var(--theme-background, #f3f6f4);
}

.account-modal .modal-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--theme-on-surface, #1f3d32);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .account-modal .modal-title i {
        font-size: 1rem;
        color: var(--theme-primary, #2f6f5a);
        background: rgba(var(--theme-primary-rgb, 46, 111, 90), 0.12);
        border-radius: 50%;
        width: 2rem;
        height: 2rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.account-modal .btn-close {
    filter: none;
    opacity: 0.75;
    border-radius: 50%;
    background-color: rgba(var(--theme-on-surface-rgb, 31, 61, 50), 0.08);
    padding: 0.6rem;
}

    .account-modal .btn-close:hover {
        opacity: 1;
    }

.account-modal .modal-body {
    padding: 1.5rem;
}

.account-modal .popup-section {
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--theme-border, rgba(31, 61, 50, 0.12));
}

    .account-modal .popup-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.account-modal .form-label {
    font-size: 0.85rem;
    color: var(--theme-on-surface-muted, #6f7d76);
    letter-spacing: 0.02em;
}

.account-modal .detail-value {
    color: var(--theme-on-surface, #1f3d32);
}

.account-modal .detail-list {
    padding-left: 1.1rem;
    color: var(--theme-on-surface, #1f3d32);
}

.account-modal .popup-empty {
    text-align: center;
    padding: 1.5rem 0.5rem;
    font-size: 0.95rem;
    color: var(--theme-on-surface-muted, #6f7d76);
}

.account-modal .alerts-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-modal .alert-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    background: var(--theme-surface);
    border-radius: 13px;
    border: 1px solid var(--theme-border, rgba(31, 61, 50, 0.08));
    color: var(--theme-on-surface, #1f3d32);
}

    .account-modal .alert-item i {
        color: var(--bs-warning, #d97a2b);
        font-size: 0.9rem;
        margin-top: 0.15rem;
    }

.account-modal .alert-empty {
    text-align: center;
    color: var(--theme-on-surface-muted, #6f7d76);
    padding: 1.5rem 0.5rem;
    background: var(--theme-surface);
    border-radius: 13px;
    border: 1px dashed var(--theme-border, rgba(31, 61, 50, 0.16));
}

/* Horizontal card carousel */
.card-carousel {
    position: relative;
    overflow: visible;
    --carousel-card-media-height: 180px;
}

/* Catálogo con pocos ítems: sin flechas, cards alineadas a la izquierda (no estiradas) */
.card-carousel.is-static .carousel-control-prev,
.card-carousel.is-static .carousel-control-next { display: none !important; }
.card-carousel.is-static .carousel-track { justify-content: flex-start; }

    .card-carousel .carousel-track {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-behavior: smooth;
        gap: 1rem;
        --bs-gutter-x: 0;
        margin-left: 0;
        margin-right: 0;
        padding: 0 2.75rem;
        align-items: stretch;
    }

        .card-carousel .carousel-track::-webkit-scrollbar {
            display: none;
        }

    .card-carousel .carousel-track {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .card-carousel .col {
        flex: 0 0 31%;
        display: flex;
    }

.card-carousel .col > .card {
    flex: 1 1 auto;
}

.card-carousel .card:not(.student-course-card) {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-carousel .card:not(.student-course-card) .card-img-top,
.card-carousel .card:not(.student-course-card) .carousel-inner,
.card-carousel .card:not(.student-course-card) .carousel-item {
    height: var(--carousel-card-media-height);
}

.card-carousel .card:not(.student-course-card) .card-img-top,
.card-carousel .card:not(.student-course-card) .carousel-item img,
.card-carousel .card:not(.student-course-card) .carousel-item video,
.card-carousel .card:not(.student-course-card) video.d-block {
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.card-carousel .carousel-control-prev,
.card-carousel .carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    background: rgba(0, 0, 0, 0.38);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    z-index: 10;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.card-carousel .carousel-control-prev:hover,
.card-carousel .carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.55);
    opacity: 1;
}

.card-carousel .carousel-control-prev {
    left: 0.5rem;
}

.card-carousel .carousel-control-next {
    right: 0.5rem;
}

@media (max-width: 767px) {
    .card-carousel .col {
        flex: 0 0 90%;
        max-width: 90%;
        scroll-snap-align: center;
    }

    .card-carousel {
        overflow: visible;
        margin: 0 -1rem;
    }

        .card-carousel .carousel-track {
            justify-content: flex-start;
            padding: 0 10% 0 10%;
            scroll-padding-inline: 10%;
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
        }

        .card-carousel .carousel-control-prev,
        .card-carousel .carousel-control-next {
            display: none;
        }
}

/* Indicador de posición del carrusel (solo mobile) */
.card-carousel .carousel-dots {
    display: none;
}

@media (max-width: 767.98px) {
    .card-carousel .carousel-dots {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding-top: 0.75rem;
    }

    .card-carousel .carousel-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        border: none;
        padding: 0;
        background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
        transition: background 0.2s ease, transform 0.2s ease;
    }

    .card-carousel .carousel-dot.is-active {
        background: var(--theme-primary, #9ed0c5);
        transform: scale(1.25);
    }
}



.student-dashboard .student-updates-icon {
    font-size: 0.84rem;
}

.student-dashboard .student-priority-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.student-dashboard .student-priority-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--theme-radius-pill, 999px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.38rem 0.85rem;
    color: #1f3d32;
    background: var(--theme-surface);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.student-dashboard .student-priority-chip:hover,
.student-dashboard .student-priority-chip:focus {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18);
    color: #163026;
}

.student-dashboard .student-priority-section {
    background: var(--theme-surface);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1rem 1.1rem;
}


.student-dashboard .student-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    height: 1.35rem;
    margin-left: 0.4rem;
    padding: 0 0.45rem;
    border-radius: var(--theme-radius-pill, 999px);
    font-size: 0.75rem;
    font-weight: 700;
    color: #1f3d32;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.25);
}

.student-dashboard .student-catalog-header {
    margin-bottom: 0.75rem;
}

.student-dashboard .student-search-input {
    border-radius: var(--theme-radius-pill, 999px);
    padding: 0.75rem 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.student-dashboard {
    max-width: 1400px;
    padding-inline: clamp(0.75rem, 2vw, 1.5rem);
}

    .student-dashboard .student-section {
        margin-bottom: 0.75rem;
    }

    .student-dashboard .student-section-title {
        font-weight: 600;
    }

    .student-dashboard .student-section-divider {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin: 1.25rem 0 1rem;
        color: #6c757d;
        font-weight: 600;
    }

        .student-dashboard .student-section-divider::before,
        .student-dashboard .student-section-divider::after {
            content: "";
            flex: 1;
            height: 1px;
            background: rgba(0, 0, 0, 0.08);
        }

    .student-dashboard .student-catalog-controls {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
        background: var(--theme-surface);
        padding: 0.75rem 1rem;
        border-radius: 14px;
        border: 1px solid rgba(0, 0, 0, 0.04);
    }

    .student-dashboard .student-section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

        .student-dashboard .student-section-header h4 {
            font-weight: 600;
        }

:root {
    --student-card-height: 500px;
    --student-card-media-height: 240px;
}

.student-course-card {
    position: relative;
    display: grid;
    grid-template-rows: var(--student-card-media-height) minmax(0, 1fr) auto;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    height: auto;
    min-height: var(--student-card-height);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Hover-lift estilo templates claude-design: aplica a todas las cards
   (home + dashboard). El acento sigue la paleta del tenant vía --theme-primary. */
.student-card:hover .student-course-card,
.student-card:focus-within .student-course-card {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.13);
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.55);
}

@media (prefers-reduced-motion: reduce) {
    .student-course-card { transition: none; }
    .student-card:hover .student-course-card,
    .student-card:focus-within .student-course-card { transform: none; }
}

@media (max-width: 767.98px) {
    .student-course-card {
        --student-card-height: 0px;
        --student-card-media-height: 200px;
    }
}

.student-card-media {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f5f6;
    min-height: 0;
}

.student-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.student-card-media img.is-contained {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.student-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #b8b1b3;
    font-size: 0.9rem;
    gap: 0.35rem;
}

.student-card-placeholder i {
    font-size: 1.15rem;
    opacity: 0.7;
}


.student-card-headline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.student-rating-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.24rem 0.68rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: var(--theme-surface);
    color: #f59e0b;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.student-rating-pill:hover,
.student-rating-pill:focus {
    color: #f6c02d;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.16);
}

.student-rating-pill i {
    font-size: 0.9rem;
}

.student-rating-pill i.student-star-filled {
    color: var(--theme-star-color, #f4b400);
}

/* Antes era #f7b500: la vacía quedaba MÁS saturada que la llena. */
.student-rating-pill i.student-star-empty {
    color: rgba(var(--theme-star-color-rgb, 244, 180, 0), 0.35);
}
.student-card-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    background: var(--theme-primary, #9ed0c5);
    background-color: var(--theme-primary, #9ed0c5);
    border-radius: var(--theme-radius-pill, 999px);
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    justify-self: flex-start;
}

.student-course-card .student-card-content {
    min-height: 0;
    display: grid;
    /* fila propia (auto) para los chips de meta; la descripción (clamp-2) vuelve a ser
       la fila flexible que absorbe el alto sobrante. Antes los chips caían en el 1fr y el
       grid los estiraba a lo alto (chip "cuadrado"). */
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 0.6rem;
    padding: 1rem 1.2rem 0;
    overflow: hidden;
}

.student-course-card .student-card-actions {
    padding: 0 1.2rem 1.2rem;
}

.student-course-card .card-title {
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.student-card-type-meta {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    margin-top: -0.2rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-course-card .card-text {
    margin-bottom: 0;
    color: #4f5b59;
}

.student-card-more {
    color: var(--theme-primary, #9ed0c5);
    font-weight: 600;
    text-decoration: none;
}

.student-card-more:hover,
.student-card-more:focus {
    text-decoration: underline;
}

.student-primary-btn {
    background-color: var(--theme-primary, #9ed0c5);
    border: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.student-card[data-detail-url] {
    cursor: pointer;
}

.student-dashboard .student-carousel {
    margin-inline: -0.25rem;
    overflow: hidden;
}

    .student-dashboard .student-carousel .carousel-track {
        display: flex;
        flex-wrap: nowrap;
        gap: 1rem;
        padding: 0.5rem 0.75rem 0.75rem;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-padding-inline: 0.75rem;
        scroll-snap-type: x proximity;
    }

.student-dashboard .student-card {
    flex: 0 0 30%;
    min-width: 260px;
    scroll-snap-align: start;
}

.public-catalog-section {
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: clamp(0.75rem, 2vw, 1.5rem);
}

    .public-catalog-section .student-section-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        text-align: center;
    }

        .public-catalog-section .student-section-header > div {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .public-catalog-section .student-section-header h4 {
            font-weight: 600;
            text-align: center;
        }

        .public-catalog-section .student-section-header p {
            text-align: center;
        }

    .public-catalog-section .student-carousel {
        margin-inline: -0.25rem;
        overflow: hidden;
    }

        .public-catalog-section .student-carousel .carousel-track {
            display: flex;
            flex-wrap: nowrap;
            gap: 1rem;
            padding: 0.5rem 0.75rem 0.75rem;
            overflow-x: auto;
            scroll-behavior: smooth;
            scroll-padding-inline: 0.75rem;
            scroll-snap-type: x proximity;
        }

    .public-catalog-section .student-card {
        flex: 0 0 30%;
        min-width: 260px;
        scroll-snap-align: start;
    }


.student-dashboard .student-carousel-status {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.student-progress .progress {
    height: 6px;
    background: rgba(31, 61, 50, 0.12);
}

.student-progress .progress-bar {
    background: var(--theme-primary, #9ed0c5);
}

.student-updates {
    background: var(--theme-surface);
    border-radius: 16px;
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
    padding: 1rem 1.25rem;
}

.student-updates-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #1f3d32;
}

.student-updates-heading {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.student-updates-heading h4 {
    font-weight: 600;
}

.student-updates-subtitle {
    font-size: 0.86rem;
    color: #4f655d;
}

.student-updates-body {
    padding: 0.75rem 0 0;
    border-top: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.32);
    margin-top: 0.65rem;
}

.student-update-item {
    padding: 0.9rem 0 0.9rem 0.75rem;
    border-bottom: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.28);
    border-left: 2px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.5);
}

    .student-update-item:last-child {
        border-bottom: none;
    }

/* Grilla: badge | contenido; la franja de evento ocupa ambas columnas */
.student-update-content {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 0.75rem;
    row-gap: 0.6rem;
    align-items: start;
}

.student-update-date-badge {
    grid-row: 1;
    grid-column: 1;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--theme-primary, #9ed0c5);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-transform: uppercase;
}

/* Aviso de evento en vivo: badge magenta (mismo acento que el countdown) */
.student-update-date-badge.is-live {
    background: linear-gradient(160deg, #e8609a, #c2185b);
    box-shadow: 0 3px 9px rgba(232, 96, 154, 0.35);
}

.student-update-date-day {
    font-size: 1.02rem;
    font-weight: 800;
}

.student-update-date-month {
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.student-update-head {
    grid-column: 2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    min-width: 0;
}

.student-update-title {
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.25;
    color: #1f3d32;
    text-wrap: pretty;
}

.student-update-live-tag {
    display: inline-flex;
    align-items: center;
    border-radius: var(--theme-radius-pill, 999px);
    background: #fce7f3;
    color: #c2185b;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.16rem 0.5rem;
}

.student-update-message {
    grid-column: 2;
    margin: 0;
    color: #5f6e69;
    font-size: 0.86rem;
    line-height: 1.4;
    text-wrap: pretty;
}

/* Ítem de la sección de eventos: reusa la grilla del aviso (badge | contenido)
   y suma la fecha/hora del evento y el recordatorio, en la columna del texto. */
.student-update-content .student-event-time {
    grid-column: 2;
}

.student-update-content .student-event-hint {
    grid-column: 1 / -1;
}

/* Franja de evento: ancho completo bajo el texto */
.student-update-event-meta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
    background: rgba(194, 24, 91, 0.05);
    border: 1px solid rgba(194, 24, 91, 0.16);
    border-radius: 14px;
}

.student-event-countdown {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    color: #1f3d32;
}

.student-event-countdown-prefix {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b23a6d;
}

.student-event-countdown-boxes {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.student-event-countdown-box {
    min-width: 40px;
    border-radius: 9px;
    border: 1px solid rgba(233, 77, 159, 0.4);
    background: #fff8fb;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 0.28rem 0.2rem;
    line-height: 1;
}

.student-event-countdown-box strong {
    color: #cf4d84;
    font-size: 1.05rem;
    font-weight: 800;
}

.student-event-countdown-box small {
    color: #d18b16;
    font-size: 0.5rem;
    font-weight: 700;
    margin-top: 3px;
    letter-spacing: 0.03em;
}

.student-event-countdown-separator {
    color: #cf4d84;
    font-weight: 700;
}

.student-event-countdown.is-live-now .student-event-countdown-boxes {
    display: none;
}

.student-event-link {
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
    font-weight: 700;
    border-radius: var(--theme-radius-pill, 999px);
    color: #fff;
    background: var(--theme-primary-strong, #c2559f);
    padding: 0.55rem 1.05rem;
    text-decoration: none;
    font-size: 0.84rem;
    box-shadow: 0 3px 10px rgba(194, 85, 159, 0.32);
}

.student-event-link:hover,
.student-event-link:focus {
    color: #fff;
    background: #ac3f8a;
}

.student-updates-toggle {
    font-weight: 600;
    color: #1f3d32;
}

    .student-updates-toggle:hover {
        color: #163026;
        text-decoration: underline;
    }

.student-card.is-filtered-out {
    display: none;
}

@media (max-width: 767px) {
    .student-dashboard .student-catalog-controls {
        padding: 0.75rem;
    }

    .student-dashboard .student-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .student-dashboard {
        padding-inline: 1.5%;
    }

    .student-dashboard .student-carousel .carousel-track {
        padding-inline: 5%;
        scroll-padding-inline: 5%;
        scroll-snap-type: x mandatory;
    }

    .student-dashboard .student-card {
        flex: 0 0 95%;
        max-width: 95%;
        scroll-snap-align: center;
    }

    .public-catalog-section .student-section-header {
        flex-direction: column;
        align-items: center;
    }

    .public-catalog-section.home-catalog-section {
        padding-inline: 1.5%;
    }

    .public-catalog-section .student-carousel .carousel-track {
        padding-inline: 5%;
        scroll-padding-inline: 5%;
        scroll-snap-type: x mandatory;
    }

    .public-catalog-section .student-card {
        flex: 0 0 95%;
        max-width: 95%;
        scroll-snap-align: center;
    }
}

.course-info-card {
    border: none;
    border-radius: 18px;
    overflow: hidden;
}

.course-info-media-column .carousel,
.course-info-media-column .carousel-inner,
.course-info-media-column .carousel-item,
.course-info-media-column .carousel-item img,
.course-info-media-column > img {
    height: 100%;
    min-height: 340px;
}

.course-info-media-column .carousel-item img,
.course-info-media-column > img {
    object-fit: cover;
}

.course-info-side {
    background: var(--theme-tertiary, #9ed0c5);
    color: var(--theme-quaternary, #2b2b2b);
}

.course-info-side-inner {
    padding: 1.4rem 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0.6rem;
}

.course-info-status {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: rgba(var(--theme-quaternary-rgb, 43, 43, 43), 0.75);
}

.course-info-title {
    margin: 0;
    font-weight: 700;
}

.course-info-description {
    margin-bottom: 0;
}

.course-info-syllabus-tag {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 999px;
    background: rgba(var(--theme-quaternary-rgb, 43, 43, 43), 0.14);
    color: var(--theme-quaternary, #2b2b2b);
    font-size: 0.75rem;
    padding: 0.2rem 0.65rem;
}

.course-info-details {
    margin: 0;
    white-space: pre-line;
    max-height: 92px;
    overflow-y: auto;
    font-size: 0.9rem;
    background: transparent;
}

.course-price-box {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
}

.course-price-caption {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: rgba(var(--theme-quaternary-rgb, 43, 43, 43), 0.75);
}

.course-price-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.course-info-action-panel {
    margin-top: auto;
    background: #efefef;
    border-radius: 0;
    margin-inline: -1.5rem;
    margin-bottom: -1rem;
    padding: 1rem 1.5rem;
}

.course-info-action-panel .btn-primary {
    background-color: #33895d;
    border-color: #33895d;
}

@media (max-width: 767.98px) {
    .course-info-media-column .carousel,
    .course-info-media-column .carousel-inner,
    .course-info-media-column .carousel-item,
    .course-info-media-column .carousel-item img,
    .course-info-media-column > img {
        min-height: 220px;
    }

    .course-info-action-panel {
        margin-bottom: -1rem;
    }
}

.student-kpi-strip {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-kpi-item {
    background: var(--theme-surface);
    border: 1px solid #f1ceb0;
    border-radius: 10px;
    padding: 0.8rem;
}

.student-kpi-item-wide {
    grid-column: span 2;
}

.student-kpi-label {
    display: block;
    color: #6f5a4b;
    font-size: 0.85rem;
}

.student-kpi-value {
    font-size: 1rem;
}

.top-review-carousel .carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 255px);
    gap: 0.85rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.5rem 0.15rem 0.75rem;
}

.top-review-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(var(--theme-quaternary-rgb, 46, 31, 42), 0.08);
    border-radius: 18px;
    overflow: hidden;
    background: var(--theme-background, #fefbf0);
    box-shadow: var(--theme-shadow-1, 0 4px 18px rgba(0, 0, 0, 0.09));
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.top-review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--theme-shadow-2, 0 12px 32px rgba(0, 0, 0, 0.16));
}

.top-review-card-band {
    padding: 0.8rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.top-review-band-curso {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.16);
}

.top-review-band-seminario {
    background: rgba(var(--theme-secondary-rgb, 108, 117, 125), 0.16);
}

.top-review-band-suscripcion {
    background: rgba(var(--theme-success-rgb, 25, 135, 84), 0.13);
}

.top-review-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.top-review-type-badge {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    font-weight: 700;
    background: var(--theme-background, #ffffff);
    color: var(--theme-on-background, #111111);
    border: 1px solid rgba(var(--theme-on-background-rgb, 17, 17, 17), 0.18);
}

.top-review-date {
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    font-size: 0.68rem;
}

.top-review-title {
    color: var(--theme-quaternary, #2e1f2a);
    line-height: 1.25;
    font-size: 1.02rem;
}

.top-review-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.55rem;
    padding: 0.85rem 0.95rem 0.95rem;
    min-height: 182px;
}

.top-review-stars {
    display: flex;
    gap: 0.15rem;
    color: var(--theme-star-color, #f4b400);
    text-shadow: 0 0 0.01px rgba(138, 101, 0, 0.35);
    font-size: 0.82rem;
}

/* !important: si no, gana la regla global de íconos FA (site.css ~301) y estas
   estrellas (Home "Top calificaciones", TeacherReviews) salían en --theme-primary. */
.top-review-stars i {
    color: var(--theme-star-color, #f4b400) !important;
}

.top-review-comment {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2em;
    color: rgba(var(--theme-quaternary-rgb, 46, 31, 42), 0.78);
    font-size: 0.86rem;
    line-height: 1.55;
}

.top-review-comment.expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.top-review-more {
    align-self: flex-start;
    text-decoration: none;
    color: var(--theme-primary, #b05d88);
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.1;
}

.top-review-more:hover,
.top-review-more:focus {
    color: var(--theme-primary-interactive, #8e436a);
    text-decoration: underline;
}

.top-review-author {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(var(--theme-quaternary-rgb, 46, 31, 42), 0.18);
}

.top-review-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.22);
    /* Las iniciales van sobre un tinte de la MISMA marca: con primary-interactive
       (la marca casi cruda) daba 1.44:1 en marcas pastel. El acento es la marca ya
       reforzada por contraste. */
    color: var(--theme-brand-accent, var(--theme-primary, #c05e8a));
    font-size: 0.62rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.top-review-author-name {
    display: block;
    color: var(--theme-quaternary, #2e1f2a);
    font-size: 0.76rem;
    line-height: 1.1;
}

.top-review-author-label {
    display: block;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    font-size: 0.62rem;
    line-height: 1.1;
}

.top-review-carousel .carousel-control-prev,
.top-review-carousel .carousel-control-next {
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    opacity: 0.78;
}

.top-review-carousel .carousel-control-prev:hover,
.top-review-carousel .carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.88);
    opacity: 0.95;
}

.top-review-carousel .carousel-control-prev-icon,
.top-review-carousel .carousel-control-next-icon {
    filter: invert(45%);
}

@media (max-width: 768px) {
    .top-review-card-body {
        min-height: 172px;
    }
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 3px solid #ff8400;
    outline-offset: 2px;
}


.page-header-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.page-header-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.page-subtitle {
    margin-top: 0.35rem;
    color: var(--theme-secondary, #6c757d);
    font-size: 0.95rem;
}

/* theme-tokens.css ya manda todo a:not(.btn) al acento legible, pero este enlace
   se lo saltea porque site.css lo pisa después con la marca cruda. */
.page-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--theme-brand-accent, var(--theme-primary, #9ed0c5));
    text-decoration: none;
    font-weight: 500;
}

.page-back-link:hover,
.page-back-link:focus {
    color: var(--theme-brand-accent, var(--theme-primary, #9ed0c5));
    text-decoration: underline;
}

.page-header-bar .page-subtitle,
.page-header-bar .text-secondary,
.page-header-bar .form-text,
.page-header-bar .small.text-muted,
.page-header-bar small.text-muted,
.page-header-bar p.text-muted {
    color: var(--theme-secondary, #6c757d) !important;
}

.settings-card {
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.22);
    border-radius: var(--theme-radius-lg, 20px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
    overflow: hidden;
    background: var(--theme-surface, #fff);
    color: var(--theme-on-surface, #1f2937);
}

.settings-card .card-body {
    padding: var(--theme-card-body-padding, 1.5rem);
}

.settings-card__header {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.14);
    color: var(--theme-quaternary, #343a40);
    border-bottom: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.28);
    font-weight: 600;
}

.settings-card__header i {
    color: var(--theme-primary, #9ed0c5);
}

.page-section {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.panel-card {
    background: var(--theme-surface, #fff);
    color: var(--theme-on-surface, #1f2937);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
    border-radius: var(--theme-radius-md, 14px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
    overflow: hidden;
}

.panel-card__body {
    padding: clamp(1rem, 1.6vw, var(--theme-card-body-padding, 1.5rem));
}

/* Celda de ruta en tablas de logs (rate limiting, accesos a archivos): las rutas de
   los escaneos son largas y sin espacios, así que sin tope rompen la tabla entera. */
.panel-table__path {
    max-width: 320px;
}

/* IP en tablas de logs. El <code> de Bootstrap trae un rosa fijo (#d63384) que da
   4,0:1 sobre la superficie oscura y 4,2:1 sobre la clara: debajo de AA en los DOS
   modos, y encima en el dato que más se escanea de estas tablas. Se toma el color
   del tema y se conserva la monoespaciada, que es lo que hace legible una IP. */
.panel-table__ip {
    color: var(--theme-on-surface, #1b1f27);
    font-family: var(--bs-font-monospace, ui-monospace, SFMono-Regular, Menlo, monospace);
}

/* ===========================================================================
   Modo oscuro — superficies con fondo claro hardcodeado (#fff).
   El dark mode se construyó parche por parche y muchas superficies del
   workspace/admin no se adaptaban: el fondo quedaba claro mientras el texto
   (vía tokens) se volvía claro → ilegible. Acá se retargetean a la superficie
   del tema. SCOPE SOLO MODO OSCURO → el modo claro queda intacto. */
body.theme-mode-dark :is(
    .course-editor__surface,
    .teacher-modal .teacher-panel,
    .student-dashboard .student-priority-section,
    .student-dashboard .student-priority-chip,
    .student-updates,
    .student-update-item,
    .student-kpi-item,
    .subscription-workbench-form[data-editor-mode="edit"] .accordion-item[data-class] .accordion-button,
    .subscription-workbench-form[data-editor-mode="edit"] .subscription-content-settings,
    .ed-hdr,
    .ed-sec,
    .ed-stats-bar,
    .event-detail-modal-body,
    .event-detail-modal--professor .event-detail-modal-content,
    .bg-white
) {
    background-color: var(--theme-surface) !important;
    border-color: rgba(255, 255, 255, 0.12);
}

body.theme-mode-dark .bg-light {
    background-color: var(--theme-surface-2) !important;
}

/* Texto genérico legible dentro de esas superficies (pisa hex oscuros
   hardcodeados como #1f3d32 / #4a4845 / #6f7d76). No toca botones ni badges. */
body.theme-mode-dark :is(
    .course-editor__surface,
    .teacher-modal .teacher-panel,
    .student-dashboard,
    .student-updates,
    .ed-hdr,
    .ed-sec,
    .event-detail-modal-body,
    .event-detail-modal-content
) :is(h1, h2, h3, h4, h5, h6, p, span, small, label, li, dt, dd, strong, th, td, .card-title, .card-text):not([class*="text-"]):not(.badge):not(.btn) {
    color: var(--theme-on-surface) !important;
}

body.theme-mode-dark :is(
    .student-dashboard,
    .student-updates,
    .ed-sec,
    .course-editor__surface
) :is(.text-muted, .text-secondary, small.text-muted, .form-text) {
    color: var(--theme-on-surface-muted) !important;
}

.panel-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.panel-filters > [class^="col-"],
.panel-filters > [class*=" col-"] {
    width: auto;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.panel-filters .form-control,
.panel-filters .form-select {
    min-height: calc(2.35rem + 2px);
}

.panel-filters .form-control,
.panel-filters .form-select,
.panel-filters .btn {
    width: 100%;
}

.panel-filters__actions {
    min-width: 9rem;
}

.panel-filters__actions .btn {
    min-height: calc(2.35rem + 2px);
}

.students-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--theme-surface);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.22);
    border-radius: var(--theme-radius-md, 14px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
}

.students-actions-title {
    width: 100%;
    margin-bottom: 0.1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--theme-text-muted, #6b7280);
}

.students-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.6rem 1rem;
    border-radius: var(--theme-radius-sm, 8px);
    border: 1.5px solid var(--theme-primary, #3aaa8a);
    /* La marca CRUDA como texto sobre superficie no llega a 4.5:1 (daba 3.06:1 con
       marcas claras). --theme-brand-accent es la misma marca ya reforzada por
       contraste que calcula el servidor. El borde sí puede seguir en la cruda. */
    color: var(--theme-brand-accent, var(--theme-primary, #3aaa8a));
    background: var(--theme-surface);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.students-action-btn:hover,
.students-action-btn:focus-visible {
    /* En hover el fondo pasa a ser la marca: el texto va al on-primary que el
       servidor calculó para ese fondo, nunca #fff fijo. */
    background: var(--theme-primary-strong, var(--theme-primary, #3aaa8a));
    border-color: var(--theme-primary-strong, var(--theme-primary, #3aaa8a));
    color: var(--theme-on-primary, #fff);
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .students-actions-bar {
        padding: 0.9rem;
        gap: 0.6rem;
    }

    .students-action-btn {
        width: 100%;
        justify-content: flex-start;
        font-size: 0.88rem;
    }
}

/* !important: si no, gana la regla global de íconos FA (site.css ~301). */
.review-star-icon {
    color: var(--theme-star-color, #f4b400) !important;
}

.panel-table {
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
    border-radius: var(--theme-radius-sm, 8px);
    overflow: hidden;
}

.table-responsive.panel-table {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-responsive.panel-table .table {
    min-width: 720px;
}
.table-responsive.panel-table.licensing-tenant-grid-scroll {
    touch-action: pan-x;
    overscroll-behavior-x: contain;
}

/* ── Messages: card layout on mobile ───────────────────────────────────── */
@media (max-width: 767.98px) {
    .messages-table-responsive {
        overflow-x: visible !important;
    }

    .messages-table-responsive .table {
        min-width: 0 !important;
    }

    .messages-table-responsive .table thead {
        display: none;
    }

    .messages-table-responsive .table tbody tr {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        gap: 0.15rem 0.5rem;
        padding: 0.65rem 0.75rem;
        border-bottom: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
        align-items: center;
    }

    .messages-table-responsive .table tbody tr:last-child {
        border-bottom: 0;
    }

    /* checkbox: col 1, rows 1-2 */
    .messages-table-responsive .table tbody td.msg-col-check {
        grid-column: 1;
        grid-row: 1 / 3;
        display: flex;
        align-items: center;
        padding: 0;
        border: 0;
    }

    /* sender/recipient: col 2, row 1 */
    .messages-table-responsive .table tbody td.msg-col-from {
        grid-column: 2;
        grid-row: 1;
        font-weight: 600;
        font-size: 0.88rem;
        padding: 0;
        border: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* subject: col 2, row 2 */
    .messages-table-responsive .table tbody td.msg-col-subject {
        grid-column: 2;
        grid-row: 2;
        font-size: 0.84rem;
        padding: 0;
        border: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* date: col 3, rows 1-2 */
    .messages-table-responsive .table tbody td.msg-col-date {
        grid-column: 3;
        grid-row: 1 / 3;
        font-size: 0.75rem;
        color: var(--theme-secondary, #6c757d);
        text-align: right;
        padding: 0;
        border: 0;
        white-space: nowrap;
        align-self: center;
    }

    /* toolbar: wrap nicely on small screens */
    .messages-client-grid .client-grid__toolbar {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .messages-client-grid .client-grid__size-wrap {
        margin-left: 0;
    }
}
/* ─────────────────────────────────────────────────────────────────────── */


.panel-table .table {
    margin-bottom: 0;
}

.panel-table .table thead th {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.12);
    color: var(--theme-quaternary, #343a40);
    border-bottom: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.22);
    font-weight: 600;
}

.panel-table .table tbody tr:last-child td {
    border-bottom: 0;
}

.panel-table .table tbody td {
    vertical-align: middle;
}


/* Inbox + panel tables should use palette text, not hard black */
.messages-inbox-page .panel-table .table,
.messages-inbox-page .panel-table .table tbody td,
.messages-inbox-page .panel-table .table tbody td a,
.messages-inbox-page .panel-table .table tbody td strong,
.messages-inbox-page .panel-table .table tbody tr {
    color: var(--theme-on-background, var(--theme-quaternary, #343a40));
}

.messages-inbox-page .panel-table .table tbody td a {
    text-decoration-color: rgba(var(--theme-on-background-rgb, 52, 58, 64), 0.5);
}

.messages-inbox-page .panel-table .table tbody tr:hover {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.1);
}


.requests-page__tab-content > .tab-pane,
.requests-page__tab-content .panel-card__body > .tab-pane {
    display: none;
}

.requests-page__tab-content > .active,
.requests-page__tab-content .panel-card__body > .active {
    display: block;
}

.client-grid {
    display: grid;
    gap: 0.85rem;
}

.client-grid__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.client-grid__toolbar .grid-count {
    color: var(--theme-secondary, #6c757d);
}

.client-grid__size-wrap {
    margin-left: auto;
}

.client-grid .grid-size {
    width: 6.5rem !important;
    min-width: 6.5rem;
    padding-right: 2rem;
}


.login-spinner {
    display: none;
}

.login-ip-map {
    height: 300px;
    display: none;
}



/* Enable content page typography in palette colors */
.enable-content-page,
.enable-content-page .accordion-button,
.enable-content-page .accordion-button:not(.collapsed),
.enable-content-page .accordion-body,
.enable-content-page .form-check-label,
.enable-content-page .accordion-item,
.enable-content-page .accordion-header,
.enable-content-page h4,
.enable-content-page li,
.enable-content-page label {
    color: var(--theme-on-background, var(--theme-quaternary, #343a40));
}

.enable-content-page .accordion-button::after {
    filter: brightness(0) saturate(100%) opacity(0.85);
}

.client-grid__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.45rem;
}

.panel-card__header {
    padding: 0.85rem 1.2rem;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.14);
    border-bottom: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.24);
    color: var(--theme-quaternary, #343a40);
    font-weight: 600;
}

.panel-form {
    display: grid;
    gap: 1rem;
}

.panel-form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-quaternary, #343a40);
    margin-bottom: 0;
}

.panel-form-help {
    color: var(--theme-secondary, #6c757d);
    font-size: 0.88rem;
}

.panel-form .form-label {
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.panel-form .text-danger.small {
    display: block;
    margin-top: 0.3rem;
}

.panel-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
    border-top: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.panel-form-actions .btn {
    min-width: 9.5rem;
}

.panel-form-actions .btn:focus-visible,
.panel-form .form-control:focus-visible,
.panel-form .form-select:focus-visible,
.panel-form .form-check-input:focus-visible {
    outline-color: var(--theme-focus-ring-color, #0ea5e9);
}

.table-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: var(--theme-radius-sm, 8px);
    background: var(--theme-surface);
    border-width: 1px;
    border-style: solid;
}

.table-action-btn--warning {
    color: #b7791f;
    border-color: #f6ad55;
}

.table-action-btn--danger {
    color: var(--theme-danger, #dc3545);
    border-color: rgba(var(--theme-danger-rgb, 220, 53, 69), 0.65);
}

.table-action-btn--info {
    color: #0dcaf0;
    border-color: rgba(13, 202, 240, 0.7);
}

.table-action-btn--primary {
    color: var(--theme-primary, #9ed0c5);
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.7);
}

.table-action-btn--secondary {
    color: var(--theme-secondary, #6c757d);
    border-color: rgba(108, 117, 125, 0.6);
}

.table-action-btn--neutral {
    color: var(--theme-quaternary, #343a40);
    border-color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.5);
}

.table-action-btn--warning:hover,
.table-action-btn--warning:focus {
    background: rgba(246, 173, 85, 0.18);
    color: #8b5e1a;
}

.table-action-btn--danger:hover,
.table-action-btn--danger:focus {
    background: rgba(var(--theme-danger-rgb, 220, 53, 69), 0.14);
    color: var(--theme-danger, #dc3545);
}

.table-action-btn--info:hover,
.table-action-btn--info:focus {
    background: rgba(13, 202, 240, 0.14);
    color: #0dcaf0;
}

.table-action-btn--primary:hover,
.table-action-btn--primary:focus {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.22);
    color: var(--theme-primary, #9ed0c5);
}

.table-action-btn--secondary:hover,
.table-action-btn--secondary:focus,
.table-action-btn--neutral:hover,
.table-action-btn--neutral:focus {
    background: rgba(0, 0, 0, 0.06);
}

.teacher-table-readable th,
.teacher-table-readable td {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

@media (max-width: 768px) {
    .student-kpi-strip {
        grid-template-columns: 1fr 1fr;
    }

    .student-kpi-item-wide {
        grid-column: span 2;
    }
}

.status-pill {
    border-radius: 999px;
    font-weight: 600;
    text-transform: lowercase;
    padding: 0.32rem 0.7rem;
    letter-spacing: 0.01em;
}

.status-pill-green {
    background-color: #198754 !important;
    color: #fff !important;
}

.status-pill-yellow {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.status-pill-red {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.status-pill-gray {
    background-color: #6c757d !important;
    color: #fff !important;
}

.save-action-btn {
    margin-left: auto;
}

.save-action-container {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.app-popup-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cancelled-subscription-reason {
    padding: 0.75rem;
    border-left: 3px solid #d870ad;
    background-color: #faf3f8;
    color: #8a3d69;
    font-style: italic;
}

.client-grid .grid-prev,
.client-grid .grid-next {
    background-color: var(--theme-primary, #9ed0c5);
    border-color: var(--theme-primary, #9ed0c5);
    color: #fff;
}

.client-grid .grid-prev:disabled,
.client-grid .grid-next:disabled {
    background-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.55);
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.55);
    color: #fff;
}

.tenant-manage-link {
    color: var(--theme-primary, #9ed0c5);
    text-decoration: underline;
    font-weight: 600;
}

.tenant-manage-link:hover,
.tenant-manage-link:focus {
    color: color-mix(in srgb, var(--theme-primary, #9ed0c5) 78%, #1f2937);
}

.licensing-tenant-mobile-list {
    display: none;
}

.licensing-tenant-mobile-card {
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
    border-radius: 0.85rem;
    padding: 1rem;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.licensing-tenant-mobile-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.licensing-tenant-mobile-card__title-wrap {
    min-width: 0;
}

.licensing-tenant-mobile-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--theme-on-surface);
}

.licensing-tenant-mobile-card__subtitle {
    color: #374151;
    font-size: 1rem;
    margin-top: 0.15rem;
    word-break: break-word;
}

.licensing-tenant-mobile-card__status {
    flex-shrink: 0;
}

.licensing-tenant-mobile-card__content {
    margin-top: 0.9rem;
    padding: 0.8rem;
    border-radius: 0.7rem;
    background: rgba(15, 23, 42, 0.04);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 0.8rem;
}

.licensing-tenant-mobile-card__field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.licensing-tenant-mobile-card__field--block {
    grid-column: 1 / -1;
}

.licensing-tenant-mobile-card__label {
    color: #6b7280;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.licensing-tenant-mobile-card__value {
    color: var(--theme-on-surface);
    font-size: 1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.licensing-tenant-mobile-card__actions {
    margin-top: 0.9rem;
    display: flex;
}

.licensing-tenant-mobile-card__edit-btn {
    width: 100%;
    border-radius: 0.6rem;
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.6);
    background: #facc15;
    color: var(--theme-on-surface);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.62rem 0.8rem;
}

.licensing-tenant-mobile-card__edit-btn:hover,
.licensing-tenant-mobile-card__edit-btn:focus {
    background: #fbbf24;
    color: var(--theme-on-surface);
}

.licensing-tenant-mobile-modal-body {
    display: grid;
    gap: 0.65rem;
}

.licensing-tenant-mobile-modal-field {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.licensing-tenant-mobile-modal-label {
    color: #6c757d;
}

@media (max-width: 991.98px) {
    .licensing-tenants-grid .panel-table {
        display: none !important;
    }

    .licensing-tenants-grid .licensing-tenant-mobile-list {
        display: grid;
        gap: 0.85rem;
    }

    .licensing-tenants-grid .client-grid__size-wrap {
        display: none;
    }

    .licensing-tenants-grid .client-grid__pagination {
        display: none;
    }

    .licensing-tenants-grid .client-grid__toolbar {
        margin-bottom: 0.6rem;
    }
}

.u-max-w-600 {
    max-width: 600px;
}

.u-h-180-cover {
    height: 180px;
    object-fit: cover;
}

.monitoring-health-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.4rem;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.monitoring-health-dot--ok {
    background-color: var(--theme-success, #198754);
}

.monitoring-health-dot--warn {
    background-color: #f1c40f;
}

.monitoring-health-dot--bad {
    background-color: var(--theme-danger, #dc3545);
}

.seminars-course-link {
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.seminars-course-link:hover {
    background-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.08);
}

.seminars-completed-course {
    background-color: #e9ecef;
}

.design-page {
    padding: 2.5rem 0 3.5rem;
}

.design-page #designSettingsForm {
    margin-bottom: 0;
}

.design-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.design-hero__subtitle {
    max-width: 480px;
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.72);
    font-size: 1rem;
    margin: 0.35rem 0 0;
}

.design-card {
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.25);
    border-radius: var(--theme-radius-lg, 20px);
    background: rgba(var(--theme-tertiary-rgb, 248, 249, 250), 0.92);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
    height: 100%;
}

.design-card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1.75rem 1rem;
    border-bottom: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.25);
}

.design-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--theme-primary, #9ed0c5);
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.16);
}

.design-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--theme-quaternary, #343a40);
}

.design-card__body {
    padding: 1.5rem 1.75rem 1.75rem;
}

.design-settings-columns {
    display: grid;
    gap: 1.1rem;
}

.design-settings-columns--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.design-settings-column {
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
    border-radius: 14px;
    background: rgba(var(--theme-background-rgb, 255, 245, 247), 0.85);
    padding: 1rem;
}

.design-settings-column__title {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.62);
}

.design-helper--panel {
    margin: 0;
    line-height: 1.55;
}

.design-footer-sections-list {
    display: grid;
    gap: 0.6rem;
}

.design-footer-sections-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
    background: var(--theme-surface);
    color: var(--theme-quaternary, #343a40);
    font-size: 0.92rem;
    font-weight: 500;
}

.design-footer-sections-item span {
    color: #2f3a44;
}

.design-footer-sections-item .form-check-input {
    margin-top: 0;
    cursor: pointer;
}

.design-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--theme-quaternary, #343a40);
}

.design-input,
.design-input:focus {
    border-radius: 14px;
    border: 1px solid var(--theme-control-border);
    background: var(--theme-control-bg);
    padding: 0.7rem 0.95rem;
    font-size: 0.95rem;
    box-shadow: none;
    color: var(--theme-control-text);
}

.design-input:focus {
    border-color: var(--theme-control-border-focus);
    background: var(--theme-control-bg-focus);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 158, 208, 197), 0.22);
}

.design-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.design-color-picker {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--theme-control-border);
    border-radius: 13px;
    background: var(--theme-control-bg);
}

.design-helper {
    font-size: 0.82rem;
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.72);
    margin-top: 0.35rem;
    display: block;
}

.design-tooltip {
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.72);
    font-size: 0.85rem;
}

.design-tooltip:hover {
    color: var(--theme-primary, #9ed0c5);
}

.design-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.design-footer--inline {
    margin-top: 1rem;
}

.design-footer--page {
    justify-content: center;
    margin-top: 2rem;
}

.design-settings-alert {
    border-radius: 14px;
    margin-bottom: 1rem;
}

.design-banner-selection-status {
    font-weight: 600;
    color: rgba(var(--theme-success-rgb, 25, 135, 84), 0.95);
}

.design-save-btn {
    border-radius: var(--theme-radius-md, 14px);
    padding: 0.85rem 2.5rem;
    font-weight: 600;
    border: none;
    box-shadow: var(--theme-shadow-2, 0 8px 24px rgba(0, 0, 0, 0.15));
}

.design-save-btn i {
    color: #fff;
}

.design-save-btn:hover,
.design-save-btn:focus {
    background-color: var(--theme-primary, #9ed0c5);
    border-color: var(--theme-primary, #9ed0c5);
    color: #ffffff;
}

.design-save-btn:active {
    transform: translateY(0);
}

.design-page .form-control-color {
    padding: 0.1rem;
}

.design-page .row {
    margin-left: 0;
    margin-right: 0;
}

.design-page .col {
    padding-left: 0;
    padding-right: 0;
}

.design-card-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.design-contrast-warning {
    margin-top: 0.75rem;
    border-radius: 13px;
    padding: 0.75rem 0.9rem;
    border: 1px solid #f59e0b;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.85rem;
    display: none;
}

.design-card--fullwidth {
    width: 100%;
    height: auto;
    min-height: 0;
}

.design-hero-carousel-shell {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
}

.design-hero-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(360px, 40%);
    gap: 0.9rem;
    overflow-x: auto;
    padding: 0.3rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
}

.design-hero-carousel::-webkit-scrollbar {
    height: 8px;
}

.design-hero-carousel::-webkit-scrollbar-thumb {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.45);
    border-radius: 999px;
}

.design-hero-nav {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.45);
    background: var(--theme-surface);
    color: var(--theme-primary, #9ed0c5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--theme-shadow-1, 0 4px 12px rgba(15, 23, 42, 0.08));
}

.design-hero-nav:hover,
.design-hero-nav:focus-visible {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.14);
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.7);
}

.design-hero-slide {
    position: relative;
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.25);
    border-radius: 16px;
    background: #f8fafc;
    padding: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 25.2rem;
    scroll-snap-align: center;
}

.design-hero-slide.is-selected {
    border-color: rgba(var(--theme-success-rgb, 25, 135, 84), 0.7);
    box-shadow: 0 0 0 3px rgba(var(--theme-success-rgb, 25, 135, 84), 0.18);
}

.design-hero-select {
    position: absolute;
    top: 0.95rem;
    right: 0.95rem;
    z-index: 4;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
    border-radius: 999px;
    font-size: 0.72rem;
    padding: 0.25rem 0.7rem;
    backdrop-filter: blur(4px);
}


.design-hero-select.is-selected {
    background: rgba(var(--theme-success-rgb, 25, 135, 84), 0.9);
    border-color: rgba(255, 255, 255, 0.78);
}
.design-hero-preview {
    height: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    padding: 0.85rem 0.9rem !important;
}

.design-hero-palette {
    margin-top: 0.55rem;
    min-height: 10rem;
    padding: 0.5rem 0.55rem;
    border-radius: 13px;
    background: #151922;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.design-hero-artwork-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.design-hero-artwork-field {
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.24);
    border-radius: 12px;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.55);
}

.design-hero-artwork-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    margin-bottom: 0.65rem;
    overflow: hidden;
    border: 1px dashed rgba(var(--theme-primary-rgb, 158, 208, 197), 0.55);
    border-radius: 10px;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.08);
    color: rgba(15, 23, 42, 0.48);
    cursor: default;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.design-hero-artwork-thumb img {
    width: 100%;
    height: 100%;
    display: none;
    object-fit: cover;
}

.design-hero-artwork-thumb.has-image {
    border-style: solid;
    cursor: zoom-in;
}

.design-hero-artwork-thumb.has-image:hover,
.design-hero-artwork-thumb.has-image:focus-visible {
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.9);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.design-hero-artwork-thumb:focus-visible {
    outline: 3px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.32);
    outline-offset: 3px;
}

.design-hero-artwork-thumb.has-image img {
    display: block;
}

.design-hero-artwork-thumb.has-image span {
    display: none;
}

.design-artwork-preview-modal .modal-content {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.22);
}

.design-artwork-preview-modal .modal-header {
    padding: 0.9rem 1rem;
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

.design-artwork-preview-modal .modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: #25313f;
}

.design-artwork-preview-modal .modal-body {
    padding: 0.85rem;
}

.design-artwork-preview-modal__image {
    width: 100%;
    max-height: min(76vh, 760px);
    object-fit: contain;
    display: block;
    border-radius: 8px;
    background: #f8fafc;
}

.design-hero-palette__title {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.4rem;
}

.design-hero-palette__presets {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.52rem;
}

.design-hero-preset-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    color: #e6edf5;
    font-size: 0.64rem;
    padding: 0.18rem 0.5rem;
}

.design-hero-preset-btn.is-active {
    border-color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.14);
}

.design-hero-preset-swatches {
    display: inline-flex;
    margin-right: 0.28rem;
    gap: 0.16rem;
    vertical-align: middle;
}

.design-hero-preset-swatch {
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.design-hero-palette__custom {
    display: flex;
    align-items: center;
    justify-content: center;
}

.design-hero-custom-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    color: #e6edf5;
    font-size: 0.64rem;
    padding: 0.18rem 0.5rem;
    flex-wrap: wrap;
    cursor: pointer;
}

.design-hero-custom-badge.is-active {
    border-color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.14);
}

.design-hero-custom-badge__label {
    font-weight: 600;
    cursor: pointer;
}

.design-hero-custom-badge input[type="color"] {
    flex: 0 0 auto;
    width: 0.95rem;
    height: 0.95rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
}

.design-hero-custom-badge input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.design-hero-custom-badge input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.design-hero-custom-badge input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.design-hero-live-preview-shell {
    border: 1px dashed rgba(var(--theme-primary-rgb, 158, 208, 197), 0.7);
    border-radius: 14px;
    background: #0f172a;
    padding: 0.75rem;
}

.design-hero-live-preview {
    width: 100%;
}

.design-hero-modal-preview {
    width: 100%;
    border-radius: 12px;
    min-height: 310px;
    padding: 2.2rem 1.6rem !important;
}

.design-hero-modal-preview .home-hero-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
}

.design-hero-modal-preview .lead {
    max-width: 640px;
    margin-inline: auto;
}

.design-hero-preview .home-hero-badge {
    margin-bottom: 0.52rem;
    font-size: 0.62rem;
}

.design-hero-preview .home-hero-title {
    font-size: 1.18rem;
    line-height: 1.18;
    margin-bottom: 0.45rem !important;
}

.design-hero-preview p {
    font-family: var(--theme-font-body);
    color: var(--hero-subtle);
    font-size: 0.92rem;
    line-height: 1.35;
    margin-bottom: 0.62rem !important;
}

.design-hero-preview .home-hero-actions {
    gap: 0.38rem;
    flex-wrap: nowrap;
}

.design-hero-preview .home-hero-actions .btn {
    min-width: 0;
    flex: 1 1 0;
    width: auto;
    padding: 0.34rem 0.58rem;
    font-size: 0.72rem;
}


/* Extracted from SweetDreamsArte.Web/Views/TeacherNotifications/Index.cshtml */
/* Los alias locales de esta página nacieron con la paleta teal hardcodeada del
   mockup y no sobrevivían a los presets oscuros (tabs a 2.96:1, cards blancas).
   Ahora resuelven contra los tokens del tema: el resto del bloque queda igual y
   toda la sección de historial acompaña la paleta del tenant. */
.teacher-notifications-page {
        --warm-white: var(--theme-surface, #ffffff);
        --line: var(--theme-border, #e5e7eb);
        --teal: var(--theme-primary, #9ed0c5);
        --teal-light: var(--theme-success, #5eead4);
        --teal-dark: var(--theme-brand-accent, var(--theme-primary, #0f766e));
        --coral: var(--theme-danger, #ef4444);
        --text-dark: var(--theme-on-surface, #111827);
        --text-mid: var(--theme-on-surface, #4b5563);
        --text-light: var(--theme-on-surface-muted, #6b7280);
        --shadow: var(--theme-shadow-1, 0 20px 40px -30px rgba(15, 23, 42, 0.35));
        --radius: 20px;
        --radius-sm: 8px;
        padding-block: 2.2rem;
    }

    /* El formulario de crear aviso usaba acá su propio sistema de cards,
       dual-list e inputs con colores hardcodeados (teal/#fff/greys), que no
       sobrevivía a los presets oscuros. Desde 2026-07 comparte el diseño de
       Edit: ver wwwroot/css/teacher-notifications-edit.css (clases .tn-*).
       Lo que queda de este bloque es solo el HISTORIAL. */

    .preview-notification-card {
        margin: 0;
    }

    .teacher-notifications-page .historial-title {
        font-size: 32px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .teacher-notifications-page .historial-tabs {
        display: flex;
        gap: 4px;
        border-bottom: 1px solid var(--line);
        margin-bottom: 18px;
    }

    .teacher-notifications-page .tab-btn {
        padding: 8px 20px;
        border: 0;
        background: transparent;
        font-size: 13.5px;
        font-weight: 700;
        color: var(--text-light);
        border-bottom: 3px solid transparent;
        margin-bottom: -2px;
        border-radius: 6px 6px 0 0;
        display: inline-flex;
        align-items: center;
        gap: 7px;
    }

    .teacher-notifications-page .tab-btn.active {
        color: var(--theme-on-surface, #111827);
        border-bottom-color: var(--teal);
        background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.12);
    }

    .teacher-notifications-page .tab-badge {
        min-width: 20px;
        height: 20px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: 700;
        background: var(--theme-chip-bg, rgba(var(--theme-primary-rgb, 158, 208, 197), 0.16));
        color: var(--theme-on-surface, #111827);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding-inline: 6px;
    }

    .teacher-notifications-page .tab-btn.active .tab-badge {
        /* primary-strong + on-primary: el par con contraste garantizado para
           fondo de marca (la marca cruda no lo garantiza). */
        background: var(--theme-primary-strong, var(--theme-primary, #9ed0c5));
        color: var(--theme-on-primary, #fff);
    }

    .teacher-notifications-page .tab-panel {
        display: none;
    }

    .teacher-notifications-page .tab-panel.active {
        display: block;
    }

    .teacher-notifications-page .historial-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    .teacher-notifications-page .aviso-card {
        background: var(--warm-white);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        padding: 18px 20px;
        box-shadow: var(--shadow);
        position: relative;
        overflow: hidden;
    }

    .teacher-notifications-page .aviso-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--teal);
    }

    .teacher-notifications-page .aviso-card.evento::before {
        background: var(--coral);
    }

    .teacher-notifications-page .aviso-card.archived {
        opacity: 0.78;
        background: var(--theme-surface-2, #f5f5f0);
    }

    .teacher-notifications-page .aviso-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 10px;
    }

    .teacher-notifications-page .aviso-tag {
        width: 22px;
        height: 22px;
        border-radius: 6px;
        background: var(--theme-chip-bg, rgba(var(--theme-primary-rgb, 158, 208, 197), 0.16));
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        flex-shrink: 0;
    }

    .teacher-notifications-page .aviso-tag.evento {
        background: rgba(var(--theme-danger-rgb, 220, 53, 69), 0.16);
    }

    .teacher-notifications-page .aviso-titulo {
        font-size: 15px;
        font-weight: 700;
        color: var(--text-dark);
        flex: 1;
        line-height: 1.25;
    }

    .teacher-notifications-page .aviso-actions {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .teacher-notifications-page .aviso-actions form {
        margin: 0;
    }

    .teacher-notifications-page .aviso-meta,
    .teacher-notifications-page .aviso-mensaje {
        font-size: 12.5px;
        color: var(--text-mid);
        padding-left: 32px;
        margin-bottom: 8px;
    }

    .teacher-notifications-page .aviso-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding-left: 32px;
        padding-top: 10px;
        border-top: 1px solid var(--theme-border, #f3f4f6);
    }

    .teacher-notifications-page .aviso-fecha,
    .teacher-notifications-page .aviso-visto {
        font-size: 11.5px;
        color: var(--text-light);
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .teacher-notifications-page .visto-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgba(var(--theme-on-surface-rgb, 31, 41, 55), 0.3);
    }

    .teacher-notifications-page .visto-dot.leido {
        background: var(--teal-light);
    }

    .teacher-notifications-page .archived-label {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 11px;
        font-weight: 600;
        color: var(--theme-on-surface, #111827);
        background: rgba(var(--theme-on-surface-rgb, 31, 41, 55), 0.08);
        border: 1px solid var(--theme-border, #c5b8e8);
        border-radius: 20px;
        padding: 1px 8px;
        margin-left: 6px;
    }

    .teacher-notifications-page .empty-state {
        grid-column: 1 / -1;
        text-align: center;
        padding: 48px 24px;
        color: var(--text-light);
    }

    @media (max-width: 991px) {
        .teacher-notifications-page .historial-grid {
            grid-template-columns: 1fr;
        }
    }


/* Reviews shared styling (Courses/Info + Courses/Reviews).
   Dorado = rating. La estrella sin seleccionar va en dorado tenue para que
   llena/vacía se distingan por color además de por glifo (solid/regular). */
.rating-star {
    cursor: pointer;
    color: rgba(var(--theme-star-color-rgb, 244, 180, 0), 0.38) !important;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: color .15s ease, text-shadow .15s ease;
}

.rating-star.fa-solid,
.rating-star.is-hovered {
    color: var(--theme-star-color, #f4b400) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.reviews-summary-card {
    border: 1px solid rgba(var(--theme-secondary-rgb, 108, 117, 125), 0.35);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: var(--theme-tertiary, #f8f9fa);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.reviews-summary-score {
    color: var(--theme-primary, #9ed0c5);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.reviews-summary-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.72);
    font-weight: 600;
}

/* !important: si no, gana la regla global de íconos FA (site.css ~301). */
.reviews-summary-stars i {
    color: var(--theme-star-color, #f4b400) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

/* La vista pinta las 5 con fa-solid y marca las sobrantes con .is-empty:
   sin este color tenue, un 3.0 se veía igual que un 5.0. */
.reviews-summary-stars i.is-empty {
    color: rgba(var(--theme-star-color-rgb, 244, 180, 0), 0.3) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-review-toggle {
    background: var(--theme-primary, #9ed0c5);
    border: 2px solid rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.8);
    color: #fff;
    font-weight: 700;
    border-radius: 9px;
}

.btn-review-toggle:hover,
.btn-review-toggle:focus {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.92);
    color: #fff;
}

.add-review-card {
    border: 1px solid rgba(var(--theme-secondary-rgb, 108, 117, 125), 0.35);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.2rem;
    background: var(--theme-tertiary, #f8f9fa);
}

.add-review-card textarea.form-control {
    border-color: rgba(var(--theme-secondary-rgb, 108, 117, 125), 0.35);
    background: rgba(var(--theme-tertiary-rgb, 248, 249, 250), 0.9);
}

.btn-review-submit {
    width: 100%;
    background: var(--theme-primary, #9ed0c5);
    border-color: var(--theme-primary, #9ed0c5);
    color: #fff;
    font-weight: 700;
}

.btn-review-submit:hover {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.92);
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.92);
    color: #fff;
}

.review-card {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(var(--theme-tertiary-rgb, 248, 249, 250), 0.92);
    box-shadow: 0 4px 18px rgba(80, 30, 60, 0.09);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(80, 30, 60, 0.16);
}

.review-card-band {
    padding: 0.8rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(var(--theme-secondary-rgb, 108, 117, 125), 0.12);
}

.review-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.review-card-type {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    font-weight: 700;
    background: var(--theme-tertiary, #ffffff);
    color: var(--theme-quaternary, #343a40);
    border: 1px solid rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.18);
}

.review-card-date {
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.58);
    font-size: 0.68rem;
}

.review-card-title {
    color: var(--theme-quaternary, #343a40);
    line-height: 1.25;
    font-size: 1.02rem;
    margin: 0;
}

.review-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.85rem 0.95rem 0.95rem;
    min-height: 182px;
}

.review-stars {
    display: flex;
    gap: 0.15rem;
    color: var(--theme-star-color, #f4b400);
    text-shadow: 0 0 0.01px rgba(138, 101, 0, 0.35);
    font-size: 0.82rem;
}

/* !important: si no, gana la regla global de íconos FA (site.css ~301). */
.review-stars i {
    color: var(--theme-star-color, #f4b400) !important;
}

.review-comment {
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2em;
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.82);
    font-size: 0.86rem;
    line-height: 1.55;
}

.review-comment.expanded {
    display: block;
    overflow: visible;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(160, 100, 130, 0.2);
}

.review-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-primary, #9ed0c5), var(--theme-secondary, #6c757d));
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(var(--theme-primary-rgb, 158, 208, 197), 0.25);
}

.review-author-name {
    display: block;
    color: var(--theme-quaternary, #343a40);
    font-size: 0.9rem;
    line-height: 1.1;
    font-weight: 700;
}

.review-author-label {
    display: block;
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.58);
    font-size: 0.72rem;
    line-height: 1.1;
}

.review-more {
    color: var(--theme-primary, #9ed0c5);
    font-weight: 700;
    text-decoration: underline;
}

.review-more:hover,
.review-more:focus {
    color: var(--theme-secondary, #6c757d);
}

.review-vintage-card {
    border: 1px solid #e8dbc8;
    border-radius: 18px;
    overflow: hidden;
    background: #f5efe2;
    color: #1d1326;
    box-shadow: 0 10px 28px rgba(28, 18, 10, 0.14);
    height: 100%;
}

.review-vintage-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.review-vintage-card .review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.review-vintage-card .review-course {
    font-size: 1.35rem;
    line-height: 1.2;
}

.review-vintage-card .review-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #c3b79f;
    padding: 0.22rem 0.68rem;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    background: var(--theme-surface);
}

.review-vintage-card .review-date {
    color: #846f72;
    font-size: .95rem;
    white-space: nowrap;
}

/* Gana por especificidad a `.review-stars i`: si esta regla no se actualiza,
   dorar la base no cambia nada en Courses/Reviews (todas sus tarjetas son
   vintage). El fondo de la tarjeta es claro y fijo, así que el dorado no
   depende del modo. */
.review-vintage-card .review-stars i {
    color: var(--theme-star-color, #f4b400) !important;
}

.review-vintage-card .review-comment {
    color: #3e2345;
    margin-bottom: 0;
    min-height: 4.4rem;
}

.review-vintage-card .review-footer {
    border-top: 1px dashed #e3cfd8;
    padding-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: .55rem;
}

.review-vintage-card .review-footer-name {
    line-height: 1.1;
}

.review-vintage-card .review-footer-name strong {
    display: block;
    font-size: 1.08rem;
}

.review-vintage-card .review-footer-name span {
    color: #8f7d82;
    font-size: .9rem;
}

.review-vintage-card.review-vintage-card--pending {
    background: #f1f1f1;
}

.review-vintage-card.review-vintage-card--pending .review-pill {
    border-color: #cabfc1;
    color: #6f6c6c;
}

.review-vintage-card.review-vintage-card--rejected {
    background: #f9ecec;
}

.review-vintage-card.review-vintage-card--rejected .review-pill {
    border-color: #e4b5b5;
    color: #a04444;
}

.review-vintage-card.review-vintage-card--approved .review-pill {
    border-color: #e3bfd5;
    color: #6b2f63;
}

.review-comment-toggle {
    color: #6b2f63;
    font-weight: 700;
    text-decoration: underline;
    border: 0;
    background: transparent;
}

.review-comment-toggle:hover {
    color: #84457a;
}

.review-card-actions {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
}

.review-card-actions .btn {
    border-radius: 999px;
    padding: .35rem .95rem;
    line-height: 1.15;
}

.review-form-label {
    color: var(--theme-quaternary, #343a40);
}

.transfer-popup-body {
    white-space: pre-line;
}

@media (max-width: 576px) {
    .reviews-summary-card {
        flex-direction: column;
        align-items: stretch;
    }

    .reviews-summary-card > div {
        width: 100%;
    }

    .reviews-summary-card .d-flex {
        flex-wrap: wrap;
        align-items: center;
        row-gap: 0.5rem;
    }

    .reviews-summary-stars {
        display: inline-flex;
        gap: 0.2rem;
        white-space: nowrap;
    }

    .btn-review-toggle {
        width: 100%;
        white-space: normal;
    }
}


/* Dashboards (admin/profesor) */
.dashboard-kpi-grid {
    row-gap: 0.25rem;
}

.dashboard-card {
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    min-height: 180px;
    height: 100%;
    border-radius: var(--theme-radius-md, 14px);
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.22);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
}

.dashboard-card:hover {
    background-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.12);
}

.dashboard-card,
.dashboard-card:hover,
.dashboard-card:focus,
.dashboard-card:focus-visible,
.dashboard-card:active {
    color: var(--theme-text-body-on-surface, var(--theme-on-tertiary, #1f2937)) !important;
    text-decoration: none;
}

.dashboard-card h1,
.dashboard-card h2,
.dashboard-card h3,
.dashboard-card h4,
.dashboard-card h5,
.dashboard-card h6 {
    color: var(--theme-text-title-on-surface, var(--theme-on-tertiary, #1f2937)) !important;
}

.dashboard-card p,
.dashboard-card span,
.dashboard-card small,
.dashboard-card .mb-0,
.dashboard-card .mb-1,
.dashboard-card .mb-2 {
    color: var(--theme-text-body-on-surface, var(--theme-on-tertiary, #1f2937)) !important;
}

/* Dashboard card link containers often carry bootstrap text utility classes */
.dashboard-card.text-dark,
.dashboard-card.text-black,
.dashboard-card.text-body,
.panel-card.dashboard-card.text-dark,
.panel-card.dashboard-card.text-black,
.panel-card.dashboard-card.text-body {
    color: var(--theme-on-tertiary, #1f2937) !important;
}


.teacher-notifications-page .aviso-card,
.teacher-notifications-page .tab-btn.active {
    border-radius: var(--theme-radius-md, 14px);
}

.teacher-notifications-page .aviso-card {
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
}

.reviews-page .reviews-summary-card,
.reviews-page .add-review-card {
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.28);
    border-radius: var(--theme-radius-md, 14px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
}

.reviews-page .review-form-label {
    color: var(--theme-secondary, #6c757d);
}


/* Theme-consistent surfaces for custom card containers */
.settings-card,
.panel-card,
.dashboard-card,
.teacher-notifications-page .card-panel,
.teacher-notifications-page .aviso-card,
.reviews-summary-card,
.add-review-card {
    background: rgba(var(--theme-tertiary-rgb, 248, 249, 250), 0.94);
    color: var(--theme-on-tertiary, #1f2937);
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.24);
}

.settings-card .card-title,
.panel-card .card-title,
.dashboard-card .card-title,
.teacher-notifications-page .card-title,
.teacher-notifications-page .aviso-title,
.reviews-summary-card .card-title,
.add-review-card .card-title,
.settings-card .fw-semibold,
.panel-card .fw-semibold,
.dashboard-card .fw-semibold,
.teacher-notifications-page .fw-semibold,
.reviews-summary-card .fw-semibold,
.add-review-card .fw-semibold {
    color: var(--theme-on-tertiary, #1f2937);
}

.settings-card .text-muted,
.panel-card .text-muted,
.dashboard-card .text-muted,
.teacher-notifications-page .text-muted,
.reviews-summary-card .text-muted,
.add-review-card .text-muted {
    color: rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.72) !important;
}

/* Normalize bootstrap text helpers inside card-like surfaces */
.card .text-dark,
.card .text-black,
.card .text-body,
.settings-card .text-dark,
.settings-card .text-black,
.settings-card .text-body,
.panel-card .text-dark,
.panel-card .text-black,
.panel-card .text-body,
.dashboard-card .text-dark,
.dashboard-card .text-black,
.dashboard-card .text-body,
.teacher-notifications-page .card-panel .text-dark,
.teacher-notifications-page .card-panel .text-black,
.teacher-notifications-page .card-panel .text-body,
.teacher-notifications-page .aviso-card .text-dark,
.teacher-notifications-page .aviso-card .text-black,
.teacher-notifications-page .aviso-card .text-body,
.reviews-summary-card .text-dark,
.reviews-summary-card .text-black,
.reviews-summary-card .text-body,
.add-review-card .text-dark,
.add-review-card .text-black,
.add-review-card .text-body {
    color: var(--theme-on-tertiary, #1f2937) !important;
}

.card .text-secondary,
.settings-card .text-secondary,
.panel-card .text-secondary,
.dashboard-card .text-secondary,
.teacher-notifications-page .card-panel .text-secondary,
.teacher-notifications-page .aviso-card .text-secondary,
.reviews-summary-card .text-secondary,
.add-review-card .text-secondary {
    color: rgba(var(--theme-on-tertiary-rgb, 31, 41, 55), 0.82) !important;
}


#editUserModal .modal-dialog {
    max-width: 760px;
}

#editUserModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#editUserModal .edit-user-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

#editUserModal .field-full {
    grid-column: 1 / -1;
}

.user-toggle-btn {
    min-width: 46px;
    padding: 0.2rem 0.45rem;
}

.user-toggle-indicator {
    width: 36px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.35);
    display: inline-flex;
    align-items: center;
    padding: 2px;
    transition: background-color .2s ease, border-color .2s ease;
}

.user-toggle-indicator .user-toggle-knob {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
    transform: translateX(0);
    transition: transform .2s ease;
}

.user-toggle-btn[data-user-active="true"] .user-toggle-indicator {
    background: #198754;
    border-color: #198754;
}

.user-toggle-btn[data-user-active="true"] .user-toggle-knob {
    transform: translateX(15px);
}

.user-toggle-btn[data-user-active="false"] .user-toggle-indicator {
    background: #dc3545;
    border-color: #dc3545;
}

@media (max-width: 767.98px) {
    #editUserModal .edit-user-grid {
        grid-template-columns: 1fr;
    }
}

/* Session device event detail modal (admin) */
#eventDetailModal {
    --event-primary: var(--theme-primary, #9ed0c5);
    --event-primary-rgb: var(--theme-primary-rgb, 158, 208, 197);
    --event-secondary: var(--theme-secondary, #d4a4b8);
    --event-secondary-rgb: var(--theme-secondary-rgb, 212, 164, 184);
    --event-tertiary: var(--theme-tertiary, #f3c178);
    --event-tertiary-rgb: var(--theme-tertiary-rgb, 243, 193, 120);
    --event-teal-light: rgba(var(--event-primary-rgb), 0.14);
    --event-teal-mid: rgba(var(--event-primary-rgb), 0.38);
    --event-yellow: rgba(var(--event-tertiary-rgb), 0.45);
    --event-yellow-light: rgba(var(--event-tertiary-rgb), 0.15);
    --event-yellow-dark: var(--event-tertiary);
    --event-red-light: rgba(var(--event-secondary-rgb), 0.14);
    --event-red-mid: rgba(var(--event-secondary-rgb), 0.42);
    --event-surface: #ffffff;
    --event-surface-2: #ffffff;
    --event-border: rgba(var(--event-primary-rgb), 0.3);
    --event-border-dark: rgba(var(--event-primary-rgb), 0.5);
    --event-text: #21353a;
    --event-text-mid: rgba(var(--event-primary-rgb), 0.9);
    --event-text-muted: rgba(var(--event-primary-rgb), 0.75);
    --event-sans: "Nunito Sans", "Segoe UI", sans-serif;
    --event-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.event-detail-modal-content {
    border: 1.5px solid var(--event-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(var(--event-primary-rgb), 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
    font-family: var(--event-sans);
}

.event-detail-modal-header {
    border-bottom: 1.5px solid var(--event-border);
    background: linear-gradient(180deg, rgba(var(--event-primary-rgb), 0.09) 0%, #ffffff 100%);
}

.event-detail-modal-title,
#eventDetailBody,
#eventDetailBody .badge,
#eventDetailBody .list-group-item {
    font-family: var(--event-sans);
    color: var(--event-text-mid);
}

.event-detail-modal-title {
    color: var(--event-text);
    font-weight: 800;
    letter-spacing: -0.2px;
}

.event-detail-modal-body {
    background: var(--theme-surface);
}

.event-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.event-detail-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.event-detail-icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.75rem;
    background: var(--event-teal-light);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
}

.event-detail-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--event-text);
}

.event-detail-code {
    font-family: var(--event-mono);
    font-size: 0.65rem;
    color: var(--event-text-muted);
}

.event-detail-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.3rem;
}

.badge.event-tone-info {
    background: rgba(var(--event-primary-rgb, 158, 208, 197), 0.28);
    color: var(--theme-primary-strong, #2f6f66);
    border: 1px solid rgba(var(--event-primary-rgb, 158, 208, 197), 0.82);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.badge.event-tone-warning {
    background: rgba(var(--event-tertiary-rgb, 243, 193, 120), 0.3);
    color: var(--theme-tertiary-strong, #8e6117);
    border: 1px solid rgba(var(--event-tertiary-rgb, 243, 193, 120), 0.9);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.badge.event-tone-critical {
    background: rgba(var(--event-secondary-rgb, 212, 164, 184), 0.3);
    color: var(--theme-secondary-strong, #934c72);
    border: 1px solid rgba(var(--event-secondary-rgb, 212, 164, 184), 0.9);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.badge.event-tone-info,
.badge.event-tone-warning,
.badge.event-tone-critical {
    font-size: 0.74rem;
    padding: 0.32rem 0.52rem;
}

#eventDetailBody .badge.event-tone-info {
    background: rgba(var(--event-primary-rgb), 0.18);
    color: var(--event-primary);
    border: 1.5px solid var(--event-teal-mid);
}

#eventDetailBody .badge.event-tone-warning {
    background: var(--event-yellow-light);
    color: var(--event-yellow-dark);
    border: 1.5px solid var(--event-yellow);
}

#eventDetailBody .badge.event-tone-critical {
    background: var(--event-red-light);
    color: var(--event-secondary);
    border: 1.5px solid var(--event-red-mid);
}

#eventDetailBody .badge.event-badge-related {
    background: #f3faf9;
    color: var(--event-text-muted);
    border: 1.5px solid var(--event-border);
}

.event-detail-meta-strip {
    background: var(--event-teal-light);
    border: 1.5px solid var(--event-teal-mid);
    border-radius: 13px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.2rem;
}

.event-detail-meta-item {
    display: flex;
    flex-direction: column;
    min-width: 9rem;
}

.event-detail-meta-label {
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--event-text-muted);
}

.event-detail-meta-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--event-text);
}

.event-detail-mono {
    font-family: var(--event-mono);
    font-size: 0.75rem;
}

.event-detail-card {
    background: var(--event-surface-2);
    border: 1.5px solid var(--event-border);
    border-radius: 13px;
    padding: 0.85rem 0.9rem;
    height: 100%;
}

.event-detail-card-title {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--event-primary);
    border-bottom: 1.5px solid var(--event-border);
    padding-bottom: 0.35rem;
    margin-bottom: 0.55rem;
}

.event-detail-break {
    overflow-wrap: anywhere;
    font-family: var(--event-mono);
    font-size: 0.73rem;
}


.event-detail-summary {
    margin-bottom: 0.35rem;
    padding: 0.4rem 0.55rem;
    background: rgba(var(--event-primary-rgb), 0.12);
    border: 1px solid rgba(var(--event-primary-rgb), 0.32);
    border-radius: 0.6rem;
}

.event-detail-modal--professor .modal-dialog {
    max-width: 760px;
}

.event-detail-modal--professor .event-detail-modal-content {
    background: var(--theme-surface);
}

.event-detail-card--functional.event-tone-info {
    background: rgba(var(--event-primary-rgb), 0.14);
    border-color: rgba(var(--event-primary-rgb), 0.46);
}

.event-detail-card--functional.event-tone-warning {
    background: rgba(var(--event-tertiary-rgb), 0.16);
    border-color: rgba(var(--event-tertiary-rgb), 0.5);
}

.event-detail-card--functional.event-tone-critical {
    background: rgba(var(--event-secondary-rgb), 0.14);
    border-color: rgba(var(--event-secondary-rgb), 0.48);
}

.event-detail-card--functional-help {
    background: rgba(var(--event-primary-rgb), 0.1);
    border-color: rgba(var(--event-primary-rgb), 0.45);
}

.event-detail-card--alias-change {
    background: rgba(var(--event-primary-rgb), 0.08);
}

.event-detail-alias-change-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.65rem;
}

.event-detail-alias-change-col {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
}

.event-detail-alias-change-arrow {
    color: var(--event-primary);
    font-weight: 800;
}

.event-detail-alias-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.18rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(var(--event-primary-rgb), 0.42);
    background: var(--theme-surface);
    color: var(--event-text);
    font-size: 0.76rem;
    font-weight: 700;
    min-height: 1.65rem;
}

.event-detail-list .list-group-item {
    overflow-wrap: anywhere;
    background: transparent;
    border-bottom-color: rgba(167, 221, 217, 0.45);
}

@media (max-width: 575.98px) {
    #eventDetailModal .modal-dialog {
        width: 90vw;
        max-width: 90vw;
        height: 90vh;
        margin: 5vh auto;
    }

    #eventDetailModal .modal-content {
        height: 100%;
    }

    .event-detail-modal-body {
        padding: 0.9rem;
        overflow-y: auto;
    }

    .event-detail-header {
        flex-direction: column;
    }

    .event-detail-badges {
        justify-content: flex-start;
    }

    .event-detail-alias-change-grid {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .event-detail-alias-change-col {
        align-items: flex-start;
    }

    .event-detail-alias-change-arrow {
        display: none;
    }
}


@media (max-width: 991.98px) {
    .design-settings-columns--2 {
        grid-template-columns: 1fr;
    }

    .design-hero-carousel-shell {
        grid-template-columns: 1fr;
    }

    .design-hero-nav {
        display: none;
    }

    .design-hero-carousel {
        grid-auto-columns: minmax(290px, 86%);
        padding-bottom: 0.45rem;
    }

    .design-hero-artwork-grid {
        grid-template-columns: 1fr;
    }

    .design-hero-preview {
        aspect-ratio: 4 / 3;
        padding: 0.72rem 0.76rem !important;
    }

    .design-hero-slide {
        min-height: 27.4rem;
    }

    .design-hero-live-preview-shell {
        padding: 0.55rem;
    }

    .design-hero-modal-preview {
        min-height: 250px;
        padding: 1.6rem 1.1rem !important;
    }

    .design-hero-preview .home-hero-title {
        font-size: 1.05rem;
    }

    .design-hero-preview p {
        font-size: 0.84rem;
    }
}

/* ===================================================
   Editor redesign v2 (course / seminar / subscription)
   =================================================== */

/* -- Editor page header -- */
.ed-hdr {
    background: var(--theme-surface);
    border-bottom: 1.5px solid #b0aea6;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 0;
}
.ed-hdr-icon {
    width: 34px;
    height: 34px;
    background: #1D9E75;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 15px;
}
.ed-hdr-title {
    font-size: 15px;
    font-weight: 600;
    color: #111110;
    margin: 0;
}
.ed-hdr-sub {
    font-size: 11px;
    color: #4a4845;
    margin-top: 1px;
}

/* -- Section cards -- */
.ed-sec {
    background: var(--theme-surface);
    border: 1.5px solid #b0aea6;
    border-radius: 12px;
    margin-bottom: 0;
    overflow: hidden;
}
.ed-sec-head {
    background: #e0f5ec;
    border-bottom: 1.5px solid #aadfc8;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ed-sec-label {
    font-size: 10px;
    font-weight: 700;
    color: #0a5c3e;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.ed-sec-body {
    padding: 18px;
}
.ed-sec-title {
    font-size: 15px;
    font-weight: 700;
    color: #111110;
    margin-bottom: 3px;
}
.ed-sec-desc {
    font-size: 12px;
    color: #4a4845;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* -- Toggle rows -- */
.ed-tog-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    gap: 12px;
}
.ed-tog-row + .ed-tog-row {
    border-top: 1px solid #ece9e3;
}
.ed-tog-lbl {
    font-size: 13px;
    font-weight: 600;
    color: #111110;
}
.ed-tog-sub {
    font-size: 11px;
    color: #4a4845;
    margin-top: 1px;
}
/* Custom toggle switch — wraps <input type="checkbox"> */
.ed-tog {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    display: inline-block;
}
.ed-tog input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.ed-tog-sl {
    position: absolute;
    inset: 0;
    background: #9a9890;
    border-radius: 20px;
    cursor: pointer;
    transition: background .2s;
}
.ed-tog input:checked + .ed-tog-sl {
    background: #1D9E75;
}
.ed-tog-sl::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
}
.ed-tog input:checked + .ed-tog-sl::before {
    transform: translateX(16px);
}

/* -- Pay pills -- */
.ed-pay-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.ed-pay-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1.5px solid #b0aea6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #222220;
    user-select: none;
}
.ed-pay-pill input[type="checkbox"] {
    accent-color: #1D9E75;
    width: 15px;
    height: 15px;
}
.ed-pay-pill:has(input:checked) {
    border-color: #1D9E75;
    background: #ddf5eb;
    color: #0a4a2e;
}

/* -- Stats bar (subscription content tab) -- */
.ed-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--theme-surface);
    border: 1.5px solid #b0aea6;
    border-radius: 10px;
    margin-bottom: 0;
    overflow: hidden;
}
.ed-stat {
    padding: 14px 18px;
}
.ed-stat + .ed-stat {
    border-left: 1.5px solid #dddbd5;
}
.ed-stat-lbl {
    font-size: 10px;
    font-weight: 700;
    color: #4a4845;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 4px;
}
.ed-stat-val {
    font-size: 22px;
    font-weight: 600;
    color: #111110;
}
.ed-stat-val--sm {
    font-size: 13px;
    font-weight: 500;
    color: #222220;
    padding-top: 4px;
}

/* -- Sort pills (overrides Bootstrap btn style on .subscription-sort-option) -- */
.ed-sort-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.ed-sort-lbl {
    font-size: 12px;
    font-weight: 600;
    color: #4a4845;
}
.ed-sort-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.ed-sort-tabs .subscription-sort-option,
.ed-sort-tabs .create-subscription-sort-option {
    padding: 6px 12px;
    border-radius: 20px !important;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid #b0aea6 !important;
    color: #4a4845;
    background: var(--theme-surface);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
}
.ed-sort-tabs .subscription-sort-option input[type="radio"],
.ed-sort-tabs .create-subscription-sort-option input[type="radio"] {
    display: none;
}
.ed-sort-tabs .subscription-sort-option.btn-primary,
.ed-sort-tabs .subscription-sort-option.is-active,
.ed-sort-tabs .create-subscription-sort-option.btn-primary,
.ed-sort-tabs .create-subscription-sort-option.is-active {
    background: #1D9E75 !important;
    color: #fff !important;
    border-color: #1D9E75 !important;
}

/* -- Class type badges -- */
.ed-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 6px;
}
.ed-tb-video   { background: #ddf5eb; color: #0a4a2e; border: 1px solid #8dd4b0; }
.ed-tb-imagen  { background: #e8f4fd; color: #0a3d6e; border: 1px solid #90c4e8; }
.ed-tb-texto   { background: #faeeda; color: #6a3e00; border: 1px solid #e8c97a; }
.ed-tb-encuesta{ background: #fde8f0; color: #7a1040; border: 1px solid #e8a0c0; }
.ed-tb-material{ background: #ede8fd; color: #3a1080; border: 1px solid #b8a0e8; }

/* -- Reauth bar -- */
.ed-reauth {
    background: #ddf5eb;
    border: 1.5px solid #8dd4b0;
    border-radius: 10px;
    padding: 11px 16px;
    margin-bottom: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: #0a4a2e;
    font-weight: 500;
    line-height: 1.5;
}
.ed-reauth-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1D9E75;
    flex-shrink: 0;
    margin-top: 4px;
}

/* -- Info note (audience) -- */
.ed-info-box {
    background: #ddf5eb;
    border: 1.5px solid #8dd4b0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #0a4a2e;
    margin-top: 12px;
    font-weight: 500;
    line-height: 1.5;
}

/* -- Dashed add button -- */
.ed-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #168c65;
    background: none;
    border: 1.5px dashed #4dba8c;
    border-radius: 8px;
    padding: 9px;
    cursor: pointer;
    width: 100%;
    margin-top: 6px;
}
.ed-add-btn:hover {
    background: #e0f5ec;
}

/* -- Media rows (portada) -- */
.ed-media-list .media-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1.5px solid #b0aea6 !important;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--theme-surface);
}
.ed-media-list .media-preview {
    width: 52px;
    height: 38px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
.ed-media-list .media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ed-media-list .media-fields {
    flex: 1;
    min-width: 0;
}
.ed-media-list .media-fields .form-control {
    font-size: 11px;
}
.ed-media-list .media-select {
    font-size: 11px;
}
.ed-media-primary-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    background: #c8eed9;
    color: #0a4a2e;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid #8dd4b0;
    white-space: nowrap;
}

/* -- Content section module card -- */
.ed-mod-card {
    border: 1.5px solid #b0aea6;
    border-radius: 10px;
    overflow: hidden;
    background: var(--theme-surface);
    margin-bottom: 14px;
}
.ed-mod-hdr {
    background: #e8e6e0;
    padding: 11px 16px;
    border-bottom: 1.5px solid #b0aea6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.ed-mod-name {
    font-size: 13px;
    font-weight: 700;
    color: #111110;
}
.ed-mod-meta {
    font-size: 11px;
    color: #4a4845;
}

/* New class area inside content card */
.ed-new-cls-area {
    padding: 14px 16px;
    background: #f4f3ef;
    border-top: 1.5px solid #dddbd5;
}
.ed-new-cls-label {
    font-size: 10px;
    font-weight: 700;
    color: #4a4845;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 10px;
}

/* Search area inside content card */
.ed-buscar-area {
    padding: 10px 16px;
    border-bottom: 1.5px solid #dddbd5;
}
.ed-buscar-lbl {
    font-size: 10px;
    font-weight: 700;
    color: #4a4845;
    text-transform: uppercase;
    letter-spacing: .06em;
    display: block;
    margin-bottom: 6px;
}

/* Show all classes button */
.ed-show-all-btn {
    display: block;
    text-align: center;
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    border-top: 1.5px solid #dddbd5;
    font-size: 12px;
    font-weight: 600;
    color: #168c65;
    cursor: pointer;
}
.ed-show-all-btn:hover {
    background: #e0f5ec;
}

/* Pricing fields 4-col grid */
.ed-price-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
@media (max-width: 800px) {
    .ed-price-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ed-stats-bar {
        grid-template-columns: 1fr 1fr;
    }
    .ed-stats-bar .ed-stat:last-child {
        grid-column: 1 / -1;
        border-left: none;
        border-top: 1.5px solid #dddbd5;
    }
}
@media (max-width: 500px) {
    .ed-price-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 767.98px) {
    body {
        /* clip, no hidden: hidden convierte <body> en scroll container (el
           browser computa overflow-y como auto) y rompe position:sticky en
           TODOS sus descendientes en mobile. Misma razón que el body{} base
           de arriba, que ya usa clip. */
        overflow-x: clip;
        max-width: 100vw;
    }
    .container,
    .container-fluid,
    .row,
    [class*="col-"] {
        min-width: 0;
    }
    .container {
        padding-left: 12px;
        padding-right: 12px;
        overflow-x: clip;
    }
    .course-editor,
    .subscription-editor-shell,
    .subscription-workbench-form,
    .subscription-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-left: 0;
        padding-right: 0;
        overflow-x: clip;
        box-sizing: border-box;
    }
    .subscription-editor-shell .ed-sec,
    .subscription-editor-shell .ed-stats-bar,
    .subscription-editor-shell .subscription-add-class-card,
    .subscription-editor-shell .subscription-content-settings,
    .subscription-editor-shell .subscription-sticky-actions,
    .subscription-editor-shell .ed-hdr,
    .subscription-editor-shell .accordion-item,
    .subscription-editor-shell .course-editor__surface {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .subscription-editor-shell .subscription-workbench__tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
        position: relative;
        padding: .45rem;
    }
    .subscription-editor-shell .subscription-workbench__tab {
        width: 100%;
        min-width: 0;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
        padding: .68rem .55rem;
        font-size: .86rem;
    }
    .subscription-sticky-actions {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        border-radius: 12px !important;
        bottom: 0.5rem;
        box-sizing: border-box;
    }
}

/* ── Messages tab nav ─────────────────────────────────────────────────────── */
/* Mobile-first: horizontal pill-tabs with light teal background */
.messages-tab-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    background: rgba(158, 208, 197, 0.18);
    border-radius: var(--theme-radius-sm, 8px);
    padding: 4px;
    gap: 2px;
    border: 1px solid rgba(158, 208, 197, 0.35);
}

.messages-tab-nav .nav-link {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 4px;
    text-align: center;
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 0.45rem 0.4rem;
    border-radius: calc(var(--theme-radius-sm, 8px) - 2px);
    color: var(--theme-text-body, #343a40);
    border: none;
    transition: background 0.15s, color 0.15s;
}

.messages-tab-nav .nav-link:hover:not(.active) {
    background: rgba(158, 208, 197, 0.35);
    color: var(--theme-text-body, #343a40);
}

.messages-tab-nav .nav-link.active {
    background: var(--theme-primary, #9ed0c5);
    color: #1e2939;
    font-weight: 600;
}

.messages-tab-nav .messages-tab-nav__count {
    font-size: 0.78rem;
    opacity: 0.85;
}

/* Desktop (≥ 768px): slightly larger text, keep horizontal layout */
@media (min-width: 768px) {
    .messages-tab-nav .nav-link {
        font-size: 0.92rem;
        padding: 0.5rem 1.25rem;
    }

    .messages-tab-nav .messages-tab-nav__count {
        font-size: 0.85rem;
        opacity: 1;
    }
}

/* ── Mobile student cards ─────────────────────────────────────────── */
.student-mobile-cards { display: none; }

@media (max-width: 767.98px) {
    .panel-table.smc-table-replaced { display: none !important; }
    .student-mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.5rem;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .smc-card {
        background: var(--theme-tertiary);
        border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
        border-radius: var(--theme-radius-md, 14px);
        padding: 0.75rem;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .smc-card-top {
        display: flex;
        align-items: flex-start;
        gap: 0.6rem;
        min-width: 0;
    }
    .smc-avatar {
        width: 40px; height: 40px;
        border-radius: 50%;
        background: rgba(var(--theme-primary-rgb), 0.25);
        color: var(--theme-text-title-on-surface);
        font-size: 0.85rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border: 1.5px solid rgba(var(--theme-primary-rgb), 0.5);
    }
    .smc-info { flex: 1; min-width: 0; overflow: hidden; }
    .smc-name {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--theme-primary, #9ed0c5);
        margin-bottom: 0.3rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .smc-name a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--theme-primary, #9ed0c5);
        text-decoration: none;
        font-weight: 600;
    }
    .smc-meta { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
    .smc-meta-row {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.78rem;
        color: var(--theme-text-muted, #6c757d);
        min-width: 0;
    }
    .smc-meta-row i {
        font-size: 0.68rem;
        color: var(--theme-primary, #9ed0c5);
        width: 12px;
        flex-shrink: 0;
    }
    .smc-meta-row > span:not(.smc-status-pill) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }
    .smc-status-pill {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        font-size: 0.72rem;
        font-weight: 600;
        border-radius: 999px;
        padding: 0.15rem 0.55rem;
    }
    .smc-status-pill.is-active  { background: #E1F5EE; color: #085041; border: 1px solid #5DCAA5; }
    .smc-status-pill.is-inactive{ background: #F1EFE8; color: #444441; border: 1px solid #B4B2A9; }
    .smc-status-dot { width: 6px; height: 6px; border-radius: 50%; }
    .smc-status-dot.is-active   { background: #1D9E75; }
    .smc-status-dot.is-inactive { background: #888780; }
    .smc-dots-btn {
        width: 32px; height: 32px;
        border-radius: 8px;
        border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
        background: var(--theme-tertiary);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        cursor: pointer;
        position: relative;
    }
    .smc-dots-inner {
        display: flex;
        flex-direction: column;
        gap: 3px;
        align-items: center;
        pointer-events: none;
    }
    .smc-dot {
        width: 3px; height: 3px;
        border-radius: 50%;
        background: var(--theme-quaternary, #343a40);
    }
    .smc-dropdown {
        display: none;
        position: absolute;
        top: 36px; right: 0;
        background: var(--theme-tertiary);
        border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
        border-radius: var(--theme-radius-md, 14px);
        width: 200px;
        z-index: 100;
        box-shadow: var(--theme-shadow-2);
        overflow: hidden;
    }
    .smc-dropdown.is-open { display: block; }
    .smc-drop-item {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
        color: var(--theme-quaternary, #343a40);
        text-decoration: none;
        cursor: pointer;
        background: transparent;
        border: none;
        width: 100%;
        text-align: left;
    }
    .smc-drop-item:not(:last-child) { border-bottom: 1px solid rgba(var(--theme-primary-rgb), 0.12); }
    .smc-drop-item:hover { background: rgba(var(--theme-primary-rgb), 0.06); }
    .smc-drop-icon {
        width: 22px; height: 22px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.7rem;
        flex-shrink: 0;
    }
    .smc-drop-icon.teal  { background: rgba(var(--theme-primary-rgb), 0.12); color: var(--theme-primary); }
    .smc-drop-icon.blue  { background: rgba(var(--bs-info-rgb, 13, 202, 240), 0.12); color: var(--bs-info, #0dcaf0); }
    .smc-drop-icon.amber { background: rgba(var(--bs-warning-rgb, 255, 193, 7), 0.12); color: var(--bs-warning, #ffc107); }
    .smc-drop-icon.green { background: rgba(var(--bs-success-rgb, 25, 135, 84), 0.12); color: var(--bs-success, #198754); }
    .smc-drop-icon.gray  { background: rgba(var(--theme-quaternary-rgb), 0.08); color: var(--theme-text-muted); }
}

/* ── Mobile user cards ───────────────────────────────────────────── */
.users-mobile-cards { display: none; }

@media (max-width: 767.98px) {
    #editUserModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }

    .panel-table.umc-table-replaced { display: none !important; }

    .users-mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.5rem;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .umc-card {
        background: var(--theme-tertiary);
        border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
        border-radius: var(--theme-radius-md, 14px);
        padding: 0.75rem;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .umc-card-top {
        display: flex;
        align-items: flex-start;
        gap: 0.6rem;
        min-width: 0;
    }
    .umc-avatar {
        width: 40px; height: 40px;
        border-radius: 50%;
        background: rgba(var(--theme-primary-rgb), 0.25);
        color: var(--theme-text-title-on-surface);
        font-size: 0.85rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border: 1.5px solid rgba(var(--theme-primary-rgb), 0.5);
        overflow: hidden;
    }
    .umc-avatar img {
        width: 100%; height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }
    .umc-info { flex: 1; min-width: 0; overflow: hidden; }
    .umc-name {
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--theme-primary, #9ed0c5);
        margin-bottom: 0.3rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .umc-name a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--theme-primary, #9ed0c5);
        text-decoration: none;
        font-weight: 600;
    }
    .umc-meta { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
    .umc-meta-row {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.78rem;
        color: var(--theme-text-muted, #6c757d);
        min-width: 0;
    }
    .umc-meta-row i {
        font-size: 0.68rem;
        color: var(--theme-primary, #9ed0c5);
        width: 12px;
        flex-shrink: 0;
    }
    .umc-meta-row > span:not(.umc-status-pill):not(.umc-profile-badge) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }
    .umc-profile-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        font-size: 0.72rem;
        font-weight: 600;
        border-radius: 999px;
        padding: 0.15rem 0.55rem;
        background: rgba(var(--theme-primary-rgb), 0.15);
        color: var(--theme-text-title-on-surface);
        border: 1px solid rgba(var(--theme-primary-rgb), 0.4);
    }
    .umc-status-pill {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        font-size: 0.72rem;
        font-weight: 600;
        border-radius: 999px;
        padding: 0.15rem 0.55rem;
    }
    .umc-status-pill.is-active   { background: #E1F5EE; color: #085041; border: 1px solid #5DCAA5; }
    .umc-status-pill.is-inactive { background: #F1EFE8; color: #444441; border: 1px solid #B4B2A9; }
    .umc-status-dot { width: 6px; height: 6px; border-radius: 50%; }
    .umc-status-dot.is-active   { background: #1D9E75; }
    .umc-status-dot.is-inactive { background: #888780; }
    .umc-dots-btn {
        width: 32px; height: 32px;
        border-radius: 8px;
        border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
        background: var(--theme-tertiary);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        cursor: pointer;
        position: relative;
    }
    .umc-dots-inner {
        display: flex;
        flex-direction: column;
        gap: 3px;
        align-items: center;
        pointer-events: none;
    }
    .umc-dot {
        width: 3px; height: 3px;
        border-radius: 50%;
        background: var(--theme-quaternary, #343a40);
    }
    .umc-dropdown {
        display: none;
        position: absolute;
        top: 36px; right: 0;
        background: var(--theme-tertiary);
        border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
        border-radius: var(--theme-radius-md, 14px);
        width: 210px;
        z-index: 100;
        box-shadow: var(--theme-shadow-2);
        overflow: hidden;
    }
    .umc-dropdown.is-open { display: block; }
    .umc-drop-item {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
        color: var(--theme-quaternary, #343a40);
        text-decoration: none;
        cursor: pointer;
        background: transparent;
        border: none;
        width: 100%;
        text-align: left;
    }
    .umc-drop-item:not(:last-child) { border-bottom: 1px solid rgba(var(--theme-primary-rgb), 0.12); }
    .umc-drop-item:hover { background: rgba(var(--theme-primary-rgb), 0.06); }
    .umc-drop-item:disabled { opacity: 0.45; cursor: not-allowed; }
    .umc-drop-icon {
        width: 22px; height: 22px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.7rem;
        flex-shrink: 0;
    }
    .umc-drop-icon.amber { background: rgba(var(--bs-warning-rgb, 255, 193, 7), 0.12); color: var(--bs-warning, #ffc107); }
    .umc-drop-icon.teal  { background: rgba(var(--theme-primary-rgb), 0.12); color: var(--theme-primary); }
    .umc-drop-icon.gray  { background: rgba(var(--theme-quaternary-rgb), 0.08); color: var(--theme-text-muted); }
}

/* ==============================================
   MESSAGE MOBILE CARDS (mmc-)
   ============================================== */
.messages-mobile-cards {
    display: none;
    flex-direction: column;
    gap: 0.65rem;
}
.mmc-toolbar-btn { display: none; }

@media (max-width: 767.98px) {
    .messages-table-responsive { display: none !important; }
    .messages-mobile-cards { display: flex !important; }
    .mmc-toolbar-btn { display: inline-flex !important; }
}

.mmc-card {
    background: var(--theme-tertiary);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
    border-radius: 14px;
    padding: 0.75rem;
    position: relative;
}
.mmc-card--unread {
    border-left: 3px solid var(--theme-primary);
    background: rgba(var(--theme-primary-rgb), 0.05);
}
.mmc-card-top {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.mmc-check-wrap {
    flex-shrink: 0;
}
.mmc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.mmc-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.mmc-meta-line {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.12rem;
}
.mmc-meta-line:last-child {
    margin-bottom: 0;
}
.mmc-meta-label {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--theme-text-muted);
}
.mmc-meta-value {
    min-width: 0;
    word-break: break-word;
}
.mmc-from {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--theme-text-title-on-surface);
    line-height: 1.2;
}
.mmc-card--unread .mmc-from { font-weight: 700; }
.mmc-subject {
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--theme-text-title);
    line-height: 1.25;
    text-decoration: none;
}
.mmc-card--unread .mmc-subject { font-weight: 700; }
.mmc-subject:hover { text-decoration: underline; }
.mmc-date {
    font-size: 0.74rem;
    color: var(--theme-text-muted);
}
.mmc-recipients {
    font-size: 0.78rem;
    color: var(--theme-text-title-on-surface);
    line-height: 1.2;
    font-weight: 600;
}
.mmc-dots-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
    background: var(--theme-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}
.mmc-dots-inner {
    display: flex;
    flex-direction: column;
    gap: 3px;
    pointer-events: none;
}
.mmc-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--theme-primary);
    display: block;
}
.mmc-dropdown {
    display: none;
    position: absolute;
    top: 36px;
    right: 0;
    background: var(--theme-tertiary);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
    border-radius: 14px;
    width: 200px;
    z-index: 1050;
    box-shadow: var(--theme-shadow-2);
    overflow: hidden;
}
.mmc-dropdown.is-open { display: block; }
.mmc-drop-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    color: var(--theme-quaternary);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
}
.mmc-drop-item:not(:last-child) { border-bottom: 1px solid rgba(var(--theme-primary-rgb), 0.12); }
.mmc-drop-item:hover, .mmc-drop-item:focus { background: rgba(var(--theme-primary-rgb), 0.06); }
.mmc-drop-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.mmc-drop-icon.teal  { background: rgba(var(--theme-primary-rgb), 0.12); color: var(--theme-primary); }
.mmc-drop-icon.red   { background: rgba(var(--bs-danger-rgb, 220, 53, 69), 0.12); color: var(--bs-danger, #dc3545); }
.mmc-drop-icon.green { background: rgba(var(--bs-success-rgb, 25, 135, 84), 0.12); color: var(--bs-success, #198754); }
.mmc-drop-icon.amber { background: rgba(var(--bs-warning-rgb, 255, 193, 7), 0.12); color: var(--bs-warning, #ffc107); }

/* ==============================================
   PROGRESS MOBILE CARDS (pmc-)
   ============================================== */
.progress-mobile-cards {
    display: none;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 767.98px) {
    .progress-panel-table { display: none !important; }
    .progress-mobile-cards { display: flex !important; }
}

.pmc-card {
    background: var(--theme-tertiary);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
}
.pmc-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.pmc-num {
    font-size: 0.68rem;
    color: var(--theme-text-muted);
    font-weight: 600;
    flex-shrink: 0;
}
.pmc-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-text-title-on-surface);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pmc-pct {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--theme-text-title-on-surface);
    flex-shrink: 0;
}
.pmc-bar-wrap {
    height: 7px;
    background: rgba(var(--theme-primary-rgb), 0.15);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}
.pmc-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-on-tertiary, var(--theme-text-title-on-surface)));
    border-radius: 99px;
}
.pmc-fraction {
    font-size: 0.7rem;
    color: var(--theme-text-muted);
    text-align: right;
}

/* Unread modifier for smc-card (used by message mobile cards) */
.smc-card.smc-card--unread {
    border-left: 3px solid var(--theme-primary);
    background: rgba(var(--theme-primary-rgb), 0.05);
}
.smc-card.smc-card--unread .smc-name { font-weight: 700; }


/* ══════════════════════════════════════════════════════════════════════════
   Telemetry – filter bar, table hierarchy, verb badges, status badges,
   mobile cards
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Filter bar ─────────────────────────────────────────────────────────── */
.panel-filters.telemetry-filters {
    grid-template-columns: 2fr 1fr 1fr 1.5fr 1.5fr auto;
    align-items: end;
    gap: 0.65rem;
}

.tf-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #637074;
    margin-bottom: 3px;
    line-height: 1.3;
}

/* ── Verb badges ─────────────────────────────────────────────────────────── */
.verb-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.verb-GET     { background: #e8f5e9; color: #2e7d32; }
.verb-POST    { background: #e3f2fd; color: #1565c0; }
.verb-PUT     { background: #fff3e0; color: #e65100; }
.verb-PATCH   { background: #fce4ec; color: #880e4f; }
.verb-DELETE  { background: #ffebee; color: #c62828; }
.verb-OPTIONS { background: #f3e5f5; color: #6a1b9a; }
.verb-HEAD    { background: #f1f8e9; color: #33691e; }

/* ── HTTP status code badges ─────────────────────────────────────────────── */
.sc-2xx     { background: #e8f5e9; color: #2e7d32; }
.sc-3xx     { background: #e3f2fd; color: #1565c0; }
.sc-4xx     { background: #fff3e0; color: #e65100; }
.sc-5xx     { background: #ffebee; color: #c62828; }
.sc-unknown { background: #f5f5f5; color: #757575; }

/* ── Status badges ───────────────────────────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge--ok    { background: #e8f5e9; color: #2e7d32; }
.status-badge--error { background: #ffebee; color: #c62828; }

/* ── Telemetry table ─────────────────────────────────────────────────────── */
.telemetry-table-wrap .telemetry-table {
    margin-bottom: 0;
    min-width: 780px;
}

.telemetry-table-wrap .telemetry-table thead th {
    background: #e0f2f1;
    color: #2c3e50;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #d6eae7;
    white-space: nowrap;
}

.telemetry-table-wrap .telemetry-table tbody tr:nth-child(odd)  { background: var(--theme-surface); }
.telemetry-table-wrap .telemetry-table tbody tr:nth-child(even) { background: #f3faf9; }
.telemetry-table-wrap .telemetry-table tbody tr.row-error       { background: #fff0f0 !important; }

.telemetry-table-wrap .telemetry-table tbody tr:last-child td { border-bottom: 0; }
.telemetry-table-wrap .telemetry-table tbody td { vertical-align: middle; }

/* Primary columns – normal weight, main text color */
.th-primary { color: #2c3e50; }
.td-primary  { color: #2c3e50; font-weight: 500; font-size: 0.875rem; }

/* Secondary columns – smaller, muted */
.th-secondary { color: #637074 !important; font-weight: 500 !important; }
.td-secondary  { color: #637074; font-size: 0.8rem; }

/* Endpoint path cell – truncate long paths */
.td-path { max-width: 260px; }
.path-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Date cell – mono, no wrap */
.td-date { white-space: nowrap; font-size: 0.8rem; }

/* ── Mobile cards (hidden on desktop) ───────────────────────────────────── */
.telemetry-cards { display: none; }

.tcard {
    border: 1px solid #d6eae7;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    background: var(--theme-surface);
}

.tcard--error {
    border-left: 3px solid #e24b4a;
}

.tcard__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    cursor: pointer;
    background: #f3faf9;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tcard--error .tcard__header { background: #fff0f0; }

.tcard__header-main {
    flex: 1;
    min-width: 0;
}

.tcard__path {
    display: block;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2c3e50;
    font-weight: 500;
    max-width: 100%;
}

.tcard__meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
    flex-wrap: wrap;
}

.tcard__date {
    font-size: 0.75rem;
    color: #637074;
}

.tcard__header-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.tcard__chevron-right {
    font-size: 0.7rem;
    color: #9eacaf;
    flex-shrink: 0;
}

/* Clickable table rows */
.telemetry-row { cursor: pointer; }
.telemetry-row:hover td { background-color: #e0f2f1 !important; }

/* Clickable mobile cards */
.tcard { cursor: pointer; }
.tcard:hover { border-color: var(--theme-primary, #9ed0c5); }

/* ── Telemetry detail modal ─────────────────────────────────────────────── */
.tdetail-body { padding: 1.25rem 1.5rem; }

.tdetail-endpoint-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tdetail-path {
    font-size: 0.88rem;
    color: #2c3e50;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.tdetail-badges {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.tdetail-divider {
    border-color: #d6eae7;
    margin: 0.9rem 0;
}

.tdetail-section { margin-bottom: 1.1rem; }

.tdetail-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9eacaf;
    font-weight: 700;
    margin-bottom: 0.55rem;
}

.tdetail-grid { display: grid; gap: 0.5rem 1.25rem; }
.tdetail-grid--2 { grid-template-columns: 1fr 1fr; }
.tdetail-grid--3 { grid-template-columns: 1fr 1fr 1fr; }

.tdetail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tdetail-label {
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #9eacaf;
    font-weight: 600;
}

.tdetail-value {
    font-size: 0.88rem;
    color: #2c3e50;
    font-weight: 500;
}

.tdetail-value--large {
    font-size: 1.1rem;
    font-weight: 700;
}

.tdetail-value--error { color: #c62828; }
.tdetail-value--ok    { color: #2e7d32; }

.tdetail-note {
    background: #f3faf9;
    border: 1px solid #d6eae7;
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    font-size: 0.77rem;
    color: #637074;
    margin-top: 0.25rem;
}

@media (max-width: 480px) {
    .tdetail-grid--3 { grid-template-columns: 1fr 1fr; }
    .tdetail-body { padding: 1rem; }
}

/* ── Responsive – mobile (≤640px) ───────────────────────────────────────── */
@media (max-width: 640px) {
    /* Show cards, hide table */
    .telemetry-cards { display: block; }
    .telemetry-table-wrap { display: none !important; }

    /* Filter layout on mobile */
    .panel-filters.telemetry-filters {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    /* Full-width filter slots */
    .telemetry-filters .tf-col--search,
    .telemetry-filters .tf-col--from,
    .telemetry-filters .tf-col--to,
    .telemetry-filters .tf-col--action {
        grid-column: 1 / -1;
    }

    /* Período + Verbo + Status each occupy one column → sit side by side */
    .telemetry-filters .tf-col--period,
    .telemetry-filters .tf-col--verb,
    .telemetry-filters .tf-col--status {
        grid-column: auto;
    }
}
/* ══════════════════════════════════════════════════════════════════════════
HOME — NUEVA ESTRUCTURA COMERCIAL
══════════════════════════════════════════════════════════════════════════ */

.home-section-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--theme-primary, #a8cec8);
    background: rgba(var(--theme-primary-rgb, 168, 206, 200), 0.12);
    border: 1px solid rgba(var(--theme-primary-rgb, 168, 206, 200), 0.3);
    border-radius: 100px;
    padding: 0.25rem 0.85rem;
    margin-bottom: 0.75rem;
}

.home-section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.3px;
    text-align: center;
    margin-bottom: 0.5rem;
}

.home-section-subtitle {
    text-align: center;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 1rem;
    margin-bottom: 0;
    max-width: 560px;
    margin-inline: auto;
}

.home-section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2.25rem;
}

/* ── Cómo funciona ─────────────────────────────────────────────────────── */
.home-how-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    margin-top: 1rem;
}

.home-how-step {
    flex: 1;
    max-width: 260px;
    text-align: center;
    padding: 0 1.25rem;
}

.home-how-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    background: var(--theme-primary, #a8cec8);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.85rem;
}

.home-how-step-icon {
    font-size: 1.9rem;
    color: var(--theme-primary, #a8cec8);
    margin-bottom: 0.85rem;
}

.home-how-step h5 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.home-how-step p {
    font-size: 0.88rem;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0;
}

.home-how-connector {
    flex: 0 0 48px;
    height: 2px;
    background: var(--theme-primary, #a8cec8);
    opacity: 0.25;
    margin-top: 1.1rem;
    align-self: flex-start;
}

/* ── Catálogo unificado ────────────────────────────────────────────────── */
.home-catalog-section .home-section-title {
    margin-bottom: 1rem;
}

.catalog-tabs-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.catalog-tab-btn {
    border: 1.5px solid var(--bs-border-color, #dee2e6);
    background: transparent;
    color: inherit;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.4;
}

.catalog-tab-btn:hover {
    border-color: var(--theme-primary, #a8cec8);
    color: var(--theme-primary, #a8cec8);
}

.catalog-tab-btn.active {
    background: var(--theme-primary, #a8cec8);
    border-color: var(--theme-primary, #a8cec8);
    color: #fff;
}

.catalog-tab-panel + .catalog-tab-panel {
    margin-top: 2rem;
}

.catalog-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}

.catalog-group-count {
    background: var(--theme-primary, #a8cec8);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 100px;
    padding: 0.1rem 0.5rem;
    line-height: 1.5;
}

.catalog-group-sub {
    font-weight: 400;
    font-size: 0.83rem;
    color: var(--bs-secondary-color, #6c757d);
    margin-left: 0.15rem;
}

/* Filtrado por tabs via data-attribute */
.catalog-tabs-container[data-catalog-filter="cursos"] .catalog-tab-panel:not([data-type="cursos"]) { display: none; }
.catalog-tabs-container[data-catalog-filter="seminarios"] .catalog-tab-panel:not([data-type="seminarios"]) { display: none; }
.catalog-tabs-container[data-catalog-filter="suscripciones"] .catalog-tab-panel:not([data-type="suscripciones"]) { display: none; }
.catalog-tabs-container:not([data-catalog-filter="todos"]) .catalog-group-header .catalog-group-sub { display: none; }

/* ── Disciplinas / Rubros ──────────────────────────────────────────────── */
.home-rubros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 1rem;
}

.home-rubro-card {
    border: 1.5px solid var(--bs-border-color, #dee2e6);
    border-radius: var(--theme-radius, 12px);
    padding: 1.4rem 1rem;
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.home-rubro-card:hover {
    border-color: var(--theme-primary, #a8cec8);
    box-shadow: 0 4px 16px rgba(var(--theme-primary-rgb, 168, 206, 200), 0.18);
    transform: translateY(-2px);
}

.home-rubro-icon {
    display: block;
    font-size: 1.7rem;
    color: var(--theme-primary, #a8cec8);
    margin-bottom: 0.7rem;
}

.home-rubro-card h6 {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.3rem;
}

.home-rubro-card p {
    font-size: 0.78rem;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0;
}

/* ── Por qué elegirnos ─────────────────────────────────────────────────── */
.home-benefits-section {
    background: var(--bs-tertiary-bg, #f8f9fa);
    border-radius: var(--theme-radius-lg, 20px);
    padding: 3rem 2rem;
}

.home-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.25rem;
}

.home-benefit-card {
    background: var(--bs-body-bg, #fff);
    border: 1.5px solid var(--bs-border-color, #dee2e6);
    border-radius: var(--theme-radius, 12px);
    padding: 1.75rem 1.4rem;
    text-align: center;
}

.home-benefit-card > i {
    font-size: 1.9rem;
    color: var(--theme-primary, #a8cec8);
    display: block;
    margin-bottom: 0.9rem;
}

.home-benefit-card h5 {
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.home-benefit-card p {
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .home-how-steps {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .home-how-connector {
        width: 2px;
        height: 28px;
        margin: 0 auto;
        flex: none;
    }

    .home-how-step {
        max-width: 100%;
        width: 100%;
    }

    .home-benefits-section {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .home-rubros-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Account page redesign — acct-* components
   All styles scoped to .account-page; uses site CSS variables for theming.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Los labels apagados de Mi plan usaban alpha ad-hoc (0.4-0.6) sobre el token de
   texto. En oscuro eso es texto CLARO a media opacidad sobre superficie oscura:
   daba 3.5-4.4:1. --theme-on-surface-muted es el único muted calibrado a AA en
   los dos modos, así que todos apuntan ahí. */
.account-page .acct-section-title {
    text-transform: uppercase;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    margin-bottom: 0.6rem;
    margin-top: 0.5rem;
}

/* Cards */
.account-page .acct-card {
    background: rgba(var(--theme-tertiary-rgb, 248, 249, 250), 0.94);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.28);
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    color: var(--theme-quaternary, #343a40);
}

/* Equal-height cards within the same row (overrides Bootstrap col default to use flex) */
.account-page .row > [class*="col-"] {
    display: flex;
}

.account-page .row > [class*="col-"] > .acct-card {
    width: 100%;
    flex: 1 1 auto;
}

.account-page .acct-card-eyebrow {
    display: block;
    text-transform: uppercase;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    margin-bottom: 0.65rem;
}

.account-page .acct-plan-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--theme-quaternary, #343a40);
}

/* Badges */
.account-page .acct-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18em 0.6em;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* Los badges de estado tenían verde/ámbar/rojo hardcodeados: en modo oscuro el
   texto quedaba en su hex claro sobre el tinte oscuro y no se leía. Van a los
   semánticos, que theme-tokens.css ya aclara por modo. */
.account-page .acct-badge-active {
    background: rgba(var(--theme-success-rgb, 21, 115, 71), 0.10);
    color: var(--theme-success, #157347);
    border-color: rgba(var(--theme-success-rgb, 21, 115, 71), 0.34);
}

.account-page .acct-badge-ok {
    background: rgba(var(--theme-success-rgb, 21, 115, 71), 0.10);
    color: var(--theme-success, #157347);
    border-color: rgba(var(--theme-success-rgb, 21, 115, 71), 0.34);
}

.account-page .acct-badge-trial {
    background: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.10);
    color: var(--theme-warning, #8a6400);
    border-color: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.34);
}

.account-page .acct-badge-warning {
    background: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.10);
    color: var(--theme-warning, #8a6400);
    border-color: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.34);
}

.account-page .acct-badge-danger {
    background: rgba(var(--theme-danger-rgb, 200, 35, 51), 0.07);
    color: var(--theme-danger, #c82333);
    border-color: rgba(var(--theme-danger-rgb, 200, 35, 51), 0.32);
}

.account-page .acct-badge-inactive {
    background: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.08);
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    border-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.18);
}

/* Dunning / inline alert */
.account-page .acct-alert-danger {
    background: rgba(var(--theme-danger-rgb, 200, 35, 51), 0.07);
    border: 1px solid rgba(var(--theme-danger-rgb, 200, 35, 51), 0.28);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    font-size: 0.82rem;
    color: var(--theme-danger, #c82333);
    line-height: 1.5;
}

/* Meta rows (dates, amounts) */
.account-page .acct-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.account-page .acct-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.84rem;
}

.account-page .acct-meta-label {
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.account-page .acct-meta-value {
    color: var(--theme-quaternary, #343a40);
    font-weight: 500;
}

/* Action buttons */
.account-page .acct-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.account-page .acct-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.82rem;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.14);
    color: var(--theme-quaternary, #343a40);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.38);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.account-page .acct-btn:hover {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.28);
    color: var(--theme-quaternary, #343a40);
    text-decoration: none;
}

.account-page .acct-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.82rem;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 500;
    background: transparent;
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.65);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.45);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.account-page .acct-btn-outline:hover {
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.75);
    color: var(--theme-quaternary, #343a40);
    text-decoration: none;
}

.account-page .acct-btn-sm {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.6rem;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 500;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.14);
    color: var(--theme-quaternary, #343a40);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.account-page .acct-btn-sm:hover {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.28);
    color: var(--theme-quaternary, #343a40);
    text-decoration: none;
}

/* Payment method rows */
.account-page .acct-payment-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.22);
}

.account-page .acct-payment-row:last-of-type {
    border-bottom: none;
}

.account-page .acct-payment-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 7px;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    flex-shrink: 0;
}

.account-page .acct-payment-name {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--theme-quaternary, #343a40);
}

.account-page .acct-payment-sub {
    font-size: 0.75rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    margin-top: 0.1rem;
}

/* Metric + progress */
.account-page .acct-metric {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--theme-quaternary, #343a40);
    margin-bottom: 0.45rem;
}

.account-page .acct-progress {
    height: 6px;
    background: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.12);
    border-radius: 3px;
    margin-bottom: 0.55rem;
    overflow: visible;
}

.account-page .acct-progress .progress-bar {
    border-radius: 3px;
    min-width: 4px;
    background-color: var(--theme-primary, #2f6f5a);
}

/* Include / add-on breakdown rows */
.account-page .acct-include-rows {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.account-page .acct-include-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.79rem;
}

.account-page .acct-include-label {
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.account-page .acct-include-value {
    color: var(--theme-on-surface, #1b1f27);
    font-weight: 500;
}

/* Storage category breakdown */
.account-page .acct-breakdown {
    font-size: 0.76rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    line-height: 1.75;
    margin-top: 0.3rem;
}

/* Add-on list (active/contracted) */
.account-page .acct-addon-catalog {
    display: flex;
    flex-direction: column;
}

.account-page .acct-addon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.38rem 0;
    border-bottom: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18);
    font-size: 0.82rem;
    gap: 0.5rem;
}

.account-page .acct-addon-item:last-child {
    border-bottom: none;
}

.account-page .acct-addon-name {
    color: var(--theme-quaternary, #343a40);
}

.account-page .acct-addon-active-detail {
    font-size: 0.76rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    white-space: nowrap;
    flex-shrink: 0;
}

.account-page .acct-empty-hint {
    font-size: 0.82rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    text-align: center;
    padding: 0.75rem 0;
}

/* Support line */
.account-page .acct-support-line {
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.account-page .acct-support-line a {
    color: inherit;
}

@media (max-width: 991.98px) {
    .account-page .acct-card {
        padding: 1rem 1.1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCOUNTS — refresh visual + card licencia (hero). Absorbe el popup "Detalle
   del plan". Colores vía tokens --theme-* para sobrevivir presets claros y
   oscuros/saturados (regla de theming por tenant).
   ═══════════════════════════════════════════════════════════════════════════ */

/* Cards más limpias: fondo del tema, esquina 20px, sombra suave */
.account-page .acct-card {
    background: var(--theme-background, #fff);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.40);
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.06);
    padding: 1.5rem 1.6rem;
}

/* Botones tipo pill (convención del design system) */
.account-page .acct-btn--pill { border-radius: 999px; padding: 0.55rem 1.15rem; }
.account-page .acct-actions .acct-btn.acct-btn--pill { font-weight: 600; }

/* ---- Card licencia como HERO -------------------------------------------- */
.account-page .acct-card--hero { position: relative; padding-top: 1.75rem; }

/* Barra de acento primary→secondary arriba de la card */
.account-page .acct-hero-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--theme-primary, #9ed0c5), var(--theme-secondary, #c5a8d9));
    border-radius: 20px 20px 0 0;
}

.account-page .acct-hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.account-page .acct-hero-plan { margin-top: 0.5rem; }
.account-page .acct-card--hero .acct-plan-name {
    font-family: var(--theme-font-heading-primary, "Playfair Display", serif);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    color: var(--theme-quaternary, #343a40);
}

.account-page .acct-hero-price { text-align: right; white-space: nowrap; }
.account-page .acct-hero-price-label {
    display: block;
    font-size: 0.72rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}
.account-page .acct-hero-price-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--theme-quaternary, #343a40);
    margin-top: 0.1rem;
}

/* Bloque institución (antes en el popup) */
.account-page .acct-identity {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.15rem 0;
    padding: 0.85rem 1rem;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.10);
    border-radius: 14px;
}
.account-page .acct-identity-avatar {
    width: 2.4rem; height: 2.4rem;
    border-radius: 50%;
    background: linear-gradient(150deg, var(--theme-primary, #9ed0c5), var(--theme-secondary, #c5a8d9));
    color: var(--theme-on-primary, #fff);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.account-page .acct-identity-name { font-weight: 700; color: var(--theme-quaternary, #343a40); font-size: 0.95rem; }
.account-page .acct-identity-sub {
    display: flex; align-items: center; gap: 0.4rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64)); font-size: 0.82rem; margin-top: 0.1rem;
}
.account-page .acct-identity-sub i { font-size: 0.72rem; }

/* Grilla de detalle inline (reemplaza al popup): 2 columnas en desktop */
.account-page .acct-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem 1.75rem;
    margin-bottom: 1.1rem;
}
.account-page .acct-detail-grid .acct-meta-row {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.08);
}

/* Add-ons inline */
.account-page .acct-addons-inline {
    display: flex; align-items: baseline; gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.account-page .acct-addons-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.account-page .acct-addons-list:empty::after {
    content: "Sin add-ons activos";
    font-style: italic;
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.5);
    font-size: 0.84rem;
}
.account-page .acct-addons-list li {
    font-size: 0.8rem; font-weight: 600;
    color: var(--theme-quaternary, #343a40);
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.4);
    padding: 0.15rem 0.7rem; border-radius: 999px;
}

/* Medidores (storage / alumnos) un poco más presentes */
.account-page .acct-metric {
    font-family: var(--theme-font-heading-primary, "Playfair Display", serif);
    font-size: 1.6rem;
}
.account-page .acct-progress { height: 8px; border-radius: 4px; }

/* Mobile: la grilla de detalle pasa a 1 columna */
@media (max-width: 575.98px) {
    .account-page .acct-detail-grid { grid-template-columns: 1fr; }
    .account-page .acct-hero-head { flex-direction: column; }
    .account-page .acct-hero-price { text-align: left; }
}

/* Add-on manage modal */
.account-page .acct-addon-item-main {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    flex-grow: 1;
}

.account-page .acct-addon-manage-link {
    margin-left: 0.5rem;
    flex-shrink: 0;
}

#addOnManageModal .acct-addon-manage-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem 0.9rem;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.08);
    border-radius: 8px;
}

#addOnManageModal .acct-addon-manage-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

#addOnManageModal .acct-addon-manage-label {
    color: rgba(var(--theme-quaternary-rgb, 52, 58, 64), 0.6);
}

#addOnManageModal .acct-addon-manage-value {
    color: var(--theme-quaternary, #343a40);
    font-weight: 600;
}

#addOnManageModal .acct-addon-manage-qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
    border-radius: 8px;
}

#addOnManageModal .acct-addon-manage-qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

#addOnManageModal .acct-addon-manage-qty-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.55);
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.14);
    color: var(--theme-quaternary, #343a40);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}

#addOnManageModal .acct-addon-manage-qty-btn:hover {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.3);
}

#addOnManageModal .acct-addon-manage-qty-value {
    min-width: 2.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--theme-quaternary, #343a40);
}

#addOnManageModal .acct-addon-manage-preview .acct-addon-manage-row {
    font-size: 0.9rem;
}

#addOnManageModal .acct-addon-manage-msg {
    display: flex;
    align-items: flex-start;
    gap: 0.15rem;
    margin-top: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    font-size: 0.82rem;
}

#addOnManageModal .acct-addon-manage-msg-ok {
    background: rgba(40, 167, 69, 0.1);
    color: #1c6b32;
}

#addOnManageModal .acct-addon-manage-msg-warn {
    background: rgba(220, 53, 69, 0.1);
    color: #a02a37;
}

#addOnManageModal .acct-addon-manage-msg-info {
    background: rgba(255, 193, 7, 0.12);
    color: #7a5a00;
}

/* ── Request cards (mobile view) ─────────────────────────────────────────── */
.request-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.request-card {
    background: var(--theme-surface, #fff);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.28);
    border-radius: var(--theme-radius-sm, 8px);
    padding: 0.7rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.request-cards-list .request-card:nth-child(even) {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.06);
}

.request-card__header {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.request-card__number {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--theme-secondary, #6c757d);
    flex-shrink: 0;
}

.request-card__course {
    font-weight: 600;
    line-height: 1.3;
    color: var(--theme-on-background, var(--theme-quaternary, #343a40));
}

.request-card__student {
    font-size: 0.88rem;
    color: var(--theme-secondary, #6c757d);
}

.request-card__student .fa-solid {
    font-size: 0.78rem;
}

.request-card__meta {
    font-size: 0.82rem;
}

.request-card__badge {
    display: inline-block;
    padding: 0.15em 0.55em;
    border-radius: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.request-card__badge--payment {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18);
    color: var(--theme-quaternary, #343a40);
}

.request-card__footer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18);
}

.request-detail-table th {
    white-space: nowrap;
    font-weight: 600;
    width: 38%;
    color: var(--theme-secondary, #6c757d);
    font-size: 0.85rem;
}

.request-detail-table td {
    font-size: 0.9rem;
}

body.theme-mode-dark .request-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18);
}

body.theme-mode-dark .request-cards-list .request-card:nth-child(even) {
    background: rgba(255, 255, 255, 0.07);
}
/* ─────────────────────────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════════════════ */
/* Course editor — Fase 1 (type cards, image source tabs, principal pill)     */

.ptype-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}
@media (max-width: 540px) {
    .ptype-grid { grid-template-columns: 1fr; }
}
.ptype-option {
    position: relative;
    border: 1px solid rgba(var(--theme-quaternary-rgb), 0.18);
    border-radius: .55rem;
    padding: .75rem .5rem .6rem;
    background: var(--theme-tertiary);
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s;
    margin: 0;
    display: block;
}
.ptype-option:hover { border-color: rgba(var(--theme-quaternary-rgb), 0.4); }
.ptype-option.is-selected {
    border: 2px solid var(--theme-quaternary);
    background: rgba(var(--theme-quaternary-rgb), 0.08);
    padding-top: calc(.75rem - 1px);
    padding-bottom: calc(.6rem - 1px);
}
.ptype-option.is-disabled {
    opacity: .55;
    cursor: not-allowed;
}
.ptype-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.ptype-option__icon {
    font-size: 1.45rem;
    color: rgba(var(--theme-quaternary-rgb), 0.7);
    display: block;
    margin-bottom: .35rem;
}
.ptype-option.is-selected .ptype-option__icon { color: var(--theme-quaternary); }
.ptype-option__name {
    font-size: .9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}
.ptype-option__tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: rgba(var(--theme-quaternary-rgb), 0.55);
    cursor: help;
}
.ptype-option__tip-box {
    display: none;
    position: absolute;
    bottom: calc(100% + .4rem);
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background: var(--theme-tertiary);
    border: 1px solid rgba(var(--theme-quaternary-rgb), 0.18);
    border-radius: .5rem;
    padding: .55rem .65rem;
    font-size: .75rem;
    color: rgba(var(--theme-quaternary-rgb), 0.7);
    text-align: left;
    line-height: 1.4;
    box-shadow: 0 .4rem 1rem rgba(0,0,0,.12);
    z-index: 20;
    font-weight: 400;
}
.ptype-option__tip-box strong {
    display: block;
    color: var(--theme-quaternary);
    font-weight: 600;
}
.ptype-option__tip-box .ptip-row { margin-top: .35rem; }
.ptype-option__tip:hover .ptype-option__tip-box,
.ptype-option__tip:focus .ptype-option__tip-box,
.ptype-option__tip:focus-within .ptype-option__tip-box { display: block; }

.ptype-readonly-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    padding: .35rem .7rem;
    border-radius: .4rem;
    background: rgba(var(--theme-quaternary-rgb), 0.08);
    color: var(--theme-quaternary);
    font-weight: 500;
    border: 1px solid rgba(var(--theme-quaternary-rgb), 0.18);
}

.img-source-tabs {
    display: inline-flex;
    border: 1px solid rgba(var(--theme-quaternary-rgb), 0.18);
    border-radius: .4rem;
    overflow: hidden;
    margin-bottom: .5rem;
}
.img-source-tab {
    padding: .3rem .85rem;
    font-size: .8rem;
    background: var(--theme-tertiary);
    color: rgba(var(--theme-quaternary-rgb), 0.7);
    border: 0;
    cursor: pointer;
}
.img-source-tab.is-active {
    background: rgba(var(--theme-quaternary-rgb), 0.08);
    color: var(--theme-quaternary);
    font-weight: 500;
}
.img-url-row { display: flex; gap: .5rem; align-items: center; }
.img-url-row input { flex: 1; }

.media-primary-pill { display: none; }
.media-item.is-primary-media .media-primary-pill {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .7rem;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: rgba(var(--theme-quaternary-rgb), 0.12);
    color: var(--theme-quaternary);
    font-weight: 500;
    margin-bottom: .25rem;
}

.draft-banner {
    background: rgba(var(--theme-quaternary-rgb), 0.06);
    border: 1px solid rgba(var(--theme-quaternary-rgb), 0.18);
    border-radius: .5rem;
    padding: .55rem .75rem;
    font-size: .82rem;
    color: rgba(var(--theme-quaternary-rgb), 0.85);
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin-bottom: .75rem;
}
.draft-banner i { margin-top: .15rem; }

/* Course editor — Fase 2 (content banners, cobro pill, access radios) */
.content-type-banner {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .65rem .85rem;
    border-radius: .5rem;
    font-size: .85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    background: rgba(var(--theme-quaternary-rgb), 0.06);
    border: 1px solid rgba(var(--theme-quaternary-rgb), 0.18);
    color: rgba(var(--theme-quaternary-rgb), 0.85);
}
.content-type-banner i { margin-top: .15rem; flex-shrink: 0; }
.content-type-banner strong { color: var(--theme-quaternary); }

.cobro-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .7rem;
    margin-left: .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid rgba(var(--theme-quaternary-rgb), 0.25);
    background: rgba(var(--theme-quaternary-rgb), 0.04);
    color: rgba(var(--theme-quaternary-rgb), 0.75);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.cobro-pill i { font-size: .8rem; }
.cobro-pill:hover { border-color: var(--theme-quaternary); }
.cobro-pill--on {
    background: var(--theme-quaternary);
    border-color: var(--theme-quaternary);
    color: var(--theme-tertiary);
}
.cobro-pill--on:hover {
    background: rgba(var(--theme-quaternary-rgb), 0.85);
    color: var(--theme-tertiary);
}

.module-reorder-hint { font-size: .75rem; }

.access-mode-options {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin: .5rem 0 1rem;
}
.access-mode-option {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .7rem .85rem;
    border: 1px solid rgba(var(--theme-quaternary-rgb), 0.18);
    border-radius: .5rem;
    background: var(--theme-tertiary);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    margin: 0;
}
.access-mode-option:hover { border-color: rgba(var(--theme-quaternary-rgb), 0.4); }
.access-mode-option.is-selected {
    border: 2px solid var(--theme-quaternary);
    background: rgba(var(--theme-quaternary-rgb), 0.06);
    padding: calc(.7rem - 1px) calc(.85rem - 1px);
}
.access-mode-option input[type="radio"] {
    margin-top: .2rem;
    accent-color: var(--theme-quaternary);
    flex-shrink: 0;
}
.access-mode-info .access-mode-name { font-weight: 500; font-size: .9rem; }
.access-mode-info .access-mode-desc {
    font-size: .8rem;
    color: rgba(var(--theme-quaternary-rgb), 0.65);
    margin-top: .15rem;
    line-height: 1.4;
}

.access-banner {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .6rem .85rem;
    border-radius: .5rem;
    font-size: .85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}
.access-banner i { margin-top: .15rem; flex-shrink: 0; }
.access-banner strong { font-weight: 600; }
.access-banner--public {
    background: rgba(var(--theme-quaternary-rgb), 0.06);
    border: 1px solid rgba(var(--theme-quaternary-rgb), 0.18);
    color: rgba(var(--theme-quaternary-rgb), 0.85);
}
.access-banner--warning {
    background: rgba(250, 199, 117, 0.18);
    border: 1px solid rgba(250, 199, 117, 0.55);
    color: #6d3f06;
}
body.theme-mode-dark .access-banner--warning {
    background: rgba(250, 199, 117, 0.12);
    color: #f7d391;
}

/* Course editor — Fase 3 (AJAX swap busy state + flash toast) */
.ed-content-busy {
    position: relative;
    pointer-events: none;
}
.ed-content-busy::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.45);
    border-radius: .5rem;
    z-index: 5;
}
body.theme-mode-dark .ed-content-busy::after {
    background: rgba(0, 0, 0, 0.35);
}
.ed-flash-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1080;
    max-width: 360px;
    padding: .65rem 1rem;
    border-radius: .5rem;
    font-size: .85rem;
    line-height: 1.4;
    box-shadow: 0 .4rem 1rem rgba(0,0,0,.15);
    transition: opacity .5s ease;
    opacity: 1;
}
.ed-flash-toast--success {
    background: var(--theme-quaternary);
    color: var(--theme-tertiary);
}
.ed-flash-toast--error {
    background: #a32d2d;
    color: #fff;
}
/* ─────────────────────────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════════════════ */
/* Cover images — grid card layout                                            */

.cover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}
.cover-grid .media-item {
    /* Override the legacy horizontal-row layout from .ed-media-list. */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 0;
    border: 1px solid rgba(var(--theme-quaternary-rgb), 0.18);
    background: var(--theme-tertiary);
    border-radius: .55rem;
    overflow: hidden;
    margin: 0;
    position: relative;
}
.cover-grid .media-item .media-grip {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border-radius: 50%;
    cursor: grab;
    font-size: .75rem;
    opacity: 0;
    transition: opacity .15s;
}
.cover-grid .media-item:hover .media-grip,
.cover-grid .media-item:focus-within .media-grip { opacity: 1; }
.cover-grid .media-item .media-preview {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 100px;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(var(--theme-quaternary-rgb), 0.08);
    position: relative;
}
.cover-grid .media-item .media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cover-grid .media-item .media-preview__placeholder {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: rgba(var(--theme-quaternary-rgb), 0.4);
}
.cover-grid .media-item .media-preview.is-empty img { display: none; }
.cover-grid .media-item .media-preview.is-empty .media-preview__placeholder { display: flex; }

/* Principal badge — overlay top-left, only on the first card */
.cover-grid .media-item .cover-card__badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 3;
    display: none;
    align-items: center;
    gap: .25rem;
    background: var(--theme-quaternary);
    color: var(--theme-tertiary);
    font-size: .68rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}
.cover-grid .media-item .cover-card__badge i { font-size: .65rem; }
.cover-grid .media-item.is-primary-media .cover-card__badge { display: inline-flex; }

/* Override Fase-1 media-primary-pill: replaced by the overlay badge. */
.cover-grid .media-item .media-primary-pill { display: none !important; }

/* Remove (X) — overlay bottom-right of preview */
.cover-grid .media-item .cover-card__remove {
    position: absolute;
    bottom: 6px;
    right: 6px;
    z-index: 3;
    width: 26px;
    height: 26px;
    border: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    transition: background .15s, transform .15s;
}
.cover-grid .media-item .cover-card__remove:hover {
    background: #a32d2d;
    transform: scale(1.05);
}

/* Per-card upload overlay (progress / error) on top of preview */
.cover-grid .media-item .cover-upload-progress {
    position: absolute;
    inset: auto 6px 6px 6px;
    z-index: 2;
    min-width: 0 !important;
    padding: .4rem .55rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: .4rem;
    font-size: .7rem;
}
.cover-grid .media-item .cover-upload-progress .progress {
    background: rgba(255, 255, 255, 0.25);
}
.cover-grid .media-item .cover-progress-label { color: #fff; }
.cover-grid .media-item .cover-upload-error {
    position: absolute;
    inset: auto 6px 6px 6px;
    z-index: 2;
    padding: .35rem .55rem;
    background: #a32d2d;
    color: #fff;
    border-radius: .4rem;
    font-size: .7rem;
}

/* Footer row inside the card (type select) */
.cover-grid .media-item .cover-card__footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 8px;
}
.cover-grid .media-item .cover-card__footer .form-select {
    font-size: .75rem;
    padding: .2rem 1.6rem .2rem .55rem;
    background-position: right .45rem center;
    background-size: .75rem;
    flex: 1;
    min-width: 0;
}
.cover-grid .media-item .cover-card__footer .media-type-badge {
    font-size: .7rem;
    font-weight: 500;
    padding: .25rem .6rem;
    letter-spacing: .01em;
}

/* Hidden controls inside the card (URL hidden input, radio, file input,
   manual upload button — kept in DOM to preserve existing JS contracts). */
.cover-grid .media-item input[name="mediaUrls"],
.cover-grid .media-item input[name="primaryIndex"],
.cover-grid .media-item .cover-upload-btn { display: none !important; }

/* Dropzone for "Desde dispositivo" tab */
.cover-dropzone {
    border: 1.5px dashed rgba(var(--theme-quaternary-rgb), 0.35);
    border-radius: .55rem;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: var(--theme-tertiary);
}
.cover-dropzone:hover,
.cover-dropzone.is-dragover {
    border-color: var(--theme-quaternary);
    background: rgba(var(--theme-quaternary-rgb), 0.05);
}
.cover-dropzone .cover-dropzone__icon {
    font-size: 1.4rem;
    color: rgba(var(--theme-quaternary-rgb), 0.55);
    margin-bottom: .25rem;
    display: block;
}
.cover-dropzone p {
    margin: 0 0 .15rem;
    font-size: .85rem;
    color: rgba(var(--theme-quaternary-rgb), 0.85);
}
.cover-dropzone .cover-dropzone__link {
    color: var(--theme-quaternary);
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
}
.cover-dropzone small {
    font-size: .7rem;
    color: rgba(var(--theme-quaternary-rgb), 0.55);
    display: block;
}

/* "Desde URL" row */
.cover-add .img-url-row {
    display: flex;
    gap: .5rem;
    align-items: center;
}
.cover-add .img-url-row input { flex: 1; }

/* When the grid is empty, hint inside the dropzone area */
.cover-grid:empty + .cover-add .cover-dropzone {
    padding: 24px 14px;
}
/* ─────────────────────────────────────────────────────────────────────────── */

/* Homepage redesign */
.home-hero-fullbleed {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 0;
    padding-top: 0;
}
#inicio.home-hero-fullbleed {
    margin-top: 0;
}
.home-hero-fullbleed .home-hero-banner {
    border-radius: 0;
    width: 100%;
    padding: 4rem 2rem;
}

.home-rubro-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    background: var(--theme-primary, #a8cec8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    margin: 0 auto 0.85rem;
}

/* Section alternating backgrounds — full-bleed light tones, flush stacking.
   padding-inline uses max() to center the content area at 1140px on wide
   viewports regardless of children (covers #catalogo / #quienes / #contacto
   whose direct child is a Bootstrap .container that doesn't auto-center
   inside a full-bleed parent). */
#homeScroll > .scroll-section:not(#inicio) {
    width: 100vw;
    max-width: none;
    margin-left: calc(-50vw + 50%);
    margin-top: 0;
    margin-bottom: 0;
    padding-block: 4rem;
    padding-inline: max(1.5rem, calc((100vw - 1140px) / 2));
    border-radius: 0;
}

/* Ritmo de fondos: alternancia limpia blanco ↔ off-white del body (rubro-proof,
   sin el tinte primary@7% que se veía gris en rubros de primario apagado).
   Orden del layout rubro: como(A) catalogo(B) rubros(A) beneficios(B) docentes(A)
   top-calificaciones(B) quienes(A) → cierra con el CTA oscuro. */
#homeScroll > #como-funciona,
#homeScroll > #rubros,
#homeScroll > #docentes,
#homeScroll > #quienes,
#homeScroll > #contacto {
    background: #ffffff;
}

#homeScroll > #catalogo,
#homeScroll > #beneficios,
#homeScroll > #top-calificaciones {
    background: var(--theme-background, #faf7f4);
}

@media (max-width: 768px) {
    #homeScroll > .scroll-section:not(#inicio) {
        padding-block: 2.5rem;
        padding-inline: 1.25rem;
    }
}

/* Desktop content width — let homepage sections fill the layout container
   instead of double-constraining via the inner Bootstrap .container. */
.home-how-section,
.home-rubros-section,
.home-benefits-section,
.home-catalog-section {
    width: 100%;
}

.home-how-section > .container,
.home-rubros-section > .container,
.home-benefits-section > .container,
.home-catalog-section > .container {
    max-width: 100%;
    width: 100%;
}

@media (min-width: 769px) {
    .home-how-section > .container,
    .home-rubros-section > .container,
    .home-benefits-section > .container,
    .home-catalog-section > .container {
        max-width: min(100%, 1140px);
    }
}

/* Center direct children of full-bleed home sections (covers cases like
   #catalogo and #quienes that don't have an inner Bootstrap .container). */
#homeScroll > .scroll-section:not(#inicio) > * {
    max-width: 1140px;
    margin-inline: auto;
}

@media (max-width: 768px) {
    .home-how-steps {
        flex-direction: column;
        gap: 1rem;
    }

    .home-how-step {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        text-align: left;
    }

    .home-how-connector {
        display: none;
    }

    .catalog-tab-panel .carousel-track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .catalog-tab-panel .carousel-track::-webkit-scrollbar {
        display: none;
    }

    .catalog-tab-panel .carousel-track > * {
        scroll-snap-align: start;
        min-width: 200px;
        flex-shrink: 0;
    }

    .home-benefits-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* ============================================================
 * Settings editor — shared "tt-*" patterns
 * Used by:
 *   - Views/TenantTemplate/Edit.cshtml
 *   - Views/Home/DesignSettings.cshtml
 *   - Views/Home/TextSettings.cshtml
 * ============================================================ */
.tt-section-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0 1rem;
    color: var(--theme-text-muted, #6b7280);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.tt-section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--theme-control-border, rgba(0,0,0,0.12));
}
.tt-card {
    background: var(--theme-tertiary, #ffffff);
    border-radius: var(--theme-radius-md, 14px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0,0,0,0.08));
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.tt-card__header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--theme-control-border, rgba(0,0,0,0.08));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.tt-card__title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--theme-text-title-on-surface, #1f2937);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.tt-card__title i {
    color: var(--theme-primary, #0ea5e9);
}
.tt-card__subtitle {
    font-size: 0.78rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
    margin: 0.25rem 0 0;
}
.tt-card__body {
    padding: 1.25rem;
}
.tt-color-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--theme-control-bg, rgba(0,0,0,0.04));
    border-radius: var(--theme-radius-sm, 8px);
    margin-bottom: 1.25rem;
}
.tt-color-strip__chip {
    width: 36px;
    height: 36px;
    border-radius: var(--theme-radius-sm, 8px);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.tt-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.85rem;
}
.tt-color-card {
    padding: 0.75rem;
    background: var(--theme-control-bg, rgba(0,0,0,0.03));
    border-radius: var(--theme-radius-sm, 8px);
    border: 1px solid var(--theme-control-border, rgba(0,0,0,0.08));
}
.tt-color-card__swatch {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: var(--theme-radius-sm, 8px);
    cursor: pointer;
    background-color: transparent;
}
.tt-color-card__swatch::-webkit-color-swatch-wrapper { padding: 0; border-radius: var(--theme-radius-sm, 8px); }
.tt-color-card__swatch::-webkit-color-swatch { border: none; border-radius: var(--theme-radius-sm, 8px); }
.tt-color-card__swatch::-moz-color-swatch { border: none; border-radius: var(--theme-radius-sm, 8px); }
.tt-color-card__label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-text-title-on-surface, #1f2937);
}
.tt-color-card__hint {
    display: block;
    font-size: 0.72rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
    margin-bottom: 0.45rem;
    line-height: 1.25;
}
.tt-color-card__hex {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    background: var(--theme-control-bg-focus, rgba(0,0,0,0.06));
    border: 1px solid var(--theme-control-border, rgba(0,0,0,0.1));
    border-radius: var(--theme-radius-sm, 6px);
    padding: 0.35rem 0.55rem;
    color: var(--theme-control-text, #111827);
}
.tt-color-card__hex:focus {
    outline: none;
    border-color: var(--theme-control-border-focus, var(--theme-primary, #0ea5e9));
    background: var(--theme-control-bg, rgba(0,0,0,0.04));
}
.tt-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.tt-field-grid--three {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.tt-field-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.tt-field label.form-label,
.tt-field > label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--theme-text-title-on-surface, #1f2937);
}
.tt-field .tt-field__hint,
.tt-field .form-text {
    display: block;
    font-size: 0.72rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
    margin-bottom: 0.4rem;
    line-height: 1.3;
}
.tt-text-entry { padding-top: 0.85rem; }
.tt-text-entry + .tt-text-entry {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--theme-control-border, rgba(0,0,0,0.08));
}
.tt-text-entry__title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--theme-text-title-on-surface, #1f2937);
}
.tt-text-entry__title small {
    display: block;
    font-weight: 400;
    font-size: 0.72rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
}
.tt-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.85rem;
    color: var(--theme-text-title-on-surface, #1f2937);
    margin: 0;
}
.tt-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.tt-toggle__track {
    position: relative;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: var(--theme-control-border, rgba(0,0,0,0.2));
    transition: background-color 0.15s ease;
}
.tt-toggle__track::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: transform 0.15s ease;
}
/* Hermano general (~) en vez de adyacente (+): el <input hidden> del fallback
   bool queda entre el checkbox y el track, así que el track ya no es adyacente. */
.tt-toggle input:checked ~ .tt-toggle__track {
    background: var(--theme-primary, #0ea5e9);
}
.tt-toggle input:checked ~ .tt-toggle__track::after {
    transform: translateX(16px);
}
.tt-toggle-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}
.tt-section-hint {
    font-size: 0.75rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.75rem 0 0.5rem;
}
.tt-drag-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.tt-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    background: var(--theme-control-bg, rgba(0,0,0,0.03));
    border: 1px solid var(--theme-control-border, rgba(0,0,0,0.08));
    border-radius: var(--theme-radius-sm, 8px);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tt-item.dragging { opacity: 0.35; }
.tt-item.drag-over {
    border-color: var(--theme-primary, #0ea5e9);
    box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}
.tt-item__handle {
    background: var(--theme-control-bg-focus, rgba(0,0,0,0.05));
    border-right: 1px solid var(--theme-control-border, rgba(0,0,0,0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.6));
}
.tt-item__handle:active { cursor: grabbing; }
.tt-item__body {
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.tt-item__row {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 0.75rem;
}
@media (max-width: 720px) {
    .tt-item__row { grid-template-columns: 1fr; }
}
.tt-item__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
}
.tt-icon-picker { position: relative; }
.tt-icon-picker__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--theme-control-bg, rgba(0,0,0,0.04));
    border: 1px solid var(--theme-control-border, rgba(0,0,0,0.12));
    border-radius: var(--theme-radius-sm, 8px);
    color: var(--theme-control-text, #111827);
    cursor: pointer;
    font-size: 0.9rem;
}
.tt-icon-picker__button i { font-size: 1.05rem; }
.tt-icon-picker__dropdown {
    position: fixed;
    z-index: 1080;
    width: 320px;
    background: var(--theme-tertiary, #ffffff);
    border: 1px solid var(--theme-control-border, rgba(0,0,0,0.12));
    border-radius: var(--theme-radius-md, 12px);
    box-shadow: var(--theme-shadow-2, 0 8px 24px rgba(0,0,0,0.15));
    padding: 0.65rem;
    display: none;
}
.tt-icon-picker__dropdown.open { display: block; }
.tt-icon-picker__search {
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--theme-control-border, rgba(0,0,0,0.12));
    border-radius: var(--theme-radius-sm, 6px);
    background: var(--theme-control-bg, rgba(0,0,0,0.03));
    color: var(--theme-control-text, #111827);
}
.tt-icon-picker__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    max-height: 240px;
    overflow-y: auto;
}
.tt-icon-picker__option {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--theme-radius-sm, 6px);
    color: var(--theme-control-text, #111827);
    cursor: pointer;
    font-size: 1rem;
}
.tt-icon-picker__option:hover {
    background: var(--theme-control-bg, rgba(0,0,0,0.05));
}
.tt-icon-picker__option.selected {
    background: rgba(34,197,94,0.12);
    border-color: var(--theme-primary, #0ea5e9);
}
.tt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.tt-color-picker-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.tt-color-picker-row input[type="color"] {
    flex: 0 0 44px;
    width: 44px;
    height: 38px;
    padding: 2px;
    border-radius: var(--theme-radius-sm, 6px);
    border: 1px solid var(--theme-control-border, rgba(0,0,0,0.12));
    cursor: pointer;
    background: transparent;
}
.tt-upload-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

/* ============================================================
 * Editor de textos por página — "tt-editor" (Views/Home/TextSettings)
 * Rail de páginas + mapa esquemático del sitio público + barra de
 * guardado fija. Todo dentro de un único <form>: cambiar de página
 * es mostrar/ocultar, nunca navegar (no se pierden cambios).
 *
 * Los círculos numerados usan primary-strong + on-primary (par con
 * contraste garantizado en ambos modos); brand-accent queda para
 * texto/íconos SOBRE superficie, que es para lo que está calculado.
 * ============================================================ */
.tt-editor {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.tt-editor__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

/* --- Rail de páginas (escritorio) --- */
.tt-pagerail {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.tt-pagerail__eyebrow {
    padding: 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
}
.tt-pagerail__list {
    background: var(--theme-tertiary, #ffffff);
    border-radius: var(--theme-radius-md, 14px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0,0,0,0.08));
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tt-pagerail__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: var(--theme-radius-sm, 8px);
    background: transparent;
    color: var(--theme-text-title-on-surface, #1f2937);
    cursor: pointer;
    text-align: left;
    transition: background-color 0.16s ease;
}
.tt-pagerail__item i {
    width: 18px;
    font-size: 0.82rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
}
.tt-pagerail__label {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 600;
}
.tt-pagerail__count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
}
.tt-pagerail__item:hover {
    background: var(--theme-page-bg, #f5f6f8);
}
.tt-pagerail__item.is-active {
    background: color-mix(in srgb, var(--theme-primary, #9ed0c5) 13%, var(--theme-surface, #fff));
    box-shadow: inset 3px 0 0 var(--theme-primary, #9ed0c5);
}
.tt-pagerail__item.is-active .tt-pagerail__label {
    font-weight: 700;
    color: var(--theme-text-title-on-surface, #1f2937);
}
.tt-pagerail__item.is-active i {
    color: var(--theme-brand-accent, var(--theme-primary, #9ed0c5));
}
/* brand-accent está calibrado a 4.5:1 sobre SURFACE; acá cae sobre el tinte de
   marca del ítem activo y bajaba a 4.48:1 en 11.5px. Empujarlo hacia on-surface
   lo corrige en los dos modos (en claro oscurece, en oscuro aclara). */
.tt-pagerail__item.is-active .tt-pagerail__count {
    color: color-mix(in srgb, var(--theme-brand-accent, var(--theme-primary, #9ed0c5)) 85%, var(--theme-on-surface, #1b1f27));
}
.tt-pagerail__sep {
    height: 1px;
    margin: 6px 10px;
    background: var(--theme-control-border, rgba(0,0,0,0.08));
}

/* --- Chips de página (móvil) --- */
.tt-pagechips {
    display: none;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    margin-bottom: 0.75rem;
    scrollbar-width: none;
}
.tt-pagechips::-webkit-scrollbar { display: none; }
.tt-pagechips__chip {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 9px 16px;
    border-radius: var(--theme-radius-pill, 999px);
    border: 1px solid var(--theme-control-border, rgba(0,0,0,0.12));
    background: var(--theme-tertiary, #ffffff);
    color: var(--theme-text-title-on-surface, #1f2937);
    font-size: 0.845rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.tt-pagechips__chip.is-active {
    background: var(--theme-on-surface, #1b1f27);
    border-color: var(--theme-on-surface, #1b1f27);
    color: var(--theme-surface, #ffffff);
    font-weight: 700;
}

/* --- Encabezado de la página elegida --- */
.tt-page[hidden] { display: none; }
.tt-page {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}
.tt-page__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--theme-text-title-on-surface, #1f2937);
}
.tt-page__title i { color: var(--theme-primary, #9ed0c5); }
.tt-page__hint {
    margin: 6px 0 0;
    font-size: 0.9375rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
}

/* --- Mapa esquemático de la página pública --- */
.tt-map {
    background: var(--theme-tertiary, #ffffff);
    border-radius: var(--theme-radius-md, 14px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0,0,0,0.08));
    overflow: hidden;
}
.tt-map__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 14px 20px;
    border: 0;
    border-bottom: 1px solid var(--theme-control-border, rgba(0,0,0,0.08));
    background: transparent;
    text-align: left;
    color: inherit;
    cursor: default;
}
.tt-map__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-text-title-on-surface, #1f2937);
}
.tt-map__title i { color: var(--theme-primary, #9ed0c5); }
.tt-map__legend {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
}
.tt-map__chevron {
    display: none;
    font-size: 0.75rem;
    opacity: 0.55;
}
.tt-map__body {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px 20px;
}
.tt-map.is-collapsed .tt-map__body { display: none; }
.tt-band {
    grid-column: span 4;
    border: 1.5px solid var(--theme-control-border, rgba(0,0,0,0.12));
    border-radius: var(--theme-radius-sm, 8px);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: inherit;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}
.tt-band--span2 { grid-column: span 2; }
.tt-band--big { padding: 14px; }
.tt-band__num {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: var(--theme-radius-pill, 999px);
    background: var(--theme-primary-strong, var(--theme-primary, #9ed0c5));
    color: var(--theme-on-primary, #fff);
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tt-band__label {
    font-size: 0.845rem;
    font-weight: 600;
    color: var(--theme-text-title-on-surface, #1f2937);
}
.tt-band--big .tt-band__label { font-size: 0.875rem; font-weight: 700; }
.tt-band__note {
    font-size: 0.78rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
}
.tt-band:hover {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.16);
}
.tt-band.is-selected {
    border-color: var(--theme-brand-accent, var(--theme-primary, #9ed0c5));
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.3);
}
.tt-band.is-off {
    border-style: dashed;
    border-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.16);
    background: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.03);
    opacity: 0.75;
}
.tt-band.is-off .tt-band__num {
    /* El número apagado va sobre un tinte del propio on-surface: el texto tiene
       que ser on-surface, no surface (en oscuro daba 2.6:1). */
    background: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.3);
    color: var(--theme-on-surface, #1b1f27);
}
.tt-band.is-off .tt-band__label { color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7)); }
.tt-band__off {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
    display: none;
    align-items: center;
    gap: 5px;
}
.tt-band.is-off .tt-band__off { display: inline-flex; }
.tt-band__chevron {
    display: none;
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.5;
}
.tt-band.is-off .tt-band__chevron { display: none !important; }
/* Zonas del sitio que esta pantalla no edita (encabezado, pie, formulario). */
.tt-band--chrome {
    border: 1px dashed rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.18);
    background: transparent;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
    cursor: default;
}
.tt-band--chrome:hover { background: transparent; }
.tt-band--chrome .tt-band__note { margin-left: auto; }

/* --- Tarjeta: círculo numerado + bajada --- */
.tt-card__num {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: var(--theme-radius-pill, 999px);
    background: var(--theme-primary-strong, var(--theme-primary, #9ed0c5));
    color: var(--theme-on-primary, #fff);
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tt-card__headtext { flex: 1; min-width: 0; }
.tt-card.is-focused {
    outline: 2px solid var(--theme-primary, #9ed0c5);
    box-shadow: var(--theme-shadow-2, 0 8px 24px rgba(0,0,0,0.15));
}
.tt-card__chevron {
    display: none;
    font-size: 0.75rem;
    opacity: 0.55;
}
.tt-card__body--stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
/* Tarjeta que es solo encabezado (ej.: el interruptor de visibilidad en Google). */
.tt-card--headeronly .tt-card__header { border-bottom: 0; }
.tt-field__labelrow {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}
.tt-field__labelrow label.form-label { margin-bottom: 0; }
.tt-field__counter {
    font-size: 0.72rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
    font-variant-numeric: tabular-nums;
}
.tt-field textarea.form-control { resize: none; }

/* --- Fila de ítem colapsada (se expande con "Editar") --- */
.tt-item__summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    min-width: 0;
}
.tt-item__thumb {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: var(--theme-radius-sm, 8px);
    background: var(--theme-tertiary, #ffffff);
    border: 1px solid var(--theme-control-border, rgba(0,0,0,0.12));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-brand-accent, var(--theme-primary, #9ed0c5));
}
.tt-item__thumb i { color: inherit; }
.tt-item__summary-text { flex: 1; min-width: 0; }
.tt-item__summary-title {
    font-size: 0.905rem;
    font-weight: 700;
    color: var(--theme-text-title-on-surface, #1f2937);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tt-item__summary-body {
    font-size: 0.78rem;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tt-item__order {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
}
.tt-item__edit {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    /* Mismo caso que el contador del rail: brand-accent sobre el tinte de la
       fila daba 4.34:1. Ver la nota en .tt-pagerail__item.is-active .tt-pagerail__count. */
    color: color-mix(in srgb, var(--theme-brand-accent, var(--theme-primary, #9ed0c5)) 85%, var(--theme-on-surface, #1b1f27));
    cursor: pointer;
}
.tt-item__body { display: none; }
.tt-item.is-expanded .tt-item__body { display: flex; }
.tt-item.is-expanded .tt-item__summary-body,
.tt-item.is-expanded .tt-item__thumb { opacity: 0.6; }

/* --- Campos avanzados (legacy) plegados --- */
.tt-advanced__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-radius: var(--theme-radius-sm, 8px);
    background: var(--theme-page-bg, #f5f6f8);
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7));
    font-size: 0.8125rem;
    cursor: pointer;
    text-align: left;
}
.tt-advanced__toggle i { font-size: 0.7rem; transition: transform 0.16s ease; }
.tt-advanced.is-open .tt-advanced__toggle i { transform: rotate(90deg); }
.tt-advanced__note { margin-left: auto; font-size: 0.75rem; }
.tt-advanced__body { display: none; padding-top: 1rem; }
.tt-advanced.is-open .tt-advanced__body { display: block; }

/* --- Íconos: escapar de la regla global i.fa-solid (0,2,1) ---
 * `i.fa-solid:not([class*="text-"])` (site.css ~305) pinta CUALQUIER ícono con
 * --theme-primary crudo, que sobre superficie clara da 1.8:1. Los íconos del
 * editor que son parte de un texto (chevrons, punto de estado, ojo tachado,
 * manija, cuadrado de ítem) tienen que tomar el color de su contenedor.
 * Mismo patrón que la excepción ya documentada de `.badge.text-bg-primary i`.
 * Los íconos de los títulos (fa-file-lines, fa-map) SÍ van con la marca, igual
 * que en el resto del panel. */
.tt-pagerail__item i {
    color: var(--theme-text-muted-on-surface, rgba(31,41,55,0.7)) !important;
}
.tt-pagerail__item.is-active i {
    color: var(--theme-brand-accent, var(--theme-primary, #9ed0c5)) !important;
}
.tt-item__thumb i,
.tt-item__handle i,
.tt-band__off i,
.tt-band__chevron,
.tt-card__chevron,
.tt-map__chevron,
.tt-savebar__status i,
.tt-advanced__toggle i,
.tt-pagechips__chip i {
    color: inherit !important;
}

/* --- Barra de guardado fija --- */
.tt-savebar {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-top: 0.25rem;
    padding: 14px 20px;
    border-radius: var(--theme-radius-md, 14px) var(--theme-radius-md, 14px) 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(var(--theme-surface-rgb, 255, 255, 255), 0.94);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--theme-control-border, rgba(0,0,0,0.1));
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
}
.tt-savebar__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-success, #157347);
}
.tt-savebar__status i { font-size: 0.56rem; }
.tt-savebar.is-dirty .tt-savebar__status { color: var(--theme-warning, #8a6400); }
.tt-savebar__actions {
    margin-left: auto;
    display: inline-flex;
    gap: 0.625rem;
}
.tt-savebar .btn { min-height: calc(2.35rem + 2px); }
.tt-savebar__discard {
    border: 1px solid rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.15);
    background: transparent;
    color: var(--theme-text-title-on-surface, #1f2937);
}

/* --- Móvil (<992px): chips, mapa plegable, acordeón de tarjetas --- */
@media (max-width: 991.98px) {
    .tt-editor { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .tt-pagerail { display: none; }
    .tt-pagechips { display: flex; }

    .tt-page__title { font-size: 1.3rem; }

    .tt-map__header { min-height: 44px; cursor: pointer; }
    .tt-map__legend { display: none; }
    .tt-map__chevron { display: inline-block; margin-left: auto; }
    .tt-map__body { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 0 16px 16px; }
    .tt-band { grid-column: span 2; min-height: 44px; padding: 12px; }
    .tt-band__note { display: none; }
    .tt-band--chrome .tt-band__note { display: inline; }
    .tt-band__chevron { display: inline-block; }

    /* Acordeón: solo la tarjeta abierta muestra su cuerpo. */
    .tt-card__header { min-height: 44px; cursor: pointer; }
    .tt-card__chevron { display: inline-block; }
    .tt-card:not(.is-open) .tt-card__header { border-bottom-color: transparent; }
    .tt-card:not(.is-open) .tt-card__body { display: none; }
    .tt-card__title { font-size: 0.9375rem; font-weight: 700; }
    .tt-card__num {
        background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
        color: var(--theme-text-title-on-surface, #1f2937);
    }
    .tt-card.is-open .tt-card__num {
        background: var(--theme-primary-strong, var(--theme-primary, #9ed0c5));
        color: var(--theme-on-primary, #fff);
    }

    /* 16px evita el zoom automático de iOS al enfocar un campo. */
    .tt-editor .form-control {
        font-size: 16px;
        min-height: 44px;
        padding: 10px 14px;
    }

    .tt-item__summary { min-height: 44px; padding: 10px 12px; }
    .tt-item__thumb { width: 32px; height: 32px; }
    .tt-item__summary-body { display: none; }

    .tt-savebar {
        padding: 10px 16px;
    }
    .tt-savebar__status { font-size: 0.78rem; }
    .tt-savebar__discard { display: none; }
    /* Por encima de la bottom-nav flotante del workspace (56px + 0.75rem). */
    body.teacher-workspace-body .tt-savebar { bottom: calc(0.75rem + 56px); }
}

/* Sweet Dreams Arte — product detail (rediseño) */
.course-public-detail {
  --sda-mint: #8dc4b0;
  --sda-deep-green: #3a7a5a;
  --sda-deep-green-hover: #2f6549;
  --sda-canvas: #f2eef7;
  --sda-card-bg: #ffffff;
  --sda-card-border: rgba(58, 122, 90, 0.12);
  --sda-text: #1f2a24;
  --sda-text-soft: #4f5a55;
  --sda-text-muted: #7a857f;
  --sda-font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sda-font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--sda-canvas);
  font-family: var(--sda-font-sans);
  color: var(--sda-text);
  padding-top: 1rem;
  padding-bottom: 3rem;
}
.course-public-detail h1,
.course-public-detail h2,
.course-public-detail h3,
.course-public-detail h4 { font-family: var(--sda-font-serif); color: var(--sda-text); }

/* Hero */
.course-public-hero {
  position: relative;
  background: var(--sda-mint);
  border-radius: 18px;
  padding: 1.75rem 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.course-public-hero-body { position: relative; z-index: 2; max-width: 64%; }
.course-public-hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.course-public-hero-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--sda-font-sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .35rem .7rem; border-radius: 999px;
}
.course-public-hero-badge--type { background: rgba(255,255,255,0.85); color: var(--sda-deep-green); }
.course-public-hero-badge--status-open { background: var(--sda-deep-green); color: #fff; }
.course-public-hero-badge--status-closed { background: #b34a4a; color: #fff; }
.course-public-hero-title {
  font-family: var(--sda-font-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 600;
  margin: 0 0 .5rem;
  color: var(--sda-text);
  line-height: 1.15;
}
.course-public-hero-title em { font-style: italic; }
.course-public-hero-tagline {
  font-size: .98rem;
  color: var(--sda-text-soft);
  margin-bottom: .9rem;
  max-width: 36rem;
}
.course-public-hero-stats {
  display: flex; flex-wrap: wrap; gap: 1.2rem;
  font-size: .85rem; color: var(--sda-text-soft);
}
.course-public-hero-stats span { display: inline-flex; align-items: center; gap: .35rem; }
/* !important: si no, gana la regla global de íconos FA (site.css ~301). */
.course-public-hero-stats .fa-star { color: var(--theme-star-color, #f4b400) !important; }
.course-public-hero-cover {
  position: absolute;
  right: 1.25rem; top: 1.25rem; bottom: 1.25rem;
  width: clamp(150px, 28%, 220px);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  z-index: 1;
  background: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.course-public-hero-cover img { width: 100%; height: 100%; object-fit: contain; display: block; padding: .35rem; }
.course-public-hero-cover-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.6));
  color: var(--sda-deep-green); font-size: 2.2rem;
}
@media (max-width: 767.98px) {
  .course-public-hero { padding-right: 1.25rem; padding-bottom: 1.25rem; }
  .course-public-hero-body { max-width: 100%; padding-right: 130px; }
  .course-public-hero-cover { width: 110px; right: .9rem; top: .9rem; bottom: auto; height: 110px; }
}

/* Layout */
.course-public-layout { row-gap: 1rem; }
.course-public-purchase-card { position: sticky; top: 1rem; }
@media (max-width: 991.98px){ .course-public-purchase-card { position: static; } }

/* Content cards */
.course-public-section {
  background: var(--sda-card-bg);
  border: 1px solid var(--sda-card-border);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(58, 122, 90, 0.04);
}
.course-public-section h3 {
  font-family: var(--sda-font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 .9rem;
  display: flex; align-items: center; gap: .55rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid rgba(58, 122, 90, 0.1);
}
.course-public-section h3 i { color: var(--sda-deep-green); font-size: .95rem; }
.course-public-section ul { margin: 0; padding-left: 0; list-style: none; }
.course-public-section li { margin-bottom: .55rem; padding-left: 1.2rem; position: relative; color: var(--sda-text); }
.course-public-section li::before {
  content: "";
  position: absolute; left: 0; top: .55rem;
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--sda-deep-green);
}
.course-public-checklist { list-style: none; padding-left: 0; margin: 0; }
.course-public-checklist li {
  padding-left: 0;
  display: flex; gap: .6rem; align-items: flex-start;
  margin-bottom: .5rem;
  color: var(--sda-text);
}
.course-public-checklist li::before { display: none; }
.course-public-checklist li i { color: var(--sda-deep-green); margin-top: .2rem; }
.course-public-pre { white-space: pre-line; margin: 0; color: var(--sda-text-soft); line-height: 1.6; }

/* Modules grid */
.course-public-modules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .65rem;
  margin-bottom: .6rem;
}
@media (max-width: 575.98px) { .course-public-modules-grid { grid-template-columns: 1fr; } }
.course-public-module {
  background: #f7f3fb;
  border: 1px solid rgba(58, 122, 90, 0.08);
  border-radius: 10px;
  padding: .65rem .8rem;
  font-size: .85rem;
}
.course-public-module-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--sda-deep-green);
  text-transform: uppercase;
  margin-bottom: .2rem;
}
.course-public-module-title { font-weight: 500; color: var(--sda-text); margin-bottom: .15rem; }
.course-public-module-duration { color: var(--sda-text-muted); font-size: .78rem; }
.course-public-modules-total {
  background: rgba(58, 122, 90, 0.06);
  border: 1px solid rgba(58, 122, 90, 0.15);
}
.course-public-modules-total .course-public-module-label { color: var(--sda-deep-green); }
.course-public-modules-total .course-public-module-title { font-weight: 600; }

/* Purchase card */
.course-public-purchase-card {
  background: transparent;
  border: none;
  box-shadow: none;
}
.course-public-purchase-card .card-body { padding: 0; }
.course-public-price-card {
  background: var(--sda-deep-green);
  color: #fff;
  border-radius: 14px 14px 0 0;
  padding: 1.1rem 1.25rem;
  text-align: center;
}
.course-public-price-card-label {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  opacity: .9; margin-bottom: .25rem;
}
.course-public-price-card-amount {
  font-family: var(--sda-font-serif);
  font-size: 2rem; font-weight: 600; line-height: 1.1;
}
.course-public-price-card-note {
  font-size: .78rem; opacity: .85; margin-top: .3rem;
}
.course-public-purchase-actions {
  background: var(--sda-card-bg);
  border: 1px solid var(--sda-card-border);
  border-top: none;
  border-radius: 0 0 14px 14px;
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 2px 8px rgba(58, 122, 90, 0.04);
}
.course-public-deadline-alert {
  background: #f0f7f3;
  border: 1px solid rgba(58, 122, 90, 0.22);
  color: var(--sda-deep-green);
  border-radius: 10px;
  padding: .55rem .75rem;
  font-size: .82rem;
  margin-bottom: .8rem;
  display: flex; align-items: center; gap: .4rem;
}
.course-public-cta-primary {
  background: var(--sda-deep-green);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: .65rem 1rem;
  font-weight: 600;
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.course-public-cta-primary:hover { background: var(--sda-deep-green-hover); color: #fff; }
.course-public-cta-primary:disabled { background: rgba(58, 122, 90, 0.35); cursor: not-allowed; }
.course-public-cta-secondary {
  background: transparent;
  color: var(--sda-deep-green);
  border: 1px solid var(--sda-deep-green);
  border-radius: 999px;
  padding: .55rem 1rem;
  font-weight: 600;
  width: 100%;
  margin-top: .5rem;
}
.course-public-cta-secondary:hover { background: rgba(58, 122, 90, 0.08); color: var(--sda-deep-green); }
.course-public-enrollment-status {
  margin-top: .65rem;
  font-size: .8rem;
  color: var(--sda-text-muted);
  text-align: center;
}

/* Details panel */
.course-public-details-panel {
  background: var(--sda-card-bg);
  border: 1px solid var(--sda-card-border);
  border-radius: 14px;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 8px rgba(58, 122, 90, 0.04);
}
.course-public-details-panel h4 {
  font-family: var(--sda-font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 .65rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(58, 122, 90, 0.1);
}
.course-public-details-list { list-style: none; padding: 0; margin: 0; }
.course-public-details-list li {
  display: flex; align-items: center; justify-content: space-between;
  gap: .65rem;
  padding: .35rem 0;
  font-size: .85rem;
}
.course-public-details-list li i { color: var(--sda-deep-green); width: 1.1rem; }
.course-public-details-list .detail-label { color: var(--sda-text-soft); display: inline-flex; align-items: center; gap: .45rem; }
.course-public-details-list .detail-value { color: var(--sda-text); font-weight: 500; text-align: right; }

/* Reviews */
.course-public-reviews { margin-top: 0; }
.course-public-reviews .reviews-summary-card {
  display: flex; align-items: center; gap: 1rem;
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: .9rem;
}
.course-public-reviews .reviews-summary-score {
  font-family: var(--sda-font-serif);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--sda-text);
  line-height: 1;
}
.course-public-reviews .reviews-summary-meta { color: var(--sda-text-muted); font-size: .85rem; }
/* !important en los `i`: si no, gana la regla global de íconos FA (site.css ~301). */
.course-public-reviews .reviews-summary-stars { color: var(--theme-star-color, #f4b400); }
.course-public-reviews .reviews-summary-stars i { color: var(--theme-star-color, #f4b400) !important; }
.course-public-reviews .reviews-summary-stars i.is-empty { color: rgba(var(--theme-star-color-rgb, 244, 180, 0), 0.3) !important; }
.course-public-reviews .review-card {
  border: 1px solid var(--sda-card-border);
  border-radius: 12px;
  background: var(--theme-surface);
  height: 100%;
}
.course-public-reviews .review-card-body { padding: .85rem 1rem; }
.course-public-reviews .review-stars { color: var(--theme-star-color, #f4b400); margin-bottom: .35rem; font-size: .85rem; }
.course-public-reviews .review-comment { color: var(--sda-text); margin-bottom: .5rem; }
.course-public-reviews .review-card small { color: var(--sda-text-muted); font-size: .75rem; }
.course-public-reviews-empty { color: var(--sda-text-muted); font-size: .9rem; margin: 0; }
.btn-review-toggle, .btn-review-submit {
  background: var(--sda-deep-green); color: #fff; border: none;
  border-radius: 999px; padding: .35rem .8rem; font-size: .82rem; font-weight: 500;
}
.btn-review-toggle:hover, .btn-review-submit:hover { background: var(--sda-deep-green-hover); color: #fff; }

/* Media (sidebar/inline cover fallback) */
.course-public-media img, .course-public-media video { width: 100%; border-radius: 12px; }
.course-public-placeholder { min-height: 200px; background: linear-gradient(135deg,#fff,#f0e8f5); border: 1px dashed rgba(58,122,90,0.25); border-radius: 12px; }

/* ════════════════════════════════════════════════════════════════════════
   MESSAGES — "mail tray" redesign (scoped under .msg-tray)
   Adapts the approved mockup. Reuses theme tokens; --accent = theme primary,
   so it follows the tenant palette (teal) and the admin palette (indigo) too.
   All selectors are scoped to .msg-tray so shared classes (.smc-card,
   .messages-tab-nav, .client-grid, .recipient-badge) used elsewhere are
   untouched. The desktop list keeps its <table><tbody><tr> markup (so
   pagination.js / initStaticGrids keep working) and is restyled into list
   rows via flex.
   ════════════════════════════════════════════════════════════════════════ */
.msg-tray {
    --accent: var(--theme-primary, #9ed0c5);
    --accent-rgb: var(--theme-primary-rgb, 158, 208, 197);
    --ink: var(--theme-quaternary, #343a40);
    --ink-rgb: var(--theme-quaternary-rgb, 52, 58, 64);
    --line: rgba(var(--ink-rgb), 0.10);
    --star: var(--theme-star-color, #f4b400);
    color: var(--ink);
}

/* ── page head ─────────────────────────────────────────────────────────── */
.msg-tray .msg-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 24px; margin: 0 0 22px; flex-wrap: wrap;
}
.msg-tray .msg-head-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.msg-tray .msg-head-icon {
    width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0;
    background: rgba(var(--accent-rgb), 0.20);
    color: color-mix(in srgb, var(--accent) 72%, #1c2b28);
    display: grid; place-items: center; font-size: 24px;
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.4);
}
.msg-tray .msg-head h1 {
    font-family: var(--theme-font-heading-primary, "Playfair Display", Georgia, serif);
    font-weight: 700; font-size: clamp(26px, 3vw, 34px); margin: 0;
    letter-spacing: -0.01em; color: var(--ink);
}
.msg-tray .msg-head p { margin: 4px 0 0; color: rgba(var(--ink-rgb), 0.62); font-size: 14.5px; }
.msg-tray .msg-head-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.msg-tray .msg-back {
    font-size: 13.5px; font-weight: 600; text-decoration: none;
    color: color-mix(in srgb, var(--accent) 58%, #1c2b28);
    display: inline-flex; align-items: center; gap: 7px;
}
.msg-tray .msg-back:hover { text-decoration: underline; }

/* ── buttons ───────────────────────────────────────────────────────────── */
.msg-tray .msg-btn-primary {
    background: var(--accent); border: 0;
    color: color-mix(in srgb, var(--accent) 30%, #16241f);
    padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
    cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
    box-shadow: var(--theme-shadow-1); text-decoration: none; white-space: nowrap;
    transition: transform .14s, box-shadow .14s, filter .14s;
}
.msg-tray .msg-btn-primary:hover {
    transform: translateY(-1px); box-shadow: var(--theme-shadow-2); filter: brightness(1.03);
    color: color-mix(in srgb, var(--accent) 30%, #16241f);
}
.msg-tray .msg-btn-primary:disabled, .msg-tray .msg-btn-primary.disabled {
    opacity: 0.5; cursor: default; transform: none; box-shadow: none;
}
.msg-tray .msg-btn-ghost {
    background: var(--theme-surface); border: 1px solid var(--line); color: var(--ink);
    padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none; transition: background .14s, border-color .14s;
}
.msg-tray .msg-btn-ghost:hover { background: rgba(var(--accent-rgb), 0.10); border-color: rgba(var(--accent-rgb), 0.5); }
.msg-tray .msg-icon-pill {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    border: 1px solid var(--line); background: var(--theme-surface); display: grid; place-items: center;
    cursor: pointer; color: rgba(var(--ink-rgb), 0.66); font-size: 15px; text-decoration: none;
    transition: background .14s, color .14s, border-color .14s;
}
.msg-tray .msg-icon-pill:hover { background: rgba(var(--accent-rgb), 0.14); color: var(--ink); }
.msg-tray .msg-icon-pill.danger:hover { background: rgba(var(--theme-danger-rgb, 220, 53, 69), 0.12); color: var(--theme-danger, #dc3545); }

/* ── segmented tabs (_Menu) ────────────────────────────────────────────── */
.msg-tray .msg-seg {
    display: flex; gap: 6px; padding: 6px; margin: 0 0 18px;
    background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line);
    border-radius: 999px; box-shadow: var(--theme-shadow-1);
}
.msg-tray .msg-seg-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 11px 18px; border: 0; background: transparent; cursor: pointer;
    border-radius: 999px; font-size: 14.5px; font-weight: 600; text-decoration: none;
    color: rgba(var(--ink-rgb), 0.62); transition: all .16s; min-width: 0;
}
.msg-tray .msg-seg-btn i { font-size: 14px; }
.msg-tray .msg-seg-btn:hover { color: var(--ink); background: rgba(var(--accent-rgb), 0.10); }
.msg-tray .msg-seg-btn.active { background: var(--theme-surface); color: var(--ink); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10); }
.msg-tray .msg-seg-btn.active i { color: color-mix(in srgb, var(--accent) 68%, #1c2b28); }
.msg-tray .msg-seg-count {
    font-size: 12px; font-weight: 700; color: rgba(var(--ink-rgb), 0.5);
    background: rgba(var(--ink-rgb), 0.07); border-radius: 999px; padding: 1px 8px;
    min-width: 22px; text-align: center;
}
.msg-tray .msg-seg-btn.active .msg-seg-count { background: rgba(var(--accent-rgb), 0.24); color: color-mix(in srgb, var(--accent) 62%, #16241f); }
.msg-tray .msg-seg-unread {
    font-size: 11px; font-weight: 800; color: #fff; background: var(--theme-danger, #dc3545);
    border-radius: 999px; padding: 1px 7px; min-width: 19px; text-align: center;
}

/* ── card shell (wraps the client-grid) ────────────────────────────────── */
.msg-tray .messages-client-grid {
    display: block; gap: 0; background: var(--theme-surface); border: 1px solid var(--line);
    border-radius: var(--theme-radius-lg, 20px); box-shadow: 0 10px 34px rgba(var(--ink-rgb), 0.08);
    overflow: hidden;
}

/* ── toolbar ───────────────────────────────────────────────────────────── */
.msg-tray .client-grid__toolbar {
    display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 18px;
    border-bottom: 1px solid var(--line); flex-wrap: wrap;
    background: linear-gradient(rgba(var(--accent-rgb), 0.05), rgba(var(--accent-rgb), 0.01));
}
.msg-tray .client-grid__toolbar .grid-count { font-size: 13px; font-weight: 600; color: rgba(var(--ink-rgb), 0.6); margin: 0; }
.msg-tray .client-grid__size-wrap { margin-left: 0; }
.msg-tray .client-grid .grid-size { border-radius: 999px !important; border: 1px solid var(--line); }
.msg-tray .client-grid__toolbar .btn { border-radius: 999px; }

/* ── desktop list rows (table restyled to flex list) ───────────────────── */
.msg-tray .messages-table-responsive { overflow: visible; }
.msg-tray .messages-table-responsive .table { min-width: 0; margin: 0; }
.msg-tray .messages-table-responsive thead { display: none; }
.msg-tray .messages-table-responsive .table,
.msg-tray .messages-table-responsive tbody { display: block; width: 100%; }
.msg-tray .messages-table-responsive .table > :not(caption) > * > * {
    box-shadow: none; background: transparent; padding: 0; border: 0;
}
.msg-tray .messages-table-responsive tbody tr {
    display: flex; align-items: center; gap: 12px; padding: 13px 18px;
    position: relative; cursor: pointer; background: var(--theme-surface);
    border-bottom: 1px solid rgba(var(--ink-rgb), 0.06); transition: background .12s;
}
.msg-tray .messages-table-responsive tbody tr:hover { background: rgba(var(--accent-rgb), 0.07); }
.msg-tray .messages-table-responsive tbody tr.fw-bold { box-shadow: inset 3px 0 0 var(--accent); }
.msg-tray .messages-table-responsive tbody td { padding: 0; border: 0; vertical-align: middle; }
.msg-tray td.msg-col-check { flex: 0 0 auto; display: flex; align-items: center; }
.msg-tray td.msg-col-from {
    flex: 0 0 auto; width: 230px; max-width: 230px; min-width: 0;
    display: flex; align-items: center; gap: 10px; overflow: hidden;
    font-size: 14.5px; font-weight: 600; color: var(--ink); white-space: nowrap; text-overflow: ellipsis;
}
.msg-tray td.msg-col-from > img {
    width: 38px !important; height: 38px !important; border-radius: 50%;
    object-fit: cover; flex-shrink: 0; margin: 0 !important;
}
.msg-tray td.msg-col-from.grid-recipients { gap: 6px; flex-wrap: nowrap; }
.msg-tray td.msg-col-subject {
    flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; font-size: 13.5px;
}
.msg-tray td.msg-col-subject a { color: var(--ink); text-decoration: none; font-weight: 500; }
.msg-tray tbody tr.fw-bold td.msg-col-subject a { font-weight: 700; }
.msg-tray td.msg-col-subject a:hover { text-decoration: underline; }
.msg-tray td.msg-col-date {
    flex: 0 0 auto; margin-left: auto; text-align: right;
    font-size: 12px; color: rgba(var(--ink-rgb), 0.5); white-space: nowrap;
}

/* ── pager ─────────────────────────────────────────────────────────────── */
.msg-tray .client-grid__pagination {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin: 0; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--theme-surface);
}
.msg-tray .client-grid__pagination .grid-prev,
.msg-tray .client-grid__pagination .grid-next {
    border-radius: 999px; border: 1px solid var(--line); background: var(--theme-surface); color: var(--ink); font-weight: 600;
}
.msg-tray .client-grid__pagination .grid-prev:not(:disabled):hover,
.msg-tray .client-grid__pagination .grid-next:not(:disabled):hover { background: rgba(var(--accent-rgb), 0.12); }
.msg-tray .client-grid__pagination .grid-page { font-weight: 700; font-size: 13px; color: var(--ink); }

/* ── reading pane (ViewMessage) ────────────────────────────────────────── */
.msg-tray .msg-detail {
    background: var(--theme-surface); border: 1px solid var(--line);
    border-radius: var(--theme-radius-lg, 20px); box-shadow: 0 10px 34px rgba(var(--ink-rgb), 0.08);
    overflow: hidden;
}
.msg-tray .msg-detail-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.msg-tray .msg-detail-head-actions { display: flex; gap: 8px; }
.msg-tray .msg-detail-body { padding: 22px 26px; }
.msg-tray .msg-detail-subject {
    font-family: var(--theme-font-heading-primary, "Playfair Display", Georgia, serif);
    font-weight: 700; font-size: 24px; margin: 0 0 14px; color: var(--ink); line-height: 1.25;
}
.msg-tray .msg-detail-meta {
    display: flex; flex-direction: column; gap: 8px;
    padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
.msg-tray .msg-detail-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: rgba(var(--ink-rgb), 0.72); }
.msg-tray .msg-detail-row .lbl { font-weight: 700; color: rgba(var(--ink-rgb), 0.55); }
.msg-tray .msg-detail-row .ip-link { color: color-mix(in srgb, var(--accent) 56%, #1c2b28); }

/* ── acuse de lectura (solo emisor con visibilidad) ─────────────────────── */
.msg-tray .msg-read-row { align-items: flex-start; row-gap: 6px; }
/* 0.72 y no el 0.55 de `.lbl`: a 12.5px hace falta 4.5:1, y con 0.55 el resumen
   se queda en 3,1:1 sobre superficie clara. */
.msg-tray .msg-read-summary {
    font-weight: 700; font-size: 12.5px; color: rgba(var(--ink-rgb), 0.72);
}
.msg-tray .msg-read-item {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px; font-size: 12.5px;
    background: var(--theme-surface-2); border: 1px solid var(--line);
    color: var(--theme-on-surface-muted);
}
.msg-tray .msg-read-item.is-read {
    background: rgba(var(--theme-success-rgb), 0.14);
    border-color: rgba(var(--theme-success-rgb), 0.35);
    color: var(--theme-success);
}
/* Los íconos heredan la tinta del chip: sin esto, la regla de site.css que pinta
   los `fa-*` con --theme-primary se los lleva puestos. */
.msg-tray .msg-read-item i { color: inherit; font-size: 11px; }
.msg-tray .msg-detail-msg {
    font-size: 14.5px; line-height: 1.72; color: rgba(var(--ink-rgb), 0.86); white-space: pre-wrap;
}
.msg-tray .msg-detail-foot {
    display: flex; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--line);
    background: rgba(var(--accent-rgb), 0.04); flex-wrap: wrap;
}

/* ── compose ───────────────────────────────────────────────────────────── */
.msg-tray .msg-compose {
    background: var(--theme-surface); border: 1px solid var(--line); max-width: 680px;
    border-radius: var(--theme-radius-lg, 20px); box-shadow: 0 10px 34px rgba(var(--ink-rgb), 0.08);
    overflow: hidden;
}
.msg-tray .msg-compose-head {
    display: flex; align-items: center; gap: 10px; padding: 16px 20px;
    border-bottom: 1px solid var(--line); background: rgba(var(--accent-rgb), 0.08);
    font-family: var(--theme-font-heading-primary, "Playfair Display", Georgia, serif);
    font-weight: 700; font-size: 18px; color: var(--ink);
}
.msg-tray .msg-compose-head i { color: color-mix(in srgb, var(--accent) 64%, #1c2b28); font-size: 15px; }
.msg-tray .msg-compose-field { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.msg-tray .msg-compose-field > label { display: block; font-size: 13px; font-weight: 700; color: rgba(var(--ink-rgb), 0.6); margin-bottom: 8px; }
.msg-tray .msg-compose-field .form-control { border: 1px solid var(--line); border-radius: 12px; }
.msg-tray .msg-compose-field .form-control:focus { border-color: rgba(var(--accent-rgb), 0.7); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.22); }
.msg-tray .msg-compose-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 20px; }

/* ── mobile polish (cards already swap in at <=767.98px) ───────────────── */
@media (max-width: 767.98px) {
    .msg-tray .smc-card {
        background: var(--theme-surface); border: 1px solid var(--line);
        border-radius: var(--theme-radius-md, 14px); box-shadow: var(--theme-shadow-1); padding: 0.8rem;
    }
    .msg-tray .smc-card.smc-card--unread { border-left: 3px solid var(--accent); background: rgba(var(--accent-rgb), 0.05); }
    .msg-tray .smc-name { color: var(--ink); }
}

/* ── small phones ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .msg-tray .msg-head { gap: 14px; }
    .msg-tray .msg-head h1 { font-size: 24px; }
    .msg-tray .msg-head-right { width: 100%; justify-content: space-between; }
    .msg-tray .msg-head-right .msg-btn-primary { flex: 1; justify-content: center; }
    .msg-tray .msg-seg-label { display: none; }
    .msg-tray .msg-detail-body { padding: 18px 16px; }
    .msg-tray .msg-detail-foot { padding: 14px 16px; }
    .msg-tray .msg-detail-foot .msg-btn-primary, .msg-tray .msg-detail-foot .msg-btn-ghost { flex: 1; justify-content: center; }
    .msg-tray .msg-compose { max-width: none; }
}

/* ============================================================================
   Commercial client status grid — REDISEÑO
   Scopeado bajo .commercial-status-grid — no afecta otras grillas del sitio.
   ============================================================================ */

/* ---- Tabla base: sin scroll horizontal, layout fijo en desktop ---- */
.commercial-status-grid .panel-table {
    border: 0;
    border-radius: 0;
    overflow: visible;
}
.commercial-status-grid .panel-table .table {
    min-width: 0;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

/* ---- Encabezado: etiquetas chicas, mayúsculas, muteadas (sin negro fuerte) ---- */
.commercial-status-grid .panel-table .table thead th {
    background: transparent;
    border-bottom: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.3);
    padding: 0.55rem 0.9rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a929a;
    vertical-align: bottom;
}

/* ---- Filas: más aire, borde sutil, hover mint, SIN zebra ---- */
.commercial-status-grid .panel-table .table tbody td {
    padding: 0.85rem 0.9rem;
    border: 0;
    border-bottom: 1px solid #eef1f0;
    vertical-align: top;
}
.commercial-status-grid .panel-table .table tbody tr:hover {
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.08);
}
/* Neutraliza el striping de Bootstrap (.table-striped) en esta grilla */
.commercial-status-grid .panel-table .table.table-striped > tbody > tr > * {
    --bs-table-accent-bg: transparent;
    box-shadow: none;
}

/* ---- Columna Cliente: monograma + nombre + dominio + rubro ---- */
.commercial-status-grid .csg-client {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}
.commercial-status-grid .csg-mono {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    background: var(--csg-accent-soft, rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2));
    color: var(--csg-accent-ink, #2f7d6e);
}
.commercial-status-grid .csg-client-name {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.25;
    color: #2b3035;
}
.commercial-status-grid .csg-client-domain {
    font-size: 0.76rem;
    color: #6b7280;
    line-height: 1.3;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.commercial-status-grid .csg-industry-pill {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.12rem 0.5rem;
    border-radius: var(--theme-radius-pill, 999px);
    border: 0;
    background: var(--csg-accent-soft, rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2));
    color: var(--csg-accent-ink, #2f7d6e);
}

/* ---- Columna Estado: dot comercial + pills suaves Lic/Fin ---- */
.commercial-status-grid .csg-col-estado {
    overflow: hidden;
}
.commercial-status-grid .csg-commercial {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--theme-quaternary, #343a40);
}
.commercial-status-grid .csg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #9aa3ab;
}
.commercial-status-grid .csg-dot--green  { background: var(--theme-success, #198754); }
.commercial-status-grid .csg-dot--yellow { background: #e0a800; }
.commercial-status-grid .csg-dot--red    { background: var(--theme-danger, #dc3545); }

.commercial-status-grid .csg-pills {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.commercial-status-grid .csg-pill {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: var(--theme-radius-pill, 999px);
    white-space: nowrap;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Variantes suaves */
.commercial-status-grid .csg-pill--green  { background: rgba(var(--theme-success-rgb, 25, 135, 84), 0.14); color: #0f7a4a; }
.commercial-status-grid .csg-pill--yellow { background: rgba(244, 180, 0, 0.20);                          color: #8a6d00; }
.commercial-status-grid .csg-pill--red    { background: rgba(var(--theme-danger-rgb, 220, 53, 69), 0.13);  color: #b02a37; }
.commercial-status-grid .csg-pill--gray   { background: rgba(108, 117, 125, 0.15);                         color: #5c636a; }

.commercial-status-grid .csg-issue {
    margin-top: 0.4rem;
    font-size: 0.73rem;
    color: var(--theme-danger, #dc3545);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ---- Columna Pendiente ---- */
.commercial-status-grid .csg-col-pending { text-align: right; }
.commercial-status-grid .csg-owed {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.commercial-status-grid .csg-owed--debt { color: #b02a37; }
.commercial-status-grid .csg-owed--zero { color: #9aa3ab; }
.commercial-status-grid .csg-owed-sub   { font-size: 0.72rem; color: #6b7280; margin-top: 0.15rem; }
.commercial-status-grid .csg-overdue-chip {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.12rem 0.5rem;
    border-radius: var(--theme-radius-pill, 999px);
    background: rgba(var(--theme-danger-rgb, 220, 53, 69), 0.13);
    color: #b02a37;
}

/* ---- Columna Vence ---- */
.commercial-status-grid .csg-due-date { font-size: 0.82rem; font-weight: 600; color: var(--theme-quaternary, #343a40); font-variant-numeric: tabular-nums; }
.commercial-status-grid .csg-grace    { font-size: 0.72rem; color: #9a7400; margin-top: 0.2rem; }

/* ---- Columna Uso & actividad: add-ons + barra B2 + último pulso ---- */
.commercial-status-grid .csg-use-line {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    color: #454b50;
    margin-bottom: 0.35rem;
    white-space: nowrap;
}
.commercial-status-grid .csg-use-line i { color: #9aa3ab; font-size: 0.72rem; }
.commercial-status-grid .csg-b2-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: #6b7280;
    margin-bottom: 0.2rem;
}
.commercial-status-grid .csg-b2-head span { white-space: nowrap; }
.commercial-status-grid .csg-b2-track {
    height: 5px;
    border-radius: var(--theme-radius-pill, 999px);
    background: #eceeed;
    overflow: hidden;
}
.commercial-status-grid .csg-b2-fill {
    height: 100%;
    border-radius: var(--theme-radius-pill, 999px);
    background: var(--theme-primary, #9ed0c5);
}
.commercial-status-grid .csg-b2-fill--warn { background: #e0a800; }
.commercial-status-grid .csg-b2-fill--crit { background: var(--theme-danger, #dc3545); }
.commercial-status-grid .csg-pulse {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: #9aa3ab;
    margin-top: 0.5rem;
    white-space: nowrap;
}

/* ---- Acción ---- */
.commercial-status-grid .csg-ficha {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    font-size: 0.74rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    border-radius: var(--theme-radius-pill, 999px);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.7);
    color: #2f7d6e;
    background: var(--theme-surface);
    transition: background-color .14s ease, color .14s ease, border-color .14s ease;
}
.commercial-status-grid .csg-ficha:hover,
.commercial-status-grid .csg-ficha:focus-visible {
    background: var(--theme-primary, #9ed0c5);
    border-color: var(--theme-primary, #9ed0c5);
    color: #fff;
}

/* ---- Acentos por rubro (data-rubro en la <td> de cliente) ---- */
.commercial-status-grid [data-rubro="Arte"]      { --csg-accent-soft: rgba(255,147,214,0.18); --csg-accent-ink:#b03a85; }
.commercial-status-grid [data-rubro="Música"]    { --csg-accent-soft: rgba(66,231,255,0.18);  --csg-accent-ink:#0a7f93; }
.commercial-status-grid [data-rubro="Tecnica"],
.commercial-status-grid [data-rubro="Técnica"]   { --csg-accent-soft: rgba(255,188,69,0.20);  --csg-accent-ink:#9a6a05; }
.commercial-status-grid [data-rubro="Tech"]       { --csg-accent-soft: rgba(0,200,120,0.16);   --csg-accent-ink:#0a7a4d; }
.commercial-status-grid [data-rubro="Negocios"]   { --csg-accent-soft: rgba(224,191,99,0.22);  --csg-accent-ink:#8a6a16; }
.commercial-status-grid [data-rubro="Fitness"]    { --csg-accent-soft: rgba(104,246,186,0.20); --csg-accent-ink:#0a7a55; }
.commercial-status-grid [data-rubro="Educacion"],
.commercial-status-grid [data-rubro="Educación"] { --csg-accent-soft: rgba(230,73,155,0.16);  --csg-accent-ink:#b32d73; }
.commercial-status-grid [data-rubro="Otros"]      { --csg-accent-soft: rgba(169,182,255,0.20); --csg-accent-ink:#4b56b3; }

/* ---- Anchos de columna (desktop ≥992px): entran las 6 sin scroll ---- */
@media (min-width: 992px) {
    .commercial-status-grid .table-responsive.panel-table { overflow-x: visible; }
    .commercial-status-grid .panel-table .table { table-layout: fixed; }
    .commercial-status-grid .csg-col-client  { width: 20%; }
    .commercial-status-grid .csg-col-estado  { width: 22%; }
    .commercial-status-grid .csg-col-pending { width: 12%; }
    .commercial-status-grid .csg-col-due     { width: 12%; }
    .commercial-status-grid .csg-col-uso     { width: 18%; }
    .commercial-status-grid .csg-col-actions { width: 10%; text-align: right; }
}

/* ---- Mobile (<992px): cada fila pasa a tarjeta ---- */
@media (max-width: 991.98px) {
    .commercial-status-grid .table-responsive.panel-table {
        overflow-x: visible;
        border: 0;
        background: transparent;
    }
    .commercial-status-grid .panel-table .table thead { display: none; }
    .commercial-status-grid .panel-table .table,
    .commercial-status-grid .panel-table .table tbody { display: block; width: 100%; }

    .commercial-status-grid .panel-table .table tbody tr {
        display: block;
        border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
        border-radius: var(--theme-radius-md, 14px);
        padding: 1rem 1.1rem;
        margin-bottom: 0.85rem;
        background: var(--theme-surface);
        box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0,0,0,0.08));
    }
    .commercial-status-grid .panel-table .table tbody tr:hover { background: var(--theme-surface); }

    .commercial-status-grid .panel-table .table tbody td {
        display: block;
        width: 100%;
        min-width: 0;
        padding: 0.55rem 0;
        border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
        text-align: left;
        overflow: hidden;
    }
    .commercial-status-grid .panel-table .table tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.3rem;
        font-weight: 700;
        color: #8a929a;
        text-transform: uppercase;
        font-size: 0.66rem;
        letter-spacing: 0.04em;
        text-align: left;
        white-space: nowrap;
    }
    /* Cliente: cabecera full-width, sin etiqueta */
    .commercial-status-grid .panel-table .table tbody td.csg-col-client {
        display: block;
        text-align: left;
        padding: 0 0 0.6rem 0;
        margin-bottom: 0.4rem;
        border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    }
    .commercial-status-grid .panel-table .table tbody td.csg-col-client::before { content: none; }
    .commercial-status-grid .csg-col-estado {
        overflow: visible;
    }
    .commercial-status-grid .csg-col-estado .csg-commercial {
        justify-content: flex-start;
        flex-wrap: wrap;
        line-height: 1.35;
    }
    .commercial-status-grid .csg-col-estado .csg-pills {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .commercial-status-grid .csg-col-estado .csg-pill {
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .commercial-status-grid .csg-col-estado .csg-issue {
        align-items: flex-start;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
    .commercial-status-grid .csg-col-pending {
        text-align: left;
    }
    .commercial-status-grid .csg-b2-head {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .commercial-status-grid .csg-use-line,
    .commercial-status-grid .csg-pulse {
        white-space: normal;
    }
    /* Acción: botón full-width, sin etiqueta */
    .commercial-status-grid .panel-table .table tbody td.csg-col-actions {
        display: block;
        padding-top: 0.7rem;
        border-bottom: 0;
    }
    .commercial-status-grid .panel-table .table tbody td.csg-col-actions::before { content: none; }
    .commercial-status-grid .csg-ficha { width: 100%; justify-content: center; }
}

/* ============================================================================
   (Opcional) KPI cards de arriba — ícono + barra de acento + número grande.
   ============================================================================ */
.csg-kpi { position: relative; overflow: hidden; }
.csg-kpi .panel-card__body { display: flex; align-items: center; gap: 0.85rem; }
.csg-kpi::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: var(--csg-kpi-accent, var(--theme-primary, #9ed0c5));
}
.csg-kpi__icon {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
    background: var(--csg-kpi-tint, rgba(var(--theme-primary-rgb, 158, 208, 197), 0.2));
    color: var(--csg-kpi-accent, #2f7d6e);
}
.csg-kpi__label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #6b7280; line-height: 1.2; }
.csg-kpi__value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; margin-top: 0.1rem; font-variant-numeric: tabular-nums; }
.csg-kpi--primary { --csg-kpi-accent: var(--theme-primary, #9ed0c5); --csg-kpi-tint: rgba(var(--theme-primary-rgb,158,208,197),0.2); }
.csg-kpi--warn    { --csg-kpi-accent: #e0a800; --csg-kpi-tint: rgba(244,180,0,0.18); }
.csg-kpi--danger  { --csg-kpi-accent: var(--theme-danger, #dc3545); --csg-kpi-tint: rgba(var(--theme-danger-rgb,220,53,69),0.14); }
.csg-kpi--primary .csg-kpi__value { color: #2b3035; }
.csg-kpi--warn .csg-kpi__value    { color: #8a6d00; }
.csg-kpi--danger .csg-kpi__value  { color: #b02a37; }

.commercial-diagnostic-item {
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 8px;
    padding: 0.9rem;
    background: var(--theme-surface, #fff);
}

.commercial-diagnostic-item + .commercial-diagnostic-item {
    margin-top: 0.8rem;
}

.commercial-diagnostic-item__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.commercial-diagnostic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 0.9rem;
}

.commercial-diagnostic-grid > div {
    min-width: 0;
}

.commercial-diagnostic-grid span {
    display: block;
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.commercial-diagnostic-grid strong {
    display: block;
    margin-top: 0.1rem;
    color: #111827;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.35;
}

.commercial-diagnostic-grid__wide {
    grid-column: 1 / -1;
}

.commercial-diagnostic-grid--student {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 575.98px) {
    .commercial-diagnostic-item__head,
    .commercial-diagnostic-grid {
        display: block;
    }

    .commercial-diagnostic-grid > div + div {
        margin-top: 0.65rem;
    }

    .commercial-diagnostic-item__head .badge {
        margin-top: 0.5rem;
    }
}

/* ===========================================================================
   Layout por rubro: "arte"
   Hero editorial (estilo galería) con altura acotada. La decoración animada y
   los colores siguen viniendo del banner elegido (home-hero-<variant>) y de la
   paleta del tenant; esto solo ajusta forma, marco y tipografía del hero.
   =========================================================================== */
.home-hero-fullbleed .home-hero-rubro-layout {
    padding: 4.5rem 2rem;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.home-hero-rubro-layout .home-hero-badge {
    margin-bottom: 1.5rem;
}

/* Skin ARTE: marco tipo galería + título editorial serif. */
.home-layout-arte .home-hero-rubro-layout {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18),
                inset 0 0 0 14px rgba(255, 255, 255, 0.05);
}
.home-layout-arte .home-hero-rubro-layout .home-hero-title {
    font-family: Georgia, "Cormorant Garamond", "Times New Roman", serif;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0.005em;
}

.home-hero-rubro-layout .home-hero-description {
    max-width: 46ch;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.92;
}

@media (max-width: 768px) {
    .home-hero-fullbleed .home-hero-rubro-layout {
        padding: 3rem 1.25rem;
        min-height: 300px;
    }
}

/* Sección "Docentes" (layout arte): foto del perfil + nombre + bio pública.
   Premisa actual: un docente, por eso el bloque se centra. Sin foto = solo nombre. */
.home-docentes-section {
    background: var(--theme-tertiary, #fffaf5);
}

.home-docentes-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1140px;
    margin: 0 auto;
}

.home-docente-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #fff;
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.25);
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    max-width: 520px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}

.home-docentes-grid.is-single .home-docente-card {
    flex-direction: column;
    text-align: center;
    max-width: 460px;
    padding: 2.25rem 2rem;
}

.home-docente-card--no-photo {
    text-align: center;
}

.home-docente-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
}

.home-docentes-grid.is-single .home-docente-photo {
    width: 120px;
    height: 120px;
}

.home-docente-name {
    margin: 0 0 0.35rem;
    font-weight: 700;
    color: #222;
}

.home-docente-bio {
    margin: 0;
    color: #555;
    line-height: 1.55;
    white-space: pre-line;
}

@media (max-width: 576px) {
    .home-docente-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ── "Por qué elegirnos" (arte): dos columnas, tarjeta decorativa + grilla ── */
.home-rubro-benefits .home-section-header,
.home-rubro-quienes-section .home-section-header {
    text-align: center;
    margin: 0 auto 2.25rem;
    max-width: 1140px;
}

.home-rubro-benefits .home-rubro-benefits-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) 1.15fr;
    gap: 2.5rem;
    align-items: center;
    max-width: 1140px;
    margin: 0 auto;
}

.home-rubro-benefits-visual {
    position: relative;
    min-height: 340px;
    border-radius: 24px;
    background: var(--hero-bg, linear-gradient(160deg, #c9b6e4, #9ed0c5));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
}

.home-rubro-benefits-art {
    font-size: 4.5rem;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0.9;
}

.home-rubro-benefits-float {
    position: absolute;
    left: 1.25rem;
    bottom: 1.25rem;
    right: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.home-rubro-benefits-float-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18);
    color: var(--theme-primary, #5aa);
}

.home-rubro-benefits-float-text { display: flex; flex-direction: column; line-height: 1.25; }
.home-rubro-benefits-float-text strong { color: #222; font-size: 0.95rem; }
.home-rubro-benefits-float-text small { color: #666; font-size: 0.8rem; }

@media (max-width: 860px) {
    .home-rubro-benefits .home-rubro-benefits-grid { grid-template-columns: 1fr; }
    .home-rubro-benefits-visual { min-height: 220px; }
}

/* ── "Quiénes somos" (arte): dos columnas, texto + tarjetas checklist ── */
.home-rubro-quienes-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: start;
    max-width: 1140px;
    margin: 0 auto;
}

/* Sin sub-bloques (cards): el texto ocupa todo el ancho, no media columna */
.home-rubro-quienes-text:only-child { grid-column: 1 / -1; max-width: 760px; }

.home-rubro-quienes-cards { align-self: start; }

.home-rubro-quienes-intro {
    font-size: 1.05rem;
    color: #444;
    font-style: italic;
    margin-bottom: 1rem;
}

.home-rubro-quienes-paragraph { color: #555; line-height: 1.65; margin-bottom: 0.85rem; }

.home-rubro-quienes-cards { display: flex; flex-direction: column; gap: 1.25rem; }

.home-rubro-quienes-card {
    background: #fff;
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.22);
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.05);
}

.home-rubro-quienes-card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    font-weight: 700;
    color: #222;
}

.home-rubro-quienes-card-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.18);
    color: var(--theme-primary, #5aa);
}

.home-rubro-quienes-list { list-style: none; margin: 0; padding: 0; }
.home-rubro-quienes-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.35rem 0;
    color: #555;
    line-height: 1.45;
}
.home-rubro-quienes-list li i { color: var(--theme-primary, #5aa); margin-top: 0.25rem; font-size: 0.85rem; }

@media (max-width: 860px) {
    .home-rubro-quienes-grid { grid-template-columns: 1fr; }
}

/* ── CTA final (arte): dos columnas, texto + tarjeta de contacto.
   Contenedor exterior oscuro neutro (estilo mockup, independiente de la paleta para
   garantizar contraste); los acentos (botones, íconos, eyebrow) sí usan la paleta. ── */
.home-rubro-cta-section {
    background:
        radial-gradient(130% 130% at 88% 6%, rgba(150, 130, 205, 0.30) 0%, transparent 55%),
        linear-gradient(135deg, #2e3040 0%, #25262f 100%) !important;
    color: #fff;
}

.home-rubro-cta-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: center;
    max-width: 1140px;
    margin: 0 auto;
}

.home-rubro-cta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--theme-primary, #9ed0c5);
    margin-bottom: 1rem;
}

.home-rubro-cta-title {
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

/* Skin ARTE: título del CTA editorial serif. */
.home-layout-arte .home-rubro-cta-title {
    font-family: Georgia, "Cormorant Garamond", "Times New Roman", serif;
    font-style: italic;
}

.home-rubro-cta-subtitle {
    color: var(--hero-subtle, rgba(255, 255, 255, 0.7));
    max-width: 46ch;
    margin-bottom: 1.75rem;
}

.home-rubro-cta-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.home-rubro-cta-btn {
    background: #fff;
    color: var(--theme-primary, #1a7d6b);
    border: none;
    font-weight: 700;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
}
.home-rubro-cta-btn:hover { filter: brightness(0.95); color: var(--theme-primary, #1a7d6b); }

.home-rubro-cta-btn-ghost {
    background: transparent;
    color: var(--hero-text-color, #fff);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: 700;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
}
.home-rubro-cta-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--hero-text-color, #fff); }

.home-rubro-cta-contact {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    backdrop-filter: blur(2px);
}

.home-rubro-contact-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 0.25rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.home-rubro-contact-row:last-child { border-bottom: none; }

.home-rubro-contact-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
}
.home-rubro-contact-icon--wa { background: #128C7E; }
.home-rubro-contact-icon--mail { background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.55); }
.home-rubro-contact-icon--social { background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.55); }

.home-rubro-contact-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.home-rubro-contact-text small {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hero-subtle, rgba(255, 255, 255, 0.6));
}
.home-rubro-contact-text strong { color: var(--hero-text-color, #fff); word-break: break-word; }

.home-rubro-contact-socials { display: flex; gap: 0.5rem; margin-top: 0.35rem; }
.home-rubro-contact-socials a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: var(--hero-text-color, #fff);
    text-decoration: none;
}
.home-rubro-contact-socials a:hover { background: rgba(255, 255, 255, 0.22); }

@media (max-width: 860px) {
    .home-rubro-cta-grid { grid-template-columns: 1fr; }
}

/* ── Transiciones reveal-on-scroll (solo layout arte). El ocultamiento se aplica
   únicamente cuando el JS marca .reveal-ready, así si el JS no corre todo queda
   visible (sin quedar atrapado en opacity:0). ── */
.home-layout-rubro.reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}
.home-layout-rubro.reveal-ready [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

/* Cascada sutil: las cards internas de cada sección entran escalonadas.
   El offset va por `translate` (no `transform`) a propósito: varias de estas
   cards usan transform en :hover y esta regla, más específica, lo pisaría. */
.home-layout-rubro.reveal-ready [data-reveal] :is(.home-how-step, .home-rubro-card, .home-benefit-card, .student-card, .home-docente-card, .top-review-card, .home-rubro-quienes-card) {
    opacity: 0;
    translate: 0 18px;
    transition: opacity 0.55s ease, translate 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.home-layout-rubro.reveal-ready [data-reveal].is-revealed :is(.home-how-step, .home-rubro-card, .home-benefit-card, .student-card, .home-docente-card, .top-review-card, .home-rubro-quienes-card) {
    opacity: 1;
    translate: none;
}
.home-layout-rubro.reveal-ready [data-reveal].is-revealed :is(.home-how-step, .home-rubro-card, .home-benefit-card, .student-card, .home-docente-card, .top-review-card, .home-rubro-quienes-card):nth-child(1) { transition-delay: 0.1s; }
.home-layout-rubro.reveal-ready [data-reveal].is-revealed :is(.home-how-step, .home-rubro-card, .home-benefit-card, .student-card, .home-docente-card, .top-review-card, .home-rubro-quienes-card):nth-child(2) { transition-delay: 0.2s; }
.home-layout-rubro.reveal-ready [data-reveal].is-revealed :is(.home-how-step, .home-rubro-card, .home-benefit-card, .student-card, .home-docente-card, .top-review-card, .home-rubro-quienes-card):nth-child(3) { transition-delay: 0.3s; }
.home-layout-rubro.reveal-ready [data-reveal].is-revealed :is(.home-how-step, .home-rubro-card, .home-benefit-card, .student-card, .home-docente-card, .top-review-card, .home-rubro-quienes-card):nth-child(4) { transition-delay: 0.4s; }
.home-layout-rubro.reveal-ready [data-reveal].is-revealed :is(.home-how-step, .home-rubro-card, .home-benefit-card, .student-card, .home-docente-card, .top-review-card, .home-rubro-quienes-card):nth-child(5) { transition-delay: 0.5s; }
.home-layout-rubro.reveal-ready [data-reveal].is-revealed :is(.home-how-step, .home-rubro-card, .home-benefit-card, .student-card, .home-docente-card, .top-review-card, .home-rubro-quienes-card):nth-child(6) { transition-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
    .home-layout-rubro.reveal-ready [data-reveal],
    .home-layout-rubro.reveal-ready [data-reveal] :is(.home-how-step, .home-rubro-card, .home-benefit-card, .student-card, .home-docente-card, .top-review-card, .home-rubro-quienes-card) {
        opacity: 1;
        transform: none;
        translate: none;
        transition: none;
    }
}

/* Navbar de la home arte: Ingresar/Registrarme ocultos arriba del fold en desktop
   (ya están en el hero); se revelan al pasar el hero (clase nav-scrolled vía JS).
   En mobile van siempre dentro del menú hamburguesa. */
@media (min-width: 992px) {
    .sweet-navbar:not(.nav-scrolled) .arte-nav-auth {
        display: none;
    }
}

.arte-nav-auth {
    display: flex;
    align-items: center;
}

.arte-nav-auth-btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.35rem 1.1rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.arte-nav-auth-btn--login {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.arte-nav-auth-btn--login:hover,
.arte-nav-auth-btn--login:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.arte-nav-auth-btn--register {
    background: #fff;
    color: var(--theme-primary, #2a2a2a);
    border: 1px solid #fff;
}

.arte-nav-auth-btn--register:hover,
.arte-nav-auth-btn--register:focus {
    background: rgba(255, 255, 255, 0.88);
    color: var(--theme-primary, #2a2a2a);
}

/* CTA final del layout arte ("No postergues más tus ganas de crear"). */
.home-rubro-cta-section {
    background: linear-gradient(135deg, var(--theme-primary, #9ed0c5) 0%, var(--theme-navbar, #6a0dad) 100%);
    color: #fff;
    text-align: center;
}

.home-rubro-cta-inner {
    max-width: 720px;
    margin: 0 auto;
}

.home-rubro-cta-title {
    font-family: Georgia, "Cormorant Garamond", "Times New Roman", serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    margin-bottom: 1rem;
    color: #fff;
}

.home-rubro-cta-subtitle {
    font-size: 1.1rem;
    opacity: 0.92;
    margin-bottom: 1.75rem;
}

.home-rubro-cta-btn {
    background: #fff;
    color: var(--theme-primary, #2a2a2a);
    border: none;
    border-radius: 999px;
    font-weight: 700;
    padding: 0.7rem 2.2rem;
    font-size: 1.05rem;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.home-rubro-cta-btn:hover,
.home-rubro-cta-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
    color: var(--theme-primary, #2a2a2a);
}

/* ===========================================================================
   Skin de rubro: "técnica y oficios" (home-layout-tecnica)
   Estética industrial: titulares condensados (Bebas Neue) en mayúsculas. Los
   colores siguen viniendo de la paleta del tenant; esto solo cambia tipografía
   y un par de acentos respecto del skin editorial de arte.
   =========================================================================== */
.home-layout-tecnica .home-hero-rubro-layout .home-hero-title,
.home-layout-tecnica .home-section-title,
.home-layout-tecnica .home-rubro-cta-title {
    font-family: "Bebas Neue", "Oswald", var(--theme-font-heading-primary), sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-style: normal;
}

.home-layout-tecnica .home-hero-rubro-layout .home-hero-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    line-height: 1.02;
}

.home-layout-tecnica .home-rubro-cta-title {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    line-height: 1.05;
}

/* Acento industrial: barra inferior en el hero. */
.home-layout-tecnica .home-hero-rubro-layout {
    border-bottom: 4px solid var(--theme-primary, #ffbc45);
}

.home-layout-tecnica .home-section-eyebrow,
.home-layout-tecnica .home-rubro-cta-eyebrow {
    letter-spacing: 0.22em;
}

/* ===========================================================================
   Skin de rubro: "tecnología" (home-layout-tech)
   Estética terminal/código: titulares monoespaciados; acento neón vía paleta.
   =========================================================================== */
.home-layout-tech .home-hero-rubro-layout .home-hero-title,
.home-layout-tech .home-section-title,
.home-layout-tech .home-rubro-cta-title {
    font-family: ui-monospace, "JetBrains Mono", "Fira Code", "Cascadia Code", "Courier New", monospace;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-style: normal;
}

.home-layout-tech .home-hero-rubro-layout {
    box-shadow: inset 0 0 0 1px rgba(var(--theme-primary-rgb, 0, 255, 136), 0.22);
}

.home-layout-tech .home-section-eyebrow,
.home-layout-tech .home-rubro-cta-eyebrow {
    font-family: ui-monospace, "JetBrains Mono", monospace;
    letter-spacing: 0.14em;
}

/* ===========================================================================
   Skin de rubro: "negocios y finanzas" (home-layout-biz)
   Estética corporativa refinada: titulares serif; acento dorado vía paleta.
   =========================================================================== */
.home-layout-biz .home-hero-rubro-layout .home-hero-title,
.home-layout-biz .home-section-title,
.home-layout-biz .home-rubro-cta-title {
    font-family: "Crimson Pro", Georgia, "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: 0.01em;
    font-style: normal;
}

.home-layout-biz .home-hero-rubro-layout {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
    border-top: 3px solid var(--theme-primary, #e0bf63);
}

/* ── Catálogo: chips de meta (modalidad / duración / módulos) ── */
.cc-chips { display: flex; flex-wrap: wrap; align-items: center; align-self: start; gap: .3rem; margin: .1rem 0 .15rem; }
.cc-chip {
    display: inline-flex; align-items: center; gap: .2rem;
    padding: .15rem .4rem;
    border-radius: 6px;
    background: rgba(var(--theme-primary-rgb), .15);
    color: #2f6f63;
    font-size: .68rem !important;
    font-weight: 600;
    font-family: "Inter", system-ui, sans-serif;
    line-height: 1 !important;       /* altura consistente, independiente del icono */
    white-space: nowrap;             /* evita que "1 módulos" se parta en 2 líneas */
}
.cc-chip i { font-size: .62rem !important; line-height: 1; }

/* ── Precio ── */
.cc-price { font: 700 1.05rem "Inter", system-ui, sans-serif; color: var(--theme-quaternary); }
.cc-price.free { color: var(--theme-success); }

/* ── Descripción a 2 líneas ── */
.student-card-description.clamp-2 {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Nota numérica junto a estrellas ── */
.rating-num { font: 700 .82rem "Inter", system-ui, sans-serif; color: #8a6d1f; margin-left: .3rem; }

/* ── Zoom sutil de la imagen en hover ── */
.student-card-media { overflow: hidden; }
.student-card-media img { transition: transform .45s ease; }
.student-course-card:hover .student-card-media img { transform: scale(1.05); }

/* ── Foco accesible para cards clickeables ── */
.student-card:focus-visible,
.featured-course-card:focus-visible {
    outline: 3px solid var(--theme-focus-ring-color);
    outline-offset: 3px;
    border-radius: var(--theme-radius-lg);
}

/* ── Card destacada (grupo de 1 ítem) — namespace propio ── */
.featured-course-wrap { max-width: 880px; margin: 0 auto; }
.featured-course-card {
    display: grid;
    grid-template-columns: minmax(0, 380px) 1fr;
    background: #fff;
    border-radius: var(--theme-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.05);
    box-shadow: var(--theme-shadow-1);
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease;
}
.featured-course-card:hover { transform: translateY(-6px); box-shadow: var(--theme-shadow-2); }
.featured-course-media {
    position: relative; min-height: 340px; overflow: hidden;
    background: linear-gradient(135deg, var(--theme-tertiary), rgba(var(--theme-primary-rgb), .35));
    display: flex; align-items: center; justify-content: center;
}
.featured-course-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.featured-course-card:hover .featured-course-media img { transform: scale(1.05); }
.featured-course-placeholder { font-size: 3rem; color: rgba(255,255,255,.6); }
.featured-course-badge { position: absolute; top: 1rem; left: 1rem; }
.featured-course-body { padding: 2rem 2.25rem; display: flex; flex-direction: column; gap: 1rem; }
.featured-course-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.featured-course-eyebrow {
    font: 700 .72rem/1 "Inter", system-ui, sans-serif;
    letter-spacing: .15em; text-transform: uppercase; color: var(--theme-secondary);
}
.featured-course-title { font: 700 1.7rem/1.2 "Inter", system-ui, sans-serif; color: var(--theme-quaternary); margin: 0; }
.featured-course-description { margin: 0; color: #4f5b59; font-size: 1.02rem; line-height: 1.62; }
.featured-course-footer {
    margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,.07);
    display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.featured-course-footer .cc-price { font-size: 1.6rem; }
.featured-course-btn { padding: .62rem 2.2rem; font-weight: 600; }

/* ── Mobile: card destacada apilada ── */
@media (max-width: 768px) {
    .featured-course-card { grid-template-columns: 1fr; }
    .featured-course-media { min-height: 180px; height: 180px; }
    .featured-course-body { padding: 1.15rem 1.2rem; gap: .7rem; }
    .featured-course-title { font-size: 1.28rem; }
    .featured-course-description { font-size: .92rem; line-height: 1.55; }
    .featured-course-footer .cc-price { font-size: 1.3rem; }
}

/* ============================================================================
   Menú de usuario y panel de notificaciones del navbar (rediseño 2026-07)
   ----------------------------------------------------------------------------
   Handoff: design_handoff_menu_notificaciones. Sin colores por modo acá:
   todo deriva de tokens (--theme-surface / --theme-border / --theme-on-surface
   (-muted) / --theme-brand-accent + tintes rgba(--theme-primary-rgb) /
   --theme-success / --theme-warning / --theme-danger) que voltean solos en
   body.theme-mode-dark.
   ============================================================================ */

/* --- Campanita del navbar (compartida por los layouts con navbar oscuro) --- */
#notifDropdown .fa-bell,
#notifDropdownSmall .fa-bell {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.notif-count-inline {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--theme-on-primary, #fff); /* vive sobre el navbar (marca): sigue su texto legible */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  line-height: 1;
}

/* --- Contenedores compartidos --- */
.user-menu-panel,
.notif-panel {
  background: var(--theme-surface);
  color: var(--theme-on-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-lg, 20px);
  box-shadow: var(--theme-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.18));
  overflow: hidden;
  padding: 0;
}
.user-menu-panel { width: 296px; }
.notif-panel { width: 392px; max-width: calc(100vw - 24px); }

/* --- Menú de usuario: header de identidad --- */
.user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--theme-border);
}
.user-menu-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--theme-radius-pill, 999px);
  object-fit: cover;
  flex: none;
}
.user-menu-id { min-width: 0; flex: 1; }
.user-menu-name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-menu-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--theme-on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-role-chip {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: var(--theme-radius-pill, 999px);
  background: rgba(var(--theme-primary-rgb), 0.2);
  color: var(--theme-brand-accent, var(--theme-primary));
}
.user-menu-email {
  font-size: 12.5px;
  color: var(--theme-on-surface-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Cierre explícito del panel en mobile (el markup lo marca d-lg-none: en
   desktop el dropdown se cierra con click afuera y no hace falta). */
.user-menu-close {
  width: 34px;
  height: 34px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(var(--theme-on-surface-rgb), 0.06);
  color: var(--theme-on-surface);
  font-size: 15px;
}
.user-menu-close:hover,
.user-menu-close:focus {
  background: rgba(var(--theme-on-surface-rgb), 0.12);
  color: var(--theme-on-surface);
}

/* --- Menú de usuario: secciones e ítems --- */
.user-menu-section {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--theme-on-surface-muted);
  padding: 12px 18px 4px;
  list-style: none;
}
.user-menu-panel .user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  color: var(--theme-on-surface);
  background: none;
  border: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}
.user-menu-panel .user-menu-item i {
  width: 18px;
  flex: none;
  text-align: center;
  font-size: 14px;
  color: var(--theme-brand-accent, var(--theme-primary));
}
.user-menu-panel .user-menu-item:hover,
.user-menu-panel .user-menu-item:focus {
  background: rgba(var(--theme-on-surface-rgb), 0.06);
  color: var(--theme-on-surface);
}
.user-menu-count {
  margin-left: auto;
  flex: none;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--theme-radius-pill, 999px);
  background: var(--theme-primary-strong, var(--theme-primary));
  color: var(--theme-on-primary, #fff);
}

/* --- Menú de usuario: footer (switch de modo + salir) --- */
.user-menu-footer {
  border-top: 1px solid var(--theme-border);
  padding: 4px 0;
  margin-top: 6px;
  list-style: none;
}
.user-menu-mode-form { margin: 0; }
.user-menu-panel .user-menu-mode { padding: 10px 18px; }
.mode-switch {
  margin-left: auto;
  flex: none;
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: var(--theme-radius-pill, 999px);
  background: rgba(var(--theme-on-surface-rgb), 0.22);
  transition: background 0.15s ease;
}
.mode-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--theme-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: left 0.15s ease;
}
body.theme-mode-dark .mode-switch { background: var(--theme-primary); }
body.theme-mode-dark .mode-switch-knob { left: 18px; background: var(--theme-page-bg); }
.user-menu-panel .user-menu-logout,
.user-menu-panel .user-menu-logout i { color: var(--theme-danger); }
.user-menu-panel .user-menu-logout:hover,
.user-menu-panel .user-menu-logout:focus {
  background: rgba(var(--theme-danger-rgb), 0.08);
  color: var(--theme-danger);
}

/* --- Panel de notificaciones ---
   Cada aviso es título (corto, por tipo) + mensaje (el texto completo) + hora,
   con un chip de ícono cuyo tono comunica la categoría: success (cobros y
   logros), accent (novedades), warning (alertas) y danger (crítico). El JS
   estampa .notif-chip--<tono> según el typeCode (ver navbar-menus.js).
   Nada se recorta a propósito: el título envuelve y el mensaje usa line-clamp
   solo como red de seguridad, así no hace falta el tooltip nativo. */
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--theme-border);
}
.notif-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--theme-on-surface);
}
.notif-count-chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--theme-radius-pill, 999px);
  background: var(--theme-primary-strong, var(--theme-primary));
  color: var(--theme-on-primary, #fff);
}
.notif-mark-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--theme-brand-accent, var(--theme-primary));
}
.notif-mark-all i { font-size: 11px; }
.notif-mark-all:hover { text-decoration: underline; }

.notif-list { max-height: 480px; overflow-y: auto; }
.notif-list::-webkit-scrollbar { width: 8px; }
.notif-list::-webkit-scrollbar-thumb {
  background: rgba(var(--theme-on-surface-rgb), 0.22);
  border-radius: var(--theme-radius-pill, 999px);
}
.notif-empty {
  padding: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--theme-on-surface-muted);
}
.notif-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 18px;
  text-decoration: none;
  color: var(--theme-on-surface);
  transition: background 0.15s ease;
}
.notif-row + .notif-row { border-top: 1px solid var(--theme-border); }
.notif-row:hover,
.notif-row:focus {
  background: rgba(var(--theme-on-surface-rgb), 0.05);
  color: var(--theme-on-surface);
}
/* No leída: tinte de marca + barra lateral. La barra/el punto marcan ESTADO
   (no leída), por eso van siempre en color de marca y no en el tono del tipo. */
.notif-row.is-unread {
  padding-left: 22px;
  background: rgba(var(--theme-primary-rgb), 0.07);
}
.notif-row.is-unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--theme-brand-accent, var(--theme-primary));
}
.notif-row.is-unread:hover,
.notif-row.is-unread:focus { background: rgba(var(--theme-primary-rgb), 0.15); }
.notif-chip {
  width: 40px;
  height: 40px;
  border-radius: var(--theme-radius-pill, 999px);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.notif-chip--accent {
  background: rgba(var(--theme-primary-rgb), 0.22);
  color: var(--theme-brand-accent, var(--theme-primary));
}
.notif-chip--success {
  background: rgba(var(--theme-success-rgb), 0.14);
  color: var(--theme-success);
}
.notif-chip--warning {
  background: rgba(var(--theme-warning-rgb), 0.16);
  color: var(--theme-warning);
}
.notif-chip--danger {
  background: rgba(var(--theme-danger-rgb), 0.12);
  color: var(--theme-danger);
}
.notif-body { flex: 1; min-width: 0; }
.notif-title {
  /* Envuelve libremente: los títulos del mapa de tipos son cortos. El clamp es
     red de seguridad para los tipos sin label, donde el título es el texto
     completo de la notificación. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--theme-on-surface);
}
.notif-row.is-unread .notif-title { font-weight: 700; }
.notif-message {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* red de seguridad para textos larguísimos */
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--theme-on-surface-muted);
}
.notif-time {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--theme-on-surface-muted);
}
.notif-time i { font-size: 11px; }
.notif-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex: none;
  margin-top: 6px;
  background: var(--theme-brand-accent, var(--theme-primary));
  visibility: hidden;
}
.notif-row.is-unread .notif-dot { visibility: visible; }

.notif-load-more {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--theme-brand-accent, var(--theme-primary));
}
.notif-load-more:hover { text-decoration: underline; color: var(--theme-brand-accent, var(--theme-primary)); }
.notif-load-more {
  display: block;
  padding: 12px;
  border-top: 1px solid var(--theme-border);
  text-align: center;
}

/* --- Mobile (< 992px: mismo breakpoint del navbar-expand-lg) --- */
.menu-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1055;
}
@media (max-width: 991.98px) {
  /* Notificaciones: panel a ancho completo colgado del navbar.
     !important: Bootstrap/Popper pueden inyectar position/transform inline.
     --navbar-h la setea navbar-menus.js con la altura real del navbar. */
  .notif-panel--small {
    position: fixed !important;
    top: var(--navbar-h, 55px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100vw !important;
    max-width: 100vw;
    border-left: 0;
    border-right: 0;
    border-radius: 0 0 var(--theme-radius-lg, 20px) var(--theme-radius-lg, 20px);
    margin: 0;
    z-index: 1050;
  }
  .notif-panel--small .notif-list { max-height: calc(80vh - 112px); }
  /* Touch target >= 44px. Solo el eje vertical: el horizontal lo maneja
     .notif-row (y el padding-left extra de las no leídas, que no se pisa). */
  .notif-panel--small .notif-row { padding-top: 15px; padding-bottom: 15px; }

  /* Menú de usuario: panel a ancho completo colgado del navbar, igual que
     .notif-panel--small. Antes era un bottom sheet: quedaba pegado al borde
     inferior y visualmente desconectado del trigger que lo abre. */
  .user-menu-panel {
    position: fixed !important;
    top: var(--navbar-h, 55px) !important;
    bottom: auto !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100%;
    max-height: calc(100vh - var(--navbar-h, 55px) - 24px);
    overflow-y: auto;
    /* !important: Bootstrap aplica margin-top (--bs-dropdown-spacer) vía
       .dropdown-menu[data-bs-popper] y dejaba 2px de aire entre el navbar y el
       panel, justo lo que este fix viene a eliminar. */
    margin: 0 !important;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-radius: 0 0 var(--theme-radius-lg, 20px) var(--theme-radius-lg, 20px);
    z-index: 1060;
  }
  .user-menu-panel .user-menu-item { padding: 12px 18px; font-size: 15px; }
  .menu-sheet-backdrop.show { display: block; }
}

/* ==========================================================================
   Resumen financiero del profesor (Ventas y cobros > Resumen financiero).
   Todo con tokens semánticos: la pantalla tiene que leerse igual en presets
   claros, oscuros y saturados. Los anchos de las barras los setea el JS
   (son datos, no estilo).
   ========================================================================== */

.finance-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}

.finance-toolbar__month { max-width: 190px; }

.finance-card {
  background: var(--theme-surface, #fff);
  color: var(--theme-on-surface, #1b1f27);
  border: 1px solid var(--theme-border, rgba(0, 0, 0, .1));
  border-radius: var(--theme-radius-lg, .75rem);
  padding: var(--theme-card-body-padding, 1.25rem);
  margin-bottom: 1rem;
}

.finance-card__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.finance-card__hint {
  color: var(--theme-on-surface-muted, #6c757d);
  font-size: .875rem;
  margin: .25rem 0 1rem;
}

/* El número héroe: es la respuesta a "¿cuánto cobré?" y tiene que leerse de lejos. */
.finance-hero__amount {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}

.finance-delta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .875rem;
  margin-top: .35rem;
  color: var(--theme-on-surface-muted, #6c757d);
}

.finance-delta--up { color: var(--theme-success, #157347); }
.finance-delta--down { color: var(--theme-danger, #c82333); }

/* Barra de composición: muestra la relación entre las partes sin fingir que la
   suma es un ingreso. */
.finance-bar {
  display: flex;
  width: 100%;
  height: 10px;
  border-radius: var(--theme-radius-pill, 50rem);
  overflow: hidden;
  background: rgba(var(--theme-on-surface-rgb, 27, 31, 39), .08);
  margin: 1rem 0 .75rem;
}

.finance-bar__segment { height: 100%; transition: width .2s ease-in-out; }
.finance-bar__segment--courses { background: var(--theme-primary, #0d6efd); }
.finance-bar__segment--seminars { background: rgba(var(--theme-primary-rgb, 13, 110, 253), .6); }
.finance-bar__segment--subscriptions { background: rgba(var(--theme-primary-rgb, 13, 110, 253), .3); }
.finance-bar__segment--collected { background: var(--theme-success, #157347); }
.finance-bar__segment--pending { background: var(--theme-warning, #8a6400); }
.finance-bar__segment--failed { background: var(--theme-danger, #c82333); }

.finance-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .875rem;
}

.finance-legend__item { display: flex; align-items: center; gap: .4rem; }

.finance-legend__dot {
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  flex: 0 0 auto;
}

.finance-legend__dot--courses { background: var(--theme-primary, #0d6efd); }
.finance-legend__dot--seminars { background: rgba(var(--theme-primary-rgb, 13, 110, 253), .6); }
.finance-legend__dot--subscriptions { background: rgba(var(--theme-primary-rgb, 13, 110, 253), .3); }
.finance-legend__dot--collected { background: var(--theme-success, #157347); }
.finance-legend__dot--pending { background: var(--theme-warning, #8a6400); }
.finance-legend__dot--failed { background: var(--theme-danger, #c82333); }

.finance-legend__label { color: var(--theme-on-surface-muted, #6c757d); }
.finance-legend__value { font-weight: 600; }

.finance-note {
  font-size: .8125rem;
  color: var(--theme-on-surface-muted, #6c757d);
  margin: .75rem 0 0;
}

/* Listas accionables: "A cobrar" y "Se cayeron" existen para hacer algo, no para
   informar. Por eso llevan nombres y no un monto suelto. */
.finance-actionable__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.finance-actionable__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--theme-border, rgba(0, 0, 0, .1));
}

.finance-actionable__item:last-child { border-bottom: 0; }
.finance-actionable__who { font-weight: 600; }

.finance-actionable__what {
  color: var(--theme-on-surface-muted, #6c757d);
  font-size: .8125rem;
}

.finance-actionable__amount { font-weight: 600; white-space: nowrap; }

.finance-empty {
  color: var(--theme-on-surface-muted, #6c757d);
  font-size: .875rem;
  margin: 0;
  padding: .5rem 0;
}

/* Pills de estado del ledger. Tintes con rgba sobre el token para que funcionen
   en claro y en oscuro sin dos juegos de colores. */
.finance-pill {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: var(--theme-radius-pill, 50rem);
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.finance-pill--received {
  background: rgba(var(--theme-success-rgb, 21, 115, 71), .15);
  color: var(--theme-success, #157347);
}

.finance-pill--pending {
  background: rgba(var(--theme-warning-rgb, 244, 180, 0), .18);
  color: var(--theme-warning, #8a6400);
}

.finance-pill--failed,
.finance-pill--expired {
  background: rgba(var(--theme-danger-rgb, 200, 35, 51), .10);
  color: var(--theme-danger, #c82333);
}

.finance-pill--bonified {
  background: rgba(var(--theme-on-surface-rgb, 27, 31, 39), .1);
  color: var(--theme-on-surface-muted, #6c757d);
}

.finance-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
}

.finance-filters__search { flex: 1 1 240px; min-width: 180px; }
.finance-filters__select { flex: 0 1 170px; }

/* La tabla scrollea dentro de su caja: la página nunca scrollea horizontal. */
.finance-table-wrap { overflow-x: auto; }
.finance-table { width: 100%; margin: 0; }
.finance-table th { white-space: nowrap; font-size: .8125rem; }
.finance-table td { vertical-align: middle; }
.finance-table__amount { text-align: right; white-space: nowrap; font-weight: 600; }

/* Solapas (.nav-tabs) con la paleta del tenant. Bootstrap las resuelve con sus propios
   defaults — `--bs-nav-tabs-link-active-color: var(--bs-emphasis-color)` (#000) y
   `--bs-nav-link-color: var(--bs-link-color)` (#0d6efd) — que ignoran el tema: en preset
   OSCURO la solapa activa quedaba negra sobre fondo negro (1.6:1, ilegible) y las
   inactivas en azul Bootstrap. Se puentean las variables, no se pisan reglas. */
.nav-tabs {
  --bs-nav-tabs-border-color: var(--theme-border, #dee2e6);
  --bs-nav-link-color: var(--theme-on-surface-muted, #6c757d);
  --bs-nav-link-hover-color: var(--theme-brand-accent, #0d6efd);
  --bs-nav-tabs-link-active-color: var(--theme-on-surface, #1b1f27);
  --bs-nav-tabs-link-active-bg: var(--theme-surface, #fff);
  --bs-nav-tabs-link-active-border-color: var(--theme-border, #dee2e6) var(--theme-border, #dee2e6) var(--theme-surface, #fff);
}

/* Contador de la solapa "Por cobrar". Va pegado al label, no como .badge de Bootstrap:
   dentro de un .nav-link el text-bg-* pisa el color del estado activo. */
.finance-tab-badge {
  display: inline-block;
  margin-left: .35rem;
  padding: .1rem .45rem;
  border-radius: var(--theme-radius-pill, 50rem);
  background: rgba(var(--theme-on-surface-rgb, 27, 31, 39), .12);
  /* Color propio y no heredado: la solapa inactiva usa el muted, y el chip sobre su
     propio tinte no llegaba a 4.5:1. */
  color: var(--theme-on-surface, #1b1f27);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Puente entre el resumen del mes y el backlog: las cards accionables muestran el mes,
   el link lleva a "Por cobrar" con todo. */
.finance-card__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .75rem;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}

.finance-card__link:hover,
.finance-card__link:focus-visible { text-decoration: underline; }

/* Pendientes / Vencidos. Radios en vez de sub-solapas: una barra de solapas dentro de
   otra se lee como un error, y en mobile compite con el scroll horizontal de la de arriba. */
.payables__switch { margin-bottom: 1rem; }

/* El gris de `btn-outline-secondary` (#6c757d) no depende del tema: sobre superficie
   oscura mide 3.4:1. Se puentean las variables del botón a los tokens del tenant y
   Bootstrap sigue manejando hover/focus/checked. */
.payables__switch .btn {
  --bs-btn-color: var(--theme-on-surface, #1b1f27);
  --bs-btn-border-color: var(--theme-border, #dee2e6);
  --bs-btn-hover-color: var(--theme-on-surface, #1b1f27);
  --bs-btn-hover-bg: rgba(var(--theme-on-surface-rgb, 27, 31, 39), .06);
  --bs-btn-hover-border-color: var(--theme-border, #dee2e6);
  --bs-btn-active-color: var(--theme-on-primary, #fff);
  --bs-btn-active-bg: var(--theme-primary-strong, #0d6efd);
  --bs-btn-active-border-color: var(--theme-primary-strong, #0d6efd);
}

.payables__count {
  display: inline-block;
  margin-left: .35rem;
  padding: .05rem .4rem;
  border-radius: var(--theme-radius-pill, 50rem);
  background: rgba(var(--theme-on-surface-rgb, 27, 31, 39), .12);
  /* El color del botón sobre su propio tinte no llega a 4.5:1 (3.7:1 medido en claro):
     el texto del chip va con el token de superficie, no heredado. */
  color: var(--theme-on-surface, #1b1f27);
  font-size: .75rem;
  font-weight: 700;
}

/* Botón activo: el chip OSCURECE el relleno y hereda el texto del botón. Aclararlo no
   sirve — no existe `--theme-on-primary-rgb`, y el fallback blanco dejaba el chip más
   claro que su propio texto (2.9:1 medido). */
.btn-check:checked + .btn .payables__count {
  background: rgba(0, 0, 0, .25);
  color: inherit;
}

/* Los menús de acción de la grilla cuelgan fuera de la caja: sin esto el dropdown de la
   última fila queda recortado por el scroll de la tabla. */
.pending-payments-table-wrap { overflow: visible !important; }

.pending-payments-table-wrap .dropdown-menu {
  position: absolute;
  z-index: 2500;
}

@media (max-width: 575.98px) {
  .finance-legend { gap: .5rem 1rem; }
  .finance-filters__select { flex: 1 1 100%; }
}

/* ============================================================
   Barra de navegación inferior del ALUMNO (_StudentTabBar)
   ------------------------------------------------------------
   La renderiza _Layout en TODAS las vistas del alumno logueado, pero
   SOLO se muestra en mobile: de 768px para arriba el navbar ya expone
   la misma navegación y la barra estorbaría.
   Vive en site.css (no en home-alumno.css) porque esa hoja solo se
   carga en la home.
   ============================================================ */
.student-tabbar {
    display: none;
}

@media (max-width: 767.98px) {
    .student-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        display: flex;
        justify-content: space-around;
        align-items: stretch;
        gap: 0.25rem;
        padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
        background: rgba(var(--theme-surface-rgb, 255, 255, 255), 0.95);
        backdrop-filter: blur(8px);
        border-top: 1px solid var(--theme-border, rgba(0, 0, 0, 0.07));
    }

    /* El color se fija con la especificidad del contenedor: theme-tokens.css tiene
       `a:not(.btn) { color: var(--theme-brand-accent) }` (0,1,1) y le ganaría a un
       `.student-tab` pelado. --theme-brand-accent es el token legible sobre
       superficie (primary crudo puede ser demasiado claro en marcas pastel). */
    .student-tabbar .student-tab {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        padding: 0.4rem 0.25rem;
        border-radius: 12px;
        text-decoration: none;
        color: var(--theme-on-surface-muted, #98a2b3);
        font-size: 1.05rem;
        line-height: 1;
        transition: color 0.15s ease, background 0.15s ease;
    }

    .student-tabbar .student-tab:hover,
    .student-tabbar .student-tab:focus-visible {
        color: var(--theme-brand-accent, var(--theme-primary, #2f8f74));
        background: rgba(var(--theme-primary-rgb, 158, 208, 197), 0.12);
    }

    .student-tabbar .student-tab.is-active {
        color: var(--theme-brand-accent, var(--theme-primary, #2f8f74));
    }

    .student-tabbar .student-tab-label {
        font-size: 0.62rem;
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    /* Convivencia con el footer: la barra es fixed, así que taparía el final del
       scroll. Se le agrega al footer un colchón igual a su altura (~55px). */
    body:has(.student-tabbar) .site-footer {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
    .student-tabbar .student-tab {
        transition: none;
    }
}

/* ============================================================================
   Detalle/auditoría de comisiones (/licencia/cuenta/comisiones)
   ----------------------------------------------------------------------------
   Las clases contextuales de Bootstrap (.table-danger/.table-warning/.table-info,
   .table-light en thead, .badge.bg-secondary, .text-dark dentro de .card) traen
   colores FIJOS pensados para fondo claro: en preset oscuro quedan pasteles con
   texto claro encima (medido: 1.01–1.63:1, ilegible). Como acá el color ES la
   información —marcar qué comisión no cierra—, los estados se pintan con los
   tokens semánticos por modo en vez de esas utilidades.
   ========================================================================== */

.commission-audit__table thead th,
.commission-audit__table tfoot th {
    background-color: var(--theme-surface-2, #f4f6f9);
    color: var(--theme-on-surface, #1b1f27);
}

.commission-audit__table > tbody > tr > td {
    /* Bootstrap resuelve el color de celda por --bs-table-color; sin fijarlo, las
       filas pintadas abajo heredarían el texto del tema y no el del estado. */
    color: var(--theme-on-surface, #1b1f27);
}

.commission-audit__table > tbody > tr.commission-audit__row--ghost > td {
    background-color: rgba(var(--theme-danger-rgb, 200, 35, 51), 0.16);
}

.commission-audit__table > tbody > tr.commission-audit__row--warn > td {
    background-color: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.18);
}

.commission-audit__table > tbody > tr.commission-audit__row--reversal > td {
    background-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.06);
}

.commission-audit__table > tbody > tr.commission-audit__row--reversal > td:first-child {
    box-shadow: inset 3px 0 0 0 var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

/* Etiquetas de estado y de mapeo. El tono de "warning" no tiene token de
   contraste propio (no hay --theme-on-warning), así que se usa como TINTE de
   fondo con el texto en --theme-on-surface, que sí lo garantiza en ambos modos. */
.commission-audit__tag {
    display: inline-block;
    padding: 0.25em 0.6em;
    border-radius: var(--theme-radius-pill, 50rem);
    border: 1px solid transparent;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.commission-audit__tag--ok {
    background-color: var(--theme-success, #157347);
    color: var(--theme-on-success, #fff);
}

.commission-audit__tag--ghost {
    background-color: var(--theme-danger, #c82333);
    color: var(--theme-on-danger, #fff);
}

.commission-audit__tag--warn {
    background-color: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.22);
    border-color: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.55);
    color: var(--theme-on-surface, #1b1f27);
}

.commission-audit__tag--neutral {
    background-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.10);
    border-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.22);
    color: var(--theme-on-surface, #1b1f27);
}

.commission-audit__tag--accent {
    background-color: rgba(var(--theme-primary-rgb, 124, 58, 237), 0.16);
    border-color: rgba(var(--theme-primary-rgb, 124, 58, 237), 0.45);
    color: var(--theme-on-surface, #1b1f27);
}

/* ----------------------------------------------------------------------------
   Cards mobile de la tabla de diagnóstico (< lg). Vienen de la PR #2024, que
   las usaba también para el detalle principal; ese detalle hoy es
   .commission-detail__* (un solo DOM que reflowea), así que acá queda sólo lo
   que consume "Cobros de suscripción sin comisión". La tabla de diagnóstico
   sigue siendo una <table> de 6 columnas: en un teléfono no entra ni con
   scroll horizontal usable.
   -------------------------------------------------------------------------- */

.commission-audit__cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 0 0;
}

.commission-audit__card {
    padding: 0.75rem;
    border: 1px solid var(--theme-border, #e7e9ee);
    border-radius: var(--theme-radius-sm, 8px);
    background-color: var(--theme-surface-2, #f4f6f9);
    color: var(--theme-on-surface, #1b1f27);
}

.commission-audit__card--warn {
    background-color: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.18);
    border-color: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.5);
}

.commission-audit__card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.commission-audit__card-id {
    min-width: 0;
}

.commission-audit__card-student {
    display: block;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.commission-audit__card-date {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.75rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.commission-audit__card-product {
    margin-top: 0.45rem;
    font-size: 0.875rem;
    overflow-wrap: anywhere;
}

.commission-audit__card-ref {
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    overflow-wrap: anywhere;
}

.commission-audit__card-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    gap: 0.5rem;
    margin: 0.65rem 0 0;
    padding-top: 0.65rem;
    border-top: 1px solid var(--theme-border, #e7e9ee);
}

.commission-audit__card-amounts > div {
    min-width: 0;
}

.commission-audit__card-amounts dt {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.commission-audit__card-amounts dd {
    margin: 0.1rem 0 0;
    font-size: 0.875rem;
    overflow-wrap: anywhere;
}

.commission-audit__card-amount--strong {
    font-weight: 700;
}

/* ============================================================================
   Detalle de comisiones del profesor — vista del período (/licencia/cuenta/comisiones)
   ----------------------------------------------------------------------------
   Mismo criterio que el bloque .commission-audit__* de arriba: el color ES la
   información, así que todo sale de tokens semánticos y no de utilidades de
   Bootstrap con colores fijos de fondo claro (ilegibles en preset oscuro).
   Los tags siguen siendo .commission-audit__tag: son los mismos estados.

   Un solo DOM para desktop y mobile: la fila es un grid que por debajo de
   768px se convierte en tarjeta (flex). No hay scroll horizontal.
   ========================================================================== */

.commission-detail {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* Sin esto, el `min-width: auto` de los ítems flex hace que la tira de pills de
   período (ancha por naturaleza) empuje al encabezado más allá del contenedor y
   aparezca scroll horizontal en mobile, aun con su propio overflow-x: auto. */
.commission-detail > *,
.commission-detail__head > * {
    min-width: 0;
}

/* Los íconos de esta vista son decorativos y acompañan al texto que están al
   lado: heredan su color en vez de teñirse de marca. Sin esto, el patrón global
   `i.fa-solid:not([class*="text-"]) { color: var(--theme-primary) }` de arriba
   pinta de marca hasta el triángulo del aviso, que sobre el tinte ámbar queda en
   1.44:1. Se repite el `:not()` para empatar en especificidad y ganar por orden. */
.commission-detail i.fa-solid:not([class*="text-"]),
.commission-detail i.fa-regular:not([class*="text-"]) {
    color: inherit;
}

/* --- Encabezado ---------------------------------------------------------- */

.commission-detail__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
}

/* Los links de este bloque necesitan ganarle a `a:not(.btn)` de theme-tokens.css
   (0,1,1 y cargado DESPUÉS de site.css): sin el descendiente + tipo de elemento,
   heredan --theme-brand-accent y pierden contraste sobre las filas tintadas. */
.commission-detail a.commission-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    text-decoration: none;
}

.commission-detail a.commission-detail__back:hover,
.commission-detail a.commission-detail__back:focus-visible {
    color: var(--theme-on-surface, #1b1f27);
    text-decoration: underline;
}

.commission-detail__title {
    margin: 0.35rem 0 0;
    font-family: var(--theme-font-heading-primary, "Playfair Display", Georgia, serif);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.90625rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

/* --- Selector de período (pills) ----------------------------------------- */

.commission-detail__periods {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    background-color: var(--theme-surface, #fff);
    border: 1px solid var(--theme-border, #e7e9ee);
    border-radius: var(--theme-radius-pill, 50rem);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
}

.commission-detail__period,
.commission-detail a.commission-detail__period {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--theme-radius-pill, 50rem);
    font-size: 0.84375rem;
    font-weight: 600;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.commission-detail__period:hover,
.commission-detail__period:focus-visible,
.commission-detail a.commission-detail__period:hover,
.commission-detail a.commission-detail__period:focus-visible {
    color: var(--theme-on-surface, #1b1f27);
    background-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.06);
    transform: translateY(-1px);
}

.commission-detail a.commission-detail__period.is-active,
.commission-detail__period.is-active {
    background-color: var(--theme-primary, #9ed0c5);
    color: var(--theme-on-primary, #1b1f27);
    font-weight: 700;
}

.commission-detail__period-sep {
    width: 1px;
    height: 1.25rem;
    background-color: var(--theme-border, #e7e9ee);
}

.commission-detail__period-more {
    position: relative;
}

.commission-detail__period-more > summary {
    list-style: none;
    cursor: pointer;
}

.commission-detail__period-more > summary::-webkit-details-marker {
    display: none;
}

.commission-detail__period-picker {
    position: absolute;
    right: 0;
    z-index: 20;
    margin-top: 0.5rem;
    min-width: 15rem;
    padding: 0.75rem;
    display: flex;
    gap: 0.5rem;
    background-color: var(--theme-surface, #fff);
    border: 1px solid var(--theme-border, #e7e9ee);
    border-radius: var(--theme-radius-md, 14px);
    box-shadow: var(--theme-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.18));
}

/* --- Resumen ------------------------------------------------------------- */

.commission-detail__summary {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

.commission-detail__hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    padding: 1.625rem 1.75rem;
    background-color: var(--theme-surface, #fff);
    border: 1px solid rgba(var(--theme-primary-rgb, 158, 208, 197), 0.35);
    border-radius: var(--theme-radius-lg, 20px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
}

.commission-detail__hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background-color: var(--theme-primary, #9ed0c5);
}

.commission-detail__eyebrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
    font-size: 0.78125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.72);
}

.commission-detail__amount-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.875rem;
}

.commission-detail__amount {
    font-family: var(--theme-font-heading-primary, "Playfair Display", Georgia, serif);
    font-size: 3.25rem;
    font-weight: 700;
    line-height: 1;
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__amount-note {
    font-size: 0.875rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.commission-detail__hero-foot {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.84375rem;
    line-height: 1.5;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.commission-detail__hero-foot > i {
    margin-top: 0.2rem;
}

.commission-detail__hero-foot strong {
    color: var(--theme-on-surface, #1b1f27);
    font-weight: 600;
}

.commission-detail__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.commission-detail__stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.375rem;
    padding: 1.375rem;
    background-color: var(--theme-surface, #fff);
    border: 1px solid var(--theme-border, #e7e9ee);
    border-radius: var(--theme-radius-lg, 20px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
}

.commission-detail__stat-label {
    font-size: 0.78125rem;
    font-weight: 600;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.commission-detail__stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__stat-note {
    font-size: 0.78125rem;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.72);
}

/* Línea que resume los stats dentro del héroe: sólo mobile. */
.commission-detail__hero-inline-stats {
    display: none;
}

/* --- Aviso --------------------------------------------------------------- */

/* El tinte ámbar no tiene token de contraste propio (no hay --theme-on-warning):
   se usa como fondo con el texto en --theme-on-surface, igual que el tag --warn. */
.commission-detail__notice {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    background-color: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.16);
    border: 1px solid rgba(var(--theme-warning-rgb, 244, 180, 0), 0.5);
    border-radius: var(--theme-radius-md, 14px);
}

.commission-detail__notice > i {
    margin-top: 0.125rem;
    font-size: 1.125rem;
}

.commission-detail__notice-body {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.commission-detail__notice-title {
    font-size: 0.90625rem;
    font-weight: 700;
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__notice-text {
    font-size: 0.84375rem;
    line-height: 1.5;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.78);
}

.commission-detail__notice-action {
    margin-left: auto;
    align-self: center;
    white-space: nowrap;
    padding: 0.5625rem 1.125rem;
    border: 0;
    border-radius: var(--theme-radius-pill, 50rem);
    background-color: var(--theme-on-surface, #1b1f27);
    color: var(--theme-surface, #fff);
    font-size: 0.84375rem;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.commission-detail__notice-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--theme-shadow-2, 0 8px 24px rgba(0, 0, 0, 0.15));
}

/* --- Lista --------------------------------------------------------------- */

.commission-detail__list {
    background-color: var(--theme-surface, #fff);
    border: 1px solid var(--theme-border, #e7e9ee);
    border-radius: var(--theme-radius-lg, 20px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
    overflow: hidden;
}

.commission-detail__list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid var(--theme-border, #e7e9ee);
}

.commission-detail__list-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.commission-detail__filter {
    padding: 0.4375rem 0.875rem;
    border: 0;
    border-radius: var(--theme-radius-pill, 50rem);
    background-color: var(--theme-surface-2, #f4f6f9);
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.78);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.commission-detail__filter:hover {
    transform: translateY(-1px);
}

.commission-detail__filter[aria-pressed="true"] {
    background-color: var(--theme-on-surface, #1b1f27);
    color: var(--theme-surface, #fff);
    font-weight: 700;
}

/* Grid compartido por cabecera, filas y totales. */
.commission-detail__cols,
.commission-detail__row,
.commission-detail__totals {
    display: grid;
    grid-template-columns: 9.375rem 1fr 8.125rem 6.875rem 9.375rem;
    gap: 0 1.25rem;
    align-items: center;
}

.commission-detail__cols {
    padding: 0.75rem 1.5rem;
    background-color: var(--theme-surface-2, #f4f6f9);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.68);
}

.commission-detail__row {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--theme-border, #e7e9ee);
}

/* [hidden] tiene que ganarle al display:grid/flex de la fila. */
.commission-detail__row[hidden],
.commission-detail__totals[hidden] {
    display: none;
}

.commission-detail__row--review-danger {
    background-color: rgba(var(--theme-danger-rgb, 200, 35, 51), 0.12);
    box-shadow: inset 4px 0 0 0 var(--theme-danger, #c82333);
}

.commission-detail__row--review-warn {
    background-color: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.18);
    box-shadow: inset 4px 0 0 0 rgba(var(--theme-warning-rgb, 244, 180, 0), 0.9);
}

.commission-detail__row--reversal {
    background-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.06);
}

.commission-detail__date {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.commission-detail__date-day {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__date-time {
    font-size: 0.78125rem;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.72);
}

.commission-detail__who {
    display: flex;
    flex-direction: column;
    gap: 0.1875rem;
    min-width: 0;
}

.commission-detail__who-name {
    font-size: 0.90625rem;
    font-weight: 600;
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__who-meta {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.72);
}

.commission-detail__gross {
    text-align: right;
    font-size: 0.875rem;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.82);
}

.commission-detail__fee {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.0625rem;
}

.commission-detail__fee-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--theme-on-surface, #1b1f27);
    white-space: nowrap;
}

.commission-detail__fee-rate {
    font-size: 0.75rem;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.72);
}

.commission-detail__state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
}

/* "Reclamar" es un <button> (abre el modal) y "Dar de baja" también (postea un form): el reset
   los deja leyéndose como el link que eran, sin heredar el chrome del botón nativo. */
.commission-detail a.commission-detail__report,
.commission-detail button.commission-detail__report {
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.78125rem;
    font-weight: 600;
    color: var(--theme-on-surface, #1b1f27);
    text-decoration: underline;
    text-align: left;
    cursor: pointer;
}

.commission-detail__dispute-cancel {
    margin: 0;
}

/* Explica un resultado que se malinterpreta solo: reclamo aceptado, crédito cero.
   Opacidad 0.72 y no 0.62 como el resto del texto secundario: a 12px, 0.62 mide 4.48:1 en preset
   claro y queda debajo de AA. */
.commission-detail__dispute-note {
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.72);
}

/* --- Modal de reclamo ---------------------------------------------------- */

/* Bootstrap pinta el modal con --bs-body-bg; en preset oscuro el layout ya lo puentea, pero
   se fija explícito para que el modal nunca sea un flashbang blanco sobre tema oscuro. */
.commission-detail__dispute-modal {
    background-color: var(--theme-surface, #fff);
    color: var(--theme-on-surface, #1b1f27);
    border: 1px solid var(--theme-border, #e7e9ee);
    border-radius: var(--theme-radius-lg, 20px);
}

.commission-detail__dispute-modal .modal-header,
.commission-detail__dispute-modal .modal-footer {
    border-color: var(--theme-border, #e7e9ee);
}

.commission-detail__dispute-modal .form-text {
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

/* .btn-outline-secondary trae el gris fijo de Bootstrap (--bs-secondary): en preset oscuro queda
   en 3.4:1 contra la superficie del modal. Se repinta con tokens, que es lo único que garantiza
   contraste en los dos modos. */
.commission-detail__dispute-modal .btn-outline-secondary {
    border-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.35);
    color: var(--theme-on-surface, #1b1f27);
    background-color: transparent;
}

.commission-detail__dispute-modal .btn-outline-secondary:hover,
.commission-detail__dispute-modal .btn-outline-secondary:focus-visible {
    background-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.08);
    border-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.55);
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__dispute-target {
    margin-bottom: 1rem;
    padding: 0.75rem 0.875rem;
    border-radius: var(--theme-radius-md, 14px);
    background-color: var(--theme-surface-2, #f4f6f9);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__totals {
    padding: 1.125rem 1.5rem;
    background-color: var(--theme-surface-2, #f4f6f9);
}

.commission-detail__totals-label {
    font-size: 0.84375rem;
    font-weight: 700;
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__totals-gross,
.commission-detail__totals-fee {
    text-align: right;
    font-weight: 700;
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__totals-gross { font-size: 0.875rem; }
.commission-detail__totals-fee   { font-size: 0.9375rem; }

.commission-detail__empty {
    padding: 1.5rem;
    font-size: 0.875rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

/* --- Pie plegable -------------------------------------------------------- */

.commission-detail__legend {
    padding: 1.125rem 1.5rem;
    background-color: var(--theme-surface, #fff);
    border: 1px solid var(--theme-border, #e7e9ee);
    border-radius: var(--theme-radius-lg, 20px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
}

.commission-detail__legend > summary {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    list-style: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-on-surface, #1b1f27);
}

.commission-detail__legend > summary::-webkit-details-marker {
    display: none;
}

.commission-detail__legend-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.875rem;
    font-size: 0.84375rem;
    line-height: 1.55;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.78);
}

.commission-detail__legend-body strong {
    color: var(--theme-on-surface, #1b1f27);
}

/* --- Mobile: la fila se convierte en tarjeta ----------------------------- */

@media (max-width: 767.98px) {
    .commission-detail {
        gap: 0.875rem;
    }

    .commission-detail__subtitle,
    .commission-detail__stats,
    .commission-detail__cols,
    .commission-detail__notice-action,
    .commission-detail__totals-pad,
    .commission-detail__totals-gross {
        display: none;
    }

    .commission-detail__hero-inline-stats {
        display: block;
        font-size: 0.8125rem;
        color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    }

    .commission-detail__head {
        flex-direction: column;
        align-items: stretch;
        gap: 0.875rem;
    }

    /* Pills scrolleables, sin la cápsula contenedora. El max-width es lo que
       impide que el ancho de contenido de la tira agrande la línea del flex
       column y estire a los hermanos (el título) fuera del contenedor. */
    .commission-detail__periods {
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
        max-width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .commission-detail__periods::-webkit-scrollbar {
        display: none;
    }

    .commission-detail__period {
        background-color: var(--theme-surface, #fff);
        border: 1px solid var(--theme-border, #e7e9ee);
        min-height: 2.75rem;
    }

    .commission-detail__period-sep {
        display: none;
    }

    .commission-detail__period-picker {
        right: auto;
        left: 0;
    }

    .commission-detail__summary {
        grid-template-columns: 1fr;
    }

    .commission-detail__hero {
        padding: 1.25rem;
        gap: 0.625rem;
    }

    .commission-detail__amount {
        font-size: 2.375rem;
    }

    .commission-detail__amount-note {
        display: none;
    }

    .commission-detail__hero-foot {
        padding-top: 0.625rem;
        border-top: 1px solid var(--theme-border, #e7e9ee);
        font-size: 0.78125rem;
    }

    .commission-detail__list {
        background: none;
        border: 0;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
    }

    .commission-detail__list-head {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0;
        border-bottom: 0;
    }

    .commission-detail__filters {
        max-width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .commission-detail__filters::-webkit-scrollbar {
        display: none;
    }

    .commission-detail__filter {
        background-color: var(--theme-surface, #fff);
        border: 1px solid var(--theme-border, #e7e9ee);
        min-height: 2.75rem;
    }

    .commission-detail__rows {
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
        margin-top: 0.75rem;
    }

    .commission-detail__row {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.625rem;
        padding: 0.875rem 1rem;
        background-color: var(--theme-surface, #fff);
        border: 1px solid var(--theme-border, #e7e9ee);
        border-radius: var(--theme-radius-md, 14px);
        box-shadow: none;
    }

    .commission-detail__row--review-danger {
        border-color: rgba(var(--theme-danger-rgb, 200, 35, 51), 0.35);
        border-left: 4px solid var(--theme-danger, #c82333);
    }

    .commission-detail__row--review-warn {
        border-color: rgba(var(--theme-warning-rgb, 244, 180, 0), 0.5);
        border-left: 4px solid rgba(var(--theme-warning-rgb, 244, 180, 0), 0.9);
    }

    /* Fecha y vendido migran a la línea meta; sus celdas se ocultan. */
    .commission-detail__date,
    .commission-detail__gross {
        display: none;
    }

    .commission-detail__who {
        flex: 1 1 auto;
        order: 1;
    }

    .commission-detail__fee {
        order: 2;
        flex: 0 0 auto;
    }

    .commission-detail__state {
        order: 3;
        flex: 0 0 auto;
        align-items: flex-end;
    }

    .commission-detail__row--review .commission-detail__state {
        order: 4;
        flex: 1 1 100%;
        align-items: flex-start;
    }

    /* En mobile "Reportar" es un botón de ancho útil, no un link de 12px. */
    /* En mobile "Reclamar" / "Dar de baja" son acciones reales, no notas al pie: pill con hit
       target de 44px, en TODAS las filas (no sólo las que el sistema marcó para revisar). */
    .commission-detail a.commission-detail__report,
    .commission-detail button.commission-detail__report {
        display: inline-flex;
        align-items: center;
        min-height: 2.75rem;
        padding: 0.5625rem 1rem;
        border-radius: var(--theme-radius-pill, 50rem);
        background-color: var(--theme-on-surface, #1b1f27);
        color: var(--theme-surface, #fff);
        font-size: 0.78125rem;
        text-decoration: none;
    }

    /* La celda de estado en mobile alinea a la derecha; el botón necesita ancho propio. */
    .commission-detail__row--review .commission-detail__dispute-cancel,
    .commission-detail__dispute-cancel {
        align-self: flex-end;
    }

    .commission-detail__dispute-note {
        text-align: right;
    }

    .commission-detail__totals {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 0.75rem;
        margin-top: 0.625rem;
        padding: 0.875rem 1rem;
        border-radius: var(--theme-radius-md, 14px);
    }

    .commission-detail__legend {
        padding: 1rem;
    }
}

/* La línea meta de mobile no existe en desktop. */
@media (min-width: 768px) {
    .commission-detail__who-mobile-meta {
        display: none;
    }
}

/* Tablet: con las columnas fijas de desktop, "Alumno y producto" queda en ~60px
   y los nombres se parten letra por letra. Se achican las fijas hasta que la
   columna elástica vuelve a ser la más ancha. */
@media (min-width: 768px) and (max-width: 991.98px) {
    .commission-detail__summary {
        grid-template-columns: 1fr;
    }

    .commission-detail__cols,
    .commission-detail__row,
    .commission-detail__totals {
        grid-template-columns: 6.875rem 1fr 6.5rem 5.75rem 6.875rem;
        gap: 0 0.875rem;
    }

    .commission-detail__cols,
    .commission-detail__row,
    .commission-detail__totals {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .commission-detail__amount {
        font-size: 2.75rem;
    }
}

@media (max-width: 767.98px) {
    .commission-detail__who-mobile-meta {
        font-size: 0.75rem;
        color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.72);
    }
}

@media (prefers-reduced-motion: reduce) {
    .commission-detail__period,
    .commission-detail__filter,
    .commission-detail__notice-action {
        transition: none;
    }

    .commission-detail__period:hover,
    .commission-detail__period:focus-visible,
    .commission-detail__filter:hover,
    .commission-detail__notice-action:hover {
        transform: none;
    }
}

/* ============================================================================
   Bandeja de reclamos de comisión del admin (/clients/status/reclamos)
   ----------------------------------------------------------------------------
   Cards y no tabla: cada reclamo trae un texto libre (el motivo del profesor) y
   un formulario de resolución, que en una fila de tabla no entran. Como card, la
   misma estructura sirve en desktop y en teléfono con sólo cambiar el grid de
   los importes.

   Mismo criterio de color que .commission-audit__*: los estados salen de tokens
   semánticos, nunca de utilidades contextuales de Bootstrap.
   ========================================================================== */

.dispute-inbox {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.dispute-inbox__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.dispute-inbox__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    text-decoration: none;
}

.dispute-inbox__back:hover {
    color: var(--theme-on-surface, #1b1f27);
    text-decoration: underline;
}

.dispute-inbox__title {
    margin: 0.35rem 0 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--theme-on-surface, #1b1f27);
}

.dispute-inbox__subtitle {
    margin: 0.35rem 0 0;
    max-width: 46rem;
    font-size: 0.90625rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.dispute-inbox__filters {
    display: flex;
    gap: 0.5rem;
}

.dispute-inbox__filter {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--theme-border, #e7e9ee);
    border-radius: var(--theme-radius-pill, 50rem);
    background-color: var(--theme-surface, #fff);
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.72);
    font-size: 0.84375rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.dispute-inbox__filter.is-active {
    background-color: var(--theme-on-surface, #1b1f27);
    border-color: var(--theme-on-surface, #1b1f27);
    color: var(--theme-surface, #fff);
    font-weight: 700;
}

.dispute-inbox__empty {
    margin: 0;
    padding: 2rem 1.5rem;
    border: 1px solid var(--theme-border, #e7e9ee);
    border-radius: var(--theme-radius-lg, 20px);
    background-color: var(--theme-surface, #fff);
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    text-align: center;
}

.dispute-inbox__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- Card de un reclamo --------------------------------------------------- */

.dispute-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background-color: var(--theme-surface, #fff);
    border: 1px solid var(--theme-border, #e7e9ee);
    border-radius: var(--theme-radius-lg, 20px);
    box-shadow: var(--theme-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.08));
    color: var(--theme-on-surface, #1b1f27);
}

/* Los pendientes son los accionables: se marcan con la barra ámbar del borde. */
.dispute-card--open {
    border-left: 4px solid rgba(var(--theme-warning-rgb, 244, 180, 0), 0.9);
}

.dispute-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.dispute-card__who {
    display: flex;
    flex-direction: column;
    gap: 0.1875rem;
    min-width: 0;
}

.dispute-card__tenant {
    font-size: 1rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.dispute-card__meta {
    font-size: 0.78125rem;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
    overflow-wrap: anywhere;
}

.dispute-card__amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding-top: 0.875rem;
    border-top: 1px solid var(--theme-border, #e7e9ee);
}

.dispute-card__amounts > div {
    min-width: 0;
}

.dispute-card__amounts dt {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.dispute-card__amounts dd {
    margin: 0.1875rem 0 0;
    font-size: 0.875rem;
    overflow-wrap: anywhere;
}

.dispute-card__amount--strong {
    font-weight: 700;
}

.dispute-card__hint {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.6875rem;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.72);
}

/* El motivo es texto libre del profesor: se destaca como cita, no como dato más. */
.dispute-card__reason {
    padding: 0.875rem 1rem;
    border-radius: var(--theme-radius-md, 14px);
    background-color: var(--theme-surface-2, #f4f6f9);
}

.dispute-card__reason-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.dispute-card__reason-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.dispute-card__form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--theme-border, #e7e9ee);
}

.dispute-card__fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 0.875rem;
}

.dispute-card__field .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--theme-on-surface, #1b1f27);
}

.dispute-card__field .form-text {
    color: var(--theme-on-surface-muted, rgba(27, 31, 39, 0.64));
}

.dispute-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Hit target de 44px: resolver un reclamo mueve plata, no puede ser un click de precisión. */
.dispute-card__actions .btn {
    min-height: 2.75rem;
    border-radius: var(--theme-radius-pill, 50rem);
    padding-inline: 1.25rem;
}

/* .btn-outline-secondary trae el gris fijo de Bootstrap: ilegible en preset oscuro. */
.dispute-card__actions .btn-outline-secondary {
    border-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.35);
    color: var(--theme-on-surface, #1b1f27);
    background-color: transparent;
}

.dispute-card__actions .btn-outline-secondary:hover,
.dispute-card__actions .btn-outline-secondary:focus-visible {
    background-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.08);
    border-color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.55);
    color: var(--theme-on-surface, #1b1f27);
}

.dispute-card__resolution {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--theme-border, #e7e9ee);
    font-size: 0.84375rem;
    color: rgba(var(--theme-on-surface-rgb, 27, 31, 39), 0.78);
}

.dispute-card__resolution-note {
    font-style: italic;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .dispute-card {
        padding: 1rem;
        border-radius: var(--theme-radius-md, 14px);
    }

    /* En teléfono los importes van de a uno: dos columnas de 9rem no entran en 390px. */
    .dispute-card__amounts {
        grid-template-columns: 1fr 1fr;
    }

    .dispute-inbox__filters {
        width: 100%;
    }

    .dispute-inbox__filter {
        flex: 1 1 0;
        justify-content: center;
    }

    .dispute-card__actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* ============================================================================
   EDITOR DEL PRODUCTO — SOLAPAS, SUB-NAVEGACIÓN Y MIEMBROS
   ----------------------------------------------------------------------------
   Extiende las clases ed-* que ya existen (ver "-- Editor page header --").

   Los componentes NUEVOS se escriben contra tokens --theme-*, con los hex del
   editor como fallback: así funcionan en presets claros, oscuros y saturados
   sin necesitar un bloque body.theme-mode-dark por componente (que es lo que
   hoy le falta a casi todo el bloque ed-*).
   ========================================================================== */

/* --- Contador dentro de la solapa principal ----------------------------- */

.subscription-workbench__tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  margin-left: .4rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: rgba(var(--theme-on-surface-rgb), .1);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.5;
}

.subscription-workbench__tab.is-active .subscription-workbench__tab-count {
  background: rgba(var(--theme-primary-rgb), .28);
}

/* --- Sub-navegación (Contenido › y Miembros ›) --------------------------- */

.ed-subnav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ed-subtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--theme-surface, #fff);
  border: 1.5px solid var(--theme-border, #b0aea6);
  border-radius: 20px;
  font: 600 12px/1.3 "Inter", system-ui, sans-serif;
  color: var(--theme-on-surface, #4a4845);
  cursor: pointer;
  transition: background-color .15s ease;
}

.ed-subtab i { font-size: 10px; }
.ed-subtab:hover { background: rgba(var(--theme-primary-rgb), .12); }
.ed-subtab:focus-visible { outline: 2px solid var(--theme-focus-ring-color); outline-offset: 2px; }

/* Activo: fondo sólido + peso. --theme-on-primary es el texto que el server
   calculó como legible sobre la marca; con marcas pastel un #fff fijo no llega. */
.ed-subtab[aria-selected="true"] {
  background: var(--theme-primary-strong, var(--theme-primary));
  border-color: var(--theme-primary-strong, var(--theme-primary));
  color: var(--theme-on-primary, #fff);
  font-weight: 700;
}

.ed-subtab-count { font-weight: 700; color: var(--theme-brand-accent, var(--theme-primary)); }
.ed-subtab[aria-selected="true"] .ed-subtab-count { color: inherit; opacity: .85; }

@media (max-width: 767.98px) {
  .ed-subtab { flex: 1; justify-content: center; min-height: 44px; }
}

/* --- Badge de cambios sin guardar --------------------------------------- */

.ed-unsaved {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(var(--theme-warning-rgb), .16);
  border: 1px solid rgba(var(--theme-warning-rgb), .45);
  border-radius: 20px;
  font: 700 10px/1.6 "Inter", system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--theme-warning);
}

.ed-unsaved[hidden] { display: none; }

/* --- Cabecera partida de sección ---------------------------------------- */

.ed-sec-head--split { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ed-sec-hint { font: 600 11px "Inter", system-ui, sans-serif; color: var(--theme-brand-accent, var(--theme-primary)); }

.ed-buscar-count { margin-left: auto; font: 600 12px "Inter", system-ui, sans-serif; color: var(--theme-on-surface-muted); }

/* --- Miembros: tabla en grid (desktop) ---------------------------------- */

.ed-members-table { display: block; }

.ed-mrow {
  display: grid;
  grid-template-columns: 2.1fr 1.6fr .9fr 1.15fr 1.1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--theme-border);
  color: inherit;
}

.ed-mrow[hidden] { display: none; }

.ed-mrow--head {
  padding: 9px 16px;
  background: var(--theme-surface-2);
  border-bottom: 1.5px solid var(--theme-border);
  font: 700 10px/1.4 "Inter", system-ui, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--theme-on-surface-muted);
}

/* Inactivos: la columna de estado necesita más aire (los rótulos son largos). */
.ed-members--inactive .ed-mrow { grid-template-columns: 2.1fr 1.6fr .9fr 1.35fr 1.1fr .9fr; }

.ed-mrow:not(.ed-mrow--head):hover { background: rgba(var(--theme-primary-rgb), .06); }

.ed-mname { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ed-mname > span:last-child {
  font: 600 13px/1.3 "Inter", system-ui, sans-serif;
  color: var(--theme-on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ed-mcell {
  font: 500 12px "Inter", system-ui, sans-serif;
  color: var(--theme-on-surface-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ed-avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  object-fit: cover;
  font: 700 11px "Inter", system-ui, sans-serif;
  color: var(--theme-on-primary, #fff);
  background: var(--theme-primary-strong, var(--theme-primary));
}

/* Variación estable derivada del id del alumno: distingue filas sin pedir un
   dato de color que no existe. Todas mantienen el par fondo/texto del tema. */
.ed-avatar--0 { background: var(--theme-primary-strong, var(--theme-primary)); }
.ed-avatar--1 { background: color-mix(in srgb, var(--theme-primary) 70%, var(--theme-secondary)); }
.ed-avatar--2 { background: color-mix(in srgb, var(--theme-primary) 40%, var(--theme-secondary)); }
.ed-avatar--3 { background: color-mix(in srgb, var(--theme-primary) 82%, black); }
.ed-avatar--4 { background: color-mix(in srgb, var(--theme-primary) 60%, black); }
.ed-avatar--5 { background: color-mix(in srgb, var(--theme-secondary) 70%, black); }

.ed-progress { display: flex; align-items: center; gap: 7px; }
.ed-progress-track { flex: 1; min-width: 48px; height: 6px; background: rgba(var(--theme-on-surface-rgb), .12); border-radius: 999px; overflow: hidden; }
.ed-progress-fill { display: block; height: 100%; background: var(--theme-success); }
.ed-progress-pct { font: 600 11px "Inter", system-ui, sans-serif; color: var(--theme-on-surface-muted); }

/* En Inactivos el progreso es histórico: se apaga para no leerse como actividad. */
.ed-members--inactive .ed-progress-fill { background: rgba(var(--theme-on-surface-rgb), .38); }

/* Mobile: cards, nunca tabla con scroll horizontal. */
@media (max-width: 767.98px) {
  .ed-mrow--head { display: none; }

  .ed-mrow {
    display: block;
    padding: 11px;
    margin-bottom: 8px;
    background: var(--theme-surface);
    border: 1.5px solid var(--theme-border);
    border-radius: 8px;
  }

  .ed-mrow .ed-avatar { width: 34px; height: 34px; font-size: 12px; }
  .ed-mcard-head { display: flex; align-items: center; gap: 9px; }

  /* El resto de las celdas pasan a pares etiqueta/valor a ancho completo. */
  .ed-mrow > span:not(.ed-mcard-head) { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
  .ed-mrow .ed-mcell[data-label]::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    color: var(--theme-on-surface-muted);
  }
  .ed-mrow .ed-progress { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--theme-border); }
}

/* --- Badges de estado --------------------------------------------------- */

.ed-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid;
  font: 700 10px/1.5 "Inter", system-ui, sans-serif;
  white-space: nowrap;
}

.ed-status i { font-size: 9px; }

/* Cada estado lleva ícono además del color: la tabla se lee igual en escala de
   grises y en cualquier preset. Los tintes salen de tokens semánticos, que ya
   vienen resueltos por modo en theme-tokens.css. */
.ed-st-activa       { background: rgba(var(--theme-success-rgb), .16); color: var(--theme-success); border-color: rgba(var(--theme-success-rgb), .5); }
.ed-st-gracia,
.ed-st-gracia-vencida { background: rgba(var(--theme-warning-rgb), .16); color: var(--theme-warning); border-color: rgba(var(--theme-warning-rgb), .45); }
.ed-st-bonificado   { background: rgba(var(--theme-secondary-rgb), .2); color: var(--theme-on-surface); border-color: rgba(var(--theme-secondary-rgb), .5); }
/* Tintes al 10%: medidos, con .12/.14 el par texto/fondo caia a 4.43 y 4.48:1
   (AA pide 4.5). El borde mantiene la intensidad, asi que el badge no pierde peso. */
.ed-st-pendiente    { background: rgba(var(--theme-focus-ring-rgb), .10); color: var(--theme-focus-ring-color); border-color: rgba(var(--theme-focus-ring-rgb), .45); }
.ed-st-pago-vencido { background: rgba(var(--theme-danger-rgb), .10); color: var(--theme-danger); border-color: rgba(var(--theme-danger-rgb), .45); }
.ed-st-cancelada,
.ed-st-finalizado   { background: rgba(var(--theme-on-surface-rgb), .07); color: var(--theme-on-surface-muted); border-color: rgba(var(--theme-on-surface-rgb), .16); }

/* --- Empty states del editor -------------------------------------------- */

.ed-empty { padding: 36px 18px; text-align: center; }
.ed-empty[hidden] { display: none; }

.ed-empty-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  background: rgba(var(--theme-on-surface-rgb), .06);
  border: 1.5px solid var(--theme-border);
  border-radius: 50%;
  font-size: 16px;
  color: var(--theme-on-surface-muted);
}

.ed-empty-icon--ok {
  background: rgba(var(--theme-success-rgb), .16);
  border-color: rgba(var(--theme-success-rgb), .5);
  color: var(--theme-success);
}

.ed-empty-title { font: 700 14px/1.3 "Inter", system-ui, sans-serif; color: var(--theme-on-surface); margin-bottom: 4px; }
.ed-empty-text { font-size: 12.5px; color: var(--theme-on-surface-muted); max-width: 46ch; margin: 0 auto; }
.ed-empty .btn { margin-top: 14px; }

/* site.css pinta todo ícono FA con la marca vía `i.fa-solid:not([class*="text-"])`
   (0,2,1). Dentro de los badges y los empty states el ícono tiene que heredar el
   color de su contenedor; estas reglas empatan esa especificidad y ganan por orden. */
.ed-status i.fa-solid,
.ed-empty .ed-empty-icon i.fa-solid,
.ed-subtab i.fa-solid { color: inherit; }

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

/* Solapa deshabilitada del editor (Miembros en un producto sin guardar). */
.subscription-workbench__tab.is-disabled {
  background: var(--theme-surface-2);
  box-shadow: inset 0 -3px 0 rgba(var(--theme-on-surface-rgb), .2);
  color: var(--theme-on-surface-muted);
  cursor: not-allowed;
}

/* ============================================================================
   EDITOR — ETIQUETAS DE LA CLASE Y SUBSOLAPA PINEADOS
   ----------------------------------------------------------------------------
   Continúa el bloque ed-* de arriba. Todo con tokens --theme-*.
   ========================================================================== */

/* --- Botón de pinear en la fila de clase -------------------------------- */

.ed-pin-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-left: .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--theme-border);
  border-radius: 6px;
  color: var(--theme-on-surface-muted);
  font-size: 12px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.ed-pin-btn:hover { background: rgba(var(--theme-primary-rgb), .12); }
.ed-pin-btn:focus-visible { outline: 2px solid var(--theme-focus-ring-color); outline-offset: 2px; }

/* Pineada: fondo + borde + ícono rotado. El estado no depende sólo del color,
   y además el aria-pressed lo anuncia. */
.ed-pin-btn.is-pinned {
  background: rgba(var(--theme-success-rgb), .16);
  border-color: rgba(var(--theme-success-rgb), .5);
  color: var(--theme-success);
}

.ed-pin-btn.is-pinned i { transform: rotate(22deg); }
.ed-pin-btn i.fa-solid { color: inherit; }

@media (max-width: 767.98px) {
  .ed-pin-btn { width: 44px; height: 44px; }
}

/* --- Campo de etiquetas de la clase ------------------------------------- */

.ed-tag-field { margin-bottom: 1rem; max-width: 460px; }

.ed-tag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }

.ed-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 10px;
  background: rgba(var(--theme-secondary-rgb), .2);
  border: 1px solid rgba(var(--theme-secondary-rgb), .5);
  border-radius: 6px;
  font: 700 11px/1 "Inter", system-ui, sans-serif;
  color: var(--theme-on-surface);
  transition: border-color .2s ease;
}

/* Feedback al intentar agregar una etiqueta que ya está (ignorando mayúsculas). */
.ed-tag-chip.is-duplicate { border-color: var(--theme-warning); }

.ed-tag-chip-x {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* El círculo mide 16px pero el área táctil real no baja de 24px. */
  margin: -4px;
  padding: 4px;
  box-sizing: content-box;
  background: rgba(var(--theme-on-surface-rgb), .12);
  border: 0;
  border-radius: 50%;
  font-size: 9px;
  color: inherit;
  cursor: pointer;
}

.ed-tag-chip-x:focus-visible { outline: 2px solid var(--theme-focus-ring-color); outline-offset: 1px; }
.ed-tag-chip-x i.fa-solid { color: inherit; }

/* El popover mide EXACTAMENTE lo que el input: left:0/right:0 sobre este wrap,
   que es el único position:relative de la cadena. */
.ed-tag-input-wrap { position: relative; }

.ed-tag-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 5;
  max-height: 260px;
  overflow-y: auto;
  background: var(--theme-surface);
  border: 1.5px solid var(--theme-border);
  border-radius: 8px;
  box-shadow: var(--theme-shadow-3);
}

.ed-tag-popover[hidden] { display: none; }

.ed-tag-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--theme-border);
  font: 500 13px/1.3 "Inter", system-ui, sans-serif;
  color: var(--theme-on-surface);
  cursor: pointer;
}

.ed-tag-option:first-child { border-top: 0; }
.ed-tag-option:hover,
.ed-tag-option[aria-selected="true"] { background: rgba(var(--theme-primary-rgb), .14); font-weight: 600; }

.ed-tag-create {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-top: 1.5px dashed rgba(var(--theme-success-rgb), .6);
  font: 600 13px "Inter", system-ui, sans-serif;
  color: var(--theme-success);
  cursor: pointer;
}

.ed-tag-create:hover { background: rgba(var(--theme-success-rgb), .12); }
.ed-tag-create i.fa-solid { color: inherit; }

.ed-tag-hint { margin-top: 8px; font-size: 11.5px; color: var(--theme-on-surface-muted); }

/* --- Subsolapa Pineados -------------------------------------------------- */

.ed-pinned-list { list-style: none; margin: 0; padding: 0; }
.ed-pinned-list[hidden] { display: none; }

.ed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 8px;
  background: var(--theme-surface);
  border: 1.5px solid var(--theme-border);
  border-radius: 8px;
}

.ed-row-title {
  flex: 1;
  min-width: 0;
  font: 600 13px/1.35 "Inter", system-ui, sans-serif;
  color: var(--theme-on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-drag { color: var(--theme-on-surface-muted); font-size: 13px; cursor: grab; padding: 2px; }
.ed-drag:active { cursor: grabbing; }

.ed-row--dragging {
  opacity: .75;
  border-color: var(--theme-primary-strong, var(--theme-primary));
  box-shadow: var(--theme-shadow-3);
}

.ed-pos {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--theme-surface-2);
  border: 1.5px solid var(--theme-border);
  border-radius: 50%;
  font: 700 11px "Inter", system-ui, sans-serif;
  color: var(--theme-on-surface-muted);
}

.ed-row-actions { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }

.ed-iconbtn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--theme-border);
  border-radius: 6px;
  color: var(--theme-on-surface);
  font-size: 12px;
  cursor: pointer;
}

.ed-iconbtn--sm { width: 28px; height: 28px; font-size: 11px; }
.ed-iconbtn:hover:not([disabled]) { background: rgba(var(--theme-primary-rgb), .12); }
.ed-iconbtn:focus-visible { outline: 2px solid var(--theme-focus-ring-color); outline-offset: 2px; }
.ed-iconbtn[disabled] { border-color: var(--theme-border); color: rgba(var(--theme-on-surface-rgb), .3); cursor: default; }
.ed-iconbtn i.fa-solid { color: inherit; }

.ed-textbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  background: transparent;
  border: 1.5px solid rgba(var(--theme-danger-rgb), .5);
  border-radius: 6px;
  font: 600 11.5px "Inter", system-ui, sans-serif;
  color: var(--theme-danger);
  cursor: pointer;
}

.ed-textbtn:hover { background: rgba(var(--theme-danger-rgb), .1); }
.ed-textbtn:focus-visible { outline: 2px solid var(--theme-focus-ring-color); outline-offset: 2px; }
.ed-textbtn i { font-size: 10px; }
.ed-textbtn i.fa-solid { color: inherit; }

/* Mobile: las acciones bajan a su propia fila y llegan al target táctil. */
@media (max-width: 767.98px) {
  .ed-row { flex-wrap: wrap; }
  .ed-row-actions {
    flex-basis: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--theme-border);
  }
  .ed-row-actions .ed-iconbtn { width: 52px; min-height: 44px; }
  .ed-row-actions .ed-textbtn { flex: 1; justify-content: center; min-height: 44px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .ed-pin-btn, .ed-tag-chip { transition: none; }
}

/* Nota y descarte de cambios pendientes en la barra de acciones del editor. */
.subscription-sticky-actions__note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 12px "Inter", system-ui, sans-serif;
  color: var(--theme-on-surface-muted);
}
.subscription-sticky-actions__note[hidden] { display: none; }
.subscription-sticky-actions__note i { color: var(--theme-warning); }
.subscription-sticky-actions__note i.fa-solid { color: var(--theme-warning); }

.subscription-sticky-actions__discard {
  font: 600 12px "Inter", system-ui, sans-serif;
  color: var(--theme-on-surface-muted);
  text-decoration: none;
}
.subscription-sticky-actions__discard:hover { color: var(--theme-on-surface); text-decoration: underline; }
.subscription-sticky-actions__discard[hidden] { display: none; }

/* Bloque conceptual Acceso vs Miembros (solapa General). */
.ed-concept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ed-concept {
  border: 1.5px solid var(--theme-border);
  border-radius: 8px;
  padding: 12px 14px;
}
.ed-concept-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 700 13px "Inter", system-ui, sans-serif;
  color: var(--theme-on-surface);
  margin-bottom: 4px;
}
.ed-concept-title i.fa-solid { color: var(--theme-brand-accent, var(--theme-primary)); }
.ed-concept-desc { font-size: 12.5px; line-height: 1.55; color: var(--theme-on-surface-muted); }

@media (max-width: 767.98px) {
  .ed-concept-grid { grid-template-columns: 1fr; }
  .subscription-sticky-actions__note { display: none; }
}

/* ============================================================================
   RESTYLE DE LAS 5 SOLAPAS DEL EDITOR (lenguaje del board)
   ----------------------------------------------------------------------------
   Desktop: tira segmentada con borde, cada solapa flex:1 y la activa marcada con
   una barra inferior interna (no sólo color de fondo).
   Mobile: pills scrollables con snap; la quinta asoma cortada como señal de que
   hay más.

   Se corrige de paso un bug de contraste de la versión anterior: la solapa activa
   usaba color:#fff sobre --theme-primary crudo, que con marcas pastel no llega a
   AA. El par correcto es --theme-primary-strong / --theme-on-primary, que el
   servidor calcula.
   ========================================================================== */

@media (min-width: 768px) {
  .subscription-workbench__tabs {
    gap: 0;
    padding: 0;
    border: 1.5px solid var(--theme-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--theme-shadow-1);
  }

  .subscription-workbench__tab {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 10px;
    border: 0;
    border-right: 1.5px solid var(--theme-border);
    border-radius: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--theme-on-surface-muted);
    transition: background-color .15s ease;
  }

  .subscription-workbench__tab:last-child { border-right: 0; }
  .subscription-workbench__tab:hover { background: rgba(var(--theme-primary-rgb), .1); }

  /* Activa: tinte + barra inferior + peso. Nunca sólo color. */
  .subscription-workbench__tabs .subscription-workbench__tab.is-active {
    background: rgba(var(--theme-primary-rgb), .18);
    box-shadow: inset 0 -3px 0 var(--theme-primary-strong, var(--theme-primary));
    color: var(--theme-on-surface);
    font-weight: 700;
  }
}

.subscription-workbench__tab:focus-visible {
  outline: 2px solid var(--theme-focus-ring-color);
  outline-offset: -3px;
}

/* Miembros en un producto sin guardar. */
.subscription-workbench__tabs .subscription-workbench__tab.is-disabled {
  background: var(--theme-surface-2);
  box-shadow: inset 0 -3px 0 rgba(var(--theme-on-surface-rgb), .2);
  color: var(--theme-on-surface-muted);
  cursor: not-allowed;
}

@media (max-width: 767.98px) {
  /* Cinco solapas no entran en 390: pills scrollables con snap. */
  .subscription-workbench__tab {
    min-height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--theme-border);
    border-radius: 20px;
    background: var(--theme-surface);
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .subscription-workbench__tabs .subscription-workbench__tab.is-active {
    background: var(--theme-primary-strong, var(--theme-primary));
    border-color: var(--theme-primary-strong, var(--theme-primary));
    color: var(--theme-on-primary, #fff);
    box-shadow: none;
  }

  .subscription-workbench__tabs .subscription-workbench__tab.is-active .subscription-workbench__tab-count {
    background: rgba(255, 255, 255, .22);
    color: inherit;
  }
}

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

/* Placeholder de destino durante el arrastre de pineados. */
.ed-drop-placeholder {
  height: 44px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(var(--theme-primary-rgb), .14);
  border: 1.5px dashed rgba(var(--theme-success-rgb), .7);
  border-radius: 8px;
  font: 600 11.5px "Inter", system-ui, sans-serif;
  color: var(--theme-on-surface);
  list-style: none;
}

/* Aviso al despinear por cambio de tipo. */
.ed-pin-warning {
  margin: 10px 0 0;
  padding: 8px 12px;
  background: rgba(var(--theme-warning-rgb), .14);
  border: 1px solid rgba(var(--theme-warning-rgb), .45);
  border-radius: 8px;
  font: 600 12px "Inter", system-ui, sans-serif;
  color: var(--theme-warning);
}
.ed-pin-warning[hidden] { display: none; }

/* ============================================================================
   Fila de clase en mobile (editor › Todas las clases)
   ----------------------------------------------------------------------------
   Las acciones bajan a una fila propia por debajo del título, separadas por un
   hairline, y cada botón llega al target táctil de 44px. Sin esto, pinear /
   editar / eliminar quedan apretados contra el borde derecho junto al título.

   Scope [data-class]: los encabezados de MODULO usan la misma estructura .d-flex
   y no deben reacomodarse.
   ========================================================================== */

@media (max-width: 767.98px) {
  [data-class] > .accordion-header > .d-flex {
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    position: relative;
  }

  [data-class] > .accordion-header > .d-flex > .subscription-class-toggle {
    flex: 1 0 100%;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--theme-border);
  }

  [data-class] > .accordion-header > .d-flex > .ed-pin-btn,
  [data-class] > .accordion-header > .d-flex > .subscription-class-delete,
  [data-class] > .accordion-header > .d-flex > .video-class-header-actions .btn {
    min-height: 44px;
    min-width: 52px;
  }

  [data-class] > .accordion-header > .d-flex > .ed-pin-btn { margin-left: 0; }

  [data-class] > .accordion-header > .d-flex > .subscription-class-delete {
    margin-left: auto !important;
  }
}

/* ─── Próxima sesión en vivo ──────────────────────────────────────────────────
   Tarjeta que se muestra arriba del contenido en /Courses/Details. Usa sólo
   tokens --theme-* para verse bien con presets claros, oscuros y saturados.
   El acento es --theme-danger porque es el color de "en vivo" en toda la UI. */
.next-live-session {
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-border, rgba(0, 0, 0, .1));
  border-left: 4px solid var(--theme-danger, #dc3545);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.5rem;
  color: var(--theme-on-surface, #212529);
}

.next-live-session__head {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .35rem;
}

.next-live-session__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--theme-brand-accent, var(--theme-primary, #0d6efd));
}

.next-live-session__eyebrow i { color: inherit; }

.next-live-session__tag {
  display: inline-flex;
  align-items: center;
  padding: .1rem .5rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--theme-danger, #dc3545);
  color: var(--theme-on-danger, #fff);
}

.next-live-session__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 .25rem;
  color: var(--theme-on-surface, #212529);
}

.next-live-session__description {
  margin: 0 0 .6rem;
  font-size: .92rem;
  color: var(--theme-on-surface-muted, #6c757d);
}

.next-live-session__when {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  font-size: .92rem;
  margin-bottom: .85rem;
  color: var(--theme-on-surface, #212529);
}

.next-live-session__when i { color: var(--theme-on-surface-muted, #6c757d); }

.next-live-session__tz {
  font-size: .82rem;
  color: var(--theme-on-surface-muted, #6c757d);
}

.next-live-session__pending {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .88rem;
  color: var(--theme-on-surface-muted, #6c757d);
}

.next-live-session__cta { font-weight: 600; }

@media (max-width: 576px) {
  .next-live-session { padding: .9rem 1rem; }
  .next-live-session__cta { width: 100%; }
}

/* Distintivo de clase nacida de una sesión en vivo. El tipo de clase sigue siendo "video":
   lo que la marca es el vínculo con la sesión, no el tipo. */
.cd-live-badge,
.ed-live-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
  background: rgba(var(--theme-danger-rgb, 220, 53, 69), .12);
  color: var(--theme-danger, #dc3545);
}

.cd-live-badge i,
.ed-live-badge i { color: inherit; }
