* {
    font-family: 'Montserrat', sans-serif;
}

body {
    background-image: url(bg.png);
    background-color: #093E67;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
}

.card-principal {
    max-width: 1400px;
    margin: 2.5rem auto 3rem;
    padding: 0 1rem;
}

.card-formulario {
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    padding: 2.5rem 3rem 2rem;
}

#painelArquivosAnexos {
    margin-top: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

/* Card + painel de anexos lado a lado */
#containerFormularioAnexos {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    gap: 1.5rem;
}

#containerFormularioAnexos .area-formulario {
    flex: 0 0 auto;
    width: 900px;
    max-width: calc(100% - 300px);
}

#containerFormularioAnexos .area-painel-anexos {
    flex: 0 0 280px;
    width: 280px;
    max-width: 280px;
}

#containerFormularioAnexos .card-formulario {
    width: 100%;
    max-width: 100%;
}

.titulo-form {
    text-align: center;
    color: #093C64;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.secao-titulo {
    color: #093C64;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    margin: 1.8rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.secao-titulo::before,
.secao-titulo::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #c0cfe0;
}

.form-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #4a6580;
    margin-bottom: 4px;
}

.form-label .obg {
    color: #e03e3e;
    font-size: 0.7rem;
}

.form-control {
    border: 1px solid #d0dde8;
    border-radius: 4px;
    font-size: 0.88rem;
    color: #1a2a3a;
    height: 38px;
    padding: 0.35rem 0.65rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: #093C64;
    box-shadow: 0 0 0 2px rgba(9,60,100,0.12);
}

.form-control::placeholder {
    color: #aab8c5;
    font-size: 0.82rem;
    text-transform: none;
}

.btn-salvar {
    background-color: #093C64;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.6rem 2rem;
    border: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-salvar:hover {
    background-color: #073060;
    color: #fff;
}

.rodape-form {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.possui-erro {
    border-color: #e03e3e !important;
}

.msg-erro {
    color: #e03e3e;
    font-size: 0.72rem;
    margin-top: 3px;
}

/* Toggle switch para Bootstrap 4 */
.form-switch-custom {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.form-switch-custom input[type="checkbox"] {
    display: none;
}

.switch-track {
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}

.switch-thumb {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: left .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.form-switch-custom input:checked ~ .switch-track {
    background: #0d6efd;
}

.form-switch-custom input:checked ~ .switch-track .switch-thumb {
    left: 23px;
}

/* Alinhamento seção Assinale */
.criterio-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.criterio-row:last-child {
    border-bottom: none;
}

.criterio-nome {
    flex: 1;
    font-size: .9rem;
    color: #333;
    padding-right: 24px;
}

.criterio-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-nao {
    color: #dc3545;
    font-weight: 600;
    font-size: .85rem;
    min-width: 26px;
    text-align: right;
}

.label-sim {
    color: #28a745;
    font-weight: 600;
    font-size: .85rem;
    min-width: 22px;
}
@media (max-width: 1199.98px) {
    .card-principal {
        max-width: 960px;
    }

    #containerFormularioAnexos {
        flex-wrap: wrap;
    }

    #containerFormularioAnexos .area-formulario,
    #containerFormularioAnexos .area-painel-anexos {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    body {
        background-attachment: scroll;
    }

    .card-principal {
        margin: 1rem auto 1.5rem;
        padding: 0 0.75rem;
    }

    .card-formulario {
        padding: 1.5rem 1rem;
    }

    .titulo-form {
        font-size: 1.35rem;
        letter-spacing: 1.5px;
        margin-bottom: 1.4rem;
    }

    .secao-titulo {
        gap: 0.6rem;
        letter-spacing: 1px;
        margin: 1.4rem 0 1rem;
    }

    .form-row {
        margin-right: 0;
        margin-left: 0;
    }

    .form-row > [class*="col-"] {
        padding-right: 0;
        padding-left: 0;
    }

    .form-control {
        font-size: 1rem;
        min-height: 42px;
    }

    .criterio-row {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .criterio-nome {
        padding-right: 0;
        line-height: 1.35;
    }

    .criterio-toggle-wrap {
        flex-shrink: 0;
    }

    .rodape-form {
        justify-content: stretch;
    }

    .btn-salvar {
        width: 100%;
        white-space: normal;
        line-height: 1.3;
    }
}

@media (max-width: 420px) {
    .card-principal {
        padding: 0 0.5rem;
    }

    .card-formulario {
        padding: 1.25rem 0.85rem;
    }

    .titulo-form {
        font-size: 1.15rem;
        letter-spacing: 1px;
    }

    .secao-titulo::before,
    .secao-titulo::after {
        display: none;
    }

    .criterio-row {
        flex-direction: column;
    }

    .criterio-toggle-wrap {
        width: 100%;
        justify-content: flex-end;
    }
}
#painelArquivosAnexos > div {
    width: 100% !important;
}

#painelArquivosAnexos .btn {
    white-space: normal;
}

@media (max-width: 767.98px) {
    #containerFormularioAnexos .area-painel-anexos {
        position: fixed;
        top: 0.75rem;
        right: 0.75rem;
        z-index: 1030;
        width: auto;
        max-width: none;
        pointer-events: none;
    }

    #painelArquivosAnexos {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.4rem;
        pointer-events: none;
        max-height: 55vh;
        overflow-y: auto;
    }

    #painelArquivosAnexos > div {
        width: auto !important;
        margin-bottom: 0 !important;
        pointer-events: auto;
    }

    #painelArquivosAnexos .btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0;
        line-height: 1;
        box-shadow: 0 3px 10px rgba(0,0,0,0.28);
    }

    #painelArquivosAnexos .btn::before {
        content: "\f02f";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        font-size: 1rem;
    }
}

@media (max-width: 420px) {
    #containerFormularioAnexos .area-painel-anexos {
        top: 0.5rem;
        right: 0.5rem;
    }

    #painelArquivosAnexos .btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    #painelArquivosAnexos .btn::before {
        font-size: 0.9rem;
    }
}


.topo-form-acoes {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.btn-lista-solicitacoes {
    background-color: #ffffff;
    color: #093C64;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.55rem 0.9rem;
    border: 2px solid #093C64;
    border-radius: 4px;
    text-align: center;
    white-space: normal;
    max-width: 100%;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.btn-lista-solicitacoes:hover {
    background-color: #093C64;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .topo-form-acoes {
        justify-content: stretch;
        margin-bottom: 1rem;
    }

    .btn-lista-solicitacoes {
        width: 100%;
        display: block;
        padding: 0.7rem 0.85rem;
        font-size: 0.7rem;
        line-height: 1.3;
    }

    .titulo-form {
        margin-top: 0;
    }
}


.card-lista {
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    padding: 2rem;
    background: #fff;
}

.tabela-lista thead th {
    background: #093C64;
    color: #fff;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    white-space: nowrap;
}

.tabela-lista tbody td {
    font-size: 0.9rem;
    vertical-align: middle;
}

.badge-situacao-aguardando {
    background: #f0ad4e;
    color: #fff;
}

.badge-situacao-matriculado {
    background: #28a745;
    color: #fff;
}

.badge-situacao-desistencia {
    background: #dc3545;
    color: #fff;
}

.topo-lista {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-voltar-form {
    background: #fff;
    color: #093C64;
    border: 1px solid #093C64;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.45rem 1rem;
}

.btn-voltar-form:hover {
    background: #093C64;
    color: #fff;
    text-decoration: none;
}
