body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
}

/* ESTILO PRINCIPAL DO CONTAINER DE TELAS */
.container {
    background-color: #f0f0f0;
    width: 90%;
    max-width: 800px;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.tela-oculta {
    display: none; /* A tela não ocupará mais espaço na página */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

/* ESTILOS DO CABEÇALHO (APLICADO A AMBAS AS TELAS) */
.header {
    width: 100%;
    text-align: center;
    margin-bottom: 0;
    padding-top: 0;
}

.system-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding: 0;
}

.header-line {
    border: none;
    height: 3px;
    background-color: #00008b;
    width: 100%;
    margin: 0;
}

/* ESTILOS DA TELA INICIAL (CONTÉM O .welcome-box) */
#tela-inicial {
    opacity: 1;
}

.welcome-box {
    background-color: #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-box p {
    margin: 0;
    line-height: 1.5;
    color: #555;
    font-size: 16px;
}

/* ESTILOS DA TELA DE GERENCIAMENTO (CONTÉM O .content-box) */
.content-box {
    background-color: #ffffff;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    text-align: center;
}

.btn-home {
    position: absolute;
    top: 10px;
    left: 20px;
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ccc;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn-home:hover {
    background-color: #e0e0e0;
}

.section-title {
    color: #00008b;
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.info-box {
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-box p {
    margin: 0;
    color: #333;
    line-height: 1.4;
}

/* ESTILOS GERAIS DOS BOTÕES */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
}

.btn-primary {
    background-color: #00008b;
    color: white;
}

.btn-primary:hover {
    background-color: #00006b;
}

.btn-primary:disabled {
    background-color: #888;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #ccc;
    color: #333;
}

.btn-secondary:hover {
    background-color: #bbb;
}

.btn-large {
    font-size: 18px;
    padding: 15px 30px;
    margin-top: 15px;
}

/* ESTILOS DOS MODAIS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-btn:hover {
    color: #555;
}

.modal-content h2 {
    margin-top: 0;
    color: #00008b;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* OUTROS ESTILOS */
#escolas-inseridas {
    margin-top: 15px;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 5px;
    max-height: 150px;
    overflow-y: auto;
}

#escolas-inseridas ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#escolas-inseridas li {
    background-color: #f9f9f9;
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

#escolas-inseridas li:last-child {
    border-bottom: none;
}

#escolas-inseridas li.selected {
    background-color: #d9e2f0;
    font-weight: bold;
}

/* ESTILOS REVERTIDOS PARA A TELA DE PLANEJAMENTO */
#sub-tela-planejamento {
    width: 100%;
    text-align: center;
    padding-top: 50px;
    box-sizing: border-box;
}

.opcoes-botoes {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.restante-info {
    text-align: right;
    font-weight: bold;
    margin-top: 10px;
}

.restante-info .error {
    color: red;
}

.placeholder-text {
    color: #888;
    text-align: center;
    font-style: italic;
    padding: 15px;
}

/* ESTILOS REVERTIDOS PARA AS TELAS DE CUSTEIO E CAPITAL */
#tela-planejamento-custeio, #tela-planejamento-capital {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
}

#tela-planejamento-custeio h2, #tela-planejamento-capital h2 {
    text-align: center;
    color: #00008b;
    margin-bottom: 10px;
}

/* Estilo para formulários de duas colunas */
.form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.form-columns .form-group {
    margin-bottom: 0;
}