* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: #F8F9FA;
    color: #1A1A1A;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
}

.login-card {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.login-card h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #1A1A1A;
    border-bottom-color: #1A1A1A;
    font-weight: 500;
}

.tab-btn:hover {
    color: #1A1A1A;
}

.form {
    display: none;
}

.form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1A1A1A;
}

.btn-primary {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #7BA680 0%, #6B9570 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 20px;
    font-size: 0.9375em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6B9570 0%, #5A8462 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 149, 112, 0.4);
}

.btn-secondary {
    padding: 8px 16px;
    background-color: #FFFFFF;
    color: #1A1A1A;
    border: 1px solid #CDE7F0;
    border-radius: 20px;
    font-size: 0.875em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #CDE7F0;
    border-color: #A3C9A8;
    transform: translateY(-2px);
}

.orientation-report-actions {
    display: grid;
    grid-template-columns: minmax(220px, 1.15fr) repeat(3, minmax(150px, 0.7fr));
    gap: 12px;
    align-items: stretch;
}

.orientation-report-actions .btn-primary,
.orientation-report-actions .btn-secondary {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    margin-bottom: 0;
}

.orientation-report-actions .btn-secondary {
    background: #ffffff;
    border-color: #dbe5ef;
    color: #334155;
}

.orientation-report-actions .btn-secondary:disabled {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.orientation-report-studio {
    display: grid;
    gap: 14px !important;
    grid-template-columns: 1fr;
    align-items: start;
}

.orientation-report-view-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.orientation-report-view-switch__btn {
    border: 1px solid #cfd8ff;
    background: #ffffff;
    color: #475569;
    border-radius: 14px;
    min-height: 48px;
    font-size: 0.92em;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.orientation-report-view-switch__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(99, 102, 241, 0.15);
}

.orientation-report-view-switch__btn.is-active {
    color: #ffffff;
    border-color: #4f46e5;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    box-shadow: 0 12px 22px rgba(79, 70, 229, 0.25);
}

.orientation-report-view-panel {
    display: none;
    gap: 12px;
}

.orientation-report-view-panel.is-active {
    display: grid;
    animation: orientationPanelFadeIn 220ms ease;
}

@keyframes orientationPanelFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.orientation-report-studio__builder {
    border-radius: 20px !important;
    border: 1px solid #dbe3ee !important;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08) !important;
    padding: 16px !important;
}

.orientation-report-studio__insights {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 12px;
    align-self: start;
}

.orientation-report-insights-header {
    border-radius: 20px !important;
    border: 1px solid #c7d2fe !important;
    background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
    box-shadow: 0 14px 26px rgba(79, 70, 229, 0.12) !important;
    padding: 14px !important;
}

.orientation-report-insights-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.06);
}

.orientation-report-panel-tabs {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.orientation-report-panel-tab {
    border: 1px solid #d6dbff;
    background: #ffffff;
    color: #475569;
    border-radius: 12px;
    min-height: 42px;
    font-weight: 800;
    font-size: 0.9em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.orientation-report-panel-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.16);
}

.orientation-report-panel-tab.is-active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(79, 70, 229, 0.24);
}

.orientation-report-panel {
    border-radius: 18px !important;
    border: 1px solid #dbe3ee !important;
    padding: 14px !important;
    opacity: 0;
    transform: translateY(8px) scale(0.995);
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.24s ease, transform 0.24s ease, max-height 0.24s ease;
}

.orientation-report-panel.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    max-height: 2200px;
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    background-color: #ffffff;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInOption {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-header {
    background: linear-gradient(135deg, #7BA680 0%, #8FC4D9 100%);
    padding: 24px 48px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(123, 166, 128, 0.2);
    transition: all 0.2s ease;
}

.dashboard-header h1 {
    color: #FFFFFF;
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.logo-clickable {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.logo-clickable:hover {
    color: #f0f4ff;
    transform: scale(1.05);
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.logo-clickable:active {
    transform: scale(0.98);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info:not(.panel-header-account) span {
    color: #FFFFFF;
    font-weight: 500;
    font-size: 0.95em;
}

.dashboard-header .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875em;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

/* ========== OWNER DASHBOARD ========== */
/* BEGIN disabled legacy owner CSS */
@media all and (max-width: 0px) {
.owner-dashboard {
    background: #f4f6fb;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    box-sizing: border-box;
}

.owner-shell {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    background: #f4f6fb;
    overflow: hidden;
    box-sizing: border-box;
}

.owner-sidebar {
    background: linear-gradient(180deg, #201547 0%, #171033 100%);
    color: #f8fafc;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.owner-brand-button {
    border: none;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.65rem;
    font-weight: 800;
    cursor: pointer;
}

.owner-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    text-transform: uppercase;
}

.owner-brand-text {
    letter-spacing: -0.03em;
    text-transform: lowercase;
}

.owner-sidebar__profile {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 18px;
}

.owner-sidebar__badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.18);
    color: #ddd6fe;
    font-size: 0.82rem;
    font-weight: 700;
}

.owner-sidebar__platform {
    margin-top: 10px;
    font-size: 0.95rem;
    color: rgba(248, 250, 252, 0.82);
}

.owner-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.owner-nav__title,
.owner-sidebar__stats-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(248, 250, 252, 0.48);
    font-weight: 700;
    margin-bottom: 4px;
}

.owner-nav__link {
    border: none;
    background: transparent;
    color: rgba(248, 250, 252, 0.78);
    border-radius: 14px;
    padding: 12px 14px;
    text-align: left;
    font-size: 0.96rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.owner-nav__link:hover,
.owner-nav__link.is-active {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

.owner-sidebar__stats {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.owner-mini-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.owner-mini-stat__label {
    font-size: 0.88rem;
    color: rgba(248, 250, 252, 0.75);
}

.owner-mini-stat strong {
    font-size: 1rem;
    color: #ffffff;
}

.owner-main {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.owner-topbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #e5e7eb;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: relative;
    flex-shrink: 0;
    z-index: 20;
}

.owner-topbar__info h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
    color: #111827;
    font-weight: 800;
}

.owner-topbar__info p {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 0.98rem;
}

.owner-topbar__meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.owner-topbar__date {
    color: #4b5563;
    font-size: 0.92rem;
    font-weight: 600;
}

.owner-topbar__profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 18px;
    border-left: 1px solid #e5e7eb;
}

.owner-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.owner-topbar__name {
    color: #111827;
    font-weight: 700;
    font-size: 0.95rem;
}

.owner-topbar__role {
    color: #6b7280;
    font-size: 0.84rem;
}

.owner-logout-btn,
.owner-primary-btn {
    border: none;
    border-radius: 14px;
    padding: 11px 16px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.owner-logout-btn {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.owner-primary-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(109, 40, 217, 0.18);
}

.owner-logout-btn:hover,
.owner-primary-btn:hover {
    transform: translateY(-1px);
}

.owner-content {
    padding: 30px 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.owner-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.owner-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.owner-stat-card,
.owner-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.owner-stat-card {
    padding: 20px 22px;
}

.owner-stat-card__label {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 700;
}

.owner-stat-card__value {
    margin-top: 10px;
    color: #111827;
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
}

.owner-stat-card__meta {
    margin-top: 10px;
    font-size: 0.84rem;
    color: #10b981;
    font-weight: 700;
}

.owner-insights-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
    gap: 18px;
}

.owner-card {
    padding: 22px;
}

.owner-card__header {
    margin-bottom: 18px;
}

.owner-card__header--spread {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.owner-card__header h3 {
    margin: 0;
    color: #111827;
    font-size: 1.12rem;
    font-weight: 800;
}

.owner-card__header p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 0.92rem;
}

.owner-card__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.owner-search input {
    width: 240px;
    max-width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 11px 14px;
    font-size: 0.92rem;
    background: #ffffff;
}

.owner-search input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.owner-usage {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.owner-usage__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.owner-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: 0.86rem;
    font-weight: 600;
}

.owner-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.owner-usage__chart {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.owner-usage-week {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
}

.owner-usage-week__label {
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.owner-usage-week__bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-height: 110px;
}

.owner-usage-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.owner-usage-bar {
    width: 100%;
    min-height: 6px;
    border-radius: 999px 999px 8px 8px;
}

.owner-usage-bar__value {
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 700;
}

.owner-usage__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.owner-summary-pill {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
}

.owner-summary-pill span {
    display: block;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 700;
}

.owner-summary-pill strong {
    display: block;
    margin-top: 8px;
    color: #111827;
    font-size: 1.3rem;
}

.owner-participation {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.owner-progress {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
}

.owner-progress__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}

.owner-progress__label {
    color: #374151;
    font-size: 0.92rem;
    font-weight: 700;
}

.owner-progress__value {
    color: #111827;
    font-size: 1.1rem;
    font-weight: 800;
}

.owner-progress__bar {
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.owner-progress__fill {
    height: 100%;
    border-radius: inherit;
}

.owner-table-shell {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
}

.owner-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.owner-table thead {
    background: #f8fafc;
}

.owner-table th,
.owner-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}

.owner-table th {
    color: #6b7280;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
}

.owner-table td {
    color: #111827;
    font-size: 0.92rem;
}

.owner-table__institution {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.owner-table__institution strong {
    font-size: 0.96rem;
}

.owner-table__subtext {
    color: #6b7280;
    font-size: 0.82rem;
}

.owner-table__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

.owner-table__badge--active {
    background: #dcfce7;
    color: #166534;
}

.owner-table__badge--pending {
    background: #fef3c7;
    color: #92400e;
}

.owner-table__badge--inactive {
    background: #fee2e2;
    color: #991b1b;
}

.owner-table__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd6fe;
    color: #6d28d9;
    background: #f5f3ff;
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

.owner-table__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.owner-table__action--danger {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fef2f2;
}

.owner-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

@media (max-width: 1180px) {
    .owner-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .owner-sidebar {
        gap: 20px;
    }

    .owner-sidebar__stats {
        margin-top: 0;
    }

    .owner-insights-grid,
    .owner-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .owner-topbar,
    .owner-content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .owner-stats-grid,
    .owner-insights-grid,
    .owner-usage__chart,
    .owner-usage__summary {
        grid-template-columns: 1fr;
    }

    .owner-card__header--spread,
    .owner-topbar {
        align-items: flex-start;
    }

    .owner-search input {
        width: 100%;
    }

    .owner-table-shell {
        overflow-x: auto;
    }

    .owner-table {
        min-width: 860px;
    }
}

}
/* END disabled legacy owner CSS */
.dashboard-header .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: #FFFFFF;
}

.direction-header {
    gap: 20px;
}

.direction-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 12px 10px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.direction-user-badge {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 249, 255, 0.9) 100%);
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.direction-user-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.direction-user-kicker {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.direction-user-name {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.1;
}

.direction-user-email {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.92rem;
    line-height: 1.2;
    word-break: break-word;
}

.dashboard-header .btn-secondary.direction-logout-btn {
    padding: 11px 18px;
    border-radius: 16px;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: rgba(15, 23, 42, 0.12);
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.dashboard-header .btn-secondary.direction-logout-btn:hover {
    background: rgba(15, 23, 42, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Header pattern shared by Estudiante, Orientacion y Docente */
[id^="student"].dashboard-container .user-info,
[id^="teacher"].dashboard-container .user-info,
#docenteView .user-info {
    display: flex !important;
    align-items: center;
    gap: 16px !important;
    padding: 10px 12px 10px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

[id^="student"].dashboard-container .user-info:not(.panel-header-account) > button[onclick="logout()"],
[id^="teacher"].dashboard-container .user-info:not(.panel-header-account) > button[onclick="logout()"],
#docenteView .user-info:not(.panel-header-account) > button[onclick="logout()"],
#directionView .user-info:not(.panel-header-account) > button[onclick="logout()"] {
    padding: 11px 18px;
    border-radius: 16px;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.34);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[id^="student"].dashboard-container .user-info > button[onclick="logout()"]:hover,
[id^="teacher"].dashboard-container .user-info > button[onclick="logout()"]:hover,
#docenteView .user-info > button[onclick="logout()"]:hover,
#directionView .user-info > button[onclick="logout()"]:hover {
    background: rgba(15, 23, 42, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

[id^="teacher"].dashboard-container #teacherName,
[id^="teacher"].dashboard-container #teacherActionsName,
[id^="teacher"].dashboard-container #teacherResourcesName {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: default;
    min-height: 54px;
    padding: 10px 18px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.94) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.52) !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 22px rgba(15, 23, 42, 0.06);
}

[id^="teacher"].dashboard-container #teacherName::before,
[id^="teacher"].dashboard-container #teacherActionsName::before,
[id^="teacher"].dashboard-container #teacherResourcesName::before {
    content: attr(data-account-initial, "O");
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

[id^="teacher"].dashboard-container #teacherName:hover,
[id^="teacher"].dashboard-container #teacherActionsName:hover,
[id^="teacher"].dashboard-container #teacherResourcesName:hover {
    transform: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

.student-profile-btn {
    min-height: 54px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.94) 100%);
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 22px rgba(15, 23, 42, 0.06);
}

.student-profile-btn #studentNameHeader {
    font-weight: 800;
    color: #0f172a;
}

.student-profile-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(224, 242, 254, 0.96) 100%);
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 14px 28px rgba(15, 23, 42, 0.1);
}

.student-profile-btn:hover #studentNameHeader {
    color: #0f172a;
}

#studentAvatarHeader {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 4px 10px rgba(15,23,42,0.06);
}

#docenteView .user-info span#docentePanelUserName {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 10px 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.94) 100%);
    border: 1px solid rgba(255, 255, 255, 0.52);
    color: #0f172a !important;
    font-weight: 800 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 22px rgba(15, 23, 42, 0.06);
}

#docenteView .user-info span#docentePanelUserName::before {
    content: "D";
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.dashboard-main {
    padding: 64px 48px;
    max-width: 1280px;
    margin: 0 auto;
    background: #F8F9FA;
}

.welcome-section {
    margin-bottom: 64px;
    padding-bottom: 32px;
    border-bottom: 1px solid #E5E5E5;
    opacity: 0;
    animation: slideInDown 0.6s ease-out 0.2s forwards;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-section h2 {
    color: #1A1A1A;
    margin-bottom: 16px;
    font-size: 2.5em;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.2;
}

.welcome-section p {
    color: #666666;
    font-size: 1.125em;
    line-height: 1.7;
    max-width: 720px;
}

/* Panel docente: menos aire entre cabecera de sección y tarjetas */
#docenteView .docente-dashboard-main.dashboard-main {
    padding-top: 40px;
    padding-bottom: 48px;
}

#docenteView .docente-welcome-section.welcome-section {
    margin-bottom: 14px;
    padding-bottom: 10px;
}

#docenteView .docente-welcome-section.welcome-section h2 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0 0 6px 0;
}

#docenteView .docente-welcome-section.welcome-section p {
    font-size: 0.875rem;
    line-height: 1.45;
    max-width: 42rem;
    color: #64748b;
}

/* Dashboard Tabs Styles */
.dashboard-tabs-container {
    margin: 30px 0;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #E8F5E9;
}

.dashboard-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dashboard-tabs::-webkit-scrollbar {
    display: none;
}

.dashboard-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #666;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dashboard-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px 2px 0 0;
}

.dashboard-tab:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(102, 187, 106, 0.05) 100%);
    color: #1B4332;
    transform: translateY(-1px);
}

.dashboard-tab:hover::before {
    width: 60%;
}

.dashboard-tab.active {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.12) 0%, rgba(102, 187, 106, 0.08) 100%);
    color: #1B4332;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.1);
}

.dashboard-tab.active::before {
    width: 80%;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 50%, #81C784 100%);
    box-shadow: 0 -2px 8px rgba(76, 175, 80, 0.3);
}

.tab-icon {
    font-size: 1.1em;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-tab:hover .tab-icon {
    transform: scale(1.15);
}

.dashboard-tab.active .tab-icon {
    transform: scale(1.1);
}

.dashboard-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.dashboard-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    margin-top: 40px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.section-title h3 {
    color: #1A1A1A;
    font-size: 1.875em;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

/* Survey Cards */
.surveys-container,
.activities-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Estilos para Sistema de Recompensas */
.rewards-modal-content {
    max-width: 1400px;
    width: 98%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 36px;
}

@media (max-width: 768px) {
    .rewards-modal-content {
        width: 95%;
        padding: 20px;
    }

    .rewards-modal-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .reward-category {
        padding: 20px;
    }

    .badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 12px;
    }
}

.rewards-modal-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e8eef5;
}

.rewards-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 20px;
}

.reward-category {
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    width: 100%;
}

.reward-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.reward-stats-container {
    margin-top: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
}

.reward-category-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.badge-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 100px;
}

.badge-item.earned {
    border-color: #A3C9A8;
    background: linear-gradient(135deg, #F8F9FA 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(163, 201, 168, 0.2);
}

.badge-item.locked {
    opacity: 0.4;
    cursor: pointer;
}

.badge-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(163, 201, 168, 0.3);
    transition: all 0.3s ease;
}

.badge-item.locked:hover {
    opacity: 0.6;
}

.badge-icon {
    font-size: 2.5em;
    margin-bottom: 8px;
    filter: grayscale(1);
    transition: all 0.3s ease;
}

.badge-item.earned .badge-icon {
    filter: grayscale(0);
    transform: scale(1.1);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.15);
    }
}

.badge-name {
    font-size: 0.75em;
    font-weight: 600;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

.badge-item.earned .badge-name {
    color: #A3C9A8;
}

.badge-date {
    font-size: 0.65em;
    color: #999;
    margin-top: 5px;
}

.badge-lock-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.9em;
    color: #ccc;
}

.reward-progress {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.progress-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7BA680 0%, #8FC4D9 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.reward-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #A3C9A8;
    display: block;
}

.stat-label {
    font-size: 0.75em;
    color: #666;
    margin-top: 5px;
}

/* Nuevas secciones de recompensas */
.rewards-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}

.rewards-hero-text h3 {
    margin: 4px 0 6px 0;
    color: #0f172a;
    font-size: 1.5em;
    font-weight: 800;
}

.rewards-hero-text .muted {
    margin: 0 0 10px 0;
    color: #6b7280;
}

.rewards-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.hero-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.04);
}

.hero-stat .stat-value {
    display: block;
    font-size: 1.6em;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
}

.hero-stat .stat-label {
    color: #6b7280;
    font-size: 0.95em;
}

.rewards-filters {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
}

.reward-filter {
    border: none;
    background: transparent;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reward-filter:hover {
    background: #eef2ff;
    color: #4338ca;
}

.reward-filter.active {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4338ca;
    border: 1px solid #c7d2fe;
    box-shadow: 0 6px 14px rgba(67, 56, 202, 0.12);
}

.reward-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.05);
    margin-bottom: 14px;
}

.reward-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.reward-progress-chip {
    padding: 8px 14px;
    border-radius: 999px;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-weight: 700;
}

.reward-progress {
    margin: 12px 0;
}

.progress-bar {
    width: 100%;
    background: #f1f5f9;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    border-radius: 999px;
}

.progress-label {
    margin-top: 6px;
    color: #6b7280;
    font-size: 0.95em;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.badge-item {
    position: relative;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    transition: all 0.2s ease;
}

.badge-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
    border-color: #cbd5e1;
}

.badge-item.earned {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border-color: #bbf7d0;
}

.badge-item.locked {
    opacity: 0.9;
}

.badge-icon {
    font-size: 2em;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.badge-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge-name {
    font-weight: 800;
    color: #0f172a;
    display: flex;
    gap: 8px;
    align-items: center;
}

.badge-level {
    background: #ecfdf3;
    color: #166534;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.85em;
    border: 1px solid #bbf7d0;
}

.badge-desc {
    margin: 0;
    color: #475569;
    font-size: 0.95em;
    line-height: 1.4;
}

.badge-date {
    color: #6b7280;
    font-size: 0.9em;
}

.badge-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2em;
    color: #9ca3af;
}

.badges-empty {
    text-align: center;
    padding: 24px 16px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
    color: #475569;
}

.badges-empty .empty-emoji {
    font-size: 28px;
    margin-bottom: 6px;
}

@media (max-width: 900px) {
    .rewards-hero {
        grid-template-columns: 1fr;
    }
    .badges-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}


/* Animaciones para notificaciones de badges */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.survey-card,
.activity-card {
    background-color: #ffffff;
    border: 1px solid #CDE7F0;
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(163, 201, 168, 0.05);
}

.survey-card::before,
.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #E5E5E5;
    transition: all 0.3s ease;
}

.survey-card:hover,
.activity-card:hover {
    box-shadow: 0 8px 24px rgba(163, 201, 168, 0.2);
    transform: translateY(-4px);
    border-color: #A3C9A8;
}

.survey-card:hover::before,
.activity-card:hover::before {
    width: 4px;
    background: #A3C9A8;
}

.survey-card.completed,
.activity-card.completed {
    border-left: 4px solid #A3C9A8;
    background: linear-gradient(135deg, #ffffff 0%, #F8F9FA 100%);
    cursor: default;
}

.survey-card.completed:hover,
.activity-card.completed:hover {
    box-shadow: 0 2px 4px rgba(163, 201, 168, 0.05);
    transform: none;
}

.survey-card.completed::before,
.activity-card.completed::before {
    background: #A3C9A8;
    width: 4px;
}

.survey-card h4,
.activity-card h4 {
    color: #1A1A1A;
    margin-bottom: 12px;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.survey-card p,
.activity-card p {
    color: #666666;
    font-size: 0.9em;
    margin-bottom: 16px;
    line-height: 1.5;
}

.survey-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.2s ease;
}

.survey-status.pending {
    background-color: #FFD57E;
    color: #FFFFFF;
    border: 1px solid #FFD57E;
    border-radius: 20px;
}

.survey-status.completed {
    background-color: #A3C9A8;
    color: #FFFFFF;
    border: 1px solid #A3C9A8;
    border-radius: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

/* Loading Spinner Styles */
.loading-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #A3C9A8;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Validation Styles */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: #28a745;
    background-color: #f5fff5;
}

.validation-message {
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

.validation-message.error {
    color: #dc3545;
}

.validation-message.success {
    color: #28a745;
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.internal-chat-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1002;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
    color: #1d4ed8;
    font-weight: 800;
    box-shadow: 0 16px 32px rgba(29, 78, 216, 0.16);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#internalChatModal {
    overflow: hidden;
}

.internal-chat-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(29, 78, 216, 0.2);
}

.internal-chat-modal-content {
    max-width: 1080px;
    width: min(94vw, 1080px);
    max-height: 88vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
}

.internal-chat-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.internal-chat-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 1.7rem;
    cursor: pointer;
}

.internal-chat-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 68vh;
    max-height: calc(88vh - 90px);
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}

.internal-chat-sidebar {
    padding: 18px;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
    overflow-y: auto;
}

.internal-chat-sidebar-title {
    font-size: 0.82em;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 12px;
}

.internal-chat-channels {
    display: grid;
    gap: 10px;
}

.internal-chat-channel {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.internal-chat-channel:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.internal-chat-channel.is-active {
    border-color: #93c5fd;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
    box-shadow: 0 10px 20px rgba(29, 78, 216, 0.08);
}

.internal-chat-channel__title {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.internal-chat-channel__meta {
    color: #64748b;
    font-size: 0.9em;
    line-height: 1.45;
}

.internal-chat-main {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
}

.internal-chat-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.internal-chat-messages {
    padding: 18px 22px;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: grid;
    gap: 12px;
    align-content: start;
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.internal-chat-empty {
    padding: 22px;
    border-radius: 18px;
    border: 1px dashed #cbd5e1;
    background: #ffffff;
    color: #64748b;
    text-align: center;
}

.internal-chat-message {
    max-width: min(78%, 640px);
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.internal-chat-message.is-own {
    margin-left: auto;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
    border-color: #bfdbfe;
}

.internal-chat-message__author {
    font-size: 0.85em;
    font-weight: 800;
    color: #334155;
    margin-bottom: 6px;
}

.internal-chat-message__body {
    color: #0f172a;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.internal-chat-message__time {
    margin-top: 8px;
    font-size: 0.78em;
    color: #94a3b8;
}

.internal-chat-form {
    padding: 18px 22px 22px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.internal-chat-form textarea {
    width: 100%;
    min-height: 88px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    resize: vertical;
    font: inherit;
}

.internal-chat-form-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.internal-chat-form-hint {
    color: #94a3b8;
    font-size: 0.82em;
}

/* MVP: ocultar entrada «Herramientas» en el nav del estudiante (reactivar en script: MVP_STUDENT_TOOLS_ENABLED). */
.student-tools-nav-item {
    display: none !important;
}

/* ===== Panel Herramientas (estudiante) ===== */
.tools-main {
    padding-top: 10px;
}

/* ===== Student dashboard (rediseño: separar por secciones) ===== */
.student-dashboard-main {
    background: #F8F9FA;
}

.student-hero {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 18px;
    margin-bottom: 22px;
}

.student-hero--simple {
    margin-bottom: 14px;
}

@media (max-width: 900px) {
    .student-hero {
        grid-template-columns: 1fr;
    }
}

.student-hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #64748b;
    font-weight: 900;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.student-hero__title {
    margin: 0;
    font-size: 2.1em;
    font-weight: 950;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.student-hero__subtitle {
    margin-top: 10px;
    color: #475569;
    line-height: 1.7;
    max-width: 60ch;
}

.student-hero__card {
    border-radius: 18px;
    border: 1px solid #e8eef5;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.05);
    padding: 16px;
}

.student-hero__cardTitle {
    font-weight: 950;
    color: #0f172a;
    margin-bottom: 6px;
}

.student-hero__cardBody {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 12px;
}

.student-hero__cardHint {
    margin-top: 10px;
    color: #64748b;
    font-size: 0.92em;
}

.student-kpis {
    margin-bottom: 18px;
}

.student-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.student-kpi-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .student-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.student-kpis--simple {
    margin-bottom: 14px;
}

.student-home-cta__card {
    border-radius: 18px;
    border: 1px solid #e8eef5;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.05);
    padding: 16px;
}

.student-home-cta__title {
    font-weight: 950;
    color: #0f172a;
    margin-bottom: 6px;
}

.student-home-cta__body {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 12px;
}

.student-tabs {
    margin-top: 6px;
    margin-bottom: 12px;
}

/* Pestañas estudiante: rail transparente + subrayado verde Munay (MVP piloto) */
#studentView .dashboard-tabs-container.student-tabs {
    margin: 6px 0 12px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

#studentView .student-tabs .dashboard-tabs {
    gap: 6px;
    border-bottom: 1px solid #e8eef5;
    padding-bottom: 2px;
}

#studentView .student-tabs .dashboard-tab {
    padding: 12px 18px;
    border-radius: 8px 8px 0 0;
    color: #64748b;
    font-weight: 600;
    background: transparent;
    box-shadow: none;
}

#studentView .student-tabs .dashboard-tab::before {
    height: 3px;
    bottom: -3px;
    background: linear-gradient(90deg, #10b981 0%, #14b8a6 100%);
    border-radius: 2px;
}

#studentView .student-tabs .dashboard-tab:hover {
    background: rgba(16, 185, 129, 0.06);
    color: #0f766e;
    transform: none;
}

#studentView .student-tabs .dashboard-tab.active {
    background: rgba(16, 185, 129, 0.08);
    color: #0f766e;
    font-weight: 700;
    box-shadow: none;
}

#studentView .student-tabs .dashboard-tab.active::before {
    width: 88%;
    box-shadow: 0 -2px 8px rgba(16, 185, 129, 0.25);
}

.student-panel__notice {
    margin-top: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.9em;
    line-height: 1.55;
}
.student-kpi-card {
    border-radius: 18px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 6, 23, 0.04);
    padding: 16px;
}

.student-kpi-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.student-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.04);
    font-size: 1.2em;
}

.student-kpi-icon--blue { background: rgba(59,130,246,0.10); }
.student-kpi-icon--green { background: rgba(16,185,129,0.10); }
.student-kpi-icon--indigo { background: rgba(99,102,241,0.10); }

.student-kpi-label {
    font-weight: 900;
    color: #0f172a;
}

.student-kpi-value {
    font-size: 2.4em;
    font-weight: 950;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.student-kpi-hint {
    margin-top: 6px;
    color: #64748b;
    font-size: 0.95em;
}

.student-kpi-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.student-dashboard-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 1000px) {
    .student-dashboard-layout {
        grid-template-columns: 1fr;
    }
}

.student-panel {
    border-radius: 18px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 6, 23, 0.04);
    padding: 16px;
    margin-bottom: 16px;
}

.student-panel--compact {
    padding: 14px;
}

.student-panel__header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.student-panel__icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.04);
    font-size: 1.2em;
}

.student-panel__title {
    font-weight: 950;
    color: #0f172a;
}

.student-panel__subtitle {
    color: #64748b;
    font-size: 0.95em;
    margin-top: 2px;
}

.student-quick-actions {
    display: grid;
    gap: 10px;
}

.student-quick-action {
    width: 100%;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.student-quick-action:hover {
    border-color: #dbe7f3;
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
}

.student-tip {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 12px;
    background: #f8fafc;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    padding: 12px;
}

.tools-hero {
    max-width: 1100px;
    margin: 0 auto 22px auto;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid #e8eef5;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.05);
}

@media (max-width: 900px) {
    .tools-hero {
        padding: 18px;
    }
}

.tools-hero__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.tools-hero__hint {
    flex-shrink: 0;
    font-size: 0.92em;
    color: #64748b;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #ffffff;
}

.tools-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .tools-actions {
        grid-template-columns: 1fr;
    }
}

.tools-action {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 14px;
    border-radius: 16px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.tools-action:hover {
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.07);
    border-color: #dbe7f3;
}

.tools-action--primary {
    border-color: rgba(45,212,191,0.40);
    box-shadow: 0 10px 24px rgba(45,212,191,0.10);
}

.tools-action__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.04);
    font-size: 1.2em;
}

.tools-action--primary .tools-action__icon {
    background: rgba(45,212,191,0.14);
}

.tools-action__label {
    display: block;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.2;
}

.tools-action__meta {
    display: block;
    margin-top: 4px;
    font-size: 0.92em;
    color: #64748b;
}

.tools-tip {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #475569;
    line-height: 1.6;
}

.tools-hero__title {
    margin: 0 0 6px 0;
    font-size: 1.7em;
    font-weight: 800;
    color: #0f172a;
}

.tools-hero__subtitle {
    margin: 0 0 14px 0;
    color: #475569;
    line-height: 1.6;
}

.tools-section {
    max-width: 1100px;
    margin: 0 auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

.tool-card {
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(2, 6, 23, 0.04);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.07);
    border-color: #dbe7f3;
}

.tool-card__top {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.tool-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    color: #0f172a;
    background: rgba(2, 6, 23, 0.04);
}

.tool-card--indigo .tool-card__icon { background: rgba(99, 102, 241, 0.10); }
.tool-card--emerald .tool-card__icon { background: rgba(16, 185, 129, 0.10); }
.tool-card--blue .tool-card__icon { background: rgba(59, 130, 246, 0.10); }

.tool-card__title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 900;
    color: #0f172a;
}

.tool-card__subtitle {
    margin: 2px 0 0 0;
    color: #64748b;
    font-size: 0.92em;
}

.tool-card__desc {
    color: #475569;
    line-height: 1.6;
    margin: 10px 0 12px 0;
    flex: 1;
}

.tool-card__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tool-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    font-size: 0.86em;
    color: #475569;
    font-weight: 700;
}

.tool-card__cta {
    width: 100%;
}

.tool-card__secondary {
    width: 100%;
    margin-top: 10px;
}

/* ===== Tool modals ===== */
.tool-modal {
    border-radius: 14px;
}

.tool-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.tool-modal__title {
    margin: 0;
    color: #0f172a;
    font-weight: 900;
}

.tool-modal__subtitle {
    margin: 8px 0 0 0;
    color: #64748b;
    line-height: 1.6;
}

.tool-modal__chip {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #334155;
    font-weight: 800;
    white-space: nowrap;
}

.tool-modal__footer {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.breathing-modal .tool-modal__footer {
    position: static;
    margin-top: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(232,238,245,1);
    background: #ffffff;
    justify-content: flex-end;
    align-items: center;
}

.breathing-modal {
    /* Encajar SIEMPRE en la pantalla y mantener footer dentro */
    width: min(1240px, 96vw);
    height: min(90vh, 860px);
    max-height: 90vh !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

/* Botones del footer (no full width, sin gritar) */
.breathing-modal .tool-modal__footer .btn-primary,
.breathing-modal .tool-modal__footer .btn-secondary {
    width: auto !important;
    min-width: 160px;
    margin-bottom: 0 !important;
    text-transform: none;
    letter-spacing: 0;
}

@media (max-width: 700px) {
    .breathing-modal .tool-modal__footer {
        justify-content: stretch;
    }
    .breathing-modal .tool-modal__footer .btn-primary,
    .breathing-modal .tool-modal__footer .btn-secondary {
        width: 100% !important;
        min-width: 0;
    }
}

.breathing-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 12px;
    align-items: start;
}

.breathing-modal {
    /* más horizontal + mejor uso de espacio */
    width: min(1240px, 96vw);
}

/* En el setup: que la duración SIEMPRE quepa (3 botones en una fila) */
.breathing-layout__left .breathing-duration {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.breathing-layout__left .breathing-duration-btn {
    min-width: 0;
    flex: 0 0 auto;
    padding: 9px 8px;
    font-size: 0.92em;
    border-radius: 12px;
}

/* Reducir un poco altura del bloque izquierdo para que no corte contenido */
.breathing-layout__left .breathing-setup {
    padding: 10px;
}

.breathing-layout__left .breathing-setup__divider {
    margin: 10px 0;
}

.breathing-layout__left .breathing-setup__hint {
    margin-top: 8px;
    font-size: 0.92em;
}

.breathing-modal .btn-primary,
.breathing-modal .btn-secondary {
    width: auto !important;
    margin-bottom: 0 !important;
}

.breathing-patterns--primary {
    margin: 10px 0 8px 0;
}

.breathing-patterns-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.breathing-pattern-chip {
    padding: 10px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    cursor: pointer;
    font-weight: 900;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.breathing-pattern-chip:hover {
    border-color: #dbe7f3;
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .breathing-layout {
        grid-template-columns: 1fr;
    }
}

.breathing-layout__left,
.breathing-layout__right {
    min-height: 0;
}

.breathing-layout__right {
    display: grid;
    gap: 12px;
}

/* No recortar controles (duración/patrones) */
.breathing-layout__left,
.breathing-layout__right {
    overflow: visible;
}

/* Asegurar que el contenido respete el alto del modal */
.breathing-layout__left,
.breathing-layout__right {
    overflow: hidden;
}

.breathing-chips {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.breathing-setup {
    border: 1px solid #e8eef5;
    border-radius: 16px;
    background: #ffffff;
    padding: 10px;
}

.breathing-setup__title {
    font-weight: 950;
    color: #0f172a;
    margin-bottom: 10px;
}

.breathing-setup__title--sm {
    font-size: 0.98em;
    margin-top: 12px;
    margin-bottom: 8px;
}

.breathing-advanced-toggle {
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #0f172a;
    font-weight: 950;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.breathing-advanced-toggle:hover {
    border-color: #dbe7f3;
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
}

.breathing-advanced {
    margin-top: 10px;
}

.breathing-modal.is-running .breathing-layout__left {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 220ms ease, transform 220ms ease;
}

.breathing-modal.is-running .breathing-layout {
    grid-template-columns: 1fr;
}

.breathing-visual-wrap {
    margin: 0;
}

.breathing-setup__divider {
    height: 1px;
    background: #e8eef5;
    margin: 10px 0;
}

.breathing-presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 700px) {
    .breathing-presets {
        grid-template-columns: 1fr;
    }
}

.breathing-preset {
    text-align: left;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.breathing-preset:hover {
    border-color: #dbe7f3;
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
    transform: translateY(-1px);
}

.breathing-preset--primary {
    border-color: rgba(45,212,191,0.35);
    background: rgba(45,212,191,0.08);
}

.breathing-preset__title {
    font-weight: 950;
    color: #0f172a;
}

.breathing-preset__meta {
    margin-top: 4px;
    color: #64748b;
    font-weight: 800;
    font-size: 0.86em;
}

.breathing-setup__hint {
    margin-top: 10px;
    color: #64748b;
    font-size: 0.95em;
    line-height: 1.6;
}

.breathing-modal.is-running #breathingSetup {
    display: none;
}

.breathing-modal.is-reflect .breathing-visual-wrap,
.breathing-modal.is-reflect #breathingCircle {
    display: none;
}

.breathing-patterns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 8px 0;
}

.breathing-patterns--more {
    margin-top: 10px;
}

.breathing-more-toggle {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #334155;
    font-weight: 900;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.breathing-more-toggle:hover {
    border-color: #dbe7f3;
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
}

@media (max-width: 700px) {
    .breathing-patterns {
        grid-template-columns: 1fr;
    }
}

.breathing-pattern-btn {
    padding: 9px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    cursor: pointer;
    font-weight: 900;
    font-size: 0.92em;
    color: #0f172a;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.breathing-pattern-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(2, 6, 23, 0.08);
    border-color: #dbe7f3;
}

.breathing-pattern-btn.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.10) 0%, rgba(16,185,129,0.08) 100%);
    border-color: rgba(59,130,246,0.25);
}

.tool-guide {
    display: grid;
    gap: 14px;
    margin-top: 10px;
}

.tool-guide__card {
    padding: 16px;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    background: #ffffff;
}

