/* ========================================
   FORMULÁRIO WIZARD - TEMA DARK MODERNO
   INSPIRADO C6 BANK
   ======================================== */

* {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
}

.crm-wizard-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

.crm-wizard-container {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.wizard-progress-wrapper {
    margin-bottom: 50px;
    position: relative;
}

.wizard-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 15px;
}

.wizard-progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.wizard-progress-line-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.wizard-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    position: relative;
}

.wizard-step-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #000000;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 16px;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.wizard-step-indicator.active .wizard-step-circle {
    background: #000000;
    border-color: rgba(255, 255, 255, 0.8);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.wizard-step-indicator.completed .wizard-step-circle {
    background: #000000;
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

.wizard-step-indicator.completed .wizard-step-circle::before {
    content: "✓";
    font-size: 20px;
}

.wizard-step-label {
    margin-top: 10px;
    font-size: 11px;
    color: rgba(245, 247, 246, 1) !important;
    text-align: center;
    font-weight: 300;
    transition: color 0.3s;
}

.wizard-step-indicator.active .wizard-step-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.wizard-progress-percent {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 300;
    margin-top: 10px;
}

/* ========================================
   WIZARD STEPS CONTAINER
   ======================================== */

.wizard-steps-container {
    position: relative;
    min-height: 500px;
}

.wizard-steps-container * {
    color: #ffffff !important;
}

.wizard-step {
    display: none;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.4s ease;
}

.wizard-step.active {
    display: block;
    animation: slideInRight 0.5s ease forwards;
}

.wizard-step.hiding {
    animation: slideOutLeft 0.4s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

.wizard-step-title {
    text-align: center;
    margin-bottom: 35px;
}

.wizard-step-title h2 {
    color: #ffffff;
    font-size: 26px;
    font-weight: 400;
    margin: 0 0 10px 0;
}

.wizard-step-title p {
    color: rgba(245, 247, 246, 1) !important;
    font-size: 16px;
    margin: 0;
    font-weight: 300;
}

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

.wizard-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.wizard-form-field {
    margin-bottom: 25px;
    animation: fadeInUp 0.4s ease forwards;
    animation-delay: calc(var(--field-index) * 0.1s);
    opacity: 0;
}

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

.wizard-form-field.full {
    grid-column: 1 / -1;
}

.wizard-form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 400 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.wizard-form-field input[type="text"],
.wizard-form-field input[type="email"],
.wizard-form-field input[type="tel"],
.wizard-form-field input[type="password"],
.wizard-form-field select {
    width: 100%;
    padding: 14px 20px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(150, 150, 150, 0.4) !important;
    border-radius: 5px !important;
    font-size: 16px !important;
    color: #ffffff !important;
    transition: all 0.3s;
}

.wizard-form-field input[type="text"]::placeholder,
.wizard-form-field input[type="email"]::placeholder,
.wizard-form-field input[type="tel"]::placeholder,
.wizard-form-field input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

.wizard-form-field input:focus,
.wizard-form-field select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.wizard-form-field input[type="text"]:disabled,
.wizard-form-field input[type="text"]:read-only,
.wizard-form-field select:disabled {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    color: rgba(245, 247, 246, 1) !important;
}

.wizard-form-field input.valid {
    border-color: rgba(34, 197, 94, 0.6);
    background: rgba(34, 197, 94, 0.05);
}

/* ========================================
   ESTILOS DE ERRO - SEM SHAKE, VERMELHO VISÍVEL
   ======================================== */

.wizard-form-field input.invalid,
.wizard-form-field select.invalid,
.wizard-form-field textarea.invalid {
    border-color: #ef4444 !important;
    border-width: 2px !important;
    background: rgba(239, 68, 68, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.wizard-form-field input.invalid:focus,
.wizard-form-field select.invalid:focus,
.wizard-form-field textarea.invalid:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25) !important;
}

/* Label do campo com erro também fica vermelho */
.wizard-form-field.has-error label {
    color: #ef4444 !important;
    font-weight: 600;
}

/* Mensagem de erro */
.field-error-message {
    display: block;
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
    background: rgba(239, 68, 68, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #ef4444;
}

/* Radio group com erro */
.wizard-radio-group.invalid {
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.05);
}

/* Checkbox de termos com erro */
.wizard-terms-checkbox input[type="checkbox"].invalid {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

.wizard-form-field small {
    display: block;
    color: rgba(245, 247, 246, 1) !important;
    font-size: 13px !important;
    margin-top: 6px;
}

.wizard-form-field .error-message {
    color: #fca5a5;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.wizard-form-field input.invalid + .error-message {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-form-field select {
    cursor: pointer;
}

.wizard-form-field select option {
    background: #1a1a1a;
    color: #ffffff;
}

/* ========================================
   FILE UPLOAD
   ======================================== */

.wizard-upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.wizard-upload-zone:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.02);
}

.wizard-upload-zone.dragover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.wizard-upload-icon {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.wizard-upload-icon svg {
    display: block;
    margin: 0 auto;
}

.wizard-upload-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 17px;
    margin-bottom: 10px;
}

.wizard-upload-hint {
    color: rgba(245, 247, 246, 1) !important;
    font-size: 14px !important;
}

.wizard-upload-preview {
    display: none;
    margin-top: 20px;
    text-align: center;
}

.wizard-upload-preview.active {
    display: block;
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wizard-upload-preview img {
    max-width: 300px;
    max-height: 200px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.wizard-upload-remove {
    margin-top: 15px;
    padding: 8px;
    background: none;
    border: none;
    color: rgba(239, 68, 68, 0.8);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-upload-remove:hover {
    color: rgba(239, 68, 68, 1);
    transform: scale(1.2);
}

.wizard-upload-remove svg {
    display: block;
}

/* ========================================
   RADIO CARDS
   ======================================== */

.wizard-radio-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.wizard-radio-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.wizard-radio-card:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.wizard-radio-card input[type="radio"] {
    display: none;
}

.wizard-radio-card.selected {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

.wizard-radio-content strong {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 17px;
    font-weight: 400;
}

.wizard-radio-content span {
    color: rgba(245, 247, 246, 1) !important;
    font-size: 14px !important;
    font-weight: 300;
}

/* ========================================
   DIVIDER
   ======================================== */

.wizard-form-divider {
    margin: 30px 0 20px 0;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    animation: fadeInUp 0.5s ease calc(var(--field-index, 0) * 0.1s) both;
}

.wizard-form-divider span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 400;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   PASSWORD FIELDS
   ======================================== */

.wizard-password-field {
    position: relative;
    display: block;
}

.wizard-password-field input {
    padding-right: 45px !important;
    width: 100%;
}

.wizard-password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    background-color: transparent !important;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    outline: none;
}

.wizard-password-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
    background: none !important;
    background-color: transparent !important;
}

.wizard-password-toggle:focus {
    outline: none;
    background: none !important;
    background-color: transparent !important;
}

.wizard-password-toggle:active {
    background: none !important;
    background-color: transparent !important;
}

.wizard-password-toggle svg {
    width: 18px;
    height: 18px;
}

.password-strength {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 400;
}

.password-strength.weak {
    color: #ef4444;
}

.password-strength.medium {
    color: #f59e0b;
}

.password-strength.strong {
    color: #10b981;
}

.password-match {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 400;
}

.password-match.match {
    color: #10b981;
}

.password-match.no-match {
    color: #ef4444;
}

/* ========================================
   CHECKBOX DE TERMOS
   ======================================== */

.wizard-terms-checkbox {
    display: flex;
    align-items: start;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 25px 0;
}

.wizard-terms-checkbox:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.wizard-terms-checkbox input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wizard-terms-checkbox span {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.wizard-terms-checkbox a,
.wizard-terms-link {
    color: #ffffff !important;
    text-decoration: underline !important;
    transition: all 0.2s;
    cursor: pointer !important;
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
    display: inline !important;
}

.wizard-terms-checkbox a:hover,
.wizard-terms-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: underline !important;
}

/* ========================================
   NAVIGATION BUTTONS
   ======================================== */

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 20px;
}

.wizard-btn,
.wizard-button {
    padding: 12px 40px !important;
    border-radius: 5px !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(150, 150, 150, 0.4) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px !important;
    text-transform: none !important;
}

.wizard-btn:hover:not(:disabled),
.wizard-button:hover:not(:disabled) {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.7) !important;
    border-color: rgba(180, 180, 180, 0.5) !important;
}

.wizard-btn:active:not(:disabled),
.wizard-button:active:not(:disabled) {
    transform: translateY(0);
}

.wizard-btn:disabled,
.wizard-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.wizard-btn-prev {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(150, 150, 150, 0.3) !important;
}

.wizard-btn-next,
.wizard-button.wizard-next {
    background: rgba(0, 0, 0, 0.6) !important;
    border-color: rgba(160, 160, 160, 0.4) !important;
    color: #ffffff !important;
    font-size: 15px !important;
}

.wizard-btn-submit {
    background: rgba(0, 0, 0, 0.6) !important;
    border-color: rgba(160, 160, 160, 0.4) !important;
    color: #ffffff !important;
    font-size: 15px !important;
}

.wizard-btn-next:hover:not(:disabled),
.wizard-btn-submit:hover:not(:disabled),
.wizard-button.wizard-next:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.8) !important;
    border-color: rgba(200, 200, 200, 0.5) !important;
    transform: translateY(-2px);
}

