/* ── Base cromatica dos controles de formulario ───────────────────────
   color-scheme: light impede o modo escuro automatico do navegador de
   pintar inputs/selects de cinza-escuro. Seletores de elemento tem a
   menor especificidade, entao qualquer regra de classe existente vence. */
:root { color-scheme: light; }

input, select, textarea {
    background-color: #ffffff;
    color: #083f65;
}

input::placeholder,
textarea::placeholder { color: #8fa6b3; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a1a2f;
    min-height: 100vh;
    position: relative;
}

.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-background::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(8, 28, 51, 0.92) 0%, rgba(2, 18, 35, 0.96) 100%);
    z-index: 1;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.6) contrast(1.1);
}

.main-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1000px;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    padding: 2.5rem 3rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #0a4b7a;
}

.form-header i {
    font-size: 3rem;
    color: #0a4b7a;
    margin-bottom: 1rem;
}

.form-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0a2b44;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #5b6e8c;
    font-size: 0.9rem;
}

.input-group-custom {
    margin-bottom: 1.5rem;
}

.input-group-custom label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2c3e66;
    margin-bottom: 0.5rem;
    display: block;
}

.input-group-custom label .required {
    color: #dc3545;
    margin-left: 0.25rem;
}

.input-field {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #ffffff;
}

.input-field:focus {
    outline: none;
    border-color: #0a4b7a;
    box-shadow: 0 0 0 3px rgba(10, 75, 122, 0.15);
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f9fbfd;
    margin-bottom: 1.5rem;
}

.upload-area:hover {
    border-color: #0a4b7a;
    background: #f0f6fe;
}

.upload-icon i {
    font-size: 3rem;
    color: #0a4b7a;
    margin-bottom: 1rem;
}

.upload-text h6 {
    font-weight: 700;
    color: #2c3e66;
    margin-bottom: 0.5rem;
}

.upload-text p {
    font-size: 0.85rem;
    color: #7c8ba0;
    margin: 0;
}

.photo-preview {
    margin-top: 1rem;
}

.photo-preview img {
    max-width: 150px;
    border-radius: 12px;
    border: 2px solid #0a4b7a;
}

.declaration-area {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 16px;
    border-left: 4px solid #0a4b7a;
}

.checkbox-custom {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
}

.checkbox-custom input {
    position: absolute;
    opacity: 0;
}

.checkmark {
    width: 22px;
    height: 22px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    flex-shrink: 0;
    position: relative;
}

.checkbox-custom input:checked ~ .checkmark {
    background: #0a4b7a;
    border-color: #0a4b7a;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-custom input:checked ~ .checkmark:after {
    display: block;
}

.declaration-text {
    font-size: 0.8rem;
    color: #2c3e66;
    line-height: 1.4;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

.btn-register {
    flex: 1;
    padding: 1rem;
    background: #0a4b7a;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-register:hover {
    background: #063a5e;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(10, 75, 122, 0.2);
}

.btn-cancel {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: 1.5px solid #cbdde9;
    border-radius: 14px;
    font-weight: 600;
    color: #1e5a7d;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-cancel:hover {
    background: #f0f6fe;
    border-color: #0a4b7a;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col-md-6, .col-md-4, .col-md-8, .col-md-12 {
    padding: 0 0.75rem;
}

.col-md-6 { width: 50%; }
.col-md-4 { width: 33.333%; }
.col-md-8 { width: 66.666%; }
.col-md-12 { width: 100%; }

@media (max-width: 768px) {
    .main-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    .col-md-6, .col-md-4, .col-md-8 {
        width: 100%;
    }
    .form-actions {
        flex-direction: column;
    }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 25, 45, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.loading-box {
    background: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);
    border-top: 5px solid #0a4b7a;
    font-weight: 600;
    color: #0a2b44;
    min-width: 200px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #dbe6f0;
    border-top: 5px solid #0a4b7a;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

body.loading-active {
    overflow: hidden;
}

.modal-city-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    animation: fadeIn 0.3s ease;
}

.modal-city-container {
    background: white;
    max-width: 450px;
    width: 90%;
    padding: 2rem;
    border-radius: 28px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
}

.modal-city-icon {
    width: 80px;
    height: 80px;
    background: #fef3f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.modal-city-icon i {
    font-size: 2.5rem;
    color: #e74c3c;
}

.modal-city-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a2b44;
    margin-bottom: 1rem;
}

.modal-city-message {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.modal-city-submessage {
    color: #718096;
    font-size: 0.85rem;
    margin-bottom: 1.75rem;
}

.modal-city-button {
    background: #0a4b7a;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-city-button:hover {
    background: #063a5e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 75, 122, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    animation: fadeIn 0.3s ease;
}

.modal-info-container {
    background: white;
    max-width: 420px;
    width: 90%;
    padding: 2rem;
    border-radius: 28px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease;
}

.modal-info-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e8f0fe 0%, #d4e4fa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.modal-info-icon i {
    font-size: 2.5rem;
    color: #0a4b7a;
}

.modal-info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a2b44;
    margin-bottom: 0.75rem;
}

.modal-info-message {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.modal-info-submessage {
    color: #0a4b7a;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.75rem;
}

.modal-info-button {
    background: #0a4b7a;
    border: none;
    padding: 0.85rem 1.75rem;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-info-button:hover {
    background: #063a5e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 75, 122, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}