.tool-guide__card h3 {
    margin: 0 0 8px 0;
    color: #0f172a;
}

.tool-guide__card p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.tool-guide__card ul,
.tool-guide__card ol {
    margin: 8px 0 0 18px;
    color: #475569;
    line-height: 1.7;
}

.tool-guide__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== Guía de calma (modo guiado) ===== */
.calm-guide {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calm-guide__progress {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.calm-guide__stepper {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 900;
    font-size: 0.92em;
    white-space: nowrap;
}

.calm-guide__bar {
    flex: 1;
    min-width: 180px;
    height: 10px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
    border: 1px solid #e8eef5;
}

.calm-guide__barFill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(45,212,191,0.55) 0%, rgba(59,130,246,0.35) 100%);
    transition: width 220ms ease;
}

.calm-guide__layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 12px;
    align-items: start;
}

.calm-guide__nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calm-step {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.calm-step:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(2, 6, 23, 0.06);
    border-color: #dbe7f3;
}

.calm-step.active {
    background: linear-gradient(135deg, rgba(45,212,191,0.12) 0%, rgba(59,130,246,0.10) 100%);
    border-color: rgba(45,212,191,0.35);
}

.calm-step__num {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    color: #0f172a;
    background: #f1f5f9;
    border: 1px solid #e8eef5;
    flex-shrink: 0;
}

.calm-step.active .calm-step__num {
    background: rgba(45,212,191,0.16);
    border-color: rgba(45,212,191,0.35);
}

.calm-step__label {
    font-weight: 900;
    color: #0f172a;
    line-height: 1.25;
}

.calm-guide__content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calm-guide__card {
    border: 1px solid #e8eef5;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
    padding: 16px;
}

.calm-guide__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.calm-guide__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.04);
    font-size: 1.2em;
    flex-shrink: 0;
}

.calm-guide__title {
    margin: 0;
    color: #0f172a;
    font-weight: 950;
    line-height: 1.2;
}

.calm-guide__kicker {
    margin-top: 2px;
    color: #64748b;
    font-weight: 800;
    font-size: 0.92em;
}

.calm-guide__body {
    margin: 0;
    color: #334155;
    line-height: 1.8;
    font-size: 1.02em;
}

.calm-guide__navActions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 14px;
}

.calm-guide__navActions .btn-secondary {
    text-transform: none;
    letter-spacing: 0;
}

.calm-guide__bottomActions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.calm-guide__bottomActions .btn-primary,
.calm-guide__bottomActions .btn-secondary {
    text-transform: none;
    letter-spacing: 0;
}

@media (max-width: 860px) {
    .calm-guide__layout {
        grid-template-columns: 1fr;
    }
    .calm-guide__nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .calm-step {
        min-width: 220px;
        flex: 0 0 auto;
    }
    .calm-guide__navActions {
        justify-content: stretch;
    }
    .calm-guide__navActions .btn-secondary {
        width: 100%;
    }
    .calm-guide__bottomActions .btn-primary,
    .calm-guide__bottomActions .btn-secondary {
        width: 100%;
    }
}

/* ===== Guía de emociones (nueva estructura) ===== */
.emotion-modal {
    width: min(96vw, 1360px);
    max-width: min(96vw, 1360px);
    height: min(94vh, 980px);
    max-height: min(94vh, 980px);
    margin: 3vh auto;
    padding: 0;
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.16), 0 0 0 1px rgba(2, 6, 23, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.emotion-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 12;
    transition: all 0.2s ease;
}

.emotion-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: scale(1.04);
}

.emotion-modal .tool-modal__header {
    margin: 0;
    padding: 30px clamp(20px, 3vw, 40px) 18px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(250, 251, 252, 0.95) 100%);
}

.emotion-modal .tool-modal__title {
    font-size: clamp(1.6rem, 2.2vw, 2rem);
    letter-spacing: -0.01em;
}

.emotion-modal .tool-modal__subtitle {
    max-width: 900px;
    font-size: 0.98rem;
    color: #64748b;
    line-height: 1.6;
}

.emotion-modal__body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 18px clamp(16px, 2.2vw, 34px) 16px;
    scroll-behavior: smooth;
}

.emotion-guide {
    padding-top: 2px;
}

.emotion-steps {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px 0;
    position: sticky;
    top: 0;
    z-index: 4;
    padding-bottom: 10px;
    background: linear-gradient(180deg, #fafbfc 75%, rgba(250, 251, 252, 0));
}

.emotion-step {
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #64748b;
    font-weight: 900;
    font-size: 0.92em;
}

.emotion-step.active {
    background: rgba(45,212,191,0.10);
    border-color: rgba(45,212,191,0.35);
    color: #0f172a;
}

.emotion-guide__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

/* Filtros (integrativos) */
.emotion-guide__filters {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid #e8eef5;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    margin-bottom: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.emotion-guide__filtersTitle {
    font-weight: 950;
    color: #0f172a;
    margin-bottom: 8px;
}

.emotion-guide__filtersRow {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.emotion-filter {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #334155;
    font-weight: 900;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.emotion-filter:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
    border-color: #dbe7f3;
}

.emotion-filter.active {
    background: rgba(45,212,191,0.12);
    border-color: rgba(45,212,191,0.35);
    color: #0f172a;
}

.emotion-guide__filtersHint {
    margin-top: 8px;
    color: #64748b;
    line-height: 1.6;
    font-size: 0.9rem;
    font-weight: 700;
}

.emotion-chip {
    text-align: left;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid #e8eef5;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    color: #0f172a;
    font-weight: 900;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    position: relative;
    overflow: hidden;
}

.emotion-chip::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #10b981 0%, #14b8a6 100%);
    opacity: 0.12;
    transition: opacity 0.15s ease;
}

.emotion-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(45,212,191,0.15);
    border-color: rgba(45,212,191,0.35);
}

.emotion-chip:hover {
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.07);
    border-color: #dbe7f3;
    transform: translateY(-1px);
}

.emotion-chip:hover::before {
    opacity: 0.5;
}

.emotion-guide__note {
    margin-top: 14px;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid #e8eef5;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    color: #475569;
    line-height: 1.6;
}

.emotion-detail__top {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.emotion-footer {
    margin-top: 0;
    padding: 12px clamp(16px, 2.2vw, 34px) 14px;
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.emotion-footer .btn-primary,
.emotion-footer .btn-secondary {
    text-transform: none;
    letter-spacing: 0;
}

.emotion-detail__title {
    margin: 0;
    font-size: 1.28em;
    font-weight: 950;
    color: #0f172a;
}

.emotion-detail__subtitle {
    color: #64748b;
    margin-top: 2px;
    font-size: 0.95em;
}

.emotion-card {
    border: 1px solid #e8eef5;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    padding: 15px;
    margin-top: 12px;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.05);
}

.emotion-card__kicker {
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 8px;
}

.emotion-card__body {
    color: #475569;
    line-height: 1.7;
}

.emotion-breathing {
    display: grid;
    gap: 10px;
}

.emotion-breathing__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e8eef5;
}

.emotion-breathing__label {
    font-weight: 800;
    color: #334155;
}

.emotion-breathing__value {
    font-weight: 900;
    color: #0f172a;
}

.emotion-breathing__hint {
    color: #64748b;
    font-size: 0.95em;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .emotion-modal {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .emotion-modal .tool-modal__header {
        padding: 18px 56px 14px 14px;
    }

    .emotion-modal__body {
        padding: 12px 10px 12px;
    }

    .emotion-guide__grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .emotion-footer {
        justify-content: stretch;
        padding: 10px;
    }

    .emotion-footer .btn-primary,
    .emotion-footer .btn-secondary {
        width: 100%;
    }
}

#emotionGuideModal .emotion-modal {
    width: min(96vw, 1360px) !important;
    max-width: min(96vw, 1360px) !important;
    height: min(94vh, 980px) !important;
    max-height: min(94vh, 980px) !important;
    margin: 3vh auto !important;
    padding: 0 !important;
}

#emotionGuideModal .tool-modal__header {
    margin: 0 !important;
}

@media (max-width: 700px) {
    #emotionGuideModal .emotion-modal {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
}

/* ===== Herramientas: respiración guiada ===== */
.breathing-visual-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px 0;
}

#breathingCircle.breathing-visual {
    width: min(920px, 100%);
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,0.28);
    background: radial-gradient(760px 260px at 25% 35%, rgba(45,212,191,0.14), transparent 55%),
                radial-gradient(760px 260px at 80% 70%, rgba(59,130,246,0.12), transparent 55%),
                linear-gradient(135deg, #0b1220 0%, #0a1a2b 50%, #081320 100%);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.18);
    position: relative;
    overflow: hidden;
    padding: 18px;
    color: #e2e8f0;
    --accent: #2dd4bf; /* default */
}

@media (max-width: 520px) {
    #breathingCircle.breathing-visual {
        padding: 14px;
    }
}

#breathingCircle.inhale { --accent: #2dd4bf; }
#breathingCircle.exhale { --accent: #34d399; }
#breathingCircle.hold { --accent: #60a5fa; }

/* Subtle pulse */
#breathingCircle.inhale {
    box-shadow: 0 22px 56px rgba(2, 6, 23, 0.22);
}

#breathingCircle.exhale {
    box-shadow: 0 16px 44px rgba(2, 6, 23, 0.18);
}

.breathing-hud {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: center;
    gap: 22px;
}

/* Duration buttons */
.breathing-duration {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0 6px 0;
}

.breathing-duration-btn {
    flex: 0 0 auto;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(232,238,245,0.95);
    background: #f8fafc;
    color: #0f172a;
    font-weight: 900;
    font-size: 0.92em;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.breathing-duration-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.08);
    border-color: #dbe7f3;
}

.breathing-duration-btn.active {
    border-color: rgba(45,212,191,0.55);
    box-shadow: 0 0 0 4px rgba(45,212,191,0.12);
}

/* Stage: keep previous calm graphic behind ring */
.breathing-stage {
    width: 220px;
    height: 220px;
    position: relative;
    display: grid;
    place-items: center;
}

.breathing-bloom {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.95;
}

.breathing-bloom .breathing-shape {
    transform-origin: 50% 50%;
    transform: scale(1);
    transition: transform 1200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

#breathingCircle.inhale .breathing-bloom .breathing-shape {
    transform: scale(1.06) rotate(2deg);
}

#breathingCircle.exhale .breathing-bloom .breathing-shape {
    transform: scale(0.94) rotate(-2deg);
}

#breathingCircle.hold .breathing-bloom .breathing-shape {
    transform: scale(1.00);
}

.breathingCue {
    font-size: 1.05em;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: #e2e8f0;
}

.breathingSub {
    margin-top: 6px;
    font-size: 0.90em;
    color: rgba(226,232,240,0.72);
}

.breathingSession {
    margin-top: 10px;
}

.breathingSessionMeta {
    margin-top: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    color: rgba(226,232,240,0.70);
    font-size: 0.92em;
}

.breathingSessionHint {
    color: rgba(226,232,240,0.55);
}

/* Cierre emocional (después de la respiración) */
.breathing-reflection {
    margin-top: 14px;
}

.breathing-reflection__card {
    border-radius: 16px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
    padding: 16px;
    color: #0f172a;
}

.breathing-reflection__title {
    font-weight: 950;
    letter-spacing: 0.2px;
    margin-bottom: 4px;
}

.breathing-reflection__subtitle {
    color: #64748b;
    margin-bottom: 10px;
}

.breathing-reflection__q {
    margin-top: 6px;
    font-weight: 900;
}

.breathing-reflection__opts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.breathing-reflection__opt {
    flex: 1;
    min-width: 140px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.breathing-reflection__opt:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(2, 6, 23, 0.06);
    border-color: #dbe7f3;
}

.breathing-reflection__opt.active {
    border-color: rgba(45,212,191,0.55);
    box-shadow: 0 0 0 4px rgba(45,212,191,0.12);
    background: rgba(45,212,191,0.08);
}

.breathing-reflection__label {
    display: block;
    margin-top: 12px;
    color: #334155;
    font-weight: 800;
}

.breathing-reflection__input {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #0f172a;
    resize: vertical;
}

.breathing-reflection__input::placeholder {
    color: #94a3b8;
}

.breathing-reflection__input:focus {
    outline: none;
    border-color: rgba(45,212,191,0.55);
    box-shadow: 0 0 0 4px rgba(45,212,191,0.12);
}

.breathing-reflection__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.breathing-reflection__saved {
    margin-top: 10px;
    color: #16a34a;
    font-weight: 900;
}

/* ===== Memoria emocional ===== */
.emotion-memory {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emotion-memory__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.emotion-memory__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.emotion-memory__empty {
    padding: 18px;
    border-radius: 16px;
    border: 1px dashed #dbe7f3;
    background: #f8fafc;
    color: #64748b;
}

.emotion-memory__item {
    padding: 14px 14px;
    border-radius: 16px;
    border: 1px solid #e8eef5;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.04);
}

.emotion-memory__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.emotion-memory__date {
    font-weight: 900;
    color: #0f172a;
}

.emotion-memory__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.emotion-memory__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    font-size: 0.86em;
    font-weight: 800;
    color: #334155;
}

.emotion-memory__pill--good {
    border-color: rgba(16,185,129,0.35);
    background: rgba(16,185,129,0.10);
    color: #065f46;
}
.emotion-memory__pill--same {
    border-color: rgba(59,130,246,0.30);
    background: rgba(59,130,246,0.10);
    color: #1e3a8a;
}
.emotion-memory__pill--diff {
    border-color: rgba(245,158,11,0.30);
    background: rgba(245,158,11,0.12);
    color: #92400e;
}

.emotion-memory__note {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
    color: #334155;
    line-height: 1.65;
    white-space: pre-wrap;
}

/* ===== Check-in emocional (diario) ===== */
.modal#dailyCheckinModal {
    overflow: hidden;
}

.daily-checkin {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}

@media (max-width: 900px) {
    .daily-checkin {
        grid-template-columns: 1fr;
    }
}

.daily-checkin__card {
    border: 1px solid #e8eef5;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.05);
    padding: 14px;
}

.daily-modal {
    /* Fullscreen modal (pensado para crecer con nuevas funciones) */
    margin: 0 auto;
    width: 100vw;
    height: 100vh;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    /* Safe areas + padding suave */
    padding-top: max(18px, env(safe-area-inset-top));
    padding-right: max(18px, env(safe-area-inset-right));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    padding-left: max(18px, env(safe-area-inset-left));
}

.daily-modal__body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.daily-shell {
    display: grid;
    /* Más ancho para selección (emociones/cuerpo) */
    grid-template-columns: clamp(460px, 40vw, 590px) 1fr;
    gap: 12px;
    align-items: stretch;
    height: 100%;
    min-height: 0;
}

@media (max-width: 980px) {
    .daily-shell {
        grid-template-columns: 1fr;
    }
    .daily-modal__body {
        overflow: auto;
    }
}

/* En pantallas medianas, aún damos un poco más de espacio al selector */
@media (max-width: 1180px) and (min-width: 981px) {
    .daily-shell {
        grid-template-columns: 520px 1fr;
    }
}

.daily-sidebar {
    border: 1px solid #e8eef5;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 12px 26px rgba(2, 6, 23, 0.06);
    padding: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.daily-sideTabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.daily-sideTab {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #334155;
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.daily-sideTab:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
    border-color: #dbe7f3;
}

.daily-sideTab.active {
    background: rgba(45,212,191,0.12);
    border-color: rgba(45,212,191,0.35);
    color: #0f172a;
}

.daily-sidePane {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
}

.daily-sideHead {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.daily-sideTitle {
    font-weight: 950;
    font-size: 1.2em;
    color: #0f172a;
}

.daily-historyToggle {
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #334155;
    font-weight: 950;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.daily-historyToggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
    border-color: #dbe7f3;
}

.daily-stage {
    border: 1px solid #e8eef5;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 12px 26px rgba(2, 6, 23, 0.06);
    padding: 14px;
    overflow: hidden;
    position: relative;
}

.daily-stage__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(45,212,191,0.16) 0%, transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(59,130,246,0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 110%, rgba(245,158,11,0.10) 0%, transparent 55%);
    filter: blur(0px);
    opacity: 1;
    pointer-events: none;
}

.daily-stage > * {
    position: relative;
    z-index: 1;
}

.daily-stage__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.daily-stage__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: rgba(255,255,255,0.8);
    color: #334155;
    font-weight: 950;
    font-size: 0.9em;
    backdrop-filter: blur(6px);
}

.daily-stage__title {
    margin-top: 10px;
    font-weight: 950;
    font-size: 1.35em;
    color: #0f172a;
}

.daily-panel__hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.daily-panel__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #334155;
    font-weight: 900;
    font-size: 0.9em;
}

.daily-panel__title {
    margin-top: 8px;
    font-weight: 950;
    font-size: 1.25em;
    color: #0f172a;
}

.daily-pick {
    transition: opacity 220ms ease, transform 220ms ease;
}

.daily-pick--hidden {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
}

.daily-tabs {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

.daily-tab {
    flex: 1;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #334155;
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.daily-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.06);
    border-color: #dbe7f3;
}

.daily-tab.active {
    background: rgba(45,212,191,0.12);
    border-color: rgba(45,212,191,0.35);
    color: #0f172a;
}

.daily-search {
    margin: 6px 0 10px 0;
}

.daily-search__input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
}

.daily-search__input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(45,212,191,0.14);
    border-color: rgba(45,212,191,0.35);
}

.daily-gridWrap {
    border-radius: 16px;
    border: 1px solid #eef2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 10px;
    /* Más área visible para elegir sin scroll constante */
    max-height: min(520px, 52vh);
    overflow: auto;
}

/* Dropdown emociones (check-in) */
.daily-dropdown {
    margin-top: 10px;
}

.daily-dropdown__btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 16px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    cursor: pointer;
    font-weight: 950;
    color: #0f172a;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.daily-dropdown__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.06);
    border-color: #dbe7f3;
}

.daily-dropdown__btnRight {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.daily-dropdown__chev {
    display: inline-block;
    font-weight: 1000;
    color: #0f172a;
    opacity: 0.7;
    transform: translateY(-1px);
    transition: transform 0.14s ease, opacity 0.14s ease;
}

.daily-dropdown__btn[aria-expanded="true"] {
    border-color: rgba(45,212,191,0.35);
    box-shadow: 0 0 0 4px rgba(45,212,191,0.10);
}

.daily-dropdown__btn[aria-expanded="true"] .daily-dropdown__chev {
    transform: rotate(180deg) translateY(1px);
    opacity: 1;
}

.daily-dropdown__hint {
    margin-top: 8px;
    color: #64748b;
    font-weight: 800;
    font-size: 0.92em;
    line-height: 1.4;
    padding: 0 2px;
}

.daily-filtersHint {
    margin: 10px 0 6px 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(232,238,245,1);
    background: linear-gradient(180deg, rgba(45,212,191,0.08) 0%, rgba(59,130,246,0.06) 100%);
    color: #334155;
    font-weight: 850;
    line-height: 1.45;
}

.daily-dropdown__btnValue {
    font-weight: 900;
    color: #334155;
    font-size: 0.92em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
    text-align: right;
}

.daily-dropdown__panel {
    margin-top: 10px;
    border-radius: 16px;
    border: 1px solid #eef2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 10px;
    /* Más área visible para elegir sin scroll constante */
    max-height: min(520px, 52vh);
    overflow: auto;
}

.daily-dropdown__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.daily-dd-item {
    border-radius: 14px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    padding: 10px 10px;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.daily-dd-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.05);
    border-color: #dbe7f3;
}

.daily-dd-item.is-checked {
    background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(16,185,129,0.06) 100%);
    border-color: rgba(59,130,246,0.22);
}

.daily-dd-item__label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.daily-dd-item__check {
    width: 18px;
    height: 18px;
    accent-color: #10b981;
}

.daily-dd-item__text {
    font-weight: 900;
    color: #0f172a;
}

.daily-dd-item--meta {
    border-color: rgba(99,102,241,0.22);
    background: rgba(99,102,241,0.06);
}
.daily-dd-item--alta { border-color: rgba(239,68,68,0.22); background: rgba(239,68,68,0.05); }
.daily-dd-item--media { border-color: rgba(59,130,246,0.18); background: rgba(59,130,246,0.05); }
.daily-dd-item--baja { border-color: rgba(148,163,184,0.26); background: rgba(148,163,184,0.08); }
.daily-dd-item--calma { border-color: rgba(16,185,129,0.20); background: rgba(16,185,129,0.06); }
.daily-dd-item--expandir { border-color: rgba(245,158,11,0.22); background: rgba(245,158,11,0.07); }
.daily-dd-item--relacionales { border-color: rgba(168,85,247,0.20); background: rgba(168,85,247,0.07); }

.daily-canvas {
    border: 1px solid #e8eef5;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 12px 26px rgba(2, 6, 23, 0.06);
    padding: 14px;
    overflow: hidden;
    position: relative;
    display: grid;
    place-items: center;
}

.daily-canvas__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(45,212,191,0.18) 0%, transparent 48%),
        radial-gradient(circle at 80% 10%, rgba(59,130,246,0.14) 0%, transparent 52%),
        radial-gradient(circle at 50% 120%, rgba(245,158,11,0.10) 0%, transparent 58%);
    pointer-events: none;
}

.daily-canvas__center {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    gap: 14px;
    text-align: center;
    padding: 20px;
}

.daily-canvas__orb {
    width: min(340px, 46vw);
    height: min(340px, 46vw);
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, var(--moodA, rgba(45,212,191,0.55)) 0%, rgba(255,255,255,0.75) 36%, var(--moodB, rgba(59,130,246,0.35)) 100%);
    box-shadow: 0 26px 50px rgba(2, 6, 23, 0.14);
    border: 1px solid rgba(232,238,245,1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.daily-canvas__orb::before {
    content: '';
    position: absolute;
    inset: -30%;
    background: conic-gradient(from 90deg, rgba(255,255,255,0.0), rgba(255,255,255,0.55), rgba(255,255,255,0.0));
    animation: dailyOrbSpin 7s linear infinite;
    opacity: 0.45;
}

.daily-canvas__orb:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 30px 60px rgba(2, 6, 23, 0.16);
}

.daily-canvas__copy {
    max-width: 42ch;
    color: #334155;
    font-weight: 800;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .daily-gridWrap {
        max-height: none;
    }
}

.daily-summary__title {
    font-weight: 950;
    color: #0f172a;
}

.daily-summaryTop {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.daily-summaryTop__sub {
    color: #64748b;
    font-weight: 800;
    margin-top: 4px;
    line-height: 1.5;
}

.daily-summaryTabs {
    display: flex;
    gap: 8px;
}

.daily-summaryTab {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #334155;
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.daily-summaryTab:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
    border-color: #dbe7f3;
}

.daily-summaryTab.active {
    background: rgba(45,212,191,0.12);
    border-color: rgba(45,212,191,0.35);
    color: #0f172a;
}

.daily-mood {
    border-radius: 18px;
    border: 1px solid #eef2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
}

.daily-mood__orb {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, var(--moodA, rgba(45,212,191,0.55)) 0%, rgba(255,255,255,0.65) 32%, var(--moodB, rgba(59,130,246,0.35)) 100%);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.12);
    border: 1px solid rgba(232,238,245,1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.daily-mood__orb::before {
    content: '';
    position: absolute;
    inset: -30%;
    background: conic-gradient(from 90deg, rgba(255,255,255,0.0), rgba(255,255,255,0.55), rgba(255,255,255,0.0));
    animation: dailyOrbSpin 6s linear infinite;
    opacity: 0.55;
}

.daily-mood__orb::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.55) 45%, rgba(255,255,255,0.0) 70%);
    opacity: 0.7;
}

/* Orb FX canvas layer */
.daily-orbCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: screen;
    filter: blur(0.2px) saturate(1.12);
    opacity: 0.95;
}

.daily-orbCanvas--soft {
    opacity: 0.85;
    filter: blur(0.35px) saturate(1.08);
}

@media (prefers-reduced-motion: reduce) {
    .daily-canvas__orb,
    .daily-mood__orb {
        transition: none;
    }
    .daily-mood__orb::before,
    .daily-canvas__orb::before {
        animation: none;
    }
}

@keyframes dailyOrbSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.daily-mood__kicker {
    font-weight: 950;
    color: #0f172a;
}

.daily-mood__hint {
    margin-top: 4px;
    color: #64748b;
    font-weight: 700;
    line-height: 1.5;
    font-size: 0.92em;
}

.daily-selected__label {
    color: #334155;
    font-weight: 950;
    margin-bottom: 6px;
}

.daily-selected__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.daily-selected__chip {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.daily-selected__chip--body {
    background: rgba(59,130,246,0.08);
    border-color: rgba(59,130,246,0.22);
}

.daily-selected__chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
    border-color: #dbe7f3;
}

.daily-selected__empty {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px dashed #dbe7f3;
    background: #f8fafc;
    color: #64748b;
    font-weight: 800;
}

.daily-checkin__actions--sticky {
    position: sticky;
    bottom: 0;
    padding-top: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.92) 30%, rgba(255,255,255,1) 100%);
}

.daily-checkin__card--compact {
    box-shadow: none;
    background: #ffffff;
}

.daily-checkin__title {
    font-weight: 950;
    color: #0f172a;
    margin-bottom: 4px;
}

.daily-checkin__subtitle {
    color: #64748b;
    font-weight: 700;
    line-height: 1.55;
    margin-bottom: 10px;
}

.daily-checkin__filtersRow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.daily-filter {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #334155;
    font-weight: 900;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.daily-filter:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
    border-color: #dbe7f3;
}

.daily-filter.active {
    background: rgba(45,212,191,0.12);
    border-color: rgba(45,212,191,0.35);
    color: #0f172a;
}

.daily-checkin__metaRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px 0 10px 0;
}

.daily-checkin__hint {
    color: #64748b;
    font-weight: 800;
    font-size: 0.92em;
    line-height: 1.5;
}

.daily-checkin__count {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #0f172a;
    font-weight: 950;
    font-size: 0.92em;
}

.daily-checkin__limit {
    margin: 6px 0 10px 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(245,158,11,0.30);
    background: rgba(245,158,11,0.10);
    color: #92400e;
    font-weight: 900;
}

.daily-checkin__sectionTitle {
    margin-top: 6px;
    margin-bottom: 4px;
    font-weight: 950;
    color: #0f172a;
}

.daily-checkin__sectionSubtitle {
    margin-bottom: 10px;
    color: #64748b;
    font-weight: 700;
    font-size: 0.92em;
    line-height: 1.55;
}

.daily-checkin__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.daily-emotion-chip {
    padding: 9px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.daily-emotion-chip--meta {
    border-color: rgba(99,102,241,0.25);
    background: rgba(99,102,241,0.08);
}

.daily-emotion-chip--alta {
    border-color: rgba(239,68,68,0.25);
    background: rgba(239,68,68,0.08);
}

.daily-emotion-chip--media {
    border-color: rgba(59,130,246,0.22);
    background: rgba(59,130,246,0.08);
}

.daily-emotion-chip--baja {
    border-color: rgba(148,163,184,0.30);
    background: rgba(148,163,184,0.12);
}

.daily-emotion-chip--calma {
    border-color: rgba(16,185,129,0.25);
    background: rgba(16,185,129,0.09);
}

.daily-emotion-chip--expandir {
    border-color: rgba(245,158,11,0.25);
    background: rgba(245,158,11,0.10);
}

.daily-emotion-chip--relacionales {
    border-color: rgba(168,85,247,0.22);
    background: rgba(168,85,247,0.10);
}

.daily-emotion-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
    border-color: #dbe7f3;
}

.daily-emotion-chip.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.10) 0%, rgba(16,185,129,0.08) 100%);
    border-color: rgba(59,130,246,0.25);
}

.daily-checkin__label {
    display: block;
    margin: 6px 0 6px 0;
    font-weight: 900;
    color: #0f172a;
}

.daily-checkin__input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #0f172a;
    resize: vertical;
    min-height: 88px;
    line-height: 1.6;
}

.daily-checkin__input::placeholder {
    color: #94a3b8;
}

.daily-checkin__input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(45,212,191,0.14);
    border-color: rgba(45,212,191,0.35);
}

.daily-checkin__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 12px;
}

.daily-checkin__actions .btn-primary,
.daily-checkin__actions .btn-secondary {
    width: auto !important;
    min-width: 160px;
    text-transform: none;
    letter-spacing: 0;
}

@media (max-width: 700px) {
    .daily-checkin__actions .btn-primary,
    .daily-checkin__actions .btn-secondary {
        width: 100% !important;
        min-width: 0;
    }
}

.daily-checkin__saved {
    margin-top: 10px;
    color: #16a34a;
    font-weight: 900;
}

.daily-checkin__empty {
    padding: 14px;
    border-radius: 14px;
    border: 1px dashed #dbe7f3;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
}

.daily-checkin__history {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.daily-checkin__row {
    border: 1px solid #e8eef5;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px;
}

.daily-checkin__rowTop {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.daily-checkin__date {
    font-weight: 950;
    color: #0f172a;
}

.daily-checkin__pill {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #334155;
    font-weight: 900;
}

.daily-checkin__sens {
    margin-top: 8px;
    color: #64748b;
    font-weight: 800;
    font-size: 0.92em;
    line-height: 1.55;
}

.daily-checkin__note {
    margin-top: 8px;
    color: #334155;
    line-height: 1.65;
    white-space: pre-wrap;
}

/* ========== NEW DAILY CHECK-IN REDESIGN ========== */
.daily-modal-new {
    width: min(96vw, 1360px);
    max-width: min(96vw, 1360px);
    height: min(94vh, 980px);
    max-height: min(94vh, 980px);
    margin: 3vh auto;
    padding: 0;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.daily-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.daily-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: scale(1.05);
}

.daily-header-new {
    padding: 30px clamp(20px, 3vw, 40px) 22px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 251, 252, 0.95) 100%);
}

.daily-header-content {
    text-align: center;
}

.daily-header-badge {
    margin-bottom: 12px;
}

.daily-badge-today {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.daily-title-new {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.daily-subtitle-new {
    font-size: 16px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.daily-progress-indicator {
    margin-top: 14px;
}

.daily-progress-indicator__text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.daily-content-new {
    flex: 1;
    overflow-y: auto;
    padding: 26px clamp(20px, 3vw, 44px) 28px;
    scroll-behavior: smooth;
}

.daily-step {
    max-width: min(100%, 1180px);
    margin: 0 auto 32px;
    animation: fadeInUp 0.4s ease-out;
}

.daily-step-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.daily-step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.daily-step-info {
    flex: 1;
}

.daily-step-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.daily-step-hint {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.daily-count-badge {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid #e2e8f0;
}

.daily-filters-new {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.daily-age-personalization {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #f0f9ff 100%);
}

.daily-age-segment-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.daily-age-guidance {
    margin: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.daily-filter-new {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 16px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.daily-filter-new:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
}

.daily-filter-new.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(20, 184, 166, 0.1) 100%);
    border-color: #10b981;
    color: #059669;
}

.daily-search-new {
    position: relative;
    margin-bottom: 18px;
}

.daily-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.daily-search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: white;
    font-size: 15px;
    color: #0f172a;
    transition: all 0.2s ease;
}

.daily-search-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.daily-limit-message {
    padding: 12px 16px;
    border-radius: 12px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.daily-limit-message.hidden {
    display: none;
}

.daily-expand-btn {
    margin: 12px auto 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.daily-expand-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.daily-expand-btn.hidden {
    display: none;
}

.daily-emotions-container {
    margin-bottom: 20px;
}

.daily-context-section {
    margin-top: -8px;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.daily-context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.daily-emotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.daily-emotion-item {
    min-height: 58px;
    padding: 15px 14px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #0f172a;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.daily-emotion-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(20, 184, 166, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.daily-emotion-item:hover {
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.daily-emotion-item:hover::before {
    opacity: 1;
}

.daily-emotion-item.selected {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    border-color: #10b981;
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.daily-emotion-item.selected::before {
    opacity: 0;
}

.daily-step-summary {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 20px;
    padding: clamp(18px, 2.2vw, 30px);
    border: 1px solid #e2e8f0;
}

.daily-selected-preview {
    margin-bottom: 32px;
}

.daily-selected-group {
    margin-bottom: 24px;
}

.daily-selected-label {
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.daily-selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 40px;
}

.daily-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.daily-selected-empty {
    color: #94a3b8;
    font-size: 14px;
    font-style: italic;
}

.daily-note-section {
    margin-bottom: 32px;
}

.daily-note-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.daily-note-label span:first-child {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.daily-note-hint {
    font-size: 13px;
    color: #64748b;
}

.daily-note-textarea {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: white;
    font-size: 15px;
    color: #0f172a;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
}

.daily-note-textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.daily-actions-new {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.daily-btn-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.daily-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.daily-btn-primary:active {
    transform: translateY(0);
}

.daily-btn-secondary {
    padding: 16px 24px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #475569;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.daily-btn-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.daily-saved-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    background: #d1fae5;
    color: #065f46;
    font-size: 14px;
    font-weight: 600;
}

.daily-saved-message.hidden {
    display: none;
}

.daily-navigation {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 0 8px;
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255,255,255,0.95) 30%, rgba(255,255,255,1) 100%);
    z-index: 4;
}

.daily-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    border: 2px solid #10b981;
    background: white;
    color: #10b981;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.daily-nav-btn:hover {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.daily-nav-btn--back {
    border-color: #cbd5e1;
    color: #64748b;
}

.daily-nav-btn--back:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #475569;
}

@media (min-width: 1100px) {
    .daily-emotions-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    }
}

.daily-history-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.daily-history-privacy-note {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #dbeafe;
    background: #f8fbff;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.daily-history-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.daily-history-toggle:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.daily-history-chevron {
    transition: transform 0.2s ease;
}

.daily-history-toggle[aria-expanded="true"] .daily-history-chevron {
    transform: rotate(180deg);
}

.daily-history-content {
    margin-top: 20px;
    padding: 24px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.daily-history-content.hidden {
    display: none;
}

.daily-history-header {
    margin-bottom: 20px;
}

.daily-history-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.daily-history-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.daily-history-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

.daily-history-empty.hidden {
    display: none;
}

.daily-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.daily-history-item {
    padding: 16px;
    border-radius: 12px;
    background: white;
    border: 1px solid #e2e8f0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .daily-modal-new {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }
    
    .daily-content-new {
        padding: 24px 20px;
    }
    
    .daily-emotions-grid {
        grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
        gap: 10px;
    }
    
    .daily-actions-new {
        flex-direction: column;
    }
    
    .daily-btn-primary,
    .daily-btn-secondary {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .breathing-ring__progress,
    .breathingBarFill,
    .breathingBarKnob,
    .breathing-bloom .breathing-shape { transition: none !important; }
}

@media (max-width: 700px) {
    .breathing-hud {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
}

/* Ring */
.breathing-ring {
    width: 200px;
    height: 200px;
    position: relative;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.35));
}

.breathing-ring__svg {
    width: 200px;
    height: 200px;
    display: block;
}

.breathing-ring__track {
    fill: none;
    stroke: rgba(226,232,240,0.18);
    stroke-width: 10;
}

.breathing-ring__progress {
    fill: none;
    stroke: var(--accent);
    stroke-width: 10;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    filter: drop-shadow(0 0 12px rgba(45,212,191,0.28));
    transition: stroke 250ms ease;
    will-change: stroke-dashoffset;
}

.breathing-ring__text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.breathingSeconds {
    font-size: 3.1em;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

/* Bar */
.breathing-bar {
    width: 100%;
    max-width: 640px;
}

.breathingBarLabel {
    font-size: 1.45em;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 10px;
}

.breathingBarTrack {
    position: relative;
    height: 26px;
    border-radius: 999px;
    background: rgba(226,232,240,0.10);
    border: 1px solid rgba(226,232,240,0.16);
    overflow: hidden;
}

.breathingBarTicks {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to right,
        rgba(226,232,240,0.16) 0,
        rgba(226,232,240,0.16) 1px,
        transparent 1px,
        transparent 46px
    );
    opacity: 0.35;
}

.breathingBarFill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(45,212,191,0.85), rgba(34,197,94,0.85));
    box-shadow: 0 0 16px rgba(45,212,191,0.18);
    transition: background 250ms ease;
    will-change: width;
}

#breathingCircle.exhale .breathingBarFill {
    background: linear-gradient(90deg, rgba(34,197,94,0.85), rgba(45,212,191,0.60));
}

#breathingCircle.hold .breathingBarFill {
    background: linear-gradient(90deg, rgba(96,165,250,0.70), rgba(45,212,191,0.45));
}

.breathingBarKnob {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #e2e8f0;
    box-shadow: 0 0 0 6px rgba(45,212,191,0.18), 0 10px 18px rgba(0,0,0,0.25);
    transition: none;
    will-change: left;
}

/* Estilos personalizados para scrollbar en modales de encuestas y actividades */
#surveyQuestions::-webkit-scrollbar,
#activityContent::-webkit-scrollbar {
    width: 8px;
}

#surveyQuestions::-webkit-scrollbar-track,
#activityContent::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#surveyQuestions::-webkit-scrollbar-thumb,
#activityContent::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7BA680 0%, #8FC4D9 100%);
    border-radius: 10px;
}

#surveyQuestions::-webkit-scrollbar-thumb:hover,
#activityContent::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #6B9570 0%, #7BA6C4 100%);
}

