/**
 * BIOINTE - AUTHENTICATION STYLES
 * Login, Register, and Auth pages
 */

/* ==========================================
   AUTH LAYOUT
   ========================================== */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.auth-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.3) 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 217, 163, 0.3) 0%, transparent 70%);
    bottom: -5%;
    right: -5%;
    animation-delay: 7s;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ==========================================
   AUTH CONTAINER
   ========================================== */

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 700px;
}

.login-container {
    max-width: 480px !important;
}

/* ==========================================
   FORM SIDE
   ========================================== */

.auth-form-side {
    padding: 60px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 800;
    transition: opacity 0.3s ease;
}

.auth-logo:hover {
    opacity: 0.8;
}

.auth-logo svg {
    filter: drop-shadow(0 4px 12px rgba(255, 107, 53, 0.3));
}

/* Progress Steps */
.auth-progress {
    display: flex;
    align-items: center;
    margin-bottom: 48px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E5E7EB;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.progress-step.completed .step-number {
    background: var(--success);
    color: white;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-step.active .step-label {
    color: var(--text-primary);
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #E5E7EB;
    margin: 0 12px;
    position: relative;
    overflow: hidden;
}

.progress-line-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    transition: width 0.5s ease;
}

.progress-step.completed ~ .progress-line .progress-line-fill {
    width: 100%;
}

/* Form Container */
.auth-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auth-form-step {
    display: none;
    flex-direction: column;
    animation: fadeIn 0.5s ease;
}

.auth-form-step.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Header */
.auth-header {
    margin-bottom: 32px;
}

.auth-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-label svg {
    color: var(--text-secondary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.form-input.error {
    border-color: var(--error);
}

.form-input.success {
    border-color: var(--success);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Input Feedback */
.input-feedback {
    margin-top: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-feedback.error {
    color: var(--error);
}

.input-feedback.success {
    color: var(--success);
}

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bars {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.strength-bar {
    height: 4px;
    flex: 1;
    background: #E5E7EB;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.password-strength.weak .strength-bar:nth-child(1) {
    background: var(--error);
}

.password-strength.medium .strength-bar:nth-child(1),
.password-strength.medium .strength-bar:nth-child(2) {
    background: #F59E0B;
}

.password-strength.strong .strength-bar {
    background: var(--success);
}

.strength-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #E5E7EB;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: white;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--gradient-primary);
    border-color: transparent;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.checkbox-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Character Count */
.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Avatar Upload */
.avatar-upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-hover);
    border-radius: 16px;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
    border: 4px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview svg {
    color: var(--text-tertiary);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions .btn-secondary {
    flex: 1;
}

.form-actions .btn-primary {
    flex: 2;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 32px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #E5E7EB;
}

.auth-divider span {
    position: relative;
    background: white;
    padding: 0 16px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Social Buttons */
.social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: white;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-social:hover {
    background: var(--bg-hover);
    border-color: #D1D5DB;
    transform: translateY(-2px);
}

/* Verification */
.success-icon {
    margin: 0 auto 24px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.verification-message {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(0, 217, 163, 0.1);
    border-radius: 12px;
    margin-bottom: 24px;
}

.verification-message svg {
    color: var(--success);
    flex-shrink: 0;
}

.verification-message strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.verification-message p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.resend-section {
    text-align: center;
    margin-top: 24px;
}

.resend-section p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.link-button {
    background: transparent;
    border: none;
    color: var(--primary-orange);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.link-button:hover {
    opacity: 0.7;
}

/* Alert */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
}

.alert svg {
    flex-shrink: 0;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

/* Footer */
.auth-footer {
    margin-top: auto;
    padding-top: 32px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==========================================
   PROMO SIDE
   ========================================== */

.auth-promo-side {
    background: var(--gradient-primary);
    color: white;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-promo-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.promo-content {
    position: relative;
    z-index: 1;
}

.promo-quote {
    margin-bottom: 48px;
}

.quote-icon {
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0.3;
}

.promo-quote h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.promo-quote p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Promo Stats */
.promo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* Promo Features */
.promo-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-item h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
}

/* Testimonials */
.promo-testimonials {
    position: relative;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-content p {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.author-name {
    font-weight: 700;
    margin-bottom: 2px;
}

.author-role {
    font-size: 14px;
    opacity: 0.8;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-promo-side {
        display: none;
    }
}

@media (max-width: 768px) {
    .auth-form-side {
        padding: 40px 24px;
    }

    .auth-title {
        font-size: 24px;
    }

    .auth-subtitle {
        font-size: 14px;
    }

    .auth-progress {
        margin-bottom: 32px;
    }

    .step-label {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .social-buttons {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn-secondary,
    .form-actions .btn-primary {
        flex: 1;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-container {
        min-height: auto;
    }

    .auth-form-side {
        padding: 32px 20px;
    }

    .promo-stats {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}