/* Customer Login Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

.login-container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    background: white;
}

.login-form-section {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: white;
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-header {
    margin-bottom: 40px;
    text-align: center;
}

.brand-logo-img {
    margin-bottom: 20px;
}

.company-logo {
    max-width: 180px;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    position: relative;
    padding-bottom: 12px;
    display: inline-block;
}

.login-header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #0b1f3f 0%, #1f4c8c 100%);
    border-radius: 2px;
}

.login-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-top: 12px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    transition: border-color 0.3s;
}

.input-wrapper:focus-within {
    border-color: #0b1f3f;
}

.input-wrapper i {
    color: #64748b;
    font-size: 16px;
    margin-left: 12px;
    width: 20px;
    text-align: center;
}

.input-wrapper input {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #1e293b;
    font-family: 'Tajawal', sans-serif;
}

.input-wrapper input:focus {
    outline: none;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

.toggle-password {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-right: 8px;
}

.toggle-password:hover {
    color: #0b1f3f;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    cursor: pointer;
}

.remember-me input {
    width: 16px;
    height: 16px;
    accent-color: #0b1f3f;
}

.forgot-password {
    color: #1f4c8c;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 14px 24px;
    background: #0b1f3f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Tajawal', sans-serif;
}

.login-btn:hover {
    background: #1f4c8c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 31, 63, 0.3);
}

.login-image-section {
    flex: 1 1 50%;
    min-width: 0;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(11, 31, 63, 0.7) 0%, rgba(31, 76, 140, 0.5) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.overlay-content {
    text-align: center;
    color: white;
}

.overlay-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.overlay-content p {
    font-size: 16px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-link {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.back-link a {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.back-link a:hover {
    color: #0b1f3f;
}

/* Cloudflare Turnstile */
.cf-turnstile-wrapper {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cf-turnstile {
    min-height: 65px;
}

/* Responsive — الهاتف: بطاقة نظيفة + شعار (بدون صورة علوية) */
@media (max-width: 991px) {
    body {
        background: linear-gradient(160deg, #eef2f7 0%, #f8fafc 45%, #e8eef5 100%);
    }

    .login-container {
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
        background: transparent;
        padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
        align-items: center;
        justify-content: center;
    }

    .login-image-section {
        display: none !important;
    }

    .login-form-section {
        flex: 0 1 auto;
        width: 100%;
        max-width: 420px;
        min-height: 0;
        padding: 0;
        background: transparent;
    }

    .login-form-wrapper {
        max-width: 100%;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(11, 31, 63, 0.08), 0 2px 8px rgba(11, 31, 63, 0.04);
        padding: 32px 24px 28px;
        border: 1px solid rgba(226, 232, 240, 0.9);
    }

    .login-header {
        margin-bottom: 28px;
    }

    .brand-logo-img {
        margin-bottom: 16px;
    }

    .company-logo {
        max-width: 160px;
        max-height: 80px;
    }

    .login-header h1 {
        font-size: 22px;
    }

    .login-subtitle {
        font-size: 13px;
        margin-top: 10px;
        padding: 0 8px;
    }

    .login-btn:hover {
        transform: none;
    }
}

@media (max-width: 380px) {
    .login-form-wrapper {
        padding: 28px 18px 24px;
    }

    .company-logo {
        max-width: 140px;
        max-height: 70px;
    }
}