/* Para Firefox */
#surveyQuestions,
#activityContent {
    scrollbar-width: thin;
    scrollbar-color: #A3C9A8 #f1f1f1;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 20px;
}

/* Success / celebration modal */
#successMessageModal.success-celebration-modal,
.success-celebration-modal.modal {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(10, 28, 34, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    z-index: 1500;
}

.success-celebration {
    position: relative;
    width: min(420px, 100%);
    padding: 36px 28px 26px;
    border-radius: 28px;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 50% -10%, rgba(45, 212, 191, 0.28), transparent 52%),
        radial-gradient(90% 70% at 100% 100%, rgba(163, 230, 53, 0.16), transparent 46%),
        linear-gradient(180deg, #ffffff 0%, #f7fffc 100%);
    border: 1px solid rgba(42, 169, 164, 0.22);
    box-shadow:
        0 30px 70px rgba(15, 35, 45, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.65) inset;
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.success-celebration-modal.is-open .success-celebration {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: successCardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.success-celebration__fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.success-celebration__burst {
    position: absolute;
    left: 50%;
    top: 86px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(45, 212, 191, 0.55);
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0;
}

.success-celebration-modal.is-open .success-celebration__burst {
    animation: successBurst 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}

.success-celebration__ring {
    position: absolute;
    left: 50%;
    top: 86px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(20, 184, 166, 0.45);
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
}

.success-celebration-modal.is-open .success-celebration__ring--a {
    animation: successRing 1.15s ease-out 0.12s both;
}

.success-celebration-modal.is-open .success-celebration__ring--b {
    animation: successRing 1.35s ease-out 0.22s both;
    border-color: rgba(132, 204, 22, 0.35);
}

.success-celebration__spark {
    position: absolute;
    left: 50%;
    top: 86px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #2dd4bf;
    opacity: 0;
    transform: translate(-50%, -50%);
}

.success-celebration__spark--1 { background: #22d3ee; }
.success-celebration__spark--2 { background: #34d399; }
.success-celebration__spark--3 { background: #a3e635; }
.success-celebration__spark--4 { background: #2aa9a4; }
.success-celebration__spark--5 { background: #67e8f9; }
.success-celebration__spark--6 { background: #4ade80; }
.success-celebration__spark--7 { background: #fbbf24; }
.success-celebration__spark--8 { background: #fb7185; }

.success-celebration-modal.is-open .success-celebration__spark--1 { animation: successSpark 0.95s ease-out 0.18s both; --sx: -68px; --sy: -42px; }
.success-celebration-modal.is-open .success-celebration__spark--2 { animation: successSpark 1s ease-out 0.2s both; --sx: 72px; --sy: -36px; }
.success-celebration-modal.is-open .success-celebration__spark--3 { animation: successSpark 0.9s ease-out 0.16s both; --sx: -40px; --sy: 54px; }
.success-celebration-modal.is-open .success-celebration__spark--4 { animation: successSpark 1.05s ease-out 0.22s both; --sx: 48px; --sy: 58px; }
.success-celebration-modal.is-open .success-celebration__spark--5 { animation: successSpark 0.95s ease-out 0.24s both; --sx: -86px; --sy: 8px; }
.success-celebration-modal.is-open .success-celebration__spark--6 { animation: successSpark 1s ease-out 0.26s both; --sx: 90px; --sy: 4px; }
.success-celebration-modal.is-open .success-celebration__spark--7 { animation: successSpark 0.92s ease-out 0.2s both; --sx: -18px; --sy: -68px; }
.success-celebration-modal.is-open .success-celebration__spark--8 { animation: successSpark 0.98s ease-out 0.28s both; --sx: 16px; --sy: 72px; }

.success-celebration__confetti {
    position: absolute;
    top: -12px;
    width: 8px;
    height: 12px;
    border-radius: 2px;
    opacity: 0;
}

.success-celebration__confetti:nth-child(12) { left: 8%; background: #2dd4bf; animation-delay: 0.05s; }
.success-celebration__confetti:nth-child(13) { left: 16%; background: #67e8f9; animation-delay: 0.12s; }
.success-celebration__confetti:nth-child(14) { left: 24%; background: #a3e635; animation-delay: 0.08s; }
.success-celebration__confetti:nth-child(15) { left: 33%; background: #fbbf24; animation-delay: 0.18s; }
.success-celebration__confetti:nth-child(16) { left: 42%; background: #34d399; animation-delay: 0.1s; }
.success-celebration__confetti:nth-child(17) { left: 51%; background: #fb7185; animation-delay: 0.22s; }
.success-celebration__confetti:nth-child(18) { left: 60%; background: #22d3ee; animation-delay: 0.14s; }
.success-celebration__confetti:nth-child(19) { left: 69%; background: #4ade80; animation-delay: 0.2s; }
.success-celebration__confetti:nth-child(20) { left: 78%; background: #2aa9a4; animation-delay: 0.16s; }
.success-celebration__confetti:nth-child(21) { left: 86%; background: #f59e0b; animation-delay: 0.24s; }
.success-celebration__confetti:nth-child(22) { left: 12%; background: #5eead4; width: 6px; height: 10px; animation-delay: 0.3s; }
.success-celebration__confetti:nth-child(23) { left: 92%; background: #86efac; width: 6px; height: 10px; animation-delay: 0.28s; }

.success-celebration-modal.is-open .success-celebration__confetti {
    animation-name: successConfettiFall;
    animation-duration: 1.7s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
}

.success-celebration-modal:not(.is-celebration) .success-celebration__fx {
    display: none;
}

.success-celebration__mark {
    position: relative;
    z-index: 1;
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
}

.success-celebration-modal:not(.is-celebration) .success-celebration__mark {
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
}

.success-celebration-modal:not(.is-celebration) .success-celebration__check {
    width: 64px;
    height: 64px;
    filter: none;
}

.success-celebration__check {
    width: 88px;
    height: 88px;
    filter: drop-shadow(0 12px 24px rgba(20, 184, 166, 0.28));
}

.success-celebration__check-circle {
    fill: none;
    stroke: #14b8a6;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 180;
    stroke-dashoffset: 180;
}

.success-celebration__check-path {
    fill: none;
    stroke: #0f766e;
    stroke-width: 4.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
}

.success-celebration-modal.is-open .success-celebration__check-circle {
    animation: successDrawCircle 0.7s ease-out 0.15s forwards;
}

.success-celebration-modal.is-open .success-celebration__check-path {
    animation: successDrawCheck 0.45s ease-out 0.55s forwards;
}

.success-celebration-modal.is-open .success-celebration__mark {
    animation: successMarkPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.success-celebration__copy {
    position: relative;
    z-index: 1;
    padding: 0 4px;
    color: #1A1A1A;
    white-space: pre-line;
}

.success-celebration__eyebrow {
    margin: 0 0 8px;
    color: #0f766e;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
}

.success-celebration__title {
    margin: 0 0 10px;
    color: #142536;
    font-size: clamp(1.35rem, 4vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    opacity: 0;
}

.success-celebration__lead {
    margin: 0 auto 8px;
    max-width: 32ch;
    color: #334155;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    opacity: 0;
    white-space: normal;
}

.success-celebration__note {
    margin: 0 auto 0;
    max-width: 34ch;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
    opacity: 0;
    white-space: normal;
}

.success-celebration__plain {
    margin: 0;
    color: #334155;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.55;
    opacity: 0;
    white-space: pre-line;
}

.success-celebration-modal.is-open .success-celebration__eyebrow {
    animation: successTextIn 0.55s ease 0.35s both;
}

.success-celebration-modal.is-open .success-celebration__title {
    animation: successTextIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

.success-celebration-modal.is-open .success-celebration__lead {
    animation: successTextIn 0.6s ease 0.58s both;
}

.success-celebration-modal.is-open .success-celebration__note {
    animation: successTextIn 0.55s ease 0.7s both;
}

.success-celebration-modal.is-open .success-celebration__plain {
    animation: successTextIn 0.55s ease 0.4s both;
}

.success-celebration__cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 22px;
    padding: 0 18px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 50%, #2dd4bf 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(15, 118, 110, 0.28);
    opacity: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.success-celebration-modal.is-open .success-celebration__cta {
    animation: successTextIn 0.55s ease 0.82s both;
}

.success-celebration__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(15, 118, 110, 0.34);
}

@keyframes successCardIn {
    from { opacity: 0; transform: translateY(28px) scale(0.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes successMarkPop {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes successDrawCircle {
    to { stroke-dashoffset: 0; }
}

@keyframes successDrawCheck {
    to { stroke-dashoffset: 0; }
}

@keyframes successBurst {
    0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.2); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(14); }
}

@keyframes successRing {
    0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.35); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(2.8); }
}

@keyframes successSpark {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
    25% { opacity: 1; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(0.2); }
}

@keyframes successConfettiFall {
    0% { opacity: 0; transform: translateY(-10px) rotate(0deg); }
    12% { opacity: 1; }
    100% { opacity: 0; transform: translateY(360px) rotate(520deg); }
}

@keyframes successTextIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .success-celebration-modal.is-open .success-celebration,
    .success-celebration-modal.is-open .success-celebration__burst,
    .success-celebration-modal.is-open .success-celebration__ring,
    .success-celebration-modal.is-open .success-celebration__spark,
    .success-celebration-modal.is-open .success-celebration__confetti,
    .success-celebration-modal.is-open .success-celebration__mark,
    .success-celebration-modal.is-open .success-celebration__check-circle,
    .success-celebration-modal.is-open .success-celebration__check-path,
    .success-celebration-modal.is-open .success-celebration__eyebrow,
    .success-celebration-modal.is-open .success-celebration__title,
    .success-celebration-modal.is-open .success-celebration__lead,
    .success-celebration-modal.is-open .success-celebration__note,
    .success-celebration-modal.is-open .success-celebration__plain,
    .success-celebration-modal.is-open .success-celebration__cta {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        stroke-dashoffset: 0 !important;
    }
}

/* Reply Message Modal - Asegurar z-index alto para evitar superposición */
#replyMessageModal {
    z-index: 1003 !important;
}

/* Student Detail Dashboard Modal */
.student-detail-modal.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: clamp(6px, 1vw, 14px);
    animation: studentDetailModalFadeIn 0.24s ease-out;
    background-color: transparent;
    overflow: hidden !important;
}

.student-detail-modal .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1001;
}

.student-detail-dashboard {
    position: relative;
    z-index: 1002;
    width: min(100vw - 16px, 1920px);
    max-width: none;
    height: min(96dvh, calc(100vh - 16px));
    max-height: min(96dvh, calc(100vh - 16px));
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    animation: studentDetailDashboardIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    min-height: 0;
    will-change: transform, opacity;
}

/* Cabecera y cuerpo: más aire útil dentro del panel grande */
.student-detail-dashboard > .dashboard-header {
    padding: 14px 18px;
    flex-shrink: 0;
}

.student-detail-dashboard > .dashboard-header .student-avatar {
    width: 56px;
    height: 56px;
    font-size: 1.35rem;
}

.student-detail-dashboard > .dashboard-header .dashboard-title {
    font-size: clamp(1.1rem, 1rem + 0.45vw, 1.5rem);
    margin-bottom: 4px;
}

.student-detail-dashboard > .dashboard-header .dashboard-subtitle {
    font-size: 0.85rem;
    line-height: 1.35;
}

.student-detail-dashboard > .dashboard-header .dashboard-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.student-detail-dashboard > .dashboard-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px clamp(12px, 1.8vw, 28px) 28px;
    scroll-behavior: smooth;
    background: #eef2f7;
}

/* Ritmo y bloques: la ficha se lee por secciones, no como un único panel blanco */
.student-detail-dashboard #studentDetailContent .student-detail-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.student-detail-dashboard .student-detail-section {
    margin: 0;
    border-radius: 14px;
    border: 1px solid #d8e0ea;
    background: #ffffff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 6px 20px rgba(15, 23, 42, 0.05);
}

.student-detail-dashboard .student-detail-section--status {
    padding: 0;
    overflow: hidden;
    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.06),
        0 14px 36px rgba(15, 23, 42, 0.07);
}

.student-detail-dashboard .student-detail-status {
    border: 1px solid color-mix(in srgb, var(--status-color, #0d9488) 28%, #e2e8f0);
    background: linear-gradient(135deg, var(--status-bg, #f0fdfa) 0%, #ffffff 72%);
}

.student-detail-dashboard .student-detail-status__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 14px;
    flex-wrap: wrap;
}

.student-detail-dashboard .student-detail-status__identity {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1 1 240px;
}

.student-detail-dashboard .student-detail-status__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--status-color, #0d9488) 12%, #ffffff);
    color: var(--status-color, #0d9488);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.student-detail-dashboard .student-detail-status__eyebrow {
    margin: 0 0 2px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.student-detail-dashboard .student-detail-status__title {
    margin: 0 0 4px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--status-color, #0d9488);
    line-height: 1.2;
}

.student-detail-dashboard .student-detail-status__lead {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #475569;
    max-width: 42ch;
}

.student-detail-dashboard .student-detail-status__score {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    column-gap: 4px;
    row-gap: 0;
    align-items: end;
    padding: 10px 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.student-detail-dashboard .student-detail-status__score-label {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.student-detail-dashboard .student-detail-status__score-value {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--status-color, #0d9488);
}

.student-detail-dashboard .student-detail-status__score-unit {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    padding-bottom: 3px;
}

.student-detail-dashboard .student-detail-status__note {
    margin: 0;
    padding: 10px 20px 14px;
    font-size: 0.82rem;
    color: #64748b;
    border-top: 1px solid #e8edf4;
}

.student-detail-dashboard .student-detail-status__note--ok {
    color: #0f766e;
}

.student-detail-dashboard .student-detail-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.student-detail-dashboard .student-detail-psa-bases-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid #d1fae5;
    background:
        linear-gradient(180deg, rgba(236, 253, 245, 0.7) 0%, #ffffff 55%);
}

.student-detail-dashboard .student-detail-psa-bases__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.student-detail-dashboard .student-detail-psa-bases__subtitle {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.student-detail-dashboard .student-detail-psa-bases__global {
    min-width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f766e;
    background: #ecfdf5;
    border: 1px solid #99f6e4;
}

.student-detail-dashboard .student-detail-psa-bases__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.student-detail-dashboard .student-detail-psa-bases__empty {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

.student-detail-dashboard .student-detail-psa-base {
    display: grid;
    gap: 7px;
}

.student-detail-dashboard .student-detail-psa-base__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.student-detail-dashboard .student-detail-psa-base__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}

.student-detail-dashboard .student-detail-psa-base__value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--psa-score, #0f766e);
    letter-spacing: -0.02em;
}

.student-detail-dashboard .student-detail-psa-base__bar {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.student-detail-dashboard .student-detail-psa-base__bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--psa-accent, #0d9488), var(--psa-score, #0f766e));
}

.student-detail-dashboard details.student-history-accordion {
    padding: 0;
    overflow: hidden;
}

.student-detail-dashboard .student-history-accordion__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    user-select: none;
}

.student-detail-dashboard .student-history-accordion__summary::-webkit-details-marker {
    display: none;
}

.student-detail-dashboard .student-history-accordion__title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.student-detail-dashboard .student-history-accordion__meta {
    margin-left: auto;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 4px 10px;
}

.student-detail-dashboard .student-history-accordion__chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.student-detail-dashboard details.student-history-accordion[open] .student-history-accordion__chevron {
    transform: rotate(225deg);
}

.student-detail-dashboard .student-history-accordion__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0 20px 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

.student-detail-dashboard .student-history-item {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.student-detail-dashboard .student-history-item__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.student-detail-dashboard .student-history-item__title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.student-detail-dashboard .student-history-item__date {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
}

.student-detail-dashboard .student-history-item__score {
    min-width: 72px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--history-score, #0ea5e9) 10%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--history-score, #0ea5e9) 35%, #e2e8f0);
}

.student-detail-dashboard .student-history-item__score-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 2px;
}

.student-detail-dashboard .student-history-item__score-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--history-score, #0ea5e9);
    line-height: 1;
}

.student-detail-dashboard .student-history-item__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.student-detail-dashboard .student-history-chip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
}

.student-detail-dashboard .student-history-chip__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.student-detail-dashboard .student-history-chip__label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    line-height: 1.25;
}

.student-detail-dashboard .student-history-chip__domain {
    font-size: 0.68rem;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 2px 7px;
    white-space: nowrap;
}

.student-detail-dashboard .student-history-chip__score {
    margin-top: 6px;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

.student-detail-dashboard .student-history-chip__score span {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 2px;
}

.student-detail-dashboard .student-history-chip__bar {
    margin-top: 8px;
    height: 4px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.student-detail-dashboard .student-history-chip__bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.student-detail-dashboard .student-history-item__empty {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

@media (max-width: 820px) {
    .student-detail-dashboard .student-detail-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.student-detail-dashboard .student-detail-section--kpi {
    padding: 16px 18px 18px;
    background: #f8fafc;
    border-color: #cfd8e6;
}

.student-detail-dashboard .student-detail-section--kpi .dashboard-stats-grid {
    margin-bottom: 0;
}

.student-detail-dashboard .student-detail-section.dashboard-card {
    margin-bottom: 0;
    padding: 20px 22px 22px;
    border-radius: 14px;
    border: 1px solid #d8e0ea;
    background: #ffffff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(15, 23, 42, 0.05);
}

.student-detail-dashboard .student-detail-section.dashboard-card:hover {
    transform: none;
    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.06),
        0 12px 28px rgba(15, 23, 42, 0.07);
}

.student-detail-dashboard .student-detail-section--chart .dashboard-card-title {
    margin-bottom: 12px;
}

.student-detail-dashboard .student-detail-section--chart canvas {
    border-radius: 10px;
    background: #fbfcfe;
    border: 1px solid #e8edf4;
}

.student-detail-dashboard .dashboard-stats-grid {
    gap: 14px;
    margin-bottom: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.student-detail-dashboard .dashboard-card {
    margin-bottom: 18px;
    padding: 18px 20px;
    border-radius: 14px;
}

.student-detail-dashboard #studentDetailContent .dashboard-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 14px 0;
    padding: 0 0 12px 14px;
    margin-left: -6px;
    border-bottom: 1px solid #e2e8f0;
    border-left: 4px solid #7ba680;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

@keyframes studentDetailModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes studentDetailDashboardIn {
    from {
        transform: translateY(10px) scale(0.985);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes studentDetailDashboardOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(8px) scale(0.985);
        opacity: 0;
    }
}

.student-detail-modal.closing {
    animation: studentDetailModalFadeOut 0.2s ease-in forwards;
}

@keyframes studentDetailModalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.student-detail-modal.closing .student-detail-dashboard {
    animation: studentDetailDashboardOut 0.2s ease-in forwards;
}

.dashboard-header {
    background: linear-gradient(135deg, #7BA680 0%, #8FC4D9 100%);
    padding: 30px 40px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(163, 201, 168, 0.1);
    flex-shrink: 0;
}

.student-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #F8F9FA 0%, #CDE7F0 100%);
    border: 2px solid #A3C9A8;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #1a2332;
    box-shadow: 0 2px 8px rgba(163, 201, 168, 0.15);
    font-size: 0.95em;
}

.student-profile-btn #studentNameHeader {
    color: #1a2332;
    font-weight: 600;
    font-size: 1em;
}

.student-profile-btn:hover {
    background: linear-gradient(135deg, #7BA680 0%, #8FC4D9 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 166, 128, 0.4);
}

.student-profile-btn:hover #studentNameHeader {
    color: white;
}

.student-profile-btn:hover #studentAvatarHeader {
    background: rgba(255,255,255,0.2) !important;
}

#studentAvatarHeader {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.dashboard-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.student-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-title-section {
    flex: 1;
}

.dashboard-title {
    margin: 0 0 8px 0;
    font-size: 1.5em;
    font-weight: 700;
    color: white;
}

.dashboard-subtitle {
    margin: 0;
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0.95;
}

.dashboard-close-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.dashboard-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.dashboard-close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.dashboard-body {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    background: #f8f9fc;
}

.dashboard-body::-webkit-scrollbar {
    width: 8px;
}

.dashboard-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dashboard-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dashboard-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eef5;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.dashboard-card-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.clickable-stat-card {
    background: #FFFFFF;
    border: 2px solid #E5E5E5 !important;
    width: 100%;
    text-align: center;
    font-family: inherit;
}

.clickable-stat-card:hover {
    background: #FAFAFA;
    border-color: #1A1A1A !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.clickable-stat-card:active {
    transform: translateY(0);
}

.clickable-stat-card:focus {
    outline: 2px solid #1A1A1A;
    outline-offset: 2px;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.dashboard-stat-card {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #E5E5E5;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dashboard-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(163, 201, 168, 0.15);
    border-color: #A3C9A8;
}

.dashboard-stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #A3C9A8;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.dashboard-stat-label {
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .student-detail-dashboard {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .student-detail-dashboard {
        animation: studentDetailMobileIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    @keyframes studentDetailMobileIn {
        from {
            transform: translateY(24px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .student-detail-modal.closing .student-detail-dashboard {
        animation: studentDetailMobileOut 0.2s ease-in forwards;
    }

    @keyframes studentDetailMobileOut {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(24px);
            opacity: 0;
        }
    }

    .dashboard-header {
        padding: 20px;
    }

    .direction-header {
        gap: 16px;
    }

    .direction-user-info {
        width: 100%;
        justify-content: space-between;
        padding: 12px 14px;
        border-radius: 20px;
        flex-wrap: wrap;
    }

    .direction-user-badge {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .direction-user-copy {
        flex: 1 1 180px;
        text-align: left;
    }

    .dashboard-header .btn-secondary.direction-logout-btn {
        width: 100%;
        justify-content: center;
    }

    [id^="student"].dashboard-container .user-info,
    [id^="teacher"].dashboard-container .user-info,
    #docenteView .user-info,
    #directionView .user-info {
        width: 100%;
        justify-content: space-between;
        padding: 12px 14px;
        border-radius: 20px;
        flex-wrap: wrap;
    }

    [id^="student"].dashboard-container .user-info > button[onclick="logout()"],
    [id^="teacher"].dashboard-container .user-info > button[onclick="logout()"],
    #docenteView .user-info > button[onclick="logout()"],
    #directionView .user-info > button[onclick="logout()"] {
        width: 100%;
        justify-content: center;
    }

    /* Docente / orientación: barra superior compacta (no apilar logout a ancho completo) */
    [id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar,
    [id^="student"].dashboard-container.dashboard-app-grid > .dashboard-header .user-info--teacher-toolbar,
    #docenteView.dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar,
    #directionView.dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar {
        width: auto;
        max-width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-end;
        padding: 0 !important;
    }

    [id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar > button[onclick="logout()"],
    [id^="student"].dashboard-container.dashboard-app-grid > .dashboard-header .user-info--teacher-toolbar > button[onclick="logout()"],
    #docenteView.dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar > button[onclick="logout()"],
    #directionView.dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar > button[onclick="logout()"] {
        width: auto !important;
        flex: 0 0 auto;
    }

    .dashboard-body {
        padding: 25px 20px;
    }

    .dashboard-header-content {
        gap: 15px;
    }

    .student-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .dashboard-title {
        font-size: 1.5em;
    }
}

/* Survey Questions */
.question-group {
    margin-bottom: 25px;
}

.question-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #ffffff;
    user-select: none;
}

.radio-option:hover {
    background-color: #f0f7ff;
    border-color: #5B8FC7;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(163, 201, 168, 0.1);
}

.radio-option:has(input[type="radio"]:checked),
.radio-option.selected {
    background-color: #e6f2ff;
    border-color: #5B8FC7;
    border-width: 2px;
    box-shadow: 0 2px 12px rgba(163, 201, 168, 0.2);
}

/* Fallback para navegadores que no soportan :has() */
.radio-option input[type="radio"]:checked + label {
    font-weight: 500;
}

.radio-option input[type="radio"] {
    margin-right: 15px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: #A3C9A8;
}

.radio-option label {
    cursor: pointer;
    flex: 1;
    font-size: 1.05em;
    line-height: 1.5;
    margin: 0;
}

/* Teacher Navigation */
.teacher-nav {
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
    border-bottom: 2px solid #E8F5E9;
    padding: 0;
    display: flex;
    gap: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 250, 0.98) 100%);
    border-radius: 0;
}

/* Navegación optimizada del panel de Orientación */
[id^="teacher"].dashboard-container > .teacher-nav,
#docenteView.dashboard-container > .teacher-nav,
#directionView.dashboard-container > .teacher-nav {
    width: min(1380px, calc(100% - 24px));
    margin: 14px auto 0;
    padding: 8px;
    position: relative;
    top: auto;
    z-index: auto;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 6px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

/* Mantener misma UX visual en Dirección */
#directionView.dashboard-container > .teacher-nav {
    width: calc(100% - 32px);
    max-width: 1400px;
    margin: 14px auto 0;
    padding: 10px;
    position: relative;
    top: auto;
    z-index: auto;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 8px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 32px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #555555;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0.02em;
    border-radius: 8px 8px 0 0;
    margin: 4px 2px 0 2px;
    overflow: hidden;
}

[id^="teacher"].dashboard-container > .teacher-nav .nav-btn,
#docenteView.dashboard-container > .teacher-nav .nav-btn,
#directionView.dashboard-container > .teacher-nav .nav-btn {
    flex: 1 1 148px;
    min-height: 54px;
    min-width: 0;
    padding: 11px 12px;
    margin: 0;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 14px;
    box-sizing: border-box;
    background: transparent;
    box-shadow: none;
    transform: none;
    white-space: normal;
    text-align: center;
}

[id^="teacher"].dashboard-container > .teacher-nav .nav-btn span:last-child,
#docenteView.dashboard-container > .teacher-nav .nav-btn span:last-child,
#directionView.dashboard-container > .teacher-nav .nav-btn span:last-child {
    text-align: center;
    line-height: 1.2;
    font-size: 0.9em;
    word-break: break-word;
    white-space: normal;
}

[id^="teacher"].dashboard-container > .teacher-nav .nav-btn::before,
#docenteView.dashboard-container > .teacher-nav .nav-btn::before,
#directionView.dashboard-container > .teacher-nav .nav-btn::before {
    width: 0;
    height: 0;
    box-shadow: none;
}

[id^="teacher"].dashboard-container > .teacher-nav .nav-btn::after,
#docenteView.dashboard-container > .teacher-nav .nav-btn::after,
#directionView.dashboard-container > .teacher-nav .nav-btn::after {
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(20, 184, 166, 0.06) 100%);
}

[id^="teacher"].dashboard-container > .teacher-nav .nav-btn:hover,
#docenteView.dashboard-container > .teacher-nav .nav-btn:hover,
#directionView.dashboard-container > .teacher-nav .nav-btn:hover {
    color: #0f172a;
    transform: none;
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.96) 0%, rgba(248, 250, 252, 0.96) 100%);
    border-color: rgba(203, 213, 225, 0.95);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

[id^="teacher"].dashboard-container > .teacher-nav .nav-btn:hover::before,
#docenteView.dashboard-container > .teacher-nav .nav-btn:hover::before,
#directionView.dashboard-container > .teacher-nav .nav-btn:hover::before {
    width: 0;
}

[id^="teacher"].dashboard-container > .teacher-nav .nav-btn.active,
#docenteView.dashboard-container > .teacher-nav .nav-btn.active,
#directionView.dashboard-container > .teacher-nav .nav-btn.active {
    color: #065f46;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.98) 0%, rgba(240, 253, 250, 0.96) 100%);
    border-color: rgba(110, 231, 183, 0.95);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.14);
}

[id^="teacher"].dashboard-container > .teacher-nav .nav-btn.active::before,
#docenteView.dashboard-container > .teacher-nav .nav-btn.active::before,
#directionView.dashboard-container > .teacher-nav .nav-btn.active::before {
    width: calc(100% - 28px);
    height: 3px;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #10b981 0%, #14b8a6 100%);
    border-radius: 999px;
    box-shadow: none;
}

[id^="teacher"].dashboard-container > .teacher-nav .nav-btn.active::after,
#docenteView.dashboard-container > .teacher-nav .nav-btn.active::after,
#directionView.dashboard-container > .teacher-nav .nav-btn.active::after {
    opacity: 1;
}

[id^="teacher"].dashboard-container > .teacher-nav .nav-icon,
#docenteView.dashboard-container > .teacher-nav .nav-icon,
#directionView.dashboard-container > .teacher-nav .nav-icon {
    font-size: 1.05rem;
    filter: none;
}

[id^="teacher"].dashboard-container > .teacher-nav .notification-badge-nav,
#docenteView.dashboard-container > .teacher-nav .notification-badge-nav,
#directionView.dashboard-container > .teacher-nav .notification-badge-nav {
    top: 6px;
    right: 8px;
}

/* ---------- Dashboards con sidebar (estudiante, docente, orientación, dirección): alto viewport, scroll en main ---------- */
[id^="teacher"].dashboard-container.teacher-app-grid,
[id^="student"].dashboard-container.dashboard-app-grid,
#docenteView.dashboard-container.teacher-app-grid,
#directionView.dashboard-container.teacher-app-grid {
    display: grid;
    grid-template-columns: minmax(220px, 292px) minmax(0, 1fr);
    /* minmax(0,1fr) en la fila de contenido: permite que el main haga scroll interno sin estirar el body */
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
        "o-hdr o-hdr"
        "o-nav o-main";
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    align-items: stretch;
    box-sizing: border-box;
    overflow: hidden;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-header,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-header,
#directionView.dashboard-container.teacher-app-grid > .dashboard-header {
    grid-area: o-hdr;
    box-sizing: border-box;
    padding-top: 12px;
    padding-bottom: 12px;
    /* Centra logo + acciones en un ancho de lectura; evita barra “infinita” en pantallas grandes */
    padding-inline: max(14px, calc((100% - min(1200px, 100% - 28px)) / 2));
    gap: 12px;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-header .user-info--teacher-toolbar,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar,
#directionView.dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar {
    display: inline-flex !important;
    align-items: center;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0;
    flex-wrap: nowrap;
    max-width: min(100%, calc(100vw - 108px));
    justify-content: flex-end;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none;
    flex-shrink: 0;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header #teacherName,
[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header #teacherActionsName,
[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header #teacherResourcesName,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-header #teacherResourcesName,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-header #docentePanelUserName,
#directionView.dashboard-container.teacher-app-grid > .dashboard-header #directionPanelUserName {
    max-width: min(240px, 54vw);
    min-width: 0;
    min-height: 40px;
    padding: 6px 11px 6px 8px !important;
    gap: 8px !important;
    font-size: clamp(0.68rem, 0.64rem + 0.28vw, 0.8rem) !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 12px !important;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header #teacherName::before,
[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header #teacherActionsName::before,
[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header #teacherResourcesName::before {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 0.72rem;
}

#docenteView.dashboard-container.teacher-app-grid > .dashboard-header #docentePanelUserName::before,
#directionView.dashboard-container.teacher-app-grid > .dashboard-header #directionPanelUserName::before {
    content: attr(data-account-initial);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 900;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
    color: #0f172a;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar > button[onclick="logout()"],
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-header .user-info--teacher-toolbar > button[onclick="logout()"],
#docenteView.dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar > button[onclick="logout()"],
#directionView.dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar > button[onclick="logout()"] {
    padding: 7px 12px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    border-radius: 12px !important;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header #teacherName[onclick],
[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header #teacherActionsName,
[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header #teacherResourcesName,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-header #teacherResourcesName,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-header #docentePanelUserName,
#directionView.dashboard-container.teacher-app-grid > .dashboard-header #directionPanelUserName {
    cursor: pointer;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header h1,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-header h1,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-header h1,
#directionView.dashboard-container.teacher-app-grid > .dashboard-header h1 {
    font-size: clamp(1.05rem, 1rem + 0.35vw, 1.35rem);
    flex-shrink: 0;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav,
[id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav,
#docenteView.dashboard-container.teacher-app-grid > .teacher-nav,
#directionView.dashboard-container.teacher-app-grid > .teacher-nav {
    grid-area: o-nav;
    flex-direction: column;
    flex-wrap: nowrap;
    width: auto;
    max-width: none;
    min-width: 0;
    min-height: 0;
    margin: 0 0 14px 16px;
    align-self: stretch;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
    padding: 14px 12px;
    border-radius: 18px;
    position: relative;
    top: auto;
    z-index: 4;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.1);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-main,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-main,
#directionView.dashboard-container.teacher-app-grid > .dashboard-main {
    grid-area: o-main;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: clamp(10px, 1.2vw, 16px) clamp(14px, 2.2vw, 26px) clamp(18px, 2.8vw, 30px) clamp(10px, 1.3vw, 16px);
    max-width: min(1260px, 100%);
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%);
    scroll-behavior: smooth;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav .nav-btn,
[id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav .nav-btn,
#docenteView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn,
#directionView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    text-align: left;
    padding: 12px 14px 12px 18px;
    min-height: 48px;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav .nav-btn span:last-child,
[id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav .nav-btn span:last-child,
#docenteView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn span:last-child,
#directionView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn span:last-child {
    text-align: left;
    font-size: clamp(0.78rem, 0.72rem + 0.22vw, 0.9rem);
    line-height: 1.28;
    font-weight: 600;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav .nav-icon,
[id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav .nav-icon,
#docenteView.dashboard-container.teacher-app-grid > .teacher-nav .nav-icon,
#directionView.dashboard-container.teacher-app-grid > .teacher-nav .nav-icon {
    flex-shrink: 0;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav .nav-btn::before,
[id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav .nav-btn::before,
#docenteView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn::before,
#directionView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn::before {
    width: 0;
    height: 0;
    opacity: 0;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active::before,
[id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav .nav-btn.active::before,
#docenteView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active::before,
#directionView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active::before {
    opacity: 1;
    left: 8px;
    right: auto;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: calc(100% - 20px);
    border-radius: 999px;
    background: linear-gradient(180deg, #10b981 0%, #14b8a6 100%);
    box-shadow: none;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active,
[id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav .nav-btn.active,
#docenteView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active,
#directionView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active {
    padding-left: 22px;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav .notification-badge-nav,
[id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav .notification-badge-nav,
#docenteView.dashboard-container.teacher-app-grid > .teacher-nav .notification-badge-nav,
#directionView.dashboard-container.teacher-app-grid > .teacher-nav .notification-badge-nav {
    top: 8px;
    right: 10px;
}

@media (max-width: 960px) {
    [id^="teacher"].dashboard-container.teacher-app-grid,
    [id^="student"].dashboard-container.dashboard-app-grid,
    #docenteView.dashboard-container.teacher-app-grid,
    #directionView.dashboard-container.teacher-app-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto minmax(0, 1fr);
        grid-template-areas:
            "o-hdr"
            "o-nav"
            "o-main";
    }

    [id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav,
    [id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav,
    #docenteView.dashboard-container.teacher-app-grid > .teacher-nav,
    #directionView.dashboard-container.teacher-app-grid > .teacher-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-self: center;
        margin: 10px 12px 0;
        width: min(100%, calc(100% - 20px));
        max-width: 1380px;
    }

    [id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav .nav-btn,
    [id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav .nav-btn,
    #docenteView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn,
    #directionView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn {
        flex: 1 1 148px;
        width: auto;
        justify-content: center;
        text-align: center;
        padding: 11px 12px;
    }

    [id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav .nav-btn span:last-child,
    [id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav .nav-btn span:last-child,
    #docenteView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn span:last-child,
    #directionView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn span:last-child {
        text-align: center;
    }

    [id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active,
    [id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav .nav-btn.active,
    #docenteView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active,
    #directionView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active {
        padding-left: 12px;
    }

    [id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active::before,
    [id^="student"].dashboard-container.dashboard-app-grid > .teacher-nav .nav-btn.active::before,
    #docenteView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active::before,
    #directionView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active::before {
        left: 50%;
        top: auto;
        bottom: 8px;
        transform: translateX(-50%);
        width: calc(100% - 28px);
        height: 3px;
        background: linear-gradient(90deg, #10b981 0%, #14b8a6 100%);
    }

    [id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main,
    [id^="student"].dashboard-container.dashboard-app-grid > .dashboard-main,
    #docenteView.dashboard-container.teacher-app-grid > .dashboard-main,
    #directionView.dashboard-container.teacher-app-grid > .dashboard-main {
        padding: 8px 14px 24px;
        max-width: none;
    }
}

/* ---------- Panel orientación: densidad de contenido, tipografía fluida, scroll acotado ---------- */
[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main .welcome-section,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-main .welcome-section,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-main .welcome-section,
#directionView.dashboard-container.teacher-app-grid > .dashboard-main .welcome-section {
    margin-bottom: clamp(14px, 2vw, 24px);
    padding-bottom: clamp(10px, 1.5vw, 16px);
    /* Evita quedar en opacity:0 si el panel se mostró tras estar en display:none (animación global hasta un reflow, p. ej. F12). */
    opacity: 1;
    animation: none;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main .welcome-section h2,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-main .welcome-section h2,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-main .welcome-section h2,
#directionView.dashboard-container.teacher-app-grid > .dashboard-main .welcome-section h2 {
    font-size: clamp(1.2rem, 1.05rem + 1vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: none;
    line-height: 1.22;
    margin-bottom: 0.4em;
    color: #0f172a;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main .welcome-section p,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-main .welcome-section p,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-main .welcome-section p,
#directionView.dashboard-container.teacher-app-grid > .dashboard-main .welcome-section p {
    font-size: clamp(0.84rem, 0.8rem + 0.28vw, 0.98rem);
    line-height: 1.5;
    max-width: min(62ch, 100%);
    color: #475569;
    margin: 0;
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main .content-section,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-main .content-section,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-main .content-section,
#directionView.dashboard-container.teacher-app-grid > .dashboard-main .content-section {
    margin-top: clamp(10px, 1.6vw, 20px);
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main .section-title,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-main .section-title,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-main .section-title,
#directionView.dashboard-container.teacher-app-grid > .dashboard-main .section-title {
    margin-bottom: clamp(10px, 1.4vw, 18px);
}

[id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main .section-title h3,
[id^="student"].dashboard-container.dashboard-app-grid > .dashboard-main .section-title h3,
#docenteView.dashboard-container.teacher-app-grid > .dashboard-main .section-title h3,
#directionView.dashboard-container.teacher-app-grid > .dashboard-main .section-title h3 {
    font-size: clamp(0.95rem, 0.88rem + 0.35vw, 1.15rem);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

/* Dashboard orientación: bienvenida y pestañas — tipografía clara y jerarquía fuerte */
#teacherView.teacher-app-grid > .dashboard-main .welcome-section.mb-10,
#teacherView.teacher-app-grid > .dashboard-main .welcome-section.mb-4,
#teacherView.teacher-app-grid > .dashboard-main .welcome-section.mb-5,
#teacherView.teacher-app-grid > .dashboard-main .welcome-section.mb-3 {
    margin-bottom: clamp(0.55rem, 0.45rem + 0.45vw, 0.85rem) !important;
}

#teacherView.teacher-app-grid > .dashboard-main .welcome-section > h2 {
    font-size: clamp(1.65rem, 1.35rem + 1.15vw, 2.45rem) !important;
    line-height: 1.12 !important;
    margin-bottom: 0.5rem !important;
    letter-spacing: -0.03em !important;
}

#teacherView.teacher-app-grid > .dashboard-main .welcome-section p.text-lg,
#teacherView.teacher-app-grid > .dashboard-main .welcome-section p.text-base {
    font-size: clamp(1rem, 0.92rem + 0.35vw, 1.125rem) !important;
    line-height: 1.55 !important;
    max-width: min(58ch, 100%);
    font-weight: 400 !important;
    color: #475569 !important;
}

#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container:has(.teacher-dash-tabstrip) {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container.mb-8,
#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container.mb-4,
#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container.mb-5,
#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container.mb-3,
#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container.mb-2 {
    margin-top: 0 !important;
    margin-bottom: clamp(0.35rem, 0.28rem + 0.35vw, 0.6rem) !important;
}

/* Franja de pestañas docente: segment control tranquilo (sin gradientes ni micro-animaciones) */
#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container .dashboard-tabs.teacher-dash-tabstrip {
    padding: 4px !important;
    gap: 4px !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container .teacher-dash-tabstrip .dashboard-tab::before {
    display: none !important;
    content: none !important;
}

#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container .teacher-dash-tabstrip .dashboard-tab:hover {
    transform: none !important;
}

#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container .teacher-dash-tabstrip .dashboard-tab:hover .tab-icon,
#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container .teacher-dash-tabstrip .dashboard-tab.active .tab-icon {
    transform: none !important;
}

#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container .teacher-dash-tabstrip .dashboard-tab {
    padding: 0.45rem 0.5rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.28 !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    color: #64748b !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid transparent !important;
    border-radius: 9px !important;
    gap: 0.35rem !important;
    min-height: 2.35rem !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container .teacher-dash-tabstrip .dashboard-tab .tab-icon {
    font-size: 0.95rem !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    margin-right: 0 !important;
    opacity: 0.9 !important;
}

#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container .teacher-dash-tabstrip .dashboard-tab .tab-label {
    display: block;
    max-width: 100%;
}

#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container .teacher-dash-tabstrip .dashboard-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.65) !important;
    color: #334155 !important;
}

#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container .teacher-dash-tabstrip .dashboard-tab.active {
    background: #fff !important;
    color: #0f766e !important;
    font-weight: 600 !important;
    border-color: rgba(45, 212, 191, 0.45) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

#teacherView.teacher-app-grid > .dashboard-main .dashboard-tabs-container .teacher-dash-tabstrip .dashboard-tab.active .tab-icon {
    opacity: 1 !important;
}

/* Área principal: menos padding vertical + sin margen extra arriba del resumen (evita scroll mínimo) */
#teacherView.teacher-app-grid > .dashboard-main {
    min-height: 0 !important;
    padding-top: 6px !important;
    padding-bottom: 8px !important;
    padding-left: clamp(12px, 1.5vw, 20px) !important;
    padding-right: clamp(12px, 1.5vw, 20px) !important;
    box-sizing: border-box !important;
}

#teacherView.teacher-app-grid > .dashboard-main > .content-section {
    margin-top: 0 !important;
}

/* Resumen del dashboard: legibilidad premium (sin micro-tipografía) */
#teacherView.teacher-app-grid #tab-summary .summary-header {
    margin-bottom: clamp(0.45rem, 0.35rem + 0.35vw, 0.7rem) !important;
    padding-bottom: clamp(0.4rem, 0.3rem + 0.3vw, 0.55rem) !important;
}

#teacherView.teacher-app-grid #tab-summary .summary-title {
    font-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.6rem) !important;
    line-height: 1.22 !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

#teacherView.teacher-app-grid #tab-summary .summary-subtitle {
    font-size: clamp(0.95rem, 0.88rem + 0.22vw, 1.05rem) !important;
    line-height: 1.4 !important;
    margin-top: 0.15rem !important;
    color: #64748b !important;
}

#teacherView.teacher-app-grid #tab-summary .summary-stats-grid {
    display: grid !important;
    gap: clamp(0.55rem, 0.45rem + 0.35vw, 0.85rem) !important;
    margin-bottom: 0 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 1024px) {
    #teacherView.teacher-app-grid #tab-summary .summary-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    #teacherView.teacher-app-grid #tab-summary .summary-stats-grid {
        grid-template-columns: 1fr !important;
    }
}

#teacherView.teacher-app-grid #tab-summary .summary-stat-card {
    padding: clamp(0.8rem, 0.72rem + 0.28vw, 1.1rem) clamp(0.95rem, 0.85rem + 0.35vw, 1.15rem) !important;
    border-radius: 16px !important;
}

#teacherView.teacher-app-grid #tab-summary .summary-stat-card:hover {
    transform: translateY(-3px) scale(1.01) !important;
}

#teacherView.teacher-app-grid #tab-summary .summary-stat-header {
    margin-bottom: 0.4rem !important;
    gap: 0.55rem !important;
}

#teacherView.teacher-app-grid #tab-summary .summary-stat-icon {
    width: 2.75rem !important;
    height: 2.75rem !important;
    border-radius: 13px !important;
}

#teacherView.teacher-app-grid #tab-summary .summary-stat-icon svg {
    width: 18px !important;
    height: 18px !important;
}

#teacherView.teacher-app-grid #tab-summary .summary-stat-card .summary-stat-label {
    font-size: clamp(0.9rem, 0.84rem + 0.22vw, 1.02rem) !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
}

#teacherView.teacher-app-grid #tab-summary .summary-stat-card .summary-stat-value {
    font-size: clamp(1.65rem, 1.25rem + 1.35vw, 2.35rem) !important;
    min-height: 0 !important;
    margin-bottom: 0.25rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
}

