/* Optimized Authentication Styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

body.auth-page {
    background: url('../img/pages/login-bg.png') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.page-wrapper {
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 900px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    display: flex;
    overflow: hidden;
    margin: 0 auto;
}

.auth-left {
    width: 55%;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-left img {
    max-width: 100%;
    height: auto;
    max-height: 350px;
}

.auth-divider {
    width: 1px;
    background: #e5e7eb;
    margin: 40px 0;
}

.auth-right {
    width: 45%;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-title {
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 30px;
    color: #1f2937;
    position: relative;
    text-align: center;
}

.auth-title::after {
    content: '';
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-control {
    width: 100%;
    height: 50px;
    border-radius: 25px;
    padding: 0 20px;
    border: 2px solid #e5e7eb;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #f9fafb;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

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

.form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.btn-auth {
    width: 100%;
    height: 50px;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    margin-top: 20px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.btn-auth:hover {
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #6b7280;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    margin-left: 20px;
}

.footer-text {
    margin-top: 30px;
    font-size: 12px;
    text-align: center;
    color: #9ca3af;
}

.password-requirements {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #64748b;
}

.password-requirements h6 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.password-requirements ul {
    margin: 0;
    padding-left: 16px;
}

.password-requirements li {
    margin-bottom: 3px;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 15px;
    }

    .auth-card {
        flex-direction: column;
        max-width: 100%;
        margin: 0;
        border-radius: 12px;
    }

    .auth-left {
        width: 100%;
        padding: 25px 20px;
        min-height: 180px;
        border-radius: 12px 12px 0 0;
    }

    .auth-left img {
        max-height: 140px;
    }

    .auth-divider {
        display: none;
    }

    .auth-right {
        width: 100%;
        padding: 35px 25px;
        border-radius: 0 0 12px 12px;
    }

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

    .form-control {
        height: 50px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn-auth {
        height: 50px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .page-wrapper {
        padding: 10px;
        padding-top: 20px;
    }

    .auth-card {
        border-radius: 10px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    }

    .auth-left {
        padding: 20px 15px;
        min-height: 160px;
        border-radius: 10px 10px 0 0;
    }

    .auth-left img {
        max-height: 120px;
    }

    .auth-right {
        padding: 25px 20px;
        border-radius: 0 0 10px 10px;
    }

    .auth-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .auth-title::after {
        width: 40px;
        height: 2px;
    }

    .form-control {
        height: 48px;
        padding: 0 18px;
        border-radius: 24px;
    }

    .btn-auth {
        height: 48px;
        font-size: 14px;
        border-radius: 24px;
        margin-top: 15px;
    }

    .auth-link {
        margin-top: 15px;
        font-size: 13px;
    }

    .footer-text {
        margin-top: 20px;
        font-size: 11px;
    }

    .error-message {
        font-size: 11px;
        margin-left: 18px;
    }

    .password-requirements {
        padding: 10px;
        margin-bottom: 15px;
        font-size: 11px;
    }
}

@media (max-width: 320px) {
    .page-wrapper {
        padding: 5px;
        padding-top: 10px;
    }

    .auth-left {
        padding: 15px 10px;
        min-height: 140px;
    }

    .auth-left img {
        max-height: 100px;
    }

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

    .auth-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .form-control {
        height: 44px;
        padding: 0 15px;
        font-size: 15px;
    }

    .btn-auth {
        height: 44px;
        font-size: 13px;
    }
}

/* Modal Optimizations */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.25rem;
    }

    .modal-title {
        font-size: 1.1rem;
        font-weight: 600;
    }

    .form-control {
        height: 48px;
        font-size: 16px;
        border-radius: 8px;
    }

    .btn {
        height: 48px;
        font-size: 14px;
        border-radius: 8px;
    }
}
