body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #eaf2f1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: #fff;
    padding: 2rem;
    margin: 2rem;
    border-radius: 10px;
    max-width: 360px;
    width: 95%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


@media (min-width: 768px) {
    .login-box {
        max-width: 500px;
    }
}

.login-box img {
    max-width: 300px;
    margin-bottom: 1rem;
}

.login-box h1 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    color: #007b5e;
}

/* ===== Labels ===== */
label, .label-inline {
    display: block;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.8rem;
    margin-bottom: 0.2rem;
    color: #333;
    transition: color 0.2s ease;
}

/* Asterisco para campos obrigatórios */
label .required, .label-inline .required {
    color: #d9534f;
    font-weight: bold;
    margin-left: 3px;
}

/* Label em erro */
label.error-label {
    color: #d9534f;
}

/* Campos de entrada */
/*.login-box input[type="text"],
.login-box input[type="tel"],
.login-box select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.7rem;
    border: 1px solid #aaa;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}*/

/* Campos de entrada */
.login-box input[type="text"],
.login-box input[type="tel"],
.login-box input[type="password"],
.login-box select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.7rem;
    border: 1px solid #aaa;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Foco no campo */
input:focus,
select:focus {
    border-color: #007b5e;
    box-shadow: 0 0 3px rgba(0, 123, 94, 0.5);
    outline: none;
}

/* Botões */
.login-box input[type="submit"],
#capture-button,
#retake-button {
    width: 100%;
    padding: 0.8rem;
    margin-top: 1rem;
    border: none;
    border-radius: 5px;
    background: #007b5e;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.25s ease;
}

.login-box input[type="submit"]:hover,
#capture-button:hover,
#retake-button:hover {
    background: #005f47;
}

.footer {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #555;
}

.footer a {
    color: #007b5e;
    text-decoration: none;
}
.footer a:hover {
    text-decoration: underline;
}

/* Radio buttons */
.radio-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Containers de upload e câmera */
#upload-container, #camera-container {
    display: none;
    text-align: center;
}

#camera-preview {
    width: 100%;
    max-width: 360px;
    border: 1px solid #aaa;
    border-radius: 5px;
}

.error-message {
    color: #d9534f;
    font-size: 0.8em;
    display: none;
    margin-top: -5px;
    margin-bottom: 10px;
}

input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #d9534f;
    background-color: #fff5f5;
}

/* Input file */
#file-label {
    display: block;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid #aaa;
    border-radius: 5px;
    background-color: #f0f0f0;
    cursor: pointer;
    text-align: center;
}
#file-label:hover {
    background-color: #e0e0e0;
}
#arquivo_identidade {
    display: none;
}

/* Preview de foto */
#photo-preview img {
    max-width: 100%;
    margin-top: 10px;
    border-radius: 5px;
    border: 1px solid #aaa;
}

/* Mesagens pós cadastro */
.message-box {
        padding: 15px;
        margin-bottom: 1rem;
        border-radius: 5px;
        font-weight: bold;
        text-align: center;
      }
      .message-box.success {
        background-color: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
      }
      .message-box.error {
        background-color: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
      }

/* Estilos para mensagens de erro e campos inválidos */
.error-message {
    color: #e74c3c; /* Cor vermelha para o texto do erro */
    font-size: 0.9em;
    margin-top: 5px;
    display: none; /* Esconde a mensagem por padrão */
}

/* Exibe a mensagem de erro quando a classe 'active' é adicionada */
.error-message.active {
    display: block;
}

/* Estiliza a label e o input quando há um erro */
.error-label {
    color: #e74c3c;
    font-weight: bold;
}

.error-input {
    border-color: #e74c3c !important; /* Borda vermelha para o campo de input */
}

/* Estilos para a lista de termos */
.terms-list {
    text-align: left;
    margin-bottom: 20px;
    padding-left: 20px;
    color: #555;
    font-size: 0.95em;
}

.terms-buttons {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-top: 20px;
}

#accept-button, #cancel-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#accept-button {
    background-color: #4CAF50; /* Verde */
    color: white;
}

#accept-button:hover {
    background-color: #45a049;
}

#cancel-button {
    background-color: #f44336; /* Vermelho */
    color: white;
}

#cancel-button:hover {
    background-color: #d32f2f;
}

/* ====================================================== */
/* (NOVO) ESTILOS PARA STATUS DE REDE (JS)                */
/* ====================================================== */
.network-status {
    padding: 15px;
    margin-bottom: 1rem;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    display: none; /* Escondido por padrão */
}
.network-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.network-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}