#teacherView.teacher-app-grid #tab-summary .summary-stat-meta {
    font-size: clamp(0.82rem, 0.76rem + 0.18vw, 0.92rem) !important;
    margin: 0.3rem 0 0 0 !important;
    line-height: 1.4 !important;
    color: #64748b !important;
}

/* Mensajes anónimos: menos scroll global; filtros compactos; solo la lista hace scroll */
#teacherMessagesView.teacher-app-grid > .dashboard-main.dashboard-main--messages-layout {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding-top: 8px;
    padding-bottom: 10px;
}

#teacherMessagesView.teacher-app-grid > .dashboard-main.dashboard-main--messages-layout .welcome-section--messages-compact {
    margin-bottom: 8px !important;
    padding-bottom: 4px !important;
    flex-shrink: 0;
}

#teacherMessagesView.teacher-app-grid > .dashboard-main.dashboard-main--messages-layout .welcome-section--messages-compact h2 {
    font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.3rem) !important;
    margin-bottom: 0.25rem !important;
}

#teacherMessagesView.teacher-app-grid > .dashboard-main.dashboard-main--messages-layout .welcome-section--messages-compact p {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    max-width: min(62ch, 100%);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#teacherMessagesView.teacher-app-grid > .dashboard-main .content-section--messages-flex {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-top: 0 !important;
}

#teacherMessagesView.teacher-app-grid > .dashboard-main .section-title--messages-tight {
    margin-bottom: 6px !important;
    flex-shrink: 0;
}

#teacherMessagesView.teacher-app-grid > .dashboard-main .section-title--messages-tight h3 {
    margin-bottom: 0 !important;
    font-size: 0.9rem !important;
}

.messages-filters-toolbar {
    display: grid;
    gap: 8px 10px;
    padding: 10px 12px;
    align-items: end;
    grid-template-columns: minmax(120px, 1.35fr) repeat(3, minmax(0, 1fr)) minmax(min-content, auto);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    margin-bottom: 8px;
    flex-shrink: 0;
}

.messages-filters__search,
.messages-filters__field,
.messages-filters__quick {
    min-width: 0;
}

.messages-filters__quick {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: flex-end;
}

.messages-filters__label {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 3px;
}

.messages-filters__input,
.messages-filters__select {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
}

.messages-filters__input:focus,
.messages-filters__select:focus {
    outline: none;
    border-color: #5eead4;
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.22);
}

.messages-filters-toolbar .messages-filters__btn {
    width: 100%;
    padding: 7px 10px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    border-radius: 9px !important;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
}

@media (max-width: 1100px) {
    .messages-filters-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .messages-filters__search {
        grid-column: 1 / -1;
    }

    .messages-filters__quick {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .messages-filters-toolbar .messages-filters__btn {
        flex: 1;
        min-width: min(220px, 48%);
    }
}

@media (max-width: 520px) {
    .messages-filters-toolbar {
        grid-template-columns: 1fr;
    }

    .messages-filters__field,
    .messages-filters__quick {
        grid-column: 1 / -1;
    }
}

#teacherMessagesView.teacher-app-grid > .dashboard-main .messages-container.messages-container--teacher-scroll {
    flex: 1;
    min-height: 0;
    max-height: none !important;
    margin-top: 0 !important;
    overflow-y: auto !important;
    padding-right: 6px;
    scrollbar-gutter: stable;
}

body.dark-mode .messages-filters-toolbar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

body.dark-mode .messages-filters__input,
body.dark-mode .messages-filters__select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .messages-filters__label {
    color: #94a3b8;
}

/* Notificaciones: filtros en desplegables; solo la lista hace scroll */
#teacherNotificationsView.teacher-app-grid > .dashboard-main.dashboard-main--notifications-layout {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding-top: 8px;
    padding-bottom: 10px;
}

#teacherNotificationsView.teacher-app-grid > .dashboard-main.dashboard-main--notifications-layout .welcome-section--notifications-compact {
    margin-bottom: 8px !important;
    padding-bottom: 4px !important;
    flex-shrink: 0;
}

#teacherNotificationsView.teacher-app-grid > .dashboard-main.dashboard-main--notifications-layout .welcome-section--notifications-compact h2 {
    font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.3rem) !important;
    margin-bottom: 0.25rem !important;
}

#teacherNotificationsView.teacher-app-grid > .dashboard-main.dashboard-main--notifications-layout .welcome-section--notifications-compact p {
    font-size: 0.8125rem !important;
    line-height: 1.4 !important;
    max-width: min(62ch, 100%);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#teacherNotificationsView.teacher-app-grid > .dashboard-main .content-section--notifications-flex {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-top: 0 !important;
}

.notifications-workspace-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.notifications-workspace-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px !important;
    flex-shrink: 0;
}

.notifications-workspace-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.notifications-workspace-card__mark-all {
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
    white-space: nowrap;
}

.notifications-workspace-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.notifications-filters-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 10px 14px;
    padding: 10px 12px;
    align-items: end;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
}

.notifications-filters__field {
    min-width: 0;
}

.notifications-filters__field--wide {
    min-width: min(100%, 280px);
}

.notifications-filters__label {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 3px;
}

.notifications-filters__select {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
}

.notifications-filters__select:focus {
    outline: none;
    border-color: #7ba680;
    box-shadow: 0 0 0 2px rgba(123, 166, 128, 0.28);
}

.notifications-list-scroll {
    flex: 1;
    min-height: 180px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-gutter: stable;
}

@media (max-width: 640px) {
    .notifications-filters-toolbar {
        grid-template-columns: 1fr;
    }

    .notifications-workspace-card__mark-all {
        width: 100%;
        text-align: center;
    }
}

body.dark-mode .notifications-filters-toolbar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

body.dark-mode .notifications-filters__select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .notifications-filters__label {
    color: #94a3b8;
}

/* Estudiantes: tabla con scroll interno */
#teacherStudentsView.teacher-app-grid > .dashboard-main .students-table-container {
    max-height: min(68vh, calc(100dvh - 240px));
    overflow: auto;
    border-radius: 12px;
    border: 1px solid #e8eef5;
    scrollbar-gutter: stable;
}

#teacherStudentsView.teacher-app-grid > .dashboard-main .students-table {
    font-size: clamp(0.82rem, 0.78rem + 0.15vw, 0.92rem);
}

#teacherStudentsView.teacher-app-grid > .dashboard-main .students-table th,
#teacherStudentsView.teacher-app-grid > .dashboard-main .students-table td {
    padding: 10px 12px;
}

/* Notificaciones */
#teacherNotificationsView.teacher-app-grid > .dashboard-main #notificationsList {
    max-height: min(68vh, calc(100dvh - 260px)) !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
}

/* Espacios de crecimiento */
#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .welcome-section {
    margin-bottom: 10px !important;
    padding-bottom: 6px !important;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .welcome-section h2 {
    font-size: clamp(1.02rem, 0.96rem + 0.26vw, 1.24rem) !important;
    margin-bottom: 0.2rem !important;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .welcome-section p {
    font-size: 0.86rem !important;
    line-height: 1.38 !important;
    max-width: min(72ch, 100%);
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .content-section {
    gap: 10px !important;
    margin-top: 8px !important;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .section-title {
    margin-bottom: 12px !important;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .section-title h3 {
    font-size: 0.98rem !important;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .section-title .btn-primary {
    padding: 9px 14px !important;
    font-size: 0.88rem !important;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .growth-spaces-container {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.15vw, 14px);
    max-height: min(70vh, calc(100dvh - 250px));
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-gutter: stable;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .growth-space-card {
    padding: clamp(12px, 1.55vw, 16px);
    border-radius: 14px;
    margin-bottom: 0 !important;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .growth-space-students-details {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fbfcfe;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .growth-space-students-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .growth-space-students-summary::-webkit-details-marker {
    display: none;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .growth-space-students-summary-hint {
    font-size: 0.76rem;
    font-weight: 600;
    color: #94a3b8;
}

#teacherGrowthSpacesView.teacher-app-grid > .dashboard-main .growth-space-students-panel {
    padding: 0 10px 10px;
    border-top: 1px dashed #dbe4ef;
}

/* Informes y acciones: rejilla más compacta */
#teacherReportsView.teacher-app-grid > .dashboard-main .content-section,
#teacherActionsView.teacher-app-grid > .dashboard-main .content-section {
    gap: 12px !important;
}

#teacherReportsView.teacher-app-grid > .dashboard-main .dashboard-card,
#teacherActionsView.teacher-app-grid > .dashboard-main .dashboard-card {
    border-radius: 14px !important;
}

#teacherReportsView.teacher-app-grid > .dashboard-main .dashboard-card-title,
#teacherActionsView.teacher-app-grid > .dashboard-main .dashboard-card-title {
    font-size: clamp(0.88rem, 0.82rem + 0.25vw, 1rem);
}

/* Códigos de clase */
#teacherClassCodesView.teacher-app-grid > .dashboard-main .content-section {
    margin-top: 12px;
}

#teacherClassCodesView.teacher-app-grid > .dashboard-main .class-codes-list {
    max-height: min(65vh, calc(100dvh - 260px));
    overflow-y: auto;
    scrollbar-gutter: stable;
}

/* Registro de accesos (solo el bloque con tabla) */
#teacherDataAccessLogView.teacher-app-grid #dataAccessLogContent .content-section {
    max-height: min(72vh, calc(100dvh - 240px));
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.nav-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 50%, #81C784 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 -2px 8px rgba(76, 175, 80, 0.3);
}

.nav-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.06) 0%, rgba(102, 187, 106, 0.04) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    border-radius: 8px 8px 0 0;
}

.nav-btn:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(102, 187, 106, 0.06) 100%);
    color: #1B4332;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.nav-btn:hover::before {
    width: 80%;
}

.nav-btn:hover::after {
    opacity: 1;
}

.nav-btn.active {
    color: #1B4332;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(102, 187, 106, 0.1) 100%);
    font-weight: 600;
    border-bottom-color: transparent;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(0);
}

.nav-btn.active::before {
    width: 90%;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 50%, #81C784 100%);
    box-shadow: 0 -2px 12px rgba(76, 175, 80, 0.4), 0 0 8px rgba(76, 175, 80, 0.2);
}

.nav-btn.active::after {
    opacity: 1;
}

.nav-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Nav Icon Styles */
.nav-icon {
    font-size: 1.25em;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(0.4) opacity(0.7);
    transform: scale(1);
}

.nav-btn:hover .nav-icon {
    transform: scale(1.2) translateY(-1px);
    filter: grayscale(0) opacity(1);
}

.nav-btn.active .nav-icon {
    transform: scale(1.15);
    filter: grayscale(0) opacity(1);
}

/* Notification Badge Styles */
.notification-badge-nav,
#riskAlertsBadge {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: #dc3545;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8), 0 2px 6px rgba(220, 53, 69, 0.5);
    animation: pulse-badge 2s ease-in-out infinite;
    z-index: 10;
    padding: 0;
    min-width: 10px;
    text-indent: -9999px;
    overflow: hidden;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.8);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 3px 12px rgba(220, 53, 69, 0.6), 0 0 0 3px rgba(255, 255, 255, 0.9);
    }
}


/* Teacher Dashboard */
.teacher-controls {
    background: #FFFFFF;
    padding: 32px;
    border-radius: 12px;
    margin-bottom: 48px;
    border: 1px solid #E5E5E5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    opacity: 0;
    animation: fadeInScale 0.6s ease-out 0.4s forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.control-group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.control-group label {
    font-weight: 500;
    color: #1A1A1A;
    font-size: 1em;
}

.code-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.code-display span {
    background: #FAFAFA;
    padding: 12px 24px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: #1A1A1A;
    font-size: 1em;
    letter-spacing: 0.5px;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border: 2px solid #e8eef5;
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    opacity: 0;
    animation: fadeInScale 0.5s ease-out forwards;
    animation-fill-mode: both;
}

.stat-card:nth-child(1) {
    animation-delay: 0.5s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.6s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.7s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.8s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #D5D5D5;
}

.stat-card.warning {
    border-left: 3px solid #FFB800;
}

.stat-card.success {
    border-left: 3px solid #00A86B;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-card.warning .stat-number {
    color: #FFB800;
}

.stat-card.success .stat-number {
    color: #00A86B;
}

.stat-label {
    color: #666666;
    font-size: 0.875em;
    font-weight: 400;
}

/* Class Codes List */
.growth-spaces-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.growth-space-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border: 2px solid #CDE7F0;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.growth-space-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.class-codes-list {
    width: 100%;
    display: grid;
    gap: 15px;
}

.class-code-item {
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    opacity: 0;
    animation: fadeInScale 0.5s ease-out forwards;
    animation-fill-mode: both;
}

.class-code-item:nth-child(1) { animation-delay: 0.6s; }
.class-code-item:nth-child(2) { animation-delay: 0.65s; }
.class-code-item:nth-child(3) { animation-delay: 0.7s; }
.class-code-item:nth-child(4) { animation-delay: 0.75s; }
.class-code-item:nth-child(n+5) { animation-delay: 0.8s; }

.class-code-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #D5D5D5;
}

.class-code-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.class-code-name {
    font-weight: 600;
    color: #1a2332;
    font-size: 1.05em;
}

.class-code-value {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #A3C9A8;
    font-size: 1.15em;
    letter-spacing: 1px;
}

.class-code-stats {
    font-size: 0.9em;
    color: #5a6c7d;
}

.class-code-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Critical Alerts */
.critical-alerts-container {
    margin-bottom: 30px;
}

.critical-alert-card {
    background: linear-gradient(135deg, #fee 0%, #fff5f5 100%);
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
    animation: pulseAlert 2s infinite, slideInRight 0.5s ease-out forwards;
    opacity: 0;
    transition: all 0.3s ease;
}

@keyframes pulseAlert {
    0%, 100% { box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2); }
    50% { box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4); }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.critical-alert-card:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.critical-alert-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.critical-alert-icon {
    font-size: 1.5em;
    color: #dc3545;
}

.critical-alert-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #721c24;
}

.critical-alert-content {
    color: #333;
    line-height: 1.6;
}

.critical-alert-keywords {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.critical-keyword-badge {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    font-weight: 600;
}

.medium-alert-card {
    background: linear-gradient(135deg, #fff8e1 0%, #fffef5 100%);
    border: 2px solid #ff9800;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

.medium-alert-card .critical-alert-icon {
    color: #ff9800;
}

.medium-alert-card .critical-alert-title {
    color: #856404;
}

.medium-alert-card .critical-keyword-badge {
    background: #ff9800;
}

/* Keywords Analysis Section */
.keywords-analysis-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.keywords-visualization-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border: 2px solid #e8eef5;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    animation-fill-mode: both;
}

.keywords-visualization-card:nth-child(1) {
    animation-delay: 1.2s;
}

.keywords-visualization-card:nth-child(2) {
    animation-delay: 1.3s;
}

.keywords-visualization-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(163, 201, 168, 0.15);
    border-color: #c5d4e8;
}

.keywords-visualization-card h4 {
    color: #1a2332;
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8eef5;
}

.keywords-chart-container {
    height: 200px;
    margin-bottom: 20px;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fc;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e8eef5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInScale 0.4s ease-out forwards;
    animation-fill-mode: both;
}

.keyword-item:nth-child(1) { animation-delay: 1.5s; }
.keyword-item:nth-child(2) { animation-delay: 1.55s; }
.keyword-item:nth-child(3) { animation-delay: 1.6s; }
.keyword-item:nth-child(4) { animation-delay: 1.65s; }
.keyword-item:nth-child(5) { animation-delay: 1.7s; }
.keyword-item:nth-child(n+6) { animation-delay: 1.75s; }

.keyword-item:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 16px rgba(163, 201, 168, 0.15);
    border-color: #c5d4e8;
}

.keyword-text {
    font-weight: 600;
    color: #1a2332;
    font-size: 0.95em;
}

.keyword-count {
    background: #A3C9A8;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.keyword-negative .keyword-text {
    color: #721c24;
}

.keyword-negative .keyword-count {
    background: #dc3545;
}

.keyword-positive .keyword-text {
    color: #155724;
}

.keyword-positive .keyword-count {
    background: #28a745;
}

.keywords-trends-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border: 2px solid #e8eef5;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInScale 0.6s ease-out 1.4s forwards;
}

.keywords-trends-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(163, 201, 168, 0.15);
    border-color: #c5d4e8;
}

.keywords-trends-card canvas {
    width: 100%;
    height: 300px;
}

/* Action Resources Section */
.action-resources-section {
    margin-top: 40px;
}

.action-resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.action-resource-card {
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.action-resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #A3C9A8;
}

.action-resource-card.critical {
    border-left: 4px solid #6366f1;
}

.action-resource-card.moderate {
    border-left: 4px solid #0ea5e9;
}

.action-resource-card.optimal {
    border-left: 4px solid #00A86B;
}

.action-resource-card.no-data {
    border-left: 4px solid #999999;
}

.action-resource-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.action-resource-icon {
    font-size: 1.5em;
}

.action-resource-title {
    font-size: 1em;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0;
}

.action-resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.action-resource-list li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: #666666;
    font-size: 0.9em;
    line-height: 1.5;
}

.action-resource-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #A3C9A8;
    font-weight: bold;
}

.action-resource-count {
    display: inline-block;
    background: #FAFAFA;
    color: #1A1A1A;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    margin-left: 8px;
}

.action-resource-card.critical .action-resource-count {
    background: #e0e7ff;
    color: #4f46e5;
}

.action-resource-card.moderate .action-resource-count {
    background: #e0f2fe;
    color: #0284c7;
}

.action-resource-card.optimal .action-resource-count {
    background: #E8F5E9;
    color: #00A86B;
}

/* Class Code Filter Selector */
#classCodeFilter {
    transition: all 0.3s ease;
}

#classCodeFilter:hover {
    border-color: #c5d4e8;
    box-shadow: 0 4px 8px rgba(163, 201, 168, 0.1);
}

#classCodeFilter:focus {
    outline: none;
    border-color: #5B8FC7;
    box-shadow: 0 0 0 3px rgba(163, 201, 168, 0.1);
}

.students-table-container {
    overflow-x: auto;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border: 2px solid #e8eef5;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-top: 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInScale 0.6s ease-out 1.1s forwards;
}

.students-table-container:hover {
    box-shadow: 0 4px 16px rgba(163, 201, 168, 0.12);
    border-color: #c5d4e8;
}

.students-table {
    width: 100%;
    border-collapse: collapse;
}

.students-table thead {
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
}

.students-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    color: #1a2332;
    border-bottom: 2px solid #e8eef5;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.students-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #5a6c7d;
    transition: background-color 0.2s ease;
}

.students-table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInRow 0.4s ease-out forwards;
    animation-fill-mode: both;
}

@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.students-table tbody tr:nth-child(1) { animation-delay: 1.2s; }
.students-table tbody tr:nth-child(2) { animation-delay: 1.25s; }
.students-table tbody tr:nth-child(3) { animation-delay: 1.3s; }
.students-table tbody tr:nth-child(4) { animation-delay: 1.35s; }
.students-table tbody tr:nth-child(5) { animation-delay: 1.4s; }
.students-table tbody tr:nth-child(6) { animation-delay: 1.45s; }
.students-table tbody tr:nth-child(7) { animation-delay: 1.5s; }
.students-table tbody tr:nth-child(8) { animation-delay: 1.55s; }
.students-table tbody tr:nth-child(9) { animation-delay: 1.6s; }
.students-table tbody tr:nth-child(10) { animation-delay: 1.65s; }
.students-table tbody tr:nth-child(n+11) { animation-delay: 1.7s; }

.students-table tbody tr:hover {
    background: linear-gradient(90deg, #f8f9fc 0%, #ffffff 100%);
    transform: translateX(5px) scale(1.01);
    box-shadow: 0 2px 8px rgba(163, 201, 168, 0.1);
}

.wellbeing-score {
    font-weight: 600;
    font-size: 1.1em;
}

.wellbeing-score.high {
    color: #28a745;
}

.wellbeing-score.medium {
    color: #ffc107;
}

.wellbeing-score.low {
    color: #dc3545;
}

.wellbeing-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.wellbeing-status.optimal {
    background-color: #d4edda;
    color: #155724;
}

.wellbeing-status.moderate {
    background-color: #fff3cd;
    color: #856404;
}

.wellbeing-status.attention {
    background-color: #f8d7da;
    color: #721c24;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* === Admin: Mapa emocional (tabla estudiantes) === */
.emoMapCell {
    min-width: 220px;
}

.emoMapMini {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emoOrbMini {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, var(--moodA, rgba(45,212,191,0.55)) 0%, rgba(255,255,255,0.72) 34%, var(--moodB, rgba(59,130,246,0.35)) 100%);
    border: 1px solid rgba(232,238,245,1);
    box-shadow: 0 10px 18px rgba(2, 6, 23, 0.10);
    position: relative;
    overflow: hidden;
}

.emoStatus {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82em;
    font-weight: 800;
    border: 1px solid #e8eef5;
    background: #f8fafc;
    color: #0f172a;
    white-space: nowrap;
}

.emoStatus--optimal {
    background: rgba(16,185,129,0.10);
    border-color: rgba(16,185,129,0.25);
    color: #065f46;
}
.emoStatus--stable {
    background: rgba(59,130,246,0.08);
    border-color: rgba(59,130,246,0.22);
    color: #1d4ed8;
}
.emoStatus--help {
    background: rgba(239,68,68,0.10);
    border-color: rgba(239,68,68,0.26);
    color: #991b1b;
}

.emoOrbMini.emoStatus--optimal,
.emoOrbLarge.emoStatus--optimal {
    box-shadow: 0 14px 26px rgba(16,185,129,0.18), 0 10px 18px rgba(2, 6, 23, 0.10);
    border-color: rgba(16,185,129,0.25);
}

.emoOrbMini.emoStatus--stable,
.emoOrbLarge.emoStatus--stable {
    box-shadow: 0 14px 26px rgba(59,130,246,0.16), 0 10px 18px rgba(2, 6, 23, 0.10);
    border-color: rgba(59,130,246,0.22);
}

.emoOrbMini.emoStatus--help,
.emoOrbLarge.emoStatus--help {
    box-shadow: 0 14px 26px rgba(239,68,68,0.18), 0 10px 18px rgba(2, 6, 23, 0.10);
    border-color: rgba(239,68,68,0.26);
}

.emoOrbMini::before {
    content: '';
    position: absolute;
    inset: -35%;
    background: conic-gradient(from 90deg, rgba(255,255,255,0.0), rgba(255,255,255,0.55), rgba(255,255,255,0.0));
    animation: dailyOrbSpin 10s linear infinite;
    opacity: 0.35;
}

.emoMapMeta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.emoMapTop {
    display: flex;
    gap: 10px;
    align-items: baseline;
    justify-content: space-between;
}

.emoMapTrend {
    color: #0f172a;
    font-weight: 700;
    white-space: nowrap;
}

.emoMapLast {
    color: #64748b;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
}

.emoDots {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.emoDot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, var(--moodA, rgba(45,212,191,0.55)) 0%, rgba(255,255,255,0.65) 35%, var(--moodB, rgba(59,130,246,0.35)) 100%);
    border: 1px solid rgba(232,238,245,1);
    box-shadow: 0 6px 14px rgba(2, 6, 23, 0.10);
}

.emoDot--lg {
    width: 12px;
    height: 12px;
}

.emoMapEmpty {
    color: #94a3b8;
    font-weight: 600;
}

/* === Admin: detalle estudiante (mapa emocional) === */
.emoAdminCard {
    border-radius: 14px;
    border: 1px solid #eef2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 14px;
}

.emoAdminTop {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.emoOrbLarge {
    width: 90px;
    height: 90px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, var(--moodA, rgba(45,212,191,0.55)) 0%, rgba(255,255,255,0.70) 34%, var(--moodB, rgba(59,130,246,0.35)) 100%);
    border: 1px solid rgba(232,238,245,1);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.12);
    position: relative;
    overflow: hidden;
}

.emoOrbLarge::before {
    content: '';
    position: absolute;
    inset: -35%;
    background: conic-gradient(from 90deg, rgba(255,255,255,0.0), rgba(255,255,255,0.55), rgba(255,255,255,0.0));
    animation: dailyOrbSpin 9s linear infinite;
    opacity: 0.42;
}

.emoAdminTitle {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.emoAdminSub {
    color: #64748b;
    font-weight: 600;
    margin-bottom: 10px;
}

.emoDots--lg {
    gap: 8px;
}

.emoAdminList {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.emoRow {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    background: #ffffff;
}

.emoRowDate {
    color: #334155;
    font-weight: 800;
}

.emoRowEmos {
    color: #0f172a;
    font-weight: 800;
}

.emoRowSens {
    margin-top: 4px;
    color: #475569;
    font-weight: 650;
    font-size: 0.92em;
}

.emoRowNote {
    margin-top: 6px;
    color: #64748b;
    font-weight: 600;
    font-size: 0.92em;
    line-height: 1.4;
}

.no-data-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Activity Styles */
.activity-content {
    margin-top: 20px;
}

.activity-item {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.activity-item h4 {
    color: #333;
    margin-bottom: 8px;
}

.activity-item p {
    color: #666;
    font-size: 0.9em;
}

/* Hide sections */
.hidden {
    display: none !important;
}

/* Onboarding Modal Styles */
.onboarding-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
    padding: clamp(8px, 2vw, 20px);
    overflow-y: auto;
}

.onboarding-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 50, 0.7);
    backdrop-filter: blur(4px);
}

.onboarding-container {
    position: relative;
    z-index: 1;
    width: min(100%, 600px);
    max-width: 600px;
    max-height: calc(100dvh - 24px);
    animation: slideUp 0.5s ease;
}

/* Contenedor específico para onboarding de docentes */
#teacherOnboardingModal .onboarding-container {
    width: min(100%, 780px);
    max-width: 780px;
}

.onboarding-content {
    background: linear-gradient(160deg, #ffffff 0%, #f8fffb 45%, #f1f8ff 100%);
    border-radius: 30px;
    padding: clamp(22px, 3.6vh, 42px) clamp(18px, 3vw, 36px);
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.28);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100dvh - 24px);
    overscroll-behavior: contain;
    border: 1px solid rgba(123, 166, 128, 0.18);
}

.onboarding-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #7BA680 0%, #8FC4D9 100%);
}

.onboarding-content::after {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(143, 196, 217, 0.22) 0%, rgba(143, 196, 217, 0) 70%);
    pointer-events: none;
}

.onboarding-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(16px, 2.2vh, 30px);
}

.progress-bar-container {
    flex: 1;
    height: 6px;
    background: #F0F0F0;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 15px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7BA680 0%, #8FC4D9 100%);
    border-radius: 10px;
    transition: width 0.4s ease;
    width: 25%;
}

.progress-text {
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.onboarding-slide {
    display: none;
    text-align: center;
    animation: fadeInSlide 0.5s ease;
}

.onboarding-slide.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.onboarding-icon {
    font-size: clamp(46px, 8vh, 70px);
    margin-bottom: clamp(10px, 1.8vh, 18px);
    animation: bounceIn 0.6s ease;
    filter: drop-shadow(0 10px 14px rgba(15, 23, 42, 0.12));
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.onboarding-title {
    font-size: clamp(1.45rem, 3.4vw, 2rem);
    color: #0f172a;
    margin-bottom: clamp(10px, 1.8vh, 18px);
    font-weight: 700;
    letter-spacing: 0.2px;
}

.onboarding-description {
    font-size: clamp(0.95rem, 1.65vw, 1.05rem);
    color: #334155;
    line-height: 1.6;
    margin-bottom: clamp(14px, 2vh, 24px);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.onboarding-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: clamp(14px, 2vh, 28px);
    position: sticky;
    bottom: 0;
    padding-top: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #f7fcfa 30%);
    z-index: 2;
}

.btn-onboarding-primary {
    flex: 1;
    padding: 16px 32px;
    background: linear-gradient(135deg, #7BA680 0%, #8FC4D9 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(123, 166, 128, 0.3);
}

.btn-onboarding-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 166, 128, 0.4);
}

.btn-onboarding-secondary {
    padding: 16px 32px;
    background: #F8F9FA;
    color: #1A1A1A;
    border: 2px solid #CDE7F0;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-onboarding-secondary:hover {
    background: #CDE7F0;
    border-color: #7BA680;
    transform: translateY(-2px);
}

.btn-onboarding-ghost {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 4px;
    transition: color 0.25s ease, transform 0.25s ease;
}

.btn-onboarding-ghost:hover {
    color: #0f766e;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .onboarding-content {
        padding: 20px 16px;
        max-height: calc(100dvh - 16px);
    }

    .onboarding-icon {
        font-size: 60px;
    }

    .onboarding-title {
        font-size: 1.6em;
    }

    .onboarding-description {
        font-size: 1em;
    }
}

/* Teacher Onboarding Specific Styles */
.teacher-onboarding-content {
    max-width: 100%;
    padding: 32px 28px;
    overflow-y: auto;
    overflow-x: hidden;
}

.onboarding-feature-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 25px;
}

.feature-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: linear-gradient(135deg, #F8F9FA 0%, #CDE7F0 100%);
    border-radius: 20px;
    border: 2px solid #A3C9A8;
    min-width: 0;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease backwards;
}

.feature-preview-item:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-preview-item:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-preview-item:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-preview-item:nth-child(4) {
    animation-delay: 0.4s;
}

.feature-preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(123, 166, 128, 0.3);
    border-color: #7BA680;
}

.feature-preview-item .feature-icon {
    font-size: 34px;
}

.feature-preview-item span:last-child {
    font-size: 0.86em;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

.onboarding-feature-list {
    margin-top: 25px;
    text-align: left;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    max-height: none;
    overflow: visible;
    padding-right: 6px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    border-radius: 15px;
    border-left: 4px solid #7BA680;
    border: 1px solid rgba(123, 166, 128, 0.14);
    transition: all 0.3s ease;
    animation: slideInLeft 0.5s ease backwards;
}

.feature-item:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-item:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-item:nth-child(4) {
    animation-delay: 0.4s;
}

.feature-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(123, 166, 128, 0.2);
    border-left-color: #8FC4D9;
}

