/* ==========================================================================
   CADASTRO DE CONSULTORES - NUTRI AN-T (UX DESIGN SYSTEM)
   ========================================================================== */

:root {
    --brand-blue: #232f84;
    --brand-blue-hover: #161f5c;
    --brand-blue-light: rgba(35, 47, 132, 0.08);
    --brand-orange: #e05315;
    --brand-orange-hover: #b8400c;
    --brand-orange-light: rgba(224, 83, 21, 0.08);
    --bg-page: #f8f9fc;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --text-tertiary: #86868b;
    --border-color: #e5e7eb;
    --border-focus: #232f84;
    --success-green: #10b981;
    --error-red: #ef4444;
    --shadow-subtle: 0 10px 40px -10px rgba(0, 0, 0, 0.08), 0 2px 10px -2px rgba(0, 0, 0, 0.04);
    --shadow-focus: 0 0 0 4px rgba(35, 47, 132, 0.15);
    --border-radius-card: 24px;
    --border-radius-input: 14px;
    --transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 10% 20%, rgba(224, 83, 21, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(35, 47, 132, 0.06) 0%, transparent 50%),
                var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.form-header {
    padding: 24px 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-blue);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--brand-blue-light);
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--brand-blue);
    color: #ffffff;
    transform: translateX(-3px);
}

/* Main Container */
.main-wrapper {
    flex: 1;
    max-width: 780px;
    width: 100%;
    margin: 40px auto 60px;
    padding: 0 20px;
}

/* Form Intro Card */
.form-intro {
    text-align: center;
    margin-bottom: 32px;
}

.badge-tag {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-orange);
    background: var(--brand-orange-light);
    border-radius: 30px;
    margin-bottom: 16px;
}

.intro-title {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.intro-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Form Card */
.form-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-subtle);
    border: 1px solid rgba(255, 255, 255, 0.9);
    padding: 40px;
    backdrop-filter: blur(10px);
}

/* Form Sections */
.form-section {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-num {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--brand-blue);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.col-span-2 {
    grid-column: span 2;
}

/* Form Group & Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.required-badge {
    color: var(--brand-orange);
    font-size: 0.8rem;
}

.optional-badge {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 400;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    pointer-events: none;
    font-size: 1.1rem;
}

.form-input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 46px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-input);
    transition: var(--transition);
    outline: none;
}

.form-input::placeholder {
    color: #a1a1aa;
    font-size: 0.9rem;
}

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-focus);
    background: #ffffff;
}

.form-input.is-valid {
    border-color: var(--success-green);
}

.form-input.is-invalid {
    border-color: var(--error-red);
    background: rgba(239, 68, 68, 0.02);
}

.input-hint {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 2px;
    line-height: 1.4;
}

.input-hint strong {
    color: var(--brand-blue);
}

.input-error-msg {
    font-size: 0.78rem;
    color: var(--error-red);
    display: none;
    margin-top: 2px;
}

.form-group.has-error .input-error-msg {
    display: block;
}

/* Callout Box for Links */
.callout-tip {
    background: var(--brand-orange-light);
    border-left: 4px solid var(--brand-orange);
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.callout-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.callout-text {
    font-size: 0.85rem;
    color: #7c2d12;
    line-height: 1.5;
}

/* Privacy Consent */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 10px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--brand-blue);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Submit Action */
.form-actions {
    margin-top: 32px;
}

.btn-submit {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand-blue) 0%, #1a237e 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px -4px rgba(35, 47, 132, 0.4);
    transition: var(--transition);
}

.btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #1c266d 0%, #121858 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -4px rgba(35, 47, 132, 0.5);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s ease-in-out infinite;
    display: none;
}

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

.btn-submit.is-loading .spinner {
    display: inline-block;
}

.btn-submit.is-loading .btn-text {
    display: none;
}

/* Modal / Success State */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.is-active .modal-card {
    transform: scale(1) translateY(0);
}

.success-icon-wrapper {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #ecfdf5;
    color: var(--success-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 20px;
    border: 4px solid #d1fae5;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-summary {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 16px;
    text-align: left;
    font-size: 0.85rem;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.modal-summary p {
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.modal-summary p:last-child {
    margin-bottom: 0;
}

.modal-summary strong {
    color: var(--text-primary);
}

.btn-modal-close {
    width: 100%;
    padding: 14px;
    background: var(--brand-blue);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-modal-close:hover {
    background: var(--brand-blue-hover);
}

/* Footer */
.form-footer {
    text-align: center;
    padding: 24px 0;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .form-card {
        padding: 28px 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .col-span-2 {
        grid-column: span 1;
    }

    .main-wrapper {
        margin: 20px auto 40px;
    }
}
