/* ==========================================
   1. BASE E TOPO (DASHBOARD CLÁSSICO)
   ========================================== */

.dash-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
}

.dash-topbar {
    background: var(--cor-fundo-card, #fff);
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dash-topbar-sme {
    border-left: 4px solid var(--cor-secundaria);
}

.sme-topbar-left, .aura-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-topbar-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-sme-badge {
    background: linear-gradient(135deg, var(--cor-secundaria), #b01e2a);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 6px 12px;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(212, 41, 56, 0.3);
}

.dash-title {
    margin: 0 0 4px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cor-texto, #1a1a2e);
    line-height: 1.2;
}

.dash-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #777;
}

/* ==========================================
   2. CARDS E GRIDS (DASHBOARD CLÁSSICO)
   ========================================== */

.dash-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.dash-module-card {
    background: var(--cor-fundo-card, #fff);
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
}

.dash-module-card-featured {
    border-top: 3px solid var(--cor-secundaria);
}

.dash-module-card-admin {
    background: #f8f9fa;
    border-style: dashed;
}

.dash-module-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-module-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.dash-module-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.dash-module-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.dash-module-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s ease;
}

.dash-module-link:hover {
    filter: brightness(0.92);
}

.dash-module-card-wide {
    grid-column: 1 / -1;
    background: var(--cor-fundo-card, #fff);
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.dash-module-card-wide:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
}

.dash-card-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.dash-card-group-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--cor-texto, #1a1a2e);
}

.dash-card-group-subtitle {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
}

.dash-subcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.dash-subcard {
    background: var(--cor-fundo, #f8f9fb);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.dash-subcard:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.dash-subcard-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-subcard-icon svg {
    width: 18px;
    height: 18px;
}

.dash-subcard-label {
    font-size: 0.9rem;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
    line-height: 1.2;
}

.dash-subcard-desc {
    margin: 0;
    font-size: 0.78rem;
    color: #888;
    line-height: 1.5;
    flex: 1;
}

.dash-subcard-footer {
    margin-top: 4px;
}

.dash-module-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-module-icon-wrap svg {
    width: 24px;
    height: 24px;
}

.dash-module-body {
    flex: 1;
}

.dash-module-label {
    font-size: 1rem;
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
    line-height: 1.2;
}

.dash-module-desc {
    margin: 0;
    font-size: 0.85rem;
    color: #777;
    line-height: 1.55;
}

.dash-module-footer {
    margin-top: 4px;
}

.dash-module-footer-flex {
    display: flex;
    gap: 8px;
}

.dash-module-footer-flex .dash-btn,
.dash-module-footer-flex .dash-btn-outline {
    flex: 1;
}

/* ==========================================
   3. TOKENS DE COR E BOTÕES DE CARD
   ========================================== */

.dash-module-card[data-module="alunos"] {
    --card-bg-start: #00796b22;
    --card-bg-end: #00796b11;
    --card-text: #004d40;
    --card-icon-bg: #00796b33;
    --card-link-bg: #00796b22;
    --card-link-hover: #004d40;
}

.dash-module-card[data-module="turmas"] {
    --card-bg-start: #e6950022;
    --card-bg-end: #e6950011;
    --card-text: #7a5000;
    --card-icon-bg: #e6950033;
    --card-link-bg: #e6950022;
    --card-link-hover: #7a5000;
}

.dash-module-card[data-module="rh"] {
    --card-bg-start: #17a2b822;
    --card-bg-end: #17a2b811;
    --card-text: #0d6d7a;
    --card-icon-bg: #17a2b833;
    --card-link-bg: #17a2b822;
    --card-link-hover: #0d6d7a;
}

.dash-module-card[data-module="pedagogico"] {
    --card-bg-start: #6f42c122;
    --card-bg-end: #6f42c111;
    --card-text: #4a2c82;
    --card-icon-bg: #6f42c133;
    --card-link-bg: #6f42c122;
    --card-link-hover: #4a2c82;
}

.dash-module-card[data-module="migracao"] {
    --card-bg-start: #28a74522;
    --card-bg-end: #28a74511;
    --card-text: #155724;
    --card-icon-bg: #28a74533;
    --card-link-bg: #28a74522;
    --card-link-hover: #155724;
}

.dash-module-card[data-module="admin"] {
    --card-bg-start: #6c757d22;
    --card-bg-end: #6c757d11;
    --card-text: #3d4246;
    --card-icon-bg: #6c757d33;
    --card-link-bg: #6c757d22;
    --card-link-hover: #3d4246;
}

.dash-module-footer .dash-btn,
.dash-module-footer .dash-btn-outline,
.dash-module-footer .dash-btn-disabled {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    margin: 0;
    background: var(--btn-color, var(--cor-primaria));
    color: white !important;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    border: 2px solid transparent;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s;
    text-align: center;
    line-height: 1.4;
    white-space: normal;
    vertical-align: middle;
    font-family: inherit;
}

.dash-module-footer .dash-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    color: white !important;
    text-decoration: none !important;
}

.dash-module-footer .dash-btn-outline {
    background: transparent !important;
    border: 2px solid var(--btn-color, var(--cor-primaria));
    color: var(--btn-color, var(--cor-primaria)) !important;
}

.dash-module-footer .dash-btn-outline:hover {
    background: var(--btn-color, var(--cor-primaria)) !important;
    color: white !important;
}

.dash-module-footer .dash-btn-disabled {
    background: #e9ecef !important;
    color: #aaa !important;
    cursor: not-allowed;
    border-color: transparent;
}

.dash-module-footer .dash-btn-disabled:hover {
    filter: none;
    transform: none;
}

.dash-footer {
    text-align: center;
    padding: 16px 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dash-footer p {
    margin: 0;
    font-size: 0.78rem;
    color: #aaa;
}

.dash-footer-link {
    font-size: 0.78rem;
    color: #aaa;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}

.dash-footer-link:hover {
    color: var(--cor-primaria);
}

/* ==========================================
   4. SISTEMA DE LAYOUT AURA (SIDEBAR & NAV)
   ========================================== */

.sme-page-root, .aura-page-root {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

html:has(.sme-page-root), html:has(.aura-page-root),
body:has(.sme-page-root), body:has(.aura-page-root) {
    height: 100%;
    overflow: hidden;
}

body:has(.sme-page-root) .navbar, body:has(.aura-page-root) .navbar {
    margin-bottom: 0;
}

.sme-layout h1, .aura-layout h1 {
    text-align: left;
    margin-bottom: 0;
    color: inherit;
}

.sme-layout, .aura-layout {
    display: flex;
    height: calc(100vh - 58px);
    background: #f1f5f9;
    overflow: hidden;
}

.sme-sidebar, .aura-sidebar {
    width: 66px;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 3px 0 16px rgba(0, 0, 0, .14);
    z-index: 10;
}

.sme-sidebar:hover, .aura-sidebar:hover {
    width: 236px;
}

.sme-sidebar-header, .aura-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    height: 62px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    flex-shrink: 0;
    box-sizing: border-box;
}

.sme-sidebar-badge, .aura-sidebar-badge {
    flex-shrink: 0;
    background: var(--cor-primaria, #00539C);
    color: #fff;
    font-weight: 800;
    font-size: .78rem;
    letter-spacing: .04em;
    padding: 5px 8px;
    border-radius: 7px;
    min-width: 38px;
    text-align: center;
}

.sme-sidebar-label, .aura-sidebar-label {
    font-size: .82rem;
    font-weight: 700;
    color: #e2e8f0;
    opacity: 0;
    transition: opacity .15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.sme-sidebar:hover .sme-sidebar-label,
.aura-sidebar:hover .aura-sidebar-label {
    opacity: 1;
}

.sme-nav, .aura-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 9px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
}

.sme-nav::-webkit-scrollbar, .aura-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Webkit */
}

.sme-nav-link, .aura-nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 42px;
    padding: 0 12px;
    border-radius: 9px;
    color: #94a3b8;
    text-decoration: none !important;
    transition: background .14s, color .14s;
    flex-shrink: 0;
}

.sme-nav-link:hover, .aura-nav-link:hover {
    background: rgba(255, 255, 255, .06);
    color: #f8fafc;
}

.sme-nav-link.is-active, .aura-nav-link.is-active {
    background: var(--cor-primaria, #00539C);
    color: #fff;
}

.sme-nav-link--super, .aura-nav-link--super {
    margin-top: auto;
}

.sme-nav-link--super:hover, .aura-nav-link--super:hover {
    background: rgba(251, 191, 36, .1);
    color: #fbbf24;
}

.sme-nav-icon, .aura-nav-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sme-nav-text, .aura-nav-text {
    font-size: .86rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity .12s ease;
    white-space: nowrap;
}

.sme-sidebar:hover .sme-nav-text,
.aura-sidebar:hover .aura-nav-text {
    opacity: 1;
}

.sme-sidebar-footer, .aura-sidebar-footer {
    padding: 12px 9px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    flex-shrink: 0;
}

.sme-sidebar-user, .aura-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: .85rem;
    padding: 0 4px;
}

.sme-sidebar-user i, .aura-sidebar-user i {
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* ==========================================
   5. COMPONENTES PAINEL REDE (KPI, TOPBAR, MÓDULOS)
   ========================================== */

.sme-content, .aura-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 28px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Garante que wrappers e corpos de página estiquem para preencher a tela no ecossistema local AURA */
.sme-content > .page-wrapper,
.aura-content > .page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.sme-content > .page-wrapper > .page-body,
.aura-content > .page-wrapper > .page-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sme-topbar, .aura-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 18px;
    border-bottom: 1.5px solid #e2e8f0;
    flex-shrink: 0;
}

.sme-topbar-title h1, .aura-topbar-title h1 {
    font-size: 1.4rem;
    font-weight: 820;
    color: #0f172a;
    margin: 0;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.sme-topbar-title p, .aura-topbar-title p {
    font-size: .82rem;
    color: #64748b;
    margin: 3px 0 0;
}

.sme-kpi-row, .aura-kpi-row {
    display: flex;
    gap: 12px;
}

.sme-kpi, .aura-kpi {
    display: flex;
    align-items: center;
    gap: 11px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    padding: 10px 18px;
    min-width: 130px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
}

a.sme-kpi, a.aura-kpi {
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

a.sme-kpi:hover, a.aura-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.sme-kpi-icon, .aura-kpi-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sme-kpi-val, .aura-kpi-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.sme-kpi-lbl, .aura-kpi-lbl {
    font-size: .7rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    margin-top: 2px;
}

.sme-kpi-body, .aura-kpi-body {
    flex: 1;
}

.sme-kpi-info, .aura-kpi-info {
    margin-left: auto;
    flex-shrink: 0;
    color: #94a3b8;
    font-size: .85rem;
    cursor: help;
    position: relative;
    display: flex;
    align-items: center;
    transition: color .15s;
}

.sme-kpi-info:hover, .aura-kpi-info:hover {
    color: #475569;
}

.sme-trend, .aura-trend {
    font-weight: 700;
    font-size: .7rem;
}

.sme-trend.up, .aura-trend.up {
    color: #10b981;
}

.sme-trend.stable, .aura-trend.stable {
    color: #06b6d4;
}

.sme-trend.down, .aura-trend.down {
    color: #ef4444;
}

.sme-modules, .aura-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
    flex: 1;
    align-content: start;
}

.sme-module, .aura-module {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-top: 3px solid var(--mc, #00539C);
    border-radius: 18px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .025);
}

.sme-module:hover, .aura-module:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .07);
    border-color: var(--mc, #00539C);
}

.sme-module-top, .aura-module-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sme-module-icon-wrap, .aura-module-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--mc) 10%, #fff);
    color: var(--mc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.sme-module-title, .aura-module-title {
    font-size: 1rem;
    font-weight: 780;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.sme-module-sub, .aura-module-sub {
    font-size: .75rem;
    color: #64748b;
    margin: 2px 0 0;
}

.sme-module-desc, .aura-module-desc {
    font-size: .84rem;
    color: #475569;
    line-height: 1.55;
    flex: 1;
    margin: 0;
}

.sme-module-tags, .aura-module-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sme-module-tags span, .aura-module-tags span {
    font-size: .7rem;
    font-weight: 640;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 3px 9px;
    border-radius: 20px;
}

.sme-module-footer, .aura-module-footer {
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.sme-module-btn, .aura-module-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 95%;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--mc, #00539C);
    color: #fff !important;
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: filter .15s, transform .12s;
}

.sme-module-btn:hover, .aura-module-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: #fff;
}

.sme-module-btn i, .aura-module-btn i {
    font-size: .75rem;
}

.sme-quick-actions, .aura-quick-actions {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
}

.sme-qa-link, .aura-qa-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    text-decoration: none !important;
    color: #0f172a !important;
    transition: all .18s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .025);
}

.sme-qa-link>i:first-child, .aura-qa-link>i:first-child {
    font-size: 1.1rem;
    color: var(--cor-primaria, #00539C);
    flex-shrink: 0;
}

.sme-qa-link--muted>i:first-child, .aura-qa-link--muted>i:first-child {
    color: #64748b;
}

.sme-qa-link>div, .aura-qa-link>div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sme-qa-link strong, .aura-qa-link strong {
    font-size: .88rem;
    font-weight: 750;
    color: #0f172a;
}

.sme-qa-link span, .aura-qa-link span {
    font-size: .74rem;
    color: #64748b;
}

.sme-qa-arrow, .aura-qa-arrow {
    font-size: .75rem;
    color: #cbd5e1;
    margin-left: auto;
    flex-shrink: 0;
}

.sme-qa-link:hover, .aura-qa-link:hover {
    border-color: var(--cor-primaria, #00539C);
    box-shadow: 0 4px 12px rgba(0, 83, 156, .07);
    transform: translateY(-1px);
}

.sme-qa-link--muted:hover, .aura-qa-link--muted:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

/* ==========================================
   6. SUPORTE ESCOLAR (SELEÇÃO DE ESCOLA PWA)
   ========================================== */

.escola-sel-wrapper {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    background: var(--bg-page, #f4f6fb);
}

.escola-sel-hero {
    width: 100%;
    max-width: 600px;
    padding: 28px 20px 16px;
}

.escola-sel-hero h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    margin: 0 0 6px;
    line-height: 1.3;
}

.escola-sel-hero p {
    font-size: 0.88rem;
    color: var(--text-muted, #6c757d);
    margin: 0;
}

.escola-sel-list {
    width: 100%;
    max-width: 600px;
    padding: 0 20px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.escola-card {
    background: var(--bg-card, #fff);
    border: 1.5px solid var(--border-color, #e8ecf4);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
    position: relative;
    overflow: hidden;
}

.escola-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,83,156,0.03) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.escola-card:hover, .escola-card:active {
    box-shadow: 0 4px 20px rgba(0, 83, 156, 0.12);
    border-color: var(--cor-primaria, #00539C);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.escola-card:hover::before {
    opacity: 1;
}

.escola-card--inativa {
    opacity: 0.5;
    pointer-events: none;
}

.escola-card__body {
    flex: 1;
    min-width: 0;
}

.escola-card__name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.escola-card__meta {
    font-size: 0.78rem;
    color: var(--text-muted, #6c757d);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.escola-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.escola-card__badge--ativa {
    background: rgba(40, 167, 69, 0.12);
    color: #1a7a35;
}

.escola-card__badge--inativa {
    background: rgba(108, 117, 125, 0.12);
    color: #6c757d;
}

.escola-card__arrow {
    color: var(--cor-primaria, #00539C);
    opacity: 0.5;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.2s;
}

.escola-card:hover .escola-card__arrow {
    opacity: 1;
    transform: translateX(3px);
}

.escola-sel-empty {
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
    text-align: center;
    color: var(--text-muted, #6c757d);
    font-size: 0.9rem;
    margin-top: 40px;
}

.escola-sel-admin {
    width: 100%;
    max-width: 600px;
    padding: 0 20px 12px;
    display: flex;
    justify-content: flex-end;
}

.glass-modal-body::-webkit-scrollbar { width: 6px; }
.glass-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
.glass-modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
    max-height: 70vh !important;
    padding-right: 15px !important;
}
body.modal-open { overflow: hidden; }

/* ==========================================
   7. RESPONSIVIDADE E MEDIA QUERIES
   ========================================== */

@media (max-width: 640px) {
    .dash-modules-grid {
        grid-template-columns: 1fr;
    }

    .dash-topbar {
        padding: 18px 16px;
    }

    .dash-title {
        font-size: 1.2rem;
    }

    .dash-footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 860px) {
    .sme-layout, .aura-layout {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }

    .sme-sidebar, .aura-sidebar {
        width: 100% !important;
        height: auto;
        flex-direction: row;
    }

    .sme-sidebar-header, .aura-sidebar-header {
        height: 52px;
    }

    .sme-nav, .aura-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 8px;
        gap: 4px;
    }

    .sme-nav-link, .aura-nav-link {
        height: 38px;
    }

    .sme-sidebar-footer, .aura-sidebar-footer {
        display: none;
    }

    .sme-content, .aura-content {
        padding: 16px;
        gap: 14px;
        overflow-y: visible;
    }

    .sme-topbar, .aura-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .sme-kpi-row, .aura-kpi-row {
        flex-wrap: wrap;
    }

    .sme-modules, .aura-modules {
        grid-template-columns: 1fr;
    }

    .sme-quick-actions, .aura-quick-actions {
        flex-direction: column;
    }
}

@media (min-width: 768px) {
    .mobile-only {
        display: none !important;
    }
    .escola-sel-wrapper {
        align-items: stretch !important;
        justify-content: flex-start !important;
        background: transparent !important;
        min-height: auto !important;
        padding: 0 !important;
    }
    .escola-sel-list {
        max-width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
        gap: 20px !important;
        padding: 24px 0 !important;
    }
}

@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
    .aura-sidebar {
        display: none !important;
    }
    .aura-layout {
        display: block !important;
    }
    .aura-content {
        padding: 0 !important;
    }
}