.feature-bullet {
    font-size: 1.3em;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item span:last-child {
    flex: 1;
    font-size: 0.9em;
    line-height: 1.5;
    color: #444;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    #teacherOnboardingModal .onboarding-container {
        width: min(100%, 96vw);
        max-height: calc(100dvh - 12px);
    }

    .teacher-onboarding-content {
        padding: 20px 16px;
        max-height: calc(100dvh - 16px);
    }

    .onboarding-feature-preview {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature-preview-item {
        min-width: auto;
        padding: 15px;
    }

    .onboarding-feature-list {
        max-width: 100%;
        max-height: none;
    }

    .feature-item {
        padding: 12px 15px;
        font-size: 0.9em;
    }

    .onboarding-icon {
        font-size: 60px !important;
    }

    .onboarding-title {
        font-size: 1.5em !important;
    }

    .onboarding-description {
        font-size: 0.95em !important;
    }

    .btn-onboarding-ghost {
        width: 100%;
        text-align: center;
        order: 3;
    }
}

@media (max-height: 760px) {
    .onboarding-content {
        border-radius: 22px;
    }

    .onboarding-progress {
        margin-bottom: 14px;
    }

    .onboarding-actions {
        margin-top: 12px;
    }
}

/* Landing Page Styles */
.landing-page {
    min-height: 100vh;
    background-color: #F8F9FA;
    overflow-x: hidden;
    position: relative;
}

.landing-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(123, 166, 128, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(143, 196, 217, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.landing-page > * {
    position: relative;
    z-index: 1;
}

.landing-nav {
    padding: 20px 60px;
    background: rgba(248, 249, 250, 0.98);
    border-bottom: 1px solid rgba(229, 229, 229, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.landing-nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-brand h1 {
    color: #1a2332;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: none;
    margin: 0;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: #1a2332;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s ease;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.nav-link:hover {
    color: #7BA680;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7BA680 0%, #8FC4D9 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #D0D0D0;
    background: #F8F9FA;
    color: #1a2332;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.nav-btn:hover {
    background: #E8E8E8;
    border-color: #B0B0B0;
}

.nav-btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #81C784 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3), 0 2px 6px rgba(76, 175, 80, 0.2);
    transition: all 0.3s ease;
}

.nav-btn-primary:hover {
    background: linear-gradient(135deg, #66BB6A 0%, #81C784 50%, #A5D6A7 100%);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4), 0 3px 8px rgba(76, 175, 80, 0.3);
    transform: translateY(-1px);
}

.landing-nav-logo {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.landing-nav-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.landing-nav .btn-hero-primary {
    padding: 14px 36px;
    font-size: 0.95em;
    border-radius: 14px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #81C784 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.35),
                0 3px 10px rgba(76, 175, 80, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.landing-nav .btn-hero-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.landing-nav .btn-hero-primary:hover::before {
    left: 100%;
}

.landing-nav .btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(76, 175, 80, 0.45),
                0 6px 16px rgba(76, 175, 80, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #66BB6A 0%, #81C784 50%, #A5D6A7 100%);
}

.landing-nav .btn-hero-primary span {
    position: relative;
    z-index: 2;
}

.landing-nav .btn-hero-primary span::after {
    content: ' →';
    font-size: 1.1em;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    margin-left: 4px;
}

.landing-nav .btn-hero-primary:hover span::after {
    transform: translateX(5px);
}

.hero-section {
    padding: 180px 60px 160px;
    margin-top: 80px;
    text-align: left;
    background: linear-gradient(180deg, #F0F7F4 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    max-width: 1400px;
    margin: 80px auto 0;
    scroll-margin-top: 100px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(76, 175, 80, 0.12) 0%, rgba(143, 196, 217, 0.08) 50%, transparent 80%);
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.1) 0%, rgba(143, 196, 217, 0.08) 50%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-30px, 30px) scale(1.1);
    }
}

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

/* Estilos de h2 removidos - h2 eliminado del hero section */

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 3.5em;
    margin: 0 0 30px 0;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out 0.1s both;
    /* Estilos de color y efecto neon se aplican al final del archivo */
}

.hero-subtitle {
    font-size: 1.5em;
    margin: 0 0 20px 0;
    font-weight: 400;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    /* Estilos de color y efecto neon se aplican al final del archivo */
}

.hero-tagline {
    font-size: 1.3em;
    color: #4CAF50;
    margin: 0 0 50px 0;
    font-weight: 600;
    line-height: 1.5;
    animation: fadeInUp 0.8s ease-out 0.3s both;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #81C784 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-trust {
    font-size: 0.95em;
    color: #5a6c7d;
    margin: 30px 0 0 0;
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    margin-bottom: 20px;
}

.section-button {
    text-align: center;
    margin-top: 50px;
}

.btn-hero {
    padding: 22px 56px;
    font-size: 1.15em;
    border-radius: 16px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.btn-hero:hover::before {
    left: 100%;
}

.btn-hero span {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-hero span::after {
    content: '→';
    font-size: 1.2em;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    margin-left: 4px;
}

.btn-hero:hover span::after {
    transform: translateX(6px);
}

.btn-hero-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #81C784 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.35),
                0 4px 12px rgba(76, 175, 80, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.btn-hero-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.btn-hero-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(76, 175, 80, 0.45),
                0 8px 16px rgba(76, 175, 80, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #66BB6A 0%, #81C784 50%, #A5D6A7 100%);
}

.btn-hero-primary:hover::after {
    opacity: 1;
}

.btn-hero-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4),
                0 4px 8px rgba(76, 175, 80, 0.25);
}

.btn-hero-secondary {
    background: linear-gradient(135deg, #ffffff 0%, #F8F9FA 100%);
    color: #4CAF50;
    border: 2.5px solid #4CAF50;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.15);
    position: relative;
}

.btn-hero-secondary::before {
    background: rgba(76, 175, 80, 0.05);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 1);
    color: #1B4332;
    border-color: #66BB6A;
    transform: translateY(-6px) scale(1.06);
    box-shadow: 0 18px 50px rgba(76, 175, 80, 0.25),
                0 0 0 8px rgba(76, 175, 80, 0.1);
}

.btn-hero-secondary:hover span::after {
    color: #1B4332;
}

.btn-hero-secondary:active {
    transform: translateY(-3px) scale(1.03);
}

.btn-hero-tertiary {
    background: transparent;
    color: #7BA680;
    border: 2px solid #CDE7F0;
    box-shadow: 0 4px 15px rgba(205, 231, 240, 0.2);
    position: relative;
}

.btn-hero-tertiary::before {
    background: rgba(123, 166, 128, 0.05);
}

.btn-hero-tertiary:hover {
    background: linear-gradient(135deg, #CDE7F0 0%, #F8F9FA 100%);
    color: #7BA680;
    border-color: #A3C9A8;
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 35px rgba(163, 201, 168, 0.25),
                0 0 0 6px rgba(163, 201, 168, 0.1);
}

.btn-hero-tertiary:hover span::after {
    color: #7BA680;
}

.btn-hero-tertiary:active {
    transform: translateY(-2px) scale(1.02);
}

.features-section {
    padding: 140px 60px;
    max-width: 1600px;
    margin: 0 auto;
    background: linear-gradient(180deg, #F0F7F4 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 0%, rgba(76, 175, 80, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(123, 166, 128, 0.2), transparent);
}

.features-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(123, 166, 128, 0.2), transparent);
}

.features-section h3 {
    text-align: left;
    font-size: 2.8em;
    color: #1B4332;
    margin-bottom: 80px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    position: relative;
    padding-bottom: 30px;
    max-width: 1400px;
    margin-left: 0;
    margin-right: auto;
    background: linear-gradient(135deg, #1B4332 0%, #2D5016 50%, #40916C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 50%, #8FC4D9 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Articles Section */
.articles-section {
    padding: 120px 60px;
    max-width: 1400px;
    margin: 0 auto;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.articles-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(123, 166, 128, 0.2), transparent);
}

.articles-content {
    width: 100%;
    position: relative;
    z-index: 1;
}

.articles-section h3 {
    text-align: center;
    font-size: 2.75em;
    color: #1A1A1A;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.2;
    position: relative;
    padding-bottom: 30px;
}

.articles-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, #7BA680 0%, #8FC4D9 100%);
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(123, 166, 128, 0.25);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
    margin-top: 64px;
}

.article-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #fafbfc 100%);
    padding: 0;
    border-radius: 20px;
    border: 2px solid #E5E5E5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06),
                0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #7BA680 0%, #8FC4D9 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.article-card:hover::before {
    transform: scaleX(1);
}

.article-card:hover {
    box-shadow: 0 20px 60px rgba(163, 201, 168, 0.18),
                0 8px 24px rgba(163, 201, 168, 0.12);
    border-color: #A3C9A8;
    transform: translateY(-8px);
    cursor: pointer;
    background: linear-gradient(135deg, #FFFFFF 0%, #f8f9fc 100%);
}

.article-card {
    cursor: pointer;
}

/* Article Modal Styles */
.article-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.article-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
}

.article-modal-content {
    background: #FFFFFF;
    margin: 40px auto;
    max-width: 900px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(50px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

.article-modal-header {
    padding: 40px 40px 24px 40px;
    border-bottom: 1px solid #E5E5E5;
    position: sticky;
    top: 0;
    background: #FFFFFF;
    z-index: 10;
    border-radius: 16px 16px 0 0;
}

.article-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #F5F5F5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
}

.article-modal-close:hover {
    background: #E5E5E5;
    transform: rotate(90deg);
}

.article-modal-body {
    padding: 40px;
    line-height: 1.8;
    color: #333;
}

.article-modal-body h2 {
    font-size: 2.5em;
    margin-bottom: 16px;
    color: #1A1A1A;
    line-height: 1.3;
}

.article-modal-body h3 {
    font-size: 1.8em;
    margin-top: 32px;
    margin-bottom: 16px;
    color: #1A1A1A;
}

.article-modal-body p {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: #444;
}

.article-modal-body ul, .article-modal-body ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.article-modal-body li {
    margin-bottom: 12px;
    font-size: 1.1em;
    color: #444;
}

.article-modal-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.article-modal-sources {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid #E5E5E5;
}

.article-modal-sources h4 {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: #1A1A1A;
}

.article-modal-sources ul {
    list-style: none;
    padding-left: 0;
}

.article-modal-sources li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    font-size: 0.95em;
    color: #666;
}

.article-modal-sources li:before {
    content: "📚";
    position: absolute;
    left: 0;
}

.article-modal-sources a {
    color: #A3C9A8;
    text-decoration: none;
}

.article-modal-sources a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .article-modal-content {
        margin: 20px auto;
        border-radius: 12px;
    }

    .article-modal-header,
    .article-modal-body {
        padding: 24px;
    }

    .article-modal-body h2 {
        font-size: 2em;
    }

    .article-modal-body h3 {
        font-size: 1.5em;
    }
}

.article-header {
    padding: 32px 32px 0 32px;
}

.article-category {
    display: inline-block;
    padding: 8px 16px;
    background: #1A1A1A;
    color: #FFFFFF;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.article-card:hover .article-category {
    background: #333333;
    transform: scale(1.05);
}

.article-card h4 {
    font-size: 1.375em;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.article-card:hover h4 {
    color: #333333;
}

.article-body {
    padding: 0 32px;
    flex-grow: 1;
}

.article-card p {
    font-size: 1em;
    color: #666666;
    line-height: 1.75;
    margin-bottom: 24px;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px 32px 32px;
    border-top: 1px solid #F0F0F0;
    background: #FAFAFA;
    margin-top: auto;
}

.article-date,
.article-read-time {
    font-size: 0.8125em;
    color: #999999;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-date::before {
    content: '📅';
    font-size: 0.9em;
}

.article-read-time::before {
    content: '⏱️';
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .articles-section {
        padding: 80px 24px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .articles-section h3 {
        font-size: 2.25em;
    }

    .article-header,
    .article-body,
    .article-footer {
        padding-left: 24px;
        padding-right: 24px;
    }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.feature-card {
    background: linear-gradient(135deg, #ffffff 0%, #F9FCFA 100%);
    padding: 48px 40px;
    border: 2px solid #E8F5E9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.04) 0%, rgba(143, 196, 217, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #7BA680 0%, #8FC4D9 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    border-color: #A5D6A7;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.15), 0 4px 16px rgba(76, 175, 80, 0.1);
    transform: translateY(-4px);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(123, 166, 128, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.6s ease;
    opacity: 0;
}

.feature-card:hover::before {
    transform: scaleY(1);
}

.feature-card:hover::after {
    opacity: 1;
    transform: scale(1.5);
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(163, 201, 168, 0.18),
                0 8px 24px rgba(163, 201, 168, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: #A3C9A8;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
}

.feature-card h4 {
    color: #1a2332;
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 18px;
    margin-top: 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.feature-card p {
    color: #5a6c7d;
    font-size: 1.08em;
    line-height: 1.75;
    margin: 0;
    letter-spacing: 0.01em;
}

.feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 0 28px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #81C784 70%, #8FC4D9 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3), 0 2px 8px rgba(76, 175, 80, 0.2);
}

.feature-card:hover .feature-icon {
    transform: scale(1.08) translateY(-2px) rotate(5deg);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4), 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Icono 1: Evaluación Psicométrica - Formulario con líneas */
.feature-card:nth-child(1) .feature-icon::before {
    content: '';
    position: absolute;
    width: 45px;
    height: 35px;
    border: 3px solid white;
    border-radius: 4px;
}

.feature-card:nth-child(1) .feature-icon::after {
    content: '';
    position: absolute;
    width: 35px;
    height: 3px;
    background: white;
    top: 20px;
    left: 17.5px;
    box-shadow: 0 -8px 0 white, 0 8px 0 white;
}

/* Icono 2: Actividades Lúdicas - Círculo con elementos */
.feature-card:nth-child(2) .feature-icon::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid white;
    border-radius: 50%;
}

.feature-card:nth-child(2) .feature-icon::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: -18px 0 0 white, 18px 0 0 white;
}

/* Icono 3: Prevención - Escudo/Hexágono */
.feature-card:nth-child(3) .feature-icon::before {
    content: '';
    position: absolute;
    width: 38px;
    height: 38px;
    border: 3px solid white;
    border-radius: 4px 4px 4px 4px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Icono 4: Estudiantes y Docentes - Personas/Grupo */
.feature-card:nth-child(4) .feature-icon::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 25px;
    border: 3px solid white;
    border-radius: 9px 9px 4px 4px;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.feature-card:nth-child(4) .feature-icon::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 25px;
    border: 3px solid white;
    border-radius: 9px 9px 4px 4px;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Icono 5: Análisis de Datos - Gráfico de barras */
.feature-card:nth-child(5) .feature-icon::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 25px;
    background: white;
    left: 18px;
    bottom: 15px;
    border-radius: 2px;
    box-shadow: 12px 0 0 white, 24px -8px 0 white, 36px -15px 0 white;
}

.feature-card:nth-child(5) .feature-icon::after {
    content: '';
    position: absolute;
    width: 52px;
    height: 3px;
    background: white;
    bottom: 12px;
    left: 14px;
    border-radius: 2px;
}

/* Icono 6: Privacidad - Candado */
.feature-card:nth-child(6) .feature-icon::before {
    content: '';
    position: absolute;
    width: 25px;
    height: 18px;
    border: 3px solid white;
    border-radius: 4px;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.feature-card:nth-child(6) .feature-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid white;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}


.problem-section {
    padding: 140px 60px;
    max-width: 1600px;
    margin: 0 auto;
    background: linear-gradient(180deg, #F5F9F7 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.problem-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 50%, rgba(76, 175, 80, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.problem-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
}

.problem-header {
    position: sticky;
    top: 120px;
}

.problem-section h3 {
    font-size: 2.8em;
    color: #1B4332;
    margin-bottom: 0;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1B4332 0%, #2D5016 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.problem-body {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.problem-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.problem-text p {
    font-size: 1.25em;
    line-height: 1.85;
    color: #344E41;
    margin: 0;
    text-align: left;
}

.problem-solution-box {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.12) 0%, rgba(102, 187, 106, 0.08) 50%, rgba(129, 199, 132, 0.06) 100%);
    padding: 40px 50px;
    border-radius: 24px;
    border-left: 5px solid #4CAF50;
    margin-top: 20px;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.15), 0 2px 8px rgba(76, 175, 80, 0.1);
    position: relative;
    overflow: hidden;
}

.problem-solution-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.problem-solution {
    font-size: 1.4em !important;
    font-weight: 600;
    color: #1B4332 !important;
    margin: 0 !important;
    line-height: 1.6;
    text-align: left;
    position: relative;
    z-index: 1;
}

.problem-solution::before {
    content: '→';
    color: #4CAF50;
    margin-right: 12px;
    font-size: 1.2em;
    font-weight: 700;
}

.benefits-section {
    padding: 140px 60px;
    max-width: 1600px;
    margin: 0 auto;
    background: linear-gradient(180deg, #ffffff 0%, #F0F7F4 100%);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.benefits-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), rgba(143, 196, 217, 0.3), transparent);
}

.benefits-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), rgba(143, 196, 217, 0.3), transparent);
}

.benefits-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 80% 20%, rgba(143, 196, 217, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.benefits-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.benefits-content h3 {
    text-align: left;
    font-size: 2.8em;
    color: #1B4332;
    margin-bottom: 80px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    position: relative;
    padding-bottom: 30px;
    max-width: 1400px;
    margin-left: 0;
    margin-right: auto;
    background: linear-gradient(135deg, #1B4332 0%, #2D5016 50%, #40916C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.benefits-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 50%, #8FC4D9 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.benefit-item {
    background: linear-gradient(135deg, #ffffff 0%, #F9FCFA 100%);
    padding: 45px 40px;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06),
                0 2px 8px rgba(0, 0, 0, 0.04);
    border: 2px solid #E8F5E9;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.benefit-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.03) 0%, rgba(143, 196, 217, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.benefit-item:hover::before {
    opacity: 1;
}

.benefit-item:hover {
    border-color: #A5D6A7;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.15), 0 4px 16px rgba(76, 175, 80, 0.1);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #81C784 70%, #8FC4D9 100%);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3), 0 2px 8px rgba(76, 175, 80, 0.2);
    position: relative;
    transition: all 0.3s ease;
}

.benefit-item:hover .benefit-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4), 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Icono de Visibilidad - Ojo/Analytics */
.benefit-icon-visibility::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    position: absolute;
}

.benefit-icon-visibility::after {
    content: '';
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Icono de Alerta - Campana */
.benefit-icon-alert::before {
    content: '';
    width: 35px;
    height: 35px;
    border: 4px solid white;
    border-radius: 50% 50% 0 0;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.benefit-icon-alert::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
}

/* Icono de Motivación - Estrella/Badge */
.benefit-icon-motivation::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 14px solid white;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.benefit-icon-motivation::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 14px solid white;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Icono de Humanidad - Corazón/Persona */
.benefit-icon-humanity::before {
    content: '';
    width: 30px;
    height: 30px;
    border: 4px solid white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    position: absolute;
    top: 15px;
    left: 15px;
}

.benefit-icon-humanity::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 4px solid white;
    border-radius: 50% 50% 0 50%;
    transform: rotate(45deg);
    position: absolute;
    top: 15px;
    right: 15px;
}

/* Icono de Experiencia - Navegación/Interfaz */
.benefit-icon-experience::before {
    content: '';
    width: 50px;
    height: 4px;
    background: white;
    border-radius: 2px;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 12px 0 white, 0 24px 0 white;
}

.benefit-icon-experience::after {
    content: '';
    width: 4px;
    height: 50px;
    background: white;
    border-radius: 2px;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 52px 0 0 white;
}

/* Icono de Privacidad - Candado */
.benefit-icon-privacy::before {
    content: '';
    width: 30px;
    height: 22px;
    border: 4px solid white;
    border-radius: 4px;
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
}

.benefit-icon-privacy::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 4px solid white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.benefit-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #7BA680 0%, #8FC4D9 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.benefit-item:hover::before {
    transform: scaleY(1);
}

.benefit-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(163, 201, 168, 0.18),
                0 8px 24px rgba(163, 201, 168, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: #A3C9A8;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
}

.benefit-item h4 {
    color: #1a2332;
    margin-bottom: 18px;
    font-size: 1.4em;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.benefit-item p {
    color: #5a6c7d;
    line-height: 1.8;
    font-size: 1.08em;
    margin: 0;
    letter-spacing: 0.01em;
}

.about-section {
    padding: 140px 60px;
    max-width: 1600px;
    margin: 0 auto;
    background: linear-gradient(180deg, #ffffff 0%, #F5F9F7 100%);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), rgba(143, 196, 217, 0.3), transparent);
}

.about-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), rgba(143, 196, 217, 0.3), transparent);
}

.about-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 10% 80%, rgba(143, 196, 217, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.about-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
}

.about-header {
    position: sticky;
    top: 120px;
}

.about-section h3 {
    text-align: left;
    font-size: 2.8em;
    color: #1B4332;
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    position: relative;
    padding-bottom: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #1B4332 0%, #2D5016 50%, #40916C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-section h3::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 50%, #8FC4D9 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.about-body {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.about-intro,
.about-team,
.about-mission {
    font-size: 1.25em;
    line-height: 1.9;
    color: #344E41;
    text-align: left;
    margin: 0;
    letter-spacing: 0.01em;
}

.about-cta {
    margin-top: 20px;
}

.about-values {
    background: linear-gradient(135deg, rgba(123, 166, 128, 0.05) 0%, rgba(143, 196, 217, 0.05) 100%);
    padding: 40px;
    border-radius: 20px;
    border: 2px solid rgba(123, 166, 128, 0.1);
    margin: 20px 0;
}

.about-values-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 24px;
    text-align: left;
}

.about-values-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-values-list li {
    font-size: 1.15em;
    line-height: 1.8;
    color: #2c3e50;
    padding-left: 32px;
    position: relative;
    letter-spacing: 0.01em;
}

.about-values-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #7BA680;
    font-weight: 700;
    font-size: 1.2em;
}

.roles-section {
    padding: 140px 60px;
    max-width: 1600px;
    margin: 0 auto;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.roles-content {
    max-width: 1200px;
    margin: 0 auto;
}

.roles-content h3 {
    text-align: left;
    font-size: 2.8em;
    color: #1B4332;
    margin-bottom: 60px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    position: relative;
    padding-bottom: 30px;
    background: linear-gradient(135deg, #1B4332 0%, #2D5016 50%, #40916C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.roles-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 50%, #8FC4D9 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.role-card {
    background: linear-gradient(135deg, #ffffff 0%, #F9FCFA 100%);
    padding: 40px 30px;
    border-radius: 20px;
    border: 2px solid #E8F5E9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(143, 196, 217, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.role-card:hover::before {
    opacity: 1;
}

.role-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(76, 175, 80, 0.2), 0 8px 24px rgba(76, 175, 80, 0.15);
    border-color: #A5D6A7;
}

.role-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #81C784 70%, #8FC4D9 100%);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3), 0 2px 8px rgba(76, 175, 80, 0.2);
    position: relative;
    transition: all 0.3s ease;
}

.role-card:hover .role-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4), 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Icono Docente - Persona con libro */
.role-icon-teacher::before {
    content: '';
    width: 20px;
    height: 28px;
    border: 3px solid white;
    border-radius: 10px 10px 4px 4px;
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.role-icon-teacher::after {
    content: '';
    width: 16px;
    height: 12px;
    border: 3px solid white;
    border-bottom: none;
    border-radius: 2px 2px 0 0;
    position: absolute;
    right: 18px;
    top: 20px;
}

/* Icono Orientador - Persona con gráfico */
.role-icon-counselor::before {
    content: '';
    width: 20px;
    height: 28px;
    border: 3px solid white;
    border-radius: 10px 10px 4px 4px;
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.role-icon-counselor::after {
    content: '';
    width: 6px;
    height: 20px;
    background: white;
    border-radius: 2px;
    position: absolute;
    right: 24px;
    bottom: 18px;
    box-shadow: 8px -6px 0 white, 16px -12px 0 white;
}

/* Icono Estudiante - Persona joven */
.role-icon-student::before {
    content: '';
    width: 18px;
    height: 26px;
    border: 3px solid white;
    border-radius: 9px 9px 4px 4px;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.role-icon-student::after {
    content: '';
    width: 18px;
    height: 26px;
    border: 3px solid white;
    border-radius: 9px 9px 4px 4px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Icono Institución - Edificio */
.role-icon-institution::before {
    content: '';
    width: 50px;
    height: 40px;
    border: 4px solid white;
    border-radius: 4px 4px 0 0;
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
}

.role-icon-institution::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 3px solid white;
    border-radius: 2px;
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: -18px 0 0 white, 18px 0 0 white;
}

.role-card h4 {
    font-size: 1.5em;
    color: #1a2332;
    margin-bottom: 20px;
    font-weight: 700;
}

.role-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.role-benefits li {
    font-size: 1.05em;
    line-height: 1.8;
    color: #2c3e50;
    padding-left: 24px;
    position: relative;
    margin-bottom: 12px;
}

.role-benefits li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #7BA680;
    font-weight: 700;
    font-size: 1.5em;
}

.how-it-works-section {
    padding: 140px 60px;
    max-width: 1600px;
    margin: 0 auto;
    background: linear-gradient(180deg, #ffffff 0%, #F0F7F4 100%);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.how-it-works-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 70%, rgba(76, 175, 80, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.how-it-works-content {
    max-width: 1400px;
    margin: 0 auto;
}

.how-it-works-content h3 {
    text-align: left;
    font-size: 2.8em;
    color: #1B4332;
    margin-bottom: 60px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    position: relative;
    padding-bottom: 30px;
    background: linear-gradient(135deg, #1B4332 0%, #2D5016 50%, #40916C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.how-it-works-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 50%, #8FC4D9 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.step-item {
    background: linear-gradient(135deg, #ffffff 0%, #F9FCFA 100%);
    padding: 40px 30px;
    border-radius: 20px;
    border: 2px solid #E8F5E9;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.step-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(143, 196, 217, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-item:hover::before {
    opacity: 1;
}

.step-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(76, 175, 80, 0.2), 0 8px 24px rgba(76, 175, 80, 0.15);
    border-color: #A5D6A7;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #81C784 70%, #8FC4D9 100%);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3), 0 2px 8px rgba(76, 175, 80, 0.2);
    transition: all 0.3s ease;
}

.step-item:hover .step-number {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4), 0 4px 12px rgba(76, 175, 80, 0.3);
    color: white;
    font-size: 1.8em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(123, 166, 128, 0.3);
}

.step-item h4 {
    font-size: 1.5em;
    color: #1a2332;
    margin-bottom: 15px;
    font-weight: 700;
}

.step-item p {
    font-size: 1.05em;
    line-height: 1.7;
    color: #2c3e50;
    margin: 0;
}

.cta-section {
    padding: 140px 60px;
    text-align: center;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 30%, #81C784 60%, #8FC4D9 100%);
    color: white;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite;
}

.cta-subtitle {
    font-size: 1.4em;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 400;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.cta-trust {
    font-size: 1em;
    opacity: 0.9;
    margin-top: 20px;
    font-weight: 400;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    z-index: 1;
}

.cta-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: float 25s ease-in-out infinite;
}

.cta-section > * {
    position: relative;
    z-index: 2;
}

.cta-section h3 {
    font-size: 2.75em;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cta-section p {
    font-size: 1.25em;
    margin-bottom: 50px;
    opacity: 0.95;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}


.cta-section button {
    background: white;
    color: #4CAF50;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25),
                0 6px 20px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    padding: 22px 56px;
    font-size: 1.15em;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-section button:hover {
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35),
                0 10px 30px rgba(0, 0, 0, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 1);
    color: #1B4332;
}

/* Charts Styles */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    animation-fill-mode: both;
}

.chart-card:nth-child(1) {
    animation-delay: 0.9s;
}

.chart-card:nth-child(2) {
    animation-delay: 1s;
}

.chart-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #D5D5D5;
}

.chart-card h4 {
    color: #1A1A1A;
    margin-bottom: 24px;
    font-size: 1.125em;
    font-weight: 600;
    text-align: center;
}

.chart-card canvas {
    width: 100%;
    height: 400px;
    display: block;
    transition: opacity 0.3s ease;
}

/* Gráficos en columna */
.charts-container-column {
    display: flex !important;
    flex-direction: column;
    gap: 40px;
}

.chart-card-full {
    width: 100% !important;
    max-width: 100% !important;
}

.charts-container-column .chart-card canvas {
    height: 450px;
}

.chip-btn {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip-btn:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.chip-btn.active {
    background: linear-gradient(135deg, #A3C9A8 0%, #7BA680 100%);
    color: #fff;
    border-color: #7BA680;
    box-shadow: 0 4px 10px rgba(163, 201, 168, 0.25);
}

#followUpNoteModal {
    transition: opacity 0.15s ease;
    opacity: 0;
}

#messageDetailModal {
    transition: opacity 0.2s ease, backdrop-filter 0.2s ease;
    opacity: 0;
    backdrop-filter: blur(0px);
}

#messageDetailModal[style*="display: flex"] {
    backdrop-filter: blur(4px);
}

.message-detail-content {
    animation: slideUpFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.message-detail-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.message-detail-main {
    min-width: 0;
}

.message-detail-side {
    min-width: 0;
    position: sticky;
    top: 0;
}

.message-detail-card {
    margin-bottom: 16px !important;
}

.message-detail-actions {
    margin: 0 !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    border-radius: 12px;
    padding: 16px !important;
}

@media (min-width: 1100px) {
    .message-detail-content {
        width: min(1180px, 98vw) !important;
    }
}

@media (max-width: 980px) {
    .message-detail-workspace {
        grid-template-columns: 1fr;
    }
    .message-detail-side {
        position: static;
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Botones modernos */
.btn-primary-modern {
    background: linear-gradient(135deg, #A3C9A8 0%, #8FC4D9 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(163, 201, 168, 0.3);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(163, 201, 168, 0.4);
    background: linear-gradient(135deg, #93b998 0%, #7fb4c9 100%);
}

.btn-primary-modern:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(163, 201, 168, 0.3);
}

.btn-secondary-modern {
    background: #ffffff;
    color: #374151;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary-modern:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary-modern:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mejoras en las tarjetas de mensajes */
.message-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.message-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(163, 201, 168, 0.1), transparent);
    transition: left 0.5s ease;
}

.message-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #A3C9A8;
}

.message-card:hover::before {
    left: 100%;
}

.message-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Scrollbar personalizado para el modal */
.message-detail-content::-webkit-scrollbar {
    width: 10px;
}

.message-detail-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.message-detail-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #A3C9A8 0%, #8FC4D9 100%);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

.message-detail-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #93b998 0%, #7fb4c9 100%);
}

.message-detail-content {
    scrollbar-width: thin;
    scrollbar-color: #A3C9A8 #f1f5f9;
}

/* Mejoras en badges y chips */
.message-card span[style*="background"] {
    transition: all 0.2s ease;
}

.message-card:hover span[style*="background"] {
    transform: scale(1.05);
}

.message-card:hover .message-card-arrow {
    transform: translateX(6px);
    color: #A3C9A8;
}

.student-messages-hero {
    display: flex;
    gap: 24px;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #f6fff8 0%, #f0f9ff 100%);
    border: 1px solid #e5f0e8;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.student-messages-cta {
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    padding: 16px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}

.student-messages-cta .cta-title {
    margin: 0 0 4px 0;
    font-weight: 700;
    color: #111827;
}

.student-messages-cta .cta-subtitle {
    margin: 0 0 12px 0;
    color: #4b5563;
    line-height: 1.5;
    font-size: 0.95em;
}

.student-messages-cta .cta-footnote {
    display: block;
    margin-top: 10px;
    color: #9ca3af;
    font-size: 0.85em;
}

.student-messages-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1f2937;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.student-messages-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.student-messages-summary {
    width: 100%;
}

.student-messages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.summary-card {
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.summary-label {
    margin: 0 0 6px 0;
    color: #6b7280;
    font-size: 0.9em;
    font-weight: 600;
}

.summary-value {
    margin: 0 0 6px 0;
    font-size: 1.8em;
    font-weight: 800;
    color: #1f2937;
}

.summary-footnote {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9em;
}

.muted {
    color: #6b7280;
}

.student-messages-section-title .muted {
    margin: 6px 0 0 0;
    color: #6b7280;
}

.student-messages-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.student-messages-list .message-card:last-child {
    margin-bottom: 0;
}

.student-message-card {
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.message-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.message-id-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.chip {
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.9em;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.chip-id {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.message-date {
    color: #6b7280;
    font-size: 0.9em;
}

.message-subtitle {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 0.95em;
}

.status-chip {
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9em;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-chip--pending {
    background: #fff7ed;
    color: #b45309;
    border-color: #fed7aa;
}

.status-chip--replied {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.message-content {
    color: #0f172a;
    white-space: pre-wrap;
    line-height: 1.6;
    padding: 12px 0;
    font-size: 1.02em;
}

.message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #6b7280;
    font-size: 0.95em;
    padding: 8px 0 4px;
}

.message-meta-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 999px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.message-replies {
    border-top: 1px solid #e8eef5;
    padding-top: 14px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-replies-title {
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.message-reply-card {
    background: #f8f9fc;
    border: 1px solid #e8eef5;
    border-radius: 12px;
    padding: 12px;
}

.message-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.9em;
}

.reply-author {
    font-weight: 700;
    color: #1f2937;
}

.reply-date {
    color: #94a3b8;
}

.message-reply-content {
    color: #0f172a;
    line-height: 1.6;
    white-space: pre-wrap;
    margin-top: 6px;
}

.message-replies-footnote {
    color: #6b7280;
    font-size: 0.9em;
}

.message-empty-reply {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 12px;
    border-radius: 12px;
    color: #475569;
}

.empty-reply-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.student-messages-empty {
    text-align: center;
    padding: 36px 20px;
    background: #ffffff;
    border: 1px dashed #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.student-messages-empty .empty-emoji {
    font-size: 40px;
    margin-bottom: 12px;
}

.student-messages-empty h4 {
    margin: 0 0 8px 0;
    color: #0f172a;
}

.student-messages-empty p {
    margin: 6px 0 16px 0;
    color: #6b7280;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.student-messages-empty .empty-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Mejoras en el modal de notas */
#followUpNoteModal .modal-content {
    animation: slideUpFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

#followUpNoteModal textarea {
    transition: all 0.2s ease;
}

#followUpNoteModal textarea:focus {
    border-color: #A3C9A8;
    box-shadow: 0 0 0 3px rgba(163, 201, 168, 0.1);
    outline: none;
}

/* Mejoras en el modal de respuesta */
#replyMessageModal .modal-content {
    animation: slideUpFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Mejoras generales en inputs y textareas */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #A3C9A8;
    box-shadow: 0 0 0 3px rgba(163, 201, 168, 0.1);
    transition: all 0.2s ease;
}

/* Animación de carga suave */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.message-card {
    animation: fadeIn 0.3s ease-out;
}

/* Mejoras en el contenedor de mensajes vacío */
#teacherMessagesContainer:empty::before {
    content: 'No hay mensajes para mostrar';
    display: block;
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 1.1em;
}

.demographic-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 10px 0 26px;
}

.demographic-summary-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border: 1px solid #e8eef5;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.summary-label {
    margin: 0 0 6px 0;
    color: #6b7280;
    font-size: 0.95em;
    font-weight: 600;
}

.summary-value {
    margin: 0;
    font-size: 2em;
    font-weight: 800;
    color: #1a2332;
    letter-spacing: -0.5px;
}

.summary-hint {
    margin: 6px 0 0 0;
    font-size: 0.85em;
    color: #8c94a6;
}

.demographic-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 14px;
}

.demographic-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f6f7fb;
    border: 1px solid #e8eef5;
    border-radius: 10px;
    padding: 8px 10px;
}

.demographic-legend .legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.demographic-legend .legend-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

/* Estilos mejorados para gráficos de segmentación */
.chart-legend {
    margin-top: 20px;
}

.chart-legend .legend-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.chart-legend .legend-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border-color: #cbd5e1 !important;
}

.chart-card {
    transition: all 0.3s ease;
    position: relative;
}

.chart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
}

/* Animación de entrada para los gráficos */
@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-card canvas {
    animation: chartFadeIn 0.6s ease-out;
}

/* Radar clima (docente): señales acumuladas — ancho completo + filas legibles */
.chart-card--radar-climate-signals {
    grid-column: 1 / -1;
    container-type: inline-size;
    container-name: radar-climate-signals;
}

.chart-card--radar-climate-balance {
    grid-column: 1 / -1;
}

.chart-card--radar-climate-timeline {
    grid-column: 1 / -1;
}

.radar-climate-signals-board {
    animation: chartFadeIn 0.55s ease-out;
}

.radar-climate-quick-board {
    display: grid;
    gap: 14px;
}

