:root,
[data-theme="light"] {
    --ec-radius-sm: 8px;
    --ec-radius-md: 12px;
    --ec-radius-lg: 16px;
    --ec-radius-xl: 24px;
    --ec-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --ec-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.08);
    --ec-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.12);
    --ec-shadow-lg: 0 14px 34px rgba(15, 23, 42, 0.16);
    --ec-ui-panel-surface: #ffffff;
    --ec-ui-panel-border: rgba(175, 200, 222, 0.58);
    --ec-ui-panel-border-strong: rgba(153, 184, 211, 0.68);
    --ec-ui-field-rest-bg: rgba(248, 250, 252, 0.98);
    --ec-ui-field-rest-border: rgba(175, 200, 222, 0.62);
    --ec-ui-field-rest-shadow: none;
    --ec-ui-field-focus-bg: #ffffff;
    --ec-ui-field-focus-border: rgba(15, 108, 189, 0.72);
    --ec-ui-field-focus-shadow: 0 0 0 2px rgba(15, 108, 189, 0.16);
}

[data-theme="dark"] {
    --ec-shell-sidebar-start: #1a2744;
    --ec-shell-sidebar-end: #0f172a;
    --ec-shell-sidebar-panel-strong: rgba(255, 255, 255, 0.08);
    --ec-shell-sidebar-border: rgba(148, 163, 184, 0.15);
    --ec-shell-sidebar-text: #f1f5f9;
    --ec-shell-sidebar-text-soft: rgba(203, 213, 225, 0.72);
    --ec-shell-sidebar-kicker: #fbbf24;
    --ec-shell-workspace: #0f172a;
    --ec-ui-primary: #60a5fa;
    --ec-ui-primary-soft: rgba(96, 165, 250, 0.15);
    --ec-ui-focus: #818cf8;
    --ec-ui-warm: #d97706;
    --ec-ui-ok: #34d399;
    --ec-ui-risk: #f87171;
    --ec-ui-neutral: #94a3b8;
    --ec-ui-panel-border: rgba(71, 85, 105, 0.4);
    --ec-ui-panel-surface: #1e293b;
    --ec-ui-field-rest-bg: rgba(30, 41, 59, 0.8);
    --ec-ui-field-rest-border: rgba(71, 85, 105, 0.5);
    --ec-ui-field-focus-bg: rgba(30, 41, 59, 0.95);
    --ec-ui-field-focus-border: rgba(96, 165, 250, 0.6);
}

[data-theme="contrast"] {
    --ec-shell-sidebar-start: #000000;
    --ec-shell-sidebar-end: #000000;
    --ec-shell-sidebar-panel-strong: rgba(255, 255, 255, 0.25);
    --ec-shell-sidebar-border: rgba(255, 255, 255, 0.4);
    --ec-shell-sidebar-text: #ffffff;
    --ec-shell-sidebar-text-soft: rgba(255, 255, 255, 0.85);
    --ec-shell-sidebar-kicker: #ffff00;
    --ec-shell-workspace: #ffffff;
    --ec-ui-primary: #0033cc;
    --ec-ui-primary-soft: rgba(0, 51, 204, 0.12);
    --ec-ui-focus: #660099;
    --ec-ui-warm: #cc6600;
    --ec-ui-ok: #006600;
    --ec-ui-risk: #cc0000;
    --ec-ui-neutral: #333333;
    --ec-ui-panel-border: rgba(0, 0, 0, 0.6);
    --ec-ui-panel-surface: #ffffff;
    --ec-ui-field-rest-bg: #ffffff;
    --ec-ui-field-rest-border: rgba(0, 0, 0, 0.5);
    --ec-ui-field-focus-bg: #ffffcc;
    --ec-ui-field-focus-border: rgba(0, 0, 0, 0.8);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--ec-ui-primary, #2f74b8) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: var(--ec-ui-primary, #2f74b8);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--ec-ui-focus, #5267c6);
    background-clip: content-box;
}

.shell-sidebar {
    width: 278px;
    min-width: 278px;
    padding: 0.85rem;
    box-shadow: 12px 0 28px rgba(12, 42, 69, 0.14);
}

.shell-sidebar__brand {
    padding: 0.8rem;
    gap: 0.56rem;
    margin-bottom: 0.3rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 210, 122, 0.12) 100%);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.shell-sidebar__logo {
    width: 156px;
    min-height: 78px;
    max-height: 166px;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(8, 32, 54, 0.2);
}

.shell-sidebar__title {
    font-size: 0.96rem;
    line-height: 1.14;
}

.shell-nav__label {
    font-weight: 700;
}

.shell-sidebar__subtitle,
.shell-nav__meta {
    line-height: 1.4;
}

.shell-sidebar__subtitle {
    font-size: 0.79rem;
}

.shell-nav {
    gap: 0.52rem;
}

.shell-nav__group-title {
    margin: 0.82rem 0 0.2rem;
    padding: 0 0.58rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.shell-nav__item {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0.78rem;
    min-height: 64px;
    padding: 0.72rem 0.82rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: none;
}

.shell-nav__group-title + .shell-nav__item {
    margin-top: 0.06rem;
}

.shell-nav__item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(1px);
    box-shadow: 0 8px 18px rgba(8, 31, 51, 0.1);
}

.shell-nav__item:focus-visible {
    border-color: rgba(255, 210, 122, 0.34);
    box-shadow: 0 0 0 3px rgba(255, 210, 122, 0.12);
}

.shell-nav__item.is-active {
    background: linear-gradient(135deg, rgba(255, 210, 122, 0.95) 0%, rgba(243, 173, 61, 0.94) 100%);
    border-color: rgba(255, 219, 155, 0.48);
    box-shadow: 0 8px 18px rgba(10, 36, 58, 0.14);
}

.shell-nav__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(8, 31, 51, 0.18);
}

.shell-nav__icon svg,
.context-card__icon svg {
    width: 20px;
    height: 20px;
}

.shell-nav__text {
    gap: 0.12rem;
    padding-right: 0.3rem;
}

.shell-nav__label {
    font-size: 0.95rem;
    line-height: 1.15;
}

