/* ESP CMS - Matricula publica
 * Estilo replicando matricula-gestao-hospitalar2024 (assets/css/style.css).
 * Cores oficiais: cinza #6b7280, vermelho #ED3237.
 */

body {
    padding-right: 0 !important;
    background: #fff;
    color: #333;
}

/* ============== Banner topo ============== */
/* banner-default.png eh 4000x730 (proporcao 5.48:1, bem widescreen).
 * Fixamos altura ~380px pra a imagem cover preencher tudo sem deixar areas azuis lisas.
 * Override do is-medium do Bulma que forca 60vh.
 * position:relative pra ancorar .marcas absolutas na borda inferior */
#topo,
#topo.hero.is-medium {
    background-color: #374151;
    background-image: url("/assets/matricula/banner-default.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 380px;
    max-height: 480px;
    height: auto;
    position: relative;
    padding-bottom: 80px; /* espaco reservado pras marcas absolutas */
}

#topo .navbar {
    background: transparent;
    box-shadow: none;
    padding: 10px 0;
    /* Forca layout horizontal nos extremos (logo esquerda, botao direita) sempre */
    min-height: auto;
}

#topo .navbar > .container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
    box-sizing: border-box;
}

/* Logo Funesa — sem fundo branco (logo direto sobre o banner) */
#topo .navbar-brand {
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

#topo .navbar-brand .navbar-item {
    background: transparent;
    padding: 0;
    box-shadow: none;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    line-height: 0;
    box-sizing: border-box;
}

#topo .navbar-brand .navbar-item:hover {
    background: transparent;
    transform: translateY(-1px);
    box-shadow: none;
}

#topo .navbar-item img {
    max-height: 3rem;
    width: auto;
    height: auto;
    display: block;
    background: transparent;
    vertical-align: middle;
}

/* Botao "Voltar para Funesa" — forca aparecer no canto direito */
#topo .navbar-menu {
    background: transparent;
    box-shadow: none;
    flex-grow: 0;
    margin: 0;
    padding: 0;
    display: flex !important;
    flex-direction: row;
}

#topo .navbar-menu .navbar-end {
    margin: 0;
}

#topo .navbar-menu .navbar-item {
    padding: 0;
}

.btn-voltar-funesa {
    background: rgba(255, 255, 255, 0.95);
    color: #374151 !important;
    border: none;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-voltar-funesa:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

#topo .hero-body {
    padding: 2.5rem 0 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;  /* titulo em cima, marcas no fim */
    flex-grow: 1;
    width: 100%;
}

#topo .hero-body > .container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 30px;
    box-sizing: border-box;
}

.marcas { flex-shrink: 0; }

#topo .hero-body .title {
    color: #fff; /* sobrescrita possivel via inline style do JS (config.textos.titulo_cor) */
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    font-size: 1.5rem;
    line-height: 1.4;
    max-width: 900px;
    margin: 0 auto;
}

/* Quill HTML interno no titulo (negrito, italico, links etc.) */
#topo .hero-body .title p {
    color: inherit;
    margin: 0 0 0.3em;
    font-size: inherit;
    font-weight: inherit;
}
#topo .hero-body .title p:last-child { margin-bottom: 0; }
#topo .hero-body .title strong, #topo .hero-body .title b { color: inherit; font-weight: 800; }
#topo .hero-body .title em, #topo .hero-body .title i { color: inherit; font-style: italic; }
#topo .hero-body .title a { color: inherit; text-decoration: underline; }
#topo .hero-body .title .ql-align-center { text-align: center; }
#topo .hero-body .title .ql-align-right { text-align: right; }

#topo .hero-body .subtitle {
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
    margin: 12px auto 0;
    font-size: 1rem;
    text-align: center;
    display: block;
    width: 100%;
}

#topo .hero-body .container {
    text-align: center;
}

