/* ============================================================
   SEMED Web — casco público institucional
   Visual alinhado ao gateway (dashboard / gw-topbar)
   ============================================================ */

:root {
    --sw-radius: 14px;
    --sw-radius-lg: 18px;
    --sw-header-h: auto;
    --sw-max: 1180px;
    --sw-shadow: 0 4px 18px rgba(6, 62, 72, .08);
    --sw-page-bg: #ffffff;
    --sw-topbar-bg: linear-gradient(135deg, var(--brand-900, #063e48) 0%, var(--brand-800, #085f6d) 65%, var(--brand-700, #0b7f92) 100%);
    --sw-topbar-border: transparent;
    --sw-topbar-shadow: 0 4px 20px rgba(6, 62, 72, .14);
}

html {
    height: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.sw-public {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: var(--pm-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    color: var(--sm-text, #1c2b30);
    background: var(--sw-page-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Light: superfície clara com leve lavagem teal (como o seletor) */
html:not([data-theme="dark"]) body.sw-public {
    background:
        radial-gradient(120% 80% at 100% -10%, rgba(18, 175, 200, .10) 0%, transparent 55%),
        radial-gradient(90% 60% at -10% 100%, rgba(6, 62, 72, .05) 0%, transparent 50%),
        #ffffff;
    background-attachment: fixed;
}

/* Dark: degrage institucional do dashboard gateway */
html[data-theme="dark"] body.sw-public {
    --sw-page-bg: transparent;
    --sw-topbar-bg: rgba(4, 21, 25, .72);
    --sw-topbar-border: rgba(64, 200, 219, .12);
    --sw-topbar-shadow: none;
    color: var(--sm-text, #e6f2f4);
    background: linear-gradient(165deg, #041519 0%, var(--brand-900, #063e48) 38%, #072028 100%);
    background-attachment: fixed;
}

/* ------------------------------------------------------------
   Topbar (paridade gateway .gw-topbar / .gw-superadmin-btn)
   ------------------------------------------------------------ */

.sw-topbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    width: 100%;
    background: var(--sw-topbar-bg);
    color: #fff;
    border-bottom: 1px solid var(--sw-topbar-border);
    box-shadow: var(--sw-topbar-shadow);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.sw-topbar-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-sizing: border-box;
}

/* Marca — logo SEMED branca (paridade gateway) */
.sw-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, .94) !important;
    text-decoration: none !important;
    flex: 0 0 auto;
    min-width: 0;
    max-width: min(280px, 52vw);
    line-height: 0;
}

.sw-topbar-brand:hover,
.sw-topbar-brand:focus {
    opacity: .92;
    text-decoration: none !important;
}

.sw-topbar-logo {
    display: block;
    height: 40px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: none;
}

.sw-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    margin-left: auto;
}

.sw-topbar-auth {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.sw-topbar .sm-theme-switch {
    color: #fff;
    flex-shrink: 0;
}

/* CTAs Login / Cadastre-se — paridade .gw-superadmin-btn */
.sw-topbar-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    box-sizing: border-box;
    padding: 6px 14px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand-500, #12afc8) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand-300, #40c8db) 42%, transparent);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0;
    white-space: nowrap;
    box-shadow: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.sw-topbar-login--signup {
    background: color-mix(in srgb, #fff 16%, transparent);
    border-color: color-mix(in srgb, #fff 42%, transparent);
}

.sw-topbar-login:hover {
    color: #fff !important;
    text-decoration: none !important;
    background: color-mix(in srgb, var(--brand-500, #12afc8) 38%, transparent);
    border-color: color-mix(in srgb, var(--brand-300, #40c8db) 65%, transparent);
    transform: none;
    box-shadow: 0 2px 10px rgba(18, 175, 200, .18);
}

.sw-topbar-login--signup:hover {
    background: color-mix(in srgb, #fff 28%, transparent);
    border-color: color-mix(in srgb, #fff 62%, transparent);
    box-shadow: 0 2px 10px rgba(255, 255, 255, .12);
}

.sw-topbar-login i {
    font-size: 13px;
    line-height: 1;
    color: var(--brand-300, #40c8db);
}

.sw-topbar-login--signup i {
    color: #e8f7fa;
}

.sw-topbar-login:hover i,
.sw-topbar-login--signup:hover i {
    color: #fff;
}

@media (max-width: 767.98px) {
    .sw-topbar-logo {
        height: 34px;
    }

    .sw-topbar-auth {
        gap: 6px;
    }

    .sw-topbar-login span {
        display: none;
    }

    .sw-topbar-login {
        padding: 6px 10px;
        min-width: 40px;
        justify-content: center;
    }
}

/* ------------------------------------------------------------
   Subnavegação padrão (Voltar + crumbs) — todas as subpáginas
   ------------------------------------------------------------ */

.sw-subnav {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: color-mix(in srgb, var(--brand-900, #063e48) 6%, var(--sm-surface, #fff));
    border-bottom: 1px solid var(--sm-border, #dbe7ea);
    box-shadow: 0 2px 12px rgba(6, 62, 72, .05);
}

html[data-theme="dark"] .sw-subnav {
    background: rgba(4, 21, 25, .55);
    border-bottom-color: rgba(64, 200, 219, .12);
    box-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sw-subnav-inner {
    max-width: var(--sw-max, 1180px);
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    box-sizing: border-box;
}

.sw-subnav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--brand-300, #40c8db) 40%, transparent);
    background: color-mix(in srgb, var(--brand-500, #12afc8) 14%, transparent);
    color: var(--brand-800, #085f6d) !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.sw-subnav-back:hover {
    background: color-mix(in srgb, var(--brand-500, #12afc8) 26%, transparent);
    border-color: color-mix(in srgb, var(--brand-300, #40c8db) 60%, transparent);
    color: var(--brand-900, #063e48) !important;
}

.sw-subnav-back i {
    font-size: 13px;
    color: var(--brand-600, #0f9cb3);
}

html[data-theme="dark"] .sw-subnav-back {
    color: #fff !important;
    background: color-mix(in srgb, var(--brand-500, #12afc8) 22%, transparent);
    border-color: color-mix(in srgb, var(--brand-300, #40c8db) 42%, transparent);
}

html[data-theme="dark"] .sw-subnav-back:hover {
    background: color-mix(in srgb, var(--brand-500, #12afc8) 38%, transparent);
    color: #fff !important;
}

html[data-theme="dark"] .sw-subnav-back i {
    color: var(--brand-300, #40c8db);
}

.sw-subnav-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.sw-subnav-crumb {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    line-height: 1.3;
    color: var(--sm-text-soft, #566268);
    max-width: 100%;
}

.sw-subnav-crumb + .sw-subnav-crumb::before {
    content: "/";
    margin: 0 8px;
    color: color-mix(in srgb, var(--sm-text-soft, #566268) 70%, transparent);
    font-weight: 500;
}

.sw-subnav-crumb a {
    color: var(--brand-700, #0b7f92) !important;
    font-weight: 650;
    text-decoration: none !important;
}

.sw-subnav-crumb a:hover {
    text-decoration: underline !important;
}

.sw-subnav-crumb.is-current span {
    color: var(--sm-text, #1c2b30);
    font-weight: 800;
}

html[data-theme="dark"] .sw-subnav-crumb {
    color: rgba(255, 255, 255, .72);
}

html[data-theme="dark"] .sw-subnav-crumb a {
    color: var(--brand-300, #40c8db) !important;
}

html[data-theme="dark"] .sw-subnav-crumb.is-current span {
    color: #fff;
}

.sw-subnav-here {
    display: none;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    min-height: 36px;
    padding: 4px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand-500, #12afc8) 12%, transparent);
    color: var(--brand-800, #085f6d);
    font-size: 12.5px;
    font-weight: 700;
    max-width: min(280px, 42vw);
}

.sw-subnav-here span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sw-subnav-here i {
    color: var(--brand-600, #0f9cb3);
    flex-shrink: 0;
}

html[data-theme="dark"] .sw-subnav-here {
    background: rgba(64, 200, 219, .12);
    color: rgba(255, 255, 255, .9);
}

html[data-theme="dark"] .sw-subnav-here i {
    color: var(--brand-300, #40c8db);
}

@media (min-width: 768px) {
    .sw-subnav-here {
        display: inline-flex;
    }
}

@media (max-width: 575.98px) {
    .sw-subnav-inner {
        padding: 8px 14px;
        gap: 8px 10px;
    }

    .sw-subnav-crumb {
        font-size: 12.5px;
    }
}

/* Esconde breadcrumbs legados quando a barra padrão já está na página */
body:has(.sw-subnav) .sw-breadcrumb {
    display: none !important;
}

/* ------------------------------------------------------------
   Breadcrumb legado (mantido se alguma página não usar sw-subnav)
   ------------------------------------------------------------ */

.sw-breadcrumb {
    max-width: var(--sw-max);
    margin: 0 auto;
    padding: 16px 28px 0;
}

@media (min-width: 1200px) {
    .sw-breadcrumb {
        padding-left: 32px;
        padding-right: 32px;
    }
}

.sw-breadcrumb .breadcrumb,
.sw-public .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
    border-radius: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    list-style: none;
    font-size: 13px;
}

.sw-public .breadcrumb > li + li::before {
    content: "/";
    padding: 0 6px 0 0;
    color: var(--sm-text-soft, #566268);
}

.sw-public .breadcrumb a {
    color: var(--brand-700, #0b7f92);
    font-weight: 600;
    text-decoration: none;
}

.sw-public .breadcrumb a:hover {
    color: var(--brand-500, #12afc8);
    text-decoration: underline;
}

.sw-public .breadcrumb > .active {
    color: var(--sm-text-soft, #566268);
}

/* ------------------------------------------------------------
   Main / layout — respiro tipo dashboard gateway
   ------------------------------------------------------------ */

.sw-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--sw-max);
    margin: 0 auto;
    padding: 40px 28px 64px;
    box-sizing: border-box;
}

.sw-main--wide {
    max-width: 1280px;
}

.sw-main--flush {
    max-width: none;
    padding: 0;
}

@media (min-width: 1200px) {
    .sw-main {
        padding: 48px 32px 72px;
    }
}

@media (max-width: 575.98px) {
    .sw-main {
        padding: 24px 16px 48px;
    }
}

/* Hero — tipografia institucional (sans, clara e moderna) */
.sw-hero {
    display: block;
    text-align: center;
    padding: 16px 0 40px;
}

.sw-hero-logo {
    display: none;
}

.sw-hero-text {
    min-width: 0;
}

.sw-hero h1,
.sw-hero .sw-hero-title {
    margin: 0 auto;
    max-width: 46rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: var(--pm-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    font-weight: 500;
    font-style: normal;
    letter-spacing: -.015em;
    color: var(--sm-text-soft, #3d5258);
    line-height: 1.45;
    text-align: center;
    text-wrap: balance;
}

.sw-hero-greet {
    display: block;
    font-size: clamp(1.65rem, 3.8vw, 2.35rem);
    font-weight: 800;
    font-style: normal;
    letter-spacing: -.04em;
    line-height: 1.15;
    color: var(--brand-800, #085f6d);
}

.sw-hero-line {
    display: block;
    font-weight: 500;
    color: var(--sm-text-soft, #4a5f66);
}

.sw-hero-org {
    font-weight: 800;
    font-style: normal;
    letter-spacing: -.02em;
    color: var(--brand-900, #063e48);
    white-space: normal;
}

.sw-hero p,
.sw-hero .sw-hero-lead {
    margin: 0;
    max-width: 640px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--sm-text-soft, #566268);
}

html[data-theme="dark"] .sw-hero-title {
    color: rgba(255, 255, 255, .78) !important;
}

html[data-theme="dark"] .sw-hero-greet {
    color: #9ef0fb;
    background: none;
    -webkit-text-fill-color: unset;
}

html[data-theme="dark"] .sw-hero-line {
    color: rgba(255, 255, 255, .78);
}

html[data-theme="dark"] .sw-hero-org {
    color: #fff;
    font-weight: 800;
}

/* ------------------------------------------------------------
   Grid de módulos (home e hubs) — 2 por linha
   ------------------------------------------------------------ */

.sw-modules {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
}

@media (min-width: 576px) {
    .sw-modules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1100px) {
    .sw-modules {
        gap: 22px;
    }
}

/* Cards em destaque: ocupam as 2 colunas (linha inteira) */
.sw-module--full {
    grid-column: 1 / -1;
}

/* Card de sistema / serviço — seta à esquerda, ícone grande colorido no fundo */
.sw-module {
    --sw-teal: var(--brand-600, #0f9cb3);
    --sw-amber: #c97712;
    --sw-accent: var(--sw-teal);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-height: 136px;
    height: 100%;
    padding: 22px 20px 22px 16px;
    border-radius: 18px;
    background: var(--sm-surface, #fff);
    border: 1px solid var(--sm-border, #dbe7ea);
    box-shadow: var(--sw-shadow);
    color: var(--sm-text, #1c2b30) !important;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

/* sem faixa lateral esquerda */
.sw-module::before {
    content: none;
    display: none;
}

.sw-module:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(6, 62, 72, .14);
    border-color: color-mix(in srgb, var(--sw-teal) 30%, var(--sm-border, #dbe7ea));
}

.sw-module:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--sw-teal) 45%, transparent);
    outline-offset: 2px;
}

/*
 * Ícone de fundo: preenche boa parte da altura à direita,
 * inteiro dentro do card (sem right negativo = sem corte).
 * Usar sempre Phosphor bold (classes .ph-bold) — traço uniforme legível.
 */
.sw-module-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    bottom: auto;
    left: auto;
    z-index: 0;
    width: auto;
    max-width: 46%;
    height: 88%;
    max-height: 124px;
    margin: 0;
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    transform: translateY(-50%);
    background: none !important;
    box-shadow: none !important;
    color: color-mix(in srgb, var(--sw-teal) 88%, var(--brand-900, #063e48));
    font-size: clamp(5.5rem, 15vh, 8.25rem);
    line-height: 1;
    opacity: .34;
    pointer-events: none;
    user-select: none;
    overflow: visible;
}

.sw-module-icon i,
.sw-module-icon .ph,
.sw-module-icon .ph-bold {
    display: block !important;
    width: 1em !important;
    height: 1em !important;
    margin: 0;
    padding: 0;
    line-height: 1 !important;
    font-size: inherit !important;
    color: inherit !important;
    opacity: 1 !important;
    /* reforça legibilidade de glifos finos legados */
    -webkit-text-stroke: .012em currentColor;
    paint-order: stroke fill;
    filter: drop-shadow(0 3px 10px color-mix(in srgb, var(--sw-teal) 28%, transparent));
}

.sw-module-icon img {
    width: clamp(5.75rem, 15vh, 8.75rem);
    height: clamp(5.75rem, 15vh, 8.75rem);
    object-fit: contain;
    display: block;
    margin: 0;
    filter: brightness(0) saturate(100%) invert(36%) sepia(52%) saturate(780%) hue-rotate(148deg) brightness(0.96);
    opacity: .4;
}

.sw-module:hover .sw-module-icon {
    opacity: .44;
}

.sw-module:hover .sw-module-icon img {
    opacity: .5;
}

/* seta à esquerda do título */
.sw-module-foot {
    position: relative;
    z-index: 1;
    order: 0;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    align-self: center;
    background: color-mix(in srgb, var(--sw-teal) 14%, transparent);
    color: var(--sw-teal);
    font-size: 13px;
    line-height: 1;
    transition: background .15s ease, transform .15s ease, color .15s ease;
}

.sw-module-foot i {
    display: block;
    line-height: 1;
    margin: 0;
}

.sw-module:hover .sw-module-foot {
    background: linear-gradient(135deg, var(--sw-teal) 0%, var(--sw-amber) 100%);
    color: #fff;
    transform: translateX(2px);
}

.sw-module-body {
    position: relative;
    z-index: 1;
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 64px;
    padding-right: 5.25rem; /* espaço do glifo de fundo (dentro do card) */
}

/* Nome oficial do sistema — tipografia principal */
.sw-module-title {
    margin: 0;
    font-size: clamp(1.35rem, 2.8vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--sm-text, #1c2b30);
    line-height: 1.15;
    text-transform: none;
}

.sw-module-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--sm-text-soft, #566268);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(13px * 1.45 * 2);
}

/* dark mode cards — glass sobre o degradê da página */
html[data-theme="dark"] .sw-module {
    background: rgba(8, 32, 38, .82);
    border-color: rgba(64, 200, 219, .14);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    color: var(--sm-text, #e6f2f4) !important;
}

html[data-theme="dark"] .sw-module:hover {
    background: rgba(10, 38, 45, .92);
    border-color: rgba(64, 200, 219, .24);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .34);
}

/* dark: ícone de fundo em ciano com traço bold/visibilidade alta */
html[data-theme="dark"] .sw-module-icon {
    color: var(--brand-300, #40c8db);
    opacity: .4;
    background: none !important;
    box-shadow: none !important;
    filter: none;
}

html[data-theme="dark"] .sw-module-icon i,
html[data-theme="dark"] .sw-module-icon .ph-bold {
    color: inherit !important;
    filter: drop-shadow(0 0 18px rgba(64, 200, 219, .45));
    opacity: 1 !important;
    -webkit-text-stroke: .01em color-mix(in srgb, var(--brand-300, #40c8db) 80%, #fff);
}

html[data-theme="dark"] .sw-module-icon img {
    filter: brightness(0) invert(78%) sepia(24%) saturate(650%) hue-rotate(150deg) brightness(1.05);
    opacity: .42;
}

html[data-theme="dark"] .sw-module:hover .sw-module-icon {
    opacity: .5;
}

html[data-theme="dark"] .sw-module:hover .sw-module-icon img {
    opacity: .52;
}

html[data-theme="dark"] .sw-module-foot {
    background: color-mix(in srgb, var(--brand-300, #40c8db) 16%, transparent);
    color: #9ef0fb;
}

html[data-theme="dark"] .sw-module:hover .sw-module-foot {
    background: linear-gradient(135deg, var(--brand-500, #12afc8) 0%, var(--sw-amber) 100%);
    color: #041519;
}

html[data-theme="dark"] .sw-module-title {
    color: var(--sm-text, #e6f2f4);
}

html[data-theme="dark"] .sw-module-desc {
    color: var(--sm-text-soft, #9fb9bf);
}

html[data-theme="dark"] .sw-hero-lead {
    color: rgba(255, 255, 255, .78);
}

html[data-theme="dark"] .sw-breadcrumb .breadcrumb a {
    color: var(--brand-300, #40c8db);
}

html[data-theme="dark"] .sw-public .breadcrumb > .active {
    color: rgba(255, 255, 255, .7);
}

html[data-theme="dark"] .sw-panel,
html[data-theme="dark"] .sw-public .box:not(.small-box),
html[data-theme="dark"] .sw-public #boxLgpd,
html[data-theme="dark"] .sw-public .small-box {
    background: rgba(8, 32, 38, .82) !important;
    border-color: rgba(64, 200, 219, .14);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .sw-footer {
    background: transparent;
    border-top-color: rgba(255, 255, 255, .12);
}

/* mobile estreito */
@media (max-width: 399.98px) {
    .sw-module {
        gap: 10px;
        padding: 16px 12px;
        min-height: 118px;
    }

    .sw-module-icon {
        font-size: 4.75rem;
        right: 8px;
        max-width: 40%;
        height: 82%;
        opacity: .26;
    }

    .sw-module-icon img {
        width: 4.25rem;
        height: 4.25rem;
    }

    .sw-module-body {
        padding-right: 3.5rem;
    }

    .sw-module-foot {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }
}

/* logo de página (brasão etc.) — nunca esticar o layout */
.sw-page-logo,
.sw-public img.logo,
.sw-main img.logo {
    display: block;
    width: auto;
    max-width: min(240px, 58vw);
    max-height: 96px;
    height: auto;
    margin: 0 auto 14px;
    object-fit: contain;
}

.sw-hero--page {
    padding: 8px 0 32px;
}

.sw-hero--page .sw-hero-title {
    white-space: normal;
    max-width: 52rem;
    font-size: clamp(1.4rem, 3.2vw, 2rem);
}

/* legacy small-box como cards (outras páginas) */
.sw-public a:has(> .small-box),
.sw-public a:has(.small-box) {
    text-decoration: none !important;
}

.sw-public .small-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 160px;
    padding: 24px 72px 22px 22px;
    margin-bottom: 14px;
    border-radius: var(--sw-radius-lg);
    background: var(--sm-surface, #fff) !important;
    border: 1px solid var(--sm-border, #dbe7ea);
    box-shadow: var(--sw-shadow);
    color: var(--sm-text, #1c2b30) !important;
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

/* sem faixa lateral */
.sw-public .small-box::before {
    content: none;
    display: none;
}

.sw-public .small-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(6, 62, 72, .14);
    filter: none;
}

.sw-public .small-box .inner {
    position: relative;
    z-index: 1;
    text-align: left !important;
}

.sw-public .small-box .inner h3,
.sw-public .small-box .h3Style {
    color: var(--sm-text, #1c2b30) !important;
    font-weight: 800;
    font-size: clamp(1.35rem, 2.8vw, 1.85rem) !important;
    letter-spacing: -.4px;
    margin: 0 0 8px !important;
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    line-height: 1.15;
}

.sw-public .small-box .inner p {
    color: var(--sm-text-soft, #566268) !important;
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

/* ícone sombra (AdminLTE .icon-1) — maior e com mais cor */
.sw-public .small-box .icon-1 {
    position: absolute !important;
    right: -2% !important;
    top: 50% !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 0;
    transform: translateY(-50%);
    opacity: .28 !important;
    font-size: clamp(6.5rem, 18vh, 9.5rem) !important;
    color: var(--brand-600, #0f9cb3) !important;
    pointer-events: none;
    line-height: 1 !important;
    height: 118%;
    display: flex !important;
    align-items: center;
}

.sw-public .small-box .icon-1 i {
    font-size: inherit !important;
    color: inherit !important;
}

.sw-public .small-box .icon-1 img,
.sw-public .small-box .small-img {
    width: clamp(5.5rem, 14vh, 8.5rem);
    height: clamp(5.5rem, 14vh, 8.5rem);
    opacity: .32;
    filter: brightness(0) saturate(100%) invert(42%) sepia(48%) saturate(720%) hue-rotate(146deg) brightness(0.95);
}

html[data-theme="dark"] .sw-public .small-box .icon-1 {
    color: var(--brand-300, #40c8db) !important;
    opacity: .34 !important;
}

/* ------------------------------------------------------------
   Painéis de conteúdo / cards
   ------------------------------------------------------------ */

.sw-panel {
    background: var(--sm-surface, #fff);
    border: 1px solid var(--sm-border, #dbe7ea);
    border-radius: var(--sw-radius);
    box-shadow: var(--sw-shadow);
    padding: 24px 22px;
    margin-bottom: 18px;
}

.sw-panel h1,
.sw-panel h2,
.sw-panel h3 {
    color: var(--sm-text, #1c2b30);
    font-weight: 800;
    letter-spacing: -.2px;
}

.sw-panel p {
    color: var(--sm-text, #1c2b30);
    line-height: 1.55;
}

/* Content boxes legados */
.sw-public .box:not(.small-box),
.sw-public #boxLgpd {
    background: var(--sm-surface, #fff) !important;
    border: 1px solid var(--sm-border, #dbe7ea);
    border-radius: var(--sw-radius);
    box-shadow: var(--sw-shadow);
    padding: 24px 22px;
    max-width: 100%;
}

.sw-public #boxLgpd {
    width: auto !important;
    margin: 0 auto 24px;
}

/* ------------------------------------------------------------
   Footer institucional
   ------------------------------------------------------------ */

.sw-footer {
    flex-shrink: 0;
    margin-top: auto;
    background: linear-gradient(160deg, var(--brand-900, #063e48) 0%, var(--brand-800, #085f6d) 100%);
    color: rgba(255, 255, 255, .92);
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.sw-footer-inner {
    max-width: var(--sw-max);
    margin: 0 auto;
    padding: 32px 28px 28px;
}

.sw-footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: start;
}

@media (min-width: 768px) {
    .sw-footer-top {
        grid-template-columns: minmax(220px, 1.2fr) minmax(240px, 1.4fr) auto;
        gap: 28px 32px;
        align-items: center;
    }
}

.sw-footer-brand {
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: center;
    text-align: left;
}

@media (min-width: 768px) {
    .sw-footer-brand {
        justify-content: flex-start;
    }
}

.sw-footer-logo {
    width: min(220px, 72vw);
    height: auto;
    display: block;
    flex-shrink: 0;
    /* silhueta branca sobre o footer teal (placeholder mono) */
    filter: brightness(0) invert(1);
    opacity: .95;
}

/* Brasão de Aracaju — mesma silhueta branca */
.sw-footer-logo--brasao {
    width: min(280px, 78vw);
    max-height: 88px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: .95;
}

.sw-footer-org {
    display: none;
}

.sw-footer-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

@media (min-width: 768px) {
    .sw-footer-meta {
        align-items: flex-start;
    }
}

.sw-footer-address,
.sw-footer-link {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 100%;
    color: rgba(255, 255, 255, .9) !important;
    text-decoration: none !important;
    font-size: 13px;
    line-height: 1.45;
    border: none !important;
    transition: color .15s ease;
}

.sw-footer-address i,
.sw-footer-link i {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    color: var(--brand-300, #40c8db);
    opacity: .95;
}

.sw-footer-address:hover,
.sw-footer-link:hover {
    color: #fff !important;
}

.sw-footer-address:hover i,
.sw-footer-link:hover i {
    color: #fff;
}

.sw-footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

@media (min-width: 768px) {
    .sw-footer-social {
        align-items: flex-end;
    }
}

.sw-footer-social-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
    color: rgba(255, 255, 255, .72);
    text-transform: none;
}

.sw-footer-social-icons {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.sw-footer-social-icons a {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .14) !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 16px;
    transition: background .15s ease, transform .15s ease, border-color .15s ease;
}

.sw-footer-social-icons a:hover {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .28) !important;
    transform: translateY(-1px);
}

.sw-footer-social-icons img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* limpa sobras de regras legadas do footer */
.sw-footer p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .88);
}

.sw-footer a {
    color: #fff;
}

/* ------------------------------------------------------------
   Iframes / painéis embutidos
   ------------------------------------------------------------ */

.sw-public iframe {
    border: none;
    border-radius: 0 0 var(--sw-radius) var(--sw-radius);
    width: 100%;
    background: var(--brand-800, #085f6d);
}

.sw-public .carousel {
    width: 100%;
    overflow: hidden;
    border-radius: var(--sw-radius);
    border: 1px solid var(--sm-border, #dbe7ea);
    background: var(--sm-surface, #fff);
}

/* ------------------------------------------------------------
   Utilitários de páginas legadas
   ------------------------------------------------------------ */

.sw-public .main-container,
.sw-public main.container {
    max-width: none;
    width: 100%;
    padding: 0;
    margin: 0;
}

.sw-public .row {
    margin-left: -8px;
    margin-right: -8px;
}

.sw-public .row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

/* botões primários sob token brand */
.sw-public .btn-primary {
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-800) 100%);
    border-color: var(--brand-700);
}

.sw-public .btn-primary:hover,
.sw-public .btn-primary:focus {
    background: var(--brand-700);
    border-color: var(--brand-800);
}

/* Força texto legível sob overrides legados inline */
.sw-public h1,
.sw-public .h1Style {
    color: var(--sm-text, #1c2b30) !important;
}

.sw-public a[style*="color: rgb(255,255,255)"],
.sw-public a[style*="color:rgb(255,255,255)"] {
    color: inherit;
}

/* Central de Dados — intro (sem color inline para o dark mode funcionar) */
.sw-cdados-intro {
    text-align: left;
    margin-top: 0;
}

.sw-cdados-intro-title {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: center;
    color: var(--sm-text, #1c2b30) !important;
}

.sw-cdados-intro-brand {
    color: var(--brand-800, #085f6d) !important;
}

.sw-cdados-intro-lead {
    font-size: 14px;
    line-height: 1.5;
    text-align: justify;
    color: var(--sm-text-soft, #566268);
    margin-bottom: 1rem;
}

.sw-cdados-intro-lead a {
    color: var(--brand-700, #0b7f92);
    font-weight: 600;
    text-decoration: underline;
}

.sw-cdados-intro-lead a:hover,
.sw-cdados-intro-lead a:focus {
    color: var(--brand-500, #12afc8);
}

html[data-theme="dark"] .sw-cdados-intro-title {
    color: var(--sm-text, #e6f2f4) !important;
}

html[data-theme="dark"] .sw-cdados-intro-brand {
    color: #9ef0fb !important;
}

html[data-theme="dark"] .sw-cdados-intro-lead {
    color: rgba(230, 242, 244, .92) !important;
}

html[data-theme="dark"] .sw-cdados-intro-lead a,
html[data-theme="dark"] .sw-cdados-intro-lead b,
html[data-theme="dark"] .sw-cdados-intro-lead strong {
    color: #9ef0fb !important;
}

/* Fallback: parágrafos legados com color:#000 inline no dark mode */
html[data-theme="dark"] .sw-public .sw-main p[style*="color: #000"],
html[data-theme="dark"] .sw-public .sw-main p[style*="color:#000"],
html[data-theme="dark"] .sw-public .sw-main p[style*="color: #333"],
html[data-theme="dark"] .sw-public .sw-main p[style*="color:#333"] {
    color: rgba(230, 242, 244, .92) !important;
}

html[data-theme="dark"] .sw-public .sw-main p[style*="color: #000"] a,
html[data-theme="dark"] .sw-public .sw-main p[style*="color:#000"] a {
    color: #9ef0fb !important;
}

/* ------------------------------------------------------------
   Modais Bootstrap (casco público) — acima do topbar (z-index 1100)
   e foras de stacking context do flex / overflow do body.
   ------------------------------------------------------------ */

body.sw-public .modal-backdrop {
    position: fixed !important;
    z-index: 1190 !important;
}

body.sw-public .modal {
    position: fixed !important;
    z-index: 1200 !important;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* dialog legível e fluido em mobile / desktop */
body.sw-public .modal .modal-dialog {
    width: auto;
    max-width: min(720px, calc(100vw - 24px));
    margin: 28px auto;
}

body.sw-public .modal .modal-content {
    border-radius: 14px;
    border: 1px solid var(--sm-border, #dbe7ea);
    box-shadow: 0 24px 56px rgba(6, 62, 72, .24);
    color: var(--sm-text, #1c2b30);
    background: var(--sm-surface, #fff);
}

body.sw-public .modal .modal-header {
    border-bottom-color: var(--sm-border, #dbe7ea);
    padding: 16px 20px;
}

body.sw-public .modal .modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-900, #063e48);
    line-height: 1.3;
}

body.sw-public .modal .modal-body {
    padding: 16px 20px;
    max-height: min(70vh, 640px);
    overflow-y: auto;
    color: var(--sm-text, #1c2b30);
}

body.sw-public .modal .modal-footer {
    border-top-color: var(--sm-border, #dbe7ea);
    padding: 12px 20px 16px;
}

body.sw-public .modal .close {
    opacity: .7;
    text-shadow: none;
    color: var(--sm-text, #1c2b30);
}

html[data-theme="dark"] body.sw-public .modal .modal-content {
    background: rgba(8, 32, 38, .97);
    border-color: rgba(64, 200, 219, .16);
    color: var(--sm-text, #e6f2f4);
}

html[data-theme="dark"] body.sw-public .modal .modal-title {
    color: #e6f2f4;
}

html[data-theme="dark"] body.sw-public .modal .modal-header,
html[data-theme="dark"] body.sw-public .modal .modal-footer {
    border-color: rgba(64, 200, 219, .12);
}

html[data-theme="dark"] body.sw-public .modal .modal-body {
    color: rgba(230, 242, 244, .9);
}

html[data-theme="dark"] body.sw-public .modal .close {
    color: #e6f2f4;
}

/* ------------------------------------------------------------
   Modais de seleção de escolas (por região / por bairro)
   ------------------------------------------------------------ */

.sw-school-modal {
    z-index: 1200;
}

.sw-school-modal + .modal-backdrop,
.modal-backdrop {
    z-index: 1190;
}

.sw-school-modal .modal-dialog {
    width: auto;
    max-width: min(920px, calc(100vw - 24px));
    margin: 24px auto;
}

@media (max-width: 767.98px) {
    .sw-school-modal .modal-dialog {
        margin: 12px auto;
        max-width: calc(100vw - 16px);
    }
}

.sw-school-modal .modal-content {
    border: 1px solid var(--sm-border, #dbe7ea);
    border-radius: 16px;
    box-shadow: 0 24px 56px rgba(6, 62, 72, .22);
    overflow: hidden;
    background: var(--sm-surface, #fff);
    color: var(--sm-text, #1c2b30);
}

.sw-school-modal .modal-header {
    position: relative;
    padding: 18px 22px 12px;
    border-bottom: 1px solid var(--sm-border, #dbe7ea);
    background: color-mix(in srgb, var(--brand-900, #063e48) 4%, var(--sm-surface, #fff));
}

.sw-school-modal .modal-title {
    margin: 0 36px 0 0;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--brand-900, #063e48);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.25;
}

.sw-school-modal .modal-title i {
    color: var(--brand-600, #0f9cb3);
    font-size: .95em;
}

.sw-school-modal-lead {
    margin: 8px 36px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--sm-text-soft, #566268);
}

.sw-school-modal .close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    opacity: .7;
    font-size: 22px;
    line-height: 34px;
    color: var(--sm-text, #1c2b30);
    text-shadow: none;
}

.sw-school-modal .close:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 10%, transparent);
}

.sw-school-modal .modal-body {
    padding: 16px 22px 8px;
    max-height: min(62vh, 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sw-school-modal-search {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    margin: 0 0 16px;
    padding: 0 0 12px;
    background: linear-gradient(to bottom, var(--sm-surface, #fff) 72%, transparent);
}

.sw-school-modal-search > i {
    position: absolute;
    left: 14px;
    color: var(--brand-600, #0f9cb3);
    font-size: 14px;
    pointer-events: none;
}

.sw-school-modal-search .form-control {
    width: 100%;
    height: 44px;
    padding: 10px 14px 10px 40px;
    border-radius: 12px;
    border: 1px solid var(--sm-border, #dbe7ea);
    box-shadow: none;
    font-size: 14px;
    color: var(--sm-text, #1c2b30);
    background: var(--sm-surface, #fff);
}

.sw-school-modal-search .form-control:focus {
    border-color: color-mix(in srgb, var(--brand-600, #0f9cb3) 55%, var(--sm-border, #dbe7ea));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-600, #0f9cb3) 18%, transparent);
    outline: none;
}

.sw-school-modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px 18px;
}

@media (min-width: 640px) {
    .sw-school-modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sw-school-block {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--sm-border, #dbe7ea);
    background: color-mix(in srgb, var(--brand-900, #063e48) 3%, var(--sm-surface, #fff));
}

.sw-school-block-title {
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--brand-600, #0f9cb3) 18%, transparent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--brand-800, #085f6d);
    line-height: 1.3;
}

.sw-school-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sw-school-list li {
    margin: 0;
    padding: 0;
}

.sw-school-list a {
    display: block;
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--sm-text, #1c2b30) !important;
    text-decoration: none !important;
    transition: background .12s ease, color .12s ease;
}

.sw-school-list a:hover,
.sw-school-list a:focus {
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 12%, transparent);
    color: var(--brand-900, #063e48) !important;
    text-decoration: none !important;
}

.sw-school-modal-empty {
    grid-column: 1 / -1;
    margin: 12px 0;
    color: var(--sm-text-soft, #566268);
    font-size: 14px;
}

.sw-school-modal .modal-footer {
    padding: 12px 22px 16px;
    border-top: 1px solid var(--sm-border, #dbe7ea);
    text-align: right;
    background: var(--sm-surface, #fff);
}

.sw-school-modal-close {
    min-height: 40px;
    padding: 8px 18px;
    border-radius: 10px !important;
    border: 1px solid var(--sm-border, #dbe7ea) !important;
    background: color-mix(in srgb, var(--brand-900, #063e48) 4%, #fff) !important;
    color: var(--brand-900, #063e48) !important;
    font-weight: 650;
}

.sw-school-modal-close:hover {
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 14%, #fff) !important;
    border-color: color-mix(in srgb, var(--brand-600, #0f9cb3) 40%, var(--sm-border)) !important;
}

html[data-theme="dark"] .sw-school-modal .modal-content {
    background: rgba(8, 32, 38, .96);
    border-color: rgba(64, 200, 219, .16);
}

html[data-theme="dark"] .sw-school-modal .modal-header,
html[data-theme="dark"] .sw-school-modal .modal-footer {
    background: rgba(4, 21, 25, .55);
    border-color: rgba(64, 200, 219, .12);
}

html[data-theme="dark"] .sw-school-modal .modal-title {
    color: #e6f2f4;
}

html[data-theme="dark"] .sw-school-modal-lead,
html[data-theme="dark"] .sw-school-modal-empty {
    color: rgba(255, 255, 255, .72);
}

html[data-theme="dark"] .sw-school-modal .close {
    color: #e6f2f4;
}

html[data-theme="dark"] .sw-school-modal-search .form-control {
    background: rgba(4, 21, 25, .6);
    border-color: rgba(64, 200, 219, .2);
    color: #e6f2f4;
}

html[data-theme="dark"] .sw-school-block {
    background: rgba(4, 21, 25, .45);
    border-color: rgba(64, 200, 219, .14);
}

html[data-theme="dark"] .sw-school-block-title {
    color: #9ef0fb;
    border-bottom-color: rgba(64, 200, 219, .18);
}

html[data-theme="dark"] .sw-school-list a {
    color: rgba(255, 255, 255, .88) !important;
}

html[data-theme="dark"] .sw-school-list a:hover,
html[data-theme="dark"] .sw-school-list a:focus {
    background: rgba(64, 200, 219, .14);
    color: #9ef0fb !important;
}

html[data-theme="dark"] .sw-school-modal-close {
    background: rgba(64, 200, 219, .1) !important;
    border-color: rgba(64, 200, 219, .22) !important;
    color: #9ef0fb !important;
}

/* ------------------------------------------------------------
   Página da unidade de ensino (resumo completo)
   ------------------------------------------------------------ */

.sw-school-page {
    padding-bottom: 40px;
}

/* título de página — alinhado à esquerda + ícone (escolas hub, unidade, CONMEA) */
.sw-hero.sw-hero--heading {
    text-align: left;
    padding: 8px 0 28px;
}

.sw-hero.sw-hero--heading .sw-hero-title {
    align-items: flex-start;
    max-width: none;
    margin: 0;
    text-align: left;
}

.sw-hero--heading .sw-hero-heading {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.sw-hero--heading .sw-hero-heading > i {
    flex-shrink: 0;
    width: 1.15em;
    height: 1.15em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72em;
    color: var(--brand-600, #0f9cb3);
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 12%, transparent);
    border-radius: 12px;
    padding: .28em;
    box-sizing: content-box;
}

.sw-hero--heading .sw-hero-line {
    text-align: left;
}

/* alias legado (detalhe da escola) */
.sw-school-name {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.sw-school-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 28px;
}

@media (min-width: 768px) {
    .sw-school-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }
}

.sw-school-stat {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--sm-border, #dbe7ea);
    background: var(--sm-surface, #fff);
    box-shadow: var(--sw-shadow, 0 8px 24px rgba(6, 62, 72, .06));
    min-height: 88px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none !important;
}

.sw-school-stat-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--brand-700, #0c7a8c);
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 14%, transparent);
    line-height: 1;
}

.sw-school-stat-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sw-school-stat--phone .sw-school-stat-icon,
.sw-school-stat--link .sw-school-stat-icon {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-600, #0f9cb3) 0%, var(--brand-700, #0c7a8c) 100%);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-600, #0f9cb3) 28%, transparent);
}

a.sw-school-stat--link {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

a.sw-school-stat--link:hover,
a.sw-school-stat--link:focus {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--brand-600, #0f9cb3) 40%, var(--sm-border, #dbe7ea));
    box-shadow: 0 12px 28px rgba(6, 62, 72, .12);
    text-decoration: none !important;
}

.sw-school-stat-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--sm-text-soft, #566268);
}

.sw-school-stat-value {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--brand-900, #063e48);
    line-height: 1.25;
    word-break: break-word;
}

.sw-school-stat-hint {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-600, #0f9cb3);
    line-height: 1.2;
}

/* botões de telefone (mesmo estilo .sw-school-action) */
.sw-school-phone-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sw-school-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 900px) {
    .sw-school-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .sw-school-card--wide {
        grid-column: 1 / -1;
    }
}

.sw-school-card {
    margin: 0;
    padding: 18px 18px 16px;
    border-radius: 16px;
    border: 1px solid var(--sm-border, #dbe7ea);
    background: var(--sm-surface, #fff);
    box-shadow: var(--sw-shadow, 0 8px 24px rgba(6, 62, 72, .06));
    min-width: 0;
}

.sw-school-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--brand-600, #0f9cb3) 16%, transparent);
}

.sw-school-card-title {
    margin: 0;
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--brand-900, #063e48);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    line-height: 1.25;
}

.sw-school-card-title i {
    color: var(--brand-600, #0f9cb3);
    font-size: .9em;
    flex-shrink: 0;
}

.sw-school-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-800, #085f6d);
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 12%, transparent);
}

.sw-school-dl {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px 18px;
    margin: 0;
}

@media (min-width: 576px) {
    .sw-school-dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sw-school-dl > div {
    min-width: 0;
}

.sw-school-dl-full {
    grid-column: 1 / -1;
}

.sw-school-dl dt {
    margin: 0 0 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--sm-text-soft, #566268);
}

.sw-school-dl dd {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--sm-text, #1c2b30);
    word-break: break-word;
}

.sw-school-dl a:not(.sw-school-action) {
    color: var(--brand-700, #0c7a8c) !important;
    text-decoration: none !important;
    font-weight: 650;
}

.sw-school-dl a:not(.sw-school-action):hover {
    text-decoration: underline !important;
}

/* endereço + botão mapa na mesma linha */
.sw-school-address-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
}

.sw-school-address-text {
    flex: 1 1 180px;
    min-width: 0;
    line-height: 1.45;
}

.sw-school-address-row .sw-school-action {
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
    white-space: nowrap;
}

.sw-school-prose {
    font-size: 15px;
    line-height: 1.65;
    color: var(--sm-text, #1c2b30);
    background: transparent;
}

.sw-school-prose p,
.sw-school-prose span,
.sw-school-prose li,
.sw-school-prose div,
.sw-school-prose td,
.sw-school-prose font {
    color: inherit;
}

/* anula fundo branco / cor preta do HTML colado (Word/Docs) — mantém o card */
.sw-school-prose [style*="background"],
.sw-school-prose [style*="BACKGROUND"] {
    background: transparent !important;
    background-color: transparent !important;
}

.sw-school-prose p {
    margin: 0 0 12px;
}

.sw-school-prose p:last-child {
    margin-bottom: 0;
}

.sw-school-muted {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--sm-text-soft, #566268);
}

.sw-school-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 14px;
    border-radius: 12px;
    border: 1px solid var(--sm-border, #dbe7ea);
}

.sw-school-table {
    width: 100%;
    min-width: 320px;
    border-collapse: collapse;
    font-size: 13px;
}

.sw-school-table th,
.sw-school-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--sm-border, #dbe7ea);
    vertical-align: middle;
}

.sw-school-table thead th {
    background: color-mix(in srgb, var(--brand-900, #063e48) 5%, var(--sm-surface, #fff));
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--brand-800, #085f6d);
    font-weight: 800;
}

.sw-school-table tbody tr:last-child td {
    border-bottom: none;
}

.sw-school-table tbody tr:hover {
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 7%, transparent);
}

.sw-school-table td:last-child,
.sw-school-table th:last-child {
    text-align: center;
    width: 96px;
    font-weight: 700;
}

.sw-school-table tfoot th,
.sw-school-table tfoot td {
    background: color-mix(in srgb, var(--brand-900, #063e48) 4%, var(--sm-surface, #fff));
    border-bottom: none;
    font-weight: 800;
    color: var(--brand-900, #063e48);
}

.sw-school-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.sw-school-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 11px;
    border: 1px solid color-mix(in srgb, var(--brand-600, #0f9cb3) 28%, var(--sm-border, #dbe7ea));
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 8%, #fff);
    color: var(--brand-900, #063e48) !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
    box-sizing: border-box;
}

.sw-school-action:hover {
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 16%, #fff);
    border-color: color-mix(in srgb, var(--brand-600, #0f9cb3) 45%, var(--sm-border, #dbe7ea));
    transform: translateY(-1px);
    text-decoration: none !important;
    color: var(--brand-900, #063e48) !important;
}

.sw-school-action--primary {
    background: linear-gradient(135deg, var(--brand-600, #0f9cb3) 0%, var(--brand-700, #0c7a8c) 100%);
    border-color: transparent;
    color: #fff !important;
}

.sw-school-action--primary:hover {
    background: linear-gradient(135deg, var(--brand-500, #12afc8) 0%, var(--brand-700, #0c7a8c) 100%);
    color: #fff !important;
}

.sw-school-back {
    margin: 28px 0 8px;
    text-align: center;
}

.sw-school-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--brand-600, #0f9cb3) 30%, var(--sm-border, #dbe7ea));
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 10%, var(--sm-surface, #fff));
    color: var(--brand-900, #063e48) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(6, 62, 72, .08);
    transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.sw-school-back-btn:hover,
.sw-school-back-btn:focus {
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 18%, var(--sm-surface, #fff));
    border-color: color-mix(in srgb, var(--brand-600, #0f9cb3) 48%, var(--sm-border, #dbe7ea));
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(6, 62, 72, .12);
    text-decoration: none !important;
    color: var(--brand-900, #063e48) !important;
}

.sw-school-back-btn i {
    font-size: 13px;
    color: var(--brand-600, #0f9cb3);
}

/* dark — ícone do título de página */
html[data-theme="dark"] .sw-hero--heading .sw-hero-heading > i {
    color: #9ef0fb;
    background: rgba(64, 200, 219, .14);
}

html[data-theme="dark"] .sw-school-stat,
html[data-theme="dark"] .sw-school-card {
    background: rgba(8, 32, 38, .82);
    border-color: rgba(64, 200, 219, .14);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .sw-school-stat-icon {
    color: #9ef0fb;
    background: rgba(64, 200, 219, .14);
}

html[data-theme="dark"] .sw-school-stat--phone .sw-school-stat-icon,
html[data-theme="dark"] .sw-school-stat--link .sw-school-stat-icon {
    color: #041519;
    background: linear-gradient(135deg, var(--brand-500, #12afc8) 0%, var(--brand-700, #0c7a8c) 100%);
}

html[data-theme="dark"] .sw-school-stat-value,
html[data-theme="dark"] .sw-school-card-title,
html[data-theme="dark"] .sw-school-dl dd {
    color: var(--sm-text, #e6f2f4);
}

html[data-theme="dark"] .sw-school-stat-label,
html[data-theme="dark"] .sw-school-dl dt,
html[data-theme="dark"] .sw-school-muted {
    color: var(--sm-text-soft, #9fb9bf);
}

html[data-theme="dark"] .sw-school-stat-hint {
    color: #9ef0fb;
}

html[data-theme="dark"] a.sw-school-stat--link:hover,
html[data-theme="dark"] a.sw-school-stat--link:focus {
    border-color: rgba(64, 200, 219, .35);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .sw-school-card-head {
    border-bottom-color: rgba(64, 200, 219, .14);
}

/* história: texto claro + fundo transparente (sem “bloco branco”) */
html[data-theme="dark"] .sw-school-prose {
    color: rgba(230, 242, 244, .92) !important;
    background: transparent !important;
    background-color: transparent !important;
}

html[data-theme="dark"] .sw-school-prose *,
html[data-theme="dark"] .sw-school-prose p,
html[data-theme="dark"] .sw-school-prose span,
html[data-theme="dark"] .sw-school-prose li,
html[data-theme="dark"] .sw-school-prose div,
html[data-theme="dark"] .sw-school-prose td,
html[data-theme="dark"] .sw-school-prose th,
html[data-theme="dark"] .sw-school-prose strong,
html[data-theme="dark"] .sw-school-prose b,
html[data-theme="dark"] .sw-school-prose em,
html[data-theme="dark"] .sw-school-prose i:not([class*="fa-"]),
html[data-theme="dark"] .sw-school-prose a,
html[data-theme="dark"] .sw-school-prose font {
    color: rgba(230, 242, 244, .92) !important;
    background: transparent !important;
    background-color: transparent !important;
}

html[data-theme="dark"] .sw-school-prose a {
    color: #9ef0fb !important;
    text-decoration: underline;
}

html[data-theme="dark"] .sw-school-table-wrap {
    border-color: rgba(64, 200, 219, .14);
}

html[data-theme="dark"] .sw-school-table th,
html[data-theme="dark"] .sw-school-table td {
    border-bottom-color: rgba(64, 200, 219, .1);
    color: rgba(230, 242, 244, .9);
}

html[data-theme="dark"] .sw-school-table thead th,
html[data-theme="dark"] .sw-school-table tfoot th,
html[data-theme="dark"] .sw-school-table tfoot td {
    background: rgba(4, 21, 25, .55);
    color: #9ef0fb;
}

html[data-theme="dark"] .sw-school-table tbody tr:hover {
    background: rgba(64, 200, 219, .08);
}

html[data-theme="dark"] .sw-school-action {
    background: rgba(64, 200, 219, .1);
    border-color: rgba(64, 200, 219, .22);
    color: #9ef0fb !important;
}

html[data-theme="dark"] .sw-school-badge {
    background: rgba(64, 200, 219, .14);
    color: #9ef0fb;
}

html[data-theme="dark"] .sw-school-back-btn {
    background: rgba(64, 200, 219, .12);
    border-color: rgba(64, 200, 219, .28);
    color: #e6f2f4 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

html[data-theme="dark"] .sw-school-back-btn:hover,
html[data-theme="dark"] .sw-school-back-btn:focus {
    background: rgba(64, 200, 219, .2);
    color: #fff !important;
}

html[data-theme="dark"] .sw-school-back-btn i {
    color: #9ef0fb;
}

/* Mobile */
@media (max-width: 575.98px) {
    .sw-hero {
        gap: 12px;
    }

    .sw-public .small-box {
        min-height: 140px;
    }

    .sw-school-modal .modal-body {
        max-height: min(68vh, 520px);
        padding: 12px 14px 6px;
    }

    .sw-school-modal .modal-header,
    .sw-school-modal .modal-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .sw-school-card {
        padding: 14px 14px 12px;
    }

    .sw-hero--heading .sw-hero-heading {
        gap: 10px;
    }

    .sw-school-stat {
        min-height: 80px;
        padding: 12px;
    }

    .sw-school-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .sw-school-address-row {
        flex-direction: column;
        align-items: stretch;
    }

    .sw-school-address-row .sw-school-action,
    .sw-school-phone-actions .sw-school-action {
        width: 100%;
    }
}