.radar-climate-quick-head {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.radar-climate-quick-head p {
    margin: 10px 0 0;
    color: #334155;
    line-height: 1.55;
    font-size: 0.92rem;
}

.radar-climate-quick-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.radar-climate-quick-chip.is-priority {
    color: #9f1239;
    border: 1px solid #fecdd3;
    background: #fff1f2;
}

.radar-climate-quick-chip.is-preventive {
    color: #9a3412;
    border: 1px solid #fed7aa;
    background: #fff7ed;
}

.radar-climate-quick-chip.is-positive {
    color: #065f46;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
}

.radar-climate-quick-pulse {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.radar-climate-viz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.radar-climate-viz-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    padding: 12px;
}

.radar-climate-viz-card h5 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.radar-climate-viz-card p {
    margin: 8px 0 0;
    color: #334155;
    font-size: 0.89rem;
    line-height: 1.4;
}

.radar-climate-risk-legend {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.radar-climate-risk-legend__item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #334155;
}

.radar-climate-risk-legend__swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.radar-climate-risk-legend__label {
    min-width: 0;
}

.radar-climate-risk-legend__meta {
    color: #64748b;
    font-weight: 700;
}

.radar-climate-donut-wrap {
    display: grid;
    place-items: center;
}

.radar-climate-donut {
    width: 122px;
    height: 122px;
    border-radius: 999px;
    background: var(--donut, conic-gradient(#10b981 0% 50%, #fb7185 50% 100%));
    position: relative;
}

.radar-climate-donut::after {
    content: "";
    position: absolute;
    inset: 15px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.radar-climate-donut__center {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    z-index: 1;
    text-align: center;
}

.radar-climate-donut__center strong {
    font-size: 1.2rem;
    line-height: 1;
    color: #0f172a;
}

.radar-climate-donut__center span {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

.radar-climate-bars {
    display: grid;
    gap: 10px;
}

.radar-climate-bars__item {
    display: grid;
    gap: 6px;
}

.radar-climate-bars__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.9rem;
    color: #334155;
}

.radar-climate-bars__meta strong {
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.radar-climate-level-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.radar-climate-level-pill.is-high {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.radar-climate-level-pill.is-medium {
    background: #ffedd5;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.radar-climate-level-pill.is-low {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.radar-climate-bars__track {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.radar-climate-bars__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.45s ease;
}

.radar-climate-bars__hint {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.45;
}

.radar-climate-quick-pulse__labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.radar-climate-quick-pulse__bar {
    width: 100%;
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    min-height: 13px;
    background: #e2e8f0;
}

.radar-climate-quick-pulse__pos {
    background: linear-gradient(90deg, #10b981 0%, #14b8a6 100%);
}

.radar-climate-quick-pulse__risk {
    background: linear-gradient(90deg, #fb7185 0%, #f97316 100%);
}

.radar-climate-quick-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.radar-climate-quick-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    background: #ffffff;
}

.radar-climate-quick-card h5 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.radar-climate-quick-card p {
    margin: 0;
    color: #334155;
    line-height: 1.5;
    font-size: 0.91rem;
}

.radar-climate-quick-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px;
    color: #64748b;
    background: #f8fafc;
}

.radar-climate-signals-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@container radar-climate-signals (min-width: 720px) {
    .radar-climate-signals-cols {
        grid-template-columns: 1fr 1fr;
        gap: 22px;
        align-items: start;
    }
}

.radar-climate-signals-group {
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 14px 16px 12px;
    min-width: 0;
}

.radar-climate-signals-group--pos {
    border-color: #86efac;
    background: linear-gradient(165deg, #ecfdf5 0%, #ffffff 55%);
}

.radar-climate-signals-group--risk {
    border-color: #fdba74;
    background: linear-gradient(165deg, #fff7ed 0%, #ffffff 55%);
}

.radar-climate-signals-group-h {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.radar-climate-signals-group--pos .radar-climate-signals-group-h {
    color: #047857;
    border-bottom-color: rgba(5, 150, 105, 0.22);
}

.radar-climate-signals-group--risk .radar-climate-signals-group-h {
    color: #c2410c;
    border-bottom-color: rgba(234, 88, 12, 0.25);
}

.radar-climate-signal-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(241, 245, 249, 0.95);
}

.radar-climate-signal-item:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.radar-climate-signal-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.radar-climate-signal-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-top: 5px;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.radar-climate-signal-label {
    flex: 1;
    min-width: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: auto;
}

.radar-climate-signal-val {
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    min-width: 2.25rem;
    text-align: right;
    line-height: 1.4;
    padding: 2px 0 0 8px;
}

.radar-climate-signal-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.radar-climate-signal-fill {
    height: 100%;
    border-radius: 999px;
    min-width: 0;
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.radar-climate-signals-foot {
    margin: 16px 0 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
    max-width: 72ch;
}

.radar-climate-signals-foot strong {
    color: #334155;
    font-weight: 800;
}

/* Radar clima: balance del mes (orientación) */
.radar-climate-balance-root {
    min-width: 0;
}

.radar-docente-head {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.radar-docente-head__title {
    min-width: 240px;
    flex: 1;
}

.radar-docente-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    width: 100%;
    min-width: 0;
}

.radar-docente-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.radar-docente-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin: 10px 0 10px;
}

.radar-climate-balance-board {
    animation: chartFadeIn 0.55s ease-out;
}

.radar-climate-balance-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.radar-climate-balance-lead {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 22px 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.radar-climate-balance-donut-wrap {
    position: relative;
    width: 172px;
    height: 172px;
    flex-shrink: 0;
}

.radar-climate-balance-donut {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from -90deg, #059669 0% var(--pos-pct), #f97316 var(--pos-pct) 100%);
    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.radar-climate-balance-donut-core {
    position: absolute;
    inset: 20%;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.06),
        0 2px 8px rgba(15, 23, 42, 0.06);
}

.radar-climate-balance-donut-index {
    font-size: clamp(1.85rem, 3.2vw, 2.35rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #0f172a;
}

.radar-climate-balance-donut-index--fav {
    color: #047857;
}

.radar-climate-balance-donut-index--mid {
    color: #b45309;
}

.radar-climate-balance-donut-index--tense {
    color: #c2410c;
}

.radar-climate-balance-donut-sub {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #64748b;
    margin-top: 6px;
}

.radar-climate-balance-lead-copy {
    flex: 1;
    min-width: min(100%, 280px);
}

.radar-climate-balance-month {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
}

.radar-climate-balance-scope {
    margin: 0 0 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.35;
}

.radar-climate-scope-badge {
    border-left: 3px solid #6366f1;
    padding-left: 10px;
}

.radar-climate-balance-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.radar-climate-balance-lead-copy--fav .radar-climate-balance-pill {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.radar-climate-balance-lead-copy--mid .radar-climate-balance-pill {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.radar-climate-balance-lead-copy--tense .radar-climate-balance-pill {
    background: #ffe4e6;
    color: #9f1239;
    border: 1px solid #fda4af;
}

.radar-climate-balance-expl {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #475569;
    max-width: 62ch;
}

.radar-climate-balance-expl strong {
    color: #1e293b;
    font-weight: 700;
}

.radar-climate-balance-brief {
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    background: #f8fafc;
}

.radar-climate-balance-brief strong {
    display: block;
    color: #0f172a;
    font-size: 0.9rem;
}

.radar-climate-balance-brief p {
    margin: 6px 0 0;
    color: #475569;
    line-height: 1.5;
    font-size: 0.84rem;
}

.radar-climate-balance-brief.is-fav {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.radar-climate-balance-brief.is-mid {
    background: #fff7ed;
    border-color: #fdba74;
}

.radar-climate-balance-brief.is-tense {
    background: #fff1f2;
    border-color: #fda4af;
}

.radar-climate-balance-h {
    margin: 0 0 12px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.radar-climate-balance-volume {
    padding: 18px 0 2px;
}

.radar-climate-balance-stacked {
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

.radar-climate-balance-seg {
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: flex-grow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.radar-climate-balance-seg--pos {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.radar-climate-balance-seg--risk {
    background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
}

.radar-climate-balance-seg-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.73rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.radar-climate-balance-split-line {
    margin: 12px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 6px 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.45;
    text-align: center;
}

.radar-climate-balance-split-line strong {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}

.radar-climate-balance-split-line em {
    font-style: normal;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #64748b;
}

.radar-climate-balance-split-line__sep {
    color: #cbd5e1;
    font-weight: 300;
    user-select: none;
}

@media (max-width: 740px) {
    .radar-climate-balance-seg {
        padding: 0 6px;
    }

    .radar-climate-balance-seg-label {
        font-size: 0.67rem;
    }
}

@media (max-width: 860px) {
    .radar-docente-filters {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        min-width: 100%;
    }
}

@media (max-width: 620px) {
    .radar-docente-filters {
        grid-template-columns: 1fr;
    }
}

.radar-climate-balance-legend-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.radar-climate-balance-legend-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
}

.radar-climate-balance-legend-card h5 {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #334155;
}

.radar-climate-balance-legend-card p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #334155;
}

.radar-climate-balance-legend-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
    margin-bottom: 6px;
}

.radar-climate-balance-legend-pill.is-high {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.radar-climate-balance-legend-pill.is-mid {
    background: #ffedd5;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.radar-climate-balance-legend-pill.is-low {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.radar-climate-balance-meta {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 14px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 120%);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    font-size: 0.84rem;
    color: #475569;
}

.radar-climate-balance-meta strong {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}

.radar-climate-balance-meta-sep {
    color: #cbd5e1;
    font-weight: 300;
}

.radar-climate-balance-empty {
    text-align: center;
    padding: 28px 18px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.radar-climate-balance-empty-title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 800;
    color: #334155;
}

.radar-climate-balance-empty-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #64748b;
    max-width: 52ch;
    margin-inline: auto;
}

.radar-climate-timeline-root {
    min-width: 0;
}

.radar-climate-timeline-board {
    display: grid;
    gap: 12px;
}

.radar-climate-trend-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radar-climate-trend-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
    color: #6d28d9;
    background: #f3e8ff;
    border: 1px solid #d8b4fe;
}

.radar-climate-trend-pill.is-improving {
    color: #166534;
    background: #ecfdf5;
    border-color: #86efac;
}

.radar-climate-trend-pill.is-stable {
    color: #1e40af;
    background: #eff6ff;
    border-color: #93c5fd;
}

.radar-climate-trend-pill.is-attention {
    color: #9f1239;
    background: #fff1f2;
    border-color: #fda4af;
}

.radar-climate-trend-pill.is-neutral {
    color: #334155;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.radar-climate-trend-canvas {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 8px;
}

.radar-climate-trend-svg {
    width: 100%;
    height: 230px;
    display: block;
}

.radar-climate-trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 0.8rem;
    color: #475569;
}

.radar-climate-trend-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.radar-climate-trend-legend i {
    width: 14px;
    height: 4px;
    border-radius: 999px;
    display: inline-block;
}

.radar-climate-trend-legend i.is-index {
    background: #8b5cf6;
}

.radar-climate-trend-legend i.is-volume {
    background: #2563eb;
}

.radar-climate-timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.radar-climate-timeline-month {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
    display: grid;
    gap: 8px;
}

.radar-climate-timeline-month__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.radar-climate-timeline-month__top h5 {
    margin: 0;
    font-size: 0.86rem;
    color: #0f172a;
    text-transform: capitalize;
}

.radar-climate-timeline-month__pill {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.radar-climate-timeline-month__pill.is-fav {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.radar-climate-timeline-month__pill.is-mid {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.radar-climate-timeline-month__pill.is-tense {
    background: #fff1f2;
    border-color: #fda4af;
    color: #9f1239;
}

.radar-climate-timeline-meter {
    display: grid;
    gap: 4px;
}

.radar-climate-timeline-meter__label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.04em;
}

.radar-climate-timeline-meter__track {
    height: 9px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.radar-climate-timeline-meter__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.radar-climate-timeline-meter__fill.is-fav {
    background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
}

.radar-climate-timeline-meter__fill.is-mid {
    background: linear-gradient(90deg, #fbbf24 0%, #f97316 100%);
}

.radar-climate-timeline-meter__fill.is-tense {
    background: linear-gradient(90deg, #fb7185 0%, #ef4444 100%);
}

.radar-climate-timeline-meter__fill.is-volume {
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
}

.radar-climate-timeline-month__summary {
    margin: 0;
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.4;
}

.radar-climate-timeline-foot {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.45;
}

.radar-climate-timeline-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px;
    color: #64748b;
    background: #f8fafc;
}

/* Mejoras en los badges de score */
.chart-legend span[style*="background"] {
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chart-legend span[style*="background"]:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.demographic-legend .legend-label {
    font-size: 0.9em;
    color: #1f2937;
    font-weight: 600;
}

.demographic-legend .legend-value {
    font-size: 0.8em;
    color: #6b7280;
}

/* Communication Section Styles */
.communication-section {
    margin-top: 30px;
}

.messages-container {
    margin-top: 30px;
}

.message-card {
    transition: all 0.3s ease;
}

.message-card:hover {
    box-shadow: 0 4px 12px rgba(163, 201, 168, 0.15) !important;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .dashboard-main {
        padding: 20px;
    }

    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .dashboard-stat-card {
        padding: 16px;
    }

    .dashboard-stat-value {
        font-size: 1.6em;
    }

    .dashboard-stat-label {
        font-size: 0.8em;
    }

    .surveys-container,
    .activities-container {
        grid-template-columns: 1fr;
    }

    .stats-overview {
        grid-template-columns: 1fr;
    }

    .students-table-container {
        font-size: 0.85em;
    }

    .students-table th,
    .students-table td {
        padding: 8px;
    }

    /* Teacher navigation responsive */
    .teacher-nav {
        flex-direction: column;
        gap: 0;
        position: relative;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    [id^="teacher"].dashboard-container > .teacher-nav,
    #docenteView.dashboard-container > .teacher-nav {
        width: min(100%, calc(100% - 20px));
        margin: 10px auto 0;
        padding: 8px;
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
        gap: 8px;
        border-radius: 18px;
    }

    #directionView.dashboard-container > .teacher-nav {
        width: calc(100% - 20px);
        max-width: 1400px;
        margin: 10px auto 0;
        padding: 8px;
        flex-direction: row;
        justify-content: space-between;
        align-items: stretch;
        gap: 8px;
        border-radius: 18px;
        flex-wrap: nowrap;
    }

    .nav-btn {
        width: 100%;
        padding: 18px 24px;
        border-bottom: 1px solid #E8F5E9;
        border-right: none;
        justify-content: flex-start;
        margin: 2px 0;
        border-radius: 0;
    }

    [id^="teacher"].dashboard-container > .teacher-nav .nav-btn,
    #docenteView.dashboard-container > .teacher-nav .nav-btn {
        width: auto;
        flex: 1 1 160px;
        min-height: 52px;
        justify-content: center;
        margin: 0;
        padding: 13px 14px;
        border: 1px solid transparent;
        border-radius: 12px;
    }

    #directionView.dashboard-container > .teacher-nav .nav-btn {
        width: auto;
        flex: 1 1 0;
        min-height: 52px;
        justify-content: center;
        margin: 0;
        min-width: 0;
        padding: 13px 10px;
        border: 1px solid transparent;
        border-radius: 12px;
    }

    .nav-btn::before {
        left: 0;
        bottom: 0;
        width: 0;
        height: 3px;
        transform: none;
    }

    .nav-btn.active::before {
        width: 100%;
    }

    .nav-btn.active {
        border-left: 4px solid #4CAF50;
        border-bottom: 1px solid #E8F5E9;
        background: linear-gradient(90deg, rgba(76, 175, 80, 0.15) 0%, rgba(102, 187, 106, 0.08) 100%);
        box-shadow: inset 4px 0 0 #4CAF50, 0 2px 8px rgba(76, 175, 80, 0.1);
    }

    .nav-icon {
        font-size: 1.3em;
    }

    .teacher-controls {
        padding: 20px;
    }

    .control-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .code-display {
        width: 100%;
        flex-wrap: wrap;
    }

    /* Landing page responsive */
    .landing-nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .landing-nav button {
        width: 100%;
    }

    .hero-section {
        padding: 60px 20px 80px;
    }

    .hero-section .hero-description {
        font-size: 1.1em;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .btn-hero {
        width: 100%;
        padding: 18px 40px;
        font-size: 1.1em;
    }

    .problem-section,
    .about-section,
    .features-section,
    .benefits-section,
    .roles-section,
    .how-it-works-section {
        padding: 80px 20px;
    }

    .problem-content,
    .about-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .problem-header,
    .about-header {
        position: static;
    }

    .problem-section h3,
    .about-section h3,
    .benefits-content h3,
    .features-section h3,
    .roles-content h3,
    .how-it-works-content h3 {
        font-size: 2em;
        text-align: left;
    }

    .problem-section h3::after,
    .about-section h3::after,
    .benefits-content h3::after,
    .features-section h3::after,
    .roles-content h3::after,
    .how-it-works-content h3::after {
        left: 0;
        transform: none;
    }

    .problem-solution-box {
        padding: 30px 25px;
    }

    .problem-solution {
        font-size: 1.2em !important;
    }

    .features-grid,
    .benefits-list {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .feature-card,
    .benefit-item {
        padding: 35px 25px;
    }

    .cta-section {
        padding: 80px 20px;
    }

    .cta-section h3 {
        font-size: 2em;
    }

    .cta-section p {
        font-size: 1.1em;
    }

    /* Charts responsive */
    .charts-container {
        grid-template-columns: 1fr;
    }

    .chart-card canvas {
        width: 100%;
        height: auto;
    }

}

/* ========== MODO OSCURO ========== */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .dashboard-container {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .dashboard-header {
    background-color: #2d2d2d;
    border-bottom: 1px solid #404040;
}

body.dark-mode .dashboard-header h1 {
    color: #e0e0e0;
}

body.dark-mode .teacher-nav {
    background: rgba(26, 26, 26, 0.98);
    border-bottom-color: #2d2d2d;
}

body.dark-mode [id^="teacher"].dashboard-container > .teacher-nav,
body.dark-mode #docenteView.dashboard-container > .teacher-nav,
body.dark-mode #directionView.dashboard-container > .teacher-nav {
    border-color: rgba(71, 85, 105, 0.55);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.35);
}

body.dark-mode [id^="teacher"].dashboard-container > .teacher-nav .nav-btn,
body.dark-mode #docenteView.dashboard-container > .teacher-nav .nav-btn,
body.dark-mode #directionView.dashboard-container > .teacher-nav .nav-btn {
    border-color: transparent;
}

body.dark-mode [id^="teacher"].dashboard-container > .teacher-nav .nav-btn:hover,
body.dark-mode #docenteView.dashboard-container > .teacher-nav .nav-btn:hover,
body.dark-mode #directionView.dashboard-container > .teacher-nav .nav-btn:hover {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    border-color: rgba(71, 85, 105, 0.8);
}

body.dark-mode [id^="teacher"].dashboard-container > .teacher-nav .nav-btn.active,
body.dark-mode #docenteView.dashboard-container > .teacher-nav .nav-btn.active,
body.dark-mode #directionView.dashboard-container > .teacher-nav .nav-btn.active {
    color: #d1fae5;
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.5) 0%, rgba(15, 118, 110, 0.42) 100%);
    border-color: rgba(45, 212, 191, 0.45);
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.16);
}

body.dark-mode [id^="teacher"].dashboard-container.teacher-app-grid > .teacher-nav,
body.dark-mode #docenteView.dashboard-container.teacher-app-grid > .teacher-nav,
body.dark-mode #directionView.dashboard-container.teacher-app-grid > .teacher-nav {
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.55);
}

body.dark-mode [id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main,
body.dark-mode #docenteView.dashboard-container.teacher-app-grid > .dashboard-main,
body.dark-mode #directionView.dashboard-container.teacher-app-grid > .dashboard-main {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 55%);
}

body.dark-mode [id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main .welcome-section h2,
body.dark-mode #docenteView.dashboard-container.teacher-app-grid > .dashboard-main .welcome-section h2,
body.dark-mode #directionView.dashboard-container.teacher-app-grid > .dashboard-main .welcome-section h2 {
    color: #f1f5f9;
}

body.dark-mode [id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main .welcome-section p,
body.dark-mode #docenteView.dashboard-container.teacher-app-grid > .dashboard-main .welcome-section p,
body.dark-mode #directionView.dashboard-container.teacher-app-grid > .dashboard-main .welcome-section p {
    color: #94a3b8;
}

body.dark-mode [id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-main .section-title h3,
body.dark-mode #docenteView.dashboard-container.teacher-app-grid > .dashboard-main .section-title h3,
body.dark-mode #directionView.dashboard-container.teacher-app-grid > .dashboard-main .section-title h3 {
    color: #e2e8f0;
}

body.dark-mode #directionView.dashboard-container.teacher-app-grid > .teacher-nav .nav-btn.active {
    color: #d1fae5;
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.5) 0%, rgba(15, 118, 110, 0.42) 100%);
    border-color: rgba(45, 212, 191, 0.45);
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.16);
}

body.dark-mode .nav-btn {
    background-color: transparent;
    color: #b0b0b0;
    border-bottom-color: transparent;
}

body.dark-mode .nav-btn::after {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(102, 187, 106, 0.1) 100%);
}

body.dark-mode .nav-btn:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(102, 187, 106, 0.1) 100%);
    color: #e0e0e0;
}

body.dark-mode .nav-btn.active {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(102, 187, 106, 0.12) 100%);
    color: #ffffff;
    border-bottom-color: #4CAF50;
}

body.dark-mode .nav-btn.active::before {
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.5);
}

body.dark-mode .dashboard-card {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .student-detail-dashboard > .dashboard-body {
    background: #141c28;
}

body.dark-mode .student-detail-dashboard .student-detail-section {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

body.dark-mode .student-detail-dashboard .student-detail-section--kpi {
    background: #172033;
    border-color: #3d4d63;
}

body.dark-mode .student-detail-dashboard .student-detail-section.dashboard-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .student-detail-dashboard #studentDetailContent .dashboard-card-title {
    color: #e2e8f0;
    border-bottom-color: #334155;
    border-left-color: #8fc4d9;
}

body.dark-mode .student-detail-dashboard .student-detail-section--chart canvas {
    background: #141c28;
    border-color: #334155;
}

body.dark-mode .btn-primary {
    background-color: #4a90e2;
    color: white;
}

body.dark-mode .btn-secondary {
    background-color: #404040;
    color: #e0e0e0;
    border: 1px solid #555;
}

body.dark-mode .welcome-section h2 {
    color: #e0e0e0;
}

body.dark-mode .welcome-section p {
    color: #b0b0b0;
}

body.dark-mode #riskAlertsFilters {
    background-color: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode #riskAlertsFilters label {
    color: #e0e0e0;
}

body.dark-mode #riskAlertsFilters select,
body.dark-mode #riskAlertsFilters input {
    background-color: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #404040;
}

body.dark-mode .user-info select {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #404040;
}

body.dark-mode .user-info button {
    background-color: transparent;
    border: 1px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .direction-user-info {
    background: rgba(15, 23, 42, 0.38);
    border-color: rgba(148, 163, 184, 0.26);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.26);
}

body.dark-mode .direction-user-badge {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(51, 65, 85, 0.94) 100%);
    color: #e2e8f0;
}

body.dark-mode .direction-user-kicker,
body.dark-mode .direction-user-email {
    color: rgba(226, 232, 240, 0.82);
}

body.dark-mode .direction-user-name {
    color: #f8fafc;
}

body.dark-mode .dashboard-header .btn-secondary.direction-logout-btn {
    background: rgba(15, 23, 42, 0.32);
    border-color: rgba(148, 163, 184, 0.34);
    color: #f8fafc;
}

body.dark-mode [id^="student"].dashboard-container .user-info,
body.dark-mode [id^="teacher"].dashboard-container .user-info,
body.dark-mode #docenteView .user-info,
body.dark-mode #directionView .user-info {
    background: rgba(15, 23, 42, 0.38);
    border-color: rgba(148, 163, 184, 0.26);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.26);
}

body.dark-mode [id^="teacher"].dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar,
body.dark-mode #docenteView.dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar,
body.dark-mode #directionView.dashboard-container.teacher-app-grid > .dashboard-header .user-info--teacher-toolbar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.dark-mode [id^="student"].dashboard-container .user-info > button[onclick="logout()"],
body.dark-mode [id^="teacher"].dashboard-container .user-info > button[onclick="logout()"],
body.dark-mode #docenteView .user-info > button[onclick="logout()"],
body.dark-mode #directionView .user-info > button[onclick="logout()"] {
    background: rgba(15, 23, 42, 0.32);
    border-color: rgba(148, 163, 184, 0.34);
    color: #f8fafc;
}

body.dark-mode [id^="teacher"].dashboard-container #teacherName,
body.dark-mode [id^="teacher"].dashboard-container #teacherActionsName,
body.dark-mode [id^="teacher"].dashboard-container #teacherResourcesName,
body.dark-mode .student-profile-btn,
body.dark-mode #docenteView .user-info #docentePanelUserName,
body.dark-mode #directionView .user-info #directionPanelUserName {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(51, 65, 85, 0.94) 100%) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #f8fafc !important;
}

body.dark-mode [id^="teacher"].dashboard-container #teacherName::before,
body.dark-mode [id^="teacher"].dashboard-container #teacherActionsName::before,
body.dark-mode [id^="teacher"].dashboard-container #teacherResourcesName::before,
body.dark-mode #studentAvatarHeader,
body.dark-mode #docenteView .user-info #docentePanelUserName::before,
body.dark-mode #directionView .user-info #directionPanelUserName::before {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.98) 0%, rgba(71, 85, 105, 0.92) 100%);
    color: #e2e8f0;
}

body.dark-mode .student-profile-btn #studentNameHeader,
body.dark-mode .student-profile-btn:hover #studentNameHeader {
    color: #f8fafc;
}

body.dark-mode .student-profile-btn:hover,
body.dark-mode [id^="teacher"].dashboard-container #teacherName:hover,
body.dark-mode [id^="teacher"].dashboard-container #teacherActionsName:hover,
body.dark-mode [id^="teacher"].dashboard-container #teacherResourcesName:hover,
body.dark-mode #docenteView .user-info #docentePanelUserName:hover,
body.dark-mode #directionView .user-info #directionPanelUserName:hover {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 14px 28px rgba(2, 6, 23, 0.24) !important;
}

