/**
 * DigitalMDHusain - Premium Authentication Styles
 * Split layout: Left content (55%) | Right form (45%)
 */

/* ============================================
   AUTH PAGE LAYOUT
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 50%, #FDF2F8 100%);
    position: relative;
}

.auth-container {
    max-width: var(--container-max);
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(91, 92, 235, 0.15), 0 8px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    min-height: 700px;
}

/* ============================================
   LEFT SIDE - CONTENT
   ============================================ */

.auth-left {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #5B5CEB 0%, #7C5CFF 50%, #A855F7 100%);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.auth-left__logo {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

.auth-left__illustration {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 50px;
    position: relative;
    z-index: 1;
}

.auth-left__illustration svg {
    width: 100%;
    height: auto;
}

.auth-left__benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.auth-benefit {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-benefit__icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.auth-benefit__icon svg {
    width: 14px;
    height: 14px;
}

.auth-benefit__content h4 {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.auth-benefit__content p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}

.auth-left__badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.auth-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: white;
    backdrop-filter: blur(10px);
}

.auth-badge svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   RIGHT SIDE - FORM
   ============================================ */

.auth-right {
    flex: 0 0 55%;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.auth-form-card {
    width: 100%;
}

.auth-form-header {
    margin-bottom: 40px;
}

.auth-form-header__logo {
    font-size: 28px;
    font-weight: 700;
    color: #5B5CEB;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.auth-form-header__title {
    font-size: 42px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.auth-form-header__subtitle {
    font-size: 17px;
    color: #6b7280;
    line-height: 1.5;
}

/* ============================================
   AUTH ALERTS & NOTIFICATIONS
   ============================================ */

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
    animation: alertSlide 0.3s ease-out;
}

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

.auth-alert--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #dc2626;
}

.auth-alert--success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #059669;
}

.auth-alert--info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #2563eb;
}

.auth-alert__icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-alert__content {
    flex: 1;
}

.auth-alert__list {
    margin: 0;
    padding-left: 18px;
    list-style-type: disc;
}

/* ============================================
   FORM STYLES
   ============================================ */

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

.auth-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.auth-form__group {
    display: flex;
    flex-direction: column;
}

.auth-form__label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.auth-form__input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-family: var(--font-primary);
    color: #1f2937;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
    height: auto;
    box-sizing: border-box;
    line-height: 1.5;
}

.auth-form__input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
    background: #ffffff;
}

.auth-form__input--error {
    border-color: #ef4444 !important;
}

.auth-form__input--error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.auth-form__input::placeholder {
    color: #9ca3af;
}

.auth-form__select {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-family: var(--font-primary);
    color: #1f2937;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
    height: auto;
    cursor: pointer;
    appearance: none;
    box-sizing: border-box;
    line-height: 1.5;
}

.auth-form__select:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
    background: #ffffff;
}

.auth-form__select--error {
    border-color: #ef4444 !important;
}

.auth-form__select--error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.auth-form__error {
    font-size: 13px;
    color: #ef4444;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: errorSlide 0.3s ease-out;
}

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

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

.auth-form__checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-form__checkbox input {
    width: 20px;
    height: 20px;
    accent-color: #5B5CEB;
    cursor: pointer;
}

.auth-form__checkbox label {
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
    line-height: 1.4;
}

.auth-form__link {
    color: #5B5CEB;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-form__link:hover {
    color: #4a4bdb;
    text-decoration: underline;
}

.auth-form__button {
    width: 100%;
    padding: 18px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-primary);
    color: white;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(91, 92, 235, 0.3);
    height: auto;
    box-sizing: border-box;
}

.auth-form__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 92, 235, 0.4);
}

.auth-form__button:active {
    transform: translateY(0);
}

.auth-form__button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-form__divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 32px 0;
}

.auth-form__divider::before,
.auth-form__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.auth-form__divider span {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.auth-form__social {
    display: flex;
    gap: 16px;
}

.auth-form__social-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-xl);
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    height: auto;
    box-sizing: border-box;
}

.auth-form__social-button:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.auth-form__social-button svg {
    width: 24px;
    height: 24px;
}

.auth-form__footer {
    text-align: center;
    margin-top: 24px;
    font-size: 15px;
    color: #6b7280;
}

/* ============================================
   PASSWORD STRENGTH METER
   ============================================ */

.auth-form__password-wrapper {
    position: relative;
}

.auth-form__password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.auth-form__password-toggle:hover {
    color: #5B5CEB;
}

.auth-form__password-toggle svg {
    width: 20px;
    height: 20px;
}

.auth-form__strength {
    margin-top: 12px;
}

.auth-form__strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.auth-form__strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.auth-form__strength-fill--weak {
    width: 33%;
    background: #ef4444;
}

.auth-form__strength-fill--medium {
    width: 66%;
    background: #f59e0b;
}

.auth-form__strength-fill--strong {
    width: 100%;
    background: #10b981;
}

.auth-form__strength-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

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

@media (max-width: 1024px) {
    .auth-page {
        padding: 60px 24px;
    }

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

    .auth-left {
        flex: none;
        padding: 50px 40px;
    }

    .auth-right {
        flex: none;
        padding: 50px 40px;
    }

    .auth-left__benefits {
        grid-template-columns: 1fr;
    }

    .auth-form-header__title {
        font-size: 36px;
    }
}

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

    .auth-container {
        width: 100%;
        border-radius: 16px;
    }

    .auth-left {
        padding: 40px 24px;
    }

    .auth-right {
        padding: 40px 24px;
    }

    .auth-left__illustration {
        max-width: 300px;
    }

    .auth-form-card {
        max-width: 100%;
    }

    .auth-form-header__title {
        font-size: 32px;
    }

    .auth-form__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

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

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

    .auth-container {
        border-radius: 12px;
    }

    .auth-left {
        padding: 30px 20px;
    }

    .auth-right {
        padding: 30px 20px;
    }

    .auth-left__logo {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .auth-left__illustration {
        max-width: 250px;
        margin-bottom: 30px;
    }

    .auth-form-header__title {
        font-size: 28px;
    }

    .auth-form-header__subtitle {
        font-size: 15px;
    }

    .auth-form__input,
    .auth-form__select,
    .auth-form__button,
    .auth-form__social-button {
        padding: 14px 16px;
        font-size: 15px;
    }
}
