/* =========================================================
   RENOVE - CADASTRO.CSS
========================================================= */

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

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    background: #ffffff;
    color: #2c3e50;
    font-family: Arial, sans-serif;
}

/* ================= LOADING ================= */

.loading-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    background-color: #6f6f6f3d;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0s;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0.5s;
}

.pill-loader-svg {
    width: 90px;
    height: 35px;
    animation: spin 1s linear infinite;
}

.pill-half-filled {
    fill: #0d6efd;
}

.pill-half-outline {
    fill: transparent;
    stroke: #0d6efd;
    stroke-width: 4;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ================= NAVBAR ================= */

.navbar {
    backdrop-filter: blur(20px) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
    padding: 0.85rem 0 !important;
    z-index: 1050 !important;
}

.navbar .container-fluid {
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
}

.navbar-brand {
    width: 160px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.navbar-brand img,
.navbar-brand .images,
.images {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.navbar-collapse {
    flex-grow: 0 !important;
    justify-content: flex-end !important;
}

.navbar-nav {
    margin-left: auto !important;
    margin-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
}

.navbar-nav .nav-link {
    color: #2c3e50 !important;
    font-weight: 600 !important;
    padding: 0.6rem 1rem !important;
    border-radius: 12px !important;
    margin: 0 !important;
    transition: 0.25s ease !important;
}

.navbar-nav .nav-link:hover {
    background: rgba(102, 126, 234, 0.10) !important;
    color: #667eea !important;
    transform: translateY(-2px) !important;
}

.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, #70a0f8 0%, #4b58a2 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.30) !important;
}

.navbar-toggler {
    border-color: rgba(44, 62, 80, 0.25) !important;
    border-radius: 10px !important;
    padding: 0.35rem 0.55rem !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.15rem rgba(102, 126, 234, 0.25) !important;
}

/* ================= PÁGINA ================= */

.page {
    min-height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 35px 20px 40px;
}

.wizard {
    width: 100%;
    max-width: 560px;
}

.step-header {
    margin-bottom: 18px;
}

.step-text {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
}

.progress {
    display: flex;
    gap: 6px;
    width: 240px;
    max-width: 100%;
    height: auto !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.progress span {
    flex: 1;
    height: 5px;
    border-radius: 999px;
    background: #d9d9d9;
}

.progress span.active {
    background: linear-gradient(135deg, #6ea0ff 0%, #4a57a8 100%);
}

/* ================= FORM ================= */

.panel {
    width: 100%;
    background: transparent;
}

h1 {
    font-size: 2.1rem;
    line-height: 1.15;
    margin-bottom: 8px;
    font-weight: 800;
    color: #2c3e50;
}

.subtitle {
    font-size: 1.02rem;
    margin-bottom: 28px;
    color: #495057;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

label {
    display: block;
    font-size: 0.96rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.input,
.select {
    width: 100%;
    max-width: 100%;
    height: 52px;
    border-radius: 14px;
    padding: 0 16px;
    font-size: 16px;
    outline: none;
    border: 1px solid #d9d9d9;
    background: #ffffff;
    color: #1f2937;
    transition: all 0.2s ease;
    display: block;
}

.input:focus,
.select:focus {
    border-color: #7aa7ff;
    box-shadow: 0 0 0 2px rgba(122, 167, 255, 0.15);
}

.input.invalid,
.select.invalid {
    border-color: #e35d6a;
}

/* ================= DATA NASCIMENTO ================= */

.date-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.date-wrapper .input {
    width: 100%;
    padding-right: 58px !important;
}

.date-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 12px;
    background: #f3f6ff;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #1f2f46;
    font-size: 20px;

    pointer-events: none;
    z-index: 2;
}

#nascimentoCalendario {
    position: absolute;
    right: 8px;
    top: 50%;

    width: 42px;
    height: 42px;

    transform: translateY(-50%);
    opacity: 0;

    z-index: 10;
    cursor: pointer;

    border: none;
    background: transparent;

    appearance: auto;
    -webkit-appearance: auto;
}

#nascimento {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================= ERROS ================= */

.helper-error {
    margin-top: 6px;
    font-size: 0.88rem;
    color: #dc3545;
    display: none;
    font-weight: 500;
}

.helper-error.show {
    display: block;
}

/* ================= CHECKBOX ================= */

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 14px 0;
    font-size: 0.97rem;
    color: #374151;
}

.checkbox-group input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #667eea;
    flex: 0 0 auto;
}

.checkbox-group a,
.bottom-link a {
    color: #4b58a2;
    font-weight: 700;
    text-decoration: none;
}

/* ================= BOTÕES ================= */

.btn {
    width: 100%;
    height: 56px;
    border-radius: 999px;
    border: none;
    font-size: 1.08rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #6ea0ff 0%, #4a57a8 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(74, 87, 168, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #70a0f8 0%, #4b58a2 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: linear-gradient(135deg, #70a0f8 0%, #4b58a2 100%);
    color: #ffffff;
}

.bottom-link {
    text-align: center;
    margin-top: 18px;
    font-size: 0.98rem;
    color: #495057;
}

/* ================= SENHA ================= */

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .input {
    padding-right: 58px !important;
}

.toggle-pass {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    color: #2c3e50;
}

.password-rules {
    margin: 10px 0 6px;
}

.password-rules ul {
    list-style: none;
    display: grid;
    gap: 8px;
    padding-left: 0;
    margin-bottom: 0;
}

.password-rules li {
    color: #6c757d;
}

.password-rules li.ok {
    color: #198754;
}

/* ================= TABLET ================= */

@media (max-width: 992px) {
    .navbar .container-fluid {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .navbar-brand {
        width: 135px !important;
        height: 44px !important;
    }

    .navbar-toggler {
        margin-left: auto !important;
    }

    .navbar-collapse {
        flex-basis: 100% !important;
        width: 100% !important;
        margin-top: 12px !important;
        padding-top: 0 !important;
    }

    .navbar-nav {
        width: 100% !important;
        margin-left: 0 !important;
        gap: 0 !important;
        align-items: stretch !important;
    }

    .navbar-nav .nav-link {
        width: 100% !important;
        text-align: center !important;
        margin: 0.25rem 0 !important;
        padding: 0.65rem 1rem !important;
    }

    .dropdown-menu {
        position: static !important;
        box-shadow: none !important;
        background: rgba(245, 247, 255, 0.95) !important;
        margin-top: 0.5rem !important;
        text-align: center !important;
    }
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .navbar {
        padding: 0.65rem 0 !important;
    }

    .navbar .container-fluid {
        max-width: 100% !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .navbar-brand {
        width: 135px !important;
        height: 42px !important;
        margin: 0 !important;
    }

    .navbar-brand img,
    .navbar-brand .images,
    .images {
        width: 100% !important;
        height: auto !important;
    }

    .page {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 18px 14px 30px !important;
        width: 100%;
        min-height: auto;
    }

    .wizard {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
    }

    .step-header {
        margin-bottom: 18px;
    }

    .step-text {
        font-size: 0.92rem;
    }

    .progress {
        width: 220px;
    }

    .progress span {
        height: 4px;
    }

    h1 {
        font-size: 2rem !important;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group {
        margin-bottom: 18px;
    }

    label {
        font-size: 0.94rem;
    }

    .input,
    .select {
        height: 52px;
        font-size: 16px !important;
        border-radius: 14px;
    }

    .date-wrapper {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        border-radius: 14px;
    }

    .date-wrapper .input {
        padding-right: 56px !important;
    }

    .date-button {
        width: 42px;
        height: 42px;
        right: 8px;
    }

    #nascimentoCalendario {
        width: 42px;
        height: 42px;
        right: 8px;
        z-index: 10;
    }

    .btn {
        height: 54px;
        font-size: 1rem;
    }

    .checkbox-group {
        font-size: 0.92rem;
        line-height: 1.5;
    }

    .bottom-link {
        font-size: 0.92rem;
        margin-top: 18px;
    }
}

/* ================= CELULAR PEQUENO ================= */

@media (max-width: 480px) {
    .page {
        padding: 16px 14px 28px !important;
    }

    .wizard {
        max-width: 100%;
    }

    .navbar-brand {
        width: 115px !important;
    }

    h1 {
        font-size: 1.85rem !important;
    }

    .subtitle {
        font-size: 0.92rem;
    }

    .input,
    .select {
        height: 50px;
    }

    .progress {
        width: 210px;
    }

    .date-wrapper {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .date-wrapper .input {
        width: 100%;
        min-width: 0;
        padding-left: 14px !important;
        padding-right: 54px !important;
        font-size: 16px !important;
    }

    .date-button {
        right: 6px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    #nascimentoCalendario {
        right: 6px;
        width: 40px;
        height: 40px;
        z-index: 10;
    }
}