/* resources/css/register.css */
/* Register Page - Estilos Modernos */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

/* ==================== WRAPPER & BACKGROUND ==================== */
.register-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.register-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 40%;
    left: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 15%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
}

/* ==================== CONTAINER ==================== */
.register-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ==================== BRAND ==================== */
.register-brand {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInDown 0.6s ease;
}

.brand-icon {
    font-size: 64px;
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }
}

.brand-text h1 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.brand-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* ==================== REGISTER CARD ==================== */
.register-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 32px;
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

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

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

/* ==================== HEADER ==================== */
.register-header {
    text-align: center;
    padding: 32px 32px 0 32px;
}

.header-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.register-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.register-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ==================== BODY ==================== */
.register-body {
    padding: 32px;
}

/* ==================== ALERTS ==================== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    margin-bottom: 24px;
    animation: slideIn 0.3s ease;
    transition: opacity 0.3s ease;
}

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

.alert-success {
    background: #dcfce7;
    border-left: 4px solid #10b981;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
}

.alert-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-content p {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: #991b1b;
}

.alert-content p:last-child {
    margin-bottom: 0;
}

/* ==================== FORM GROUPS ==================== */
.form-group {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

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

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 18px;
    color: #94a3b8;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    color: #94a3b8;
}

.error-message {
    display: block;
    font-size: 11px;
    color: #ef4444;
    margin-top: 6px;
}

/* ==================== PASSWORD STRENGTH ==================== */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
    width: 0%;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 10px;
    color: #64748b;
}

/* ==================== CHECKBOX ==================== */
.checkbox-group {
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.checkbox-label input:checked + .checkbox-custom {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
}

.checkbox-text {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.checkbox-text a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* ==================== REGISTER BUTTON ==================== */
.btn-register {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.4);
}

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

/* ==================== LOADING STATE ==================== */
.btn-register.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-register.loading span {
    visibility: hidden;
}

.btn-register.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ==================== LOGIN LINK ==================== */
.login-link {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.login-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-link a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* ==================== FOOTER ==================== */
.register-footer {
    text-align: center;
    padding: 24px 0 0 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

.separator {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-copyright p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
    .register-container {
        padding: 0 16px;
    }
    
    .register-card {
        border-radius: 28px;
    }
    
    .register-header {
        padding: 24px 24px 0 24px;
    }
    
    .register-header h2 {
        font-size: 24px;
    }
    
    .register-body {
        padding: 24px;
    }
    
    .brand-icon {
        width: 64px;
        height: 64px;
        font-size: 32px;
    }
    
    .brand-text h1 {
        font-size: 28px;
    }
    
    .footer-links {
        gap: 12px;
    }
    
    .checkbox-text {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .btn-register {
        padding: 12px;
    }
    
    .alert {
        flex-direction: column;
    }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    .shape,
    .register-card,
    .register-brand,
    .btn-register,
    .brand-icon {
        animation: none !important;
        transition: none !important;
    }
}