:root {
    --color-gold: #C9A635;
    --color-gold-dark: #b89730;
    --color-green-dark: #004d40;
    --color-success: #2e7d32;
    --color-error: #d32f2f;
    --color-background: #fdfdfc;
    --color-panel: #ffffff;
    --color-text-primary: #212529;
    --color-text-secondary: #6c757d;
    --color-border: #e0e0e0;
    --color-border-focus: #C9A635;
    --font-title: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --border-radius: 10px;
    --transition-speed: 0.3s;
}

/* ==========================================================================
   Layout Principal e Utilitários
   ========================================================================== */
html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--color-background);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

.signup-page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.signup-image-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: linear-gradient(rgba(28, 59, 50, 0.75), rgba(0, 0, 0, 0.65)), url(../images/capa_index.png);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    padding: 4rem 2rem;
    min-height: 40vh;
    position: relative;
    overflow: hidden;
}

.signup-image-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(201, 166, 53, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.overlay-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.overlay-content h3 {
    font-family: var(--font-title);
    font-size: clamp(2rem, 6vw, 2.8rem);
    margin-bottom: 1.2rem;
    font-weight: 700;
    color: #C9A635;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.8s ease-out forwards;
}

.overlay-content p {
    font-size: clamp(1rem, 3.5vw, 1.15rem);
    line-height: 1.8;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.8s ease-out forwards 0.3s;
}

.signup-form-panel {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2.5rem 1rem 2rem;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    flex-grow: 1;
    overflow-y: visible;
}

/* ==========================================================================
   Media Queries para Responsividade
   ========================================================================== */

@media (min-width: 1024px) {
    .signup-page-container {
        flex-direction: row;
        height: 100vh;
        overflow: hidden;
    }

    .signup-image-panel {
        flex-basis: 45%;
        min-height: 100vh;
        max-height: 100vh;
        padding: 3rem 2.5rem;
        background-attachment: scroll;
        overflow: hidden;
    }

    .signup-form-panel {
        flex-basis: 55%;
        align-items: center;
        justify-content: center;
        padding: 1.5rem 2rem;
        overflow-y: auto;
        overflow-x: hidden;
        max-height: 100vh;
    }

    .form-wrapper {
        max-width: 500px;
    }

    .stepper-container {
        margin: 1.5rem auto 1.75rem;
        max-width: 420px;
    }

    .form-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .form-title::after {
        margin: 0.6rem auto 0;
    }

    .logo-link {
        margin-bottom: 0.875rem;
    }

    .form-logo {
        max-width: 65px;
    }

    .form-grid {
        gap: 0.875rem;
    }

    .form-navigation {
        margin-top: 1.25rem;
    }

    .payment-section {
        padding: 1.25rem 0;
    }

    .form-footer {
        margin-top: 1rem;
    }

    .overlay-content h3 {
        font-size: clamp(2.2rem, 3.5vw, 2.6rem);
    }
    
    .overlay-content p {
        font-size: 1.1rem;
    }
}

@media (max-width: 1023px) {
    .signup-image-panel {
        min-height: 35vh;
        padding: 3rem 1.5rem;
    }
    
    .signup-form-panel {
        padding: 2.5rem 1rem 2rem;
    }
}

@media (max-width: 768px) {
    .signup-image-panel {
        min-height: 28vh;
        padding: 2rem 1.5rem;
        background-attachment: scroll;
    }
    
    .overlay-content h3 {
        font-size: 1.75rem;
        margin-bottom: 0.875rem;
    }
    
    .overlay-content p {
        font-size: 0.925rem;
        line-height: 1.6;
    }
    
    .signup-form-panel {
        padding: 1.75rem 1rem 1.5rem;
    }

    .form-wrapper {
        padding: 0 1.25rem;
    }

    .form-title {
        font-size: 1.6rem;
    }

    .form-logo {
        max-width: 65px;
    }
}

@media (max-width: 480px) {
    .signup-image-panel {
        min-height: 22vh;
        padding: 1.75rem 1rem;
    }
    
    .overlay-content h3 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .overlay-content p {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    .signup-form-panel {
        padding: 1.25rem 0.75rem 1rem;
    }
}

.form-wrapper {
    width: 100%;
    max-width: 540px;
    padding: 0 1.5rem;
    text-align: center;
    margin: 0 auto;
}

.logo-link {
    display: inline-block;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.form-logo {
    max-width: 70px;
    height: auto;
}

.form-title {
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    color: var(--color-green-dark);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    line-height: 1.2;
}

.form-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    margin: 0.75rem auto 0;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(201, 166, 53, 0.3);
}

/* ==========================================================================
   Stepper e Etapas do Formulário
   ========================================================================== */
.stepper-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.75rem auto 2rem;
    max-width: 450px;
    position: relative;
    padding: 0 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
}

.step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid var(--color-border);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    background: #fff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.step.active .step-icon {
    border-color: var(--color-gold);
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.step.completed .step-icon {
    border-color: var(--color-success);
    background: linear-gradient(135deg, var(--color-success) 0%, #1b5e20 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    white-space: nowrap;
    transition: all 0.3s ease;
}

@media (min-width: 576px) {
    .step-label {
        font-size: 0.9rem;
    }
    
    .step-icon {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .stepper-container {
        margin: 1.5rem auto 1.75rem;
        max-width: 100%;
    }
    
    .step-icon {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
    
    .step-label {
        font-size: 0.7rem;
    }

    .form-field label {
        padding-left: 0.75rem;
    }

    .form-field input {
        font-size: 16px; /* Previne zoom no iOS */
        padding: 0.75rem 0.5rem;
    }

    .form-field i {
        font-size: 1rem;
        margin-right: 0.65rem;
    }

    .btn {
        font-size: 0.95rem;
        padding: 0.8rem 1.25rem;
        min-height: 42px;
    }

    .form-wrapper {
        padding: 0 1rem;
    }

    .form-title {
        font-size: 1.4rem;
    }

    .form-logo {
        max-width: 60px;
    }

    .logo-link {
        margin-bottom: 0.75rem;
    }

    .form-title::after {
        margin: 0.5rem auto 0;
        height: 2px;
        width: 40px;
    }

    .payment-section {
        padding: 1.25rem 0;
    }

    .payment-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .payment-section h3 {
        font-size: 1.25rem;
    }

    .form-navigation {
        margin-top: 1.25rem;
        gap: 0.75rem;
    }

    .form-footer {
        margin-top: 1rem;
        font-size: 0.85rem;
    }
}

.step.active .step-label {
    color: var(--color-gold);
    font-weight: 700;
}

.step.completed .step-label {
    color: var(--color-success);
    font-weight: 600;
}

.step-connector {
    flex-grow: 1;
    height: 3px;
    background: var(--color-border);
    margin: 0 0.75rem;
    position: relative;
    border-radius: 2px;
    transition: background 0.5s ease;
}

.step.completed + .step-connector {
    background: linear-gradient(90deg, var(--color-success) 0%, var(--color-border) 100%);
}

.form-step {
    display: none;
    min-height: 340px;
    padding: 1.5rem 0;
}

.form-step.active {
    display: block;
    animation: fadeInSlide 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ==========================================================================
   Estilos de Campos com Validação (Sucesso e Erro)
   ========================================================================== */
.form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-field {
    width: 100%;
}

.form-field.half {
    width: 100%;
}

@media (min-width: 576px) {
    .form-field.half {
        width: calc(50% - 0.5rem);
    }
}

.form-field label {
    display: flex;
    align-items: center;
    position: relative;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding-left: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-field label:hover {
    border-color: #C9A635;
    box-shadow: 0 4px 12px rgba(201, 166, 53, 0.1);
}

.form-field label i {
    color: var(--color-text-secondary);
    margin-right: 0.75rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-field input {
    width: 100%;
    border: none;
    outline: none;
    padding: 0.875rem 0.65rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: transparent;
    color: var(--color-text-primary);
}

.form-field input::placeholder {
    color: #aaa;
    font-size: 0.95rem;
}

.form-field label:focus-within {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 4px rgba(201, 166, 53, 0.15);
    transform: translateY(-2px);
}

.form-field label:focus-within i {
    color: var(--color-gold);
    transform: scale(1.1);
}

.form-field label.invalid {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.form-field label.invalid i {
    color: var(--color-error);
}

.form-field label.valid {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-field label.valid i {
    color: var(--color-success);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    padding: 0.5rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.toggle-password:hover {
    color: var(--color-gold);
    transform: scale(1.15);
}

/* ==========================================================================
   Feedback de Senha
   ========================================================================== */
.password-feedback {
    font-size: 0.85rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    display: none;
    text-align: left;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #ddd;
}

.feedback-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feedback-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.25rem 0;
}

.feedback-list li:last-child {
    margin-bottom: 0;
}

.feedback-list li i {
    margin-right: 0.6rem;
    font-size: 1rem;
    width: 18px;
    transition: all 0.3s ease;
}

.feedback-list li.invalid {
    color: var(--color-error);
}

.feedback-list li.valid {
    color: var(--color-success);
}

.feedback-list li.valid i::before {
    content: "\f058";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.feedback-list li.invalid i::before {
    content: "\f057";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* ==========================================================================
   Botões, Pagamento e Footer
   ========================================================================== */
.payment-section {
    text-align: center;
    padding: 1.5rem 0;
}

.payment-icon {
    font-size: 3rem;
    color: var(--color-gold);
    margin-bottom: 0.875rem;
}

.payment-section h3 {
    font-family: var(--font-title);
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    color: var(--color-green-dark);
}

.payment-section p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0 auto;
    max-width: 350px;
    line-height: 1.6;
}

.form-navigation {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
    gap: 0.875rem;
}

.btn {
    width: 100%;
    min-height: 44px;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #C9A635 0%, #D4AF37 100%);
    color: #fff;
    order: 2;
    box-shadow: 0 4px 12px rgba(201, 166, 53, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #D4AF37 0%, #b8952d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 166, 53, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(201, 166, 53, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border-color: #ddd;
    color: var(--color-text-secondary);
    order: 1;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
    color: var(--color-text-primary);
    transform: translateY(-1px);
}

@media (min-width: 576px) {
    .form-navigation {
        flex-direction: row; /* Layout lado a lado em telas maiores */
        justify-content: space-between;
    }

    .btn {
        width: auto;
    }

    .btn-primary {
        flex-grow: 1;
        order: 0; /* Ordem padrão */
    }

    .btn-secondary {
        flex-grow: 0;
        width: 120px;
        order: 0; /* Ordem padrão */
    }
}

.form-footer {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    text-align: center;
    color: var(--color-text-secondary);
}

.form-footer a {
    color: var(--color-gold);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.form-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #C9A635, #D4AF37);
    transition: width 0.3s ease;
}

.form-footer a:hover {
    color: #D4AF37;
}

.form-footer a:hover::after {
    width: 100%;
}

/* ==========================================================================
   Sistema de Popups (Toasts)
   ========================================================================== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    opacity: 0;
    animation: toast-in 0.5s forwards;
}

.toast.hide {
    animation: toast-out 0.5s forwards;
}

.toast i {
    font-size: 1.2rem;
    margin-right: 10px;
}

.toast--success {
    background-color: var(--color-success);
}

.toast--error {
    background-color: var(--color-error);
}

@keyframes toast-in {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ==========================================================================
   Novas Animações para a Seção de Imagem
   ========================================================================== */

/* Animação para o título (fade-in e slide-up) */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animação para o background da imagem (zoom sutil e alternado) */
@keyframes backgroundScale {
    0% {
        background-size: 100% 100%;
    }

    100% {
        background-size: 105% 105%;
    }
}