/* Marcas (Governo esquerda, ESP direita) — ancoradas na borda inferior do banner */
.marcas {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 30px;
    box-sizing: border-box;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* Logos Governo + ESP — mesmo tamanho/estilo da logo Funesa do topo */
.marcas img {
    background: transparent;
    padding: 0;
    box-shadow: none;
    box-sizing: content-box;
    height: 3rem;
    width: auto;
    display: block;
}

/* ============== Container central (texto, link, form) ============== */
.main-container {
    padding: 0 20px;
    background: #f5f5f5;
    min-height: calc(100vh - 360px);
}

.conteudo-centro {
    max-width: 920px;
    margin: 0 auto;
    padding: 40px 0 60px;
}

/* Bloco descritivo do edital (HTML rich text via Quill) */
.title-edital {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    padding: 1.2rem 1.4rem;
    font-size: 0.92rem;
    color: #fff;
    font-weight: 400;
    text-align: justify;
    border-radius: 6px;
    margin-bottom: 16px;
    line-height: 1.6;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.18);
}

.title-edital p { margin: 0 0 0.5em 0; color: #fff; }
.title-edital p:last-child { margin-bottom: 0; }
.title-edital strong, .title-edital b { color: #fff; font-weight: 700; }
.title-edital em, .title-edital i { color: #fff; font-style: italic; }
.title-edital a { color: #fff; text-decoration: underline; }
.title-edital a:hover { opacity: 0.85; }
.title-edital ul, .title-edital ol { color: #fff; padding-left: 1.5em; margin: 0.5em 0; }
.title-edital li { color: #fff; margin: 0.2em 0; }
.title-edital h2, .title-edital h3 { color: #fff; margin: 0.5em 0 0.3em; }
.title-edital .ql-align-center { text-align: center; }
.title-edital .ql-align-right { text-align: right; }
.title-edital .ql-align-justify { text-align: justify; }

.link-edital {
    margin-top: 10px;
    margin-bottom: 25px;
    text-align: center;
}

.link-edital a {
    text-transform: uppercase;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.link-edital a:hover {
    text-decoration: underline;
}

.link-edital a i {
    font-size: 1.1rem;
}

/* ============== Form como card ============== */
/* gap entre colunas e padding lateral usam o MESMO valor (--form-gap)
 * pra distancia visual ser identica entre campos e entre campo/borda */
:root {
    --form-gap: 24px;
}

#cpfCheckState,
#formState {
    background: #fff;
    border-radius: 12px;
    padding: 32px var(--form-gap);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #eeeeee;
}

#matriculaForm {
    padding-top: 0;
}

/* Titulos das secoes */
.title.secao,
#matriculaForm h2.title {
    border-bottom: 2px solid #e8e8e8;
    padding-bottom: 0.7rem;
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    color: #374151;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.8px;
    position: relative;
}

.title.secao::after,
#matriculaForm h2.title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #6b7280;
}

#matriculaForm h2.title:first-of-type,
#cpfCheckState h2.title:first-of-type {
    margin-top: 0;
}

/* Inputs com bg branco + borda completa, estilo ESP */
.input,
.select select {
    border: 1px solid #dadada;
    border-radius: 6px;
    box-shadow: none;
    padding: 8px 12px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    height: 2.6em;
    color: #333;
    font-size: 0.92rem;
}

.input:hover,
.select select:hover {
    border-color: #b8b8b8;
}

.input:focus,
.select select:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
    outline: none;
    background: #fff;
}

.input[readonly] {
    color: #666;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #e2e2e2;
}

.field {
    margin-bottom: 1rem;
}

/* Inputs/selects ocupam a largura disponivel do .field (que ja eh
 * flex-1 dentro de .field-body, ou 100% como filho direto do form) */
.field .control { width: 100%; box-sizing: border-box; }
.field .input,
.field .select,
.field .select select {
    width: 100%;
    box-sizing: border-box;
}

/* Field solto (filho direto do form ou do estado, fora de field-body) ocupa linha inteira */
#matriculaForm > .field,
#cpfCheckState > .field,
#formState > .field {
    width: 100%;
    max-width: 100%;
    flex: none;
}

.field .label {
    color: #374151;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Asterisco de obrigatorio em vermelho dentro dos labels */
.required-asterisk-inline {
    color: #ED3237;
    font-weight: 700;
    margin-left: 2px;
}

.select::after {
    border-color: #6b7280 !important;
}

.select {
    width: 100%;
}

/* Field-body lado a lado */
.field-body {
    margin-bottom: 0.75rem;
    display: flex;
    gap: var(--form-gap);
    box-sizing: border-box;
    width: 100%;
}

.field-body > .field {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}

/* ============== Anexos em grid (cards com icone) ============== */
.anexos-grid {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}
.anexos-grid-1 { grid-template-columns: 1fr; }
.anexos-grid-2 { grid-template-columns: 1fr 1fr; }
.anexos-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.anexo-card {
    position: relative;
    background: #fafafa;
    border: 2px dashed #cccccc;
    border-radius: 10px;
    padding: 18px 12px 14px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.anexo-card:hover {
    border-color: #6b7280;
    background: #f4f4f4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.1);
}

.anexo-card.has-file {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-color: #2e7d32;
    border-style: solid;
}

.anexo-card-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 0;
}

.anexo-icon {
    font-size: 1.8rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.anexo-card.has-file .anexo-icon {
    color: #2e7d32;
}

.anexo-titulo {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.25;
    text-align: center;
}

.required-asterisk {
    color: #ED3237;
    font-weight: 700;
    margin-left: 2px;
}

.anexo-arquivo {
    font-size: 0.72rem;
    color: #999;
    margin-top: 6px;
    word-break: break-all;
    max-width: 100%;
    line-height: 1.3;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    width: 100%;
}

.anexo-card.has-file .anexo-arquivo {
    color: #2e7d32;
    background: rgba(46, 125, 50, 0.08);
    font-weight: 500;
}

/* Versao inline (CPF lado a lado com input texto) — mesma altura do .input pra alinhamento perfeito */
.anexo-card-inline {
    background: #fafafa;
    border: 2px dashed #cccccc;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    min-height: calc(2.6em + 2px); /* casa com altura do input considerando border */
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.anexo-card-inline:hover {
    border-color: #6b7280;
    background: #f4f4f4;
}

.anexo-card-inline.has-file {
    background: #e8f5e9;
    border-color: #2e7d32;
    border-style: solid;
}

.anexo-card-label-inline {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 14px;
    width: 100%;
    margin: 0;
    text-align: center;
}

.anexo-icon-inline {
    color: #6b7280;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.anexo-card-inline.has-file .anexo-icon-inline {
    color: #2e7d32;
}

.anexo-arquivo-inline {
    font-size: 0.88rem;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.anexo-card-inline:not(.has-file):hover .anexo-arquivo-inline {
    color: #6b7280;
}

.anexo-card-inline.has-file .anexo-arquivo-inline {
    color: #2e7d32;
}

/* Field-body de 3 colunas — agora forcado a 2 (consistencia com anexos) */
.field-body-3 {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.field-body-3 > .field {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: calc(50% - 0.75rem);
}

/* Garante gap igual ao padding lateral do card pra distancia simetrica */
.field-body {
    gap: var(--form-gap);
}

.anexos-grid {
    gap: var(--form-gap);
}

.uploads-pair {
    gap: var(--form-gap);
}

/* ============== Doc upload (legado, mantido pra compat) ============== */
.doc-upload {
    border: 2px dashed #cccccc;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 4px;
    margin-bottom: 14px;
    background: #fafafa;
    transition: all 0.2s;
    position: relative;
}

.doc-upload:hover {
    border-color: #6b7280;
    background: #f4f4f4;
}

.doc-upload.has-file {
    border-color: #2e7d32;
    border-style: solid;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
}

.doc-upload-label {
    font-weight: 600;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.88rem;
    gap: 10px;
}

.required-badge {
    background: #ED3237;
    color: #fff;
    font-size: 0.62rem;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.optional-badge {
    background: #888;
    color: #fff;
    font-size: 0.62rem;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.doc-upload input[type="file"] {
    width: 100%;
    font-size: 0.85rem;
    padding: 4px 0;
}

.doc-upload .file-status {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #2e7d32;
    font-weight: 500;
}

/* Pair de uploads lado a lado (identidade frente/verso) */
.uploads-pair {
    display: flex;
    gap: 1rem;
}

.uploads-pair .field {
    flex: 1;
}

/* ============== Termos / checkboxes ============== */
.checkbox {
    color: #444;
    line-height: 1.6;
    display: block;
    margin-bottom: 14px;
    font-size: 0.88rem;
}

.checkbox input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.15);
    vertical-align: middle;
}

/* ============== Botoes ============== */
.button.is-primary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 6px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.25);
    letter-spacing: 0.4px;
}

.button.is-primary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(107, 114, 128, 0.4);
}

.button.is-primary:active {
    transform: translateY(0);
}

.button.is-medium {
    font-size: 1rem;
    height: auto;
    padding: 14px 28px;
}

/* ============== Responsivo ============== */
@media only screen and (max-width: 768px) {
    /* Banner pode crescer com o conteudo — remove max-height que cortava texto.
     * padding-bottom grande pras marcas absolutas nao colidirem com titulo. */
    #topo,
    #topo.hero.is-medium {
        min-height: 240px;
        max-height: none;
        padding-bottom: 100px;
    }
    #topo .hero-body {
        padding: 2rem 1rem 2rem;
    }
    #topo .hero-body .title {
        font-size: 1rem;
        line-height: 1.35;
    }
    #topo .hero-body .subtitle {
        font-size: 0.85rem;
    }
    .marcas {
        padding: 0 15px;
    }
    .marcas img {
        height: 2.2rem;
        padding: 0;
    }

    #topo .navbar-brand .navbar-item { padding: 0; }
    #topo .navbar-item img { max-height: 2.5rem; }
    .btn-voltar-funesa { padding: 6px 12px; font-size: 0.8rem; }

    .conteudo-centro {
        padding: 20px 0;
    }

    .title-edital {
        font-size: 0.82rem;
        padding: 0.85rem;
    }

    .link-edital a {
        font-size: 0.8rem;
    }

    .title.secao {
        font-size: 1rem;
    }

    /* Mobile: campos lado a lado viram empilhados */
    .field-body, .uploads-pair, .field-body-3 {
        flex-direction: column;
        gap: 0;
    }

    .field-body .field, .uploads-pair .field, .field-body-3 .field {
        width: 100%;
    }

    .doc-upload-label {
        flex-wrap: wrap;
    }

    /* Anexos grid: vira coluna unica em mobile */
    .anexos-grid-2,
    .anexos-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .anexo-card { min-height: 110px; padding: 14px 8px; }
    .anexo-icon { font-size: 1.5rem; }
    .anexo-titulo { font-size: 0.75rem; }
}

