/* Registro Moderno - Design Flat App Style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.registro-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-x: hidden;
}

.registro-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    min-height: 420px;
    margin: 0 auto;
}

.registro-card {
    display: flex;
    width: 100%;
    height: 100%;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

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

/* Lado Esquerdo - Ilustração */
.registro-illustration-section {
    flex: 1;
    background: linear-gradient(135deg, #a50dee 0%, #8a0bc8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
}

.registro-illustration {
    text-align: center;
    position: relative;
    z-index: 2;
}

.illustration-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.illustration-icon i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.illustration-text {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.illustration-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 250px;
    margin: 0 auto 2rem;
}

.features-list {
    text-align: left;
    max-width: 280px;
    margin: 2rem auto 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
}

.feature-item i {
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Decorações de fundo */
.bg-decoration {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.circle-1 {
    width: 120px;
    height: 120px;
    background: #ffffff;
    top: 10%;
    right: 10%;
    animation: float 6s ease-in-out infinite;
}

.circle-2 {
    width: 80px;
    height: 80px;
    background: #ffffff;
    bottom: 30%;
    left: 15%;
    animation: float 8s ease-in-out infinite reverse;
}

.circle-3 {
    width: 60px;
    height: 60px;
    background: #ffffff;
    top: 50%;
    left: 10%;
    animation: float 7s ease-in-out infinite;
}

/* Lado Direito - Formulário */
.registro-form-section {
    flex: 1;
    background: white;
    padding: 50px 40px;
    overflow-y: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.registro-header {
    margin-bottom: 35px;
}

.registro-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.registro-header p {
    font-size: 15px;
    color: #666;
    font-weight: 400;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

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

.alert-error {
    background: #fff0f0;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.alert-success {
    background: #f0fff4;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert i {
    font-size: 20px;
    margin-top: 2px;
}

.alert div {
    flex: 1;
}

.alert p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.alert p + p {
    margin-top: 8px;
}

.alert a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* Formulário */
.registro-form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Tipo de Cliente */
.tipo-cliente-group {
    margin-bottom: 10px;
}

.tipo-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tipo-btn {
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    background: #fafafa;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tipo-btn i {
    font-size: 16px;
}

.tipo-btn:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.tipo-btn.active {
    background: #a50dee;
    color: white;
    border-color: #a50dee;
}

.tipo-btn.active:hover {
    background: #8a0bc8;
    border-color: #8a0bc8;
}

/* Form Groups */
.form-group {
    position: relative;
    margin-bottom: 0;
}

.form-group:not(:last-child) {
    margin-bottom: 20px;
}

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

.form-row .form-group {
    margin-bottom: 0;
}

.form-row .flex-1 {
    flex: 1;
}

.form-row .flex-2 {
    flex: 2;
}

/* Espaçamento específico para o campo bairro */
.bairro-field {
    margin-top: 20px;
}

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

.input-container input,
.input-container select {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: #fafafa;
    transition: all 0.3s;
    outline: none;
}

.input-container input:focus,
.input-container select:focus {
    border-color: #a50dee;
    background: white;
    box-shadow: 0 0 0 3px rgba(165, 13, 238, 0.1);
}

.input-container input::placeholder {
    color: #999;
}

.input-icon {
    position: absolute;
    left: 18px;
    color: #999;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.3s;
}

.input-container input:focus + .input-icon,
.input-container select:focus + .input-icon {
    color: #a50dee;
}

/* Validation Icon */
.validation-icon {
    position: absolute;
    right: 18px;
    font-size: 16px;
    display: none;
}

.validation-icon::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.input-container.validating .validation-icon {
    display: block;
    color: #999;
}

.input-container.validating .validation-icon::before {
    content: "\f110"; /* spinner */
    animation: spin 1s linear infinite;
}

.input-container.valid .validation-icon {
    display: block;
    color: #4CAF50;
}

.input-container.valid .validation-icon::before {
    content: "\f058"; /* check-circle */
}

.input-container.invalid .validation-icon {
    display: block;
    color: #f44336;
}

.input-container.invalid .validation-icon::before {
    content: "\f057"; /* times-circle */
}

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

/* Validation Message */
.validation-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    min-height: 18px;
}

.validation-message.error {
    color: #f44336;
}

.validation-message.success {
    color: #4CAF50;
}

.validation-message.info {
    color: #666;
}

/* Toggle Password */
.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #666;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
    border-radius: 3px;
}

.strength-fill.weak {
    width: 33.33%;
    background: #f44336;
}

.strength-fill.medium {
    width: 66.66%;
    background: #ff9800;
}

.strength-fill.strong {
    width: 100%;
    background: #4CAF50;
}

.strength-text {
    font-size: 13px;
    font-weight: 600;
}

.strength-text.weak {
    color: #f44336;
}

.strength-text.medium {
    color: #ff9800;
}

.strength-text.strong {
    color: #4CAF50;
}

/* Divider */
.divider {
    text-align: center;
    position: relative;
    margin: 25px 0 15px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    position: relative;
    background: white;
    padding: 0 15px;
    font-size: 12px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botão de Registro */
.registro-btn {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #a50dee 0%, #7a0bbc 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(165, 13, 238, 0.3);
}

.registro-btn:hover {
    background: linear-gradient(135deg, #8a0bc8 0%, #6509a0 100%);
    box-shadow: 0 6px 20px rgba(165, 13, 238, 0.4);
    transform: translateY(-2px);
}

.registro-btn:active {
    transform: translateY(0);
}

.registro-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.registro-btn.loading .btn-icon {
    animation: spin 1s linear infinite;
}

/* Footer */
.registro-footer {
    margin-top: auto;
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.registro-footer p {
    font-size: 15px;
    color: #666;
}

.registro-footer a {
    color: #a50dee;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.registro-footer a:hover {
    color: #8a0bc8;
    text-decoration: underline;
}

/* Responsivo - Tablet */
@media (max-width: 1024px) {
    .registro-container {
        max-width: 90%;
        margin: 0 auto;
    }
}

/* Forçar layout em coluna única para mobile */
@media (max-width: 768px) {
    .registro-card {
        flex-direction: column !important;
        display: flex !important;
    }
    
    .registro-illustration-section,
    .registro-form-section {
        width: 100% !important;
        flex: none !important;
        display: block !important;
    }
}

/* Responsivo - Mobile */
@media (max-width: 768px) {
    .registro-body {
        padding: 0;
        min-height: 100vh;
        align-items: stretch;
    }
    
    .registro-container {
        max-width: 100%;
        flex-direction: column !important;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        display: flex !important;
    }
    
    .registro-illustration-section {
        order: 1;
        flex: none !important;
        width: 100% !important;
        min-height: 180px;
        padding: 1.5rem;
        border-radius: 0;
        display: block !important;
    }
    
    .registro-form-section {
        order: 2;
        padding: 2rem 1.5rem;
        flex: 1;
        width: 100% !important;
        justify-content: flex-start;
        display: block !important;
    }
    
    .illustration-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 0.75rem;
    }
    
    .illustration-icon i {
        font-size: 2rem;
    }
    
    .illustration-text {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .illustration-subtitle {
        font-size: 0.9rem;
        max-width: 280px;
    }
    
    .registro-header h1 {
        font-size: 1.75rem;
    }
    
    .registro-header p {
        font-size: 0.9rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tipo-buttons {
        grid-template-columns: 1fr;
    }
    
    .input-container input,
    .input-container select {
        padding: 0.875rem 1rem;
        padding-left: 3rem;
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    .input-icon {
        left: 1rem;
        font-size: 0.9rem;
    }
    
    .registro-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .features-list {
        margin-top: 1.5rem;
    }
    
    .feature-item {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
}

/* Prevenção de zoom duplo toque no iOS */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Scrollbar customizada */
.registro-form-section::-webkit-scrollbar {
    width: 8px;
}

.registro-form-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.registro-form-section::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 10px;
}

.registro-form-section::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