body.dark-mode .stat-card {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .stat-number {
    color: #e0e0e0;
}

body.dark-mode .stat-label {
    color: #b0b0b0;
}

body.dark-mode .section-title h3 {
    color: #e0e0e0;
}

body.dark-mode .section-title p {
    color: #b0b0b0;
}

body.dark-mode .keywords-trends-card {
    background-color: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .content-section {
    background-color: transparent;
}

body.dark-mode select,
body.dark-mode input[type="date"],
body.dark-mode input[type="text"],
body.dark-mode textarea {
    background-color: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #404040;
}

body.dark-mode select:focus,
body.dark-mode input:focus,
body.dark-mode textarea:focus {
    border-color: #4a90e2;
    outline: none;
}

/* ========== MEJORAS RESPONSIVE PARA MÓVILES ========== */
@media (max-width: 768px) {
    /* Mejoras generales */
    body {
        font-size: 14px;
    }
    
    /* Landing page - navegación mejorada */
    .landing-nav {
        flex-wrap: wrap;
        padding: 12px 15px;
    }
    
    .nav-brand h1 {
        font-size: 1.3em;
    }
    
    .nav-links {
        display: none; /* Ocultar en móvil, se puede agregar menú hamburguesa después */
        order: 3;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        padding-top: 15px;
        border-top: 1px solid #e0e0e0;
    }
    
    .nav-actions {
        flex: 1;
        justify-content: flex-end;
        gap: 8px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 0.85em;
        white-space: nowrap;
    }
    
    /* Hero section */
    .hero-title {
        font-size: 1.8em !important;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1.1em !important;
        line-height: 1.4;
    }
    
    /* Dashboard container */
    .dashboard-container {
        padding: 0;
    }
    
    .dashboard-main {
        padding: 15px !important;
    }
    
    /* Welcome section */
    .welcome-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .welcome-section h2 {
        font-size: 1.5em;
    }
    
    /* Content sections */
    .content-section {
        margin-top: 20px;
        padding: 0 10px;
    }
    
    .section-title {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
    
    .section-title h3 {
        font-size: 1.3em;
        margin: 0;
    }
    
    /* Filtros y controles */
    .section-title > div {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .section-title input,
    .section-title select {
        width: 100% !important;
        min-width: auto !important;
        font-size: 0.9em;
    }
    
    /* Tablas responsive */
    .students-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .students-table {
        min-width: 600px;
        font-size: 0.8em;
    }
    
    .students-table th,
    .students-table td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    /* Cards y grids */
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .dashboard-stat-card {
        padding: 12px !important;
    }
    
    .dashboard-stat-value {
        font-size: 1.4em !important;
    }
    
    .dashboard-stat-label {
        font-size: 0.75em !important;
    }
    
    /* Modales responsive */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 10% auto !important;
        padding: 20px 15px !important;
        max-height: 85vh !important;
        overflow-y: auto;
    }

    .orientation-report-actions {
        grid-template-columns: 1fr;
    }

    .orientation-report-studio {
        grid-template-columns: 1fr;
    }

    .orientation-report-view-switch {
        grid-template-columns: 1fr;
    }

    .orientation-report-studio__insights {
        position: static;
    }

    .orientation-report-panel-tabs {
        grid-template-columns: 1fr;
    }

    .internal-chat-launcher {
        right: 16px;
        bottom: 16px;
        padding: 12px 16px;
    }

    .internal-chat-modal-content {
        width: 96vw !important;
        max-width: 96vw !important;
        padding: 0 !important;
        margin: 4vh auto !important;
    }

    .internal-chat-layout {
        grid-template-columns: 1fr;
        max-height: calc(88vh - 90px);
    }

    .internal-chat-sidebar {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        max-height: 220px;
    }

    .internal-chat-message {
        max-width: 100%;
    }
    
    /* Formularios */
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    /* Botones */
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 0.9em;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-primary:last-child,
    .btn-secondary:last-child {
        margin-bottom: 0;
    }
    
    /* Grids de contenido */
    .surveys-container,
    .activities-container,
    .stats-overview {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    /* Alertas de riesgo */
    .risk-alert-tab {
        padding: 12px 15px !important;
        font-size: 0.85em !important;
    }
    
    /* Notificaciones */
    .notification-item {
        padding: 12px !important;
    }
    
    /* Filtros de alertas */
    #riskAlertsFilters {
        padding: 15px !important;
    }
    
    #riskAlertsFilters > div {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Cliente cards */
    .client-card {
        padding: 15px !important;
    }
    
    .client-card > div:first-child {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
    
    .client-card > div:first-child > div:last-child {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .client-card button {
        width: 100%;
    }
    
    /* Grids de estadísticas de cliente */
    .client-card > div:last-child {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    /* Charts */
    .chart-card {
        padding: 15px;
    }
    
    .chart-card canvas {
        max-height: 300px !important;
    }
    
    /* Mensajes */
    .message-card {
        padding: 15px !important;
        margin-bottom: 15px;
    }
    
    /* Espacios de crecimiento */
    .growth-space-card {
        padding: 15px !important;
    }
    
    /* Códigos de clase */
    .code-display {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .code-display > div {
        width: 100% !important;
    }
    
    /* Owner dashboard */
    #clientsList {
        padding: 0;
    }
    
    /* Teacher controls */
    .teacher-controls {
        padding: 15px !important;
    }
    
    .control-group {
        flex-direction: column;
        gap: 12px;
    }
    
    /* Login card */
    .login-card {
        padding: 25px 20px;
        margin: 10px;
    }
    
    /* Hero buttons */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-hero {
        width: 100%;
        padding: 15px 30px;
    }
}

/* Tablets y pantallas medianas */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 0.9em;
    }
    
    .modal-content {
        width: 85%;
        max-width: 700px;
    }
}

/* Pantallas muy pequeñas (móviles pequeños) */
@media (max-width: 480px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .hero-title {
        font-size: 1.5em !important;
    }
    
    .hero-subtitle {
        font-size: 1em !important;
    }
    
    .dashboard-stat-value {
        font-size: 1.2em !important;
    }
    
    .modal-content {
        width: 100% !important;
        margin: 5% auto !important;
        border-radius: 0 !important;
        max-height: 95vh !important;
    }
    
    .nav-btn {
        padding: 10px 12px;
        font-size: 0.8em;
    }
    
    .section-title h3 {
        font-size: 1.1em;
    }
    
    .students-table {
        font-size: 0.75em;
    }
    
    .client-card > div:last-child {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   ESTILOS DEL NUEVO MODELO DE LANDING PAGE
   ============================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    height: 100%;
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-item.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Hero animations */
.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.hero-buttons {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator animation */
.scroll-indicator {
    opacity: 0;
    animation: fadeIn 1s ease-out 1.5s forwards;
}

.scroll-indicator > div {
    animation: bounce 2s infinite;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

/* Stat badge animation */
.stat-badge {
    opacity: 0;
    transform: scale(0.8);
    animation: scaleIn 0.6s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stat values animation */
.stat-value {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stat-item.revealed .stat-value {
    opacity: 1;
    transform: scale(1);
    animation: springIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes springIn {
    0% {
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Floating badge animation */
.floating-badge {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(-5px);
    }
    50% {
        transform: translateY(5px);
    }
}

/* Feature card hover effect */
.feature-card {
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
}

/* Benefit card hover */
.benefit-card:hover {
    transform: translateY(-8px);
}

/* Step card hover */
.step-card:hover {
    transform: scale(1.05);
}

/* Testimonial transitions */
.testimonial-quote,
.testimonial-name,
.testimonial-role,
.testimonial-school {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.testimonial-fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.testimonial-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll effect */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Button hover effects */
.btn-hero-primary:hover i {
    transform: translateX(4px);
}

.btn-cta:hover {
    transform: scale(1.05);
}

.btn-cta-secondary:hover {
    transform: scale(1.05);
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Hero parallax effect */
#hero {
    will-change: transform;
}

/* Ensure hero content is above background */
#hero > div.relative.z-10 {
    position: relative;
    z-index: 10;
}

#hero > div.absolute.z-0 {
    z-index: 0;
}

/* Ensure icons are properly sized */
[data-lucide] {
    width: 1em;
    height: 1em;
}

/* Loading state for images */
img {
    transition: opacity 0.3s ease;
}

img[src] {
    opacity: 1;
}

/* Custom scrollbar (optional) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Estilos para hero title y subtitle sin efectos neon */
#landingView #hero .hero-title,
#hero .hero-title,
.landing-page #hero .hero-title,
.hero-title {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

/* Colores específicos para las palabras en el h1 - ALTA PRIORIDAD */
#landingView #hero .hero-title span[style*="#34D399"],
#hero .hero-title span[style*="#34D399"],
#landingView #hero .hero-title span[style*="color: #34D399"],
#hero .hero-title span[style*="color: #34D399"],
.landing-page #hero .hero-title span[style*="#34D399"],
.hero-title span[style*="#34D399"] {
    color: #34D399 !important;
    -webkit-text-fill-color: #34D399 !important;
}

#landingView #hero .hero-title span[style*="#5EEAD4"],
#hero .hero-title span[style*="#5EEAD4"],
#landingView #hero .hero-title span[style*="color: #5EEAD4"],
#hero .hero-title span[style*="color: #5EEAD4"],
.landing-page #hero .hero-title span[style*="#5EEAD4"],
.hero-title span[style*="#5EEAD4"] {
    color: #5EEAD4 !important;
    -webkit-text-fill-color: #5EEAD4 !important;
}

#landingView #hero .hero-subtitle,
#hero .hero-subtitle,
.landing-page #hero .hero-subtitle,
.hero-subtitle {
    color: #ffffff !important;
}

/* ========== LANDING PAGE SPECIFIC STYLES ========== */
/* Coral Button Styles */
/* ========== MODERN PREMIUM CTA BUTTONS ========== */
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

/* ========== PREMIUM DEMO BUTTON - NOVEDOSO Y ATRACTIVO ========== */
.btn-demo-premium {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 28px;
    border-radius: 50px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 40%, #0ea5e9 100%);
    background-size: 200% 200%;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px rgba(16, 185, 129, 0.3),
        0 8px 24px rgba(14, 165, 233, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    z-index: 1;
}

.btn-demo-premium::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.btn-demo-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.btn-demo-text {
    position: relative;
    z-index: 3;
    transition: transform 0.3s ease;
}

.btn-demo-icon {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-demo-premium:hover {
    background-position: 100% 0;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 24px rgba(16, 185, 129, 0.4),
        0 12px 32px rgba(14, 165, 233, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-demo-premium:hover::before {
    opacity: 1;
}

.btn-demo-premium:hover .btn-demo-shine {
    left: 100%;
}

.btn-demo-premium:hover .btn-demo-icon {
    transform: translateX(4px) rotate(-5deg);
}

.btn-demo-premium:hover .btn-demo-text {
    transform: translateX(-2px);
}

.btn-demo-premium:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 
        0 2px 8px rgba(16, 185, 129, 0.3),
        0 4px 12px rgba(14, 165, 233, 0.2);
}

.btn-demo-premium:focus-visible {
    outline: 3px solid rgba(16, 185, 129, 0.4);
    outline-offset: 4px;
}

/* Pulse animation on load */
@keyframes demoPulse {
    0%, 100% {
        box-shadow: 
            0 4px 16px rgba(16, 185, 129, 0.3),
            0 8px 24px rgba(14, 165, 233, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(16, 185, 129, 0.4),
            0 10px 28px rgba(14, 165, 233, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.btn-demo-premium {
    animation: demoPulse 3s ease-in-out infinite;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .btn-demo-premium {
        min-height: 46px;
        padding: 11px 24px;
        font-size: 14px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .btn-demo-premium {
        animation: none;
        transition: none;
    }
    
    .btn-demo-premium:hover {
        transform: none;
    }
    
    .btn-demo-shine {
        display: none;
    }
}

/* HERO Primary CTA - Premium Emerald/Teal Gradient */
.btn-hero-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #0ea5e9 100%);
    background-size: 200% 200%;
    box-shadow: 
        0 4px 14px rgba(16, 185, 129, 0.25),
        0 8px 24px rgba(14, 165, 233, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.btn-hero-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-hero-primary:hover {
    background-position: 100% 0;
    box-shadow: 
        0 6px 20px rgba(16, 185, 129, 0.35),
        0 12px 32px rgba(14, 165, 233, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-hero-primary:hover::before {
    opacity: 1;
}

.btn-hero-primary:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(16, 185, 129, 0.25),
        0 4px 12px rgba(14, 165, 233, 0.15);
}

.btn-hero-primary:focus-visible {
    outline: 3px solid rgba(16, 185, 129, 0.4);
    outline-offset: 3px;
}

/* Secondary CTA - Premium Ghost Style */
.btn-cta-secondary {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(226, 232, 240, 0.8);
    color: #0f172a;
    box-shadow: 
        0 2px 8px rgba(15, 23, 42, 0.06),
        0 4px 16px rgba(15, 23, 42, 0.04);
    position: relative;
}

.btn-cta-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(14, 165, 233, 0.05));
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-cta-secondary:hover {
    background: #ffffff;
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 
        0 4px 12px rgba(16, 185, 129, 0.12),
        0 8px 24px rgba(14, 165, 233, 0.08);
    transform: translateY(-2px);
}

.btn-cta-secondary:hover::before {
    opacity: 1;
}

.btn-cta-secondary:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 6px rgba(15, 23, 42, 0.06);
}

.btn-cta-secondary:focus-visible {
    outline: 3px solid rgba(16, 185, 129, 0.25);
    outline-offset: 3px;
}

/* Legacy Coral Button - Modernized Premium */
.btn-coral {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    background-size: 200% 200%;
    box-shadow: 
        0 4px 14px rgba(239, 68, 68, 0.25),
        0 8px 24px rgba(249, 115, 22, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.btn-coral::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-coral:hover {
    background-position: 100% 0;
    box-shadow: 
        0 6px 20px rgba(239, 68, 68, 0.35),
        0 12px 32px rgba(249, 115, 22, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-coral:hover::before {
    opacity: 1;
}

.btn-coral:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(239, 68, 68, 0.25),
        0 4px 12px rgba(249, 115, 22, 0.15);
}

.btn-coral:focus-visible {
    outline: 3px solid rgba(239, 68, 68, 0.4);
    outline-offset: 3px;
}

/* Animated Shine Effect - Premium */
.btn-animated {
    position: relative;
    overflow: hidden;
}

.btn-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-animated:hover::after {
    left: 100%;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .btn-cta,
    .btn-hero-primary,
    .btn-cta-secondary,
    .btn-coral,
    .btn-animated::after {
        transition: none !important;
        animation: none !important;
    }
    
    .btn-hero-primary:hover,
    .btn-cta-secondary:hover,
    .btn-coral:hover {
        transform: none !important;
    }
    
    .btn-animated::after {
        display: none !important;
    }
    .btn-cta,
    .btn-coral,
    .btn-cta-secondary,
    .btn-hero-primary {
        transition: none !important;
    }
}

/* Only apply hover transforms on hover-capable devices */
@media (hover: hover) and (pointer: fine) {
    .btn-cta:hover {
        transform: translateY(-1px);
    }
}

/* Background Colors */
.bg-cream {
    background-color: #F7F4ED;
}

/* Text Colors */
.text-coral-primary {
    color: #E67E73;
}

.text-coral-secondary {
    color: #E6A57E;
}

.bg-coral-solid {
    background-color: #E67E73;
}

/* Animations */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

.animation-delay-600 {
    animation-delay: 600ms;
}

.animation-delay-800 {
    animation-delay: 800ms;
}

/* Input Enhanced */
.input-enhanced {
    transition: all 0.2s ease;
}

.input-enhanced:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ============================
   Análisis Visual (Dashboard)
   ============================ */

/* Área de trabajo: fondo distinto del resto del dashboard para anclar filtros + resultados */
.analysis-workspace {
    background: linear-gradient(165deg, #eef2ff 0%, #f1f5f9 38%, #f8fafc 100%);
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    padding: 12px clamp(10px, 1.8vw, 16px) 14px;
    margin-bottom: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.analysis-toolbar {
    position: sticky;
    top: 10px;
    z-index: 5;
    margin-bottom: 10px;
}

/* Barra compacta en dos bloques: contexto/resumen vs cohorte (filtros) */
.analysis-toolbar--compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
}

.analysis-toolbar__card {
    border-radius: 12px;
    padding: 10px 12px;
}

.analysis-toolbar__card--context {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.analysis-toolbar__card--filters {
    background: linear-gradient(180deg, #ecfdf5 0%, #f0fdfa 55%, #ffffff 100%);
    border: 1px solid #99f6e4;
    border-left: 4px solid #14b8a6;
    box-shadow: 0 2px 10px rgba(20, 184, 166, 0.12);
}

.analysis-toolbar__filters-eyebrow {
    margin: 0 0 6px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0f766e;
}

.analysis-toolbar__card--context .analysis-stat-chip {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.analysis-toolbar__card--filters .analysis-filters--compact {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.analysis-toolbar__card--filters .analysis-filter label {
    color: #115e59;
}

.analysis-toolbar__card--filters .analysis-select {
    background: #ffffff;
    border-color: #a7f3d0;
}

.analysis-toolbar__card--filters .analysis-select:hover {
    border-color: #5eead4;
}

.analysis-toolbar__main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.analysis-toolbar__head {
    min-width: min(100%, 200px);
    flex: 1 1 200px;
}

.analysis-toolbar__heading {
    margin: 0;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.analysis-toolbar--compact .analysis-toolbar__subtitle {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
    font-weight: 500;
}

.analysis-toolbar__side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.analysis-stat-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-end;
}

.analysis-stat-chip {
    min-width: 76px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    animation: analysisChipIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.analysis-stat-chip--accent {
    border-color: #99f6e4;
    background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
}

.analysis-stat-chip--well {
    border-color: #a7f3d0;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.analysis-stat-chip--attention {
    border-color: #99f6e4;
    background: linear-gradient(180deg, #ccfbf1 0%, #ffffff 100%);
}

.analysis-stat-chip__k {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.analysis-stat-chip__v {
    font-size: 1.12rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

@keyframes analysisChipIn {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.analysis-panels-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

.analysis-toolbar__reset {
    padding: 5px 10px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.analysis-toolbar__reset:hover {
    border-color: #94a3b8;
    color: #0f172a;
    background: #f8fafc;
}

.analysis-filters--compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: flex-end;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.analysis-toolbar--compact .analysis-filter {
    flex: 1 1 140px;
    min-width: min(140px, 100%);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.analysis-toolbar--compact .analysis-filter label {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.analysis-toolbar--compact .analysis-filter abbr {
    text-decoration: none;
    cursor: help;
}

.analysis-toolbar--compact .analysis-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.analysis-toolbar--compact .analysis-select:hover {
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.analysis-toolbar--compact .analysis-select:focus {
    outline: none;
    border-color: #5eead4;
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.25);
}

/* Compatibilidad: layout antiguo (otras copias / HTML legacy) */
.analysis-toolbar__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.analysis-toolbar__title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 240px;
}

.analysis-toolbar__subtitle {
    margin: 0;
    color: #64748b;
    font-size: 0.92em;
    font-weight: 500;
}

.analysis-toolbar__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.analysis-metrics {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}

.analysis-metric {
    border: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 14px;
    padding: 10px 12px;
    min-width: 140px;
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.06);
}

.analysis-metric__label {
    color: #64748b;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.analysis-metric__value {
    color: #0f172a;
    font-size: 1.15em;
    font-weight: 800;
    margin-top: 4px;
}

.analysis-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.analysis-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.analysis-filter label {
    color: #475569;
    font-size: 0.85em;
    font-weight: 700;
}

.analysis-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(2, 6, 23, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.analysis-select:hover {
    border-color: #bae6fd;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.08);
}

.analysis-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 12px;
}

/* Rail de secciones: se separa del bloque de filtros y del lienzo de gráficos */
.analysis-subtabs--rail {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px 8px;
    margin: 4px 0 14px;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.analysis-subtab-btn {
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.analysis-subtab-btn:hover {
    border-color: #cbd5e1;
}

.analysis-subtab-btn.active {
    background: #ecfeff;
    border-color: #99f6e4;
}

.analysis-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* Paneles de resultados dentro de Análisis visual: lienzo claro frente al fondo del workspace */
#tab-analysis .analysis-panel {
    border-top: 3px solid #2dd4bf;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    border-color: #d1d5db;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

/* Bienestar en Análisis Visual: KPIs + rejilla de gráficos */
.analysis-wellbeing-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.analysis-wellbeing-panel__head {
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 2px;
}

.analysis-wellbeing-panel__title {
    margin: 0;
    font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.analysis-wellbeing-panel__lead {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
}

.analysis-wellbeing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.wellbeing-chart-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.wellbeing-chart-card--animate {
    animation: wellbeingCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--chart-delay, 0ms);
}

@keyframes wellbeingCardIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.wellbeing-chart-card:hover {
    border-color: #99f6e4;
    box-shadow: 0 14px 32px rgba(13, 148, 136, 0.12);
    transform: translateY(-2px);
}

.wellbeing-chart-card__accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 88px;
    height: 88px;
    border-radius: 0 0 0 100%;
    opacity: 0.95;
    pointer-events: none;
}

.wellbeing-chart-card__accent--teal {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.28) 0%, rgba(45, 212, 191, 0.05) 100%);
}

.wellbeing-chart-card__accent--green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.24) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.wellbeing-chart-card__accent--indigo {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.wellbeing-chart-card__body {
    position: relative;
    z-index: 1;
    padding: 16px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
}

.wellbeing-chart-card__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wellbeing-chart-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.015em;
}

.wellbeing-chart-card__desc {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
}

.wellbeing-chart-card__canvas {
    width: 100% !important;
    height: 260px !important;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%);
    border: 1px solid #eef2f7;
}

.wellbeing-chart-card__body {
    position: relative;
    z-index: 1;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100%;
}

.wellbeing-chart-card__header {
    text-align: left;
}

.wellbeing-chart-card__title {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.wellbeing-chart-card__desc {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #64748b;
}

.wellbeing-chart-card__canvas {
    width: 100%;
    max-height: 280px;
    display: block;
}

.wellbeing-chart-card--span2 {
    grid-column: span 2;
}

/* Segmentación en Análisis Visual */
.analysis-segmentation-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.analysis-segmentation-panel__head {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 4px;
}

.analysis-segmentation-panel__title {
    margin: 0;
    font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.analysis-segmentation-panel__subtitle {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.84rem;
}

.analysis-segmentation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.seg-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.seg-card__header {
    margin-bottom: 10px;
}

.seg-card__title {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 800;
    color: #0f172a;
}

.seg-card__desc {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.seg-card__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.seg-kpi {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
    min-width: 0;
}

.seg-kpi__k {
    display: block;
    color: #64748b;
    font-size: 0.73rem;
    margin-bottom: 3px;
}

.seg-kpi__v {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seg-card__canvas {
    width: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.seg-legend {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.seg-legend-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.seg-legend-item__left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.seg-legend-item__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

.seg-legend-item__name {
    font-size: 0.83rem;
    font-weight: 700;
    color: #1e293b;
}

.seg-legend-item__meta {
    font-size: 0.79rem;
    color: #64748b;
}

.seg-legend-item__score {
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 3px 8px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.seg-bars {
    display: grid;
    gap: 10px;
}

.seg-bar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    gap: 8px;
}

.seg-bar__name {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1e293b;
}

.seg-bar__stats {
    font-size: 0.8rem;
    color: #64748b;
}

.seg-bar__track {
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.seg-bar__fill {
    height: 100%;
    border-radius: 999px;
}

.seg-bar__foot {
    margin-top: 4px;
    font-size: 0.78rem;
    color: #64748b;
}

.seg-bar__foot strong {
    color: #0f172a;
}

.seg-summary {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #475569;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
}

.seg-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Mensajes (Análisis Visual) sin canvas */
.analysis-html-bars {
    min-height: 200px;
}

.analysis-html-bars--closure {
    min-height: 220px;
}

.analysis-bars {
    display: grid;
    gap: 10px;
}

.analysis-bars__row {
    display: grid;
    gap: 5px;
}

.analysis-bars__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.analysis-bars__label {
    font-size: 0.83rem;
    font-weight: 700;
    color: #1f2937;
}

.analysis-bars__value {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.analysis-bars__track {
    height: 12px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.analysis-bars__fill {
    height: 100%;
    border-radius: 999px;
}

.analysis-bars-empty {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

@media (max-width: 960px) {
    .analysis-wellbeing-grid {
        grid-template-columns: 1fr;
    }
    .wellbeing-chart-card--span2 {
        grid-column: span 1;
    }
    .analysis-segmentation-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .seg-card__meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .analysis-filters {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 640px) {
    .analysis-toolbar {
        top: 6px;
    }
    .analysis-workspace {
        padding: 10px;
        border-radius: 14px;
    }
    .analysis-filters {
        grid-template-columns: 1fr;
    }
    .analysis-metric {
        min-width: 140px;
        flex: 1;
    }
    .analysis-toolbar__side {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ============================
   Valores socioemocionales PSA
   ============================ */

.ev-psa-workspace {
    background: linear-gradient(165deg, #f0fdfa 0%, #f8fafc 40%, #ffffff 100%);
    border: 1px solid #d1fae5;
    border-radius: 18px;
    padding: clamp(14px, 2vw, 22px);
    margin-bottom: 6px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.ev-psa-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.ev-psa-hero__eyebrow {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f766e;
}

.ev-psa-hero__title {
    margin: 0;
    font-size: clamp(1.2rem, 1.05rem + 0.45vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a;
}

.ev-psa-hero__lead {
    margin: 6px 0 0;
    max-width: 52ch;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #64748b;
}

.ev-psa-hero__hint {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f766e;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    padding: 6px 12px;
}

.ev-psa-hero__hint:empty {
    display: none;
}

.ev-psa-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ev-psa-marco-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.ev-psa-marco-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ev-psa-axis-card {
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 14px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: psaCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ev-psa-axis-card--global {
    background: linear-gradient(160deg, #eef2ff 0%, #ffffff 70%);
    border-color: #c7d2fe;
}
.ev-psa-axis-card--pensar {
    background: linear-gradient(160deg, #eef2ff 0%, #ffffff 70%);
    border-color: #ddd6fe;
}
.ev-psa-axis-card--sentir {
    background: linear-gradient(160deg, #ecfdf5 0%, #ffffff 70%);
    border-color: #a7f3d0;
}
.ev-psa-axis-card--actuar {
    background: linear-gradient(160deg, #fff7ed 0%, #ffffff 70%);
    border-color: #fed7aa;
}

.ev-psa-axis-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.ev-psa-axis-card strong { font-size: 0.9rem; color: #0f172a; }
.ev-psa-axis-card__top span { font-size: 0.75rem; color: #64748b; font-weight: 600; }
.ev-psa-axis-card__value {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1;
}
.ev-psa-axis-card--global .ev-psa-axis-card__value { color: #312e81; }
.ev-psa-axis-card--pensar .ev-psa-axis-card__value { color: #4338ca; }
.ev-psa-axis-card--sentir .ev-psa-axis-card__value { color: #047857; }
.ev-psa-axis-card--actuar .ev-psa-axis-card__value { color: #b45309; }

.ev-psa-axis-card__bar {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}
.ev-psa-axis-card__bar > div {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.ev-psa-axis-card--global .ev-psa-axis-card__bar { background: #e0e7ff; }
.ev-psa-axis-card--global .ev-psa-axis-card__bar > div { background: linear-gradient(90deg, #6366f1, #4f46e5); }
.ev-psa-axis-card--pensar .ev-psa-axis-card__bar { background: #e0e7ff; }
.ev-psa-axis-card--pensar .ev-psa-axis-card__bar > div { background: linear-gradient(90deg, #6366f1, #4338ca); }
.ev-psa-axis-card--sentir .ev-psa-axis-card__bar { background: #d1fae5; }
.ev-psa-axis-card--sentir .ev-psa-axis-card__bar > div { background: linear-gradient(90deg, #10b981, #047857); }
.ev-psa-axis-card--actuar .ev-psa-axis-card__bar { background: #ffedd5; }
.ev-psa-axis-card--actuar .ev-psa-axis-card__bar > div { background: linear-gradient(90deg, #f59e0b, #b45309); }

.ev-psa-macro-block,
.ev-psa-micro-block {
    display: grid;
    gap: 12px;
}
.ev-psa-micro-block { display: none; }

.ev-psa-block-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.ev-psa-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

#tab-emotional .ev-psa-metric-grid .emotional-value-card {
    border-radius: 14px !important;
    padding: 14px !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05) !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    animation: psaCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#tab-emotional .ev-psa-metric-grid .emotional-value-card:nth-child(1) { animation-delay: 40ms; }
#tab-emotional .ev-psa-metric-grid .emotional-value-card:nth-child(2) { animation-delay: 80ms; }
#tab-emotional .ev-psa-metric-grid .emotional-value-card:nth-child(3) { animation-delay: 120ms; }
#tab-emotional .ev-psa-metric-grid .emotional-value-card:nth-child(4) { animation-delay: 160ms; }
#tab-emotional .ev-psa-metric-grid .emotional-value-card:nth-child(5) { animation-delay: 200ms; }
#tab-emotional .ev-psa-metric-grid .emotional-value-card:nth-child(6) { animation-delay: 240ms; }
#tab-emotional .ev-psa-metric-grid .emotional-value-card:nth-child(7) { animation-delay: 280ms; }
#tab-emotional .ev-psa-metric-grid .emotional-value-card:nth-child(8) { animation-delay: 320ms; }
#tab-emotional .ev-psa-metric-grid .emotional-value-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}
#tab-emotional .ev-psa-metric-grid .emotional-value-card h4 {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}
#tab-emotional .ev-psa-metric-grid .emotional-value-card p { color: #64748b !important; }
#tab-emotional .emotional-values-section { margin-top: 0; margin-bottom: 0; }
#tab-emotional .ev-psa-metric-grid [id$="Value"] { letter-spacing: -0.02em; margin-top: 4px !important; }

@keyframes psaCardIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ev-psa-evolution { margin-top: 4px; display: grid; gap: 10px; }

@media (max-width: 900px) {
    .ev-psa-marco-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .ev-psa-marco-grid { grid-template-columns: 1fr; }
    .ev-psa-metric-grid { grid-template-columns: 1fr; }
    .ev-psa-workspace { padding: 12px; border-radius: 14px; }
}

/* ============================================
   RESUMEN - Dashboard Summary Section
   ============================================ */

/* Encabezado del RESUMEN */
#tab-summary .summary-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

#tab-summary .summary-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#tab-summary .summary-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

#tab-summary .summary-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Grid de estadísticas */
#tab-summary .summary-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    margin-bottom: 3rem !important;
}

/* Tarjetas de estadísticas - Diseño Premium */
#tab-summary .summary-stat-card {
    position: relative !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 24px !important;
    padding: 2rem !important;
    overflow: hidden !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    cursor: pointer !important;
    animation: cardFadeIn 0.6s ease-out backwards !important;
    will-change: transform, box-shadow !important;
}

#tab-summary .summary-stat-card:nth-child(1) { animation-delay: 0.1s; }
#tab-summary .summary-stat-card:nth-child(2) { animation-delay: 0.2s; }
#tab-summary .summary-stat-card:nth-child(3) { animation-delay: 0.3s; }
#tab-summary .summary-stat-card:nth-child(4) { animation-delay: 0.4s; }
#tab-summary .summary-stat-card:nth-child(5) { animation-delay: 0.5s; }
#tab-summary .summary-stat-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Efecto de brillo superior */
#tab-summary .summary-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.6s ease;
    z-index: 2;
}

#tab-summary .summary-stat-card:hover::before {
    left: 100%;
}

/* Borde superior animado */
#tab-summary .summary-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

#tab-summary .summary-stat-card:hover::after {
    opacity: 1;
}

/* Hover mejorado */
#tab-summary .summary-stat-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    border-color: #cbd5e1 !important;
}

/* Fondo decorativo mejorado */
#tab-summary .summary-stat-card-bg {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    border-radius: 50%;
    opacity: 0.06;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(40px);
}

#tab-summary .summary-stat-card:hover .summary-stat-card-bg {
    opacity: 0.15;
    transform: scale(1.2);
    filter: blur(30px);
}

/* Colores de tarjetas con mayor especificidad */
#tab-summary .summary-stat-card-primary .summary-stat-card-bg {
    background: radial-gradient(circle, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%) !important;
}

#tab-summary .summary-stat-card-primary::after {
    color: #3b82f6 !important;
}

#tab-summary .summary-stat-card-success .summary-stat-card-bg {
    background: radial-gradient(circle, #10b981 0%, #059669 50%, #047857 100%) !important;
}

#tab-summary .summary-stat-card-success::after {
    color: #10b981 !important;
}

#tab-summary .summary-stat-card-warning .summary-stat-card-bg {
    background: radial-gradient(circle, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
}

#tab-summary .summary-stat-card-warning::after {
    color: #f59e0b !important;
}

#tab-summary .summary-stat-card-teal .summary-stat-card-bg {
    background: radial-gradient(circle, #14b8a6 0%, #0d9488 50%, #0f766e 100%) !important;
}

#tab-summary .summary-stat-card-teal::after {
    color: #14b8a6 !important;
}

#tab-summary .summary-stat-card-purple .summary-stat-card-bg {
    background: radial-gradient(circle, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%) !important;
}

#tab-summary .summary-stat-card-purple::after {
    color: #8b5cf6 !important;
}

#tab-summary .summary-stat-card-pink .summary-stat-card-bg {
    background: radial-gradient(circle, #ec4899 0%, #db2777 50%, #be185d 100%) !important;
}

#tab-summary .summary-stat-card-pink::after {
    color: #ec4899 !important;
}

/* Contenido de tarjetas */
#tab-summary .summary-stat-card-content {
    position: relative !important;
    z-index: 3 !important;
}

#tab-summary .summary-stat-header {
    display: flex !important;
    align-items: center !important;
    gap: 0.875rem !important;
    margin-bottom: 1.5rem !important;
}

/* Iconos mejorados con efectos premium */
#tab-summary .summary-stat-icon {
    width: 3.5rem !important;
    height: 3.5rem !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.12),
        0 4px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
}

#tab-summary .summary-stat-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

#tab-summary .summary-stat-card:hover .summary-stat-icon::before {
    animation: iconShine 1.5s ease-in-out;
}

@keyframes iconShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

#tab-summary .summary-stat-card:hover .summary-stat-icon {
    transform: scale(1.15) rotate(8deg) translateY(-2px) !important;
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.18),
        0 6px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

#tab-summary .summary-stat-icon-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%) !important;
    color: #ffffff !important;
}

#tab-summary .summary-stat-icon-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
    color: #ffffff !important;
}

#tab-summary .summary-stat-icon-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
    color: #ffffff !important;
}

#tab-summary .summary-stat-icon-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 50%, #0f766e 100%) !important;
    color: #ffffff !important;
}

#tab-summary .summary-stat-icon-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%) !important;
    color: #ffffff !important;
}

#tab-summary .summary-stat-icon-pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 50%, #be185d 100%) !important;
    color: #ffffff !important;
}

#tab-summary .summary-stat-label {
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    transition: color 0.3s ease !important;
}

#tab-summary .summary-stat-card:hover .summary-stat-label {
    color: #0f172a !important;
}

#tab-summary .summary-stat-value-wrapper {
    margin-top: 0.5rem !important;
    position: relative !important;
}

/* Valores numéricos con efectos premium */
#tab-summary .summary-stat-value {
    font-size: 3rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    margin-bottom: 0.5rem !important;
    letter-spacing: -0.04em !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: #0f172a !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: currentColor !important;
    text-shadow: none !important;
    background-size: 200% 200% !important;
    animation: gradient-shift 4s ease infinite !important;
    position: relative !important;
    transition: transform 0.3s ease !important;
}

#tab-summary .summary-stat-card:hover .summary-stat-value {
    transform: scale(1.05) !important;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

#tab-summary .summary-stat-value-blue {
    color: #2563eb !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 30%, #1d4ed8 60%, #2563eb 100%) !important;
}

#tab-summary .summary-stat-value-green {
    color: #059669 !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 30%, #047857 60%, #059669 100%) !important;
}

#tab-summary .summary-stat-value-amber {
    color: #d97706 !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 30%, #b45309 60%, #d97706 100%) !important;
}

#tab-summary .summary-stat-value-teal {
    color: #0d9488 !important;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 30%, #0f766e 60%, #0d9488 100%) !important;
}

#tab-summary .summary-stat-value-purple {
    color: #7c3aed !important;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 30%, #6d28d9 60%, #7c3aed 100%) !important;
}

#tab-summary .summary-stat-value-pink {
    color: #db2777 !important;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 30%, #be185d 60%, #db2777 100%) !important;
}


#tab-summary .summary-stat-meta {
    font-size: 0.8125rem !important;
    color: #64748b !important;
    margin: 0.5rem 0 0 0 !important;
    line-height: 1.4 !important;
    transition: color 0.3s ease !important;
}

#tab-summary .summary-stat-card:hover .summary-stat-meta {
    color: #475569 !important;
}

/* Sección de Recursos de Acción */
.summary-actions-section {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid #e5e7eb;
}

.summary-actions-header {
    margin-bottom: 1.75rem;
}

.summary-actions-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.summary-actions-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Mejoras a action-resources-grid */
.action-resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.action-resource-card {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.action-resource-card:hover::before {
    opacity: 1;
}

.action-resource-card.critical {
    border-left-color: #4f46e5;
}

.action-resource-card.critical::before {
    color: #4f46e5;
}

.action-resource-card.moderate {
    border-left-color: #0284c7;
}

.action-resource-card.moderate::before {
    color: #0284c7;
}

.action-resource-card.optimal {
    border-left-color: #10b981;
}

.action-resource-card.optimal::before {
    color: #10b981;
}

.action-resource-card.no-data {
    border-left-color: #94a3b8;
}

.action-resource-card.no-data::before {
    color: #94a3b8;
}

.action-resource-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
}

.action-resource-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.action-resource-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}

.action-resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.action-resource-list li {
    padding: 0.625rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.6;
    transition: color 0.2s ease;
}

.action-resource-list li:hover {
    color: #1e293b;
}

.action-resource-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #94a3b8;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.action-resource-list li:hover::before {
    color: #64748b;
    transform: translateX(2px);
}

.action-resource-count {
    display: inline-block;
    background: #f1f5f9;
    color: #1e293b;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

.action-resource-card.critical .action-resource-count {
    background: #e0e7ff;
    color: #4f46e5;
}

.action-resource-card.moderate .action-resource-count {
    background: #e0f2fe;
    color: #0284c7;
}

.action-resource-card.optimal .action-resource-count {
    background: #d1fae5;
    color: #059669;
}

/* Responsive */
@media (max-width: 1024px) {
    #tab-summary .summary-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
        gap: 1.25rem !important;
    }
}

@media (max-width: 768px) {
    #tab-summary .summary-title {
        font-size: 1.5rem !important;
    }

    #tab-summary .summary-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    #tab-summary .summary-stat-card {
        padding: 1.5rem !important;
    }

    #tab-summary .summary-stat-value {
        font-size: 2.5rem !important;
    }

    #tab-summary .summary-stat-icon {
        width: 3rem !important;
        height: 3rem !important;
    }

    #tab-summary .action-resources-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #tab-summary .summary-stat-card,
    #tab-summary .summary-stat-icon,
    #tab-summary .summary-stat-value,
    #tab-summary .action-resource-card,
    #tab-summary .action-resource-list li::before {
        transition: none !important;
        animation: none !important;
    }
}

/* ===== Owner report preview UX ===== */
.owner-report-modal {
    align-items: center;
    justify-content: center;
}

.owner-report-workspace {
    width: min(99vw, 1500px);
    max-width: min(99vw, 1500px);
    max-height: 94vh;
    border-radius: 18px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.owner-report-workspace__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.owner-report-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.owner-report-workspace__title {
    margin: 0;
    color: #0f172a;
    font-size: 1.42rem;
    font-weight: 800;
}

.owner-report-workspace__subtitle {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.92rem;
}

.owner-report-workspace__header .modal-close {
    margin-left: auto;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    font-size: 1.55rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.owner-report-workspace__body {
    padding: 14px;
    max-height: calc(94vh - 88px);
    overflow-y: auto;
}

.owner-report-layout {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    min-height: calc(94vh - 130px);
}

.owner-report-config {
    display: grid;
    gap: 12px;
    max-height: calc(94vh - 130px);
    overflow-y: auto;
    padding-right: 4px;
}

.owner-report-operator,
.owner-report-builder,
.owner-report-preview-shell--wide {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.owner-report-operator {
    padding: 14px;
    display: grid;
    gap: 8px;
}

.owner-report-operator__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.owner-report-operator__label {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.owner-report-operator__value {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: right;
}

.owner-report-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.owner-report-tag {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.owner-report-tag--green { background: #dcfce7; color: #166534; border-color: #86efac; }
.owner-report-tag--blue { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.owner-report-tag--purple { background: #f3e8ff; color: #7e22ce; border-color: #d8b4fe; }

.owner-report-builder {
    padding: 14px;
}

.owner-report-builder__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.owner-report-builder__title {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.owner-report-builder__badge {
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid #bae6fd;
    background: #ecfeff;
    color: #0f766e;
    font-size: 0.74rem;
    font-weight: 700;
}

.owner-report-block {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.owner-report-block__title {
    margin: 0 0 8px;
    font-size: 0.86rem;
    font-weight: 800;
    color: #334155;
}

.owner-report-grid {
    display: grid;
    gap: 8px;
}

.owner-report-grid--single {
    grid-template-columns: 1fr;
}

.owner-report-field {
    display: grid;
    gap: 5px;
}

.owner-report-field label {
    color: #475569;
    font-size: 0.81rem;
    font-weight: 700;
}

.owner-report-control {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.owner-report-control:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

.owner-report-control--textarea {
    min-height: 88px;
    resize: vertical;
    line-height: 1.5;
}

.owner-report-context-hint {
    margin: 8px 0 10px;
    padding: 9px 10px;
    border-radius: 9px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.83rem;
    line-height: 1.45;
}

.owner-report-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.owner-report-preview-shell {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.owner-report-preview-shell--wide {
    padding: 14px;
    min-height: calc(94vh - 132px);
    max-height: calc(94vh - 132px);
    overflow-y: auto;
}

.owner-report-preview-shell--sticky {
    position: sticky;
    top: 0;
}

.owner-report-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.owner-report-preview-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 800;
}

.owner-report-preview-header span {
    padding: 5px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
}

.owner-report-warning {
    margin: 0 0 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #7c2d12;
    font-size: 0.84rem;
    line-height: 1.45;
}

.owner-report-output {
    background: #f8fafc;
    border-style: solid !important;
}

.owner-report-output--large {
    min-height: 560px;
    padding: 14px;
    border-radius: 10px;
    color: #334155;
    line-height: 1.6;
    font-size: 0.95rem;
}

.owner-report-preview {
    display: grid;
    gap: 12px;
    animation: fadeIn 0.25s ease-out;
}

.owner-report-preview__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.owner-report-preview__meta > div {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.82rem;
    line-height: 1.2;
}

.owner-report-preview__kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.owner-report-preview__kpi {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    display: grid;
    gap: 4px;
}

.owner-report-preview__kpi span {
    color: #64748b;
    font-size: 0.8rem;
}

.owner-report-preview__kpi strong {
    color: #0f172a;
    font-size: 1.1rem;
    line-height: 1.2;
}

@media (max-width: 700px) {
    .owner-report-layout {
        grid-template-columns: 1fr;
    }
    .owner-report-config {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
    .owner-report-preview-shell--sticky {
        position: static;
    }
    .owner-report-preview-shell--wide {
        min-height: 420px;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 700px) {
    .owner-report-workspace {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    .owner-report-workspace__header {
        padding: 14px;
    }
    .owner-report-workspace__body {
        padding: 10px;
        max-height: calc(100vh - 76px);
    }
    .owner-report-workspace__title {
        font-size: 1.18rem;
    }
    .owner-report-actions .btn-primary,
    .owner-report-actions .btn-secondary {
        width: 100%;
    }
    .owner-report-output--large {
        min-height: 320px;
    }
}

/* ===== Hotfix fuerte: workspace informes (alta prioridad) ===== */
#ownerProfileWorkspaceModal.owner-report-modal {
    align-items: center !important;
    justify-content: center !important;
}

#ownerProfileWorkspaceModal .owner-report-workspace {
    width: min(97vw, 1500px) !important;
    max-width: min(97vw, 1500px) !important;
    max-height: 94vh !important;
    margin: 2vh auto !important;
    padding: 0 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #f8fafc !important;
    font-size: 16px !important;
}

#ownerProfileWorkspaceModal .owner-report-workspace__body {
    padding: 18px !important;
    max-height: calc(94vh - 88px) !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    gap: 10px !important;
}

#ownerProfileWorkspaceModal .owner-report-global-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 0 4px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

#ownerProfileWorkspaceModal .owner-report-workspace__header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding: 20px 82px 16px 22px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    position: relative !important;
}

#ownerProfileWorkspaceModal .owner-report-header-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-left: auto !important;
}

#ownerProfileWorkspaceModal .owner-report-header-generate-btn {
    margin-left: auto !important;
    margin-right: 12px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    border-radius: 9px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

#ownerProfileWorkspaceModal .owner-report-workspace__title {
    margin: 0 !important;
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

#ownerProfileWorkspaceModal .owner-report-workspace__subtitle {
    margin: 8px 0 0 !important;
    font-size: 1rem !important;
    color: #475569 !important;
    line-height: 1.45 !important;
}

#ownerProfileWorkspaceModal .owner-report-layout {
    display: grid !important;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr) !important;
    gap: 18px !important;
    align-items: start !important;
    min-height: calc(94vh - 130px) !important;
}

#ownerProfileWorkspaceModal .owner-report-config {
    max-height: calc(94vh - 130px) !important;
    overflow-y: auto !important;
    padding-right: 4px !important;
}

#ownerProfileWorkspaceModal .owner-report-builder,
#ownerProfileWorkspaceModal .owner-report-operator,
#ownerProfileWorkspaceModal .owner-report-preview-shell--wide {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
}

#ownerProfileWorkspaceModal .owner-report-operator,
#ownerProfileWorkspaceModal .owner-report-builder,
#ownerProfileWorkspaceModal .owner-report-preview-shell--wide {
    padding: 16px !important;
}

#ownerProfileWorkspaceModal .owner-report-builder__title,
#ownerProfileWorkspaceModal .owner-report-preview-header h3 {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
}

#ownerProfileWorkspaceModal .owner-report-operator__label,
#ownerProfileWorkspaceModal .owner-report-field label,
#ownerProfileWorkspaceModal .owner-report-block__title {
    font-size: 0.95rem !important;
}

#ownerProfileWorkspaceModal .owner-report-operator__value,
#ownerProfileWorkspaceModal .owner-report-context-hint,
#ownerProfileWorkspaceModal .owner-report-warning {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

#ownerProfileWorkspaceModal .owner-report-block {
    padding: 12px !important;
    margin-bottom: 12px !important;
}

#ownerProfileWorkspaceModal .owner-report-preview-shell--wide {
    min-height: calc(94vh - 132px) !important;
    max-height: calc(94vh - 132px) !important;
    overflow-y: auto !important;
}

#ownerProfileWorkspaceModal .owner-report-output--large {
    min-height: 360px !important;
    font-size: 1rem !important;
    line-height: 1.65 !important;
    padding: 16px !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
}

#ownerProfileWorkspaceModal .owner-report-workspace__header .modal-close {
    width: 34px !important;
    height: 34px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 0 !important;
    font-size: 1.7rem !important;
    line-height: 1 !important;
    color: #334155 !important;
    background: #ffffff !important;
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 2 !important;
}

@media (max-width: 700px) {
    #ownerProfileWorkspaceModal .owner-report-layout {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }
    #ownerProfileWorkspaceModal .owner-report-config {
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }
    #ownerProfileWorkspaceModal .owner-report-preview-shell--wide {
        min-height: 420px !important;
        max-height: none !important;
        overflow: visible !important;
    }
    #ownerProfileWorkspaceModal .owner-report-global-actions {
        grid-template-columns: 1fr;
    }
    #ownerProfileWorkspaceModal .owner-report-header-actions {
        margin-left: 8px !important;
    }
}

/* =============================================================================
   Vista Recursos — contenedor ARC: lectura holgada, texto íntegro
   ============================================================================= */
.action-resources-section--arc {
    margin-top: 1rem;
}

/* Intro estática (index): recursos de orientación */
.welcome-section--resources-showcase {
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 0;
}

.welcome-section--resources-showcase h2 {
    font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: #0f172a;
    margin: 0 0 0.45rem;
}

.welcome-section--resources-showcase__teaser {
    margin: 0 0 0.5rem;
    font-size: 0.94rem;
    line-height: 1.45;
    color: #475569;
}

.welcome-section--resources-showcase__details {
    margin: 0;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.65);
}

.welcome-section--resources-showcase__summary {
    cursor: pointer;
    list-style: none;
    padding: 0.55rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.welcome-section--resources-showcase__summary::-webkit-details-marker {
    display: none;
}

.welcome-section--resources-showcase__hint {
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.78rem;
}

.welcome-section--resources-showcase__details-panel {
    padding: 0 0.95rem 0.85rem;
    border-top: 1px dashed rgba(203, 213, 225, 0.9);
}

.welcome-section--resources-showcase__details[open] {
    background: rgba(255, 255, 255, 0.72);
}

.welcome-section--resources-showcase__details[open] .welcome-section--resources-showcase__summary {
    color: #0f172a;
}

.welcome-section--resources-showcase__lead {
    margin: 0.65rem 0 0.85rem;
    font-size: 1.02rem;
    line-height: 1.58;
    color: #334155;
}

.welcome-section--resources-showcase__meta {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #475569;
    padding: 0.95rem 1.1rem;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.action-resources-grid.action-resources-grid--arc {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    align-items: stretch;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.85rem;
}

/* Banda contextual: compacta + legal en <details> */
.arc-aggregate-banner {
    grid-column: 1 / -1;
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem 1.2rem 1.05rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    background:
        linear-gradient(125deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.98) 42%, rgba(236, 253, 245, 0.55) 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 18px 48px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.arc-aggregate-banner__glow {
    position: absolute;
    right: -18%;
    top: -60%;
    width: min(52vw, 380px);
    height: 200%;
    background: radial-gradient(ellipse at 40% 40%, rgba(45, 212, 191, 0.2) 0%, rgba(129, 140, 248, 0.08) 38%, transparent 62%);
    pointer-events: none;
}

.arc-aggregate-banner__mark {
    flex-shrink: 0;
    width: 2.5rem;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    color: #0f766e;
    filter: drop-shadow(0 2px 6px rgba(15, 118, 110, 0.2));
}

.arc-aggregate-banner__main {
    position: relative;
    z-index: 1;
    min-width: 0;
    flex: 1;
}

.arc-aggregate-banner__kicker {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #0f766e;
    margin-bottom: 0.35rem;
}

.arc-aggregate-banner__teaser {
    margin: 0 0 0.45rem;
    font-size: 0.93rem;
    line-height: 1.45;
    color: #334155;
    max-width: 65ch;
}

.arc-aggregate-expand {
    margin: 0;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.45);
}

.arc-aggregate-expand__summary {
    cursor: pointer;
    list-style: none;
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.arc-aggregate-expand__summary::-webkit-details-marker {
    display: none;
}

.arc-aggregate-expand__hint {
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.72rem;
}

.arc-aggregate-expand__panel {
    padding: 0.55rem 0.7rem 0.7rem;
    border-top: 1px dashed rgba(203, 213, 225, 0.95);
}

.arc-aggregate-expand__panel .arc-aggregate-banner__lead {
    margin: 0 0 0.55rem;
}

.arc-aggregate-expand__panel .arc-aggregate-banner__evidence {
    margin: 0 0 0.65rem;
}

.arc-aggregate-expand__panel .arc-aggregate-details {
    margin-top: 0.15rem;
}

.arc-aggregate-expand[open] {
    background: rgba(255, 255, 255, 0.78);
}

.arc-aggregate-expand[open] .arc-aggregate-expand__summary {
    color: #0f172a;
}

.arc-aggregate-banner__lead {
    font-size: 1.02rem;
    line-height: 1.58;
    color: #1e293b;
    max-width: 68ch;
}

.arc-aggregate-banner__evidence {
    font-size: 0.98rem;
    line-height: 1.58;
    color: #334155;
    max-width: 70ch;
}

.arc-aggregate-details {
    margin: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(226, 232, 240, 0.85);
}

.arc-aggregate-details__summary {
    cursor: pointer;
    list-style: none;
    padding: 0.55rem 0.75rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.arc-aggregate-details__summary::-webkit-details-marker {
    display: none;
}

.arc-aggregate-details__hint {
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.72rem;
}

.arc-aggregate-details__panel {
    padding: 0 0.85rem 0.85rem;
    border-top: 1px dashed rgba(203, 213, 225, 0.95);
}

.arc-aggregate-details__panel p {
    margin: 0.55rem 0 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #475569;
}

.arc-aggregate-details[open] {
    background: rgba(255, 255, 255, 0.88);
}

.arc-aggregate-details[open] .arc-aggregate-details__summary {
    color: #0f172a;
}

/* Tarjetas */
.arc-card {
    position: relative;
    border-radius: 22px;
    padding: 1.1rem 1.25rem 1.05rem;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 14px 36px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.25s ease;
}

.arc-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 22px 52px rgba(15, 23, 42, 0.11);
    border-color: rgba(163, 201, 168, 0.45);
}

.arc-card__sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 48%, transparent 62%);
    opacity: 0;
    transform: translateX(-18%);
    transition: opacity 0.45s ease, transform 0.6s ease;
    pointer-events: none;
}

.arc-card:hover .arc-card__sheen {
    opacity: 0.55;
    transform: translateX(18%);
}

.arc-card__accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    border-radius: 22px 0 0 22px;
}

.arc-card--critical .arc-card__accent {
    background: linear-gradient(180deg, #6366f1, #a855f7);
}

.arc-card--moderate .arc-card__accent {
    background: linear-gradient(180deg, #0ea5e9, #22d3ee);
}

.arc-card--optimal .arc-card__accent {
    background: linear-gradient(180deg, #10b981, #6ee7b7);
}

.arc-card--no-data .arc-card__accent {
    background: linear-gradient(180deg, #94a3b8, #cbd5e1);
}

.arc-card--default .arc-card__accent {
    background: linear-gradient(180deg, #94a3b8, #cbd5e1);
}

.arc-card__head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.65rem 0.85rem;
    align-items: center;
    padding-left: 0.35rem;
    margin-bottom: 0.55rem;
}

.arc-card__icon {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.9));
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.arc-card__titles {
    min-width: 0;
}

.arc-card__title {
    margin: 0;
    font-size: clamp(1.02rem, 0.92rem + 0.35vw, 1.22rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.25;
}

.arc-card__sub {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.4;
}

.arc-card__stat {
    text-align: right;
    padding: 0.35rem 0.55rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(226, 232, 240, 0.95);
    min-width: 4.2rem;
}

.arc-card__stat-num {
    display: block;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1;
}

.arc-card__stat-lbl {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

/* Cuerpo + lista de pautas: texto completo, sin line-clamp */
.arc-card__body {
    padding-left: 0.35rem;
}

.arc-showcase-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.arc-showcase-list__item {
    position: relative;
    margin: 0;
    padding: 1.05rem 1.15rem 1.05rem 3.35rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.98);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.arc-showcase-list__item:hover {
    background: #ffffff;
    border-color: rgba(163, 201, 168, 0.5);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.arc-showcase-list__badge {
    position: absolute;
    left: 1.05rem;
    top: 1.05rem;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 900;
    color: #0f172a;
    background: linear-gradient(145deg, #e2e8f0, #f8fafc);
    border: 1px solid rgba(203, 213, 225, 0.95);
}

.arc-showcase-list__text {
    display: block;
    margin: 0;
    font-size: 1rem;
    line-height: 1.62;
    color: #334155;
}

.arc-card__footer {
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.arc-card__footnote {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #64748b;
    max-width: 68ch;
}

.arc-card__drawer {
    margin: 0;
}

.arc-card__drawer-summary {
    cursor: pointer;
    list-style: none;
    padding: 0.55rem 0.65rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: #334155;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.98);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.arc-card__drawer-summary::-webkit-details-marker {
    display: none;
}

.arc-card__drawer-hint {
    font-weight: 800;
    color: #64748b;
    font-size: 0.78rem;
}

.arc-card__drawer-summary:hover {
    background: #ffffff;
    border-color: rgba(163, 201, 168, 0.45);
}

.arc-card__drawer[open] .arc-card__drawer-summary {
    border-radius: 12px 12px 0 0;
    border-bottom-color: transparent;
}

.arc-card__drawer-panel {
    margin: 0;
    padding: 0.65rem 0.4rem 0.75rem 0.35rem;
    border: 1px solid rgba(226, 232, 240, 0.98);
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: rgba(255, 255, 255, 0.55);
    max-height: min(52vh, 26rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.arc-card__drawer-panel .arc-card__footer {
    margin-top: 1rem;
    padding-top: 0.95rem;
}

.arc-card__drawer-panel .arc-showcase-list {
    gap: 0.7rem;
}

.welcome-section--resources-showcase__summary:focus-visible,
.arc-aggregate-expand__summary:focus-visible,
.arc-card__drawer-summary:focus-visible,
.arc-aggregate-details__summary:focus-visible {
    outline: 2px solid rgba(45, 212, 191, 0.55);
    outline-offset: 2px;
}

.arc-empty {
    text-align: center;
    padding: 2.5rem 1.25rem;
    border-radius: 20px;
    border: 1px dashed rgba(148, 163, 184, 0.65);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), #ffffff);
}

.arc-empty__icon {
    font-size: 1.5rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.arc-empty__text {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-width: 520px) {
    .arc-card__head {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .arc-card__stat {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        gap: 0.75rem;
    }

    .arc-card__stat-num {
        font-size: 1.2rem;
    }
}

body.dark-mode .arc-aggregate-banner {
    border-color: rgba(71, 85, 105, 0.65);
    background: linear-gradient(125deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.95) 100%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

body.dark-mode .arc-aggregate-banner__lead,
body.dark-mode .arc-aggregate-banner__evidence,
body.dark-mode .arc-aggregate-details__panel p {
    color: #e2e8f0;
}

body.dark-mode .welcome-section--resources-showcase h2 {
    color: #f1f5f9;
}

body.dark-mode .welcome-section--resources-showcase__lead {
    color: #cbd5e1;
}

body.dark-mode .welcome-section--resources-showcase__meta {
    color: #cbd5e1;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.75) 100%);
    border-color: rgba(71, 85, 105, 0.75);
    box-shadow: none;
}

body.dark-mode .welcome-section--resources-showcase__teaser {
    color: #94a3b8;
}

body.dark-mode .welcome-section--resources-showcase__details {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(71, 85, 105, 0.75);
}

body.dark-mode .welcome-section--resources-showcase__summary {
    color: #e2e8f0;
}

body.dark-mode .welcome-section--resources-showcase__details[open] .welcome-section--resources-showcase__summary {
    color: #f8fafc;
}

body.dark-mode .arc-aggregate-banner__teaser {
    color: #cbd5e1;
}

body.dark-mode .arc-aggregate-expand {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(71, 85, 105, 0.75);
}

body.dark-mode .arc-aggregate-expand__summary {
    color: #cbd5e1;
}

body.dark-mode .arc-aggregate-expand[open] .arc-aggregate-expand__summary {
    color: #f1f5f9;
}

body.dark-mode .arc-aggregate-expand__panel {
    border-top-color: rgba(71, 85, 105, 0.55);
}

body.dark-mode .arc-aggregate-details {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(71, 85, 105, 0.75);
}

body.dark-mode .arc-card {
    background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
    border-color: rgba(71, 85, 105, 0.75);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

body.dark-mode .arc-card__title {
    color: #f1f5f9;
}

body.dark-mode .arc-card__sub {
    color: #94a3b8;
}

body.dark-mode .arc-card__icon {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9));
    border-color: rgba(71, 85, 105, 0.75);
}

body.dark-mode .arc-card__stat {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(71, 85, 105, 0.75);
}

body.dark-mode .arc-card__stat-num {
    color: #f8fafc;
}

body.dark-mode .arc-showcase-list__item {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(71, 85, 105, 0.65);
}

body.dark-mode .arc-showcase-list__item:hover {
    background: rgba(30, 41, 59, 0.65);
    border-color: rgba(100, 116, 139, 0.75);
}

body.dark-mode .arc-showcase-list__text {
    color: #e2e8f0;
}

body.dark-mode .arc-showcase-list__badge {
    background: linear-gradient(145deg, #334155, #1e293b);
    color: #e2e8f0;
    border-color: rgba(71, 85, 105, 0.75);
}

body.dark-mode .arc-card__footnote {
    color: #94a3b8;
}

body.dark-mode .arc-card__drawer-summary {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(71, 85, 105, 0.75);
}

body.dark-mode .arc-card__drawer-summary:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(100, 116, 139, 0.65);
}

body.dark-mode .arc-card__drawer-panel {
    background: rgba(15, 23, 42, 0.35);
    border-color: rgba(71, 85, 105, 0.75);
}

body.dark-mode .arc-card__drawer-hint {
    color: #94a3b8;
}

/* --- Docente: radar clima (alineado a tarjetas del panel) --- */
.docente-radar-shell {
    padding: 22px 22px 26px !important;
    border-radius: 22px !important;
    display: grid;
    gap: 1.1rem;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 52%, #fafafa 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.docente-radar-shell__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef2f7;
}

.docente-radar-shell__title {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.docente-radar-shell__badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.88rem;
    flex-shrink: 0;
}

.docente-radar-shell__body {
    display: grid;
    gap: 0.75rem;
}

.docente-radar-workspace-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 5px;
    border-radius: 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.docente-radar-workspace-tab {
    margin: 0;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.25;
    color: #64748b;
    background: transparent;
    border-radius: 11px;
    padding: 11px 10px;
    min-height: 44px;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.docente-radar-workspace-tab:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.45);
}

.docente-radar-workspace-tab.is-active {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.docente-radar-workspace-pane {
    display: none;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
}

.docente-radar-workspace-pane.is-active {
    display: flex;
}

.docente-radar-capture--workspace {
    gap: 0.85rem;
    padding-bottom: 0.35rem;
}

.docente-radar-card--registro {
    padding: 1.15rem 1.35rem 1.25rem;
}

.docente-radar-card--registro .docente-radar-card__head {
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
}

.docente-radar-capture {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 0.5rem;
}

.docente-radar-composition {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.docente-radar-composition--compact {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border-style: solid;
    border-color: #e2e8f0;
    box-shadow: none;
}

.docente-radar-composition__label {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.docente-radar-composition-band {
    display: flex;
    width: 100%;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    gap: 2px;
    background: #e2e8f0;
}

.docente-radar-composition-band__seg {
    flex-shrink: 1;
    height: 100%;
    transition: opacity 0.15s ease;
}

.docente-radar-composition-band__seg:hover {
    opacity: 0.88;
}

.docente-radar-composition-band__seg--empty {
    flex: 1 1 100% !important;
    min-width: 100%;
    background: #e2e8f0;
}

.docente-radar-composition__hint {
    margin: 0.45rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.45;
}

body.dark-mode .docente-radar-composition,
body.dark-mode .docente-radar-composition--compact {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(71, 85, 105, 0.75);
}

.docente-radar-period {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.docente-radar-period__field {
    flex: 1 1 260px;
    display: grid;
    gap: 0.45rem;
}

.docente-radar-period__label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.docente-radar-period__select {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.docente-radar-pill {
    display: inline-flex;
    align-items: center;
    align-self: center;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.docente-radar-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.docente-radar-stat {
    padding: 1.35rem 1.5rem;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.docente-radar-stat__kicker {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.docente-radar-stat__value {
    margin-top: 0.35rem;
    font-size: 2.35rem;
    font-weight: 900;
    line-height: 1.1;
    color: #0f172a;
}

.docente-radar-stat__meta {
    margin-top: 0.5rem;
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.45;
}

.docente-radar-stat__badge {
    margin-top: 0.65rem;
    display: inline-flex;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
}

/* Tablero radar clima (docente): resumen + tendencia */
.docente-radar-board {
    margin: 0;
}

.docente-radar-board__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

@media (max-width: 900px) {
    .docente-radar-board__grid {
        grid-template-columns: 1fr;
    }
}

.docente-radar-board__panel {
    padding: 1.25rem 1.35rem;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    min-width: 0;
}

.docente-radar-board__panel--trend {
    padding: 1.35rem 1.45rem;
}

.docente-radar-board__panel-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.docente-radar-board__panel-lead {
    margin: 0.4rem 0 0.85rem;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.55;
    max-width: 58ch;
}

.docente-radar-board__composition {
    margin-bottom: 1rem;
}

.docente-radar-board__quad {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (max-width: 520px) {
    .docente-radar-board__quad {
        grid-template-columns: 1fr;
    }
}

.docente-radar-board__metric {
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.docente-radar-board__metric-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.docente-radar-board__metric-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #334155;
    line-height: 1.35;
}

.docente-radar-board__metric-value {
    font-size: 0.95rem;
    font-weight: 900;
    white-space: nowrap;
}

.docente-radar-board__metric-bar {
    margin-top: 0.45rem;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.docente-radar-board__metric-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    min-width: 4px;
    transition: width 0.2s ease;
}

.docente-radar-board__metric-sub {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.docente-radar-board__svg {
    width: 100%;
    max-width: 100%;
    min-height: 120px;
    height: auto;
    display: block;
    border-radius: 12px;
}

.docente-radar-multiples {
    display: grid;
    gap: 0.75rem;
}

.docente-radar-multiple {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.5rem 0.6rem 0.45rem;
    background: #ffffff;
}

.docente-radar-multiple__head {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.3rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: #334155;
}

.docente-radar-multiple__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
    flex-shrink: 0;
}

.docente-radar-board__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
}

.docente-radar-board__legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.docente-radar-board__legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.docente-radar-board__empty {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.45;
}

.docente-radar-card {
    padding: 1.5rem 1.75rem;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.docente-radar-card__head {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.docente-radar-card__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.docente-radar-card__lead {
    margin: 0.45rem 0 0;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.55;
    max-width: 62ch;
}

.docente-radar-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
    .docente-radar-form-row {
        grid-template-columns: 1fr;
    }
}

.docente-radar-field label {
    display: grid;
    gap: 0.4rem;
}

.docente-radar-field span {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
}

.docente-radar-field input,
.docente-radar-field select,
.docente-radar-field textarea {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #0f172a;
    box-sizing: border-box;
}

.docente-radar-field textarea {
    min-height: 88px;
    resize: vertical;
}

.docente-radar-tones {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.docente-radar-tone {
    padding: 1.1rem 1.25rem;
    border-radius: 16px;
    display: grid;
    gap: 0.85rem;
}

.docente-radar-tone--well {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.docente-radar-tone--risk {
    background: #fff7ed;
    border: 1px solid #fdba74;
}

.docente-radar-tone__title {
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.docente-radar-tone--well .docente-radar-tone__title {
    color: #065f46;
}

.docente-radar-tone--risk .docente-radar-tone__title {
    color: #9a3412;
}

.docente-radar-tone__grid {
    display: grid;
    gap: 0.75rem;
}

.docente-radar-signal {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: grid;
    gap: 0.65rem;
}

.docente-radar-signal__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.docente-radar-signal__label span:first-child {
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    line-height: 1.3;
}

.docente-radar-signal__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

.docente-radar-signal__hint {
    margin: -0.2rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #64748b;
}

.docente-radar-emoji-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(36px, 1fr));
    gap: 0.45rem;
}

.docente-radar-emoji-row button {
    min-height: 44px;
    border-radius: 11px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.docente-radar-emoji-row button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.docente-radar-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.25rem;
}

.docente-radar-form-actions .btn-secondary {
    padding: 0.75rem 1.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    min-height: 48px;
}

.docente-radar-hint {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.45;
    max-width: 36rem;
}

.docente-radar-results .docente-radar-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.docente-radar-results__head-text {
    flex: 1 1 220px;
    min-width: 0;
}

.docente-radar-results__month {
    flex-shrink: 0;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.docente-radar-chip-block {
    margin-bottom: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    border: 1px solid #ede9fe;
    background: linear-gradient(135deg, #faf5ff 0%, #ffffff 100%);
}

.docente-radar-chip-block__label {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.55rem;
}

.docente-radar-chip-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.docente-radar-empty-hint {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.45;
}

.docente-radar-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
}

.docente-radar-totals {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.65rem;
}

.docente-radar-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.docente-radar-total-row--muted {
    opacity: 0.55;
}

.docente-radar-total-row__label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.docente-radar-total-row__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.docente-radar-total-row__value {
    font-size: 0.95rem;
    font-weight: 900;
    color: #0f172a;
    flex-shrink: 0;
}

.docente-radar-balance {
    margin-top: 1.15rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.docente-radar-balance__kicker {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.docente-radar-balance__sep {
    color: #cbd5e1;
}

.docente-radar-balance__total {
    margin-left: auto;
    font-size: 0.88rem;
    color: #64748b;
}

.docente-radar-balance__metric {
    font-size: 0.88rem;
    font-weight: 700;
}

.docente-radar-balance__metric--well {
    color: #065f46;
}

.docente-radar-balance__metric--risk {
    color: #9a3412;
}

.docente-radar-informe__head {
    border-bottom-color: #e0e7ff !important;
}

@media (max-width: 520px) {
    .docente-radar-results .docente-radar-card__head {
        flex-direction: column;
        align-items: stretch;
    }

    .docente-radar-results__month {
        align-self: flex-start;
    }
}

body.dark-mode .docente-radar-shell {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.88) 100%);
    border-color: rgba(71, 85, 105, 0.75);
}

body.dark-mode .docente-radar-shell__header {
    border-bottom-color: rgba(71, 85, 105, 0.65);
}

body.dark-mode .docente-radar-workspace-tabs {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(71, 85, 105, 0.75);
}

body.dark-mode .docente-radar-workspace-tab {
    color: #94a3b8;
}

body.dark-mode .docente-radar-workspace-tab:hover {
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.5);
}

body.dark-mode .docente-radar-workspace-tab.is-active {
    color: #f8fafc;
    background: rgba(30, 41, 59, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.docente-radar-informe {
    padding: 1.5rem 1.75rem 1.65rem;
    border-radius: 20px;
    border: 1px solid #c7d2fe;
    background: linear-gradient(180deg, #f8faff 0%, #ffffff 55%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.docente-radar-informe-share {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.docente-radar-informe-share__hint {
    margin: 0;
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.45;
}

.docente-radar-informe__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem 1.25rem;
    align-items: end;
}

@media (max-width: 640px) {
    .docente-radar-informe__grid {
        grid-template-columns: 1fr;
    }

    .docente-radar-informe__actions {
        justify-content: stretch;
    }

    .docente-radar-informe__btn {
        width: 100%;
        justify-content: center;
    }
}

.docente-radar-informe__full {
    grid-column: 1 / -1;
}

.docente-radar-informe label[for="docenteRadarInformeNotas"] {
    grid-column: 1 / -1;
}

.docente-radar-informe textarea {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 100px;
    max-height: 220px;
    resize: vertical;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
    font-family: inherit;
    color: #0f172a;
    box-sizing: border-box;
    background: #fafbfc;
}

.docente-radar-informe__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.docente-radar-informe__btn {
    padding: 0.75rem 1.35rem;
    min-height: 48px;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
    color: #fff;
    border: 1px solid #b91c1c;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.22);
    cursor: pointer;
}

.docente-radar-informe__btn--ghost {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    box-shadow: none;
}

.docente-radar-test {
    margin-top: 6px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    padding: 10px 12px;
    background: #f8fafc;
}

.docente-radar-test--pass {
    border-color: #86efac;
    background: #f0fdf4;
}

.docente-radar-test--fail {
    border-color: #fecaca;
    background: #fef2f2;
}

.docente-radar-test__title {
    margin: 0 0 4px;
    font-weight: 800;
    color: #0f172a;
}

.docente-radar-test__meta {
    margin: 0 0 8px;
    color: #475569;
    font-size: 0.9em;
}

.docente-radar-test__list {
    margin: 0;
    padding-left: 18px;
    color: #1e293b;
    display: grid;
    gap: 4px;
}

body.dark-mode .docente-radar-period,
body.dark-mode .docente-radar-stat,
body.dark-mode .docente-radar-card,
body.dark-mode .docente-radar-signal,
body.dark-mode .docente-radar-board__panel,
body.dark-mode .docente-radar-board__metric {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(71, 85, 105, 0.75);
}

body.dark-mode .docente-radar-card__title,
body.dark-mode .docente-radar-stat__value,
body.dark-mode .docente-radar-total-row__value,
body.dark-mode .docente-radar-board__panel-title {
    color: #f1f5f9;
}

body.dark-mode .docente-radar-card__lead,
body.dark-mode .docente-radar-hint,
body.dark-mode .docente-radar-stat__meta,
body.dark-mode .docente-radar-board__panel-lead,
body.dark-mode .docente-radar-board__metric-sub,
body.dark-mode .docente-radar-board__empty {
    color: #94a3b8;
}

body.dark-mode .docente-radar-board__metric-title,
body.dark-mode .docente-radar-board__legend {
    color: #cbd5e1;
}

body.dark-mode .docente-radar-signal__hint {
    color: #94a3b8;
}

body.dark-mode .docente-radar-board__svg rect:first-child {
    fill: rgba(15, 23, 42, 0.35);
}

body.dark-mode .docente-radar-field span {
    color: #e2e8f0;
}

body.dark-mode .docente-radar-field input,
body.dark-mode .docente-radar-field select,
body.dark-mode .docente-radar-field textarea,
body.dark-mode .docente-radar-informe textarea {
    background: rgba(15, 23, 42, 0.35);
    border-color: rgba(100, 116, 139, 0.65);
    color: #f8fafc;
}

body.dark-mode .docente-radar-informe {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.55) 55%);
    border-color: rgba(99, 102, 241, 0.45);
}

/* Lightbox: capturas informe docente / chat interno */
.institution-image-lightbox-modal {
    z-index: 1100;
    background-color: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(4px);
    overflow: auto;
    padding: 12px;
}

.institution-image-lightbox-modal__content {
    margin: 2vh auto;
    max-width: min(96vw, 1280px);
    width: 100%;
    max-height: none;
    padding: 16px 18px 18px;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.institution-image-lightbox-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.institution-image-lightbox-modal__title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.35;
    margin: 0;
    padding-right: 8px;
}

.institution-image-lightbox-modal__body {
    border-radius: 14px;
    background: #0f172a;
    overflow: auto;
    max-height: min(78vh, 900px);
    padding: 10px;
    text-align: center;
}

.institution-image-lightbox-modal__body img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

.institution-image-lightbox-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.institution-image-lightbox-modal__download {
    width: auto;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    font-weight: 700;
}

.orientation-docente-capture__preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    cursor: zoom-in;
}

.orientation-docente-capture__preview img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.orientation-docente-capture__hint {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
}

body.dark-mode .institution-image-lightbox-modal__content {
    background: rgba(30, 41, 59, 0.96);
    border: 1px solid rgba(71, 85, 105, 0.75);
}

body.dark-mode .institution-image-lightbox-modal__title {
    color: #f1f5f9;
}

/* ===== MVP UX: cabeceras workspace + lista estudiantes + flujo encuesta ===== */

.teacher-app-grid > .dashboard-main .workspace-header,
#docenteView.teacher-app-grid > .dashboard-main .workspace-header,
#directionView.teacher-app-grid > .dashboard-main .workspace-header {
    --ws-title-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.5rem);
    --ws-title-weight: 800;
    --ws-title-tracking: -0.02em;
    --ws-title-lh: 1.22;
    --ws-title-color: #0f172a;
    --ws-lead-size: clamp(0.84rem, 0.8rem + 0.2vw, 0.95rem);
    --ws-lead-lh: 1.5;
    --ws-lead-color: #475569;
    --ws-gap-title-lead: 0.4em;
    --ws-block-mb: clamp(14px, 2vw, 22px);
    --ws-block-pb: clamp(10px, 1.5vw, 14px);
}

.teacher-app-grid > .dashboard-main .workspace-header--hero {
    --ws-title-size: clamp(1.35rem, 1.15rem + 0.75vw, 1.75rem);
    --ws-lead-size: clamp(0.9rem, 0.86rem + 0.22vw, 1rem);
    --ws-block-mb: clamp(10px, 1.4vw, 16px);
}

.teacher-app-grid > .dashboard-main .workspace-header.workspace-header,
.teacher-app-grid > .dashboard-main .welcome-section.workspace-header,
#docenteView.teacher-app-grid > .dashboard-main .workspace-header,
#directionView.teacher-app-grid > .dashboard-main .workspace-header {
    margin-bottom: var(--ws-block-mb);
    padding-bottom: var(--ws-block-pb);
}

.teacher-app-grid > .dashboard-main .workspace-header__title,
.teacher-app-grid > .dashboard-main .workspace-header h2,
#docenteView.teacher-app-grid > .dashboard-main .workspace-header__title,
#directionView.teacher-app-grid > .dashboard-main .workspace-header__title {
    font-size: var(--ws-title-size);
    font-weight: var(--ws-title-weight);
    letter-spacing: var(--ws-title-tracking);
    line-height: var(--ws-title-lh);
    color: var(--ws-title-color);
    margin: 0 0 var(--ws-gap-title-lead);
    text-transform: none;
}

.teacher-app-grid > .dashboard-main .workspace-header__lead,
.teacher-app-grid > .dashboard-main .workspace-header p.workspace-header__lead,
#docenteView.teacher-app-grid > .dashboard-main .workspace-header__lead,
#directionView.teacher-app-grid > .dashboard-main .workspace-header__lead {
    font-size: var(--ws-lead-size);
    line-height: var(--ws-lead-lh);
    max-width: min(62ch, 100%);
    color: var(--ws-lead-color);
    margin: 0;
}

#teacherView.teacher-app-grid > .dashboard-main .workspace-header.mb-3,
#teacherStudentsView.teacher-app-grid > .dashboard-main .workspace-header {
    margin-bottom: clamp(0.55rem, 0.45rem + 0.45vw, 0.85rem);
}

.students-list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.students-list-toolbar h3 {
    margin: 0;
    font-size: clamp(0.95rem, 0.88rem + 0.35vw, 1.15rem);
    font-weight: 700;
    color: #0f172a;
}

.students-list-toolbar__filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.students-list-toolbar__search {
    padding: 10px 15px;
    border: 2px solid #e8eef5;
    border-radius: 8px;
    background: #ffffff;
    color: #1a2332;
    font-size: 0.95em;
    min-width: min(250px, 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.students-list-toolbar__search:focus {
    outline: none;
    border-color: #a3c9a8;
    box-shadow: 0 0 0 3px rgba(163, 201, 168, 0.2);
}

.students-list-toolbar__label {
    font-weight: 600;
    color: #1a2332;
    white-space: nowrap;
}

.students-list-toolbar__select {
    padding: 10px 15px;
    border: 2px solid #e8eef5;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    color: #1a2332;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-width: min(220px, 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    font-family: inherit;
}

.students-list-toolbar__select:focus {
    outline: none;
    border-color: #a3c9a8;
}

.students-list-toolbar__reset {
    padding: 10px 14px;
    border-radius: 10px;
}

.student-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid #e8eef5;
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.student-profile-btn:hover {
    border-color: #cde7f0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Flujo pregunta a pregunta (encuesta estudiante) */
body.survey-modal-open {
    overflow: hidden;
}

.survey-modal.modal {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(12, 28, 36, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1400;
    overflow: hidden;
}

.survey-modal__dialog.modal-content {
    width: min(680px, 100%);
    height: min(92vh, 760px);
    max-height: min(92vh, 760px);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(143, 196, 217, 0.28);
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(42, 169, 164, 0.08), transparent 50%),
        #ffffff;
    box-shadow: 0 28px 70px rgba(15, 35, 45, 0.28);
}

.survey-modal__header {
    flex-shrink: 0;
    padding: 14px 18px 10px;
    border-bottom: 1px solid #e8eef4;
}

.survey-modal__eyebrow {
    margin: 0 0 2px;
    color: #1f6f7c;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.survey-modal__title {
    margin: 0;
    color: #142536;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.survey-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 10px 16px 12px;
    display: flex;
    flex-direction: column;
}

.survey-nav {
    --survey-progress: 4%;
    --survey-position: 0%;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.survey-progress {
    flex-shrink: 0;
}

.survey-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.survey-progress-label {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 700;
}

.survey-progress-label strong {
    color: #0f766e;
    font-weight: 800;
}

.survey-progress-percent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0e7490;
    font-size: 0.76rem;
    font-weight: 800;
    transition: background 0.35s ease, color 0.35s ease;
}

.survey-progress.is-mid .survey-progress-percent {
    background: #ecfdf5;
    color: #047857;
}

.survey-progress.is-end .survey-progress-percent {
    background: #d1fae5;
    color: #065f46;
}

.survey-progress-track {
    position: relative;
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.survey-progress-fill {
    position: relative;
    height: 100%;
    width: var(--survey-progress);
    border-radius: 999px;
    background: linear-gradient(90deg, #22d3ee 0%, #2aa9a4 42%, #34d399 100%);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.4);
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease;
    overflow: hidden;
}

.survey-progress.is-mid .survey-progress-fill {
    background: linear-gradient(90deg, #2aa9a4 0%, #10b981 55%, #34d399 100%);
}

.survey-progress.is-end .survey-progress-fill {
    background: linear-gradient(90deg, #14b8a6 0%, #22c55e 50%, #a3e635 100%);
}

.survey-progress-fill__glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.5) 45%, transparent 70%);
    transform: translateX(-120%);
    animation: surveyProgressShimmer 1.8s ease-in-out infinite;
}

.survey-progress-thumb {
    position: absolute;
    top: 50%;
    left: var(--survey-progress);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
    transform: translate(-50%, -50%);
    transition: left 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease;
    pointer-events: none;
}

.survey-progress.is-end .survey-progress-thumb {
    border-color: #22c55e;
}

.survey-progress-steps {
    display: flex;
    gap: 2px;
    width: 100%;
}

.survey-progress-step {
    flex: 1 1 0;
    min-width: 0;
    height: 5px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.survey-progress-step:disabled {
    cursor: default;
    opacity: 0.5;
}

.survey-progress-step.is-done {
    background: linear-gradient(90deg, #2aa9a4, #34d399);
}

.survey-progress-step.is-current {
    background: linear-gradient(90deg, #22d3ee, #2aa9a4);
    transform: scaleY(1.5);
}

@keyframes surveyProgressShimmer {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

.survey-question-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.26s ease, transform 0.26s ease;
    will-change: opacity, transform;
}

.survey-question-stage.is-fading {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.survey-question-stage.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.survey-question-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    padding: 12px 4px 0;
    border: none;
    box-shadow: none;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .survey-question-stage {
        transition: none;
        transform: none;
    }

    .survey-question-stage.is-fading {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
}

.survey-question-card__text,
.survey-question-card h3 {
    flex-shrink: 0;
    font-size: clamp(0.98rem, 2.2vh, 1.12rem);
    color: #142536;
    line-height: 1.35;
    margin: 0 0 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.survey-question-hint {
    display: none !important;
}

.survey-options-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.survey-modal .test-option,
.survey-options-grid .test-option {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 0;
    height: 100%;
    padding: 8px 12px;
    margin: 0;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    color: #1e293b;
    box-shadow: none;
    opacity: 1 !important;
    transform: none;
    animation: none !important;
    font: inherit;
}

.survey-modal .test-option:hover:not(.is-selected),
.survey-options-grid .test-option:hover:not(.is-selected) {
    border-color: #5eead4;
    background: #f0fdfa;
}

.survey-modal .test-option.is-selected,
.survey-options-grid .test-option.is-selected,
.survey-modal .test-option.selected,
.survey-options-grid .test-option.selected {
    border-color: #14b8a6;
    background: linear-gradient(135deg, #ecfeff 0%, #ecfdf5 100%);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
    color: #134e4a;
}

.survey-nav-row {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
}

.survey-nav-btn {
    padding: 10px 16px;
    border-radius: 11px;
    font-weight: 800;
    transition: all 0.2s ease;
    font-family: inherit;
    cursor: pointer;
    font-size: 0.86rem;
}

.survey-nav-btn--prev {
    background: #ffffff;
    color: #0f766e;
    border: 2px solid #99f6e4;
}

.survey-nav-btn--prev:disabled {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.7;
}

.survey-nav-btn--next {
    background: #ffffff;
    color: #0f766e;
    border: 2px solid #2aa9a4;
    margin-left: auto;
}

.survey-nav-btn--next:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.survey-nav-btn--next:not(:disabled):hover,
.survey-nav-btn--prev:not(:disabled):hover {
    background: #f0fdfa;
}

.survey-nav-btn--submit {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 55%, #2dd4bf 100%);
    color: #ffffff;
    border: none;
    margin-left: auto;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.24);
}

.survey-nav-btn--submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.survey-nav-counter {
    display: none;
}

.survey-modal .test-option__indicator,
.survey-options-grid .test-option__indicator {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    margin-right: 10px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.18s ease;
    font-weight: 800;
    font-size: 0.72rem;
    color: #94a3b8;
}

.survey-modal .test-option.is-selected .test-option__indicator,
.survey-options-grid .test-option.is-selected .test-option__indicator,
.survey-modal .test-option.selected .test-option__indicator,
.survey-options-grid .test-option.selected .test-option__indicator {
    border-color: #14b8a6;
    background: linear-gradient(135deg, #14b8a6, #2dd4bf);
    color: #ffffff;
}

.survey-modal .test-option__label,
.survey-options-grid .test-option__label {
    flex: 1;
    font-weight: 700;
    line-height: 1.25;
    font-size: 0.92rem;
    color: inherit;
}

@media (max-height: 760px) {
    .survey-modal__dialog.modal-content {
        height: 94vh;
        max-height: 94vh;
    }

    .survey-options-grid {
        gap: 6px;
    }

    .survey-modal .test-option,
    .survey-options-grid .test-option {
        padding: 6px 10px;
    }

    .survey-question-card__text,
    .survey-question-card h3 {
        font-size: 0.98rem;
        margin-bottom: 8px;
    }
}

@media (max-width: 640px) {
    .survey-modal.modal {
        padding: 8px;
    }

    .survey-modal__body {
        padding: 8px 12px 10px;
    }
}