@media only screen and (max-width: 480px) {
    .anexos-grid-3 {
        grid-template-columns: 1fr;
    }
    #cpfCheckState, #formState {
        padding: 20px 16px;
    }
}

@media only screen and (max-width: 480px) {
    #topo .navbar .container {
        flex-wrap: wrap;
    }
    .btn-voltar-funesa span:not(.icon) {
        display: none;
    }
    .btn-voltar-funesa {
        padding: 6px 10px;
    }

    /* FIX RAIZ: em mobile as marcas saem do absolute e viram normal flow.
     * Absolute funciona em desktop (banner grande, espaco sobrando) mas em
     * mobile o texto do titulo cresce e colide com as logos. Flow normal
     * empurra as marcas pra baixo do titulo. */
    #topo,
    #topo.hero.is-medium {
        min-height: auto;
        max-height: none;
        padding-bottom: 0;
        display: flex;
        flex-direction: column;
    }
    .marcas {
        position: static;
        padding: 12px 15px 14px;
        gap: 10px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    .marcas img {
        height: 2rem;
        padding: 0;
    }
    /* Hero body ajusta padding: sem reservar espaco pras marcas (sao flow agora) */
    #topo .hero-body {
        padding: 1.5rem 1rem 0.5rem;
    }

    /* Fix overlap: field-body normaliza gap quando empilhado */
    .field-body, .uploads-pair, .field-body-3 {
        gap: 0.75rem !important;
    }

    /* Anexos grid em mobile pequeno: 1 coluna pra nao espremer */
    .anexos-grid-2,
    .anexos-grid-3 {
        grid-template-columns: 1fr !important;
    }

    /* Container central com padding garantido pra nao cortar conteudo */
    .main-container {
        padding: 0 12px;
    }
}

