/* Academia Tarvos Dudas — premium light interface 2026
   This layer intentionally sits after the legacy stylesheet so the mature
   functionality can remain untouched while the visual system is simplified. */

:root,
html[data-theme='light'] {
    --color-primary: #6d3df5;
    --color-primary-hover: #5f32e6;
    --color-primary-active: #5428d4;
    --color-primary-text: #ffffff;
    --color-info: #5b35dc;
    --color-info-soft: #f1edff;
    --color-surface: #ffffff;
    --color-surface-muted: #f7f7fb;
    --color-surface-subtle: #f3f4f8;
    --color-surface-strong: #eceef4;
    --color-surface-elevated: #ffffff;
    --color-surface-panel: #fbfbfd;
    --color-surface-content: #ffffff;
    --color-surface-content-muted: #fafafe;
    --color-surface-rich: #fbfaff;
    --color-surface-rich-strong: #f4f0ff;
    --color-text: #151628;
    --color-text-muted: #62677c;
    --color-text-soft: #686d80;
    --color-border: #e3e5ed;
    --color-border-strong: #d6d9e4;
    --color-border-soft: #eceef3;
    --color-focus: #5b35dc;
    --color-focus-ring: rgba(109, 61, 245, .18);
    --color-placeholder: #6f7487;
    --color-disabled-text: #8f93a2;
    --color-disabled-surface: #f2f3f6;
    --color-disabled-border: #e2e4ea;
    --color-danger: #c7354c;
    --color-danger-hover: #aa263b;
    --color-danger-soft: #fff1f3;
    --color-success: #11845b;
    --color-success-hover: #0c704b;
    --color-success-soft: #ebfaf4;
    --color-warning: #9a5c00;
    --color-warning-hover: #824d00;
    --color-warning-soft: #fff7e8;
    --gradient-primary: linear-gradient(135deg, #7550f8 0%, #6335ea 100%);
    --gradient-primary-hover: linear-gradient(135deg, #6840ec 0%, #5729dc 100%);
    --gradient-secondary: linear-gradient(135deg, #2b2e43 0%, #171927 100%);
    --gradient-danger: linear-gradient(135deg, #d7475d 0%, #b52d43 100%);
    --gradient-info: linear-gradient(135deg, #7550f8 0%, #6335ea 100%);
    --color-table-header-bg: #f7f7fb;
    --color-table-row-alt: #fcfcfe;
    --color-tab-bg: transparent;
    --color-tab-text: #5f6478;
    --color-tab-active-bg: #f0ebff;
    --color-tab-active-text: #5c31dc;
    --color-chip-bg: #f3f0ff;
    --color-chip-text: #5a35ca;
    --color-breadcrumb-bg: transparent;
    --color-breadcrumb-text: #62677c;
    --color-floating-menu-bg: #ffffff;
    --color-floating-menu-text: #171827;
    --color-tooltip-bg: #171827;
    --color-tooltip-text: #ffffff;
    --bg: #f8f8fb;
    --bg-elevated: #ffffff;
    --bg-soft: #f7f7fb;
    --ink: #151628;
    --ink-soft: #62677c;
    --line: #e3e5ed;
    --line-strong: #d6d9e4;
    --brand: #6d3df5;
    --brand-strong: #5729dc;
    --violet: #6d3df5;
    --violet-soft: #f1edff;
    --shadow-xs: 0 1px 2px rgba(21, 22, 40, .035);
    --shadow-sm: 0 8px 24px rgba(30, 25, 66, .065);
    --shadow-md: 0 22px 60px rgba(30, 25, 66, .10);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
}

html {
    background: #f8f8fb;
    color-scheme: light;
}

body {
    background:
        radial-gradient(circle at 100% -10%, rgba(109, 61, 245, .08), transparent 29rem),
        linear-gradient(180deg, #fbfbfd 0, #f7f8fb 100%);
    color: var(--color-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

/* The product is intentionally light-only. */
.theme-toggle { display: none !important; }

::selection { background: #dfd5ff; color: #23144e; }

a { text-underline-offset: .16em; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[role='button']:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(91, 53, 220, .72) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 5px rgba(109, 61, 245, .14) !important;
}

input,
textarea,
select,
button { font: inherit; }

/* ---------- Top navigation ---------- */
.app-shell--topnav { min-height: 100vh; }

.app-shell--topnav .app-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 74px;
    padding: 12px clamp(20px, 3vw, 42px);
    border-bottom: 1px solid rgba(224, 226, 235, .88);
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 1px 0 rgba(17, 18, 31, .02);
}

.app-topbar__brandline { gap: clamp(20px, 3vw, 38px); }
.app-brand { gap: 10px; }
.app-brand__mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid #ebe8f7;
    background: linear-gradient(145deg, #faf8ff, #f0ebff);
}
.app-brand__mark img { width: 36px; height: 30px; }
.app-brand__copy { gap: 1px; }
.app-brand__copy strong { font-size: .98rem; letter-spacing: -.025em; }
.app-brand__copy small { font-size: 0.875rem; color: #777b8e; }

.app-nav {
    gap: 3px;
    padding: 3px;
    border: 0;
    border-radius: 12px;
    background: #f6f6fa;
    box-shadow: inset 0 0 0 1px #eeeeF4;
    backdrop-filter: none;
}
.app-nav__link {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    color: #5f6477;
    font-size: .88rem;
    font-weight: 650;
}
.app-nav__link:hover { color: #2a2b3d; background: #fff; }
.app-nav__link.is-active {
    color: #5630d4;
    background: #fff;
    box-shadow: 0 1px 5px rgba(30, 25, 66, .08), inset 0 0 0 1px #e5defc;
}

.app-topbar__actions { align-items: center; gap: 10px; }
.app-user { padding: 0 4px; }
.app-user__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eee9ff;
    color: #5b34d4;
}
.app-user__copy strong { font-size: .88rem; font-weight: 700; }
.app-user__copy small { font-size: 0.875rem; }

.app-health,
.app-notification {
    min-height: 40px;
    padding: 6px 11px;
    border-radius: 12px;
    box-shadow: none;
}
.app-health__copy strong,
.app-notification__copy strong { font-size: 0.875rem; letter-spacing: .05em; }
.app-health__copy small,
.app-notification__copy small { font-size: 0.875rem; }

.topbar-button,
.issue-inline-button,
.issue-filter,
.course-summary-card__link {
    min-height: 42px;
    padding: 0 15px;
    border-radius: 11px;
    border-color: #dedfe8;
    background: #fff;
    color: #292b3b;
    font-size: .88rem;
    font-weight: 700;
    box-shadow: none;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background-color .14s ease;
}
.topbar-button:hover,
.issue-inline-button:hover,
.issue-filter:hover,
.course-summary-card__link:hover {
    transform: translateY(-1px);
    border-color: #cfc8ef;
    background: #faf9ff;
    box-shadow: 0 6px 18px rgba(53, 39, 101, .08);
    filter: none;
}
.topbar-button--primary,
.course-summary-card__link,
.issue-filter.is-active {
    border-color: #6d3df5;
    background: #6d3df5;
    color: #fff;
    box-shadow: 0 7px 18px rgba(109, 61, 245, .18);
}
.topbar-button--primary:hover,
.course-summary-card__link:hover,
.issue-filter.is-active:hover { background: #5f32e6; color: #fff; }

.app-content--topnav {
    width: min(1460px, calc(100% - 48px));
    padding: 32px 0 64px;
}

/* ---------- Shared surfaces ---------- */
.panel,
.course-directory,
.sync-banner,
.stats-panel,
.issue-inbox-panel,
.settings-card--premium,
.settings-card--premium-soft {
    border: 1px solid #e5e6ed;
    border-radius: 22px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 36px rgba(31, 27, 61, .045);
}

.panel { padding: 24px; }
.panel__eyebrow,
.app-topbar__eyebrow,
.sync-banner__eyebrow,
.issue-detail__eyebrow {
    color: #6d3df5;
    font-size: 0.875rem;
    letter-spacing: .12em;
    font-weight: 800;
}
.panel__title { font-size: clamp(1.45rem, 2vw, 2rem); letter-spacing: -.035em; line-height: 1.15; }
.panel__text { color: #6b7084; line-height: 1.6; }

/* ---------- New home / course directory ---------- */
.dashboard-page--courses { display: grid; gap: 22px; }
.dudas-home-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    padding: 8px 2px 4px;
}
.dudas-home-hero__copy { max-width: 760px; }
.dudas-home-hero__copy h1 {
    margin: 7px 0 9px;
    font-size: clamp(2.1rem, 4.4vw, 4.15rem);
    line-height: .98;
    letter-spacing: -.06em;
    color: #151628;
}
.dudas-home-hero__copy p { margin: 0; color: #666b7f; font-size: 1.03rem; line-height: 1.6; }
.dudas-home-hero__summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.dudas-home-hero__summary span {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #e2e3eb;
    border-radius: 999px;
    background: #fff;
    color: #686d80;
    font-size: 0.875rem;
}
.dudas-home-hero__summary strong { color: #212233; font-size: 1rem; }
.dudas-home-hero__summary .is-attention { border-color: #f0d8dd; background: #fff6f7; color: #a33347; }
.dudas-home-hero__summary .is-attention strong { color: #b53047; }

.sync-banner--premium { padding: 18px 20px; box-shadow: none; }

.course-directory--premium {
    padding: 24px;
    background: rgba(255,255,255,.92);
}
.course-directory__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.course-directory__heading h2 { margin: 0 0 4px; font-size: 1.45rem; letter-spacing: -.035em; }
.course-directory__heading p { margin: 0; color: #6c7185; }

.course-summary-grid,
.course-summary-grid--directory {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.course-summary-card {
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 17px !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
}
.course-summary-card__surface {
    position: relative;
    min-height: 242px;
    height: 100%;
    padding: 18px !important;
    border: 1px solid #e4e5ec !important;
    border-radius: 17px !important;
    background: #fff !important;
    color: #181927 !important;
    box-shadow: 0 2px 8px rgba(27, 25, 48, .035) !important;
    display: flex !important;
    flex-direction: column;
    gap: 10px !important;
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}
.course-summary-card__surface:hover {
    transform: translateY(-2px) !important;
    border-color: #d4c9fb !important;
    box-shadow: 0 12px 30px rgba(50, 39, 99, .09) !important;
}
.course-summary-card--attention .course-summary-card__surface {
    border-color: #edd2d7 !important;
    box-shadow: inset 3px 0 0 #d44b62, 0 2px 8px rgba(27,25,48,.035) !important;
}
.course-summary-card--healthy .course-summary-card__surface {
    border-color: #e4e5ec !important;
    box-shadow: 0 2px 8px rgba(27,25,48,.035) !important;
}
.course-summary-card__header { min-height: 26px; margin: 0 !important; }
.course-summary-card__status {
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid #e0e1e8;
    background: #f7f7fa;
    color: #696e80;
    font-size: 0.875rem;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.course-summary-card__status--closed {
    background: #f7f7fa !important;
    border-color: #e0e1e8 !important;
    color: #737789 !important;
}
.course-summary-card__status--attention {
    background: #fff0f2 !important;
    border-color: #f1d2d8 !important;
    color: #b0354a !important;
}
.course-summary-card__title {
    margin: 2px 0 0 !important;
    font-size: 1.08rem !important;
    line-height: 1.24;
    letter-spacing: -.03em !important;
    text-transform: none;
    color: #181927 !important;
}
.course-summary-card__priority {
    width: fit-content;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 9px;
    border: 1px solid #ebe8f8 !important;
    background: #f7f5ff !important;
    color: #5a35ca !important;
    font-size: 0.875rem;
    font-weight: 750;
}
.course-summary-card__priority--attention { border-color: #f2d5da !important; background: #fff3f4 !important; color: #b0354a !important; }
.course-summary-card__priority--closed { border-color: #e6e7ec !important; background: #f8f8fa !important; color: #767a8b !important; }
.course-summary-card__priority--recent { border-color: #ded5fb !important; background: #f4f0ff !important; color: #5d36d1 !important; }
.course-summary-card__text { margin: 0 !important; color: #6c7183 !important; font-size: 0.875rem; line-height: 1.5 !important; }
.course-summary-card__signal-row { margin-top: auto; }
.course-summary-card__signal {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    color: #777c8e !important;
    font-size: 0.875rem;
}
.course-summary-card__link--primary {
    width: 100%;
    margin-top: auto;
    min-height: 40px;
    border: 0 !important;
    border-radius: 10px;
    background: #f3f0ff !important;
    color: #5b35d1 !important;
    box-shadow: none !important;
}
.course-summary-card__surface:hover .course-summary-card__link--primary { background: #6d3df5 !important; color: #fff !important; }

.empty-state--premium {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px dashed #d8d9e2;
    border-radius: 16px;
    background: #fafafe;
    padding: 22px;
}
.empty-state__mark {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eee9ff;
    color: #6036df;
    font-weight: 800;
}
.empty-state--premium h3 { margin: 0 0 4px; }
.empty-state--premium p { margin: 0; }

/* ---------- Login ---------- */
.auth-shell {
    min-height: 100vh;
    padding: clamp(22px, 5vw, 64px) 24px;
    background:
        radial-gradient(circle at 82% 5%, rgba(109,61,245,.10), transparent 28rem),
        radial-gradient(circle at 8% 85%, rgba(109,61,245,.05), transparent 24rem),
        #f8f8fb;
}
.auth-shell__panel { width: min(1080px, 100%); }
.auth-card--premium {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(310px, .82fr);
    overflow: hidden;
    border: 1px solid #e1e2e9 !important;
    border-radius: 26px !important;
    background: #fff !important;
    box-shadow: 0 28px 80px rgba(36, 29, 70, .10) !important;
}
.auth-card--premium .auth-card__copy { padding: clamp(34px, 5vw, 62px); gap: 24px; align-content: center; }
.auth-brand--premium {
    display: inline-flex;
    gap: 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.auth-brand__logo {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    border: 1px solid #e7e1fa;
    background: #f3efff;
}
.auth-brand--premium img { width: 38px; height: 31px; padding: 0; border-radius: 0; background: transparent; }
.auth-brand__identity { display: grid; align-content: center; gap: 1px; }
.auth-brand__identity strong { font-size: .98rem; }
.auth-brand__identity span { font-size: 0.875rem; color: #707587; }
.auth-card__intro { display: grid; gap: 12px; max-width: 650px; }
.auth-card--premium .auth-card__eyebrow {
    min-height: 27px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #6d3df5;
    font-size: 0.875rem;
    letter-spacing: .12em;
}
.auth-card--premium .auth-card__title {
    margin: 0;
    max-width: 620px;
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: .96;
    letter-spacing: -.065em;
    color: #141526;
}
.auth-card--premium .auth-card__text { max-width: 600px; font-size: 1.03rem; line-height: 1.65; color: #666b7f; }
.auth-card--premium .auth-card__button { min-height: 50px; padding: 0 18px; gap: 10px; border-radius: 12px; }
.google-mark {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #4285f4;
    font-weight: 900;
    font-family: Arial, sans-serif;
}
.auth-card__return-note { margin: -8px 0 0; color: #5e35d3; font-size: 0.875rem; font-weight: 650; }
.tarvos-login-privacy-note { max-width: 580px; margin: 0; color: #686d80; font-size: 0.875rem; line-height: 1.6; }
.tarvos-login-privacy-note a { color: #5d35d8; font-weight: 700; text-decoration: underline; }
.auth-card--premium .auth-card__panel {
    padding: clamp(32px, 4vw, 52px);
    border-left: 1px solid #e7e4ef;
    background:
        radial-gradient(circle at 90% 8%, rgba(109,61,245,.12), transparent 17rem),
        linear-gradient(180deg, #faf9ff, #f5f3fb);
    display: grid;
    align-content: center;
    gap: 18px;
}
.auth-card__panel-kicker { color: #6d3df5; font-size: 0.875rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-card--premium .auth-card__panel h2 { margin: 0; font-size: clamp(1.55rem, 2.4vw, 2.15rem); line-height: 1.08; letter-spacing: -.045em; }
.auth-feature-list--premium { display: grid; gap: 0; }
.auth-feature-list--premium article {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: 13px;
    padding: 17px 0;
    border-bottom: 1px solid #e4e2eb;
}
.auth-feature-list--premium article:last-child { border-bottom: 0; }
.auth-feature-list__icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e3def7;
    color: #6438e2;
    font-size: 0.875rem;
    font-weight: 850;
}
.auth-feature-list--premium strong { color: #242536; font-size: .94rem; }
.auth-feature-list--premium p { margin: 3px 0 0; color: #6f7487; font-size: 0.875rem; line-height: 1.55; }
.auth-loading-inline { color: #676c7f; }
.auth-loading-inline__dot { background: #6d3df5; }

/* ---------- Course page ---------- */
.course-page { gap: 20px; }
.course-banner,
.course-overview-panel,
.course-lock-panel,
.composer-card-saas,
.tutor-card,
.insight-card {
    border: 1px solid #e3e4eb !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 9px 28px rgba(30, 26, 58, .045) !important;
}
.course-banner { padding: 22px 24px; }
.course-banner__badge,
.discussion-thread__pill--course {
    color: #5d35d5 !important;
    background: #f2eeff !important;
    border-color: #ddd3ff !important;
}
.course-overview-panel__title { color: #161727; }
.course-overview-panel__text { color: #666b7f; }

.issue-board-list,
.issue-board-list--flat { gap: 16px; }
.discussion-thread.issue-row {
    width: min(100%, 1120px);
    border: 1px solid #e1e3ea;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(31, 27, 61, .045);
}
.discussion-thread.issue-row:hover { transform: none; border-color: #d8d1f2; box-shadow: 0 9px 28px rgba(47,36,91,.07); }
.discussion-thread__question { background: #fff; }
.discussion-thread__title { color: #171827; font-size: clamp(1.05rem, 1.4vw, 1.24rem); line-height: 1.35; }
.discussion-thread__meta { color: #686d80; font-size: 0.875rem; }
.discussion-thread__content { color: #343648; }
.discussion-thread__status,
.discussion-thread__pill {
    min-height: 25px;
    border-radius: 999px;
    font-size: 0.875rem;
    letter-spacing: .04em;
}
.discussion-thread__status--resolved { color: #087250 !important; background: #eaf9f3 !important; border-color: #c9ebdf !important; }
.discussion-thread__status--pending { color: #a33a4c !important; background: #fff0f2 !important; border-color: #f0d0d7 !important; }

.thread-response--teacher,
.issue-answer--answered {
    border: 1px solid #ddd3ff !important;
    border-left: 3px solid #6d3df5 !important;
    border-radius: 15px !important;
    background: linear-gradient(180deg, #fbf9ff, #f7f4ff) !important;
}
.thread-response--student { background: #fafafe !important; border-color: #e5e6ec !important; }
.thread-response__badge { color: #5c34d5 !important; background: #eee9ff !important; border-color: #ddd3ff !important; }
.thread-prose { color: #2e3040; line-height: 1.72; }
.thread-prose h1,.thread-prose h2,.thread-prose h3,.thread-prose h4 { color: #181927; letter-spacing: -.025em; }
.thread-prose a { color: #5f35d8; }
.thread-prose blockquote { border-left-color: #bdaaf9; background: #f8f6ff; color: #4f5265; }
.thread-math,
.thread-math--display {
    border: 1px solid #ebe7f8 !important;
    border-radius: 12px !important;
    background: #faf8ff !important;
    color: #202132 !important;
}

.issue-actions__toggle,
.issue-create-menu__toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 11px;
    border: 1px solid #dfe0e7;
    background: #fff;
    color: #2a2c3b;
    box-shadow: none;
}
.issue-actions__menu,
.discussion-thread .issue-actions__menu,
.issue-create-menu__panel {
    z-index: 500 !important;
    min-width: 220px;
    padding: 7px;
    border: 1px solid #dfdfe8;
    border-radius: 14px;
    background: #fff;
    color: #202130;
    box-shadow: 0 18px 48px rgba(24, 20, 55, .16);
}
.issue-actions__item,
.issue-create-menu__link {
    min-height: 40px;
    border-radius: 9px;
    color: #303143;
    background: transparent;
}
.issue-actions__item:hover,
.issue-create-menu__link:hover { background: #f5f2ff; color: #5932d3; }
.issue-actions__item--danger { background: transparent !important; color: #b62e45 !important; }
.issue-actions__item--danger:hover { background: #fff0f2 !important; }

/* Composer, filters and controls */
.composer-card-saas__title,
.composer-card-saas__editor,
.thread-composer__input,
.settings-input,
.issue-toolbar__search input,
.issue-reply-form__textarea,
.issue-select,
select,
input[type='text'],
input[type='search'],
input[type='email'],
input[type='number'],
textarea {
    border-color: #dfe1e8 !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: #1d1e2e !important;
    box-shadow: inset 0 1px 2px rgba(25,26,43,.025) !important;
}
.composer-card-saas__title:hover,
.composer-card-saas__editor:hover,
.thread-composer__input:hover,
.settings-input:hover,
.issue-toolbar__search input:hover,
.issue-reply-form__textarea:hover,
select:hover { border-color: #cbc5e4 !important; }

.issue-filter,
.settings-tab {
    border-radius: 10px;
    box-shadow: none;
}
.issue-filter.is-active,
.settings-tab.is-active {
    color: #5c34d3 !important;
    background: #f0ebff !important;
    border-color: #dcd2ff !important;
    box-shadow: none !important;
}

/* Attachments and media */
.thread-attachment {
    border: 1px solid #e1e3ea !important;
    border-radius: 12px !important;
    background: #fafafe !important;
    box-shadow: none !important;
}
.thread-attachment:hover { border-color: #d3c9f6 !important; background: #f7f4ff !important; }
.media-lightbox { z-index: 2000 !important; }
.media-lightbox__dialog {
    border-radius: 20px !important;
    border: 1px solid rgba(255,255,255,.55) !important;
    box-shadow: 0 28px 90px rgba(12, 10, 30, .30) !important;
}
.media-lightbox__action,
.media-lightbox__close {
    border-radius: 10px !important;
}

/* ---------- Settings ---------- */
.settings-tabs-shell { border-radius: 14px; padding: 4px; border: 1px solid #e2e3e9; background: #f6f6fa; }
.settings-tab { min-height: 40px; background: transparent; border-color: transparent; color: #626779; }
.settings-tab:hover { background: #fff; color: #343647; }
.settings-card--premium,
.settings-card--premium-soft,
.settings-access-panel--premium { box-shadow: 0 8px 28px rgba(31,27,61,.04); }
.settings-table-wrap { border-radius: 14px; border-color: #e1e2e9; }
.settings-table th { background: #f8f8fb; color: #656a7d; }
.settings-table tbody tr:nth-child(even) td { background: #fcfcfe; }
.settings-switch { border-color: #e2e3e9; border-radius: 12px; background: #fff; }
.settings-switch input:checked + .settings-switch__track { background: #6d3df5; border-color: #6d3df5; }

/* ---------- Statistics ---------- */
.stats-dashboard,
.stats-dashboard--simple { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.stats-panel,
.stats-kpi-card,
.stats-dashboard__hero,
.stats-dashboard__filters,
.stats-dashboard--simple .stats-kpi-simple,
.stats-dashboard--simple .stats-mini-ranking__row,
.stats-dashboard--simple .stats-page-header,
.stats-dashboard--simple .stats-hero-simple,
.stats-dashboard--simple .stats-filters-simple {
    border-color: #e3e4eb !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 7px 24px rgba(31, 27, 61, .04) !important;
}

/* ---------- Access denied ---------- */
.auth-card--denied { max-width: 920px; margin: 0 auto; }
.auth-card--denied .auth-card__title { font-size: clamp(2.2rem, 5vw, 4rem); }

/* ---------- Toasts / overlays ---------- */
.toast-host { z-index: 2200 !important; }
.toast { border-radius: 13px; border-color: #e1e2e9; box-shadow: 0 16px 44px rgba(24,20,55,.16); }
.composer-modal,
.issue-reply-modal,
.sketch-modal,
.status-overlay { z-index: 1800 !important; }
.composer-modal__dialog,
.issue-reply-modal__dialog,
.sketch-modal__dialog,
.status-overlay__dialog { border-radius: 20px; border-color: #e1e2e9; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .course-summary-grid,
    .course-summary-grid--directory { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .app-brand__copy small { display: none; }
    .app-topbar__actions .app-user__copy { display: none; }
}

@media (max-width: 900px) {
    .app-shell--topnav .app-topbar {
        position: relative;
        padding: 12px 18px;
        align-items: flex-start;
        flex-direction: column;
    }
    .app-topbar__brandline { width: 100%; justify-content: space-between; gap: 12px; }
    .app-nav { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    .app-topbar__actions { width: 100%; justify-content: flex-end; }
    .app-health__copy small,
    .app-notification__copy small { display: none; }
    .app-content--topnav { width: min(100% - 28px, 760px); padding-top: 22px; }
    .dudas-home-hero { align-items: flex-start; flex-direction: column; gap: 16px; }
    .dudas-home-hero__summary { justify-content: flex-start; }
    .course-summary-grid,
    .course-summary-grid--directory { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .auth-card--premium { grid-template-columns: 1fr; }
    .auth-card--premium .auth-card__panel { border-left: 0; border-top: 1px solid #e7e4ef; }
}

@media (max-width: 620px) {
    body { font-size: 14px; }
    .app-shell--topnav .app-topbar { gap: 10px; }
    .app-brand__copy { display: none; }
    .app-nav { width: calc(100% - 58px); }
    .app-nav__link { min-height: 38px; padding: 0 12px; white-space: nowrap; }
    .app-topbar__actions { justify-content: space-between; }
    .app-health,
    .app-notification { max-width: calc(100vw - 120px); }
    .app-health__copy strong,
    .app-notification__copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .app-content--topnav { width: calc(100% - 22px); padding: 18px 0 40px; }
    .dudas-home-hero__copy h1 { font-size: clamp(2.35rem, 13vw, 3.5rem); }
    .course-directory--premium { padding: 15px; border-radius: 18px; }
    .course-summary-grid,
    .course-summary-grid--directory { grid-template-columns: 1fr; }
    .course-summary-card__surface { min-height: 205px; }
    .auth-shell { padding: 14px; }
    .auth-card--premium { border-radius: 20px !important; }
    .auth-card--premium .auth-card__copy,
    .auth-card--premium .auth-card__panel { padding: 27px 23px; }
    .auth-card--premium .auth-card__title { font-size: clamp(2.55rem, 14vw, 4rem); }
    .auth-card--premium .auth-card__button { width: 100%; }
    .panel { padding: 16px; border-radius: 18px; }
    .discussion-thread.issue-row { border-radius: 15px; }
    .issue-actions__menu,
    .discussion-thread .issue-actions__menu { min-width: min(250px, calc(100vw - 34px)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ---------- 2026 product-polish pass ---------- */
.app-content--topnav {
    width: min(1380px, calc(100% - 48px));
}

/* A quieter, task-first course hero inspired by the campus experience. */
.course-banner.course-banner--hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: end !important;
    gap: clamp(28px, 5vw, 72px) !important;
    padding: clamp(28px, 4vw, 44px) !important;
    text-align: left !important;
    background:
        radial-gradient(circle at 100% 0, rgba(109, 61, 245, .09), transparent 25rem),
        #fff !important;
}
.course-banner__copy--hero {
    width: auto !important;
    max-width: 820px;
    align-items: start !important;
    gap: 12px !important;
}
.course-banner__hero-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}
.course-banner__eyebrow {
    color: #6d3df5 !important;
    font-size: 0.875rem !important;
    font-weight: 850 !important;
    letter-spacing: .12em !important;
}
.course-banner__title {
    margin: 0 !important;
    max-width: 18ch;
    color: #141526 !important;
    font-size: clamp(2.15rem, 4.1vw, 4.1rem) !important;
    line-height: .98 !important;
    letter-spacing: -.055em !important;
    text-wrap: balance;
}
.course-banner__text--hero {
    max-width: 68ch !important;
    margin: 0 !important;
    color: #62677b !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
}
.course-banner__hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 5px;
}
.course-banner__tutor-link {
    display: inline-flex;
    min-width: 0 !important;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border: 1px solid #ded7fa;
    border-radius: 11px;
    background: #f5f1ff;
    color: #5c34d6;
    font-weight: 750;
    text-decoration: none;
}
.course-banner__tutor-link:hover {
    border-color: #cfc2f8;
    background: #eee7ff;
}
.course-banner__support {
    max-width: 58ch;
    color: #686d80 !important;
    font-size: 0.875rem !important;
    line-height: 1.5;
}
.course-banner__badge {
    min-height: 26px;
    padding: 5px 9px;
    border: 1px solid #ded5fb !important;
    border-radius: 999px;
    background: #f4f0ff !important;
    color: #5d36d1 !important;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: .055em;
}
.course-banner__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
    align-self: end;
}
.course-banner__metric {
    min-width: 132px;
    padding: 18px 20px;
    border: 1px solid #e4e2ec;
    border-radius: 17px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 6px 22px rgba(29, 25, 57, .045);
}
.course-banner__metric strong {
    display: block;
    color: #6d3df5;
    font-size: 1.85rem;
    line-height: 1;
    letter-spacing: -.045em;
}
.course-banner__metric span {
    display: block;
    margin-top: 8px;
    color: #686d80;
    font-size: 0.875rem;
    font-weight: 650;
}

/* Make the discussion workspace feel like a document, not nested cards. */
.issue-board-panel--course {
    padding: clamp(18px, 2.4vw, 30px) !important;
    border: 1px solid #e5e6ed !important;
    border-radius: 22px !important;
    background: rgba(255,255,255,.92) !important;
    box-shadow: 0 10px 34px rgba(31,27,61,.045) !important;
}
.issue-toolbar--course {
    display: grid !important;
    gap: 14px !important;
}
.issue-toolbar__searchline {
    display: flex;
    align-items: center;
    gap: 10px;
}
.issue-toolbar__search--wide input {
    min-height: 46px;
    padding-inline: 16px;
}
.issue-toolbar__controls--modern {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px !important;
    padding-top: 13px;
    border-top: 1px solid #ececf2;
}
.issue-toolbar__field {
    min-width: 0 !important;
    gap: 5px !important;
}
.issue-toolbar__field > span {
    color: #777c8e;
    font-size: 0.875rem !important;
    font-weight: 800 !important;
    letter-spacing: .09em !important;
}
.issue-select {
    min-height: 42px;
    padding: 8px 36px 8px 12px !important;
    border-radius: 10px !important;
    background-color: #fff !important;
}
.issue-board-summary--course {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 8px 0 0 !important;
    padding: 0 2px;
    color: #74798c;
}
.issue-board-summary--course strong {
    color: #1d1e2e;
    font-size: 1rem;
}

.discussion-thread.issue-row {
    width: 100% !important;
    border-radius: 18px !important;
    overflow: visible !important;
}
.discussion-thread__question {
    border-radius: 18px 18px 0 0;
}
.discussion-thread__content {
    font-size: .98rem;
    line-height: 1.72;
}
.thread-response--teacher,
.issue-answer--answered {
    background: linear-gradient(180deg, #fbfaff, #f7f4ff) !important;
}

/* Login: premium but restrained; the action stays obvious. */
.auth-card--premium .auth-card__title {
    max-width: 13ch;
    font-size: clamp(2.35rem, 4vw, 3.7rem) !important;
}
.auth-card--premium .auth-card__copy {
    min-height: min(620px, 76vh);
}
.auth-card--premium .auth-card__button {
    width: fit-content;
    min-width: 220px;
}

/* Course directory: less visual noise and a stronger scan pattern. */
.course-summary-card__surface {
    min-height: 220px !important;
}
.course-summary-card__title {
    max-width: 22ch;
    font-size: 1.04rem !important;
}
.course-summary-card__link--primary {
    justify-content: space-between;
}
.course-summary-card__link--primary::after {
    content: '→';
    margin-left: 8px;
    font-size: 1rem;
}

/* Prevent floating menus and rich editors from falling under a sticky header. */
.issue-actions,
.issue-create-menu { position: relative; z-index: 20; }
.issue-actions[open],
.issue-create-menu[open] { z-index: 620; }
.issue-actions__menu,
.issue-create-menu__panel { z-index: 650 !important; }
.composer-modal,
.issue-reply-modal,
.sketch-modal,
.media-lightbox,
.status-overlay { z-index: 2000 !important; }

@media (max-width: 980px) {
    .course-banner.course-banner--hero {
        grid-template-columns: 1fr !important;
        align-items: start !important;
    }
    .course-banner__metrics {
        width: 100%;
        max-width: 420px;
    }
    .issue-toolbar__controls--modern {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .app-content--topnav { width: calc(100% - 20px); }
    .course-banner.course-banner--hero { padding: 23px 19px !important; }
    .course-banner__title { font-size: clamp(2rem, 11vw, 3.15rem) !important; }
    .course-banner__metrics { grid-template-columns: 1fr 1fr; }
    .course-banner__metric { min-width: 0; padding: 14px; }
    .course-banner__metric strong { font-size: 1.55rem; }
    .issue-toolbar__searchline { align-items: stretch; flex-direction: column; }
    .issue-toolbar__actions { display: grid !important; grid-template-columns: 1fr; }
    .issue-toolbar__actions > * { width: 100%; }
    .issue-toolbar__controls--modern { grid-template-columns: 1fr; }
    .auth-card--premium .auth-card__copy { min-height: auto; }
    .auth-card--premium .auth-card__button { width: 100%; min-width: 0; }
}

.course-directory--attention {
    border-color: #eadce0 !important;
    background:
        linear-gradient(180deg, rgba(255,250,251,.88), rgba(255,255,255,.97)) !important;
}
.course-directory__count {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid #e2e3eb;
    border-radius: 999px;
    background: #f8f8fb;
    color: #656a7d;
    font-size: 0.875rem;
    font-weight: 750;
    white-space: nowrap;
}
.course-directory__count--attention {
    border-color: #efd4d9;
    background: #fff2f4;
    color: #a93649;
}
.course-summary-grid--attention {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
@media (max-width: 980px) {
    .course-summary-grid--attention { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 620px) {
    .course-directory__heading { align-items: flex-start; flex-direction: column; }
    .course-summary-grid--attention { grid-template-columns: 1fr !important; }
}

/* ========================================================================
   Tarvos Dudas · UX / performance pass 2026-08-12
   Final overrides: calm white surfaces, violet accent, simpler information
   hierarchy and lighter media handling.
   ======================================================================== */

:root,
html[data-theme='light'] {
    --tarvos-violet: #6c3cf0;
    --tarvos-violet-strong: #5729d9;
    --tarvos-violet-soft: #f2eeff;
    --tarvos-ink: #121426;
    --tarvos-muted: #666b7e;
    --tarvos-line: #e7e8ef;
    --tarvos-soft: #f7f8fb;
    --tarvos-success: #0f8a61;
    --tarvos-warning: #a86000;
    --tarvos-danger: #c6324a;
}

body {
    background: #f7f8fb !important;
    color: var(--tarvos-ink);
}

.app-shell--topnav {
    min-height: auto;
}

.app-shell--topnav .app-topbar {
    min-height: 70px;
    padding: 10px clamp(18px, 3vw, 38px);
    border-bottom: 1px solid rgba(226, 228, 236, .94);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 1px 0 rgba(18, 20, 38, .02);
}

.app-brand {
    text-decoration: none;
}
.app-brand:hover .app-brand__copy strong { color: var(--tarvos-violet-strong); }
.app-brand__mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f4f1ff;
}
.app-brand__mark img { width: 34px; height: 30px; }
.app-brand__copy strong { font-size: .95rem; }
.app-brand__copy small { font-size: 0.875rem; }

.app-nav {
    background: #f6f6f9;
    box-shadow: inset 0 0 0 1px #ececf2;
}
.app-nav__link {
    min-height: 36px;
    padding: 0 13px;
    border-radius: 9px;
}

.app-content--topnav {
    width: min(1320px, calc(100% - 40px));
    padding: 34px 0 54px;
}

.panel,
.course-directory,
.sync-banner,
.issue-inbox-panel,
.settings-card--premium,
.settings-card--premium-soft {
    border: 1px solid var(--tarvos-line) !important;
    background: #fff !important;
    box-shadow: 0 10px 32px rgba(30, 29, 57, .045) !important;
}

.panel__eyebrow,
.sync-banner__eyebrow {
    color: var(--tarvos-violet) !important;
    font-size: 0.875rem !important;
    font-weight: 800 !important;
    letter-spacing: .11em !important;
    text-transform: uppercase;
}

.panel__title {
    color: var(--tarvos-ink);
    letter-spacing: -.035em;
}
.panel__text,
.panel__text--muted { color: var(--tarvos-muted) !important; }

/* Course home: quiet directory with useful priority instead of visual noise. */
.dudas-home-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
    padding: 10px 4px 2px;
}
.dudas-home-hero__copy { max-width: 780px; }
.dudas-home-hero__copy h1 {
    margin: 7px 0 10px;
    color: var(--tarvos-ink);
    font-size: clamp(2.05rem, 4vw, 3.6rem);
    line-height: 1.02;
    letter-spacing: -.055em;
}
.dudas-home-hero__copy p {
    max-width: 720px;
    margin: 0;
    color: var(--tarvos-muted);
    font-size: 1rem;
    line-height: 1.65;
}
.dudas-home-hero__summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.dudas-home-hero__summary > span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid var(--tarvos-line);
    border-radius: 999px;
    background: #fff;
    color: var(--tarvos-muted);
    font-size: 0.875rem;
}
.dudas-home-hero__summary > span strong { color: var(--tarvos-ink); }
.dudas-home-hero__summary > span.is-attention {
    border-color: #f1d6dc;
    background: #fff6f7;
    color: #9c3146;
}

.course-directory {
    padding: clamp(20px, 2.6vw, 30px) !important;
    border-radius: 20px !important;
}
.course-directory + .course-directory { margin-top: 20px; }
.course-directory__heading {
    gap: 20px;
    margin-bottom: 20px;
}
.course-directory__heading h2 {
    margin: 4px 0 5px;
    font-size: 1.45rem;
    letter-spacing: -.035em;
}
.course-directory__heading p { margin: 0; color: var(--tarvos-muted); }
.course-summary-grid,
.course-summary-grid--directory,
.course-summary-grid--attention {
    gap: 12px !important;
}
.course-summary-card__surface {
    min-height: 188px !important;
    border: 1px solid #e8e8ef !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.course-summary-card__surface:hover {
    transform: translateY(-1px);
    border-color: #d9d0fa !important;
    box-shadow: 0 12px 28px rgba(58, 41, 119, .065) !important;
}
.course-summary-card__title { font-size: 1rem !important; line-height: 1.25; }
.course-summary-card__link { min-height: 38px !important; }
.course-directory--attention {
    border-color: #efe1e4 !important;
    background: #fff !important;
}

/* Discussion pages: use the space like a document/thread, not a stack of cards. */
.issue-inbox-panel,
.issue-board-panel--course {
    padding: clamp(18px, 2.4vw, 28px) !important;
    border-radius: 20px !important;
}
.issue-toolbar__search--wide input,
.issue-select,
.settings-input,
.stats-controlbar select,
.stats-controlbar input {
    min-height: 44px !important;
    border: 1px solid #dfe1e9 !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: var(--tarvos-ink) !important;
    box-shadow: 0 1px 2px rgba(20, 22, 38, .025) !important;
}
.issue-toolbar__search--wide input:focus,
.issue-select:focus,
.settings-input:focus,
.stats-controlbar select:focus,
.stats-controlbar input:focus {
    border-color: #8d6cf4 !important;
}
.issue-toolbar__controls--modern {
    gap: 9px !important;
}

.discussion-thread.issue-row {
    content-visibility: auto;
    contain-intrinsic-size: 620px;
    border: 1px solid #e5e6ed !important;
    border-radius: 17px !important;
    background: #fff !important;
    box-shadow: 0 7px 24px rgba(28, 29, 49, .035) !important;
    transform: none !important;
}
.discussion-thread.issue-row:hover {
    border-color: #dad7e9 !important;
    box-shadow: 0 10px 30px rgba(38, 31, 78, .055) !important;
}
.discussion-thread__question {
    padding: clamp(18px, 2.2vw, 24px) !important;
    border-bottom-color: #ededf2 !important;
}
.discussion-thread__content,
.thread-prose {
    color: #2b2d3c;
    font-size: .96rem !important;
    line-height: 1.7 !important;
}
.thread-response--teacher,
.issue-answer--answered {
    margin: 0 !important;
    border: 0 !important;
    border-top: 1px solid #ececf2 !important;
    border-radius: 0 0 17px 17px !important;
    background: #faf9ff !important;
    box-shadow: none !important;
}
.thread-response__avatar,
.answer-author-badge { box-shadow: none !important; }

.issue-actions__menu,
.issue-create-menu__panel {
    min-width: 220px;
    padding: 7px !important;
    border: 1px solid #dddde7 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 18px 50px rgba(25, 22, 49, .16) !important;
}
.issue-actions__item,
.issue-create-menu__link {
    min-height: 38px;
    border-radius: 9px !important;
    color: #2d3040 !important;
}
.issue-actions__item:hover,
.issue-create-menu__link:hover { background: #f5f2ff !important; color: #5630d4 !important; }

.thread-attachments,
.discussion-thread__attachments {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px !important;
}
.thread-attachment {
    width: min(100%, 300px) !important;
    min-height: 70px;
    padding: 8px !important;
    border: 1px solid #e2e3ea !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: none !important;
}
.thread-attachment:hover {
    border-color: #cfc3fa !important;
    background: #fbfaff !important;
}
.thread-attachment__thumb {
    width: 72px !important;
    height: 56px !important;
    border-radius: 9px !important;
    overflow: hidden;
    background: #f3f2f8 !important;
}
.thread-attachment__thumb img,
.thread-attachment__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thread-attachment__meta strong {
    max-width: 185px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.thread-attachment__meta small { color: #777b8d !important; }
.thread-attachment__video { preload: none; }

/* New media viewer: direct image source, no double fetch/blob round-trip. */
body.has-media-lightbox { overflow: hidden; }
.media-lightbox[hidden] { display: none !important; }
.media-lightbox--simple {
    position: fixed !important;
    inset: 0 !important;
    z-index: 5000 !important;
    display: grid !important;
    place-items: center;
    padding: clamp(12px, 2vw, 26px) !important;
}
.media-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 20, 32, .72) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.media-lightbox--simple .media-lightbox__dialog {
    position: relative;
    width: min(1120px, 96vw) !important;
    height: min(820px, 92vh) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.8) !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 30px 90px rgba(10, 10, 20, .28) !important;
}
.media-lightbox--simple .media-lightbox__header {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px 12px 18px;
    border-bottom: 1px solid #ececf2;
    background: #fff;
}
.media-lightbox__heading { min-width: 0; }
.media-lightbox__heading strong {
    display: block;
    overflow: hidden;
    color: var(--tarvos-ink);
    font-size: .93rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.media-lightbox__heading small { display: block; margin-top: 2px; color: #85899a; font-size: 0.875rem; }
.media-lightbox--simple .media-lightbox__close {
    position: static !important;
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid #e1e2e9 !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: #232537 !important;
    font-size: 1.45rem !important;
    line-height: 1;
}
.media-lightbox--simple .media-lightbox__viewport {
    position: relative;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden !important;
    background: #f4f5f8 !important;
}
.media-lightbox--simple .media-lightbox__viewport.is-zoomed { cursor: grab; }
.media-lightbox--simple .media-lightbox__canvas {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.media-lightbox--simple .media-lightbox__image-frame {
    max-width: 100%;
    max-height: 100%;
    display: grid;
    place-items: center;
    transform-origin: center;
    transition: transform .12s ease-out;
    touch-action: none;
    will-change: transform;
}
.media-lightbox--simple .media-lightbox__image-frame.is-dragging { cursor: grabbing; transition: none; }
.media-lightbox--simple .media-lightbox__image {
    display: block;
    max-width: min(100%, 1060px) !important;
    max-height: calc(92vh - 150px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    user-select: none;
    box-shadow: 0 8px 30px rgba(22, 22, 34, .08);
}
.media-lightbox--simple .media-lightbox__image.is-loading { opacity: .18; }
.media-lightbox--simple .media-lightbox__loading {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border: 1px solid #e2e3e9;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: #4f5367;
    font-size: 0.875rem;
    box-shadow: 0 8px 24px rgba(24,25,42,.08);
}
.media-lightbox--simple .media-lightbox__loading[hidden] { display: none !important; }
.media-lightbox__loading-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid #ddd8f7;
    border-top-color: var(--tarvos-violet);
    border-radius: 50%;
    animation: tarvos-spin .75s linear infinite;
}
@keyframes tarvos-spin { to { transform: rotate(360deg); } }
.media-lightbox--simple .media-lightbox__footer {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 14px;
    border-top: 1px solid #ececf2;
    background: #fff;
}
.media-lightbox--simple .media-lightbox__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.media-lightbox--simple .media-lightbox__action {
    min-width: 38px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #dedfe7 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #27293b !important;
    font-weight: 750;
    box-shadow: none !important;
}
.media-lightbox--simple .media-lightbox__action:hover { background: #f5f2ff !important; border-color: #cfc3fa !important; }
.media-lightbox--simple .media-lightbox__external {
    color: var(--tarvos-violet-strong) !important;
    font-size: 0.875rem;
    font-weight: 750;
    text-decoration: none;
}

/* Statistics: Google-Forms-like scanning, simple selectors and vertical charts. */
.stats-workspace { display: grid; gap: 18px; }
.stats-workspace__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 10px 3px 2px;
}
.stats-workspace__header h1 {
    margin: 6px 0 9px;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.04;
    letter-spacing: -.052em;
}
.stats-workspace__header p { max-width: 720px; margin: 0; color: var(--tarvos-muted); font-size: .98rem; line-height: 1.6; }
.stats-workspace__range {
    min-width: 205px;
    display: grid;
    gap: 2px;
    padding: 11px 13px;
    border: 1px solid var(--tarvos-line);
    border-radius: 12px;
    background: #fff;
    color: var(--tarvos-muted);
    font-size: 0.875rem;
}
.stats-workspace__range strong { color: var(--tarvos-ink); font-size: 0.875rem; }

.stats-controlbar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px;
    border: 1px solid var(--tarvos-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(28, 27, 52, .035);
}
.stats-controlbar__field {
    min-width: 160px;
    display: grid;
    gap: 5px;
}
.stats-controlbar__field > span {
    color: #6f7385;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.stats-controlbar__field select,
.stats-controlbar__field input { min-width: 0; padding: 0 36px 0 12px; }
.stats-controlbar__field--date { min-width: 150px; }
.stats-controlbar__field.is-muted { opacity: .5; }
.stats-controlbar__submit { min-height: 44px; margin-left: auto; }

.stats-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--tarvos-line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}
.stats-kpi {
    min-width: 0;
    padding: 18px 20px;
    border-right: 1px solid #ececf1;
}
.stats-kpi:last-child { border-right: 0; }
.stats-kpi > span { display: block; color: #767a8b; font-size: 0.875rem; font-weight: 750; }
.stats-kpi strong { display: block; margin-top: 7px; color: var(--tarvos-ink); font-size: 2rem; line-height: 1; letter-spacing: -.05em; }
.stats-kpi small { display: block; margin-top: 7px; color: #878a99; font-size: 0.875rem; line-height: 1.35; }
.stats-kpi--success strong { color: var(--tarvos-success); }
.stats-kpi--warning strong { color: var(--tarvos-warning); }

.stats-sheet {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--tarvos-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 9px 30px rgba(29, 29, 54, .035);
}
.stats-sheet__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.stats-sheet__heading h2 { margin: 4px 0 0; font-size: 1.28rem; letter-spacing: -.035em; }
.stats-sheet__meta { color: #8a8d9b; font-size: 0.875rem; }
.stats-grid { display: grid; gap: 18px; }
.stats-grid--two { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }

.stats-vertical-chart {
    --chart-count: 7;
    min-height: 270px;
    display: grid;
    grid-template-columns: repeat(var(--chart-count), minmax(42px, 1fr));
    align-items: end;
    gap: clamp(6px, 1vw, 12px);
    padding: 12px 4px 0;
    overflow-x: auto;
}
.stats-vertical-chart--main { min-height: 330px; }
.stats-vertical-chart--compact { min-height: 235px; }
.stats-vertical-chart--topics { min-height: 260px; }
.stats-vertical-chart__item {
    min-width: 42px;
    height: 100%;
    display: grid;
    grid-template-rows: 24px minmax(120px, 1fr) 38px;
    gap: 5px;
    align-items: end;
    text-align: center;
}
.stats-vertical-chart__value { color: #4e5163; font-size: 0.875rem; font-weight: 800; }
.stats-vertical-chart__track {
    width: min(58px, 75%);
    height: 100%;
    min-height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-inline: auto;
    border-radius: 10px 10px 5px 5px;
    background: linear-gradient(180deg, #f4f4f8, #fafafd);
    overflow: hidden;
}
.stats-vertical-chart__bar {
    width: 100%;
    min-height: 0;
    border-radius: 9px 9px 4px 4px;
    background: linear-gradient(180deg, #8b68f7, #6840e8);
    transition: height .24s ease;
}
.stats-vertical-chart__bar--secondary { background: linear-gradient(180deg, #70b8ff, #427ce6); }
.stats-vertical-chart__bar--topic { background: linear-gradient(180deg, #60d6bf, #22a985); }
.stats-vertical-chart__label {
    align-self: start;
    display: block;
    min-width: 0;
    color: #767a8d;
    font-size: 0.875rem;
    line-height: 1.2;
    overflow: hidden;
}

.stats-donut-premium {
    min-height: 235px;
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    gap: 28px;
}
.stats-donut-premium__chart {
    --answered-share: 0%;
    width: 154px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--tarvos-success) 0 var(--answered-share), #f1b8c2 var(--answered-share) 100%);
    position: relative;
}
.stats-donut-premium__chart::after {
    content: '';
    position: absolute;
    inset: 25px;
    border-radius: 50%;
    background: #fff;
}
.stats-donut-premium__chart > div { position: relative; z-index: 1; display: grid; text-align: center; }
.stats-donut-premium__chart strong { font-size: 1.9rem; line-height: 1; letter-spacing: -.05em; }
.stats-donut-premium__chart span { margin-top: 4px; color: #858899; font-size: 0.875rem; }
.stats-donut-premium__legend { display: grid; gap: 14px; }
.stats-donut-premium__legend > div { display: grid; grid-template-columns: 11px auto; column-gap: 10px; align-items: center; }
.stats-donut-premium__legend > div > span { width: 10px; height: 10px; border-radius: 50%; grid-row: 1 / span 2; }
.stats-donut-premium__legend > div > span.is-success { background: var(--tarvos-success); }
.stats-donut-premium__legend > div > span.is-pending { background: #e8909f; }
.stats-donut-premium__legend strong { font-size: 1.08rem; }
.stats-donut-premium__legend small { color: #7b7f90; }

.stats-empty-chart {
    min-height: 240px;
    display: grid;
    place-content: center;
    gap: 5px;
    text-align: center;
    color: #858999;
}
.stats-empty-chart strong { color: #434657; }
.stats-empty-chart--small { min-height: 190px; }
.stats-insights-premium {
    display: grid;
    grid-template-columns: minmax(180px, .35fr) 1fr;
    gap: 24px;
    padding: 22px;
    border: 1px solid #ddd6f8;
    border-radius: 18px;
    background: #f8f6ff;
}
.stats-insights-premium h2 { margin: 4px 0 0; font-size: 1.25rem; letter-spacing: -.035em; }
.stats-insights-premium ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.stats-insights-premium li { position: relative; padding-left: 18px; color: #54576a; }
.stats-insights-premium li::before { content: ''; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--tarvos-violet); }
.stats-more {
    border: 1px solid var(--tarvos-line);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}
.stats-more > summary {
    min-height: 54px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    cursor: pointer;
    color: #4c3b83;
    font-weight: 750;
}
.stats-more > summary:hover { background: #faf9ff; }
.stats-more__content { display: grid; gap: 18px; padding: 0 18px 18px; }
.stats-workspace__footnote { margin: 0; padding: 2px 4px; color: #9093a0; font-size: 0.875rem; }

/* Settings remain powerful, but technical access/sync controls should read as advanced. */
.settings-hero--premium {
    background: #fff !important;
}
.settings-tabs-shell {
    position: sticky;
    top: 82px;
    z-index: 35;
    padding: 7px !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 26px rgba(28, 27, 52, .045) !important;
}
.settings-tabs { gap: 4px !important; }
.settings-tab {
    min-height: 38px !important;
    border-radius: 9px !important;
}
.settings-tab.is-active { background: var(--tarvos-violet-soft) !important; color: var(--tarvos-violet-strong) !important; }
.settings-section-heading { max-width: 760px; }
.settings-card--premium { border-radius: 17px !important; }

/* Footer aligned with the main Academia Tarvos ecosystem. */
.tarvos-legal-footer { display: none !important; }
.tarvos-site-footer {
    margin-top: 20px;
    border-top: 1px solid #e7e8ee;
    background: #fff;
}
.tarvos-site-footer__inner {
    width: min(1320px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 18px;
}
.tarvos-site-footer__main {
    display: grid;
    grid-template-columns: minmax(250px, .75fr) minmax(0, 1.25fr);
    gap: clamp(36px, 7vw, 100px);
    padding-bottom: 28px;
}
.tarvos-site-footer__brand {
    align-self: start;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--tarvos-ink);
    text-decoration: none;
}
.tarvos-site-footer__logo {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid #e8e4f7;
    border-radius: 13px;
    background: #f5f2ff;
}
.tarvos-site-footer__logo img { width: 37px; height: auto; }
.tarvos-site-footer__brand strong { display: block; font-size: .96rem; }
.tarvos-site-footer__brand small { display: block; max-width: 250px; margin-top: 3px; color: #7c8092; font-size: 0.875rem; }
.tarvos-site-footer__columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 30px;
}
.tarvos-site-footer__columns > div { display: grid; align-content: start; gap: 8px; }
.tarvos-site-footer__columns strong { margin-bottom: 4px; color: #3d4050; font-size: 0.875rem; letter-spacing: .06em; text-transform: uppercase; }
.tarvos-site-footer__columns a,
.tarvos-site-footer__bottom a {
    color: #6d7183;
    font-size: 0.875rem;
    text-decoration: none;
}
.tarvos-site-footer__columns a:hover,
.tarvos-site-footer__bottom a:hover { color: var(--tarvos-violet-strong); }
.tarvos-site-footer__bottom {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 14px;
    border-top: 1px solid #ececf1;
    color: #9295a3;
    font-size: 0.875rem;
}
.tarvos-site-footer__bottom nav { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }

/* Reduce render work on long directories/lists without changing behaviour. */
.course-summary-card,
.settings-topic-group,
.settings-staff-card {
    content-visibility: auto;
    contain-intrinsic-size: 260px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 980px) {
    .app-content--topnav,
    .tarvos-site-footer__inner { width: min(100% - 28px, 1320px); }
    .stats-kpis { grid-template-columns: repeat(2, 1fr); }
    .stats-kpi:nth-child(2) { border-right: 0; }
    .stats-kpi:nth-child(-n+2) { border-bottom: 1px solid #ececf1; }
    .stats-grid--two { grid-template-columns: 1fr; }
    .stats-insights-premium { grid-template-columns: 1fr; }
    .tarvos-site-footer__main { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .app-shell--topnav .app-topbar {
        position: relative;
        align-items: flex-start;
        gap: 10px;
    }
    .app-topbar__brandline,
    .app-topbar__actions { width: 100%; }
    .app-topbar__brandline { flex-wrap: wrap; }
    .app-nav { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; }
    .app-topbar__actions { justify-content: flex-end; flex-wrap: wrap; }
    .app-health,
    .app-notification { display: none !important; }
    .stats-workspace__header { align-items: flex-start; flex-direction: column; }
    .stats-workspace__range { min-width: 0; width: 100%; }
    .stats-controlbar { align-items: stretch; }
    .stats-controlbar__field { min-width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); }
    .stats-controlbar__submit { width: 100%; margin-left: 0; }
    .stats-donut-premium { grid-template-columns: 130px 1fr; gap: 18px; }
    .stats-donut-premium__chart { width: 126px; }
    .tarvos-site-footer__columns { grid-template-columns: repeat(2, 1fr); }
    .tarvos-site-footer__bottom { align-items: flex-start; flex-direction: column; }
    .tarvos-site-footer__bottom nav { justify-content: flex-start; }
}

@media (max-width: 560px) {
    .app-content--topnav,
    .tarvos-site-footer__inner { width: calc(100% - 20px); }
    .app-content--topnav { padding-top: 22px; }
    .dudas-home-hero { align-items: flex-start; flex-direction: column; }
    .dudas-home-hero__summary { justify-content: flex-start; }
    .course-summary-grid,
    .course-summary-grid--directory,
    .course-summary-grid--attention { grid-template-columns: 1fr !important; }
    .stats-kpis { grid-template-columns: 1fr; }
    .stats-kpi { border-right: 0; border-bottom: 1px solid #ececf1; }
    .stats-kpi:last-child { border-bottom: 0; }
    .stats-controlbar__field { min-width: 100%; flex-basis: 100%; }
    .stats-sheet { padding: 17px; }
    .stats-vertical-chart { min-width: 620px; }
    .stats-sheet { overflow-x: auto; }
    .stats-donut-premium { grid-template-columns: 1fr; justify-items: center; }
    .stats-donut-premium__legend { width: 100%; }
    .media-lightbox--simple { padding: 0 !important; }
    .media-lightbox--simple .media-lightbox__dialog {
        width: 100vw !important;
        height: 100dvh !important;
        border: 0 !important;
        border-radius: 0 !important;
    }
    .media-lightbox--simple .media-lightbox__footer { align-items: flex-start; flex-direction: column; }
    .tarvos-site-footer__columns { grid-template-columns: 1fr; gap: 20px; }
}
.settings-hero__stats--simple { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 820px) { .settings-hero__stats--simple { grid-template-columns: 1fr !important; } }

/* =========================================================
   Main-site footer parity — Academia Tarvos
   Mirrors the visual language of the public WordPress footer.
   ========================================================= */
.tarvos-footer-premium--dudas {
    --footer-text: rgba(250, 248, 255, .72);
    --footer-muted: rgba(250, 248, 255, .55);
    --footer-violet: #7047f5;
    --footer-line: rgba(220, 211, 255, .14);
    position: relative;
    width: 100%;
    margin-top: clamp(3.5rem, 7vw, 6rem);
    color: #fff;
    background: transparent;
    text-align: left;
}
.tarvos-footer-premium--dudas,
.tarvos-footer-premium--dudas * { box-sizing: border-box; }
.tarvos-footer-premium--dudas .tarvos-footer-bg {
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(219, 209, 255, .15);
    background:
        radial-gradient(34rem 24rem at 0 100%, rgba(112, 71, 245, .20), transparent 69%),
        radial-gradient(36rem 24rem at 100% 0, rgba(125, 85, 246, .24), transparent 69%),
        linear-gradient(145deg, #12101e 0%, #1b172e 55%, #281d43 100%);
}
.tarvos-footer-premium--dudas .tarvos-footer-bg::before {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0 49.8%, rgba(255,255,255,.014) 50%, transparent 50.2%),
        linear-gradient(0deg, transparent 0 49.8%, rgba(255,255,255,.012) 50%, transparent 50.2%);
    background-size: 88px 88px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.28), transparent 82%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.28), transparent 82%);
}
.tarvos-footer-premium--dudas .tarvos-footer-frame {
    position: relative;
    z-index: 1;
    width: min(1260px, calc(100% - 34px));
    margin-inline: auto;
}
.tarvos-footer-premium--dudas .tarvos-footer-main {
    display: grid;
    grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
    gap: clamp(2.1rem, 4vw, 4rem);
    align-items: start;
    padding: clamp(3rem, 5vw, 4.6rem) 0 clamp(2.6rem, 4vw, 3.6rem);
}
.tarvos-footer-premium--dudas .tarvos-footer-brand { padding: 0; border: 0; background: transparent; }
.tarvos-footer-premium--dudas .tarvos-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: .72rem;
    margin: 0 0 1.25rem;
    color: #fff;
    text-decoration: none;
}
.tarvos-footer-premium--dudas .tarvos-footer-logo img {
    width: 2.9rem;
    height: 2.9rem;
    max-width: 2.9rem;
    object-fit: contain;
    filter: drop-shadow(0 .5rem 1rem rgba(123,85,246,.2));
}
.tarvos-footer-premium--dudas .tarvos-footer-logo-text { display: grid; gap: .16rem; }
.tarvos-footer-premium--dudas .tarvos-footer-logo-text strong {
    color: #fff;
    font-size: .98rem;
    font-weight: 850;
    letter-spacing: -.025em;
}
.tarvos-footer-premium--dudas .tarvos-footer-logo-text small { color: rgba(250,248,255,.55); font-size: 0.875rem; font-weight: 560; }
.tarvos-footer-premium--dudas .tarvos-footer-eyebrow {
    margin: 0 0 .65rem;
    color: #c9bcff;
    font-size: 0.875rem;
    font-weight: 850;
    letter-spacing: .11em;
}
.tarvos-footer-premium--dudas .tarvos-footer-brand h2 {
    max-width: 15ch;
    margin: 0;
    color: #fff;
    font-size: clamp(1.65rem, 2.4vw, 2.25rem);
    font-weight: 850;
    letter-spacing: -.055em;
    line-height: 1.02;
}
.tarvos-footer-premium--dudas .tarvos-footer-entity {
    max-width: 31rem;
    margin: .9rem 0 0;
    color: var(--footer-text);
    font-size: 0.875rem;
    line-height: 1.62;
}
.tarvos-footer-premium--dudas .tarvos-footer-location {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin: 1rem 0 0;
    color: rgba(250,248,255,.6);
    font-size: 0.875rem;
    line-height: 1.5;
}
.tarvos-footer-premium--dudas .tarvos-footer-location svg { width: .92rem; height: .92rem; flex: 0 0 auto; margin-top: .08rem; color: #bca9ff; }
.tarvos-footer-premium--dudas .tarvos-footer-social { display: flex; gap: .45rem; margin-top: 1.1rem; }
.tarvos-footer-premium--dudas .tarvos-footer-social a {
    display: grid;
    width: 2.1rem;
    height: 2.1rem;
    place-items: center;
    border: 1px solid rgba(220,211,255,.16);
    border-radius: .65rem;
    background: rgba(255,255,255,.05);
}
.tarvos-footer-premium--dudas .tarvos-footer-social a:hover,
.tarvos-footer-premium--dudas .tarvos-footer-social a:focus-visible { border-color: rgba(220,211,255,.38); background: var(--footer-violet); }
.tarvos-footer-premium--dudas .tarvos-footer-social img { width: .96rem; height: .96rem; }
.tarvos-footer-premium--dudas .tarvos-footer-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1.2rem, 2.4vw, 2rem);
    padding: .15rem 0 0;
}
.tarvos-footer-premium--dudas .tarvos-footer-column h3 {
    margin: 0 0 .92rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 850;
}
.tarvos-footer-premium--dudas .tarvos-footer-column__links { display: grid; gap: .58rem; }
.tarvos-footer-premium--dudas .tarvos-footer-column a {
    color: rgba(250,248,255,.64);
    font-size: 0.875rem;
    font-weight: 560;
    line-height: 1.42;
    text-decoration: none;
}
.tarvos-footer-premium--dudas .tarvos-footer-column a:hover,
.tarvos-footer-premium--dudas .tarvos-footer-column a:focus-visible { color: #fff; }
.tarvos-footer-premium--dudas .tarvos-footer-bottom {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto 5rem;
    gap: 1rem;
    align-items: center;
    padding: 1.05rem 0 1.3rem;
    border-top: 1px solid var(--footer-line);
    color: var(--footer-muted);
    font-size: 0.875rem;
}
.tarvos-footer-premium--dudas .tarvos-footer-copy { display: flex; flex-wrap: wrap; gap: .32rem .85rem; }
.tarvos-footer-premium--dudas .tarvos-footer-legal { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .32rem .82rem; }
.tarvos-footer-premium--dudas .tarvos-footer-legal a { color: rgba(250,248,255,.55); font-size: 0.875rem; text-decoration: none; }
.tarvos-footer-premium--dudas .tarvos-footer-legal a:hover,
.tarvos-footer-premium--dudas .tarvos-footer-legal a:focus-visible { color: #fff; }
.tarvos-footer-premium--dudas .tarvos-footer-agent-safe-zone { width: 5rem; height: 1px; }
.tarvos-footer-premium--dudas :where(a,button):focus-visible { outline: 3px solid rgba(181,162,255,.48); outline-offset: 3px; }
@media (max-width: 1040px) {
    .tarvos-footer-premium--dudas .tarvos-footer-main { grid-template-columns: 1fr; gap: 2.4rem; }
    .tarvos-footer-premium--dudas .tarvos-footer-brand h2 { max-width: 20ch; }
    .tarvos-footer-premium--dudas .tarvos-footer-bottom { grid-template-columns: 1fr 5rem; }
    .tarvos-footer-premium--dudas .tarvos-footer-copy,
    .tarvos-footer-premium--dudas .tarvos-footer-legal { grid-column: 1; justify-content: flex-start; }
    .tarvos-footer-premium--dudas .tarvos-footer-agent-safe-zone { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 760px) {
    .tarvos-footer-premium--dudas .tarvos-footer-nav { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.8rem 1.2rem; }
}
@media (max-width: 480px) {
    .tarvos-footer-premium--dudas .tarvos-footer-frame { width: min(100% - 24px,1260px); }
    .tarvos-footer-premium--dudas .tarvos-footer-nav { grid-template-columns: 1fr 1fr; }
    .tarvos-footer-premium--dudas .tarvos-footer-bottom { grid-template-columns: 1fr; }
    .tarvos-footer-premium--dudas .tarvos-footer-agent-safe-zone { display: none; }
}


/* ---------- Patch 2026-08-12: UX polish, login premium, full-width course, votes ---------- */
.app-content--topnav {
    width: min(1600px, calc(100% - 34px)) !important;
    max-width: 1600px !important;
}
.course-page,
.issue-board-panel--course,
.issue-board-list--flat,
.issue-board-panel--student {
    width: 100% !important;
    max-width: none !important;
}
.issue-board-panel--course {
    padding-inline: clamp(18px, 2vw, 30px) !important;
}

.tarvos-footer-logo img {
    width: 58px;
    height: 58px;
    padding: 8px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(8, 10, 28, .18);
    box-sizing: border-box;
}

.auth-shell {
    background:
        radial-gradient(circle at 85% 8%, rgba(109,61,245,.14), transparent 26rem),
        radial-gradient(circle at 4% 78%, rgba(109,61,245,.08), transparent 24rem),
        linear-gradient(180deg, #fbfbfe, #f4f4fb 48%, #f5f3fb 100%) !important;
}
.auth-shell__panel {
    width: min(1180px, 100%) !important;
}
.auth-card--premium {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr) !important;
    border-radius: 30px !important;
    border-color: #e7e5ef !important;
    box-shadow: 0 30px 90px rgba(30, 26, 64, .10) !important;
}
.auth-card--premium .auth-card__copy {
    gap: 28px !important;
}
.auth-card--premium .auth-card__title {
    max-width: 680px;
    font-size: clamp(3rem, 6vw, 5.25rem) !important;
    line-height: .93 !important;
}
.auth-card--premium .auth-card__text {
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
}
.auth-card--premium .auth-card__panel {
    position: relative;
    background:
        radial-gradient(circle at 86% 10%, rgba(109,61,245,.16), transparent 16rem),
        linear-gradient(180deg, #fbfaff, #f6f4fd 62%, #f2effd) !important;
}
.auth-google-button {
    min-height: 60px !important;
    width: min(100%, 360px);
    display: inline-flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 16px 0 14px !important;
    border: 1px solid rgba(81, 57, 179, .08) !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #6c3cf6 0%, #4f23d3 100%) !important;
    color: #fff !important;
    box-shadow: 0 14px 36px rgba(86, 50, 218, .28) !important;
    text-decoration: none !important;
}
.auth-google-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 42px rgba(86, 50, 218, .34) !important;
}
.auth-google-button__icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(10, 10, 20, .14);
}
.auth-google-button__text {
    flex: 1 1 auto;
    font-size: .98rem;
    font-weight: 800;
    letter-spacing: -.01em;
}
.auth-google-button__arrow {
    font-size: 1rem;
    opacity: .92;
}
.google-mark { display: none !important; }

.media-lightbox--simple .media-lightbox__close,
.media-lightbox--simple .media-lightbox__action {
    color: #17192b !important;
}
.media-lightbox--simple .media-lightbox__close:hover,
.media-lightbox--simple .media-lightbox__action:hover {
    color: #120f22 !important;
    background: #f1ecff !important;
    border-color: #bfaefb !important;
}
.media-lightbox--simple .media-lightbox__external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: #171a31 !important;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none;
}
.media-lightbox--simple .media-lightbox__external:hover {
    background: #261d56 !important;
}

.discussion-thread__question-footer,
.thread-response__footer {
    margin-top: 18px;
    display: flex;
    justify-content: flex-start;
}
.issue-vote-form {
    display: block !important;
}
.issue-vote-cluster {
    display: inline-flex !important;
    align-items: center;
    gap: 10px !important;
    padding: 8px 12px !important;
    border: 1px solid #e7e4ef !important;
    border-radius: 999px !important;
    background: #fff !important;
    box-shadow: 0 6px 20px rgba(26, 23, 46, .04) !important;
}
.issue-vote-button {
    width: 42px !important;
    height: 42px !important;
    border-radius: 999px !important;
    border: 1px solid #e1d8f8 !important;
    background: #f7f4ff !important;
    color: #7647ff !important;
}
.issue-vote-button:hover,
.issue-vote-button.is-active {
    border-color: #cbb8ff !important;
    background: #efe8ff !important;
    color: #5a2fe0 !important;
}
.issue-vote-button__icon {
    font-size: 1.1rem !important;
    line-height: 1;
}
.issue-vote-button.is-active .issue-vote-button__icon {
    content: '♥';
}
.issue-vote-count {
    min-width: 1.1rem;
    color: #23263b !important;
    font-weight: 800 !important;
}
.thread-response__vote-label {
    color: #61667b !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
}

@media (max-width: 900px) {
    .auth-card--premium {
        grid-template-columns: 1fr !important;
    }
    .app-content--topnav {
        width: calc(100% - 18px) !important;
    }
    .auth-google-button {
        width: 100%;
    }
}


/* ========================================================================== */
/* 2026-08-12 final polish: premium shell, true full-width threads, image fix */
/* ========================================================================== */

/* Login: compact, deliberate, aligned with the main WordPress access screen. */
body[data-page="login"] .auth-shell {
    min-height: 0 !important;
    place-items: center;
    padding: clamp(54px, 7vw, 92px) 22px clamp(58px, 7vw, 90px) !important;
    background:
        radial-gradient(circle at 78% 12%, rgba(109, 61, 245, .11), transparent 28rem),
        radial-gradient(circle at 9% 82%, rgba(109, 61, 245, .055), transparent 24rem),
        linear-gradient(180deg, #fbfbfe 0%, #f6f5fb 100%) !important;
}
body[data-page="login"] .auth-shell__panel {
    width: min(1040px, 100%) !important;
}
body[data-page="login"] .auth-card--premium {
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, .82fr) !important;
    border: 1px solid #e5e4ec !important;
    border-top: 3px solid #7c4dff !important;
    border-radius: 24px !important;
    box-shadow: 0 24px 70px rgba(29, 25, 57, .09) !important;
}
body[data-page="login"] .auth-card--premium .auth-card__copy {
    padding: clamp(38px, 5vw, 58px) !important;
    gap: 22px !important;
}
body[data-page="login"] .auth-card--premium .auth-card__title {
    max-width: 590px !important;
    font-size: clamp(2.7rem, 5vw, 4.6rem) !important;
    line-height: .96 !important;
    letter-spacing: -.058em !important;
}
body[data-page="login"] .auth-card--premium .auth-card__text {
    max-width: 560px !important;
    color: #62677a !important;
    font-size: 1rem !important;
    line-height: 1.65 !important;
}
body[data-page="login"] .auth-card--premium .auth-card__panel {
    padding: clamp(34px, 4vw, 50px) !important;
    background:
        radial-gradient(circle at 92% 6%, rgba(109,61,245,.12), transparent 16rem),
        linear-gradient(180deg, #fbfaff 0%, #f5f2fc 100%) !important;
}
body[data-page="login"] .auth-google-button {
    width: min(100%, 384px) !important;
    min-height: 54px !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    padding: 0 17px !important;
    border: 1px solid #dedee7 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #171827 !important;
    box-shadow: 0 5px 18px rgba(24, 24, 42, .045) !important;
}
body[data-page="login"] .auth-google-button:hover {
    transform: translateY(-1px) !important;
    border-color: #cfc6ef !important;
    background: #fbfaff !important;
    box-shadow: 0 10px 24px rgba(48, 36, 94, .08) !important;
}
body[data-page="login"] .auth-google-button__icon {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
    background: transparent !important;
    box-shadow: none !important;
}
body[data-page="login"] .auth-google-button__text {
    flex: 1 1 auto;
    text-align: center;
    padding-right: 28px;
    color: #171827;
    font-size: .94rem !important;
    font-weight: 760 !important;
}
body[data-page="login"] + .tarvos-footer-premium,
body[data-page="login"] .tarvos-footer-premium {
    margin-top: 0 !important;
}

/* Home/directories: less "card inside card", more premium editorial hierarchy. */
.dudas-home-hero {
    position: relative;
    overflow: hidden;
    align-items: center !important;
    padding: clamp(28px, 3.6vw, 48px) !important;
    margin-bottom: 30px !important;
    border: 1px solid #e7e5ef;
    border-radius: 26px;
    background:
        radial-gradient(circle at 96% 4%, rgba(109,61,245,.13), transparent 24rem),
        linear-gradient(135deg, #fff 0%, #fbfaff 70%, #f5f1ff 100%);
    box-shadow: 0 18px 55px rgba(35, 30, 70, .06);
}
.dudas-home-hero::after {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    right: -88px;
    bottom: -128px;
    border: 34px solid rgba(124, 77, 255, .055);
    border-radius: 50%;
    pointer-events: none;
}
.dudas-home-hero__copy { max-width: 850px !important; position: relative; z-index: 1; }
.dudas-home-hero__copy h1 {
    max-width: 850px;
    font-size: clamp(2.45rem, 4.8vw, 4.9rem) !important;
    line-height: .96 !important;
    letter-spacing: -.06em !important;
}
.dudas-home-hero__copy p {
    max-width: 760px !important;
    font-size: 1rem !important;
    line-height: 1.65 !important;
}
.dudas-home-hero__summary { position: relative; z-index: 1; }
.course-directory--premium {
    padding: 8px 0 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.course-directory__heading {
    margin-bottom: 18px !important;
    padding: 0 4px;
}
.course-summary-grid,
.course-summary-grid--directory {
    gap: 16px !important;
}
.course-summary-card__surface {
    min-height: 210px !important;
    padding: 20px !important;
    border: 1px solid #e5e5ed !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, #fff, #fdfdff) !important;
    box-shadow: 0 7px 24px rgba(28, 25, 51, .045) !important;
}
.course-summary-card__surface:hover {
    transform: translateY(-2px) !important;
    border-color: #cfc3f6 !important;
    box-shadow: 0 15px 36px rgba(54, 39, 112, .09) !important;
}
.course-summary-card__link--primary {
    background: transparent !important;
    border-top: 1px solid #ece9f7 !important;
    border-radius: 0 !important;
    justify-content: space-between !important;
    padding: 12px 0 0 !important;
    color: #6036df !important;
}
.course-summary-card__surface:hover .course-summary-card__link--primary {
    background: transparent !important;
    color: #4b23c4 !important;
}

/* Course thread: use the actual desktop width instead of a 900px legacy cap. */
.app-content--topnav {
    width: min(1500px, calc(100% - 36px)) !important;
    max-width: 1500px !important;
}
.course-page,
.issue-board-panel--course,
.issue-board-list--flat,
.issue-board-panel--student {
    width: 100% !important;
    max-width: none !important;
}
.discussion-thread.issue-row {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    justify-self: stretch !important;
}
.issue-board-list--flat { justify-items: stretch !important; }

/* Useful vote: one clickable text action, bottom-left, no pill/card around it. */
.discussion-thread__question-footer,
.thread-response__footer {
    justify-content: flex-start !important;
    align-items: center !important;
    margin-top: 18px !important;
}
.thread-response__footer .issue-vote-form,
.issue-vote-form {
    margin: 0 !important;
}
.issue-vote-cluster { display: contents !important; }
.issue-vote-button {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 5px 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #666b7d !important;
    box-shadow: none !important;
    font-weight: 700 !important;
    cursor: pointer;
}
.issue-vote-button:hover {
    background: transparent !important;
    color: #5e35d6 !important;
    transform: none !important;
}
.issue-vote-button.is-active {
    background: transparent !important;
    color: #6239df !important;
}
.issue-vote-button__icon {
    width: 24px;
    display: inline-grid;
    place-items: center;
    font-size: 1.22rem !important;
    line-height: 1;
}
.issue-vote-button__label {
    font-size: 0.875rem;
    font-weight: 720;
}
.issue-vote-count {
    min-width: 0 !important;
    color: currentColor !important;
    font-size: 0.875rem !important;
    font-weight: 800 !important;
}
.thread-response__vote-label { display: none !important; }

/* Image lightbox: legacy style.css positioned the image absolutely in a zero-size frame.
   Force normal flow so successfully loaded images are actually visible. */
.media-lightbox--simple .media-lightbox__image-frame {
    position: relative !important;
    width: auto !important;
    height: auto !important;
    min-width: 1px;
    min-height: 1px;
}
.media-lightbox--simple .media-lightbox__image {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    max-width: min(100%, 1060px) !important;
    max-height: calc(92vh - 150px) !important;
    width: auto !important;
    height: auto !important;
    border-radius: 10px !important;
    background: transparent !important;
    opacity: 1;
}
.media-lightbox--simple .media-lightbox__image.is-loading { opacity: .16 !important; }
.media-lightbox--simple .media-lightbox__viewport {
    background: #f5f5f8 !important;
}
.media-lightbox--simple .media-lightbox__external {
    min-height: 40px !important;
    border: 1px solid #1b1d30 !important;
    background: #1b1d30 !important;
    color: #fff !important;
}

@media (max-width: 900px) {
    body[data-page="login"] .auth-shell { padding: 30px 14px 44px !important; }
    body[data-page="login"] .auth-card--premium { grid-template-columns: 1fr !important; }
    body[data-page="login"] .auth-card--premium .auth-card__panel { border-left: 0 !important; border-top: 1px solid #e8e6ef !important; }
    .dudas-home-hero { padding: 26px 22px !important; }
    .app-content--topnav { width: calc(100% - 18px) !important; }
}

/* ==========================================================
   LOGIN DUDAS · Adaptación visual Gemini para Academia Tarvos
   Conserva la autenticación y lógica PHP originales.
   ========================================================== */
body[data-page="login"] .auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 64px) 20px;
    background: #fafafa;
}

body[data-page="login"] .auth-shell__panel {
    width: min(1120px, 100%);
}

body[data-page="login"] .flash-stack--auth {
    width: min(1120px, 100%);
    margin: 0 auto 16px;
}

.tarvos-gemini-login {
    --tgl-bg: #fafafa;
    --tgl-surface: #ffffff;
    --tgl-surface-muted: #f5f5f7;
    --tgl-border: #e4e4e7;
    --tgl-border-soft: #ececf0;
    --tgl-text: #121214;
    --tgl-text-2: #52525b;
    --tgl-text-3: #71717a;
    --tgl-text-4: #a1a1aa;
    --tgl-green: #10b981;
    --tgl-radius-sm: 7px;
    --tgl-radius-md: 11px;
    --tgl-radius-lg: 18px;
    --tgl-transition: 180ms cubic-bezier(.16,1,.3,1);
    width: 100%;
    color: var(--tgl-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.tarvos-gemini-login *,
.tarvos-gemini-login *::before,
.tarvos-gemini-login *::after {
    box-sizing: border-box;
}

.tarvos-gemini-login__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 0 28px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--tgl-border-soft);
}

.tarvos-gemini-login__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.tarvos-gemini-login__brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--tgl-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.035);
}

.tarvos-gemini-login__brand-mark img {
    width: 31px;
    height: 31px;
    display: block;
    object-fit: contain;
}

.tarvos-gemini-login__brand-copy {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
    font-size: .89rem;
    color: var(--tgl-text-2);
}

.tarvos-gemini-login__brand-copy strong {
    color: var(--tgl-text);
    font-size: .94rem;
    font-weight: 720;
    letter-spacing: -.02em;
}

.tarvos-gemini-login__brand-separator {
    color: #c4c4ca;
}

.tarvos-gemini-login__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid var(--tgl-border);
    border-radius: 999px;
    background: #fff;
    color: var(--tgl-text-2);
    font-size: 0.875rem;
    line-height: 1;
    letter-spacing: -.01em;
    box-shadow: 0 1px 2px rgba(0,0,0,.025);
}

.tarvos-gemini-login__status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tgl-green);
    box-shadow: 0 0 0 3px rgba(16,185,129,.08);
}

.tarvos-gemini-login__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr);
    gap: clamp(44px, 6vw, 76px);
    align-items: center;
}

.tarvos-gemini-login__auth-pane {
    width: 100%;
    max-width: 540px;
}

.tarvos-gemini-login__kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    margin-bottom: 18px;
    border: 1px solid var(--tgl-border-soft);
    border-radius: var(--tgl-radius-sm);
    background: var(--tgl-surface-muted);
    color: var(--tgl-text-2);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.tarvos-gemini-login__title {
    max-width: 620px;
    margin: 0 0 17px;
    color: var(--tgl-text);
    font-size: clamp(2.25rem, 4.2vw, 3.3rem);
    font-weight: 730;
    line-height: 1.04;
    letter-spacing: -.052em;
}

.tarvos-gemini-login__description {
    max-width: 570px;
    margin: 0 0 30px;
    color: var(--tgl-text-2);
    font-size: 1.02rem;
    line-height: 1.68;
    letter-spacing: -.012em;
}

.tarvos-gemini-login__actions {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.tarvos-gemini-login__google-button {
    width: 100%;
    min-height: 54px;
    display: grid;
    grid-template-columns: 24px 1fr 24px;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 1px solid #d4d4d8;
    border-radius: var(--tgl-radius-md);
    background: #fff;
    color: #202124;
    text-decoration: none;
    font-size: .94rem;
    font-weight: 650;
    letter-spacing: -.012em;
    box-shadow: 0 1px 2px rgba(0,0,0,.035);
    transition: transform var(--tgl-transition), border-color var(--tgl-transition), box-shadow var(--tgl-transition), background var(--tgl-transition);
}

.tarvos-gemini-login__google-button:hover {
    transform: translateY(-1px);
    border-color: #a8a8ae;
    background: #fff;
    box-shadow: 0 7px 22px rgba(0,0,0,.06);
}

.tarvos-gemini-login__google-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.tarvos-gemini-login__google-button:focus-visible,
.tarvos-gemini-login__brand:focus-visible,
.tarvos-gemini-login__privacy a:focus-visible {
    outline: 3px solid rgba(24,24,27,.14);
    outline-offset: 3px;
}

.tarvos-gemini-login__google-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tarvos-gemini-login__button-arrow {
    justify-self: end;
    color: #a1a1aa;
    font-size: 1rem;
    transition: transform var(--tgl-transition), color var(--tgl-transition);
}

.tarvos-gemini-login__google-button:hover .tarvos-gemini-login__button-arrow {
    transform: translateX(2px);
    color: #52525b;
}

.tarvos-gemini-login__classroom-note {
    display: grid;
    grid-template-columns: 20px minmax(0,1fr);
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--tgl-border-soft);
    border-left: 3px solid #3f3f46;
    border-radius: var(--tgl-radius-md);
    background: #fff;
    color: var(--tgl-text-2);
    font-size: 0.875rem;
    line-height: 1.55;
}

.tarvos-gemini-login__classroom-note strong {
    color: var(--tgl-text);
    font-weight: 680;
}

.tarvos-gemini-login__classroom-icon {
    color: #27272a;
    padding-top: 1px;
}

.tarvos-gemini-login__return-note,
.tarvos-gemini-login__account-note {
    margin: 0 0 10px;
    color: var(--tgl-text-2);
    font-size: 0.875rem;
    line-height: 1.5;
}

.tarvos-gemini-login__loading {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 11px;
    color: var(--tgl-text-2);
    font-size: 0.875rem;
}

.tarvos-gemini-login__spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #e4e4e7;
    border-top-color: #18181b;
    border-radius: 50%;
    animation: tarvosGeminiSpin .7s linear infinite;
}

@keyframes tarvosGeminiSpin {
    to { transform: rotate(360deg); }
}

.tarvos-gemini-login__privacy {
    margin: 0;
    color: var(--tgl-text-3);
    font-size: 0.875rem;
    line-height: 1.6;
}

.tarvos-gemini-login__privacy a {
    color: var(--tgl-text-2);
    font-weight: 650;
    text-decoration: underline;
    text-decoration-color: #d4d4d8;
    text-underline-offset: 3px;
}

.tarvos-gemini-login__privacy a:hover {
    color: var(--tgl-text);
    text-decoration-color: #71717a;
}

.tarvos-gemini-login__panel {
    position: relative;
    padding: 27px;
    border: 1px solid var(--tgl-border);
    border-radius: var(--tgl-radius-lg);
    background: #fff;
    box-shadow: 0 12px 36px rgba(0,0,0,.055), 0 2px 7px rgba(0,0,0,.025);
}

.tarvos-gemini-login__panel-header,
.tarvos-gemini-login__panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tarvos-gemini-login__panel-header {
    padding-bottom: 17px;
    margin-bottom: 23px;
    border-bottom: 1px solid var(--tgl-border-soft);
}

.tarvos-gemini-login__panel-label,
.tarvos-gemini-login__panel-state,
.tarvos-gemini-login__step h2 span,
.tarvos-gemini-login__chips span,
.tarvos-gemini-login__panel-footer {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.tarvos-gemini-login__panel-label {
    color: var(--tgl-text-2);
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.tarvos-gemini-login__panel-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tgl-text-4);
    font-size: 0.875rem;
}

.tarvos-gemini-login__panel-state::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #a1a1aa;
}

.tarvos-gemini-login__sequence {
    display: grid;
    gap: 20px;
}

.tarvos-gemini-login__step {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0,1fr);
    gap: 15px;
}

.tarvos-gemini-login__step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 17.5px;
    top: 36px;
    bottom: -20px;
    width: 1px;
    background: var(--tgl-border-soft);
}

.tarvos-gemini-login__step-number {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--tgl-border);
    border-radius: 10px;
    background: #fafafa;
    color: #27272a;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.875rem;
    font-weight: 650;
    transition: border-color var(--tgl-transition), background var(--tgl-transition);
}

.tarvos-gemini-login__step:hover .tarvos-gemini-login__step-number {
    border-color: #a1a1aa;
    background: #fff;
}

.tarvos-gemini-login__step h2 {
    margin: 1px 0 4px;
    color: var(--tgl-text);
    font-size: 0.875rem;
    font-weight: 680;
    letter-spacing: -.015em;
    line-height: 1.35;
}

.tarvos-gemini-login__step h2 span {
    margin-left: 6px;
    color: var(--tgl-text-4);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
}

.tarvos-gemini-login__step p {
    margin: 0;
    color: var(--tgl-text-2);
    font-size: 0.875rem;
    line-height: 1.55;
    letter-spacing: -.005em;
}

.tarvos-gemini-login__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tarvos-gemini-login__chips span {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 7px;
    border: 1px solid var(--tgl-border-soft);
    border-radius: 6px;
    background: var(--tgl-surface-muted);
    color: var(--tgl-text-2);
    font-size: 0.875rem;
}

.tarvos-gemini-login__panel-footer {
    padding-top: 17px;
    margin-top: 23px;
    border-top: 1px solid var(--tgl-border-soft);
    color: var(--tgl-text-3);
    font-size: 0.875rem;
}

.tarvos-gemini-login__panel-footer span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 920px) {
    body[data-page="login"] .auth-shell {
        align-items: flex-start;
    }

    .tarvos-gemini-login__grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .tarvos-gemini-login__auth-pane {
        max-width: 680px;
    }

    .tarvos-gemini-login__panel {
        width: 100%;
    }
}

@media (max-width: 640px) {
    body[data-page="login"] .auth-shell {
        padding: 18px 15px 28px;
    }

    .tarvos-gemini-login__topbar {
        align-items: flex-start;
        padding-bottom: 18px;
        margin-bottom: 24px;
    }

    .tarvos-gemini-login__brand-copy {
        display: grid;
        gap: 1px;
    }

    .tarvos-gemini-login__brand-separator {
        display: none;
    }

    .tarvos-gemini-login__status {
        max-width: 138px;
        white-space: normal;
        line-height: 1.25;
    }

    .tarvos-gemini-login__title {
        font-size: clamp(2rem, 11vw, 2.7rem);
    }

    .tarvos-gemini-login__description {
        font-size: .94rem;
    }

    .tarvos-gemini-login__panel {
        padding: 21px 18px;
        border-radius: 15px;
    }

    .tarvos-gemini-login__panel-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .tarvos-gemini-login__step h2 span {
        display: block;
        margin: 2px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tarvos-gemini-login *,
    .tarvos-gemini-login *::before,
    .tarvos-gemini-login *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


/* ===== GEMINI WORKBENCH DASHBOARD 2026 ===== */

    /* ==========================================================================
       SISTEMA DE DISEÑO ENCAPSULADO (.tarvos-dudas-dashboard)
       Inspirado en la precisión tipográfica, ritmo métrico y sobriedad de
       herramientas profesionales de alto rendimiento (Linear, Stripe, Apple).
       ========================================================================== */
    .tarvos-dudas-dashboard {
      /* Paleta monocromática y neutros de alta fidelidad */
      --tv-bg-canvas: #fafbfc;
      --tv-surface: #ffffff;
      --tv-surface-subtle: #f6f8fa;
      --tv-surface-muted: #eef2f6;
      --tv-surface-active: #f1f4f9;

      /* Bordes y delimitadores micrométricos */
      --tv-border-subtle: #e9ecef;
      --tv-border-default: #dbe1e8;
      --tv-border-strong: #c2cbd6;
      --tv-border-focus: #185adb;

      /* Jerarquía tipográfica y contrastes AA/AAA */
      --tv-text-primary: #0f172a;
      --tv-text-secondary: #475569;
      --tv-text-tertiary: #64748b;
      --tv-text-muted: #94a3b8;
      --tv-text-inverse: #ffffff;

      /* Acentos de estado sobrios y funcionales (no estridentes) */
      --tv-accent: #0f3cb5;
      --tv-accent-hover: #0c2f8f;
      --tv-accent-light: #edf2fe;
      --tv-accent-border: #c7d7fe;

      /* Estados de actividad */
      --tv-badge-open-bg: #ecfdf5;
      --tv-badge-open-text: #065f46;
      --tv-badge-open-border: #a7f3d0;
      --tv-badge-open-dot: #10b981;

      --tv-badge-closed-bg: #f1f5f9;
      --tv-badge-closed-text: #475569;
      --tv-badge-closed-border: #cbd5e1;
      --tv-badge-closed-dot: #94a3b8;

      --tv-badge-alert-bg: #fffbeb;
      --tv-badge-alert-text: #92400e;
      --tv-badge-alert-border: #fde68a;
      --tv-badge-alert-dot: #f59e0b;

      /* Elevaciones refinadas */
      --tv-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.02);
      --tv-shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
      --tv-shadow-hover: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 3px 6px -2px rgba(15, 23, 42, 0.04);
      --tv-shadow-focus: 0 0 0 3px rgba(24, 90, 219, 0.18);

      /* Geometría y ritmo */
      --tv-radius-xs: 4px;
      --tv-radius-sm: 6px;
      --tv-radius-md: 10px;
      --tv-radius-lg: 14px;
      --tv-radius-full: 9999px;

      /* Transiciones coherentes */
      --tv-transition-fast: 140ms cubic-bezier(0.16, 1, 0.3, 1);
      --tv-transition-base: 220ms cubic-bezier(0.16, 1, 0.3, 1);

      /* Configuración de encapsulado */
      display: block;
      width: 100%;
      max-width: 1360px;
      margin: 0 auto;
      padding: 1.5rem 1.25rem 4rem 1.25rem;
      background: transparent;
      box-sizing: border-box;
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      color: var(--tv-text-primary);
      line-height: 1.45;
    }

    /* Reseteo local estricto dentro del namespace */
    .tarvos-dudas-dashboard *,
    .tarvos-dudas-dashboard *::before,
    .tarvos-dudas-dashboard *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    /* Barra Superior Funcional: Estado Global y Herramientas */
    .tarvos-dudas-dashboard .tv-workbench-header {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
      margin-bottom: 1.75rem;
    }

    .tarvos-dudas-dashboard .tv-header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 1rem;
    }

    .tarvos-dudas-dashboard .tv-title-group {
      display: flex;
      align-items: baseline;
      gap: 0.85rem;
      flex-wrap: wrap;
    }

    .tarvos-dudas-dashboard .tv-title {
      font-size: 1.35rem;
      font-weight: 650;
      letter-spacing: -0.022em;
      color: var(--tv-text-primary);
    }

    .tarvos-dudas-dashboard .tv-academic-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.875rem;
      font-weight: 500;
      color: var(--tv-text-tertiary);
      background: var(--tv-surface-subtle);
      border: 1px solid var(--tv-border-subtle);
      padding: 0.2rem 0.6rem;
      border-radius: var(--tv-radius-full);
    }

    .tarvos-dudas-dashboard .tv-academic-badge span {
      font-weight: 600;
      color: var(--tv-text-secondary);
    }

    /* Franja de Métricas Operativas (Situational Awareness) */
    .tarvos-dudas-dashboard .tv-metrics-band {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 0.75rem;
      margin-bottom: 1.5rem;
    }

    .tarvos-dudas-dashboard .tv-metric-tile {
      background: var(--tv-surface);
      border: 1px solid var(--tv-border-subtle);
      border-radius: var(--tv-radius-md);
      padding: 0.875rem 1.1rem;
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      transition: border-color var(--tv-transition-fast), box-shadow var(--tv-transition-fast);
    }

    .tarvos-dudas-dashboard .tv-metric-tile:hover {
      border-color: var(--tv-border-default);
      box-shadow: var(--tv-shadow-sm);
    }

    .tarvos-dudas-dashboard .tv-metric-tile.is-active-alert {
      background: #fffdf7;
      border-color: #fce79a;
    }

    .tarvos-dudas-dashboard .tv-metric-label {
      font-size: 0.875rem;
      font-weight: 550;
      letter-spacing: 0.02em;
      text-transform: uppercase;
      color: var(--tv-text-tertiary);
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .tarvos-dudas-dashboard .tv-metric-value-row {
      display: flex;
      align-items: baseline;
      gap: 0.5rem;
    }

    .tarvos-dudas-dashboard .tv-metric-value {
      font-size: 1.55rem;
      font-weight: 700;
      letter-spacing: -0.03em;
      color: var(--tv-text-primary);
      line-height: 1;
    }

    .tarvos-dudas-dashboard .tv-metric-hint {
      font-size: 0.875rem;
      color: var(--tv-text-muted);
    }

    .tarvos-dudas-dashboard .tv-metric-tile.is-active-alert .tv-metric-value {
      color: #b45309;
    }

    /* Toolbar de Control de Vista y Búsqueda */
    .tarvos-dudas-dashboard .tv-controls-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      padding: 0.65rem 0.85rem;
      background: var(--tv-surface);
      border: 1px solid var(--tv-border-subtle);
      border-radius: var(--tv-radius-md);
      box-shadow: var(--tv-shadow-sm);
      flex-wrap: wrap;
    }

    .tarvos-dudas-dashboard .tv-search-wrapper {
      position: relative;
      flex: 1 1 260px;
      max-width: 440px;
      display: flex;
      align-items: center;
    }

    .tarvos-dudas-dashboard .tv-search-icon {
      position: absolute;
      left: 0.75rem;
      width: 15px;
      height: 15px;
      color: var(--tv-text-muted);
      pointer-events: none;
    }

    .tarvos-dudas-dashboard .tv-search-input {
      width: 100%;
      height: 34px;
      padding: 0 2.2rem 0 2.2rem;
      font-size: 0.875rem;
      color: var(--tv-text-primary);
      background: var(--tv-surface-subtle);
      border: 1px solid transparent;
      border-radius: var(--tv-radius-sm);
      outline: none;
      transition: background var(--tv-transition-fast), border-color var(--tv-transition-fast), box-shadow var(--tv-transition-fast);
    }

    .tarvos-dudas-dashboard .tv-search-input:focus {
      background: var(--tv-surface);
      border-color: var(--tv-border-focus);
      box-shadow: var(--tv-shadow-focus);
    }

    .tarvos-dudas-dashboard .tv-search-shortcut {
      position: absolute;
      right: 0.6rem;
      font-size: 0.875rem;
      font-family: inherit;
      font-weight: 600;
      color: var(--tv-text-muted);
      background: var(--tv-surface);
      border: 1px solid var(--tv-border-default);
      padding: 0.1rem 0.35rem;
      border-radius: var(--tv-radius-xs);
      pointer-events: none;
    }

    .tarvos-dudas-dashboard .tv-filter-group {
      display: inline-flex;
      align-items: center;
      background: var(--tv-surface-subtle);
      padding: 2px;
      border-radius: var(--tv-radius-sm);
      border: 1px solid var(--tv-border-subtle);
    }

    .tarvos-dudas-dashboard .tv-filter-btn {
      appearance: none;
      background: transparent;
      border: none;
      font-size: 0.875rem;
      font-weight: 500;
      color: var(--tv-text-secondary);
      padding: 0.4rem 0.75rem;
      border-radius: calc(var(--tv-radius-sm) - 2px);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      transition: background var(--tv-transition-fast), color var(--tv-transition-fast);
      white-space: nowrap;
    }

    .tarvos-dudas-dashboard .tv-filter-btn:hover {
      color: var(--tv-text-primary);
    }

    .tarvos-dudas-dashboard .tv-filter-btn.is-active {
      background: var(--tv-surface);
      color: var(--tv-text-primary);
      font-weight: 600;
      box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    }

    .tarvos-dudas-dashboard .tv-filter-count {
      display: inline-block;
      font-size: 0.875rem;
      font-weight: 600;
      padding: 0.05rem 0.4rem;
      border-radius: var(--tv-radius-full);
      background: var(--tv-surface-muted);
      color: var(--tv-text-secondary);
    }

    .tarvos-dudas-dashboard .tv-filter-btn.is-active .tv-filter-count {
      background: var(--tv-text-primary);
      color: var(--tv-text-inverse);
    }

    .tarvos-dudas-dashboard .tv-view-options {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .tarvos-dudas-dashboard .tv-view-toggle {
      display: inline-flex;
      border: 1px solid var(--tv-border-subtle);
      background: var(--tv-surface-subtle);
      border-radius: var(--tv-radius-sm);
      padding: 2px;
    }

    .tarvos-dudas-dashboard .tv-toggle-btn {
      appearance: none;
      border: none;
      background: transparent;
      padding: 0.35rem 0.45rem;
      border-radius: calc(var(--tv-radius-sm) - 2px);
      cursor: pointer;
      color: var(--tv-text-tertiary);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: all var(--tv-transition-fast);
    }

    .tarvos-dudas-dashboard .tv-toggle-btn.is-active {
      background: var(--tv-surface);
      color: var(--tv-text-primary);
      box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    }

    .tarvos-dudas-dashboard .tv-toggle-btn:focus-visible,
    .tarvos-dudas-dashboard .tv-filter-btn:focus-visible,
    .tarvos-dudas-dashboard .tv-btn:focus-visible {
      outline: none;
      box-shadow: var(--tv-shadow-focus);
    }

    /* Contenedor Principal de Cursos */
    .tarvos-dudas-dashboard .tv-courses-container {
      margin-top: 1.25rem;
      display: flex;
      flex-direction: column;
      gap: 1.75rem;
    }

    /* Sección Prioritaria: Requieren Atención */
    .tarvos-dudas-dashboard .tv-section-block {
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
    }

    .tarvos-dudas-dashboard .tv-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-bottom: 0.4rem;
      border-bottom: 1px solid var(--tv-border-subtle);
    }

    .tarvos-dudas-dashboard .tv-section-title {
      font-size: 0.875rem;
      font-weight: 650;
      letter-spacing: 0.01em;
      color: var(--tv-text-secondary);
      display: flex;
      align-items: center;
      gap: 0.5rem;
      text-transform: uppercase;
    }

    .tarvos-dudas-dashboard .tv-section-indicator {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--tv-badge-alert-dot);
    }

    .tarvos-dudas-dashboard .tv-section-counter {
      font-size: 0.875rem;
      color: var(--tv-text-muted);
      font-weight: 500;
    }

    /* Visualización A: Grilla Inteligente de Tarjetas Operativas */
    .tarvos-dudas-dashboard .tv-grid-view {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 1rem;
    }

    .tarvos-dudas-dashboard .tv-course-card {
      background: var(--tv-surface);
      border: 1px solid var(--tv-border-subtle);
      border-radius: var(--tv-radius-md);
      padding: 1.15rem;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 1rem;
      position: relative;
      transition: transform var(--tv-transition-fast), border-color var(--tv-transition-fast), box-shadow var(--tv-transition-fast);
    }

    .tarvos-dudas-dashboard .tv-course-card:hover {
      border-color: var(--tv-border-default);
      box-shadow: var(--tv-shadow-md);
      transform: translateY(-1px);
    }

    .tarvos-dudas-dashboard .tv-course-card.has-pending-queries {
      border-left: 3px solid #f59e0b;
    }

    .tarvos-dudas-dashboard .tv-card-top {
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
    }

    .tarvos-dudas-dashboard .tv-card-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
    }

    .tarvos-dudas-dashboard .tv-subject-tag {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--tv-text-tertiary);
      letter-spacing: 0.03em;
      text-transform: uppercase;
    }

    .tarvos-dudas-dashboard .tv-status-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.875rem;
      font-weight: 550;
      padding: 0.15rem 0.5rem;
      border-radius: var(--tv-radius-full);
      white-space: nowrap;
    }

    .tarvos-dudas-dashboard .tv-status-badge.is-open {
      background: var(--tv-badge-open-bg);
      color: var(--tv-badge-open-text);
      border: 1px solid var(--tv-badge-open-border);
    }

    .tarvos-dudas-dashboard .tv-status-badge.is-open::before {
      content: "";
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: var(--tv-badge-open-dot);
    }

    .tarvos-dudas-dashboard .tv-status-badge.is-closed {
      background: var(--tv-badge-closed-bg);
      color: var(--tv-badge-closed-text);
      border: 1px solid var(--tv-badge-closed-border);
    }

    .tarvos-dudas-dashboard .tv-status-badge.is-closed::before {
      content: "";
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: var(--tv-badge-closed-dot);
    }

    .tarvos-dudas-dashboard .tv-course-name {
      font-size: 1.05rem;
      font-weight: 650;
      letter-spacing: -0.015em;
      color: var(--tv-text-primary);
      line-height: 1.3;
    }

    /* Indicador resumido de dudas */
    .tarvos-dudas-dashboard .tv-stats-bar {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.5rem;
      padding: 0.65rem 0.75rem;
      background: var(--tv-surface-subtle);
      border-radius: var(--tv-radius-sm);
      border: 1px solid var(--tv-border-subtle);
    }

    .tarvos-dudas-dashboard .tv-stat-col {
      display: flex;
      flex-direction: column;
    }

    .tarvos-dudas-dashboard .tv-stat-number {
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--tv-text-primary);
      line-height: 1.1;
      display: flex;
      align-items: center;
      gap: 0.3rem;
    }

    .tarvos-dudas-dashboard .tv-stat-number.is-alert {
      color: #d97706;
    }

    .tarvos-dudas-dashboard .tv-stat-label {
      font-size: 0.875rem;
      color: var(--tv-text-tertiary);
      margin-top: 0.15rem;
    }

    /* Botonera de acciones contextuales en tarjeta */
    .tarvos-dudas-dashboard .tv-card-actions {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding-top: 0.5rem;
      border-top: 1px solid var(--tv-border-subtle);
    }

    .tarvos-dudas-dashboard .tv-btn {
      appearance: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      font-size: 0.875rem;
      font-weight: 550;
      padding: 0.45rem 0.85rem;
      border-radius: var(--tv-radius-sm);
      text-decoration: none;
      cursor: pointer;
      transition: background var(--tv-transition-fast), border-color var(--tv-transition-fast), color var(--tv-transition-fast);
      white-space: nowrap;
    }

    .tarvos-dudas-dashboard .tv-btn-primary {
      background: var(--tv-text-primary);
      color: var(--tv-text-inverse);
      border: 1px solid var(--tv-text-primary);
      flex: 1;
    }

    .tarvos-dudas-dashboard .tv-btn-primary:hover {
      background: #1e293b;
      border-color: #1e293b;
    }

    .tarvos-dudas-dashboard .tv-btn-secondary {
      background: var(--tv-surface);
      color: var(--tv-text-secondary);
      border: 1px solid var(--tv-border-default);
      flex: 1;
    }

    .tarvos-dudas-dashboard .tv-btn-secondary:hover {
      background: var(--tv-surface-subtle);
      color: var(--tv-text-primary);
      border-color: var(--tv-border-strong);
    }

    .tarvos-dudas-dashboard .tv-btn-accent {
      background: var(--tv-accent-light);
      color: var(--tv-accent);
      border: 1px solid var(--tv-accent-border);
      padding: 0.45rem 0.75rem;
    }

    .tarvos-dudas-dashboard .tv-btn-accent:hover {
      background: #e0e9fd;
      color: var(--tv-accent-hover);
    }

    .tarvos-dudas-dashboard .tv-btn-icon-only {
      padding: 0.45rem;
      color: var(--tv-text-tertiary);
      background: transparent;
      border: 1px solid var(--tv-border-subtle);
    }

    .tarvos-dudas-dashboard .tv-btn-icon-only:hover {
      color: var(--tv-text-primary);
      border-color: var(--tv-border-default);
      background: var(--tv-surface-subtle);
    }

    /* Visualización B: Vista Compacta / Tabla Operativa */
    .tarvos-dudas-dashboard .tv-list-view {
      display: flex;
      flex-direction: column;
      background: var(--tv-surface);
      border: 1px solid var(--tv-border-subtle);
      border-radius: var(--tv-radius-md);
      box-shadow: var(--tv-shadow-sm);
      overflow: hidden;
    }

    .tarvos-dudas-dashboard .tv-list-header {
      display: grid;
      grid-template-columns: minmax(260px, 2.5fr) 130px 110px 110px minmax(200px, 1.8fr);
      padding: 0.65rem 1.15rem;
      background: var(--tv-surface-subtle);
      border-bottom: 1px solid var(--tv-border-subtle);
      font-size: 0.875rem;
      font-weight: 650;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      color: var(--tv-text-tertiary);
    }

    .tarvos-dudas-dashboard .tv-list-row {
      display: grid;
      grid-template-columns: minmax(260px, 2.5fr) 130px 110px 110px minmax(200px, 1.8fr);
      padding: 0.85rem 1.15rem;
      align-items: center;
      border-bottom: 1px solid var(--tv-border-subtle);
      transition: background var(--tv-transition-fast);
    }

    .tarvos-dudas-dashboard .tv-list-row:last-child {
      border-bottom: none;
    }

    .tarvos-dudas-dashboard .tv-list-row:hover {
      background: #fbfcfd;
    }

    .tarvos-dudas-dashboard .tv-list-row.has-pending-queries {
      background: #fffdf9;
    }

    .tarvos-dudas-dashboard .tv-list-row.has-pending-queries:hover {
      background: #fffbf2;
    }

    .tarvos-dudas-dashboard .tv-list-title-cell {
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
      padding-right: 1rem;
    }

    .tarvos-dudas-dashboard .tv-list-title {
      font-size: 0.925rem;
      font-weight: 600;
      color: var(--tv-text-primary);
    }

    .tarvos-dudas-dashboard .tv-list-sub {
      font-size: 0.875rem;
      color: var(--tv-text-tertiary);
    }

    .tarvos-dudas-dashboard .tv-numeric-cell {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--tv-text-secondary);
    }

    .tarvos-dudas-dashboard .tv-numeric-cell.is-pending {
      color: #b45309;
      font-weight: 700;
    }

    .tarvos-dudas-dashboard .tv-list-actions-cell {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.4rem;
    }

    /* Estado Vacío de Búsqueda / Filtros */
    .tarvos-dudas-dashboard .tv-empty-state {
      padding: 3.5rem 1.5rem;
      text-align: center;
      background: var(--tv-surface);
      border: 1px dashed var(--tv-border-default);
      border-radius: var(--tv-radius-md);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.75rem;
    }

    .tarvos-dudas-dashboard .tv-empty-icon {
      width: 40px;
      height: 40px;
      color: var(--tv-text-muted);
      margin-bottom: 0.25rem;
    }

    .tarvos-dudas-dashboard .tv-empty-title {
      font-size: 1rem;
      font-weight: 600;
      color: var(--tv-text-secondary);
    }

    .tarvos-dudas-dashboard .tv-empty-desc {
      font-size: 0.875rem;
      color: var(--tv-text-tertiary);
      max-width: 380px;
    }

    .tarvos-dudas-dashboard .tv-empty-reset-btn {
      margin-top: 0.5rem;
      background: var(--tv-surface-muted);
      border: 1px solid var(--tv-border-default);
      font-size: 0.875rem;
      padding: 0.4rem 0.85rem;
      border-radius: var(--tv-radius-sm);
      cursor: pointer;
      color: var(--tv-text-primary);
      font-weight: 550;
    }

    /* Notificación flotante de feedback ligero (sin alert()) */
    .tarvos-dudas-dashboard .tv-toast {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      background: #0f172a;
      color: #ffffff;
      padding: 0.75rem 1.15rem;
      border-radius: var(--tv-radius-md);
      font-size: 0.875rem;
      font-weight: 500;
      box-shadow: 0 10px 25px -5px rgba(0,0,0,0.25);
      display: flex;
      align-items: center;
      gap: 0.6rem;
      opacity: 0;
      transform: translateY(12px);
      pointer-events: none;
      transition: opacity 180ms ease, transform 180ms ease;
      z-index: 9999;
    }

    .tarvos-dudas-dashboard .tv-toast.is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    /* Media Queries: Adaptabilidad Ergonomía Móvil y Tablet */
    @media (max-width: 980px) {
      .tarvos-dudas-dashboard .tv-metrics-band {
        grid-template-columns: repeat(2, 1fr);
      }

      .tarvos-dudas-dashboard .tv-list-header {
        display: none;
      }

      .tarvos-dudas-dashboard .tv-list-row {
        grid-template-columns: 1fr auto;
        gap: 0.75rem;
        padding: 1rem;
      }

      .tarvos-dudas-dashboard .tv-list-row > *:not(.tv-list-title-cell):not(.tv-list-actions-cell) {
        display: none;
      }
    }

    @media (max-width: 640px) {
      .tarvos-dudas-dashboard {
        padding: 1rem 0.85rem 3rem 0.85rem;
      }

      .tarvos-dudas-dashboard .tv-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
      }

      .tarvos-dudas-dashboard .tv-search-wrapper {
        max-width: 100%;
      }

      .tarvos-dudas-dashboard .tv-filter-group {
        overflow-x: auto;
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
      }

      .tarvos-dudas-dashboard .tv-metrics-band {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
      }

      .tarvos-dudas-dashboard .tv-metric-tile {
        padding: 0.75rem;
      }

      .tarvos-dudas-dashboard .tv-metric-value {
        font-size: 1.35rem;
      }

      .tarvos-dudas-dashboard .tv-grid-view {
        grid-template-columns: 1fr;
      }

      .tarvos-dudas-dashboard .tv-card-actions {
        flex-direction: column;
        align-items: stretch;
      }

      .tarvos-dudas-dashboard .tv-card-actions .tv-btn {
        width: 100%;
        min-height: 40px; /* Touch target optimizado */
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .tarvos-dudas-dashboard * {
        transition: none !important;
        animation: none !important;
      }
    }
  

/* ===== Integración real de la vista de cursos con el backend de Dudas ===== */
.tarvos-dudas-dashboard {
    max-width: 1360px;
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 2.5rem;
}

.tarvos-dudas-dashboard .tv-workbench-header {
    margin-bottom: 1.25rem;
}

.tarvos-dudas-dashboard .tv-title {
    font-size: clamp(1.35rem, 2vw, 1.6rem);
}

.tarvos-dudas-dashboard .tv-sync-banner {
    margin: 0 0 1rem;
    border-radius: var(--tv-radius-md) !important;
    box-shadow: var(--tv-shadow-sm) !important;
}

.tarvos-dudas-dashboard .tv-controls-bar {
    position: relative;
    z-index: 2;
}

.tarvos-dudas-dashboard .tv-search-input {
    min-height: 42px;
}

.tarvos-dudas-dashboard .tv-filter-btn,
.tarvos-dudas-dashboard .tv-toggle-btn,
.tarvos-dudas-dashboard .tv-btn,
.tarvos-dudas-dashboard .tv-empty-reset-btn {
    min-height: 40px;
}

.tarvos-dudas-dashboard .tv-card-head-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.tarvos-dudas-dashboard .tv-card-status-slot {
    flex: 0 0 auto;
}

.tarvos-dudas-dashboard .tv-card-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.tarvos-dudas-dashboard .tv-unread-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--tv-accent-border);
    border-radius: var(--tv-radius-full);
    background: var(--tv-accent-light);
    color: var(--tv-accent);
    font-size: 0.875rem;
    font-weight: 650;
    white-space: nowrap;
}

.tarvos-dudas-dashboard .tv-course-card.has-unread-response {
    border-left: 3px solid var(--tv-accent);
}

.tarvos-dudas-dashboard .tv-course-card[hidden] {
    display: none !important;
}

.tarvos-dudas-dashboard .tv-card-actions {
    margin-top: auto;
}

.tarvos-dudas-dashboard .tv-btn-primary,
.tarvos-dudas-dashboard .tv-btn-secondary,
.tarvos-dudas-dashboard .tv-btn-accent {
    min-height: 42px;
}

.tarvos-dudas-dashboard .tv-btn-primary svg,
.tarvos-dudas-dashboard .tv-btn-secondary svg,
.tarvos-dudas-dashboard .tv-btn-accent svg {
    flex: 0 0 auto;
}

.tarvos-dudas-dashboard:not(.is-list-view) .tv-list-header {
    display: none !important;
}

.tarvos-dudas-dashboard.is-list-view .tv-grid-view {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--tv-border-subtle);
    border-radius: var(--tv-radius-md);
    background: var(--tv-surface);
    box-shadow: var(--tv-shadow-sm);
}

.tarvos-dudas-dashboard.is-list-view .tv-list-header {
    display: grid;
    grid-template-columns: minmax(260px, 2.5fr) 150px 120px 120px minmax(230px, 1.8fr);
    padding: 0.75rem 1.15rem;
    border: 1px solid var(--tv-border-subtle);
    border-bottom: 0;
    border-radius: var(--tv-radius-md) var(--tv-radius-md) 0 0;
    background: var(--tv-surface-subtle);
    color: var(--tv-text-tertiary);
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.tarvos-dudas-dashboard.is-list-view .tv-list-header + .tv-grid-view {
    border-radius: 0 0 var(--tv-radius-md) var(--tv-radius-md);
}

.tarvos-dudas-dashboard.is-list-view .tv-course-card {
    display: grid;
    grid-template-columns: minmax(260px, 2.5fr) 150px 120px 120px minmax(230px, 1.8fr);
    gap: 0;
    align-items: center;
    min-height: 82px;
    padding: 0.85rem 1.15rem;
    border: 0;
    border-bottom: 1px solid var(--tv-border-subtle);
    border-radius: 0;
    box-shadow: none;
    transform: none;
}

.tarvos-dudas-dashboard.is-list-view .tv-course-card:last-child {
    border-bottom: 0;
}

.tarvos-dudas-dashboard.is-list-view .tv-course-card:hover {
    transform: none;
    background: #fbfcfd;
    box-shadow: none;
}

.tarvos-dudas-dashboard.is-list-view .tv-course-card.has-pending-queries {
    border-left: 3px solid var(--tv-badge-alert-dot);
    background: #fffdf9;
}

.tarvos-dudas-dashboard.is-list-view .tv-course-card.has-unread-response {
    border-left: 3px solid var(--tv-accent);
}

.tarvos-dudas-dashboard.is-list-view .tv-card-head-row,
.tarvos-dudas-dashboard.is-list-view .tv-stats-bar {
    display: contents;
}

.tarvos-dudas-dashboard.is-list-view .tv-card-top {
    gap: 0.25rem;
    padding-right: 1rem;
}

.tarvos-dudas-dashboard.is-list-view .tv-card-meta {
    gap: 0.5rem;
}

.tarvos-dudas-dashboard.is-list-view .tv-subject-tag,
.tarvos-dudas-dashboard.is-list-view .tv-unread-tag {
    font-size: 0.875rem;
}

.tarvos-dudas-dashboard.is-list-view .tv-card-status-slot {
    justify-self: start;
}

.tarvos-dudas-dashboard.is-list-view .tv-stat-col {
    padding: 0;
}

.tarvos-dudas-dashboard.is-list-view .tv-stat-number {
    font-size: 1rem;
}

.tarvos-dudas-dashboard.is-list-view .tv-stat-label {
    margin-top: 0.15rem;
}

.tarvos-dudas-dashboard.is-list-view .tv-card-actions {
    justify-content: flex-end;
    padding: 0;
    border-top: 0;
}

.tarvos-dudas-dashboard.is-list-view .tv-card-actions .tv-btn {
    flex: 0 1 auto;
    min-width: 0;
}

@media (max-width: 1180px) {
    .tarvos-dudas-dashboard.is-list-view .tv-list-header {
        display: none !important;
    }

    .tarvos-dudas-dashboard.is-list-view .tv-grid-view {
        gap: 0.75rem;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .tarvos-dudas-dashboard.is-list-view .tv-course-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.8rem 1rem;
        padding: 1rem;
        border: 1px solid var(--tv-border-subtle);
        border-radius: var(--tv-radius-md);
    }

    .tarvos-dudas-dashboard.is-list-view .tv-card-head-row,
    .tarvos-dudas-dashboard.is-list-view .tv-stats-bar {
        display: flex;
    }

    .tarvos-dudas-dashboard.is-list-view .tv-card-head-row {
        grid-column: 1 / -1;
    }

    .tarvos-dudas-dashboard.is-list-view .tv-stats-bar {
        grid-column: 1;
        gap: 1.25rem;
        background: transparent;
        border: 0;
        padding: 0;
    }

    .tarvos-dudas-dashboard.is-list-view .tv-card-actions {
        grid-column: 2;
        align-self: end;
    }
}

@media (max-width: 720px) {
    .tarvos-dudas-dashboard .tv-header-row,
    .tarvos-dudas-dashboard .tv-title-group {
        align-items: flex-start;
    }

    .tarvos-dudas-dashboard .tv-title-group {
        flex-direction: column;
        gap: 0.6rem;
    }

    .tarvos-dudas-dashboard .tv-metrics-band {
        grid-template-columns: 1fr 1fr;
    }

    .tarvos-dudas-dashboard .tv-filter-group {
        scrollbar-width: thin;
    }

    .tarvos-dudas-dashboard .tv-card-head-row {
        flex-direction: column;
    }

    .tarvos-dudas-dashboard.is-list-view .tv-course-card {
        grid-template-columns: 1fr;
    }

    .tarvos-dudas-dashboard.is-list-view .tv-card-actions,
    .tarvos-dudas-dashboard.is-list-view .tv-stats-bar,
    .tarvos-dudas-dashboard.is-list-view .tv-card-head-row {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .tarvos-dudas-dashboard .tv-metrics-band {
        grid-template-columns: 1fr;
    }

    .tarvos-dudas-dashboard .tv-metric-tile {
        min-height: 82px;
    }
}


/* ========================================================================
   TARVOS UX POLISH · 2026-09-08
   Scope: application content only. Global topbar/header and legal footer are
   intentionally left untouched. The existing course hero markup is preserved.
   ======================================================================== */
:root {
    --tv-violet-950: #24124f;
    --tv-violet-900: #35156f;
    --tv-violet-800: #4b22a8;
    --tv-violet-700: #5f32e6;
    --tv-violet-600: #6d3df5;
    --tv-violet-500: #7c55f7;
    --tv-violet-300: #cbbcff;
    --tv-violet-200: #ddd3ff;
    --tv-violet-100: #eee9ff;
    --tv-violet-50: #f8f6ff;
    --tv-ink: #171526;
    --tv-muted: #68677a;
    --tv-line: #e8e5f1;
    --tv-soft: #f7f6fb;
    --tv-shadow: 0 14px 36px rgba(48, 31, 91, .075);
    --tv-shadow-hover: 0 18px 44px rgba(48, 31, 91, .115);
}

/* Content canvas: clearer visual rhythm without altering the site chrome. */
.app-content--topnav {
    isolation: isolate;
}
.app-content--topnav::before {
    content: "";
    position: fixed;
    inset: 74px 0 0;
    z-index: -1;
    pointer-events: none;
    background:
      radial-gradient(circle at 88% 1%, rgba(109,61,245,.075), transparent 28rem),
      radial-gradient(circle at 4% 25%, rgba(124,85,247,.035), transparent 24rem);
}

/* Shared app-only panels. */
.app-content--topnav .panel,
.app-content--topnav .course-directory,
.app-content--topnav .stats-panel,
.app-content--topnav .issue-inbox-panel,
.app-content--topnav .settings-card--premium,
.app-content--topnav .settings-card--premium-soft {
    border-color: var(--tv-line);
    box-shadow: 0 8px 28px rgba(37, 24, 72, .045);
}

/* ---------- Course directory / dashboard ---------- */
.tarvos-dudas-dashboard {
    --tv-bg-canvas: transparent;
    --tv-surface: #fff;
    --tv-surface-subtle: #f8f7fc;
    --tv-surface-muted: #eee9ff;
    --tv-surface-active: #f3efff;
    --tv-border-subtle: #ebe8f2;
    --tv-border-default: #ddd7ea;
    --tv-border-strong: #cabdf0;
    --tv-border-focus: var(--tv-violet-600);
    --tv-text-primary: var(--tv-ink);
    --tv-text-secondary: #56556a;
    --tv-text-tertiary: #6f6d82;
    --tv-text-muted: #9895aa;
    --tv-text-inverse: #fff;
    --tv-accent: var(--tv-violet-700);
    --tv-accent-hover: var(--tv-violet-800);
    --tv-accent-light: var(--tv-violet-50);
    --tv-accent-border: var(--tv-violet-200);
    --tv-shadow-sm: 0 3px 12px rgba(40, 29, 73, .05);
    --tv-shadow-md: var(--tv-shadow);
    --tv-shadow-hover: var(--tv-shadow-hover);
    --tv-shadow-focus: 0 0 0 4px rgba(109, 61, 245, .14);
}

.tarvos-dudas-dashboard .tv-workbench-header {
    margin-bottom: 1.5rem;
}
.tarvos-dudas-dashboard .tv-title {
    letter-spacing: -.035em;
}
.tarvos-dudas-dashboard .tv-academic-badge {
    color: var(--tv-violet-800);
    background: var(--tv-violet-50);
    border-color: var(--tv-violet-200);
}
.tarvos-dudas-dashboard .tv-metric-tile {
    border-color: var(--tv-line);
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(45, 31, 83, .035);
}
.tarvos-dudas-dashboard .tv-metric-tile:hover {
    border-color: #d9d0ef;
    box-shadow: 0 10px 28px rgba(48,31,91,.07);
}
.tarvos-dudas-dashboard .tv-metric-tile:nth-child(1) .tv-metric-label,
.tarvos-dudas-dashboard .tv-metric-tile:nth-child(1) .tv-metric-value {
    color: var(--tv-violet-800);
}
.tarvos-dudas-dashboard .tv-controls-bar {
    border-color: #e5e0f0;
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(48,31,91,.055);
}
.tarvos-dudas-dashboard .tv-search-input {
    border: 1px solid transparent;
    background: #f8f7fc;
}
.tarvos-dudas-dashboard .tv-search-input:hover { border-color: #e2dcf2; }
.tarvos-dudas-dashboard .tv-search-input:focus {
    border-color: var(--tv-violet-500);
    box-shadow: 0 0 0 4px rgba(109,61,245,.12);
}
.tarvos-dudas-dashboard .tv-filter-group {
    background: #f7f5fb;
    border-color: #ebe7f2;
}
.tarvos-dudas-dashboard .tv-filter-btn.is-active {
    color: var(--tv-violet-800);
    box-shadow: 0 2px 8px rgba(48,31,91,.08), inset 0 0 0 1px #e3dcf8;
}
.tarvos-dudas-dashboard .tv-filter-btn.is-active .tv-filter-count {
    background: var(--tv-violet-700);
    color: #fff;
}
.tarvos-dudas-dashboard .tv-toggle-btn.is-active {
    color: var(--tv-violet-800);
    box-shadow: 0 2px 8px rgba(48,31,91,.08), inset 0 0 0 1px #e3dcf8;
}

.tarvos-dudas-dashboard .tv-grid-view {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
    gap: 1.05rem;
}
.tarvos-dudas-dashboard .tv-course-card {
    overflow: hidden;
    border-color: #e8e4ef;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 26px rgba(40,29,73,.04);
}
.tarvos-dudas-dashboard .tv-course-card::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--tv-violet-500), var(--tv-violet-700));
    opacity: .76;
}
.tarvos-dudas-dashboard .tv-course-card.has-pending-queries {
    border-left: 1px solid #e8e4ef;
}
.tarvos-dudas-dashboard .tv-course-card.has-pending-queries::after {
    width: 4px;
    background: linear-gradient(180deg, #f2a53a 0%, #d67a13 100%);
    opacity: 1;
}
.tarvos-dudas-dashboard .tv-course-card:hover {
    border-color: #d8cfec;
    box-shadow: var(--tv-shadow-hover);
    transform: translateY(-2px);
}
.tarvos-dudas-dashboard .tv-subject-tag { color: var(--tv-violet-800); }
.tarvos-dudas-dashboard .tv-course-name {
    color: var(--tv-ink);
    font-size: 1.08rem;
    letter-spacing: -.02em;
}
.tarvos-dudas-dashboard .tv-stats-bar {
    background: linear-gradient(135deg, #faf9fd, #f6f3ff);
    border-color: #ebe6f5;
}
.tarvos-dudas-dashboard .tv-btn-primary {
    background: #191727;
    border-color: #191727;
    box-shadow: 0 7px 16px rgba(23,21,38,.10);
}
.tarvos-dudas-dashboard .tv-btn-primary:hover {
    background: var(--tv-violet-800);
    border-color: var(--tv-violet-800);
}
.tarvos-dudas-dashboard .tv-btn-secondary:hover {
    color: var(--tv-violet-800);
    border-color: var(--tv-violet-300);
    background: var(--tv-violet-50);
}
.tarvos-dudas-dashboard .tv-btn-accent {
    background: var(--tv-violet-50);
    color: var(--tv-violet-800);
    border-color: var(--tv-violet-200);
}

/* ---------- Course doubts workspace ---------- */
.course-page .issue-board-panel--course {
    border-color: #e5e0ef;
    border-radius: 22px;
    box-shadow: 0 14px 42px rgba(40,29,73,.055);
}
.course-page .issue-toolbar--course {
    border-color: #e8e4ef;
    background: linear-gradient(180deg, #fff, #fcfbfe);
}
.course-page .issue-toolbar input[type="search"],
.course-page .issue-toolbar select {
    border-color: #e2dcea !important;
    background: #faf9fd !important;
}
.course-page .issue-toolbar input[type="search"]:focus,
.course-page .issue-toolbar select:focus {
    border-color: var(--tv-violet-500) !important;
    box-shadow: 0 0 0 4px rgba(109,61,245,.12) !important;
    background: #fff !important;
}
.course-page .discussion-thread.issue-row {
    overflow: visible;
    border: 1px solid #e8e4ef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(40,29,73,.042);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.course-page .discussion-thread.issue-row:hover {
    border-color: #d9d0ef;
    box-shadow: 0 14px 38px rgba(48,31,91,.075);
    transform: translateY(-1px);
}
.course-page .discussion-thread--pending.issue-row {
    box-shadow: inset 4px 0 0 #d89028, 0 8px 28px rgba(40,29,73,.042);
}
.course-page .discussion-thread--resolved.issue-row {
    box-shadow: inset 4px 0 0 #35a77a, 0 8px 28px rgba(40,29,73,.042);
}
.course-page .discussion-thread__question {
    padding: clamp(18px, 2.1vw, 26px);
    border-radius: 18px;
}
.course-page .discussion-thread__title {
    color: var(--tv-ink);
    letter-spacing: -.02em;
}
.course-page .discussion-thread__content {
    color: #343246;
    font-size: 1rem;
    line-height: 1.72;
}
.course-page .discussion-thread__status--resolved {
    color: #087250 !important;
    background: #ecfaf5 !important;
    border-color: #c8ebdf !important;
}
.course-page .discussion-thread__status--pending {
    color: #9c5b08 !important;
    background: #fff8e9 !important;
    border-color: #f1ddb9 !important;
}
.course-page .discussion-thread__pill--course,
.course-page .discussion-thread__topic,
.course-page .topic-chip {
    color: var(--tv-violet-800) !important;
    background: var(--tv-violet-50) !important;
    border-color: var(--tv-violet-200) !important;
}
.course-page .discussion-thread__summary-toggle:hover {
    background: linear-gradient(90deg, rgba(109,61,245,.035), transparent 55%);
}
.course-page .discussion-thread__summary-signal {
    color: var(--tv-violet-800);
    background: var(--tv-violet-50);
    border-color: var(--tv-violet-200);
}

/* Teacher responses become a clear, calm reading block. */
.course-page .thread-response,
.course-page .discussion-thread__answer {
    background: linear-gradient(135deg, #fbfaff 0%, #f7f4ff 100%) !important;
    border-color: #e4dcfb !important;
}
.course-page .thread-response::before,
.course-page .discussion-thread__answer::before {
    background: linear-gradient(180deg, var(--tv-violet-500), var(--tv-violet-700)) !important;
}
.course-page .thread-response__role,
.course-page .discussion-thread__answer-label {
    color: var(--tv-violet-700) !important;
}

/* Keep Tutor IA visually important anywhere in the app content. */
.app-content--topnav .course-banner__tutor-link,
.app-content--topnav a[href*="tutor"].topbar-button--primary,
.app-content--topnav [data-open-tutor] {
    border-color: transparent !important;
    background: linear-gradient(135deg, #7650f8, #5d2ee4) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(109,61,245,.24) !important;
}
.app-content--topnav .course-banner__tutor-link:hover,
.app-content--topnav a[href*="tutor"].topbar-button--primary:hover,
.app-content--topnav [data-open-tutor]:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(109,61,245,.31) !important;
}

/* ---------- Attachments: readable thumbnails, clear click target ---------- */
.thread-attachments,
.discussion-thread__attachments {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
    gap: 10px !important;
    align-items: stretch;
}
.thread-attachment {
    width: 100% !important;
    min-height: 74px;
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 11px !important;
    padding: 8px !important;
    border: 1px solid #e5e0ed !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(40,29,73,.035);
}
.thread-attachment:hover {
    transform: translateY(-1px);
    border-color: var(--tv-violet-300) !important;
    background: var(--tv-violet-50) !important;
    box-shadow: 0 9px 22px rgba(48,31,91,.08);
}
.thread-attachment__thumb,
.thread-attachment__media {
    width: 58px !important;
    height: 58px !important;
    overflow: hidden;
    border: 1px solid #ebe7f1;
    border-radius: 10px !important;
    background: #f6f4fa !important;
}
.thread-attachment__thumb img,
.thread-attachment__media img,
.thread-attachment__video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.thread-attachment__meta {
    min-width: 0;
    padding-right: 5px;
}
.thread-attachment__meta strong {
    display: block;
    overflow: hidden;
    color: #262337 !important;
    font-size: .88rem !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.thread-attachment__meta small { margin-top: 3px; }

/* ---------- Image viewer: true contain mode, no clipping on rotation ---------- */
.media-lightbox--simple {
    padding: clamp(8px, 1.5vw, 20px) !important;
}
.media-lightbox--simple .media-lightbox__dialog {
    width: min(1240px, 98vw) !important;
    height: min(900px, 96dvh) !important;
    border: 1px solid rgba(255,255,255,.74) !important;
    border-radius: 22px !important;
    box-shadow: 0 34px 100px rgba(10,10,20,.34) !important;
}
.media-lightbox__backdrop { background: rgba(18,17,27,.78) !important; }
.media-lightbox--simple .media-lightbox__viewport {
    padding: 18px;
    background:
      radial-gradient(circle at 50% 50%, rgba(109,61,245,.045), transparent 32rem),
      #f4f3f7 !important;
}
.media-lightbox--simple .media-lightbox__canvas {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.media-lightbox--simple .media-lightbox__image-frame {
    position: relative !important;
    width: max-content !important;
    height: max-content !important;
    max-width: none !important;
    max-height: none !important;
    transform-origin: 50% 50% !important;
}
.media-lightbox--simple .media-lightbox__image {
    position: static !important;
    display: block !important;
    max-width: calc(98vw - 82px) !important;
    max-height: calc(96dvh - 190px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 34px rgba(21,18,32,.12);
}
.media-lightbox--simple .media-lightbox__action:hover {
    color: var(--tv-violet-800) !important;
    border-color: var(--tv-violet-300) !important;
    background: var(--tv-violet-50) !important;
}
.media-lightbox--simple .media-lightbox__external {
    border-color: var(--tv-violet-800) !important;
    background: var(--tv-violet-800) !important;
}
.media-lightbox--simple .media-lightbox__external:hover {
    background: var(--tv-violet-900) !important;
}

/* ---------- Responsive-first refinements ---------- */
@media (max-width: 900px) {
    .tarvos-dudas-dashboard .tv-controls-bar {
        gap: 10px;
        padding: 10px;
    }
    .tarvos-dudas-dashboard .tv-filter-group {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    .tarvos-dudas-dashboard .tv-filter-group::-webkit-scrollbar { display: none; }
    .tarvos-dudas-dashboard .tv-filter-btn { flex: 0 0 auto; }
    .tarvos-dudas-dashboard .tv-grid-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .course-page .issue-board-panel--course { border-radius: 18px; }
    .thread-attachments,
    .discussion-thread__attachments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .app-content--topnav { width: calc(100% - 16px) !important; padding-top: 18px !important; }
    .tarvos-dudas-dashboard .tv-workbench-header { margin-bottom: 1rem; }
    .tarvos-dudas-dashboard .tv-metrics-band {
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
        gap: 8px !important;
    }
    .tarvos-dudas-dashboard .tv-metric-tile {
        min-width: 0;
        padding: .8rem .75rem;
    }
    .tarvos-dudas-dashboard .tv-metric-label { font-size: .72rem; }
    .tarvos-dudas-dashboard .tv-metric-value { font-size: 1.18rem; }
    .tarvos-dudas-dashboard .tv-metric-hint { display: none; }
    .tarvos-dudas-dashboard .tv-controls-bar {
        border-radius: 14px;
        box-shadow: 0 6px 18px rgba(48,31,91,.045);
    }
    .tarvos-dudas-dashboard .tv-search-wrapper { width: 100%; }
    .tarvos-dudas-dashboard .tv-search-shortcut,
    .tarvos-dudas-dashboard .tv-view-options { display: none; }
    .tarvos-dudas-dashboard .tv-grid-view { grid-template-columns: 1fr; gap: 10px; }
    .tarvos-dudas-dashboard .tv-course-card { padding: 1rem; border-radius: 14px; }
    .tarvos-dudas-dashboard .tv-card-actions { gap: 7px; }
    .tarvos-dudas-dashboard .tv-btn { min-height: 44px; padding: .55rem .72rem; }

    .course-page { gap: 12px !important; }
    .course-page .issue-board-panel--course { border-radius: 14px; }
    .course-page .issue-toolbar--course { padding: 10px !important; }
    .course-page .discussion-thread.issue-row { border-radius: 14px; }
    .course-page .discussion-thread__question { padding: 15px 14px 16px; }
    .course-page .discussion-thread__question-bar {
        align-items: flex-start;
        gap: 8px;
    }
    .course-page .discussion-thread__question-actions { gap: 6px; }
    .course-page .discussion-thread__content { font-size: .95rem; line-height: 1.68; }
    .course-page .discussion-thread__summary-toggle {
        padding: 0;
        grid-template-columns: minmax(0,1fr) !important;
        gap: 10px;
    }
    .course-page .discussion-thread__summary-side {
        width: 100%;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .thread-attachments,
    .discussion-thread__attachments { grid-template-columns: 1fr; }
    .thread-attachment { grid-template-columns: 54px minmax(0,1fr); min-height: 68px; }
    .thread-attachment__thumb,
    .thread-attachment__media { width: 54px !important; height: 54px !important; }

    .media-lightbox--simple { padding: 0 !important; }
    .media-lightbox--simple .media-lightbox__dialog {
        width: 100vw !important;
        height: 100dvh !important;
        border: 0 !important;
        border-radius: 0 !important;
    }
    .media-lightbox--simple .media-lightbox__header { min-height: 58px; padding: 9px 10px 9px 14px; }
    .media-lightbox__heading small { display: none; }
    .media-lightbox--simple .media-lightbox__viewport { padding: 8px; }
    .media-lightbox--simple .media-lightbox__image {
        max-width: calc(100vw - 16px) !important;
        max-height: calc(100dvh - 148px) !important;
    }
    .media-lightbox--simple .media-lightbox__footer {
        min-height: 72px;
        padding: 8px 10px;
        align-items: center;
        flex-direction: row;
        overflow-x: auto;
    }
    .media-lightbox--simple .media-lightbox__actions { flex-wrap: nowrap; }
    .media-lightbox--simple .media-lightbox__action { min-width: 42px; min-height: 42px; }
    .media-lightbox--simple .media-lightbox__external {
        min-height: 42px !important;
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        padding: 0 13px;
        border-radius: 10px;
    }
}

/* === 2026-09 visual simplification: courses, colors and export === */
.tarvos-dudas-dashboard .tv-controls-bar {
    align-items: center;
}
.tarvos-dudas-dashboard .tv-export-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #ddd9ea;
    border-radius: 12px;
    background: #fff;
    color: #2f2a48;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(40,29,73,.04);
}
.tarvos-dudas-dashboard .tv-export-link:hover {
    border-color: var(--tv-violet-300);
    background: var(--tv-violet-50);
    color: var(--tv-violet-800);
}
.tarvos-dudas-dashboard .tv-course-card--simple {
    position: relative;
    display: block;
    padding: 0;
    border: 1px solid #e7e7f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(28,27,52,.045);
    cursor: pointer;
}
.tarvos-dudas-dashboard .tv-course-card--simple::after {
    display: none;
}
.tarvos-dudas-dashboard .tv-course-card__bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--tv-status-bar-color, #16a34a);
}
.tarvos-dudas-dashboard .tv-course-card__content {
    padding: 1.15rem 1.15rem 1rem 1.3rem;
}
.tarvos-dudas-dashboard .tv-card-head-row--simple {
    margin-bottom: .85rem;
}
.tarvos-dudas-dashboard .tv-card-meta--simple {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: .55rem;
}
.tarvos-dudas-dashboard .tv-course-card--simple .tv-subject-tag {
    color: var(--tv-chip-color, var(--tv-subject-color, var(--tv-violet-800)));
    background: color-mix(in srgb, var(--tv-subject-color, #6d3df5) 10%, white);
    border: 1px solid color-mix(in srgb, var(--tv-subject-color, #6d3df5) 24%, white);
}
.tarvos-dudas-dashboard .tv-course-card--simple .tv-course-name {
    font-size: 1.55rem;
    line-height: 1.08;
    margin: 0;
}
.tarvos-dudas-dashboard .tv-course-card--simple .tv-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: .8rem;
    margin-bottom: .95rem;
    background: #fbfbfe;
    border: 1px solid #ececf3;
    border-radius: 14px;
    padding: .9rem;
}
.tarvos-dudas-dashboard .tv-stats-bar--simple .tv-stat-col {
    gap: .2rem;
}
.tarvos-dudas-dashboard .tv-stats-bar--simple .tv-stat-number {
    font-size: 1.6rem;
}
.tarvos-dudas-dashboard .tv-card-actions--single {
    display: flex;
}
.tarvos-dudas-dashboard .tv-card-actions--single .tv-btn-primary {
    width: 100%;
    justify-content: center;
}
.tarvos-dudas-dashboard .tv-course-card--simple:hover {
    border-color: color-mix(in srgb, var(--tv-subject-color, #6d3df5) 35%, #d9d8e4);
    box-shadow: 0 16px 34px rgba(48,31,91,.08);
    transform: translateY(-2px);
}
.tarvos-dudas-dashboard .tv-course-card--simple:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--tv-subject-color, #6d3df5) 30%, white);
    outline-offset: 2px;
}
.tarvos-dudas-dashboard .tv-course-card--simple.has-pending-queries {
    border-color: #f0d8d8;
}
.tarvos-dudas-dashboard .tv-course-card--simple.is-healthy {
    border-color: #d7eadf;
}
.tarvos-dudas-dashboard .tv-list-header {
    display: none !important;
}
.tarvos-dudas-dashboard.is-list-view .tv-grid-view {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
}

.settings-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 16px 0 18px;
}
.settings-shortcut-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid #e6e7ee;
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    color: #22253c;
    box-shadow: 0 8px 20px rgba(28,27,52,.035);
}
.settings-shortcut-card strong {
    font-size: 1rem;
}
.settings-shortcut-card span {
    color: #6c738b;
    font-size: .94rem;
}
.settings-shortcut-card:hover {
    border-color: #d8cff5;
    background: #fcfbff;
    transform: translateY(-1px);
}
.settings-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.settings-color-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e8e8f1;
    border-radius: 16px;
    background: #fbfbfe;
}
.settings-color-card__top {
    display: flex;
    align-items: center;
    gap: 10px;
}
.settings-color-card__dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 3px rgba(255,255,255,.95), 0 0 0 4px rgba(108,114,139,.12);
}
.settings-input--color {
    width: 100%;
    min-height: 46px;
    padding: 6px;
}
.settings-export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.settings-checkbox--block {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
    color: #3f475d;
}
.settings-short-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
@media (max-width: 820px) {
    .settings-shortcuts,
    .settings-color-grid,
    .settings-export-grid {
        grid-template-columns: 1fr;
    }
    .tarvos-dudas-dashboard .tv-view-options,
    .tarvos-dudas-dashboard .tv-export-link {
        width: 100%;
    }
}

/* =========================================================
   Settings workspace v4 — compact, task-oriented navigation
   ========================================================= */
.settings-page--compact {
    display: grid;
    gap: 18px;
    width: 100%;
}

.settings-command-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 4px 2px 10px;
    border-bottom: 1px solid #ececf2;
}

.settings-command-header__copy {
    max-width: 680px;
}

.settings-command-header__copy h2 {
    margin: 4px 0 6px;
    color: #171824;
    font-size: clamp(1.65rem, 2.3vw, 2.15rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.settings-command-header__copy p {
    margin: 0;
    max-width: 620px;
    color: #6f7282;
    font-size: .94rem;
    line-height: 1.55;
}

.settings-command-header__status {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-status-pill {
    display: grid;
    align-content: center;
    gap: 1px;
    min-width: 112px;
    padding: 9px 12px;
    border: 1px solid #e7e8ee;
    border-radius: 12px;
    background: #fff;
}

.settings-status-pill strong {
    color: #303240;
    font-size: .82rem;
    line-height: 1.2;
}

.settings-status-pill small {
    color: #9396a3;
    font-size: .72rem;
}

.settings-status-pill--ok {
    border-color: #d7eee0;
    background: #f6fcf8;
}

.settings-status-pill--attention {
    border-color: #f1dfb9;
    background: #fffaf0;
}

.settings-workspace {
    display: grid;
    grid-template-columns: 222px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.settings-sidebar {
    position: sticky;
    top: 88px;
    z-index: 24;
    display: grid;
    gap: 9px;
    padding: 10px;
    border: 1px solid #e8e8ef;
    border-radius: 16px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 10px 28px rgba(29, 27, 57, .045);
}

.settings-sidebar__label {
    padding: 5px 8px 2px;
    color: #9b9dab;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.settings-sidebar .settings-tabs {
    display: grid !important;
    gap: 4px !important;
}

.settings-sidebar .settings-tab {
    display: grid !important;
    gap: 2px;
    width: 100%;
    min-height: 0 !important;
    padding: 10px 11px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #525565 !important;
    text-align: left;
    transform: none !important;
}

.settings-sidebar .settings-tab strong {
    font-size: .9rem;
    line-height: 1.2;
}

.settings-sidebar .settings-tab small {
    color: #9699a7;
    font-size: .72rem;
    font-weight: 500;
    line-height: 1.35;
}

.settings-sidebar .settings-tab:hover {
    background: #f7f6fb !important;
}

.settings-sidebar .settings-tab.is-active {
    background: #f0ecff !important;
    color: #5938d6 !important;
}

.settings-sidebar .settings-tab.is-active small {
    color: #765fd4;
}

.settings-sidebar__hint {
    margin: 4px 7px 2px;
    color: #a1a3ad;
    font-size: .72rem;
    line-height: 1.45;
}

.settings-main {
    min-width: 0;
}

.settings-page--compact .settings-panel {
    gap: 14px !important;
}

.settings-page--compact .settings-section-heading {
    max-width: none !important;
    gap: 4px;
    margin: 0 0 2px;
}

.settings-page--compact .settings-section-heading .panel__title {
    margin: 2px 0 0;
    font-size: clamp(1.45rem, 2vw, 1.85rem);
    line-height: 1.1;
}

.settings-page--compact .settings-section-heading .panel__text {
    max-width: 760px;
    margin: 2px 0 0;
    font-size: .92rem;
    line-height: 1.5;
}

.settings-section-heading--action {
    display: flex !important;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px !important;
}

.settings-primary-action {
    flex: 0 0 auto;
    min-height: 40px;
}

.settings-page--compact .settings-grid--premium,
.settings-page--compact .settings-grid--access {
    gap: 14px !important;
}

.settings-page--compact .settings-card--premium,
.settings-page--compact .settings-card--premium-soft,
.settings-page--compact .settings-access-panel--premium {
    padding: 18px !important;
    border-radius: 15px !important;
    box-shadow: 0 8px 26px rgba(29, 27, 57, .04) !important;
}

.settings-page--compact .panel__header {
    gap: 12px;
}

.settings-page--compact .panel__title {
    letter-spacing: -.025em;
}

.settings-page--compact .settings-notification-stack {
    gap: 10px;
}

.settings-page--compact .settings-notification-option {
    gap: 14px;
    padding: 14px;
    border-radius: 13px;
}

.settings-page--compact .settings-notification-toggle {
    min-width: 180px;
}

.settings-page--compact .settings-form {
    gap: 12px;
}

.settings-page--compact .settings-input {
    min-height: 42px;
}

.settings-access-summary {
    display: grid;
    grid-template-columns: 1.35fr 1.35fr .72fr .82fr;
    gap: 8px;
    padding: 8px;
    border: 1px solid #e8e8ef;
    border-radius: 15px;
    background: #fff;
}

.settings-access-summary article {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
    padding: 11px 12px;
    border-right: 1px solid #efeff4;
}

.settings-access-summary article:last-child {
    border-right: 0;
}

.settings-access-summary article > span:first-child {
    color: #8f92a0;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.settings-access-summary article > strong {
    overflow-wrap: anywhere;
    color: #262835;
    font-size: 1rem;
    line-height: 1.25;
}

.settings-access-summary article:nth-child(n+3) > strong {
    font-size: 1.35rem;
}

.settings-access-summary small {
    color: #8c8f9d;
    font-size: .75rem;
    line-height: 1.35;
}

.settings-access-flow-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 15px;
    border: 1px solid #e4e5ec;
    border-radius: 14px;
    background: #fafafe;
}

.settings-access-flow-note.is-ok {
    border-color: #d9ebdf;
    background: #f6fbf7;
}

.settings-access-flow-note.is-warning {
    border-color: #f0dfbb;
    background: #fffaf1;
}

.settings-access-flow-note strong {
    display: block;
    margin-bottom: 2px;
    color: #292b37;
    font-size: .9rem;
}

.settings-access-flow-note p {
    margin: 0;
    max-width: 820px;
    color: #6e7180;
    font-size: .83rem;
    line-height: 1.45;
}

.settings-access-flow-note__source {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.8);
    color: #676a78;
    font-size: .75rem;
    font-weight: 800;
}

.settings-grid--access-compact {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr) !important;
    align-items: start;
}

.settings-access-search-card .settings-access-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.settings-access-search-card .settings-access-search label {
    min-width: 0;
}

.settings-collapsible-card {
    padding: 0 !important;
    overflow: hidden;
}

.settings-collapsible-card > summary,
.settings-technical-details > summary {
    list-style: none;
    cursor: pointer;
}

.settings-collapsible-card > summary::-webkit-details-marker,
.settings-technical-details > summary::-webkit-details-marker {
    display: none;
}

.settings-collapsible-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 18px;
}

.settings-collapsible-card > summary > div {
    display: grid;
    gap: 3px;
}

.settings-collapsible-card > summary strong {
    color: #2c2e3a;
    font-size: .95rem;
}

.settings-collapsible-card > summary small {
    color: #9295a2;
    font-size: .76rem;
}

.settings-collapsible-card__toggle {
    flex: 0 0 auto;
    color: #6947e6;
    font-size: .78rem;
    font-weight: 800;
}

.settings-collapsible-card[open] .settings-collapsible-card__toggle::before {
    content: 'Ocultar';
}

.settings-collapsible-card[open] .settings-collapsible-card__toggle {
    font-size: 0;
}

.settings-collapsible-card[open] .settings-collapsible-card__toggle::before {
    font-size: .78rem;
}

.settings-collapsible-card__body {
    padding: 0 18px 18px;
    border-top: 1px solid #eeeeF4;
}

.settings-technical-details {
    overflow: hidden;
    border: 1px solid #e9e9ef;
    border-radius: 13px;
    background: #fbfbfd;
}

.settings-technical-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    color: #666978;
}

.settings-technical-details > summary span {
    font-size: .82rem;
    font-weight: 800;
}

.settings-technical-details > summary small {
    color: #a0a2ad;
    font-size: .73rem;
}

.settings-technical-details__body {
    padding: 0 14px 14px;
}

.settings-technical-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
}

.settings-technical-grid > div {
    min-width: 0;
    padding: 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #eeeeF3;
}

.settings-technical-grid dt {
    margin-bottom: 3px;
    color: #9a9ca8;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.settings-technical-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #444653;
    font-size: .78rem;
    font-weight: 700;
}

.settings-page--compact .settings-table th,
.settings-page--compact .settings-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.settings-page--compact .settings-topic-group,
.settings-page--compact .settings-staff-card {
    border-radius: 14px !important;
}

.settings-page--compact .settings-topic-group__body,
.settings-page--compact .settings-staff-form {
    gap: 12px;
}

.settings-page--compact .settings-activity-top5__item {
    min-height: 0;
    padding: 12px;
}

html[data-theme='dark'] .settings-command-header {
    border-bottom-color: rgba(255,255,255,.1);
}

html[data-theme='dark'] .settings-command-header__copy h2,
html[data-theme='dark'] .settings-status-pill strong,
html[data-theme='dark'] .settings-access-summary article > strong,
html[data-theme='dark'] .settings-access-flow-note strong,
html[data-theme='dark'] .settings-collapsible-card > summary strong {
    color: #f4f4f8;
}

html[data-theme='dark'] .settings-command-header__copy p,
html[data-theme='dark'] .settings-status-pill small,
html[data-theme='dark'] .settings-sidebar .settings-tab small,
html[data-theme='dark'] .settings-access-summary small,
html[data-theme='dark'] .settings-access-flow-note p {
    color: #aeb0bd;
}

html[data-theme='dark'] .settings-sidebar,
html[data-theme='dark'] .settings-status-pill,
html[data-theme='dark'] .settings-access-summary,
html[data-theme='dark'] .settings-collapsible-card,
html[data-theme='dark'] .settings-technical-grid > div {
    border-color: rgba(255,255,255,.1);
    background: #1d1e28;
}

html[data-theme='dark'] .settings-sidebar .settings-tab:hover,
html[data-theme='dark'] .settings-sidebar .settings-tab.is-active,
html[data-theme='dark'] .settings-technical-details,
html[data-theme='dark'] .settings-access-flow-note {
    background: #242531 !important;
}

@media (max-width: 980px) {
    .settings-command-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }
    .settings-command-header__status {
        justify-content: flex-start;
    }
    .settings-workspace {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .settings-sidebar {
        top: 76px;
        display: block;
        overflow-x: auto;
        padding: 7px;
        scrollbar-width: thin;
    }
    .settings-sidebar__label,
    .settings-sidebar__hint {
        display: none;
    }
    .settings-sidebar .settings-tabs {
        display: flex !important;
        width: max-content;
        min-width: 100%;
    }
    .settings-sidebar .settings-tab {
        width: auto;
        min-width: 138px !important;
        padding: 9px 12px !important;
    }
    .settings-technical-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .settings-command-header {
        padding-top: 0;
    }
    .settings-command-header__status {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .settings-status-pill {
        flex: 0 0 auto;
        min-width: 108px;
    }
    .settings-sidebar {
        top: 0;
        position: sticky;
        border-radius: 12px;
    }
    .settings-sidebar .settings-tab small {
        display: none;
    }
    .settings-sidebar .settings-tab {
        min-width: auto !important;
        padding: 9px 12px !important;
    }
    .settings-section-heading--action {
        align-items: stretch;
        flex-direction: column;
    }
    .settings-primary-action {
        width: 100%;
    }
    .settings-page--compact .settings-grid--premium,
    .settings-page--compact .settings-grid--access,
    .settings-grid--access-compact {
        grid-template-columns: 1fr !important;
    }
    .settings-access-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .settings-access-summary article {
        border-right: 0;
        border-bottom: 1px solid #efeff4;
    }
    .settings-access-summary article:nth-last-child(-n+2) {
        border-bottom: 0;
    }
    .settings-access-flow-note {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }
    .settings-access-search-card .settings-access-search {
        grid-template-columns: 1fr;
    }
    .settings-access-search-card .settings-access-search .topbar-button {
        width: 100%;
    }
    .settings-technical-details > summary {
        align-items: flex-start;
        flex-direction: column;
    }
    .settings-page--compact .settings-notification-option {
        align-items: stretch;
        flex-direction: column;
    }
    .settings-page--compact .settings-notification-toggle {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 460px) {
    .settings-command-header__copy h2 {
        font-size: 1.55rem;
    }
    .settings-command-header__copy p {
        font-size: .86rem;
    }
    .settings-access-summary {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 5px;
    }
    .settings-access-summary article {
        padding: 9px;
    }
    .settings-technical-grid {
        grid-template-columns: 1fr;
    }
    .settings-page--compact .settings-card--premium,
    .settings-page--compact .settings-card--premium-soft,
    .settings-page--compact .settings-access-panel--premium {
        padding: 14px !important;
    }
}

/* === 2026-09-14 v5: student-first course directory + doubt workspace === */
/* Course cards: equal visual rhythm and actions aligned in every row. */
.tarvos-dudas-dashboard .tv-grid-view {
    align-items: stretch;
}
.tarvos-dudas-dashboard .tv-course-card--simple {
    height: 100%;
    min-height: 268px;
}
.tarvos-dudas-dashboard .tv-course-card--simple .tv-course-card__content {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    min-height: 268px;
}
.tarvos-dudas-dashboard .tv-course-card--simple .tv-card-head-row--simple {
    min-height: 76px;
}
.tarvos-dudas-dashboard .tv-course-card--simple .tv-card-meta--simple {
    min-height: 27px;
    align-items: center;
}
.tarvos-dudas-dashboard .tv-course-card--simple .tv-course-name {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.tarvos-dudas-dashboard .tv-course-card--simple .tv-stats-bar {
    align-self: end;
}
.tarvos-dudas-dashboard .tv-course-card--simple .tv-card-actions--single {
    align-self: end;
    margin-top: 0;
}
.tarvos-dudas-dashboard .tv-course-card--simple .tv-card-actions--single .tv-btn-primary {
    min-height: 46px;
}

/* Course page: compact, task-first header. */
.course-page.course-page--focus {
    display: grid;
    gap: 14px !important;
}
.course-focus-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(18px, 3vw, 36px);
    align-items: end;
    padding: clamp(18px, 2.6vw, 26px) clamp(18px, 3vw, 30px);
    border: 1px solid #e5e7ef;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(37, 31, 67, .045);
}
.course-focus-head__main {
    min-width: 0;
    display: grid;
    gap: 11px;
}
.course-focus-back {
    width: fit-content;
    color: #625b75;
    font-size: .86rem;
    font-weight: 750;
    text-decoration: none;
}
.course-focus-back:hover,
.course-focus-back:focus-visible {
    color: var(--tv-violet-800);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.course-focus-title-row {
    min-width: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
}
.course-focus-title-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}
.course-focus-eyebrow,
.course-workspace-head__eyebrow {
    color: var(--tv-violet-700);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.course-focus-title {
    margin: 0;
    color: #17182a;
    font-size: clamp(1.75rem, 3.3vw, 2.65rem);
    line-height: 1.04;
    letter-spacing: -.045em;
    text-wrap: balance;
}
.course-focus-help {
    max-width: 72ch;
    margin: 0;
    color: #646a7e;
    font-size: .94rem;
    line-height: 1.55;
}
.course-focus-stats {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}
.course-focus-stat {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    border: 1px solid #e5e5ed;
    border-radius: 999px;
    background: #f8f8fb;
    color: #656a7b;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.course-focus-stat strong {
    color: #26263a;
    font-size: .92rem;
}
.course-focus-stat.is-pending {
    border-color: #f2d5d9;
    background: #fff6f7;
    color: #a23c49;
}
.course-focus-stat.is-pending strong {
    color: #b42335;
}
.course-focus-actions {
    display: grid;
    gap: 8px;
    min-width: 190px;
}
.course-focus-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font: inherit;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
.course-focus-action--primary {
    border-color: #6841df;
    background: linear-gradient(180deg, #7546ef, #6536dd);
    color: #fff;
    box-shadow: 0 9px 20px rgba(109,61,245,.18);
}
.course-focus-action--primary:hover,
.course-focus-action--primary:focus-visible {
    background: #5f31d4;
    color: #fff;
}
.course-focus-action--secondary {
    border-color: #dedbea;
    background: #fff;
    color: #3f3a52;
}
.course-focus-action--secondary:hover,
.course-focus-action--secondary:focus-visible {
    border-color: #cfc4f0;
    background: #faf8ff;
    color: #5b34cf;
}
.course-lock-panel--focus {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid #e5e7ef;
    border-radius: 14px;
    background: #fbfbfd;
    color: #656a7c;
    font-size: .88rem;
}
.course-lock-panel--focus strong {
    color: #2f3042;
}

/* A single clean workspace instead of several oversized nested cards. */
.course-page .issue-board-panel--course {
    overflow: hidden;
    padding: 0 !important;
    border: 1px solid #e4e5ed !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 10px 32px rgba(37,31,67,.04) !important;
}
.course-workspace-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px 12px;
}
.course-workspace-head > div {
    display: grid;
    gap: 4px;
}
.course-workspace-head h2 {
    margin: 0;
    color: #1c1d30;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.15;
    letter-spacing: -.025em;
}
.course-workspace-head p {
    max-width: 76ch;
    margin: 0;
    color: #74798c;
    font-size: .86rem;
    line-height: 1.5;
}

.course-page .course-toolbar-v2 {
    display: grid !important;
    gap: 10px !important;
    margin: 0;
    padding: 10px 18px 12px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.course-page .course-toolbar-v2__searchline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.course-page .course-search-field {
    position: relative;
    width: 100%;
    max-width: none;
}
.course-page .course-search-field__icon {
    position: absolute;
    z-index: 1;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    color: #85899a;
    transform: translateY(-50%);
    pointer-events: none;
}
.course-page .course-search-field input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px 0 42px !important;
    border: 1px solid #e1e2e9 !important;
    border-radius: 13px !important;
    background: #fbfbfd !important;
    color: #252638;
    box-shadow: none !important;
}
.course-page .course-search-field input:hover {
    border-color: #d7d1e9 !important;
}
.course-page .course-search-field input:focus {
    border-color: var(--tv-violet-500) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(109,61,245,.10) !important;
}
.course-page .course-toolbar-v2__actions {
    display: flex !important;
    align-items: center;
    gap: 8px;
}
.course-page .course-toolbar-v2__actions > *,
.course-page .course-toolbar-v2__actions form {
    width: auto;
}
.course-page .course-toolbar-v2__actions .topbar-button {
    min-height: 44px;
    white-space: nowrap;
}

/* Filters stay in one deliberate horizontal strip; never a left-hand vertical column. */
.course-page .course-filter-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}
.course-page .course-filter-strip__label {
    padding: 0 3px 0 1px;
    color: #808596;
    font-size: .76rem;
    font-weight: 800;
}
.course-page .course-filter-chip {
    min-width: 0;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px 0 11px;
    border: 1px solid #e2e3ea;
    border-radius: 999px;
    background: #fff;
    box-shadow: none;
}
.course-page .course-filter-chip > span {
    color: #777c8e;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}
.course-page .course-filter-chip .issue-select {
    width: auto;
    min-width: 0;
    min-height: 36px;
    margin: 0;
    padding: 0 30px 0 2px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background-color: transparent !important;
    color: #313244;
    font-size: .79rem;
    font-weight: 750;
    box-shadow: none !important;
}
.course-page .course-filter-chip:focus-within {
    border-color: #c9bcf1;
    box-shadow: 0 0 0 3px rgba(109,61,245,.08);
}
.course-page .course-results-summary {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    padding: 0 20px 10px !important;
    border: 0 !important;
    background: transparent !important;
    color: #7b8091;
    font-size: .8rem;
}
.course-page .course-results-summary strong {
    color: #36374a;
    font-size: .86rem;
}

/* Discussion layout: calmer list/detail split with more room for the actual answer. */
.course-page .course-mail-shell {
    grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
    margin: 0 16px 16px;
    border: 1px solid #e5e6ed;
    border-radius: 16px;
    box-shadow: none;
}
.course-page .course-mail-inbox {
    background: #fbfbfd;
}
.course-page .course-mail-inbox__head {
    min-height: 58px;
    padding: 12px 14px;
    background: #fff;
}
.course-page .course-mail-inbox__head span:not(.course-mail-inbox__count) {
    display: none;
}
.course-page .course-mail-inbox__list {
    gap: 7px;
    padding: 9px;
}
.course-page .course-mail-item {
    gap: 5px;
    padding: 11px 12px 11px 13px;
    border-radius: 13px;
    box-shadow: none;
}
.course-page .course-mail-item:hover {
    transform: none;
    box-shadow: 0 5px 14px rgba(48,31,91,.05);
}
.course-page .course-mail-item.is-active {
    box-shadow: none;
}
.course-page .course-mail-item__preview {
    -webkit-line-clamp: 1;
}
.course-page .course-mail-detail {
    background: #fff;
}
.course-page .course-mail-detail .discussion-thread__question {
    padding: 22px 26px 18px;
}
.course-page .course-mail-detail .discussion-thread__responses {
    padding-left: 26px;
    padding-right: 26px;
}
.course-page .course-mail-detail .discussion-thread__title {
    font-size: clamp(1.14rem, 1.7vw, 1.45rem);
}

.course-mobile-compose {
    display: none;
}

/* The composer is part of the main student workflow: keep it clean and roomy. */
.course-page .composer-modal__dialog {
    width: min(900px, calc(100vw - 32px));
    max-height: min(88dvh, 900px);
    border-radius: 20px;
}
.course-page .composer-card-saas__editor {
    min-height: 190px;
    font-size: 1rem;
    line-height: 1.65;
}

@media (max-width: 980px) {
    .course-focus-head {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .course-focus-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
    }
    .course-focus-actions > :only-child {
        grid-column: 1 / -1;
    }
    .course-page .course-mail-shell {
        margin-inline: 12px;
    }
}

@media (max-width: 720px) {
    .course-page.course-page--focus {
        gap: 10px !important;
        padding-bottom: 72px;
    }
    .course-focus-head {
        gap: 14px;
        padding: 15px 14px 16px;
        border-radius: 16px;
    }
    .course-focus-back {
        font-size: .82rem;
    }
    .course-focus-title-row {
        display: grid;
        gap: 10px;
    }
    .course-focus-title {
        font-size: clamp(1.55rem, 8vw, 2.05rem);
    }
    .course-focus-help {
        font-size: .88rem;
        line-height: 1.5;
    }
    .course-focus-stats {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .course-focus-stats::-webkit-scrollbar { display: none; }
    .course-focus-stat {
        flex: 0 0 auto;
        min-height: 34px;
    }
    .course-focus-actions {
        grid-template-columns: 1fr;
    }
    .course-focus-actions .course-focus-action--primary {
        display: none;
    }
    .course-lock-panel--focus {
        display: grid;
        gap: 3px;
        padding: 11px 13px;
    }

    .course-page .issue-board-panel--course {
        border-radius: 15px !important;
    }
    .course-workspace-head {
        padding: 15px 13px 8px;
    }
    .course-workspace-head h2 {
        font-size: 1.18rem;
    }
    .course-workspace-head p {
        font-size: .82rem;
    }
    .course-page .course-toolbar-v2 {
        gap: 8px !important;
        padding: 8px 10px 9px !important;
    }
    .course-page .course-toolbar-v2__searchline {
        grid-template-columns: minmax(0, 1fr);
    }
    .course-page .course-toolbar-v2__actions {
        display: none !important;
    }
    .course-page .course-search-field input {
        min-height: 44px;
        font-size: .95rem;
    }
    .course-page .course-filter-strip {
        width: calc(100% + 20px);
        margin-inline: -10px;
        padding: 0 10px 3px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .course-page .course-filter-strip::-webkit-scrollbar { display: none; }
    .course-page .course-filter-strip__label {
        display: none;
    }
    .course-page .course-filter-chip {
        flex: 0 0 auto;
        min-height: 38px;
    }
    .course-page .course-results-summary {
        padding: 0 12px 8px !important;
    }
    .course-page .course-mail-shell {
        min-height: 0;
        margin: 0 8px 8px;
        border-radius: 13px;
    }
    .course-page .course-mail-inbox {
        min-height: 0;
    }
    .course-page .course-mail-inbox__head {
        min-height: 52px;
        padding: 10px 11px;
    }
    .course-page .course-mail-inbox__list {
        padding: 7px;
    }
    .course-page .course-mail-item {
        padding: 11px;
        border-radius: 12px;
    }
    .course-page .course-mail-item__preview {
        -webkit-line-clamp: 2;
    }
    .course-page .course-mail-detail {
        min-height: 0;
    }
    .course-page .course-mail-mobile-bar {
        top: 0;
    }
    .course-page .course-mail-detail .discussion-thread__question,
    .course-page .course-mail-detail .discussion-thread__responses {
        padding-left: 13px;
        padding-right: 13px;
    }

    .course-mobile-compose {
        position: fixed;
        z-index: 900;
        left: 12px;
        right: 12px;
        bottom: max(10px, env(safe-area-inset-bottom));
        display: block;
        pointer-events: none;
    }
    .course-mobile-compose__button {
        width: 100%;
        min-height: 50px;
        border: 1px solid #6335dc;
        border-radius: 14px;
        background: linear-gradient(180deg, #7546ef, #6536dd);
        color: #fff;
        font: inherit;
        font-size: .95rem;
        font-weight: 850;
        box-shadow: 0 14px 34px rgba(62, 42, 112, .27);
        pointer-events: auto;
    }

    .course-page .composer-modal {
        padding: 0 !important;
    }
    .course-page .composer-modal__dialog {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }
    .course-page .composer-modal__header {
        position: sticky;
        top: 0;
        z-index: 4;
        background: rgba(255,255,255,.97);
        backdrop-filter: blur(12px);
    }
    .course-page .composer-card-saas__editor {
        min-height: 170px;
    }
}

@media (max-width: 640px) {
    .tarvos-dudas-dashboard .tv-course-card--simple {
        min-height: 236px;
    }
    .tarvos-dudas-dashboard .tv-course-card--simple .tv-course-card__content {
        min-height: 236px;
    }
    .tarvos-dudas-dashboard .tv-course-card--simple .tv-card-head-row--simple {
        min-height: 64px;
    }
    .tarvos-dudas-dashboard .tv-course-card--simple .tv-course-name {
        font-size: 1.28rem;
    }
}

/* Keep the dashboard shrinkable inside the top-nav CSS grid on narrow screens. */
.app-content--topnav {
    grid-template-columns: minmax(0, 1fr);
}
.tarvos-dudas-dashboard {
    width: 100%;
    min-width: 0;
}
.tarvos-dudas-dashboard .tv-workbench-header,
.tarvos-dudas-dashboard .tv-header-row,
.tarvos-dudas-dashboard .tv-metrics-band,
.tarvos-dudas-dashboard .tv-controls-bar,
.tarvos-dudas-dashboard .tv-courses-container,
.tarvos-dudas-dashboard .tv-grid-view {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 720px) {
    .course-page .course-filter-strip {
        width: 100%;
        margin-inline: 0;
        padding: 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        overflow: visible;
    }
    .course-page .course-filter-chip {
        width: 100%;
        min-width: 0;
        justify-content: space-between;
        padding-left: 10px;
    }
    .course-page .course-filter-chip .issue-select {
        max-width: 68%;
        text-overflow: ellipsis;
    }
}

@media (max-width: 360px) {
    .course-page .course-filter-strip {
        grid-template-columns: 1fr;
    }
    .course-page .course-filter-chip .issue-select {
        max-width: 72%;
    }
}

@media (max-width: 640px) {
    .tarvos-dudas-dashboard .tv-search-wrapper {
        flex: 0 0 auto;
        min-height: 0;
    }
    .tarvos-dudas-dashboard .tv-controls-bar {
        min-height: 0;
    }
}

/* =========================================================
   V6 — adjuntos e imagen: visor inmersivo, centrado y táctil
   ========================================================= */
.thread-attachment--image {
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start;
    max-width: 320px;
    padding: 7px !important;
}
.thread-attachment--image .thread-attachment__thumb {
    width: 100% !important;
    height: clamp(128px, 16vw, 178px) !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #f5f3f9 !important;
}
.thread-attachment--image .thread-attachment__thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background:
        linear-gradient(45deg, rgba(109,61,245,.022) 25%, transparent 25%, transparent 75%, rgba(109,61,245,.022) 75%),
        linear-gradient(45deg, rgba(109,61,245,.022) 25%, #fff 25%, #fff 75%, rgba(109,61,245,.022) 75%);
    background-position: 0 0, 8px 8px;
    background-size: 16px 16px;
}
.thread-attachment--image .thread-attachment__meta {
    padding: 6px 5px 3px;
}
.thread-attachment--image .thread-attachment__meta strong {
    max-width: 100% !important;
}

body.has-media-lightbox {
    overflow: hidden !important;
    overscroll-behavior: none;
}
.media-lightbox[hidden] { display: none !important; }
.media-lightbox--image-viewer {
    position: fixed !important;
    inset: 0 !important;
    z-index: 6000 !important;
    display: grid !important;
    place-items: stretch !important;
    padding: 0 !important;
    color: #fff;
}
.media-lightbox--image-viewer .media-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 10, 16, .94) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.media-lightbox--image-viewer .media-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: 100vw !important;
    height: 100dvh !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.media-lightbox--image-viewer .media-lightbox__header {
    position: relative;
    z-index: 6;
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px max(14px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
    border: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
    background: rgba(17,18,27,.80) !important;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.media-lightbox--image-viewer .media-lightbox__heading {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.media-lightbox--image-viewer .media-lightbox__heading strong {
    max-width: min(54vw, 720px);
    overflow: hidden;
    color: #fff !important;
    font-size: .95rem;
    font-weight: 780;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.media-lightbox--image-viewer .media-lightbox__heading small {
    color: rgba(255,255,255,.58) !important;
    font-size: .78rem;
}
.media-lightbox__header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.media-lightbox__counter {
    min-width: 44px;
    color: rgba(255,255,255,.72);
    font-size: .82rem;
    font-weight: 750;
    text-align: center;
}
.media-lightbox--image-viewer .media-lightbox__open-original,
.media-lightbox--image-viewer .media-lightbox__close {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.16) !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.08) !important;
    color: #fff !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
.media-lightbox--image-viewer .media-lightbox__open-original {
    padding: 0 13px;
    font-size: .82rem;
    font-weight: 780;
}
.media-lightbox--image-viewer .media-lightbox__close {
    position: static !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    font-size: 1.45rem !important;
    line-height: 1;
}
.media-lightbox--image-viewer .media-lightbox__open-original:hover,
.media-lightbox--image-viewer .media-lightbox__close:hover {
    background: rgba(255,255,255,.16) !important;
    border-color: rgba(255,255,255,.28) !important;
}
.media-lightbox--image-viewer .media-lightbox__viewport {
    position: relative;
    min-height: 0;
    display: block !important;
    overflow: hidden !important;
    padding: 0 !important;
    background:
        radial-gradient(circle at 50% 45%, rgba(122,92,230,.10), transparent 36rem),
        #0d0e15 !important;
    outline: 0;
    touch-action: none;
    user-select: none;
}
.media-lightbox--image-viewer .media-lightbox__canvas,
.media-lightbox--image-viewer .media-lightbox__image-frame {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
}
.media-lightbox--image-viewer .media-lightbox__image-frame {
    transform-origin: 50% 50% !important;
    will-change: transform;
}
.media-lightbox--image-viewer .media-lightbox__image {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: contain !important;
    transform-origin: 50% 50% !important;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 3px !important;
    box-shadow: 0 16px 54px rgba(0,0,0,.42);
    transition: opacity .16s ease;
}
.media-lightbox--image-viewer .media-lightbox__image.is-loading { opacity: .14; }
.media-lightbox--image-viewer .media-lightbox__loading,
.media-lightbox--image-viewer .media-lightbox__error {
    position: absolute;
    z-index: 8;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: min(88vw, 420px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    background: rgba(25,26,37,.88) !important;
    color: rgba(255,255,255,.86) !important;
    box-shadow: 0 18px 50px rgba(0,0,0,.32);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.media-lightbox--image-viewer .media-lightbox__loading[hidden],
.media-lightbox--image-viewer .media-lightbox__error[hidden] { display: none !important; }
.media-lightbox--image-viewer .media-lightbox__error {
    flex-direction: column;
    text-align: center;
}
.media-lightbox--image-viewer .media-lightbox__error strong { color: #fff; }
.media-lightbox--image-viewer .media-lightbox__error span { color: rgba(255,255,255,.64); font-size: .86rem; }
.media-lightbox--image-viewer .media-lightbox__loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.24);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tarvos-spin .7s linear infinite;
}
.media-lightbox--image-viewer .media-lightbox__nav {
    position: absolute;
    z-index: 7;
    top: 50%;
    width: 48px;
    height: 58px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: rgba(19,20,29,.58);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    box-shadow: 0 10px 30px rgba(0,0,0,.16);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.media-lightbox--image-viewer .media-lightbox__nav[hidden] { display: none !important; }
.media-lightbox--image-viewer .media-lightbox__nav--prev { left: 14px; }
.media-lightbox--image-viewer .media-lightbox__nav--next { right: 14px; }
.media-lightbox--image-viewer .media-lightbox__nav:hover { background: rgba(255,255,255,.15); }
.media-lightbox--image-viewer .media-lightbox__footer {
    position: relative;
    z-index: 6;
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px max(12px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border: 0 !important;
    border-top: 1px solid rgba(255,255,255,.10) !important;
    background: rgba(17,18,27,.82) !important;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.media-lightbox--image-viewer .media-lightbox__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 15px;
    background: rgba(255,255,255,.06);
}
.media-lightbox--image-viewer .media-lightbox__action {
    min-width: 42px;
    min-height: 42px;
    display: inline-grid;
    place-items: center;
    padding: 0 11px;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #fff !important;
    font-size: 1.12rem;
    font-weight: 800;
    box-shadow: none !important;
}
.media-lightbox--image-viewer .media-lightbox__action--fit { font-size: .82rem; }
.media-lightbox--image-viewer .media-lightbox__action:hover { background: rgba(255,255,255,.12) !important; }
.media-lightbox--image-viewer .media-lightbox__zoom-label {
    min-width: 52px;
    color: rgba(255,255,255,.78);
    font-size: .80rem;
    font-variant-numeric: tabular-nums;
    font-weight: 760;
    text-align: center;
}
.media-lightbox--image-viewer .media-lightbox__separator {
    width: 1px;
    height: 26px;
    margin: 0 2px;
    background: rgba(255,255,255,.12);
}
.media-lightbox--image-viewer .media-lightbox__viewport.is-zoomed { cursor: grab; }
.media-lightbox--image-viewer .media-lightbox__viewport.is-panning { cursor: grabbing; }

@media (max-width: 700px) {
    .thread-attachment--image { max-width: none; }
    .thread-attachment--image .thread-attachment__thumb { height: min(54vw, 210px) !important; }
    .media-lightbox--image-viewer .media-lightbox__header {
        min-height: 58px;
        padding-top: max(8px, env(safe-area-inset-top));
    }
    .media-lightbox--image-viewer .media-lightbox__heading strong { max-width: 52vw; font-size: .88rem; }
    .media-lightbox--image-viewer .media-lightbox__heading small { display: none; }
    .media-lightbox--image-viewer .media-lightbox__open-original { display: none; }
    .media-lightbox--image-viewer .media-lightbox__counter { min-width: 34px; font-size: .76rem; }
    .media-lightbox--image-viewer .media-lightbox__close { width: 44px !important; height: 44px !important; }
    .media-lightbox--image-viewer .media-lightbox__nav {
        top: auto;
        bottom: 10px;
        width: 44px;
        height: 44px;
        transform: none;
        border-radius: 999px;
        font-size: 1.6rem;
        opacity: .88;
    }
    .media-lightbox--image-viewer .media-lightbox__nav--prev { left: 10px; }
    .media-lightbox--image-viewer .media-lightbox__nav--next { right: 10px; }
    .media-lightbox--image-viewer .media-lightbox__footer {
        min-height: 64px;
        justify-content: center;
    }
    .media-lightbox--image-viewer .media-lightbox__actions { gap: 3px; padding: 4px; }
    .media-lightbox--image-viewer .media-lightbox__action { min-width: 40px; min-height: 42px; padding: 0 8px; }
    .media-lightbox--image-viewer .media-lightbox__zoom-label { min-width: 46px; }
}

/* ========================================================================== 
   Conversation UX v7 — question-first, tutor-forward and search with context
   ========================================================================== */

/* Home search now explains exactly which doubts matched. */
.tarvos-dudas-dashboard .tv-course-card.has-search-matches {
    min-height: 0;
    height: auto;
    border-color: #cfd6df;
    box-shadow: 0 12px 30px rgba(22, 29, 37, .07);
}
.tarvos-dudas-dashboard .tv-course-card.has-search-matches .tv-course-card__content {
    min-height: 0;
    height: auto;
    grid-template-rows: auto auto auto auto;
}
.tv-course-search-matches {
    display: grid;
    gap: 7px;
    margin: 11px 0 2px;
    padding-top: 11px;
    border-top: 1px solid #e5e8ed;
}
.tv-course-search-matches[hidden] { display: none !important; }
.tv-course-search-matches__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: #687180;
    font-size: .74rem;
}
.tv-course-search-matches__header strong {
    color: #222a35;
    font-size: .79rem;
}
.tv-course-search-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 8px;
    padding: 9px 10px;
    border: 1px solid #e4e8ed;
    border-radius: 11px;
    background: #fafbfc;
    color: #222a35;
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.tv-course-search-result:hover,
.tv-course-search-result:focus-visible {
    border-color: #b9c4cf;
    background: #fff;
    transform: translateY(-1px);
    outline: none;
}
.tv-course-search-result__badge {
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: 1px;
    padding: 3px 6px;
    border-radius: 999px;
    background: #eef2f5;
    color: #5d6773;
    font-size: .64rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.tv-course-search-result__badge.is-answered { background: #e9f8f0; color: #13734a; }
.tv-course-search-result__badge.is-pending { background: #fff3e6; color: #9a5a00; }
.tv-course-search-result strong {
    min-width: 0;
    overflow: hidden;
    color: #171d26;
    font-size: .82rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tv-course-search-result > span:last-child:not(.tv-course-search-result__badge) {
    min-width: 0;
    overflow: hidden;
    color: #717b88;
    font-size: .74rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tv-course-search-matches__more {
    padding: 3px 2px;
    color: #394451;
    font-size: .76rem;
    font-weight: 800;
    text-decoration: none;
}
.tv-course-search-matches__more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Tutor becomes an explicit first stop for students, without competing with the forum. */
.course-tutor-spotlight {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 17px 20px;
    border: 1px solid #d9e5df;
    border-radius: 18px;
    background: linear-gradient(135deg, #f7fbf9 0%, #fff 62%);
    box-shadow: 0 9px 30px rgba(25, 71, 51, .055);
}
.course-tutor-spotlight::after {
    content: '';
    position: absolute;
    right: -70px;
    top: -100px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, .09), rgba(34, 197, 94, 0) 70%);
    pointer-events: none;
}
.course-tutor-spotlight__icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #153f31;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 8px 20px rgba(21, 63, 49, .16);
}
.course-tutor-spotlight__copy { min-width: 0; display: grid; gap: 3px; }
.course-tutor-spotlight__eyebrow {
    color: #247552;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.course-tutor-spotlight h2 {
    margin: 0;
    color: #15231e;
    font-size: 1.05rem;
    line-height: 1.25;
    letter-spacing: -.015em;
}
.course-tutor-spotlight p {
    max-width: 78ch;
    margin: 0;
    color: #617068;
    font-size: .82rem;
    line-height: 1.45;
}
.course-tutor-spotlight__action {
    position: relative;
    z-index: 1;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border-radius: 11px;
    background: #153f31;
    color: #fff;
    font-size: .84rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}
.course-tutor-spotlight__action:hover,
.course-tutor-spotlight__action:focus-visible { background: #0f3327; color: #fff; outline: 3px solid rgba(21,63,49,.13); }

/* A search from the course directory stays visible after entering a course. */
.course-search-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid #dce3e8;
    border-radius: 11px;
    background: #f7f9fa;
    color: #535f6b;
    font-size: .8rem;
}
.course-search-context[hidden] { display: none !important; }
.course-search-context strong { color: #18202a; }
.course-search-context button {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #283541;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Neutral conversation canvas: no lavender wash behind student questions. */
.course-page .course-mail-shell {
    background: #f4f6f8;
    border-color: #dfe4e9;
}
.course-page .course-mail-inbox { background: #f4f6f8; }
.course-page .course-mail-detail { background: #f7f8fa; }
.course-page .course-mail-item {
    border: 1px solid transparent;
    background: transparent;
    color: #27303b;
}
.course-page .course-mail-item:hover {
    border-color: #dde2e7;
    background: #fff;
}
.course-page .course-mail-item.is-active {
    border-color: #cbd3da !important;
    background: #fff !important;
    box-shadow: inset 3px 0 0 #1d2935, 0 5px 16px rgba(26,35,45,.055) !important;
}
.course-page .course-mail-item.is-active .course-mail-item__title { color: #121923; }
.course-page .course-mail-item.is-active .course-mail-item__preview { color: #69737e; }
.course-page .course-mail-item__state {
    border-radius: 999px;
    padding: 3px 6px;
    background: #edf1f4;
    color: #66717c;
    font-weight: 800;
}
.course-page .course-mail-item.is-pending .course-mail-item__state { background: #fff1dd; color: #9b5d08; }
.course-page .course-mail-item.is-answered .course-mail-item__state { background: #e8f7ef; color: #16724a; }

.course-page .course-mail-detail [data-question-card] {
    min-height: 100%;
    background: transparent !important;
}
.course-page .course-mail-detail .discussion-thread__question {
    position: relative;
    margin: 18px 18px 0;
    padding: 23px 24px 22px !important;
    border: 1px solid #e0e4e8 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 5px 18px rgba(22, 31, 40, .04) !important;
}
.course-page .course-mail-detail .discussion-thread__question::before {
    content: 'Pregunta del estudiante';
    display: block;
    margin: 0 0 10px;
    color: #77808a;
    font-size: .69rem;
    font-weight: 900;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.course-page .discussion-thread__question-bar { margin-bottom: 12px; }
.course-page .discussion-thread__title {
    color: #111821;
    line-height: 1.28;
    letter-spacing: -.026em;
}
.course-page .discussion-thread__meta { color: #7b8490; }
.course-page .discussion-thread__content {
    color: #2a333e;
    font-size: .96rem;
    line-height: 1.72;
}
.course-page .discussion-thread__separator {
    margin: 22px 26px 14px;
    color: #8a929b;
}
.course-page .discussion-thread__separator::before,
.course-page .discussion-thread__separator::after { border-color: #e0e4e8; }

/* Persistent student identity card, deliberately revealed only by staff. */
.student-identity-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin: 12px 26px 0;
    padding: 11px 13px;
    border: 1px solid #dfe4e8;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(20,29,38,.035);
}
.student-identity-card[hidden] { display: none !important; }
.student-identity-card__avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #1d2935;
    color: #fff;
    font-size: .75rem;
    font-weight: 900;
}
.student-identity-card__copy { min-width: 0; display: grid; gap: 1px; }
.student-identity-card__eyebrow { color: #87909a; font-size: .62rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.student-identity-card__copy strong { overflow: hidden; color: #1c242d; font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.student-identity-card__copy > span:last-child { overflow: hidden; color: #66727d; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.student-identity-card__verified { padding: 4px 7px; border-radius: 999px; background: #edf2f5; color: #5f6b75; font-size: .66rem; font-weight: 800; white-space: nowrap; }

/* Teacher response is the visual destination of the thread. */
.course-page .discussion-thread__responses {
    padding: 0 18px 22px !important;
}
.course-page .thread-response--teacher {
    position: relative;
    gap: 12px;
    margin: 0 !important;
    padding: 17px 18px !important;
    border: 1px solid #cfe2d8 !important;
    border-left: 4px solid #20865b !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #f6fbf8 0%, #fff 64%) !important;
    box-shadow: 0 8px 26px rgba(25, 83, 58, .06) !important;
}
.course-page .thread-response--teacher .thread-response__avatar {
    width: 44px;
    height: 44px;
    background: #174b38 !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(23, 75, 56, .16);
}
.thread-response__tutor-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 5px;
    color: #1b754e;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.thread-response__tutor-kicker span {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #1b754e;
    color: #fff;
    font-size: .68rem;
}
.course-page .thread-response__identity strong { color: #13241d; font-size: .98rem; }
.course-page .thread-response__badge {
    border: 0;
    background: #e5f5ec;
    color: #196a48;
}
.course-page .thread-response__content {
    color: #25332d;
    font-size: 1rem;
    line-height: 1.75;
}
.course-page .thread-response--empty {
    margin: 0 !important;
    padding: 16px 18px !important;
    border: 1px dashed #d4dbe0 !important;
    border-radius: 14px !important;
    background: #f9fafb !important;
}

/* Response composer reads like a teaching tool, not an admin textarea. */
.course-page .thread-composer {
    margin: 0 18px 20px !important;
    border: 1px solid #dbe1e6 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 7px 22px rgba(22, 31, 40, .045) !important;
}
.reply-guidance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}
.reply-guidance > strong { color: #303944; font-size: .78rem; }
.composer-starter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.composer-starter-chip {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #dbe1e6;
    border-radius: 999px;
    background: #fff;
    color: #45515d;
    font: inherit;
    font-size: .72rem;
    font-weight: 800;
    cursor: pointer;
}
.composer-starter-chip:hover,
.composer-starter-chip:focus-visible { border-color: #aebbc5; background: #f7f9fa; color: #17212b; outline: none; }
.course-page .thread-composer__textarea {
    border-color: #d8dee4 !important;
    background: #fbfcfd !important;
    font-size: .96rem !important;
    line-height: 1.65 !important;
}
.course-page .thread-composer__textarea:focus { background: #fff !important; border-color: #7d8994 !important; box-shadow: 0 0 0 3px rgba(36,51,64,.08) !important; }

/* New-question guide: teach the student what makes a good doubt. */
.student-question-guide {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e0e5e9;
    border-radius: 14px;
    background: #f8fafb;
}
.student-question-guide__tutor {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid #d6e6dd;
    border-radius: 11px;
    background: #fff;
    color: #183c2e;
    text-decoration: none;
}
.student-question-guide__tutor > span:first-child {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #183c2e;
    color: #fff;
}
.student-question-guide__tutor > span:nth-child(2) { display: grid; gap: 1px; }
.student-question-guide__tutor strong { font-size: .82rem; }
.student-question-guide__tutor small { color: #66786f; font-size: .72rem; }
.student-question-guide__tips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 13px; color: #5e6974; font-size: .74rem; }
.student-question-guide__tips strong { color: #303a44; }
.student-question-guide > .composer-starter-chips { padding-top: 2px; }

/* Activity shows a person first and the account second. */
.settings-person { display: grid; gap: 2px; }
.settings-person strong { color: #252c35; font-size: .86rem; }
.settings-person small,
.settings-person-email { color: #7a8490 !important; font-size: .72rem !important; }

@media (max-width: 820px) {
    .course-tutor-spotlight { grid-template-columns: auto minmax(0,1fr); }
    .course-tutor-spotlight__action { grid-column: 1 / -1; }
    .reply-guidance { align-items: flex-start; flex-direction: column; }
    .student-identity-card { grid-template-columns: auto minmax(0,1fr); margin-inline: 13px; }
    .student-identity-card__verified { display: none; }
}

@media (max-width: 720px) {
    .course-tutor-spotlight {
        gap: 11px;
        padding: 13px;
        border-radius: 14px;
    }
    .course-tutor-spotlight__icon { width: 39px; height: 39px; border-radius: 12px; }
    .course-tutor-spotlight h2 { font-size: .96rem; }
    .course-tutor-spotlight p { font-size: .78rem; }
    .course-tutor-spotlight__action { min-height: 44px; }
    .course-search-context { align-items: flex-start; padding: 8px 10px; }
    .course-search-context button { white-space: nowrap; }

    .course-page .course-filter-strip {
        width: 100%;
        margin-inline: 0;
        padding-inline: 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }
    .course-page .course-filter-chip { width: 100%; justify-content: space-between; }
    .course-page .course-filter-chip .issue-select { max-width: 58%; }

    .course-page .course-mail-detail .discussion-thread__question {
        margin: 10px 9px 0;
        padding: 16px 14px !important;
        border-radius: 13px !important;
    }
    .course-page .discussion-thread__separator { margin: 18px 14px 11px; }
    .course-page .discussion-thread__responses { padding: 0 9px 15px !important; }
    .course-page .thread-response--teacher { grid-template-columns: 1fr !important; padding: 14px !important; border-radius: 13px !important; }
    .course-page .thread-response--teacher .thread-response__avatar { width: 36px; height: 36px; }
    .course-page .thread-composer { margin: 0 9px 14px !important; border-radius: 13px !important; }
    .composer-starter-chips { width: 100%; }
    .composer-starter-chip { flex: 1 1 calc(50% - 6px); min-height: 38px; }
    .student-question-guide__tips { display: grid; gap: 4px; }

    .tv-course-search-result { grid-template-columns: 1fr; }
    .tv-course-search-result__badge { grid-row: auto; width: fit-content; }
}

@media (max-width: 440px) {
    .course-page .course-filter-strip { grid-template-columns: 1fr 1fr; gap: 6px; }
    .course-page .course-filter-chip { padding-left: 8px; }
    .course-page .course-filter-chip > span { font-size: .68rem; }
    .course-page .course-filter-chip .issue-select { font-size: .72rem; padding-right: 22px !important; }
    .composer-starter-chip { flex-basis: 100%; }
    .course-search-context { display: grid; }
}

/* Dark theme parity for the new conversation surfaces. */
html[data-theme='dark'] .course-tutor-spotlight,
html[data-theme='dark'] .student-question-guide,
html[data-theme='dark'] .course-search-context,
html[data-theme='dark'] .tv-course-search-result,
html[data-theme='dark'] .student-identity-card,
html[data-theme='dark'] .course-page .course-mail-detail .discussion-thread__question,
html[data-theme='dark'] .course-page .thread-composer {
    border-color: #343946 !important;
    background: #20232b !important;
    color: #e8ebf1 !important;
}
html[data-theme='dark'] .course-tutor-spotlight {
    border-color: #315244 !important;
    background: linear-gradient(135deg, #17251f 0%, #20232b 68%) !important;
}
html[data-theme='dark'] .course-tutor-spotlight h2,
html[data-theme='dark'] .student-question-guide__tutor,
html[data-theme='dark'] .student-identity-card__copy strong,
html[data-theme='dark'] .course-page .discussion-thread__title,
html[data-theme='dark'] .tv-course-search-result strong,
html[data-theme='dark'] .course-search-context strong { color: #f3f5f8 !important; }
html[data-theme='dark'] .course-tutor-spotlight p,
html[data-theme='dark'] .student-identity-card__copy > span:last-child,
html[data-theme='dark'] .course-page .discussion-thread__content,
html[data-theme='dark'] .tv-course-search-result > span:last-child:not(.tv-course-search-result__badge),
html[data-theme='dark'] .course-search-context { color: #b8c0ca !important; }
html[data-theme='dark'] .student-question-guide__tutor { background: #1b2a23 !important; border-color: #315244 !important; }
html[data-theme='dark'] .course-page .course-mail-shell,
html[data-theme='dark'] .course-page .course-mail-inbox,
html[data-theme='dark'] .course-page .course-mail-detail { background: #181b22 !important; border-color: #303540 !important; }
html[data-theme='dark'] .course-page .course-mail-item { color: #d8dde5; }
html[data-theme='dark'] .course-page .course-mail-item:hover,
html[data-theme='dark'] .course-page .course-mail-item.is-active { border-color: #404753 !important; background: #242831 !important; }
html[data-theme='dark'] .course-page .course-mail-item.is-active .course-mail-item__title { color: #f4f6f9; }
html[data-theme='dark'] .course-page .course-mail-item.is-active .course-mail-item__preview { color: #aeb7c3; }
html[data-theme='dark'] .course-page .thread-response--teacher {
    border-color: #315848 !important;
    border-left-color: #42a877 !important;
    background: linear-gradient(135deg, #18271f 0%, #20252a 68%) !important;
}
html[data-theme='dark'] .course-page .thread-response__identity strong,
html[data-theme='dark'] .course-page .thread-response__content { color: #e9f2ed !important; }
html[data-theme='dark'] .course-page .thread-response__badge { background: #244735; color: #b6e6cc; }
html[data-theme='dark'] .course-page .thread-composer__textarea { border-color: #3b414d !important; background: #181b21 !important; color: #f3f5f8 !important; }
html[data-theme='dark'] .composer-starter-chip { border-color: #3b414d; background: #242832; color: #d7dde5; }
html[data-theme='dark'] .composer-starter-chip:hover { background: #2b303b; color: #fff; }
html[data-theme='dark'] .settings-person strong { color: #eef1f5; }

.tv-search-feedback {
    max-width: 1410px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -7px auto 14px;
    padding: 10px 13px;
    border: 1px solid #dde3e8;
    border-radius: 13px;
    background: #f8fafb;
    color: #68727d;
}
.tv-search-feedback[hidden] { display: none !important; }
.tv-search-feedback__icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 9px;
    background: #1d2935;
    color: #fff;
    font-weight: 900;
}
.tv-search-feedback > div { display: grid; gap: 1px; }
.tv-search-feedback strong { color: #202832; font-size: .84rem; }
.tv-search-feedback span:not(.tv-search-feedback__icon) { font-size: .76rem; }
html[data-theme='dark'] .tv-search-feedback { border-color: #343946; background: #20232b; color: #b8c0ca; }
html[data-theme='dark'] .tv-search-feedback strong { color: #eef1f5; }
@media (max-width: 720px) {
    .tv-search-feedback { margin: -4px 0 10px; align-items: flex-start; }
}

/* Home search: cleaner, calmer and clearly the main navigation tool. */
.tarvos-dudas-dashboard .tv-controls-bar {
    border-color: #dde3e8 !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(20, 29, 38, .05) !important;
}
.tarvos-dudas-dashboard .tv-search-wrapper {
    border-radius: 13px;
}
.tarvos-dudas-dashboard .tv-search-input {
    min-height: 48px;
    border-color: #dfe4e8 !important;
    background: #fbfcfd !important;
    color: #1c2530 !important;
    font-weight: 650;
}
.tarvos-dudas-dashboard .tv-search-input::placeholder { color: #89929c; font-weight: 500; }
.tarvos-dudas-dashboard .tv-search-input:hover { border-color: #cbd3da !important; }
.tarvos-dudas-dashboard .tv-search-input:focus {
    border-color: #7c8994 !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(29, 41, 53, .08) !important;
}
.tarvos-dudas-dashboard .tv-filter-group { background: #f5f7f9 !important; border-color: #e2e6ea !important; }
.tarvos-dudas-dashboard .tv-filter-btn.is-active {
    color: #17212b !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(20,29,38,.06), inset 0 0 0 1px #dce1e6 !important;
}
.tarvos-dudas-dashboard .tv-filter-btn.is-active .tv-filter-count { background: #1d2935 !important; color: #fff !important; }
html[data-theme='dark'] .tarvos-dudas-dashboard .tv-controls-bar,
html[data-theme='dark'] .tarvos-dudas-dashboard .tv-search-input { background: #20232b !important; border-color: #343a44 !important; color: #eef1f5 !important; }
html[data-theme='dark'] .tarvos-dudas-dashboard .tv-filter-group { background: #191c22 !important; border-color: #343a44 !important; }
html[data-theme='dark'] .tarvos-dudas-dashboard .tv-filter-btn.is-active { background: #2a2e37 !important; color: #fff !important; box-shadow: inset 0 0 0 1px #454c58 !important; }

/* =========================================================
   TARVOS DUDAS · RELEASE 2026-09-18
   Dashboard estadístico vertical + workspace de curso + footer espejo
   ========================================================= */

/* ---------- Estadísticas: informe vertical ---------- */
.stats-pro-dashboard {
    --sp-ink: #171526;
    --sp-muted: #69687a;
    --sp-line: #e5e2ec;
    --sp-soft: #f7f6fb;
    --sp-violet: #6d3df5;
    --sp-violet-dark: #5428d0;
    --sp-green: #16875f;
    --sp-amber: #a96809;
    width: min(100%, 1460px);
    margin: 0 auto;
    display: grid;
    gap: 18px;
    color: var(--sp-ink);
}

.stats-pro-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 36px;
    align-items: end;
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid #ded8f1;
    border-radius: 26px;
    background:
        radial-gradient(circle at 95% 0, rgba(109, 61, 245, .13), transparent 31rem),
        linear-gradient(145deg, #fff 0%, #fbfaff 68%, #f5f1ff 100%);
    box-shadow: 0 18px 54px rgba(49, 34, 88, .07);
}
.stats-pro-hero::before {
    content: "";
    position: absolute;
    right: -90px;
    top: -105px;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(109, 61, 245, .10);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(109, 61, 245, .025), 0 0 0 84px rgba(109, 61, 245, .018);
    pointer-events: none;
}
.stats-pro-hero__copy { position: relative; z-index: 1; min-width: 0; }
.stats-pro-kicker,
.stats-pro-section-index {
    display: block;
    color: var(--sp-violet);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.stats-pro-hero h1 {
    max-width: 900px;
    margin: 8px 0 10px;
    color: var(--sp-ink);
    font-size: clamp(2rem, 4vw, 3.45rem);
    line-height: .98;
    letter-spacing: -.057em;
}
.stats-pro-hero p {
    max-width: 850px;
    margin: 0;
    color: var(--sp-muted);
    font-size: clamp(.94rem, 1.2vw, 1.06rem);
    line-height: 1.65;
}
.stats-pro-hero__period {
    position: relative;
    z-index: 1;
    min-width: 230px;
    display: grid;
    gap: 5px;
    padding: 18px 20px;
    border: 1px solid rgba(109, 61, 245, .14);
    border-radius: 17px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 12px 28px rgba(47, 32, 84, .05);
}
.stats-pro-hero__period span,
.stats-pro-hero__period small { color: #7a7789; font-size: .78rem; }
.stats-pro-hero__period span { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.stats-pro-hero__period strong { color: #29263a; font-size: 1.05rem; }

.stats-controlbar.stats-pro-filters {
    display: grid;
    grid-template-columns: minmax(190px, .9fr) repeat(3, minmax(165px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--sp-line);
    border-radius: 18px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 10px 30px rgba(39, 28, 68, .04);
}
.stats-pro-filters__intro {
    align-self: center;
    display: grid;
    gap: 2px;
    padding: 0 8px 0 4px;
}
.stats-pro-filters__intro strong { font-size: .9rem; color: #242235; }
.stats-pro-filters__intro span { color: #8a8796; font-size: .73rem; }
.stats-pro-field { display: grid; gap: 6px; min-width: 0; }
.stats-pro-field > span {
    color: #747182;
    font-size: .67rem;
    font-weight: 850;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.stats-pro-field select,
.stats-pro-field input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 38px 0 12px;
    border: 1px solid #ddd9e6;
    border-radius: 11px;
    background: #fff;
    color: #2a2839;
    font: inherit;
    font-size: .84rem;
    font-weight: 650;
    outline: 0;
}
.stats-pro-field select:focus,
.stats-pro-field input:focus { border-color: #8d70ef; box-shadow: 0 0 0 3px rgba(109,61,245,.10); }
.stats-pro-field.is-disabled { opacity: .55; }
.stats-pro-apply {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 11px;
    background: #6d3df5;
    color: #fff;
    font: inherit;
    font-size: .82rem;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(109,61,245,.18);
}
.stats-pro-apply:hover,
.stats-pro-apply:focus-visible { background: #592fd0; }

.stats-pro-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--sp-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(39,28,68,.04);
}
.stats-pro-kpi {
    min-width: 0;
    min-height: 132px;
    padding: 19px 18px 18px;
    border-right: 1px solid #ece9f1;
    display: grid;
    align-content: start;
    gap: 7px;
}
.stats-pro-kpi:last-child { border-right: 0; }
.stats-pro-kpi > span { color: #777485; font-size: .74rem; font-weight: 800; }
.stats-pro-kpi > strong { color: #242235; font-size: clamp(1.55rem, 2.2vw, 2.15rem); line-height: 1; letter-spacing: -.05em; }
.stats-pro-kpi > small { color: #8e8b99; font-size: .72rem; line-height: 1.4; }
.stats-pro-kpi--primary > strong { color: var(--sp-violet-dark); }
.stats-pro-kpi--success > strong { color: var(--sp-green); }
.stats-pro-kpi--warning > strong { color: var(--sp-amber); }

.stats-pro-card {
    overflow: hidden;
    padding: clamp(22px, 3vw, 30px);
    border: 1px solid var(--sp-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 34px rgba(39,28,68,.045);
}
.stats-pro-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid #efedf3;
}
.stats-pro-card__header > div:first-child { min-width: 0; }
.stats-pro-card__header h2 {
    margin: 5px 0 5px;
    color: #211f31;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    letter-spacing: -.035em;
    line-height: 1.15;
}
.stats-pro-card__header p { max-width: 78ch; margin: 0; color: #787687; font-size: .84rem; line-height: 1.55; }
.stats-pro-card__metric {
    flex: 0 0 auto;
    max-width: 280px;
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f7f5fc;
    text-align: right;
}
.stats-pro-card__metric span { color: #888495; font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.stats-pro-card__metric strong { overflow: hidden; color: #383447; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }

.stats-pro-empty {
    min-height: 190px;
    display: grid;
    place-content: center;
    gap: 5px;
    text-align: center;
    color: #8b8898;
}
.stats-pro-empty strong { color: #555264; font-size: .93rem; }
.stats-pro-empty span { font-size: .8rem; }

.stats-pro-column-chart {
    display: grid;
    grid-template-columns: repeat(var(--items), minmax(42px, 1fr));
    gap: clamp(6px, 1vw, 12px);
    align-items: end;
    min-height: 330px;
    padding-top: 25px;
    overflow-x: auto;
}
.stats-pro-column { min-width: 42px; display: grid; grid-template-rows: 24px 240px auto; gap: 6px; align-items: end; text-align: center; }
.stats-pro-column__value { color: #5e596c; font-size: .72rem; font-weight: 850; }
.stats-pro-column__track {
    width: min(34px, 76%);
    height: 240px;
    margin: 0 auto;
    display: flex;
    align-items: end;
    overflow: hidden;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #f5f3fa, #efedf4);
}
.stats-pro-column__bar {
    width: 100%;
    min-height: 2px;
    display: block;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #8a63ff, #6335e0);
}
.stats-pro-column__bar.is-history { background: linear-gradient(180deg, #67b9e8, #3f7fc7); }
.stats-pro-column__label { color: #767383; font-size: .67rem; line-height: 1.25; overflow-wrap: anywhere; }
.stats-pro-column-chart--history { min-height: 290px; }
.stats-pro-column-chart--history .stats-pro-column { grid-template-rows: 24px 200px auto; }
.stats-pro-column-chart--history .stats-pro-column__track { height: 200px; }

.stats-pro-trend {
    flex: 0 0 auto;
    padding: 8px 11px;
    border-radius: 999px;
    background: #f3f2f6;
    color: #6f6b79;
    font-size: .76rem;
    font-weight: 850;
}
.stats-pro-trend.is-up { background: #fff3df; color: #976007; }
.stats-pro-trend.is-down { background: #eaf8f1; color: #17734f; }
.stats-pro-comparison { display: grid; gap: 18px; padding-top: 26px; }
.stats-pro-comparison__row { display: grid; grid-template-columns: minmax(130px, 180px) minmax(0, 1fr) 54px; gap: 14px; align-items: center; }
.stats-pro-comparison__row > span { color: #5c5968; font-size: .8rem; font-weight: 760; }
.stats-pro-comparison__row > div { height: 15px; overflow: hidden; border-radius: 999px; background: #f0eef5; }
.stats-pro-comparison__row i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7650f4, #9b7dff); }
.stats-pro-comparison__row.is-previous i { background: #b9b4c5; }
.stats-pro-comparison__row strong { text-align: right; font-size: .86rem; color: #302d3d; }

.stats-pro-resolution {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(30px, 5vw, 76px);
    align-items: center;
    padding: 28px 10px 6px;
}
.stats-pro-donut {
    width: 190px;
    height: 190px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(#208c67 0 var(--resolved), #f0c9cf var(--resolved) 100%);
    position: relative;
}
.stats-pro-donut::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px #f0edf4; }
.stats-pro-donut > div { position: relative; z-index: 1; display: grid; text-align: center; }
.stats-pro-donut strong { font-size: 1.7rem; letter-spacing: -.05em; }
.stats-pro-donut span { color: #817d8d; font-size: .76rem; }
.stats-pro-resolution__legend { display: grid; gap: 12px; }
.stats-pro-resolution__legend > div:not(.stats-pro-resolution__note) {
    display: grid;
    grid-template-columns: 12px minmax(0,1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #efedf3;
}
.stats-pro-resolution__legend > div > span:first-child { width: 10px; height: 10px; border-radius: 50%; }
.stats-pro-resolution__legend .is-resolved { background: #208c67; }
.stats-pro-resolution__legend .is-pending { background: #d88190; }
.stats-pro-resolution__legend strong { color: #33303f; font-size: .9rem; }
.stats-pro-resolution__legend small { display: block; margin-top: 2px; color: #858291; font-size: .74rem; }
.stats-pro-resolution__note { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #f8f7fb; }
.stats-pro-resolution__note span { color: #858291; font-size: .74rem; }

.stats-pro-ranking { display: grid; padding-top: 10px; }
.stats-pro-ranking__row {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(180px, 1.35fr) minmax(180px, 3fr) 54px 58px;
    gap: 12px;
    align-items: center;
    min-height: 56px;
    padding: 8px 4px;
    border-bottom: 1px solid #f0eef4;
    color: inherit;
    text-decoration: none;
}
a.stats-pro-ranking__row:hover { background: #faf9fd; }
.stats-pro-ranking__position { color: #9a96a4; font-size: .7rem; font-weight: 850; text-align: center; }
.stats-pro-ranking__label { min-width: 0; color: #3b3848; font-size: .8rem; font-weight: 760; line-height: 1.25; }
.stats-pro-ranking__label > small { display: block; margin-top: 3px; color: #9793a0; font-size: .67rem; font-weight: 560; }
.stats-pro-ranking__track { height: 10px; overflow: hidden; border-radius: 999px; background: #f1eff5; }
.stats-pro-ranking__track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7851f4, #a386ff); }
.stats-pro-ranking--relative .stats-pro-ranking__track i { background: linear-gradient(90deg, #3d9f85, #67c4a9); }
.stats-pro-ranking--topics .stats-pro-ranking__track i { background: linear-gradient(90deg, #587fbf, #76a4e6); }
.stats-pro-ranking__row > strong { color: #393646; font-size: .82rem; text-align: right; }
.stats-pro-ranking__row > small { color: #9692a0; font-size: .69rem; text-align: right; }

.stats-pro-day-bars { display: grid; gap: 13px; padding-top: 24px; }
.stats-pro-day-bar { display: grid; grid-template-columns: 48px minmax(0,1fr) 42px; gap: 12px; align-items: center; }
.stats-pro-day-bar > span { color: #615e6d; font-size: .76rem; font-weight: 800; }
.stats-pro-day-bar > div { height: 12px; overflow: hidden; border-radius: 999px; background: #f1eff5; }
.stats-pro-day-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7150ea, #9679f6); }
.stats-pro-day-bar strong { color: #393646; font-size: .79rem; text-align: right; }

.stats-pro-hour-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding-top: 24px; }
.stats-pro-hour { min-width: 0; padding: 16px; border: 1px solid #ece9f2; border-radius: 14px; background: #fbfafd; }
.stats-pro-hour > span { color: #7d7989; font-size: .69rem; font-weight: 800; }
.stats-pro-hour > strong { display: block; margin: 5px 0 11px; color: #302d3d; font-size: 1.35rem; letter-spacing: -.04em; }
.stats-pro-hour > div { height: 7px; overflow: hidden; border-radius: 999px; background: #ece9f2; }
.stats-pro-hour i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #657fe4, #78a1ee); }

.stats-pro-heatmap-wrap { overflow-x: auto; padding-top: 24px; }
.stats-pro-heatmap { min-width: 720px; display: grid; gap: 8px; }
.stats-pro-heatmap__head,
.stats-pro-heatmap__row { display: grid; grid-template-columns: 54px repeat(6, minmax(78px, 1fr)); gap: 8px; align-items: center; }
.stats-pro-heatmap__head strong { color: #898594; font-size: .67rem; text-align: center; }
.stats-pro-heatmap__row > strong { color: #5d5a69; font-size: .72rem; }
.stats-pro-heatmap__cell {
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(109,61,245, calc(.04 + var(--heat) * .14));
    border-radius: 10px;
    background: rgba(109,61,245, calc(.035 + var(--heat) * .72));
    color: #4a267e;
}
.stats-pro-heatmap__cell b { font-size: .75rem; }

.stats-pro-card--insights { background: linear-gradient(145deg, #fff, #fbf9ff); }
.stats-pro-insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 20px; }
.stats-pro-insight { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px; align-items: start; padding: 14px 15px; border: 1px solid #ebe7f4; border-radius: 13px; background: #fff; }
.stats-pro-insight > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: #f0eaff; color: #683adb; font-weight: 900; }
.stats-pro-insight p { margin: 3px 0 0; color: #5e5a69; font-size: .79rem; line-height: 1.5; }
.stats-pro-footnote { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 3px 5px 18px; color: #92909c; font-size: .72rem; }

/* ---------- Curso: hero y barra de trabajo ---------- */
.course-page--pro {
    width: min(100%, 1500px);
    margin: 0 auto;
    gap: 16px !important;
}
.course-pro-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
    padding: clamp(24px, 3.5vw, 40px);
    border: 1px solid #e2deeb;
    border-radius: 24px;
    background:
      radial-gradient(circle at 92% 0, rgba(109,61,245,.09), transparent 24rem),
      #fff;
    box-shadow: 0 15px 42px rgba(40,30,66,.055);
}
.course-pro-hero__main { min-width: 0; display: grid; gap: 8px; }
.course-pro-back { width: fit-content; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; color: #6e697b; font-size: .78rem; font-weight: 760; text-decoration: none; }
.course-pro-back:hover { color: #5b31d1; }
.course-pro-eyebrow { color: #6b3ce8; font-size: .68rem; font-weight: 900; letter-spacing: .105em; text-transform: uppercase; }
.course-pro-hero h1 { max-width: 900px; margin: 2px 0 4px; color: #191726; font-size: clamp(2rem, 3.7vw, 3.2rem); line-height: .99; letter-spacing: -.055em; text-wrap: balance; }
.course-pro-hero__main > p { max-width: 83ch; margin: 0; color: #686678; font-size: .93rem; line-height: 1.62; }
.course-pro-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.course-pro-metric { min-width: 112px; display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: baseline; padding: 9px 11px; border: 1px solid #e5e2eb; border-radius: 11px; background: #faf9fc; }
.course-pro-metric span { color: #817d8c; font-size: .69rem; font-weight: 720; }
.course-pro-metric strong { color: #343140; font-size: .94rem; }
.course-pro-metric.is-alert { border-color: #f0d4d8; background: #fff7f8; }
.course-pro-metric.is-alert strong { color: #b13a4a; }
.course-pro-metric.is-ok strong { color: #187457; }
.course-pro-side { display: grid; gap: 10px; }
.course-pro-tutor,
.course-pro-new-question {
    width: 100%;
    min-height: 74px;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 14px;
    border-radius: 15px;
    font: inherit;
    text-align: left;
    text-decoration: none;
}
.course-pro-tutor { border: 1px solid #d9d3e9; background: #faf8ff; color: #30283f; }
.course-pro-tutor:hover,
.course-pro-tutor:focus-visible { border-color: #b8a8e8; background: #f6f1ff; color: #2a213a; }
.course-pro-tutor__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #6d3df5; color: #fff; box-shadow: 0 8px 18px rgba(109,61,245,.18); }
.course-pro-tutor__icon svg { width: 22px; height: 22px; }
.course-pro-tutor__copy { min-width: 0; display: grid; gap: 2px; }
.course-pro-tutor__copy small,
.course-pro-new-question small { color: #807889; font-size: .68rem; font-weight: 700; }
.course-pro-tutor__copy strong,
.course-pro-new-question strong { color: inherit; font-size: .84rem; line-height: 1.25; }
.course-pro-tutor__arrow { color: #7251ca; font-size: 1.05rem; }
.course-pro-new-question { grid-template-columns: 42px minmax(0,1fr); border: 1px solid #5e34d4; background: #6d3df5; color: #fff; cursor: pointer; box-shadow: 0 10px 24px rgba(109,61,245,.18); }
.course-pro-new-question > span:first-child { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.13); font-size: 1.2rem; }
.course-pro-new-question small { color: rgba(255,255,255,.72); }
.course-pro-new-question:hover { background: #5d32da; }

.course-tutor-spotlight--pro { border-color: #e0d9ef; background: linear-gradient(135deg, #fbf9ff, #fff); }
.course-tutor-spotlight--pro .course-tutor-spotlight__icon { background: #6d3df5; }
.course-tutor-spotlight--pro .course-tutor-spotlight__eyebrow { color: #7044d8; }
.course-tutor-spotlight--pro .course-tutor-spotlight__action { background: #35255d; }
.course-tutor-spotlight--pro .course-tutor-spotlight__action:hover { background: #241a41; }

.course-page--pro .course-pro-workspace.issue-board-panel--course {
    overflow: hidden;
    padding: 0 !important;
    border: 1px solid #e1dee8 !important;
    border-radius: 24px !important;
    background: #fff !important;
    box-shadow: 0 14px 40px rgba(39,29,63,.05) !important;
}
.course-pro-workspace__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 24px 26px 19px;
    border-bottom: 1px solid #ece9f0;
}
.course-pro-workspace__header h2 { margin: 4px 0 4px; color: #201e2d; font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: -.035em; }
.course-pro-workspace__header p { max-width: 76ch; margin: 0; color: #7a7788; font-size: .83rem; line-height: 1.55; }
.course-pro-next { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid #d8d2e5; border-radius: 11px; background: #fff; color: #3a3548; font: inherit; font-size: .79rem; font-weight: 820; cursor: pointer; white-space: nowrap; }
.course-pro-next:hover { border-color: #bbaee0; background: #faf7ff; color: #5d35cc; }
.course-pro-next__dot { width: 8px; height: 8px; border-radius: 50%; background: #e58a2f; box-shadow: 0 0 0 4px #fff2e5; }
.course-pro-toolbar { display: grid; gap: 12px; padding: 16px 20px 14px; border-bottom: 1px solid #e8e5ed; background: #fbfafc; }
.course-pro-toolbar__top { display: flex; gap: 10px; align-items: center; }
.course-pro-search { min-width: 0; flex: 1 1 auto; min-height: 48px; display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 0 13px; border: 1px solid #dcd8e4; border-radius: 12px; background: #fff; }
.course-pro-search:focus-within { border-color: #9274ee; box-shadow: 0 0 0 3px rgba(109,61,245,.09); }
.course-pro-search svg { width: 19px; height: 19px; color: #858191; }
.course-pro-search input { min-width: 0; height: 44px; border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; color: #262332; font: inherit; font-size: .87rem; }
.course-pro-search input::placeholder { color: #aaa6b1; }
.course-pro-search kbd { padding: 3px 6px; border: 1px solid #e6e2ea; border-bottom-width: 2px; border-radius: 6px; background: #f7f6f9; color: #9692a0; font-family: inherit; font-size: .62rem; }
.course-pro-toolbar__new { flex: 0 0 auto; min-height: 48px; padding: 0 16px; border: 0; border-radius: 12px; background: #6d3df5; color: #fff; font: inherit; font-size: .81rem; font-weight: 850; cursor: pointer; }
.course-pro-filterbar { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 14px; align-items: end; }
.course-pro-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; }
.course-pro-shortcuts button { min-height: 38px; padding: 0 11px; border: 1px solid #ded9e6; border-radius: 999px; background: #fff; color: #625e6d; font: inherit; font-size: .72rem; font-weight: 780; cursor: pointer; }
.course-pro-shortcuts button:hover { border-color: #bfb3df; color: #5934c3; }
.course-pro-shortcuts button.is-active { border-color: #6d3df5; background: #6d3df5; color: #fff; box-shadow: 0 6px 14px rgba(109,61,245,.14); }
.course-pro-selects { min-width: 0; display: grid; grid-template-columns: minmax(120px,.8fr) minmax(130px,.9fr) minmax(155px,1.25fr) minmax(135px,.9fr); gap: 8px; }
.course-pro-selects.is-three { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
.course-pro-selects .course-pro-select--topic:last-of-type { grid-column: auto; }
.course-pro-select { min-width: 0; display: grid; gap: 4px; }
.course-pro-select > span { padding-left: 3px; color: #8d8998; font-size: .61rem; font-weight: 850; letter-spacing: .065em; text-transform: uppercase; }
.course-pro-select .issue-select { width: 100%; min-width: 0; min-height: 39px; padding: 0 31px 0 10px; border: 1px solid #dfdbe5 !important; border-radius: 9px !important; background-color: #fff !important; color: #4f4a59 !important; font-size: .73rem !important; font-weight: 680 !important; box-shadow: none !important; }
.course-pro-filter-actions { display: flex; align-items: end; gap: 7px; }
.course-pro-reset { min-height: 39px; padding: 0 10px; border: 1px solid #ded9e5; border-radius: 9px; background: #fff; color: #6f6a78; font: inherit; font-size: .7rem; font-weight: 780; cursor: pointer; }
.course-pro-reset:hover { color: #5c35c6; border-color: #bcaee2; }
.course-pro-more { position: relative; }
.course-pro-more > summary { list-style: none; min-height: 39px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #ded9e5; border-radius: 9px; background: #fff; color: #5e5968; font-size: .7rem; font-weight: 780; cursor: pointer; user-select: none; }
.course-pro-more > summary::-webkit-details-marker { display: none; }
.course-pro-more__menu { position: absolute; z-index: 40; right: 0; top: calc(100% + 7px); width: 220px; display: grid; gap: 5px; padding: 7px; border: 1px solid #ded9e5; border-radius: 11px; background: #fff; box-shadow: 0 18px 44px rgba(35,25,59,.14); }
.course-pro-more__menu button,
.course-pro-more__menu a { width: 100%; min-height: 38px; display: flex; align-items: center; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #514c5b; font: inherit; font-size: .73rem; font-weight: 740; text-align: left; text-decoration: none; cursor: pointer; }
.course-pro-more__menu button:hover,
.course-pro-more__menu a:hover { background: #f7f5fb; color: #5d35cc; }
.course-pro-more__menu button.is-danger { color: #b23a4a; }
.course-pro-results { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #85818f; font-size: .72rem; }
.course-pro-results strong { color: #393543; }
.course-pro-results__hint { text-align: right; }
.course-search-context--pro { margin: 0; }

.course-page--pro .course-mail-shell {
    grid-template-columns: minmax(310px, 34%) minmax(0, 66%);
    min-height: 650px;
    border: 0;
    border-radius: 0;
    background: #f6f5f8;
}
.course-page--pro .course-mail-inbox { background: #f8f7fa; border-right: 1px solid #e3e0e8; }
.course-page--pro .course-mail-inbox__head { padding: 16px 17px 13px; background: #fff; border-bottom: 1px solid #e8e5ec; }
.course-page--pro .course-mail-inbox__head strong { color: #302d3c; font-size: .82rem; }
.course-page--pro .course-mail-inbox__head span:not(.course-mail-inbox__count) { color: #928e9c; font-size: .68rem; }
.course-page--pro .course-mail-inbox__count { background: #f1ecff; color: #6335d5; }
.course-page--pro .course-mail-inbox__list { padding: 8px; gap: 5px; }
.course-page--pro .course-mail-item { padding: 13px 13px 12px; border: 1px solid transparent; border-radius: 11px; background: transparent; }
.course-page--pro .course-mail-item::before { width: 3px; left: 0; top: 10px; bottom: 10px; border-radius: 999px; }
.course-page--pro .course-mail-item:hover { border-color: #e0dce6; background: #fff; }
.course-page--pro .course-mail-item.is-active { border-color: #cfc2ef; background: #fff; box-shadow: 0 8px 20px rgba(54,37,90,.06); }
.course-page--pro .course-mail-item__title { font-size: .8rem; line-height: 1.32; }
.course-page--pro .course-mail-item__preview { font-size: .7rem; line-height: 1.4; color: #898592; }
.course-page--pro .course-mail-item__top time { font-size: .62rem; }
.course-page--pro .course-mail-detail { background: #fff; }
.course-page--pro .course-mail-detail .discussion-thread__question { padding: 28px 32px 22px; }
.course-page--pro .course-mail-detail .discussion-thread__title { max-width: 980px; font-size: clamp(1.18rem, 1.8vw, 1.55rem); }
.course-page--pro .course-mail-detail .discussion-thread__content { max-width: 980px; }

/* ---------- Footer: espejo del tema principal Blocksy Child ---------- */
.tarvos-footer-premium--dudas {
    --footer-violet: #7b55f6;
    --footer-text: rgba(250, 248, 255, .7);
    --footer-muted: rgba(250, 248, 255, .5);
    --footer-line: rgba(220, 211, 255, .14);
    position: relative;
    width: 100% !important;
    margin: 0 !important;
    color: #fff;
    background: transparent !important;
    font-family: var(--tarvos-font-sans, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    text-align: left !important;
}
.tarvos-footer-premium--dudas,
.tarvos-footer-premium--dudas * { box-sizing: border-box; }
.tarvos-footer-premium--dudas .tarvos-footer-bg {
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(219, 209, 255, .15) !important;
    background:
      radial-gradient(34rem 24rem at 0 100%, rgba(112,71,245,.2), transparent 69%),
      radial-gradient(36rem 24rem at 100% 0, rgba(125,85,246,.24), transparent 69%),
      linear-gradient(145deg, #12101e 0%, #1b172e 55%, #281d43 100%) !important;
}
.tarvos-footer-premium--dudas .tarvos-footer-bg::before {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
      linear-gradient(90deg, transparent 0 49.8%, rgba(255,255,255,.014) 50%, transparent 50.2%),
      linear-gradient(0deg, transparent 0 49.8%, rgba(255,255,255,.012) 50%, transparent 50.2%);
    background-size: 88px 88px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.28), transparent 82%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.28), transparent 82%);
}
.tarvos-footer-premium--dudas .tarvos-footer-frame { position: relative; z-index: 1; width: min(1260px, calc(100% - 34px)); margin-inline: auto; }
.tarvos-footer-premium--dudas .tarvos-footer-main {
    display: grid !important;
    grid-template-columns: minmax(270px, 340px) minmax(0,1fr) !important;
    gap: clamp(2.5rem,4vw,4rem) !important;
    align-items: start;
    padding: clamp(2.75rem,4vw,3.8rem) 0 clamp(2.25rem,3vw,3rem) !important;
}
.tarvos-footer-premium--dudas .tarvos-footer-brand { padding: 0 !important; border: 0 !important; background: transparent !important; }
.tarvos-footer-premium--dudas .tarvos-footer-logo { display: inline-flex !important; align-items: center !important; gap: .72rem !important; margin: 0 0 1.25rem !important; color: #fff !important; text-decoration: none !important; }
.tarvos-footer-premium--dudas .tarvos-footer-logo img { width: 2.9rem !important; height: 2.9rem !important; max-width: 2.9rem !important; object-fit: contain; filter: drop-shadow(0 .5rem 1rem rgba(123,85,246,.2)); }
.tarvos-footer-premium--dudas .tarvos-footer-logo-text { display: grid !important; gap: .16rem; }
.tarvos-footer-premium--dudas .tarvos-footer-logo-text strong { margin: 0 !important; color: #fff !important; font-size: 1rem !important; font-weight: 850 !important; letter-spacing: -.025em !important; }
.tarvos-footer-premium--dudas .tarvos-footer-logo-text small { color: rgba(250,248,255,.55) !important; font-size: .75rem !important; line-height: 1.45 !important; font-weight: 560; }
.tarvos-footer-premium--dudas .tarvos-footer-eyebrow { margin: 0 0 .65rem !important; color: #c9bcff !important; font-size: .62rem !important; font-weight: 850 !important; letter-spacing: .11em !important; }
.tarvos-footer-premium--dudas .tarvos-footer-brand h2 { max-width: 15ch !important; margin: 0 !important; color: #fff !important; font-size: clamp(1.65rem,2.4vw,2.25rem) !important; font-weight: 850 !important; letter-spacing: -.055em !important; line-height: 1.02 !important; }
.tarvos-footer-premium--dudas .tarvos-footer-entity { max-width: 31rem !important; margin: .9rem 0 0 !important; color: var(--footer-text) !important; font-size: .875rem !important; line-height: 1.65 !important; }
.tarvos-footer-premium--dudas .tarvos-footer-location { display: flex; align-items: flex-start; gap: .45rem; margin: 1rem 0 0 !important; color: rgba(250,248,255,.6) !important; font-size: .75rem !important; line-height: 1.45 !important; }
.tarvos-footer-premium--dudas .tarvos-footer-location svg { width: .92rem; height: .92rem; flex: 0 0 auto; margin-top: .08rem; color: #bca9ff; }
.tarvos-footer-premium--dudas .tarvos-footer-social-block { display: grid; gap: .5rem; margin-top: 1.2rem; }
.tarvos-footer-premium--dudas .tarvos-footer-social-label { margin: 0 !important; color: rgba(250,248,255,.58) !important; font-size: .75rem !important; line-height: 1.45 !important; font-weight: 760 !important; letter-spacing: .07em !important; text-transform: uppercase; }
.tarvos-footer-premium--dudas .tarvos-footer-social { display: flex !important; justify-self: auto !important; gap: .45rem !important; margin-top: 0 !important; }
.tarvos-footer-premium--dudas .tarvos-footer-social a { display: inline-grid !important; width: auto !important; min-width: 0 !important; height: 2.15rem !important; grid-auto-flow: column; align-items: center !important; justify-content: start !important; gap: .46rem !important; padding: 0 .72rem !important; border: 1px solid rgba(220,211,255,.16) !important; border-radius: .65rem !important; color: rgba(250,248,255,.78) !important; background: rgba(255,255,255,.05) !important; font-size: .7rem !important; font-weight: 680 !important; text-decoration: none !important; }
.tarvos-footer-premium--dudas .tarvos-footer-social a:hover { border-color: rgba(220,211,255,.38) !important; background: var(--footer-violet) !important; }
.tarvos-footer-premium--dudas .tarvos-footer-social img { width: .96rem !important; height: .96rem !important; }
.tarvos-footer-premium--dudas .tarvos-footer-nav { display: grid !important; grid-template-columns: repeat(4,minmax(0,1fr)) !important; column-gap: clamp(1.7rem,2.7vw,2.8rem) !important; row-gap: 1.45rem !important; align-items: start !important; justify-items: start !important; width: 100% !important; min-width: 0 !important; padding: .15rem 0 0 !important; }
.tarvos-footer-premium--dudas .tarvos-footer-column { width: 100% !important; min-width: 0 !important; }
.tarvos-footer-premium--dudas .tarvos-footer-column h3 { margin: 0 0 .92rem !important; color: #fff !important; font-size: .8125rem !important; font-weight: 850 !important; letter-spacing: .015em !important; }
.tarvos-footer-premium--dudas .tarvos-footer-column h3::after { display: none !important; }
.tarvos-footer-premium--dudas .tarvos-footer-column__links { display: grid !important; grid-template-columns: 1fr !important; gap: .58rem !important; }
.tarvos-footer-premium--dudas .tarvos-footer-column a { display: inline !important; width: fit-content !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; color: rgba(250,248,255,.64) !important; font-size: .8125rem !important; font-weight: 560 !important; line-height: 1.5 !important; text-decoration: none !important; overflow-wrap: normal !important; word-break: normal !important; }
.tarvos-footer-premium--dudas .tarvos-footer-column a::before { display: none !important; }
.tarvos-footer-premium--dudas .tarvos-footer-column a:hover { color: #fff !important; transform: none !important; }
.tarvos-footer-premium--dudas .tarvos-footer-bottom { display: grid !important; width: 100% !important; min-height: 0 !important; grid-template-columns: minmax(0,1fr) max-content !important; gap: 1.5rem !important; align-items: center !important; padding: .95rem 0 1.15rem !important; border-top: 1px solid var(--footer-line) !important; color: var(--footer-muted) !important; }
.tarvos-footer-premium--dudas .tarvos-footer-copy { display: flex !important; flex-wrap: wrap !important; gap: .32rem .85rem !important; font-size: .75rem !important; line-height: 1.45 !important; }
.tarvos-footer-premium--dudas .tarvos-footer-copy span + span::before { display: none !important; }
.tarvos-footer-premium--dudas .tarvos-footer-legal { display: flex !important; flex-wrap: nowrap !important; justify-content: flex-end !important; column-gap: .7rem !important; row-gap: .3rem !important; }
.tarvos-footer-premium--dudas .tarvos-footer-legal a,
.tarvos-footer-premium--dudas .tarvos-footer-cookie-settings { display: inline-flex !important; align-items: center !important; min-height: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; color: rgba(250,248,255,.55) !important; background: transparent !important; box-shadow: none !important; font: inherit !important; font-size: .75rem !important; line-height: 1.45 !important; text-decoration: none !important; white-space: nowrap !important; }
.tarvos-footer-premium--dudas .tarvos-footer-legal a:hover { color: #fff !important; }
.tarvos-footer-premium--dudas :where(a,button):focus-visible { outline: 3px solid rgba(181,162,255,.48) !important; outline-offset: 3px !important; }

@media (max-width: 1180px) {
    .stats-controlbar.stats-pro-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .stats-pro-filters__intro { grid-column: 1 / -1; }
    .stats-pro-apply { min-width: 150px; }
    .stats-pro-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .stats-pro-kpi:nth-child(3n) { border-right: 0; }
    .stats-pro-kpi:nth-child(-n+3) { border-bottom: 1px solid #ece9f1; }
    .course-pro-filterbar { grid-template-columns: 1fr auto; }
    .course-pro-shortcuts { grid-column: 1 / -1; }
    .course-pro-selects { grid-template-columns: repeat(4,minmax(120px,1fr)); }
}

@media (max-width: 1100px) {
    .tarvos-footer-premium--dudas .tarvos-footer-main { grid-template-columns: 1fr !important; gap: 2rem !important; }
    .tarvos-footer-premium--dudas .tarvos-footer-nav { grid-template-columns: repeat(4,minmax(0,1fr)) !important; column-gap: 1.3rem !important; }
    .tarvos-footer-premium--dudas .tarvos-footer-bottom { grid-template-columns: 1fr !important; gap: .75rem !important; }
    .tarvos-footer-premium--dudas .tarvos-footer-copy,
    .tarvos-footer-premium--dudas .tarvos-footer-legal { grid-column: 1 !important; justify-content: flex-start !important; }
    .tarvos-footer-premium--dudas .tarvos-footer-legal { display: grid !important; grid-template-columns: repeat(3,max-content) !important; }
}

@media (max-width: 960px) {
    .stats-pro-hero { grid-template-columns: 1fr; gap: 20px; }
    .stats-pro-hero__period { width: fit-content; }
    .stats-pro-hour-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .stats-pro-insights { grid-template-columns: 1fr; }
    .course-pro-hero { grid-template-columns: 1fr; }
    .course-pro-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .course-pro-filterbar { grid-template-columns: 1fr; }
    .course-pro-filter-actions { justify-content: flex-start; }
    .course-page--pro .course-mail-shell { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .stats-pro-dashboard { gap: 12px; }
    .stats-pro-hero { padding: 24px 20px; border-radius: 19px; }
    .stats-pro-hero h1 { font-size: 2rem; }
    .stats-controlbar.stats-pro-filters { grid-template-columns: 1fr; border-radius: 16px; }
    .stats-pro-filters__intro { grid-column: auto; }
    .stats-pro-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); border-radius: 16px; }
    .stats-pro-kpi { min-height: 116px; border-bottom: 1px solid #ece9f1; }
    .stats-pro-kpi:nth-child(2n) { border-right: 0; }
    .stats-pro-kpi:nth-last-child(-n+2) { border-bottom: 0; }
    .stats-pro-card { padding: 20px 16px; border-radius: 17px; }
    .stats-pro-card__header { display: grid; gap: 12px; }
    .stats-pro-card__metric { max-width: 100%; text-align: left; }
    .stats-pro-resolution { grid-template-columns: 1fr; justify-items: center; }
    .stats-pro-resolution__legend { width: 100%; }
    .stats-pro-ranking__row { grid-template-columns: 28px minmax(120px,1fr) 48px 48px; gap: 8px; }
    .stats-pro-ranking__track { grid-column: 2 / -1; grid-row: 2; }
    .stats-pro-ranking__label > small { white-space: normal; }
    .stats-pro-hour-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .stats-pro-column-chart { min-height: 280px; }
    .stats-pro-column { grid-template-rows: 22px 190px auto; }
    .stats-pro-column__track { height: 190px; }
    .course-pro-hero { padding: 22px 18px; border-radius: 19px; }
    .course-pro-hero h1 { font-size: 2rem; }
    .course-pro-side { grid-template-columns: 1fr; }
    .course-pro-workspace__header { align-items: flex-start; padding: 20px 16px 16px; }
    .course-pro-workspace__header .course-pro-next { display: none; }
    .course-pro-toolbar { padding: 13px 12px; }
    .course-pro-toolbar__top { align-items: stretch; flex-direction: column; }
    .course-pro-search kbd { display: none; }
    .course-pro-toolbar__new { width: 100%; }
    .course-pro-selects { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .course-pro-filter-actions { width: 100%; }
    .course-pro-results { display: grid; }
    .course-pro-results__hint { text-align: left; }
    .tarvos-footer-premium--dudas .tarvos-footer-main { padding: 2.5rem 0 2rem !important; }
    .tarvos-footer-premium--dudas .tarvos-footer-nav { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 1.65rem 1rem !important; }
    .tarvos-footer-premium--dudas .tarvos-footer-bottom { grid-template-columns: 1fr !important; }
    .tarvos-footer-premium--dudas .tarvos-footer-legal { grid-template-columns: repeat(2,minmax(0,1fr)) !important; column-gap: 1rem !important; row-gap: .62rem !important; }
    .tarvos-footer-premium--dudas .tarvos-footer-legal > * { justify-self: start; }
}

@media (max-width: 520px) {
    .stats-pro-kpis { grid-template-columns: 1fr 1fr; }
    .stats-pro-kpi { padding: 16px 14px; }
    .stats-pro-comparison__row { grid-template-columns: 100px minmax(0,1fr) 38px; gap: 8px; }
    .stats-pro-hour-grid { grid-template-columns: 1fr 1fr; }
    .course-pro-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
    .course-pro-metric { min-width: 0; grid-template-columns: 1fr; gap: 2px; }
    .course-pro-selects { grid-template-columns: 1fr; }
    .course-pro-filter-actions { flex-wrap: wrap; }
    .tarvos-footer-premium--dudas .tarvos-footer-frame { width: min(100% - 24px,1260px); }
}

/* =========================================================
   2026-09-18 v2.1 · Portada + estadísticas
   Mantiene intactos topbar y footer; solo redefine el contenido.
   ========================================================= */

/* --- Estadísticas: evolución siempre legible en horizontal --- */
.stats-pro-timeline {
    display: grid;
    gap: 0;
    padding-top: 16px;
}
.stats-pro-timeline__row {
    display: grid;
    grid-template-columns: minmax(92px, 150px) minmax(180px, 1fr) 52px 54px;
    gap: 14px;
    align-items: center;
    min-height: 54px;
    padding: 9px 4px;
    border-bottom: 1px solid #f0eef4;
}
.stats-pro-timeline__row:last-child { border-bottom: 0; }
.stats-pro-timeline__label {
    min-width: 0;
    color: #575463;
    font-size: .78rem;
    font-weight: 760;
    line-height: 1.25;
}
.stats-pro-timeline__track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #f0eef5;
}
.stats-pro-timeline__track i {
    display: block;
    min-width: 2px;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6b3be8 0%, #8b68f7 100%);
    box-shadow: inset 0 0 0 1px rgba(85, 45, 195, .08);
}
.stats-pro-timeline--history .stats-pro-timeline__track i,
.stats-pro-timeline__track i.is-history {
    background: linear-gradient(90deg, #3f82c5 0%, #62b0dc 100%);
}
.stats-pro-timeline__row > strong {
    color: #302d3d;
    font-size: .84rem;
    text-align: right;
}
.stats-pro-timeline__row > small {
    color: #9894a1;
    font-size: .7rem;
    text-align: right;
}
.stats-pro-history-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid #ebe8f1;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #fbfafd);
}
.stats-pro-history-summary > div {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 20px 22px;
    border-right: 1px solid #ebe8f1;
}
.stats-pro-history-summary > div:last-child { border-right: 0; }
.stats-pro-history-summary span {
    color: #858191;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.stats-pro-history-summary strong {
    color: #2c2939;
    font-size: 1.02rem;
    letter-spacing: -.02em;
}

/* Evita la sensación de paneles excesivamente altos cuando hay pocos datos. */
.stats-pro-card { min-height: 0; }
.stats-pro-card .stats-pro-timeline { min-height: 0; }

/* --- Portada de cursos: una sola jerarquía, menos "cajas dentro de cajas" --- */
.tarvos-dudas-dashboard--v2 {
    --tv-home-violet: #6737ea;
    --tv-home-violet-dark: #4f24c5;
    --tv-home-ink: #181626;
    --tv-home-muted: #6f6c7d;
    --tv-home-line: #e7e3ee;
    width: min(100%, 1460px);
    max-width: 1460px;
    display: grid;
    gap: 16px;
    padding-bottom: 3.5rem;
}

.tarvos-dudas-dashboard--v2 .tv-home-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 355px);
    gap: clamp(28px, 4vw, 62px);
    align-items: center;
    padding: clamp(30px, 4.2vw, 54px);
    border: 1px solid #ddd7ec;
    border-radius: 28px;
    background:
        radial-gradient(circle at 93% 12%, rgba(119, 74, 246, .16), transparent 24rem),
        linear-gradient(135deg, #ffffff 0%, #fbf9ff 66%, #f4efff 100%);
    box-shadow: 0 22px 64px rgba(48, 31, 91, .075);
}
.tarvos-dudas-dashboard--v2 .tv-home-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    right: -115px;
    top: -145px;
    width: 390px;
    height: 390px;
    border: 1px solid rgba(109, 61, 245, .09);
    border-radius: 50%;
    box-shadow:
        0 0 0 54px rgba(109, 61, 245, .026),
        0 0 0 108px rgba(109, 61, 245, .016);
}
.tarvos-dudas-dashboard--v2 .tv-home-hero__main { min-width: 0; }
.tarvos-dudas-dashboard--v2 .tv-home-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6440cc;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .105em;
    text-transform: uppercase;
}
.tarvos-dudas-dashboard--v2 .tv-home-hero__eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7350e9;
    box-shadow: 0 0 0 5px rgba(109,61,245,.08);
}
.tarvos-dudas-dashboard--v2 .tv-home-hero h1 {
    max-width: 800px;
    margin: 10px 0 12px;
    color: var(--tv-home-ink);
    font-size: clamp(2.2rem, 4.4vw, 4rem);
    font-weight: 820;
    line-height: .98;
    letter-spacing: -.062em;
}
.tarvos-dudas-dashboard--v2 .tv-home-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--tv-home-muted);
    font-size: clamp(.94rem, 1.15vw, 1.05rem);
    line-height: 1.67;
}
.tarvos-dudas-dashboard--v2 .tv-home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}
.tarvos-dudas-dashboard--v2 .tv-home-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 820;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.tarvos-dudas-dashboard--v2 .tv-home-action svg { width: 17px; height: 17px; }
.tarvos-dudas-dashboard--v2 .tv-home-action--primary {
    background: linear-gradient(135deg, #7046ef, #5a2fd7);
    color: #fff;
    box-shadow: 0 10px 24px rgba(109,61,245,.21);
}
.tarvos-dudas-dashboard--v2 .tv-home-action--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(109,61,245,.28);
}
.tarvos-dudas-dashboard--v2 .tv-home-action--secondary {
    border-color: #ded8eb;
    background: rgba(255,255,255,.8);
    color: #403b50;
}
.tarvos-dudas-dashboard--v2 .tv-home-action--secondary:hover { border-color: #cfc2ef; background: #fff; }

.tarvos-dudas-dashboard--v2 .tv-home-status {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 20px;
    border: 1px solid rgba(109,61,245,.14);
    border-radius: 18px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 14px 36px rgba(43, 29, 78, .07);
    backdrop-filter: blur(10px);
}
.tarvos-dudas-dashboard--v2 .tv-home-status__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #ecf9f3;
    color: #13815c;
    font-size: 1.15rem;
    font-weight: 900;
}
.tarvos-dudas-dashboard--v2 .tv-home-status.is-attention .tv-home-status__icon { background: #fff4e2; color: #a56508; }
.tarvos-dudas-dashboard--v2 .tv-home-status__label {
    display: block;
    margin-bottom: 5px;
    color: #8a8695;
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.tarvos-dudas-dashboard--v2 .tv-home-status strong {
    display: block;
    color: #2d293a;
    font-size: 1.18rem;
    letter-spacing: -.03em;
}
.tarvos-dudas-dashboard--v2 .tv-home-status small {
    display: block;
    margin-top: 4px;
    color: #777382;
    font-size: .76rem;
    line-height: 1.45;
}

/* Un único bloque resumen con divisores, en vez de cuatro tarjetas aisladas. */
.tarvos-dudas-dashboard--v2 .tv-home-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--tv-home-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 9px 28px rgba(45,31,83,.04);
}
.tarvos-dudas-dashboard--v2 .tv-home-summary article {
    min-width: 0;
    display: grid;
    grid-template-columns: 40px minmax(0,1fr);
    gap: 12px;
    align-items: center;
    padding: 17px 20px;
    border-right: 1px solid #ece9f1;
}
.tarvos-dudas-dashboard--v2 .tv-home-summary article:last-child { border-right: 0; }
.tarvos-dudas-dashboard--v2 .tv-home-summary__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f4f0ff;
    color: #7045e9;
}
.tarvos-dudas-dashboard--v2 .tv-home-summary__icon svg { width: 18px; height: 18px; }
.tarvos-dudas-dashboard--v2 .tv-home-summary__icon--green { background: #edf8f3; color: #19805f; }
.tarvos-dudas-dashboard--v2 .tv-home-summary__icon--blue { background: #edf4fb; color: #3f76b6; }
.tarvos-dudas-dashboard--v2 .tv-home-summary__icon--amber { background: #fff6e8; color: #aa6b0a; }
.tarvos-dudas-dashboard--v2 .tv-home-summary article > div { min-width: 0; display: grid; gap: 2px; }
.tarvos-dudas-dashboard--v2 .tv-home-summary strong {
    color: #282535;
    font-size: 1.36rem;
    line-height: 1;
    letter-spacing: -.04em;
}
.tarvos-dudas-dashboard--v2 .tv-home-summary span:not(.tv-home-summary__icon) {
    color: #7d7989;
    font-size: .74rem;
    font-weight: 650;
}

.tarvos-dudas-dashboard--v2 .tv-course-browser {
    overflow: hidden;
    border: 1px solid var(--tv-home-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 42px rgba(45,31,83,.05);
}
.tarvos-dudas-dashboard--v2 .tv-course-browser__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px 20px;
    border-bottom: 1px solid #eeebf2;
}
.tarvos-dudas-dashboard--v2 .tv-course-browser__head > div { min-width: 0; }
.tarvos-dudas-dashboard--v2 .tv-course-browser__kicker {
    color: #7043e7;
    font-size: .69rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.tarvos-dudas-dashboard--v2 .tv-course-browser__head h2 {
    margin: 5px 0 4px;
    color: #201e2d;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    letter-spacing: -.04em;
}
.tarvos-dudas-dashboard--v2 .tv-course-browser__head p {
    max-width: 760px;
    margin: 0;
    color: #7b7788;
    font-size: .82rem;
    line-height: 1.52;
}
.tarvos-dudas-dashboard--v2 .tv-course-browser__export {
    flex: 0 0 auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid #ddd8e7;
    border-radius: 11px;
    background: #fff;
    color: #4f4b5c;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
}
.tarvos-dudas-dashboard--v2 .tv-course-browser__export svg { width: 16px; height: 16px; }
.tarvos-dudas-dashboard--v2 .tv-course-browser__export:hover { border-color: #cdbff1; background: #faf8ff; color: #5d34d2; }

.tarvos-dudas-dashboard--v2 .tv-controls-bar--v2 {
    margin: 0;
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid #efecf3;
    border-radius: 0;
    background: #fbfafd;
    box-shadow: none;
}
.tarvos-dudas-dashboard--v2 .tv-search-wrapper { max-width: 560px; }
.tarvos-dudas-dashboard--v2 .tv-search-input {
    min-height: 42px;
    border: 1px solid #e4e0e9;
    border-radius: 11px;
    background: #fff;
}
.tarvos-dudas-dashboard--v2 .tv-filter-group { background: #f2eff7; }
.tarvos-dudas-dashboard--v2 .tv-filter-btn { min-height: 36px; }

.tarvos-dudas-dashboard--v2 .tv-search-feedback { margin: 12px 18px 0; }
.tarvos-dudas-dashboard--v2 .tv-courses-container { padding: 20px; }
.tarvos-dudas-dashboard--v2 .tv-grid-view {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2 {
    position: relative;
    min-height: 214px;
    overflow: hidden;
    padding: 0;
    border: 1px solid #e7e3ed;
    border-radius: 17px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--tv-subject-color) 4%, #fff) 0%, #fff 34%);
    box-shadow: 0 5px 18px rgba(43,29,78,.035);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.tarvos-dudas-dashboard--v2 .tv-course-card--v2::after { display: none; }
.tarvos-dudas-dashboard--v2 .tv-course-card--v2:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--tv-subject-color) 28%, #ddd7e7);
    box-shadow: 0 14px 34px rgba(43,29,78,.075);
}
.tarvos-dudas-dashboard--v2 .tv-course-card__subject-line {
    display: block;
    width: 100%;
    height: 4px;
    background: var(--tv-subject-color);
    opacity: .9;
}
.tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries .tv-course-card__subject-line {
    background: linear-gradient(90deg, #d68a1e 0 26%, var(--tv-subject-color) 26% 100%);
}
.tarvos-dudas-dashboard--v2 .tv-course-card--v2 .tv-course-card__content {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    padding: 18px 18px 15px;
}
.tarvos-dudas-dashboard--v2 .tv-card-meta--simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.tarvos-dudas-dashboard--v2 .tv-subject-tag {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border: 1px solid color-mix(in srgb, var(--tv-chip-color) 28%, #fff);
    border-radius: 7px;
    background: color-mix(in srgb, var(--tv-chip-color) 9%, #fff);
    color: color-mix(in srgb, var(--tv-chip-color) 82%, #252236);
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.tarvos-dudas-dashboard--v2 .tv-card-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #777382;
    font-size: .69rem;
    font-weight: 760;
}
.tarvos-dudas-dashboard--v2 .tv-card-state i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a5a1ad;
}
.tarvos-dudas-dashboard--v2 .tv-card-state.is-open { color: #477666; }
.tarvos-dudas-dashboard--v2 .tv-card-state.is-open i { background: #31a578; }
.tarvos-dudas-dashboard--v2 .tv-course-name {
    margin-top: 13px;
    color: #1f1c2c;
    font-size: clamp(1.02rem, 1.45vw, 1.2rem);
    font-weight: 820;
    line-height: 1.15;
    letter-spacing: -.035em;
}
.tarvos-dudas-dashboard--v2 .tv-course-activity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 12px 0;
    border-top: 1px solid #eeebf2;
    border-bottom: 1px solid #eeebf2;
}
.tarvos-dudas-dashboard--v2 .tv-course-activity__item {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.tarvos-dudas-dashboard--v2 .tv-course-activity__item span { color: #898593; font-size: .7rem; }
.tarvos-dudas-dashboard--v2 .tv-course-activity__item strong { color: #302d3d; font-size: .93rem; letter-spacing: -.02em; }
.tarvos-dudas-dashboard--v2 .tv-course-activity__item.is-alert strong { color: #a86508; }
.tarvos-dudas-dashboard--v2 .tv-course-activity__item.is-new strong { color: #6338dc; }
.tarvos-dudas-dashboard--v2 .tv-course-activity__divider { width: 1px; height: 22px; background: #ebe8ef; }
.tarvos-dudas-dashboard--v2 .tv-card-actions--v2 { margin-top: auto; padding-top: 13px; }
.tarvos-dudas-dashboard--v2 .tv-course-enter {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #554f61;
    font-size: .78rem;
    font-weight: 820;
    text-decoration: none;
}
.tarvos-dudas-dashboard--v2 .tv-course-enter svg { color: #8262e9; transition: transform .16s ease; }
.tarvos-dudas-dashboard--v2 .tv-course-enter:hover { color: #5b32d3; }
.tarvos-dudas-dashboard--v2 .tv-course-enter:hover svg { transform: translateX(3px); }
.tarvos-dudas-dashboard--v2 .tv-course-search-matches:not([hidden]) { margin-top: 10px; }

@media (max-width: 1080px) {
    .tarvos-dudas-dashboard--v2 .tv-home-hero { grid-template-columns: 1fr; }
    .tarvos-dudas-dashboard--v2 .tv-home-status { max-width: 520px; }
    .tarvos-dudas-dashboard--v2 .tv-home-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tarvos-dudas-dashboard--v2 .tv-home-summary article:nth-child(2) { border-right: 0; }
    .tarvos-dudas-dashboard--v2 .tv-home-summary article:nth-child(-n+2) { border-bottom: 1px solid #ece9f1; }
    .tarvos-dudas-dashboard--v2 .tv-grid-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .stats-pro-timeline__row { grid-template-columns: 84px minmax(100px, 1fr) 42px; gap: 9px; }
    .stats-pro-timeline__row > small { display: none; }
    .stats-pro-history-summary { grid-template-columns: 1fr; }
    .stats-pro-history-summary > div { border-right: 0; border-bottom: 1px solid #ebe8f1; }
    .stats-pro-history-summary > div:last-child { border-bottom: 0; }

    .tarvos-dudas-dashboard--v2 .tv-home-hero { padding: 26px 20px; border-radius: 21px; }
    .tarvos-dudas-dashboard--v2 .tv-home-hero h1 { font-size: 2.35rem; }
    .tarvos-dudas-dashboard--v2 .tv-home-summary { grid-template-columns: 1fr 1fr; }
    .tarvos-dudas-dashboard--v2 .tv-course-browser { border-radius: 19px; }
    .tarvos-dudas-dashboard--v2 .tv-course-browser__head { align-items: flex-start; padding: 21px 18px 16px; }
    .tarvos-dudas-dashboard--v2 .tv-course-browser__head p { display: none; }
    .tarvos-dudas-dashboard--v2 .tv-controls-bar--v2 { padding: 12px; }
    .tarvos-dudas-dashboard--v2 .tv-search-wrapper { max-width: none; }
    .tarvos-dudas-dashboard--v2 .tv-courses-container { padding: 13px; }
    .tarvos-dudas-dashboard--v2 .tv-grid-view { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 480px) {
    .tarvos-dudas-dashboard--v2 .tv-home-summary article { grid-template-columns: 34px minmax(0,1fr); padding: 14px 12px; gap: 9px; }
    .tarvos-dudas-dashboard--v2 .tv-home-summary__icon { width: 33px; height: 33px; border-radius: 10px; }
    .tarvos-dudas-dashboard--v2 .tv-home-summary strong { font-size: 1.16rem; }
    .tarvos-dudas-dashboard--v2 .tv-course-browser__export { padding-inline: 10px; }
}

/* =========================================================
   2026-09-18 v3 — Portada docente: directorio como primer nivel
   Header y footer globales se mantienen sin cambios.
   ========================================================= */
.tarvos-dudas-dashboard--v2 .tv-course-browser--teacher {
    border-radius: 26px;
    box-shadow: 0 18px 52px rgba(45,31,83,.06);
}

.tarvos-dudas-dashboard--v2 .tv-course-browser--teacher .tv-course-browser__head {
    align-items: center;
    padding: clamp(25px, 3vw, 34px) clamp(22px, 3.2vw, 34px) 22px;
    background: linear-gradient(180deg, #fff 0%, #fdfcff 100%);
}

.tarvos-dudas-dashboard--v2 .tv-course-browser--teacher .tv-course-browser__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tarvos-dudas-dashboard--v2 .tv-course-browser--teacher .tv-course-browser__kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #7350e9;
    box-shadow: 0 0 0 5px rgba(109,61,245,.075);
}
.tarvos-dudas-dashboard--v2 .tv-course-browser--teacher .tv-course-browser__head h2 {
    margin-top: 7px;
    font-size: clamp(1.65rem, 2.4vw, 2.2rem);
    letter-spacing: -.045em;
}
.tarvos-dudas-dashboard--v2 .tv-course-browser--teacher .tv-course-browser__head p {
    max-width: 820px;
    font-size: .86rem;
}

/* Los indicadores forman parte del directorio: sin tarjeta exterior ni sombra propia. */
.tarvos-dudas-dashboard--v2 .tv-home-summary--integrated {
    border: 0;
    border-bottom: 1px solid #ece9f1;
    border-radius: 0;
    background: #fbfafd;
    box-shadow: none;
}
.tarvos-dudas-dashboard--v2 .tv-home-summary--integrated article {
    min-height: 82px;
    padding: 17px clamp(16px, 2.2vw, 24px);
    background: transparent;
}
.tarvos-dudas-dashboard--v2 .tv-home-summary--integrated article.is-attention {
    background: linear-gradient(135deg, #fffaf1 0%, #fff 100%);
}
.tarvos-dudas-dashboard--v2 .tv-home-summary--integrated article.is-attention .tv-home-summary__icon {
    background: #fff0d7;
    color: #9c6109;
}
.tarvos-dudas-dashboard--v2 .tv-home-summary--integrated article.is-attention strong {
    color: #9c6109;
}
.tarvos-dudas-dashboard--v2 .tv-home-summary--integrated strong {
    font-size: 1.48rem;
}
.tarvos-dudas-dashboard--v2 .tv-home-summary--integrated span:not(.tv-home-summary__icon) {
    line-height: 1.35;
}

.tarvos-dudas-dashboard--v2 .tv-sync-banner--integrated {
    margin: 16px 18px 0;
}

@media (max-width: 1080px) {
    .tarvos-dudas-dashboard--v2 .tv-home-summary--integrated {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tarvos-dudas-dashboard--v2 .tv-home-summary--integrated article:nth-child(2) {
        border-right: 0;
    }
    .tarvos-dudas-dashboard--v2 .tv-home-summary--integrated article:nth-child(-n+2) {
        border-bottom: 1px solid #ece9f1;
    }
}

@media (max-width: 760px) {
    .tarvos-dudas-dashboard--v2 .tv-course-browser--teacher {
        border-radius: 19px;
    }
    .tarvos-dudas-dashboard--v2 .tv-course-browser--teacher .tv-course-browser__head {
        align-items: flex-start;
        padding: 22px 18px 18px;
    }
    .tarvos-dudas-dashboard--v2 .tv-course-browser--teacher .tv-course-browser__head h2 {
        font-size: 1.7rem;
    }
    .tarvos-dudas-dashboard--v2 .tv-home-summary--integrated {
        grid-template-columns: 1fr 1fr;
    }
    .tarvos-dudas-dashboard--v2 .tv-home-summary--integrated article {
        min-height: 72px;
    }
    .tarvos-dudas-dashboard--v2 .tv-sync-banner--integrated {
        margin: 12px 12px 0;
    }
}

@media (max-width: 480px) {
    .tarvos-dudas-dashboard--v2 .tv-home-summary--integrated article {
        padding: 13px 11px;
    }
    .tarvos-dudas-dashboard--v2 .tv-home-summary--integrated strong {
        font-size: 1.18rem;
    }
}

/* ==========================================================
   UX OVERHAUL · 2026-09-22
   Login, OAuth transition, availability settings & responsive
   ========================================================== */

/* ---------- Login: professional, focused, responsive ---------- */
body[data-page="login"] .auth-shell {
    min-height: 100svh !important;
    align-items: stretch !important;
    padding: 0 !important;
    background:
        radial-gradient(circle at 15% 18%, rgba(109, 61, 245, .10), transparent 30rem),
        radial-gradient(circle at 90% 12%, rgba(124, 85, 247, .11), transparent 27rem),
        linear-gradient(180deg, #fbfaff 0%, #f8f7fc 100%) !important;
}
body[data-page="login"] .auth-shell__panel {
    width: 100% !important;
    max-width: none !important;
}
body[data-page="login"] .flash-stack--auth {
    width: min(1180px, calc(100% - 40px));
    margin: 18px auto 0;
}
.tarvos-access {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 56px;
    color: #171526;
}
.tarvos-access *, .tarvos-access *::before, .tarvos-access *::after { box-sizing: border-box; }
.tarvos-access__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 0 24px;
    border-bottom: 1px solid rgba(56, 43, 91, .10);
}
.tarvos-access__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}
.tarvos-access__brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid #e6e1f0;
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 8px 24px rgba(56, 39, 98, .07);
}
.tarvos-access__brand-mark img { width: 35px; height: 35px; object-fit: contain; }
.tarvos-access__brand > span:last-child { display: grid; gap: 1px; }
.tarvos-access__brand strong { color: #171526; font-size: .96rem; letter-spacing: -.02em; }
.tarvos-access__brand small { color: #858195; font-size: .76rem; }
.tarvos-access__security {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e2eb;
    border-radius: 999px;
    background: rgba(255,255,255,.88);
    color: #676474;
    font-size: .82rem;
    font-weight: 650;
    box-shadow: 0 5px 18px rgba(45, 34, 79, .035);
}
.tarvos-access__security i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #14a36f;
    box-shadow: 0 0 0 4px rgba(20, 163, 111, .10);
}
.tarvos-access__stage {
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, .72fr);
    gap: clamp(44px, 7vw, 96px);
    align-items: center;
    padding: clamp(44px, 7vw, 86px) 0 44px;
}
.tarvos-access__intro { max-width: 675px; }
.tarvos-access__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    margin-bottom: 18px;
    border: 1px solid #dfd6ff;
    border-radius: 999px;
    background: #f4f0ff;
    color: #6541df;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .085em;
    text-transform: uppercase;
}
.tarvos-access__intro h1 {
    max-width: 720px;
    margin: 0;
    color: #15131f;
    font-size: clamp(2.65rem, 5vw, 4.65rem);
    font-weight: 760;
    line-height: .98;
    letter-spacing: -.058em;
    text-wrap: balance;
}
.tarvos-access__lead {
    max-width: 635px;
    margin: 24px 0 0;
    color: #666274;
    font-size: clamp(1rem, 1.6vw, 1.12rem);
    line-height: 1.72;
}
.tarvos-access__benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 32px;
}
.tarvos-access__benefits article {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(223, 219, 233, .95);
    border-radius: 16px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 10px 30px rgba(45, 31, 82, .035);
}
.tarvos-access__benefit-icon {
    display: inline-grid;
    place-items: center;
    width: 31px;
    height: 31px;
    margin-bottom: 12px;
    border-radius: 9px;
    background: #eee9ff;
    color: #6341db;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: .72rem;
    font-weight: 800;
}
.tarvos-access__benefits strong { display: block; color: #24212f; font-size: .9rem; }
.tarvos-access__benefits small { display: block; margin-top: 5px; color: #777384; font-size: .78rem; line-height: 1.48; }
.tarvos-access__card {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border: 1px solid #e3deeb;
    border-radius: 24px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 28px 70px rgba(50, 32, 96, .12), 0 4px 15px rgba(40, 28, 74, .045);
}
.tarvos-access__card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #6d3df5, #8a68f8 55%, #b5a1ff);
}
.tarvos-access__card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
}
.tarvos-access__card-kicker {
    color: #777282;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.tarvos-access__private-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f2f9f5;
    color: #26795b;
    font-size: .74rem;
    font-weight: 750;
}
.tarvos-access__card-copy h2 {
    margin: 0;
    color: #1b1825;
    font-size: 2rem;
    letter-spacing: -.045em;
}
.tarvos-access__card-copy p {
    margin: 10px 0 24px;
    color: #6d6979;
    font-size: .94rem;
    line-height: 1.58;
}
.tarvos-access__google-button {
    display: grid;
    grid-template-columns: 26px 1fr 22px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 58px;
    padding: 0 16px;
    border: 1px solid #d8d3e2;
    border-radius: 14px;
    background: #fff;
    color: #202124;
    text-decoration: none;
    font-size: .94rem;
    font-weight: 720;
    box-shadow: 0 4px 14px rgba(35, 26, 61, .045);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tarvos-access__google-button:hover {
    transform: translateY(-1px);
    border-color: #a99acf;
    box-shadow: 0 10px 24px rgba(70, 47, 125, .09);
}
.tarvos-access__google-button:focus-visible,
.tarvos-access__brand:focus-visible,
.tarvos-access__card-footer a:focus-visible {
    outline: 3px solid rgba(109,61,245,.22);
    outline-offset: 3px;
}
.tarvos-access__google-icon { display: inline-flex; }
.tarvos-access__arrow { width: 19px; height: 19px; justify-self: end; color: #8e8999; }
.tarvos-access__return-note,
.tarvos-access__account-note {
    margin: 12px 0 0;
    color: #777282;
    font-size: .8rem;
    line-height: 1.5;
}
.tarvos-access__loading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 13px;
    color: #625d70;
    font-size: .82rem;
}
.tarvos-access__spinner,
.access-check-modal__spinner {
    width: 15px;
    height: 15px;
    border: 2px solid #e5e0ee;
    border-top-color: #6d3df5;
    border-radius: 50%;
    animation: tarvosAccessSpin .7s linear infinite;
}
@keyframes tarvosAccessSpin { to { transform: rotate(360deg); } }
.tarvos-access__notice {
    display: grid;
    grid-template-columns: 21px minmax(0,1fr);
    gap: 11px;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #ece8f2;
    border-radius: 13px;
    background: #faf9fc;
    color: #6b6776;
    font-size: .8rem;
    line-height: 1.5;
}
.tarvos-access__notice svg { width: 20px; height: 20px; color: #6d3df5; }
.tarvos-access__notice strong { color: #34303e; }
.tarvos-access__card-footer {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid #eeebf2;
    color: #9793a0;
    font-size: .75rem;
}
.tarvos-access__card-footer a { color: #6a6474; font-weight: 700; text-decoration: none; }
.tarvos-access__card-footer a:hover { color: #5f36db; }

/* ---------- OAuth callback: modal-style transition ---------- */
body[data-page="auth-loading"] {
    min-height: 100svh;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 35%, rgba(109,61,245,.14), transparent 25rem),
        linear-gradient(145deg, #faf9ff 0%, #f3f0fb 100%) !important;
}
body[data-page="auth-loading"] .auth-shell {
    min-height: 100svh !important;
    display: grid !important;
    place-items: center !important;
    padding: 20px !important;
    background: transparent !important;
}
body[data-page="auth-loading"] .auth-shell__panel { width: 100% !important; max-width: none !important; }
body[data-page="auth-loading"] .tarvos-footer-premium,
body[data-page="auth-loading"] .tarvos-cookie-banner { display: none !important; }
.access-check-screen {
    min-height: calc(100svh - 40px);
    display: grid;
    place-items: center;
}
.access-check-modal {
    width: min(430px, 100%);
    padding: 34px 32px 30px;
    border: 1px solid #e2ddea;
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 30px 80px rgba(51, 33, 92, .15), 0 4px 16px rgba(46, 31, 79, .05);
    text-align: center;
}
.access-check-modal__brand {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border: 1px solid #e5dff0;
    border-radius: 18px;
    background: #f8f5ff;
}
.access-check-modal__brand img { width: 45px; height: 45px; object-fit: contain; }
.access-check-modal__kicker {
    display: block;
    margin-bottom: 9px;
    color: #7657d9;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.access-check-modal h1 {
    margin: 0;
    color: #1d1926;
    font-size: clamp(1.5rem, 5vw, 1.9rem);
    letter-spacing: -.045em;
}
.access-check-modal p {
    margin: 12px auto 0;
    max-width: 340px;
    color: #716c7b;
    font-size: .9rem;
    line-height: 1.58;
}
.access-check-modal__progress {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 24px 0 20px;
}
.access-check-modal__progress span {
    width: 34px;
    height: 5px;
    border-radius: 999px;
    background: #e7e1f0;
    animation: tarvosProgress 1.15s ease-in-out infinite;
}
.access-check-modal__progress span:nth-child(2) { animation-delay: .14s; }
.access-check-modal__progress span:nth-child(3) { animation-delay: .28s; }
@keyframes tarvosProgress {
    0%, 100% { background: #e7e1f0; transform: scaleX(.82); }
    50% { background: #7a50ef; transform: scaleX(1); }
}
.access-check-modal__status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f7f5fb;
    color: #777180;
    font-size: .77rem;
    font-weight: 700;
}
.access-check-modal__retry { margin-top: 18px; }

/* ---------- Settings IA: availability first ---------- */
.settings-sidebar .settings-tab--priority {
    border: 1px solid #dfd6ff !important;
    background: #faf8ff !important;
}
.settings-sidebar .settings-tab--priority.is-active {
    border-color: #ccbfff !important;
    background: linear-gradient(135deg, #eee9ff, #f6f3ff) !important;
    box-shadow: inset 3px 0 0 #6d3df5 !important;
}
.settings-section-heading--availability .panel__text { max-width: 900px !important; }
.availability-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
}
.availability-stat {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 14px;
    min-width: 0;
    padding: 15px 17px;
    border: 1px solid #e7e4ec;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(34, 25, 61, .035);
}
.availability-stat > span {
    color: #777381;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.availability-stat strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    color: #2c2835;
    font-size: 1.85rem;
    line-height: 1;
}
.availability-stat small { color: #92909b; font-size: .75rem; }
.availability-stat--open { border-color: #d9ebdf; background: #f8fcf9; }
.availability-stat--open strong { color: #18815d; }
.availability-stat--closed { border-color: #ebe6ee; background: #fbfafc; }
.availability-stat--closed strong { color: #6a6571; }
.availability-command {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.availability-command__copy { max-width: 720px; }
.availability-command__copy .panel__title { margin: 2px 0 5px; }
.availability-command__copy .panel__text { margin: 0; }
.availability-command__actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.availability-command__actions form { margin: 0; }
.availability-manager { overflow: hidden; }
.availability-manager__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #efedf2;
}
.availability-manager__header > div { max-width: 720px; }
.availability-manager__header .panel__title { margin: 2px 0 5px; }
.availability-manager__header .panel__text { margin: 0; }
.availability-search {
    position: relative;
    flex: 0 1 310px;
    min-width: 230px;
}
.availability-search svg {
    position: absolute;
    left: 13px;
    top: 50%;
    width: 18px;
    height: 18px;
    color: #8c8796;
    transform: translateY(-50%);
    pointer-events: none;
}
.availability-search input {
    width: 100%;
    min-height: 44px;
    padding: 0 13px 0 40px;
    border: 1px solid #ded9e6;
    border-radius: 12px;
    background: #fff;
    color: #302c38;
    font: inherit;
    font-size: .86rem;
    outline: none;
}
.availability-search input:focus { border-color: #8b68f2; box-shadow: 0 0 0 4px rgba(109,61,245,.10); }
.availability-bulk-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 14px 0;
    padding: 11px 12px;
    border: 1px solid #ebe8ef;
    border-radius: 13px;
    background: #faf9fc;
}
.availability-bulk-form.has-selection { border-color: #d9cff9; background: #f8f5ff; }
.availability-bulk-form__summary { display: grid; gap: 2px; min-width: 170px; }
.availability-bulk-form__summary strong { color: #3b3546; font-size: .84rem; }
.availability-bulk-form__summary span { color: #928e9b; font-size: .73rem; }
.availability-bulk-form__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.availability-course-list { display: grid; gap: 8px; }
.availability-course {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #ebe8ef;
    border-radius: 13px;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.availability-course:hover { border-color: #dcd3f6; box-shadow: 0 7px 18px rgba(48, 35, 82, .045); }
.availability-course__select { display: grid; place-items: center; }
.availability-course__select input {
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: #6d3df5;
    cursor: pointer;
}
.availability-course__main { min-width: 0; }
.availability-course__title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.availability-course__title strong {
    overflow: hidden;
    color: #302c38;
    font-size: .91rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.availability-course__main p { margin: 4px 0 0; color: #898592; font-size: .77rem; line-height: 1.4; }
.availability-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f4f2f6;
    color: #77717d;
    font-size: .69rem;
    font-weight: 800;
}
.availability-state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.availability-state--open { background: #eef8f2; color: #207b5b; }
.availability-state--closed { background: #f2f0f3; color: #7d7781; }
.availability-course__action { margin: 0; }
.availability-course__action .topbar-button { white-space: nowrap; }
.availability-empty {
    padding: 26px 16px 8px;
    color: #85808f;
    text-align: center;
    font-size: .88rem;
}

/* ---------- Cross-app responsive hardening ---------- */
.settings-table-wrap,
.stats-table-wrap,
.issue-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
img, video, canvas, svg { max-width: 100%; }
.topbar-button, button, input, select, textarea { max-width: 100%; }

@media (max-width: 980px) {
    .tarvos-access__stage {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 34px;
        padding-top: 48px;
    }
    .tarvos-access__intro { max-width: 780px; }
    .tarvos-access__intro h1 { max-width: 800px; font-size: clamp(2.65rem, 8vw, 4.4rem); }
    .tarvos-access__card { width: min(620px, 100%); }
    .availability-command,
    .availability-manager__header { align-items: stretch; flex-direction: column; }
    .availability-command__actions { justify-content: flex-start; }
    .availability-search { width: 100%; min-width: 0; flex-basis: auto; }
    .availability-bulk-form { align-items: stretch; flex-direction: column; }
    .availability-bulk-form__actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
    .tarvos-access { width: calc(100% - 28px); padding: 18px 0 36px; }
    .tarvos-access__header { padding-bottom: 17px; }
    .tarvos-access__security { font-size: 0; width: 36px; min-width: 36px; padding: 0; justify-content: center; }
    .tarvos-access__security i { width: 8px; height: 8px; }
    .tarvos-access__stage { gap: 26px; padding: 34px 0 18px; }
    .tarvos-access__intro h1 { font-size: clamp(2.3rem, 12vw, 3.45rem); line-height: 1.01; }
    .tarvos-access__lead { margin-top: 18px; font-size: .98rem; line-height: 1.62; }
    .tarvos-access__benefits { grid-template-columns: 1fr; gap: 8px; margin-top: 24px; }
    .tarvos-access__benefits article {
        display: grid;
        grid-template-columns: 35px minmax(0,1fr);
        gap: 12px;
        align-items: start;
        padding: 12px 13px;
    }
    .tarvos-access__benefit-icon { margin: 0; }
    .tarvos-access__card { padding: 24px 18px 20px; border-radius: 19px; }
    .tarvos-access__card-copy h2 { font-size: 1.72rem; }
    .tarvos-access__google-button { min-height: 56px; }
    .access-check-modal { padding: 28px 20px 24px; border-radius: 20px; }

    .availability-overview { grid-template-columns: 1fr; }
    .availability-stat { min-height: 74px; }
    .availability-command__actions,
    .availability-command__actions form,
    .availability-command__actions .topbar-button { width: 100%; }
    .availability-bulk-form__actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .availability-bulk-form__actions .topbar-button { width: 100%; }
    .availability-course {
        grid-template-columns: 30px minmax(0,1fr);
        align-items: start;
    }
    .availability-course__action {
        grid-column: 2;
        width: 100%;
    }
    .availability-course__action .topbar-button { width: 100%; }
    .availability-course__title { align-items: flex-start; flex-direction: column; gap: 6px; }
    .availability-course__title strong { white-space: normal; }

    .app-shell--topnav .app-topbar {
        padding: 9px 11px !important;
        gap: 8px !important;
    }
    .app-brand__copy small,
    .app-topbar__actions .app-user__copy { display: none !important; }
    .app-brand__mark { width: 38px !important; height: 38px !important; }
    .app-nav { width: 100% !important; order: 3; overflow-x: auto; justify-content: flex-start !important; }
    .app-nav__link { flex: 0 0 auto; min-height: 38px !important; }
    .app-topbar__actions { gap: 6px !important; }
    .app-health { min-width: 0; }
    .app-health__copy strong { display: none; }
    .app-health__copy small { font-size: .73rem; }
    .app-user { padding: 0 !important; }
    .app-user__avatar { width: 36px !important; height: 36px !important; }
    .app-content--topnav { width: calc(100% - 18px) !important; padding-top: 18px !important; }

    .settings-page--compact .settings-card--premium,
    .settings-page--compact .settings-card--premium-soft,
    .settings-page--compact .settings-access-panel--premium { padding: 14px !important; }
}

@media (max-width: 480px) {
    .tarvos-access__brand small { display: none; }
    .tarvos-access__intro h1 { font-size: clamp(2.15rem, 12.5vw, 2.9rem); }
    .tarvos-access__eyebrow { max-width: 100%; white-space: normal; line-height: 1.35; padding-block: 7px; }
    .availability-bulk-form__actions { grid-template-columns: 1fr; }
    .settings-sidebar .settings-tab { min-height: 40px !important; }
    .settings-command-header__copy h2 { font-size: 1.6rem !important; }
}

@media (prefers-reduced-motion: reduce) {
    .tarvos-access__google-button,
    .availability-course,
    .access-check-modal__progress span { transition: none !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ============================================================
   2026-09-22 · Cuota diaria visible para alumnado
   ============================================================ */
.course-quota-card {
    --quota-accent: #6d3df5;
    --quota-accent-soft: #eee9ff;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    margin-top: 12px;
    padding: 14px 15px;
    border: 1px solid #ddd6f3;
    border-radius: 16px;
    background: linear-gradient(135deg, #fbfaff 0%, #f7f4ff 100%);
    box-shadow: 0 7px 22px rgba(72, 49, 128, .05);
}
.course-quota-card.is-low {
    --quota-accent: #b86a12;
    --quota-accent-soft: #fff3df;
    border-color: #f1d6ad;
    background: linear-gradient(135deg, #fffdf8 0%, #fff8ec 100%);
}
.course-quota-card.is-exhausted {
    --quota-accent: #a83e50;
    --quota-accent-soft: #fff0f3;
    border-color: #efcbd2;
    background: linear-gradient(135deg, #fffafb 0%, #fff4f6 100%);
}
.course-quota-card__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--quota-accent-soft);
    color: var(--quota-accent);
}
.course-quota-card__icon svg { width: 22px; height: 22px; }
.course-quota-card__body { min-width: 0; display: grid; gap: 3px; }
.course-quota-card__eyebrow {
    color: var(--quota-accent);
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.course-quota-card__title {
    color: #262232;
    font-size: .88rem;
    line-height: 1.32;
}
.course-quota-card__title b { color: var(--quota-accent); font-size: 1rem; }
.course-quota-card__body p {
    margin: 0;
    color: #777181;
    font-size: .72rem;
    line-height: 1.45;
}
.course-quota-card__track {
    height: 5px;
    overflow: hidden;
    margin-top: 6px;
    border-radius: 999px;
    background: #e9e5ef;
}
.course-quota-card__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--quota-accent);
    transition: width .2s ease;
}
.course-quota-card__number {
    min-width: 68px;
    display: grid;
    justify-items: center;
    align-content: center;
    padding-left: 12px;
    border-left: 1px solid #e4dff0;
}
.course-quota-card__number strong {
    color: var(--quota-accent);
    font-size: 1.55rem;
    line-height: 1;
    letter-spacing: -.05em;
}
.course-quota-card__number span {
    margin-top: 4px;
    color: #8a8492;
    font-size: .62rem;
    font-weight: 750;
}
.course-pro-new-question.is-quota-locked,
.course-pro-toolbar__new.is-quota-locked {
    border-color: #ddd8e5;
    background: #f3f1f5;
    color: #7e7887;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 1;
}
.course-pro-new-question.is-quota-locked > span:first-child {
    background: #e7e3eb;
    color: #77717f;
}
.course-pro-new-question.is-quota-locked small { color: #928c99; }
.course-pro-toolbar__new > span {
    margin-left: 5px;
    padding-left: 7px;
    border-left: 1px solid rgba(255,255,255,.28);
    font-size: .68rem;
    opacity: .82;
}

.tarvos-dudas-dashboard--v2 .tv-course-quota {
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    padding: 6px 9px;
    border: 1px solid #ddd7f0;
    border-radius: 9px;
    background: #f8f6ff;
    color: #5f39c8;
    font-size: .68rem;
    line-height: 1.25;
}
.tarvos-dudas-dashboard--v2 .tv-course-quota__dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #6d3df5;
    box-shadow: 0 0 0 3px rgba(109,61,245,.10);
}
.tarvos-dudas-dashboard--v2 .tv-course-quota strong { font-weight: 850; }
.tarvos-dudas-dashboard--v2 .tv-course-quota > span:last-child { color: #8b7780; font-weight: 700; }
.tarvos-dudas-dashboard--v2 .tv-course-quota.is-low {
    border-color: #efd8b3;
    background: #fff8ed;
    color: #986016;
}
.tarvos-dudas-dashboard--v2 .tv-course-quota.is-low .tv-course-quota__dot { background: #d18a2a; box-shadow: 0 0 0 3px rgba(209,138,42,.12); }
.tarvos-dudas-dashboard--v2 .tv-course-quota.is-exhausted {
    border-color: #edcdd3;
    background: #fff5f7;
    color: #9e3c4e;
}
.tarvos-dudas-dashboard--v2 .tv-course-quota.is-exhausted .tv-course-quota__dot { background: #c94c62; box-shadow: 0 0 0 3px rgba(201,76,98,.11); }

@media (max-width: 760px) {
    .course-quota-card {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
        padding: 13px;
        border-radius: 14px;
    }
    .course-quota-card__icon { width: 40px; height: 40px; border-radius: 11px; }
    .course-quota-card__number {
        grid-column: 2;
        min-width: 0;
        display: flex;
        justify-content: flex-start;
        gap: 6px;
        padding: 0;
        border-left: 0;
    }
    .course-quota-card__number strong { font-size: 1rem; }
    .course-quota-card__number span { margin-top: 0; align-self: center; }
}

@media (max-width: 480px) {
    .tarvos-dudas-dashboard--v2 .tv-course-quota {
        width: 100%;
        flex-wrap: wrap;
    }
}

html[data-theme='dark'] .course-quota-card {
    border-color: #4a405f;
    background: linear-gradient(135deg, #24202f 0%, #292238 100%);
    box-shadow: none;
}
html[data-theme='dark'] .course-quota-card.is-low {
    border-color: #644f32;
    background: linear-gradient(135deg, #29251f 0%, #322719 100%);
}
html[data-theme='dark'] .course-quota-card.is-exhausted {
    border-color: #69404a;
    background: linear-gradient(135deg, #2d2227 0%, #352128 100%);
}
html[data-theme='dark'] .course-quota-card__title { color: #f3eff8; }
html[data-theme='dark'] .course-quota-card__body p,
html[data-theme='dark'] .course-quota-card__number span { color: #b9b1c4; }
html[data-theme='dark'] .course-quota-card__track { background: #443b50; }
html[data-theme='dark'] .course-quota-card__number { border-left-color: #4b4256; }
html[data-theme='dark'] .course-pro-new-question.is-quota-locked,
html[data-theme='dark'] .course-pro-toolbar__new.is-quota-locked {
    border-color: #4b4553;
    background: #302b35;
    color: #aaa3b3;
}
html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-course-quota {
    border-color: #4b4162;
    background: #292335;
    color: #c9b8ff;
}
html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-course-quota.is-low {
    border-color: #645034;
    background: #30281c;
    color: #e2b36c;
}
html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-course-quota.is-exhausted {
    border-color: #68434c;
    background: #322329;
    color: #e8a2af;
}

/* 2026-09-29 — Empty-answer state: full-width and readable in the course detail.
   A later .course-mail-detail .thread-response rule reserves an avatar column;
   empty responses have no avatar, so explicitly collapse back to one column. */
.course-page .course-mail-detail .thread-response--empty,
.course-mail-detail .thread-response--empty,
.course-page .thread-response--empty {
    display: block !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.course-page .thread-response--empty .thread-response__empty-copy,
.course-mail-detail .thread-response--empty .thread-response__empty-copy {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 14px;
}

.course-page .thread-response--empty .thread-response__empty-copy strong,
.course-mail-detail .thread-response--empty .thread-response__empty-copy strong {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: .88rem;
    line-height: 1.35;
}

.course-page .thread-response--empty .thread-response__empty-copy p,
.course-mail-detail .thread-response--empty .thread-response__empty-copy p {
    flex: 1 1 360px;
    min-width: 240px;
    font-size: .82rem;
    line-height: 1.45;
}

.thread-response__empty-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: #aeb7c2;
    box-shadow: 0 0 0 4px rgba(174, 183, 194, .15);
}

@media (max-width: 640px) {
    .course-page .thread-response--empty .thread-response__empty-copy,
    .course-mail-detail .thread-response--empty .thread-response__empty-copy {
        display: grid;
        gap: 6px;
    }

    .course-page .thread-response--empty .thread-response__empty-copy p,
    .course-mail-detail .thread-response--empty .thread-response__empty-copy p {
        min-width: 0;
    }
}

/* =========================================================
   2026-10-01 — Directorio docente compacto + cursos ocultos
   La visibilidad es una preferencia personal del profesorado.
   ========================================================= */
.tarvos-dudas-dashboard--v2 .tv-grid-view {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2 {
    min-height: 188px;
    border-radius: 15px;
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2 .tv-course-card__content {
    min-height: 184px;
    padding: 14px 14px 12px;
}

.tarvos-dudas-dashboard--v2 .tv-course-name {
    margin-top: 10px;
    font-size: clamp(.94rem, 1.12vw, 1.08rem);
    line-height: 1.16;
}

.tarvos-dudas-dashboard--v2 .tv-course-activity {
    gap: 8px;
    margin-top: 14px;
    padding: 9px 0;
}

.tarvos-dudas-dashboard--v2 .tv-course-activity__item {
    gap: 4px;
}

.tarvos-dudas-dashboard--v2 .tv-course-activity__item span {
    font-size: .66rem;
}

.tarvos-dudas-dashboard--v2 .tv-course-activity__item strong {
    font-size: .86rem;
}

.tarvos-dudas-dashboard--v2 .tv-card-actions--v2 {
    padding-top: 9px;
}

.tarvos-dudas-dashboard--v2 .tv-card-meta__right {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.tarvos-dudas-dashboard--v2 .tv-course-visibility-toggle {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #e5e1eb;
    border-radius: 9px;
    background: rgba(255,255,255,.88);
    color: #7a7486;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(44,35,65,.025);
    transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease, opacity .16s ease;
}

.tarvos-dudas-dashboard--v2 .tv-course-visibility-toggle:hover {
    color: #6038d6;
    border-color: #cfc2ee;
    background: #f8f5ff;
    transform: translateY(-1px);
}

.tarvos-dudas-dashboard--v2 .tv-course-visibility-toggle:focus-visible {
    outline: 3px solid rgba(109,61,245,.18);
    outline-offset: 2px;
}

.tarvos-dudas-dashboard--v2 .tv-course-visibility-toggle:disabled,
.tarvos-dudas-dashboard--v2 .tv-course-visibility-toggle.is-loading {
    cursor: wait;
    opacity: .48;
    transform: none;
}

.tarvos-dudas-dashboard--v2 .tv-visibility-icon {
    width: 16px;
    height: 16px;
}

.tarvos-dudas-dashboard--v2 .tv-visibility-icon--eye { display: none; }
.tarvos-dudas-dashboard--v2 .tv-visibility-icon--eye-off { display: block; }
.tarvos-dudas-dashboard--v2 .tv-course-visibility-toggle.is-hidden-course .tv-visibility-icon--eye { display: block; }
.tarvos-dudas-dashboard--v2 .tv-course-visibility-toggle.is-hidden-course .tv-visibility-icon--eye-off { display: none; }

.tarvos-dudas-dashboard--v2 .tv-course-card--v2.is-staff-hidden {
    border-style: dashed;
    background: linear-gradient(180deg, #faf9fc 0%, #fff 42%);
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2.is-staff-hidden .tv-course-card__subject-line {
    opacity: .42;
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2.is-staff-hidden .tv-course-visibility-toggle {
    color: #6038d6;
    border-color: #d7cdf0;
    background: #f8f5ff;
}

.tarvos-dudas-dashboard--v2 .tv-filter-btn--hidden.is-active {
    color: #5f38d3 !important;
}

.tarvos-dudas-dashboard--v2 .tv-course-visibility-toast:not([hidden]) {
    margin: 12px 18px 0;
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid #d9d0ef;
    border-radius: 11px;
    background: #f8f5ff;
    color: #5336a9;
    font-size: .76rem;
    font-weight: 740;
    box-shadow: 0 6px 20px rgba(49,35,79,.045);
}

.tarvos-dudas-dashboard--v2 .tv-course-visibility-toast.is-error:not([hidden]) {
    border-color: #f0c7c7;
    background: #fff6f6;
    color: #a33a3a;
}

.tarvos-dudas-dashboard--v2 .tv-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1280px) {
    .tarvos-dudas-dashboard--v2 .tv-grid-view {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .tarvos-dudas-dashboard--v2 .tv-grid-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .tarvos-dudas-dashboard--v2 .tv-grid-view {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .tarvos-dudas-dashboard--v2 .tv-course-card--v2,
    .tarvos-dudas-dashboard--v2 .tv-course-card--v2 .tv-course-card__content {
        min-height: 0;
    }
}

html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-course-visibility-toggle {
    border-color: #34303d;
    background: #1d1a23;
    color: #aaa3b5;
}

html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-course-visibility-toggle:hover,
html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-course-visibility-toggle.is-hidden-course {
    border-color: #65538d;
    background: #292235;
    color: #bea7ff;
}

html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-course-card--v2.is-staff-hidden {
    background: linear-gradient(180deg, #1c1921 0%, #17151b 42%);
}

html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-course-visibility-toast:not([hidden]) {
    border-color: #554573;
    background: #282131;
    color: #c6b4f5;
}

/* 2026-10-01 · Nombres visibles de las secciones de dudas */
.settings-course-names-table td:first-child {
    min-width: 260px;
}

.settings-course-names-table td:first-child strong,
.settings-course-name-key {
    display: block;
}

.settings-course-name-key {
    margin-top: 3px;
    font-size: .72rem !important;
    opacity: .72;
    overflow-wrap: anywhere;
}

.settings-course-names-table .settings-input {
    width: 100%;
    min-width: 260px;
}

.settings-course-names-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
}

@media (max-width: 720px) {
    .settings-course-names-table td:first-child,
    .settings-course-names-table .settings-input {
        min-width: 210px;
    }

    .settings-course-names-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-course-names-actions .topbar-button {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================
   2026-10-05 — BASE canónico + pendientes realmente visibles
   ========================================================= */
.tarvos-dudas-dashboard--v2 .tv-card-meta__left {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.tarvos-dudas-dashboard--v2 .tv-pending-flag {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    border: 1px solid #f0b24d;
    border-radius: 999px;
    background: #fff3d8;
    color: #9a5700;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .025em;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(180, 96, 0, .08);
}

.tarvos-dudas-dashboard--v2 .tv-pending-flag i {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #e8790b;
    box-shadow: 0 0 0 4px rgba(232, 121, 11, .12);
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries {
    border-color: #efb04a;
    background:
        linear-gradient(180deg, rgba(255, 247, 230, .98) 0%, rgba(255, 252, 246, .96) 38%, #fff 72%);
    box-shadow:
        0 12px 28px rgba(185, 103, 14, .12),
        0 0 0 3px rgba(245, 158, 11, .07);
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries .tv-course-card__subject-line {
    height: 5px;
    opacity: 1;
    background: linear-gradient(90deg, #ef8a17 0%, #e34b32 38%, var(--tv-subject-color) 72% 100%);
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries .tv-course-name {
    color: #2d1d12;
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries .tv-course-activity {
    margin-inline: -5px;
    padding-inline: 5px;
    border-radius: 10px;
    background: rgba(255, 246, 226, .68);
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries .tv-course-activity__item.is-alert span,
.tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries .tv-course-activity__item.is-alert strong {
    color: #a65300;
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries .tv-course-activity__item.is-alert strong {
    font-size: .94rem;
}

.tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries:hover {
    border-color: #e59a24;
    box-shadow:
        0 17px 36px rgba(185, 103, 14, .17),
        0 0 0 4px rgba(245, 158, 11, .09);
}

html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-pending-flag {
    border-color: #8f6428;
    background: #3a2a17;
    color: #ffd48d;
    box-shadow: none;
}

html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-pending-flag i {
    background: #f4a13c;
    box-shadow: 0 0 0 4px rgba(244, 161, 60, .13);
}

html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries {
    border-color: #765023;
    background: linear-gradient(180deg, #2a2117 0%, #1d1916 40%, #17151b 100%);
    box-shadow: 0 12px 30px rgba(0,0,0,.24), 0 0 0 3px rgba(224, 143, 42, .06);
}

html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries .tv-course-name {
    color: #fff8ef;
}

html[data-theme='dark'] .tarvos-dudas-dashboard--v2 .tv-course-card--v2.has-pending-queries .tv-course-activity {
    background: rgba(109, 69, 24, .18);
}
