/* ===== REGISTER PAGE STYLES ===== */
/* Design follows mi-cuenta.php pattern with CSS variables */

:root {
    --primary600: #16a34a;
    --primary700: #15803d;
    --primary300: #86efac;
    --neutral900: #111827;
    --neutral700: #374151;
    --neutral600: #4b5563;
    --neutral500: #6b7280;
    --neutral400: #9ca3af;
    --neutral300: #d1d5db;
    --neutral200: #e5e7eb;
    --neutral100: #f3f4f6;
    --neutral50: #f9fafb;
    --white: #ffffff;
    --success: #16a34a;
    --warning: #f59e0b;
    --error: #dc2626;
}

.register-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--neutral50);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.register-card {
    background: var(--white);
    border: 1px solid var(--neutral200);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
}

/* ===== HEADER ===== */

.register-header {
    background: var(--neutral50);
    border-bottom: 1px solid var(--neutral200);
    padding: 32px 32px 24px;
    text-align: center;
}

.register-title {
    color: var(--neutral900);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.register-subtitle {
    color: var(--neutral600);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

/* ===== FORM CONTENT ===== */

.register-content {
    padding: 32px;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== FORM GROUPS ===== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--neutral700);
    font-size: 14px;
}

.form-group .form-control {
    padding: 12px 14px;
    border: 1px solid var(--neutral300);
    border-radius: 8px;
    font-size: 15px;
    color: var(--neutral900);
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    background-color: var(--white);
}

.form-group .form-control:focus {
    outline: none;
    border-color: var(--primary600);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group .form-control.error {
    border-color: var(--error);
}

.form-group .form-control.success {
    border-color: var(--success);
}

.form-group .form-control::placeholder {
    color: var(--neutral400);
}

/* ===== PASSWORD WRAPPER ===== */

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

.password-wrapper .form-control {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--neutral500);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--primary600);
}

.password-toggle i {
    font-size: 18px;
}

/* ===== PASSWORD STRENGTH INDICATOR ===== */

.password-strength {
    height: 4px;
    border-radius: 2px;
    background-color: var(--neutral200);
    overflow: hidden;
    display: none;
    position: relative;
    margin-top: 4px;
}

.password-strength.show {
    display: block;
}

.password-strength::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength.weak::before {
    width: 33%;
    background-color: var(--error);
}

.password-strength.medium::before {
    width: 66%;
    background-color: var(--warning);
}

.password-strength.strong::before {
    width: 100%;
    background-color: var(--success);
}

.password-strength-text {
    font-size: 13px;
    font-weight: 500;
    margin-top: 4px;
    display: none;
}

.password-strength-text.show {
    display: block;
}

.password-strength-text.weak {
    color: var(--error);
}

.password-strength-text.medium {
    color: var(--warning);
}

.password-strength-text.strong {
    color: var(--success);
}

/* ===== FORM HINTS & ERRORS ===== */

.form-hint {
    font-size: 13px;
    color: var(--neutral500);
    margin-top: 4px;
    line-height: 1.4;
}

.error-message {
    color: var(--error);
    font-size: 13px;
    font-weight: 500;
    display: none;
    margin-top: 2px;
}

.error-message.show {
    display: block;
}

/* ===== SUBMIT BUTTON ===== */

.form-actions {
    margin-top: 8px;
}

.btn-register {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background: var(--primary600);
    color: var(--white);
    font-family: inherit;
}

.btn-register:hover:not(:disabled) {
    background: var(--primary700);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-register:disabled {
    background: var(--neutral300);
    color: var(--neutral500);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

/* ===== SUCCESS MESSAGE ===== */

.success-message {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--success);
    font-size: 14px;
    font-weight: 500;
}

.success-message i {
    font-size: 20px;
}

/* ===== LOGIN LINK ===== */

.login-link {
    text-align: center;
    font-size: 14px;
    color: var(--neutral600);
    margin-top: -8px;
}

.login-link a {
    color: var(--primary600);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.login-link a:hover {
    color: var(--primary700);
    text-decoration: underline;
}

/* ===== TOAST NOTIFICATIONS ===== */

.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 400px;
}

.toast-notification.success {
    background-color: #16a34a;
    border: 1px solid #86efac;
    color: #FFFFFF;
}

.toast-notification.error {
    background-color: #dc2626;
    border: 1px solid #fca5a5;
    color: #FFFFFF;
}

.toast-notification.warning {
    background-color: #fffbeb;
    border: 1px solid #fcd34d;
    color: var(--warning);
}

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

@media (max-width: 640px) {
    .register-container {
        padding: 24px 16px;
    }

    .register-card {
        border-radius: 12px;
    }

    .register-header {
        padding: 24px 24px 20px;
    }

    .register-title {
        font-size: 24px;
    }

    .register-subtitle {
        font-size: 14px;
    }

    .register-content {
        padding: 24px;
    }

    .register-form {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .register-header {
        padding: 20px 20px 16px;
    }

    .register-content {
        padding: 20px;
    }
}