.shell-nav__meta {
    font-size: 0.78rem;
}

.shell-nav__status-dot {
    right: 0.6rem;
    bottom: 0.56rem;
}

.shell-hero,
.shell-card,
.workspace-launcher-card,
.super-admin-banner,
.super-admin-kpi,
.super-admin-panel,
.super-admin-action,
.super-admin-item,
.portal-metric,
.portal-panel,
.portal-student-card,
.attendance-student,
.attendance-mark {
    border-radius: 8px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

.shell-hero {
    padding: 0.8rem 1rem;
    background: #ffffff;
}

.shell-hero__eyebrow,
.workspace-launcher-card__eyebrow {
    color: var(--ec-ui-neutral, #5d7186);
    font-size: 0.74rem;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
}

.shell-hero__title,
.shell-card__title,
.workspace-launcher-card__title,
.super-admin-item__title {
    font-weight: 600 !important;
    line-height: 1.2;
}

.shell-hero__title {
    margin: 0.25rem 0;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    color: var(--ec-text, #1f2937);
}

.shell-hero__copy,
.shell-card__copy,
.workspace-launcher-card__copy,
.portal-panel p,
.portal-student-card p,
.portal-student-card small {
    line-height: 1.5;
    color: var(--ec-ui-neutral, #5d7186);
}

.shell-card {
    min-height: 90px;
    padding: 0.9rem 1rem;
    background: #ffffff;
}

.shell-card::before {
    display: none;
}

.shell-card.is-primary,
.shell-card.is-ok,
.shell-card.is-warm,
.shell-card.is-focus,
.shell-card.is-danger,
.shell-card.is-neutral,
.portal-metric,
.portal-panel,
.portal-student-card,
.workspace-launcher-card,
.super-admin-kpi,
.super-admin-panel,
.super-admin-action,
.super-admin-item {
    background: #ffffff !important;
    border: 1px solid var(--ec-ui-panel-border, rgba(180, 201, 224, 0.52)) !important;
}

.shell-card-grid,
.portal-metric-grid,
.portal-grid {
    gap: 1rem;
}

.shell-card:hover,
.workspace-launcher-card:hover,
.portal-metric:hover,
button.super-admin-kpi.is-actionable:hover,
.super-admin-item__action:hover,
.button-primary:hover,
.button-secondary:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

.workspace-launcher-card {
    min-height: 84px;
    gap: 0.35rem;
}

.workspace-launcher-card__count,
.workspace-switcher__tab-count {
    min-width: auto;
    min-height: auto;
    padding: 0 0.35rem;
    background: transparent;
    border-radius: 0;
    font-weight: 500 !important;
    color: var(--ec-ui-primary, #2f74b8);
}

.portal-metric {
    padding: 0.95rem;
    gap: 0.28rem;
}

.portal-metric strong {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--ec-text, #1f2937);
}

.portal-metric span,
.portal-metric small {
    font-weight: 600;
    color: var(--ec-ui-neutral, #5d7186);
}

.super-admin-banner {
    padding: 0.65rem 0.85rem;
    gap: 0.35rem;
    border-left: 3px solid var(--ec-ui-primary, #2f74b8);
    background: #f8fafc !important;
}

.super-admin-banner.is-danger {
    border-left-color: #dc2626;
}

.super-admin-banner.is-warm {
    border-left-color: var(--ec-ui-warm, #b88743);
}

.super-admin-banner.is-ok {
    border-left-color: var(--ec-ui-ok, #5b9a7a);
}

.super-admin-kpi__value,
.super-admin-item__count {
    font-weight: 600 !important;
}

.super-admin-item__action,
.button-primary,
.button-secondary,
.super-admin-form__submit,
.shell-app .ec-btn,
.shell-app .btn {
    border-radius: 6px !important;
    font-weight: 600;
    box-shadow: none;
}

.button-secondary,
.super-admin-item__action,
.shell-app .ec-btn:not(.ec-btn-primary):not(.is-primary),
.shell-app .btn:not(.btn-primary) {
    background: #ffffff;
    border-color: var(--ec-ui-panel-border, rgba(180, 201, 224, 0.52));
    color: var(--ec-text, #1f2937);
}

.shell-app input[type="text"],
.shell-app input[type="email"],
.shell-app input[type="password"],
.shell-app input[type="number"],
.shell-app input[type="date"],
.shell-app input[type="time"],
.shell-app input[type="search"],
.shell-app select,
.shell-app textarea,
.shell-app .ec-input,
.shell-app .ec-select,
.shell-app .ec-textarea {
    border-radius: 6px !important;
    background: var(--ec-ui-field-rest-bg);
    border: 1px solid var(--ec-ui-field-rest-border);
    box-shadow: none !important;
}

.shell-app input:focus,
.shell-app select:focus,
.shell-app textarea:focus,
.shell-app .ec-input:focus,
.shell-app .ec-select:focus,
.shell-app .ec-textarea:focus {
    background: var(--ec-ui-field-focus-bg);
    border-color: var(--ec-ui-field-focus-border);
    box-shadow: var(--ec-ui-field-focus-shadow) !important;
}

/* Consistent polished treatment for the compact native lists kept across modules. */
.shell-app select:not([multiple]):not(.super-admin-search-select__native) {
    appearance: none;
    min-height: 2.55rem;
    padding: 0.62rem 2.55rem 0.62rem 0.78rem !important;
    background-color: var(--ec-ui-field-rest-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23184f80' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.82rem center;
    background-size: 0.88rem;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.shell-app select:not([multiple]):not(.super-admin-search-select__native):hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--ec-ui-field-focus-border) 72%, var(--ec-ui-field-rest-border));
    background-color: rgba(247, 251, 255, 0.99);
}

.shell-app select:not([multiple]):not(.super-admin-search-select__native):disabled {
    cursor: not-allowed;
    opacity: 0.64;
}

/* PAE: este modulo trae su propia densidad visual y necesita override dedicado */
.school-pae-overview {
    background: #ffffff;
    border: 1px solid var(--ec-ui-panel-border, rgba(180, 201, 224, 0.52));
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    gap: 0.9rem;
    margin-bottom: 1rem;
    padding: clamp(0.9rem, 1.6vw, 1.1rem);
}

.school-pae-overview__head {
    gap: 0.85rem;
}

.school-pae-overview__head h3 {
    color: var(--ec-text, #1f2937);
    font-size: clamp(1.15rem, 1.8vw, 1.45rem);
    font-weight: 600;
    line-height: 1.18;
    margin: 0.1rem 0 0.22rem;
}

.school-pae-overview__head p {
    color: var(--ec-ui-neutral, #5d7186);
    font-weight: 600;
    line-height: 1.5;
}

.school-pae-overview__actions {
    gap: 0.45rem;
}

.school-pae-overview__actions .button-primary,
.school-pae-overview__actions .button-secondary {
    min-height: 36px;
    padding: 0.58rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: none;
}

.school-pae-overview__metrics,
.school-pae-overview__closures,
.school-pae-overview__periods {
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.school-pae-overview__metric,
.school-pae-overview__closure,
.school-pae-overview__period,
.school-pae-overview__table-card,
.school-pae-overview__missing-card {
    background: #ffffff;
    border: 1px solid var(--ec-ui-panel-border, rgba(180, 201, 224, 0.52));
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.school-pae-overview__metric {
    gap: 0.22rem;
    padding: 0.82rem 0.92rem;
}

.school-pae-overview__metric strong {
    color: var(--ec-text, #1f2937);
    font-size: 1.5rem;
    font-weight: 600;
}

.school-pae-overview__metric span,
.school-pae-overview__closure span,
.school-pae-overview__period span,
.school-pae-overview__closure strong,
.school-pae-overview__subhead strong {
    color: var(--ec-text, #1f2937);
    font-weight: 600;
}

.school-pae-overview__metric small,
.school-pae-overview__closure small,
.school-pae-overview__period small,
.school-pae-overview__missing span,
.school-pae-overview__empty,
.school-pae-overview__table {
    color: var(--ec-ui-neutral, #5d7186);
    font-weight: 600;
}

.school-pae-overview__metric.is-ok,
.school-pae-overview__metric.is-warm,
.school-pae-overview__metric.is-focus,
.school-pae-overview__metric.is-danger-soft,
.school-pae-overview__closure.is-closed,
.school-pae-overview__closure.is-open {
    background: #ffffff;
}

.school-pae-overview__closure {
    gap: 0.18rem;
    padding: 0.78rem 0.92rem;
}

.school-pae-overview__body {
    gap: 0.75rem;
}

.school-pae-overview__table-card,
.school-pae-overview__missing-card {
    gap: 0.68rem;
    padding: 0.82rem;
}

.school-pae-overview__subhead span,
.school-pae-overview__period b,
.school-pae-overview__diff {
    background: #f4f8fc;
    border: 1px solid var(--ec-ui-panel-border, rgba(180, 201, 224, 0.52));
    border-radius: 999px;
    color: var(--ec-ui-neutral, #5d7186);
    font-size: 0.76rem;
    font-weight: 600;
    box-shadow: none;
}

.school-pae-overview__table th,
.school-pae-overview__table td {
    padding: 0.54rem 0.5rem;
}

.school-pae-overview__table thead th {
    color: var(--ec-ui-neutral, #5d7186);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.school-pae-overview__missing,
.school-pae-overview__empty {
    background: #f8fbff;
    border: 1px dashed #d4e4f2;
    border-radius: 8px;
    gap: 0.12rem;
    padding: 0.65rem 0.74rem;
}

.school-pae-overview__missing strong {
    color: var(--ec-text, #1f2937);
    font-weight: 600;
}

.school-pae-overview__missing small,
.school-pae-overview__ok {
    font-weight: 600;
}

@media (max-width: 1200px) {
    .shell-nav {
        gap: 0.46rem;
    }

    .shell-nav__group-title {
        margin-top: 0.72rem;
    }
}

@media (max-width: 980px) {
    .shell-sidebar {
        padding: 0.8rem;
    }

    .shell-nav {
        gap: 0.4rem;
    }

    .shell-nav__group-title {
        margin: 0.64rem 0 0.16rem;
    }

    .shell-nav__item {
        min-height: 62px;
    }

    .school-pae-overview__head {
        grid-template-columns: 1fr;
    }

    .school-pae-overview__actions {
        justify-content: flex-start;
    }
}

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

/* 2.10.57: ritmo visual profesional y superficies de baja densidad. */
:root,
[data-theme="light"] {
    --ec-radius-sm: 6px;
    --ec-radius-md: 8px;
    --ec-radius-lg: 8px;
    --ec-radius-xl: 8px;
    --ec-section-divider: #d9e7f3;
    --ec-section-surface: #ffffff;
    --ec-section-soft: #f7fafc;
}

.shell-app {
    font-weight: 400;
    background: #f3f7fb !important;
}

.shell-main {
    background: transparent !important;
}

.shell-app p,
.shell-app li,
.shell-app td,
.shell-app small,
.shell-app input,
.shell-app select,
.shell-app textarea {
    font-weight: 400;
}

.shell-app label,
.shell-app button,
.shell-app th,
.shell-app strong,
.shell-app b,
.shell-nav__label,
.shell-breadcrumb strong {
    font-weight: 600 !important;
}

.shell-app h1,
.shell-app h2,
.shell-app h3,
.shell-app h4,
.shell-app h5,
.shell-app h6 {
    font-weight: 700 !important;
    letter-spacing: 0;
}

.shell-app [class*="__eyebrow"],
.shell-app [class*="__kicker"] {
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
}

.shell-content > .shell-section + .shell-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ec-section-divider);
}

.shell-content > .shell-section + .shell-section::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 72px;
    height: 2px;
    background: #c6dced;
}

.shell-content > .shell-section {
    position: relative;
}

.shell-hero,
.shell-sidebar__brand,
.shell-nav__item,
.shell-nav__icon,
.shell-topbar__inner,
.shell-toggle,
.shell-breadcrumb,
.workspace-shell,
.workspace-shell__panel,
.teacher-support-shell .workspace-shell__panel,
.teacher-coordination-shell .workspace-shell__panel,
.teacher-written-tests-shell .workspace-shell__panel,
.teacher-academic-view .workspace-shell__panel,
.teacher-planner-view .workspace-shell__panel,
.student-life-search__panel,
.school-setup-guide-strip,
.school-setup-guide-modal__hero,
.school-setup-guide-modal__next,
.school-setup-guide-step {
    border-radius: 8px !important;
    box-shadow: none !important;
}

.shell-topbar__inner,
.shell-toggle,
.shell-breadcrumb {
    background: #ffffff !important;
}

.shell-nav__item {
    height: 80px;
    min-height: 80px !important;
    max-height: 80px;
}

.shell-nav__meta {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.workspace-shell__panel,
.teacher-support-shell .workspace-shell__panel,
.teacher-coordination-shell .workspace-shell__panel,
.teacher-written-tests-shell .workspace-shell__panel,
.teacher-academic-view .workspace-shell__panel,
.teacher-planner-view .workspace-shell__panel,
.student-life-search__panel,
.school-setup-guide-modal__hero,
.school-setup-guide-modal__next,
.school-setup-guide-step {
    background: var(--ec-section-surface) !important;
    border: 1px solid var(--ec-ui-panel-border) !important;
}

.teacher-support-shell .workspace-shell__panel::before,
.teacher-coordination-shell .workspace-shell__panel::before,
.teacher-written-tests-shell .workspace-shell__panel::before {
    display: none !important;
}

.student-life-search__panel {
    padding: 1rem !important;
}

.student-life-search__field span,
.student-life-search__field small,
.student-photo-workspace__head span {
    font-weight: 600 !important;
}

.student-life-search__inputwrap {
    border-radius: 6px !important;
    box-shadow: none !important;
}

.student-life-search__inputwrap:focus-within {
    box-shadow: 0 0 0 3px rgba(47, 116, 184, 0.14) !important;
}

.student-life-search__button {
    border-radius: 6px !important;
    background: #176da5 !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}

.student-life-search__more {
    display: flex;
    margin: 0.85rem auto 0;
}

.school-setup-guide-strip {
    background: var(--ec-section-soft) !important;
    border: 1px solid var(--ec-section-divider) !important;
}

.school-setup-guide-modal__hero,
.school-setup-guide-step.is-complete {
    background: #ffffff !important;
}

.school-setup-guide-strip__progress i,
.school-setup-guide-modal__bar i,
.school-setup-guide-step__bar i {
    background: linear-gradient(90deg, #8fb8d8 0%, #d6bf83 100%) !important;
    box-shadow: none !important;
}

.school-setup-guide-modal__percent {
    border-radius: 6px !important;
    font-weight: 700 !important;
}

.school-setup-guide-step__checks span {
    font-weight: 600 !important;
}

.teacher-report-workflow__step,
.teacher-analytics-panel,
.teacher-analytics-card,
.teacher-support-item {
    border-radius: 8px !important;
    box-shadow: none !important;
}

.teacher-report-executive__split.is-single {
    grid-template-columns: 1fr;
}

.teacher-report-executive__recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: start;
}

@media (max-width: 720px) {
    .shell-content > .shell-section + .shell-section {
        margin-top: 1rem;
        padding-top: 1rem;
    }
}

/* 2.10.102: densidad contenida solo para el portal familiar. */
.shell-app.is-family-portal .shell-content {
    padding: 0.52rem 0.65rem 0.8rem !important;
}

.shell-app.is-family-portal .portal-stack {
    gap: 0.55rem;
}

.shell-app.is-family-portal .portal-panel {
    gap: 0.42rem;
    padding: 0.58rem 0.68rem !important;
    border-color: #d9e7f3 !important;
    box-shadow: none !important;
}

.shell-app.is-family-portal .portal-panel > h3 {
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.25;
}

.shell-app.is-family-portal .portal-panel > p {
    font-size: 0.8rem;
    line-height: 1.35;
    margin: 0;
}

.shell-app.is-family-portal .portal-list {
    gap: 0;
}

.shell-app.is-family-portal .portal-list__row {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #e1ebf4;
    border-radius: 0;
    gap: 0.1rem 0.55rem;
    padding: 0.4rem 0.12rem;
}

.shell-app.is-family-portal .portal-list__row:last-child {
    border-bottom: 0;
}

.shell-app.is-family-portal .portal-focus-panel .portal-list {
    gap: 0.38rem;
    margin-top: 0.08rem;
}

.shell-app.is-family-portal .portal-focus-panel .portal-list__row {
    background: #ffffff;
    border: 1px solid #e1ebf4;
    border-radius: 6px;
    padding: 0.44rem 0.58rem;
}

.shell-app.is-family-portal .portal-list__row--action {
    appearance: none;
    cursor: pointer;
    font: inherit;
    padding-right: 1.8rem;
    position: relative;
    text-align: left;
    width: 100%;
}

.shell-app.is-family-portal .portal-list__row--action::after {
    color: #6f8da5;
    content: "\203A";
    font-size: 1.15rem;
    line-height: 1;
    position: absolute;
    right: 0.62rem;
    top: 50%;
    transform: translateY(-50%);
}

.shell-app.is-family-portal .portal-list__row--action:hover {
    background: #f7fbff;
    border-color: #b9d5ea;
}

.shell-app.is-family-portal .portal-list__row--action:focus-visible {
    border-color: #1579af;
    outline: 2px solid rgba(21, 121, 175, 0.24);
    outline-offset: 2px;
}

.shell-app.is-family-portal .portal-list__row strong {
    color: #23445f;
    font-size: 0.84rem;
    font-weight: 650;
}

.shell-app.is-family-portal .portal-list__row span {
    color: #45647c;
    font-size: 0.76rem;
    font-weight: 600;
}

.shell-app.is-family-portal .portal-list__row small {
    color: #64798b;
    font-size: 0.75rem;
    line-height: 1.35;
}

.shell-app.is-family-portal .portal-inline-empty {
    background: transparent;
    border-color: #d9e7f3;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.55rem 0.62rem;
}

.shell-app.is-family-portal .portal-students {
    margin: 0.6rem 0;
    padding: 0.6rem 0;
}

.shell-app.is-family-portal .portal-student-row {
    min-height: 56px;
    padding: 0.38rem 0.52rem;
}

/* 2.10.104: una sola navegacion compacta y prioridades accionables. */
.shell-app.is-family-portal .student-life-detail {
    background: #ffffff;
    border-color: #d9e7f3;
    border-radius: 8px;
    box-shadow: none;
    gap: 0.55rem;
    padding: 0.55rem;
}

.shell-app.is-family-portal .student-life-profile {
    background: #fffdf8;
    border-color: #d9e7f3;
    border-radius: 8px;
    gap: 0.65rem;
    grid-template-columns: 60px minmax(0, 1fr);
    padding: 0.55rem 0.65rem;
}

.shell-app.is-family-portal .student-life-profile__photo-button img {
    height: 60px;
    width: 60px;
}

.shell-app.is-family-portal .student-life-profile__photo-button span {
    font-size: 0.66rem;
    font-weight: 600;
}

.shell-app.is-family-portal .student-life-profile h3 {
    font-size: 1rem;
    font-weight: 650;
}

.shell-app.is-family-portal .student-life-profile p {
    font-size: 0.78rem;
    line-height: 1.3;
    margin: 0.16rem 0 0.3rem;
}

.shell-app.is-family-portal .student-life-kpis {
    display: none;
}

.shell-app.is-family-portal .student-life-detail-tabs {
    gap: 0.5rem;
}

.shell-app.is-family-portal .student-life-tab-list {
    gap: 0.35rem;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
}

.shell-app.is-family-portal .student-life-tab-card {
    background: #ffffff;
    border-color: #d9e7f3;
    border-radius: 6px;
    box-shadow: none;
    gap: 0.05rem;
    min-height: 54px;
    padding: 0.42rem 0.55rem;
}

.shell-app.is-family-portal .student-life-tab-card:hover {
    box-shadow: none;
    transform: none;
}

.shell-app.is-family-portal .student-life-tab-card span {
    display: none;
}

.shell-app.is-family-portal .student-life-tab-card strong {
    font-size: 0.82rem;
    font-weight: 650;
}

.shell-app.is-family-portal .student-life-tab-card small {
    font-size: 0.69rem;
    font-weight: 500;
    line-height: 1.25;
}

.shell-app.is-family-portal .student-life-detail-tabs input:checked ~ .student-life-tab-list .student-life-tab-card {
    box-shadow: none;
}

.shell-app.is-family-portal .student-life-tab-panels {
    min-height: 0;
}

.shell-app.is-family-portal .student-life-block {
    border-color: #d9e7f3;
    border-radius: 6px;
    box-shadow: none;
    padding: 0.62rem 0.72rem;
}

.shell-app.is-family-portal .student-life-block__head {
    margin-bottom: 0.42rem;
}

.shell-app.is-family-portal .student-life-block__head span {
    display: none;
}

.shell-app.is-family-portal .student-life-block h4 {
    font-size: 0.92rem;
    font-weight: 650;
    margin-bottom: 0.42rem;
}

.shell-app.is-family-portal .student-life-block li {
    font-size: 0.8rem;
    padding: 0.3rem 0;
}

/* 2.10.108: expediente propio sin capas de resumen repetidas. */
.shell-app.is-student-portal .portal-student-life-host--self {
    margin-top: 0.55rem;
}

.shell-app.is-student-portal .student-life-detail {
    background: #ffffff;
    border-color: #d9e7f3;
    border-radius: 8px;
    box-shadow: none;
    gap: 0.55rem;
    padding: 0.55rem;
}

.shell-app.is-student-portal .student-life-profile {
    background: #fffdf8;
    border-color: #d9e7f3;
    border-radius: 8px;
    gap: 0.65rem;
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 0.5rem 0.62rem;
}

.shell-app.is-student-portal .student-life-profile__photo-button img {
    height: 58px;
    width: 58px;
}

.shell-app.is-student-portal .student-life-profile__photo-button span {
    font-size: 0.65rem;
    font-weight: 600;
}

.shell-app.is-student-portal .student-life-profile h3 {
    font-size: 1rem;
    font-weight: 650;
}

.shell-app.is-student-portal .student-life-profile p {
    font-size: 0.77rem;
    line-height: 1.3;
    margin: 0.12rem 0 0.28rem;
}

.shell-app.is-student-portal .student-life-kpis {
    display: none;
}

.shell-app.is-student-portal .student-life-detail-tabs {
    gap: 0.45rem;
}

.shell-app.is-student-portal .student-life-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.shell-app.is-student-portal .student-life-tab-card {
    background: #ffffff;
    border-color: #d9e7f3;
    border-radius: 6px;
    box-shadow: none;
    flex: 1 1 128px;
    gap: 0.05rem;
    min-height: 42px;
    padding: 0.35rem 0.48rem;
}

.shell-app.is-student-portal .student-life-tab-card:hover {
    box-shadow: none;
    transform: none;
}

.shell-app.is-student-portal .student-life-tab-card span {
    display: none;
}

.shell-app.is-student-portal .student-life-tab-card strong {
    font-size: 0.8rem;
    font-weight: 650;
}

.shell-app.is-student-portal .student-life-tab-card small {
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.2;
}

.shell-app.is-student-portal .student-life-detail-tabs input:checked ~ .student-life-tab-list .student-life-tab-card {
    box-shadow: none;
}

.shell-app.is-student-portal .student-life-detail-tabs input:nth-of-type(1):checked ~ .student-life-tab-list label:nth-child(1),
.shell-app.is-student-portal .student-life-detail-tabs input:nth-of-type(2):checked ~ .student-life-tab-list label:nth-child(2),
.shell-app.is-student-portal .student-life-detail-tabs input:nth-of-type(3):checked ~ .student-life-tab-list label:nth-child(3),
.shell-app.is-student-portal .student-life-detail-tabs input:nth-of-type(4):checked ~ .student-life-tab-list label:nth-child(4),
.shell-app.is-student-portal .student-life-detail-tabs input:nth-of-type(5):checked ~ .student-life-tab-list label:nth-child(5),
.shell-app.is-student-portal .student-life-detail-tabs input:nth-of-type(6):checked ~ .student-life-tab-list label:nth-child(6),
.shell-app.is-student-portal .student-life-detail-tabs input:nth-of-type(7):checked ~ .student-life-tab-list label:nth-child(7),
.shell-app.is-student-portal .student-life-detail-tabs input:nth-of-type(8):checked ~ .student-life-tab-list label:nth-child(8),
.shell-app.is-student-portal .student-life-detail-tabs input:nth-of-type(9):checked ~ .student-life-tab-list label:nth-child(9),
.shell-app.is-student-portal .student-life-detail-tabs input:nth-of-type(10):checked ~ .student-life-tab-list label:nth-child(10) {
    background: #f2f8fd;
    border-color: #91bcd8;
    box-shadow: none;
}

.shell-app.is-student-portal .student-life-tab-panels {
    min-height: 0;
}

.shell-app.is-student-portal .student-life-block {
    border-color: #d9e7f3;
    border-radius: 6px;
    box-shadow: none;
    padding: 0.58rem 0.68rem;
}

.shell-app.is-student-portal .student-life-block__head {
    margin-bottom: 0.4rem;
}

.shell-app.is-student-portal .student-life-block__head span {
    display: none;
}

.shell-app.is-student-portal .student-life-block h4 {
    font-size: 0.9rem;
    font-weight: 650;
    margin-bottom: 0.4rem;
}

.shell-app.is-student-portal .student-life-block li {
    font-size: 0.79rem;
    padding: 0.28rem 0;
}

/* 2.10.112 STUDENT TYPOGRAPHY START */
.shell-app.is-student-portal .shell-sidebar__title,
.shell-app.is-student-portal .shell-nav__label,
.shell-app.is-student-portal .shell-nav__group-title,
.shell-app.is-student-portal .shell-sidebar__help-eyebrow,
.shell-app.is-student-portal .shell-sidebar strong,
.shell-app.is-student-portal .shell-topbar button,
.shell-app.is-student-portal .shell-pill,
.shell-app.is-student-portal .shell-breadcrumb strong,
.shell-app.is-student-portal .shell-content h1,
.shell-app.is-student-portal .shell-content h2,
.shell-app.is-student-portal .shell-content h3,
.shell-app.is-student-portal .shell-content h4,
.shell-app.is-student-portal .shell-content h5,
.shell-app.is-student-portal .shell-content h6,
.shell-app.is-student-portal .shell-content strong,
.shell-app.is-student-portal .shell-content b,
.shell-app.is-student-portal .shell-content button,
.shell-app.is-student-portal .teacher-support-chip {
    font-weight: 600 !important;
}

.shell-app.is-student-portal .portal-inline-empty,
.shell-app.is-student-portal .portal-list__row span {
    font-weight: 500 !important;
}

.shell-app.is-student-portal .shell-sidebar__subtitle,
.shell-app.is-student-portal .shell-nav__meta,
.shell-app.is-student-portal .shell-sidebar__help-copy,
.shell-app.is-student-portal .shell-content p,
.shell-app.is-student-portal .shell-content small,
.shell-app.is-student-portal .shell-content li,
.shell-app.is-student-portal .shell-content input,
.shell-app.is-student-portal .shell-content select,
.shell-app.is-student-portal .shell-content textarea,
.shell-app.is-student-portal .communication-field small {
    font-weight: 400 !important;
}

.shell-app.is-student-portal .communication-field {
    font-weight: 500 !important;
}
/* 2.10.112 STUDENT TYPOGRAPHY END */

/* 2.10.113 STUDENT COMPACT DENSITY START */
.shell-app.is-student-portal .shell-content {
    padding: 0.5rem 0.65rem 0.75rem !important;
}

.shell-app.is-student-portal .portal-shell {
    gap: 0.35rem !important;
}

.shell-app.is-student-portal .portal-hero {
    gap: 0.65rem;
}

.shell-app.is-student-portal .portal-hero .shell-section__eyebrow {
    font-size: 0.68rem;
    line-height: 1.2;
    margin: 0;
}

.shell-app.is-student-portal .portal-hero h2 {
    font-size: 1.1rem;
    line-height: 1.2;
}

.shell-app.is-student-portal .portal-hero p {
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0.12rem 0 0;
}

.shell-app.is-student-portal .portal-hero__actions {
    gap: 0.4rem;
}

.shell-app.is-student-portal .portal-hero__actions button {
    font-size: 0.72rem;
    min-height: 30px;
    padding: 0.32rem 0.5rem;
}

.shell-app.is-student-portal .portal-dashboard-grid {
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.shell-app.is-student-portal .portal-stack {
    gap: 0.5rem;
}

.shell-app.is-student-portal .portal-panel {
    gap: 0.36rem;
    padding: 0.5rem 0.62rem;
}

.shell-app.is-student-portal .portal-panel h3 {
    font-size: 0.94rem;
    line-height: 1.22;
}

.shell-app.is-student-portal .portal-panel > p {
    font-size: 0.78rem;
    line-height: 1.3;
    margin: 0;
}

.shell-app.is-student-portal .portal-list {
    gap: 0.34rem;
}

.shell-app.is-student-portal .portal-list__row {
    gap: 0.16rem;
    padding: 0.44rem 0.54rem;
}

.shell-app.is-student-portal .portal-list__row strong {
    font-size: 0.8rem;
    line-height: 1.25;
}

.shell-app.is-student-portal .portal-list__row span,
.shell-app.is-student-portal .portal-list__row small {
    font-size: 0.72rem;
    line-height: 1.28;
}

.shell-app.is-student-portal .portal-inline-empty {
    font-size: 0.78rem;
    line-height: 1.3;
    padding: 0.5rem 0.6rem;
}

.shell-app.is-student-portal .teacher-planner-form,
.shell-app.is-student-portal .teacher-planner-form--modal {
    gap: 0.55rem;
}

.shell-app.is-student-portal .teacher-planner-form label {
    font-size: 0.78rem;
    gap: 0.22rem;
}

.shell-app.is-student-portal .teacher-planner-form input,
.shell-app.is-student-portal .teacher-planner-form select,
.shell-app.is-student-portal .teacher-planner-form textarea {
    font-size: 0.82rem;
    padding: 0.48rem 0.62rem;
}

.shell-app.is-student-portal .teacher-planner-form textarea {
    min-height: 72px;
}

.shell-app.is-student-portal .portal-student-life-host--self {
    margin: 0.4rem 0 0;
}

.shell-app.is-student-portal .student-life-detail {
    gap: 0.4rem;
    padding: 0.45rem;
}

.shell-app.is-student-portal .student-life-profile {
    gap: 0.5rem;
    padding: 0.42rem 0.52rem;
}

.shell-app.is-student-portal .student-life-detail-tabs {
    gap: 0.34rem;
}

.shell-app.is-student-portal .student-life-tab-list {
    gap: 0.28rem;
}

.shell-app.is-student-portal .student-life-tab-card {
    gap: 0.04rem;
    min-height: 38px;
    padding: 0.28rem 0.4rem;
}

.shell-app.is-student-portal .student-life-tab-card strong {
    font-size: 0.76rem;
}

.shell-app.is-student-portal .student-life-tab-card small {
    font-size: 0.65rem;
    line-height: 1.15;
}

.shell-app.is-student-portal .student-life-block {
    padding: 0.45rem 0.55rem;
}

.shell-app.is-student-portal .student-life-block__head {
    margin: 0 0 0.28rem;
}

.shell-app.is-student-portal .student-life-block h4 {
    font-size: 0.84rem;
    margin: 0 0 0.28rem;
}

.shell-app.is-student-portal .student-life-block li {
    font-size: 0.74rem;
    line-height: 1.3;
    padding: 0.22rem 0;
}

@media (max-width: 720px) {
    .shell-app.is-student-portal .shell-content {
        padding: 0.4rem 0.45rem 0.65rem !important;
    }

    .shell-app.is-student-portal .portal-hero {
        gap: 0.35rem;
    }

    .shell-app.is-student-portal .portal-hero h2 {
        font-size: 1.02rem;
    }

    .shell-app.is-student-portal .portal-panel {
        gap: 0.32rem;
        padding: 0.44rem 0.5rem;
    }

    .shell-app.is-student-portal .portal-inline-empty {
        padding: 0.46rem 0.52rem;
    }
}
/* 2.10.113 STUDENT COMPACT DENSITY END */

@media (min-width: 721px) {
    .shell-app.is-family-portal .shell-sidebar {
        min-width: 252px;
        padding: 0.62rem;
        width: 252px;
    }

    .shell-app.is-family-portal .shell-sidebar__brand {
        gap: 0.48rem;
        margin-bottom: 0.18rem;
        padding: 0.58rem;
    }

    .shell-app.is-family-portal .shell-sidebar__logo {
        border-radius: 8px;
        min-height: 70px;
        max-height: 150px;
        width: 138px;
    }

    .shell-app.is-family-portal .shell-sidebar__title {
        font-size: 0.9rem;
    }

    .shell-app.is-family-portal .shell-sidebar__subtitle {
        font-size: 0.72rem;
    }

    .shell-app.is-family-portal .shell-nav {
        gap: 0.28rem;
    }

    .shell-app.is-family-portal .shell-nav__group-title {
        font-size: 0.66rem;
        margin: 0.58rem 0 0.12rem;
    }

    .shell-app.is-family-portal .shell-nav__item {
        border-radius: 8px;
        gap: 0.58rem;
        grid-template-columns: 36px minmax(0, 1fr);
        min-height: 52px;
        padding: 0.46rem 0.58rem;
    }

    .shell-app.is-family-portal .shell-nav__group > .shell-nav__item + .shell-nav__item {
        margin-top: 0.26rem;
    }

    .shell-app.is-family-portal .shell-nav__icon {
        border-radius: 8px;
        box-shadow: none;
        height: 36px;
        width: 36px;
    }

    .shell-app.is-family-portal .shell-nav__icon svg {
        height: 18px;
        width: 18px;
    }

    .shell-app.is-family-portal .shell-nav__label {
        font-size: 0.88rem;
        font-weight: 650;
    }

    .shell-app.is-family-portal .shell-nav__meta {
        font-size: 0.72rem;
        line-height: 1.25;
    }

    .shell-app.is-family-portal .shell-nav__status-dot {
        bottom: 0.45rem;
        right: 0.5rem;
    }

    .shell-app.is-family-portal .shell-topbar {
        padding: 0.3rem 0.62rem 0 !important;
    }

    .shell-app.is-family-portal .shell-topbar__inner {
        border-radius: 8px;
        box-shadow: none;
        min-height: 46px;
        padding: 0.28rem 0.4rem !important;
    }

    .shell-app.is-family-portal .shell-pill {
        background: transparent;
        border: 0;
        border-left: 1px solid #d9e7f3;
        border-radius: 0 !important;
        font-weight: 600;
        min-height: 28px;
        padding: 0.3rem 0.42rem;
    }
}

@media (max-width: 720px) {
    .shell-app.is-family-portal .portal-panel {
        padding: 0.52rem 0.58rem !important;
    }

    .shell-app.is-family-portal .portal-list__row {
        padding: 0.38rem 0.08rem;
    }

    .shell-app.is-family-portal .student-life-profile {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .shell-app.is-family-portal .student-life-profile__photo-button img {
        height: 52px;
        width: 52px;
    }

    .shell-app.is-family-portal .student-life-tab-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .shell-app.is-sidebar-collapsed .shell-sidebar {
        width: 0 !important;
        min-width: 0 !important;
        height: 0;
        min-height: 0;
        max-height: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        overflow: hidden;
    }
}

/* 2.10.59: cabecera compacta y frontera fija para la navegacion por modulos. */
.shell-topbar {
    position: sticky !important;
    top: 0;
    z-index: 70;
    padding: 0.45rem 0.75rem 0 !important;
    background: rgba(243, 247, 251, 0.96);
    border-bottom: 1px solid rgba(217, 231, 243, 0.78);
}

.shell-topbar__inner {
    width: min(100%, 1380px);
    min-height: 52px;
    padding: 0.4rem 0.5rem !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
}

.shell-topbar__left {
    flex: 0 1 auto;
    min-width: 0;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.4rem;
}

.shell-topbar__right {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.shell-topbar__actions,
.session-tools.is-topbar {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.3rem;
}

.session-tools.is-topbar {
    width: auto;
    margin: 0;
}

.shell-toggle {
    width: 34px;
    height: 34px;
    min-height: 34px;
    flex: 0 0 34px;
}

.shell-breadcrumb {
    min-height: 34px;
    padding: 0.4rem 0.55rem;
    gap: 0.35rem;
    flex-wrap: nowrap;
    font-size: 0.75rem;
    white-space: nowrap;
}

.shell-topbar__help,
.session-tools.is-topbar .session-tool-button,
.shell-pill {
    min-height: 32px;
    padding: 0.38rem 0.55rem;
    border-radius: 6px !important;
    box-shadow: none !important;
    font-size: 0.72rem;
    line-height: 1.1;
    white-space: nowrap;
}

.shell-content {
    scroll-margin-top: 72px;
}

@media (max-width: 1380px) {
    .shell-topbar__left {
        flex: 0 0 auto;
    }

    .shell-topbar__right {
        flex: 1 1 720px;
        justify-content: flex-start;
        overflow-x: visible;
    }
}

@media (max-width: 720px) {
    .shell-topbar {
        padding: 0.35rem 0.4rem 0 !important;
    }

    .shell-topbar__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        padding: 0.35rem !important;
        gap: 0.35rem !important;
    }

    .shell-topbar__left {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        width: 100%;
    }

    .shell-topbar__right {
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        padding-bottom: 0.1rem;
    }

    .shell-topbar__actions {
        display: flex !important;
        grid-template-columns: none;
        width: auto;
        flex: 0 0 auto;
    }

    .session-tools.is-topbar {
        width: auto;
        flex-direction: row !important;
        justify-content: flex-start;
        flex: 0 0 auto;
    }

    .shell-breadcrumb,
    .shell-pill,
    .shell-topbar__help,
    .session-tools.is-topbar .session-tool-button {
        width: auto;
        min-height: 32px;
        white-space: nowrap;
    }

    .shell-pill,
    .session-tools.is-topbar .session-tool-button {
        width: auto !important;
        flex: 0 0 auto;
    }

    .shell-content {
        scroll-margin-top: 92px;
    }
}

/* 2.10.60: densidad operativa compacta para todos los roles. */
:root,
[data-theme="light"] {
    --ec-density-gap: 0.7rem;
    --ec-density-padding-y: 0.68rem;
    --ec-density-padding-x: 0.78rem;
    --ec-density-border: #d9e7f3;
}

.shell-content {
    padding: 0.7rem 0.8rem 1rem !important;
}

.shell-section,
.workspace-shell,
.teacher-academic-shell,
.teacher-planner-shell,
.teacher-support-shell,
.teacher-coordination-shell,
.teacher-written-tests-shell {
    gap: var(--ec-density-gap) !important;
}

.shell-hero {
    padding: 0.58rem 0.72rem 0.64rem !important;
    border: 0 !important;
    border-left: 2px solid #b8d3e7 !important;
    border-bottom: 1px solid var(--ec-density-border) !important;
    border-radius: 0 !important;
    background: linear-gradient(90deg, rgba(230, 241, 249, 0.34) 0%, rgba(255, 255, 255, 0) 58%) !important;
    box-shadow: none !important;
}

.shell-hero__eyebrow {
    font-size: 0.68rem !important;
}

.shell-hero__title {
    margin: 0.15rem 0 !important;
    font-size: clamp(1.08rem, 1.7vw, 1.35rem) !important;
    line-height: 1.15 !important;
}

.shell-hero__copy {
    font-size: 0.84rem;
    line-height: 1.38 !important;
}

.shell-card-grid,
.portal-metric-grid,
.portal-grid,
.super-admin-kpi-grid {
    gap: 0.62rem !important;
}

.shell-card {
    min-height: 0 !important;
    padding: var(--ec-density-padding-y) var(--ec-density-padding-x) !important;
}

.workspace-shell__panel,
.teacher-academic-view .workspace-shell__panel,
.teacher-planner-view .workspace-shell__panel,
.teacher-support-shell .workspace-shell__panel,
.teacher-coordination-shell .workspace-shell__panel,
.teacher-written-tests-shell .workspace-shell__panel,
.super-admin-panel,
.super-admin-action {
    padding: var(--ec-density-padding-y) var(--ec-density-padding-x) !important;
    border-color: var(--ec-density-border) !important;
    border-radius: 8px !important;
    background: linear-gradient(145deg, #ffffff 0%, #f9fbfd 100%) !important;
    box-shadow: none !important;
}

.workspace-shell__title,
.super-admin-panel__title {
    font-size: 1rem !important;
    line-height: 1.2;
}

.workspace-shell__copy,
.super-admin-panel__copy {
    font-size: 0.82rem;
    line-height: 1.4;
}

.workspace-launcher-card {
    min-height: 68px !important;
    padding: 0.58rem 0.68rem !important;
    border-color: var(--ec-density-border) !important;
    background: linear-gradient(145deg, #ffffff 0%, #fafcfe 100%) !important;
}

.super-admin-kpi,
.portal-metric {
    min-height: 0 !important;
    padding: 0.58rem 0.68rem !important;
}

.shell-content > .shell-section + .shell-section {
    margin-top: 1rem;
    padding-top: 1rem;
}

/* Long labels and descriptions must expand the complete navigation control. */
.shell-app .shell-sidebar .shell-nav__item {
    height: auto !important;
    min-height: 80px !important;
    max-height: none !important;
}

@media (max-width: 720px) {
    :root,
    [data-theme="light"] {
        --ec-density-gap: 0.58rem;
        --ec-density-padding-y: 0.6rem;
        --ec-density-padding-x: 0.66rem;
    }

    .shell-content {
        padding: 0.5rem 0.55rem 0.8rem !important;
    }

    .shell-hero__copy,
    .workspace-shell__copy,
    .super-admin-panel__copy {
        font-size: 0.8rem;
    }
}