/* Telefones muito pequenos (<360px, iPhone SE velho, Galaxy antigos) */
@media only screen and (max-width: 360px) {
    /* Marcas stack vertical (ja eram static do 480px) */
    .marcas {
        flex-direction: column;
        gap: 8px;
        align-items: center;
        padding: 10px 5px 12px;
    }
    #topo .hero-body .title {
        font-size: 0.95rem;
    }
    .title-edital {
        font-size: 0.78rem;
        padding: 0.7rem;
    }
    .conteudo-centro {
        padding: 15px 0;
    }
}

/* ============== Campo invalido (validacao visual) ============== */
.input.is-invalid,
select.is-invalid,
.anexo-card.is-invalid,
.anexo-card-inline.is-invalid {
    border-color: #ED3237 !important;
    box-shadow: 0 0 0 3px rgba(237, 50, 55, 0.15) !important;
}

.input.is-invalid:focus,
select.is-invalid:focus {
    border-color: #ED3237 !important;
    box-shadow: 0 0 0 3px rgba(237, 50, 55, 0.25) !important;
}

/* Resumo acima do form quando ha campos invalidos */
.validation-summary {
    background: #fdecea;
    border-left: 4px solid #ED3237;
    color: #8c1d21;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 0.92rem;
}
.validation-summary strong { color: #ED3237; }

/* ============== Loading overlay (modal de envio) ============== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(55, 65, 81, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
}

.loading-overlay .loading-card {
    background: #fff;
    border-radius: 12px;
    padding: 36px 44px;
    text-align: center;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    max-width: 360px;
    width: calc(100% - 40px);
    animation: slideUp 0.25s ease;
}

.loading-overlay .loading-card .spinner {
    width: 56px;
    height: 56px;
    border: 5px solid #e6e6e6;
    border-top-color: #6b7280;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 18px;
}

.loading-overlay .loading-card h3 {
    color: #374151;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.loading-overlay .loading-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* ============== Modal de aviso (popup estilizado, responsivo) ============== */
.esp-modal {
    position: fixed;
    inset: 0;
    background: rgba(55, 65, 81, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
}

.esp-modal-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px 26px 22px;
    text-align: center;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.25s ease;
}

.esp-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fdecec;
    color: #ED3237;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.esp-modal-card h3 {
    color: #374151;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.esp-modal-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    white-space: pre-line;
}

.esp-modal-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    text-align: left;
}

.esp-modal-list li {
    background: #fdecec;
    color: #a51f24;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    word-break: break-word;
}

.esp-modal-actions {
    margin-top: 18px;
}

.esp-modal-btn {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
    background: #ED3237;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    width: 100%;
    min-height: 48px;
    transition: background 0.15s ease;
}

.esp-modal-btn:hover { background: #d12b30; }
.esp-modal-btn:active { background: #b8242a; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