.wizard-btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.wizard-btn-submit .btn-loading {
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 400;
}

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

.wizard-btn-submit.loading .btn-loading {
    display: inline-flex;
}

.wizard-btn-submit .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ========================================
   SUCCESS SCREEN
   ======================================== */

.wizard-success-screen {
    display: none;
    text-align: center;
    padding: 60px 20px;
    animation: fadeInScale 0.6s ease;
}

.wizard-success-screen.active {
    display: block;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wizard-success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    animation: checkmarkPop 0.6s ease 0.3s both;
}

.wizard-success-icon svg {
    width: 48px;
    height: 48px;
}

@keyframes checkmarkPop {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.wizard-success-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 15px;
}

.wizard-success-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 30px;
}

.wizard-success-details {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 25px;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.wizard-success-details h4 {
    color: #ffffff;
    font-size: 15px;
    font-weight: 400;
    margin: 0 0 15px 0;
}

.wizard-success-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wizard-success-details li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.8;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wizard-success-details li:last-child {
    border-bottom: none;
}

.wizard-success-details li::before {
    content: "✓ ";
    color: rgba(34, 197, 94, 0.8);
    font-weight: bold;
    margin-right: 8px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .crm-wizard-container {
        padding: 25px 20px;
    }
    
    .wizard-progress-bar {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .wizard-step-circle {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .wizard-step-label {
        font-size: 9px;
    }
    
    .wizard-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wizard-radio-group {
        grid-template-columns: 1fr;
    }
    
    .wizard-navigation {
        flex-direction: column;
    }
    
    .wizard-btn {
        width: 100%;
        justify-content: center;
    }
    
    .wizard-step-title h2 {
        font-size: 22px;
    }
    
    .wizard-upload-zone {
        padding: 30px 15px;
    }
}

@media (max-width: 480px) {
    .crm-wizard-wrapper {
        padding: 10px;
    }
    
    .crm-wizard-container {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .wizard-progress-wrapper {
        margin-bottom: 30px;
    }
    
    .wizard-step-title h2 {
        font-size: 20px;
    }
    
    .wizard-steps-container {
        min-height: 400px;
    }
}

/* ========================================
   MODAL DE TERMOS
   ======================================== */

.crm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 99999;
    overflow-y: auto;
    padding: 20px;
}

.crm-modal-overlay.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.wizard-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-loading-modal {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 36px 42px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(360px, 90vw);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.wizard-loading-modal p {
    color: #ffffff !important;
    font-size: 18px !important;
    margin-top: 20px;
    letter-spacing: 0.5px;
}

.wizard-loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: wizard-spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes wizard-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .wizard-loading-modal {
        padding: 28px 30px;
    }

    .wizard-loading-modal p {
        font-size: 16px !important;
    }

    .wizard-loading-spinner {
        width: 48px;
        height: 48px;
        border-width: 5px;
    }
}

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

.crm-modal {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.crm-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crm-modal-header h3 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 400;
    margin: 0;
}

.crm-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.crm-modal-close:hover {
    color: #ffffff;
    transform: rotate(90deg);
}

.crm-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.crm-modal-body h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    margin: 25px 0 12px 0;
}

.crm-modal-body h4:first-child {
    margin-top: 0;
}

.crm-modal-body p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 15px 0;
}

.crm-modal-body ul {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.8;
    margin: 10px 0 20px 20px;
    padding: 0;
}

.crm-modal-body li {
    margin-bottom: 8px;
}

.crm-modal-body strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.crm-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
}

