/**
 * Authentication Pages Styles - iOS Design
 */

/* ===== Auth Section ===== */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    background: linear-gradient(180deg, #f6f5f2 0%, #ffffff 50%, #f6f5f2 100%);
    position: relative;
    overflow: hidden;
}

.auth-section::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(77, 97, 244, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.auth-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(203, 137, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite reverse;
}

/* ===== Auth Container ===== */
.auth-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.auth-container.single-card {
    grid-template-columns: 1fr;
    max-width: 500px;
}

/* ===== Auth Card ===== */
.auth-card {
    padding: 48px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 32px;
    box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* ===== Auth Header ===== */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== Auth Tabs ===== */
.auth-tabs {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: rgba(246, 245, 242, 0.6);
    border-radius: 16px;
    margin-bottom: 32px;
}

.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ===== Auth Form ===== */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label svg {
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text-primary);
    background: rgba(246, 245, 242, 0.4);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(77, 97, 244, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

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

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

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.password-toggle:hover {
    background: rgba(246, 245, 242, 0.6);
    color: var(--text-primary);
}

/* Phone Input */
.phone-input-wrapper {
    display: flex;
    gap: 8px;
}

.phone-prefix {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: rgba(246, 245, 242, 0.6);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.phone-input {
    flex: 1;
}

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

.password-strength-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #0b3e27);
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.password-strength[data-strength="weak"] .password-strength-fill {
    width: 33%;
    background: #ef4444;
}

.password-strength[data-strength="medium"] .password-strength-fill {
    width: 66%;
    background: #f59e0b;
}

.password-strength[data-strength="strong"] .password-strength-fill {
    width: 100%;
    background: #0b3e27;
}

.password-strength-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Form Row */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    position: relative;
    width: 20px;
    height: 20px;
    background: rgba(246, 245, 242, 0.6);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #4d61f4, #cb89ff);
    border-color: transparent;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* OTP Input */
.otp-input-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.otp-digit {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(246, 245, 242, 0.4);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
}

.otp-digit:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(77, 97, 244, 0.1);
    transform: scale(1.05);
}

.otp-input {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 8px;
}

/* OTP Timer */
.otp-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(246, 245, 242, 0.6);
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.otp-timer strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Field Error */
.field-error {
    display: none;
    margin-top: 8px;
    font-size: 13px;
    color: var(--error-color);
}

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

/* Alerts */
.alert-info,
.alert-success,
.alert-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    margin-bottom: 24px;
}

.alert-info {
    background: rgba(77, 97, 244, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(77, 97, 244, 0.2);
}

.alert-success {
    background: rgba(11, 62, 39, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(11, 62, 39, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Links */
.link-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.link-text:hover {
    color: var(--primary-color);
}

.link-primary {
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.link-primary:hover {
    opacity: 0.8;
}

/* Button Block */
.btn-block {
    width: 100%;
}

/* Auth Footer */
.auth-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== Auth Sidebar ===== */
.auth-sidebar {
    padding: 48px;
    background: linear-gradient(135deg, #4d61f4 0%, #cb89ff 100%);
    border-radius: 32px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-sidebar::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-sidebar-content {
    position: relative;
    z-index: 1;
}

.auth-sidebar h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
}

.auth-sidebar p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Feature List */
.feature-list {
    list-style: none;
    margin-bottom: 40px;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
}

.feature-list svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Stats Mini */
.stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-mini {
    text-align: center;
}

.stat-mini-number {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-mini-label {
    font-size: 13px;
    opacity: 0.85;
}

/* Testimonial Mini */
.testimonial-mini {
    padding: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(20px);
}

.testimonial-rating {
    font-size: 18px;
    margin-bottom: 12px;
}

.testimonial-mini p {
    font-size: 14px;
    font-style: italic;
    margin-bottom: 16px;
}

.testimonial-author {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .auth-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .auth-section {
        padding: 100px 16px 40px;
    }

    .auth-card {
        padding: 32px 24px;
        border-radius: 24px;
    }

    .auth-title {
        font-size: 28px;
    }

    .auth-subtitle {
        font-size: 15px;
    }

    .auth-tabs {
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .otp-digit {
        width: 48px;
        height: 56px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
    }

    .otp-input-group {
        gap: 8px;
    }

    .otp-digit {
        width: 44px;
        height: 52px;
        font-size: 18px;
    }
}

/* Add this to ensure all text in sidebar is white */
.auth-sidebar h2,
.auth-sidebar h3,
.auth-sidebar p,
.auth-sidebar li {
    color: var(--white) !important;
}