.crm-modal-btn {
    padding: 12px 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
}

.crm-modal-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .crm-modal {
        max-width: 95%;
        max-height: 90vh;
    }
    
    .crm-modal-header,
    .crm-modal-body,
    .crm-modal-footer {
        padding: 20px;
    }
    
    .crm-modal-header h3 {
        font-size: 18px;
    }
}

/* ========================================
   ✅ PARTE 3: ERROS ESTRUTURADOS
   ======================================== */

.error-hint {
    display: block;
    color: #ef4444 !important;
    font-size: 12px !important;
    margin-top: 4px !important;
    padding-left: 8px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    animation: fadeInDown 0.3s ease;
}

.error-hint a {
    color: #ef4444 !important;
    text-decoration: underline !important;
}

.error-hint a:hover {
    color: #dc2626 !important;
}

.wizard-form-field.has-error .wizard-input,
.wizard-form-field.has-error .wizard-select {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
}

.wizard-form-field.has-error .wizard-label {
    color: #ef4444 !important;
}

.wizard-input.invalid,
.wizard-select.invalid {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
    animation: shake 0.4s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* ========================================
   ✅ REGISTRO PROFISSIONAL - CAMPOS CONDICIONAIS
   ======================================== */

#registro-detalhes {
    display: none;
    margin-top: 20px;
}

#registro-detalhes.active {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

#registro-detalhes [data-registro] {
    display: none;
    flex: 1;
    min-width: 250px;
}

#registro-detalhes [data-registro].active {
    display: block;
}
