﻿/* ===== Login Background ===== */
.login-bg {
    min-height: 100vh;
    background: linear-gradient(rgba(0,0,0,.4), rgba(0,0,0,.5)), url('/Images/bg-01.jpg') center/cover no-repeat fixed;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== Login card ===== */
.login-form {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 480px;
    padding: 90px 45px 60px 45px;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

@media (max-width: 575px) {
    .login-form {
        width: 320px;
        padding: 90px 25px 30px 25px;
    }
}

.login-form .logo-login img {
    width: 110px;
    height: 110px;
    position: absolute;
    top: -55px;
    left: 0;
    right: 0;
    margin: 0 auto;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px;
}

.login-form h2 {
    color: #fff;
    font-size: 22px;
    margin: 0;
    text-align: center;
    font-weight: 700;
    margin-bottom: 35px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.login-form .form-input {
    position: relative;
    margin: 25px 0;
}

    .login-form .form-input label {
        font-size: 14px;
        font-weight: 600;
        color: #fff;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
        margin-bottom: 8px;
        display: block;
    }

    .login-form .form-input > input {
        outline: none;
        height: 45px;
        padding: 12px;
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 8px;
        transition: all 0.3s ease;
    }

        .login-form .form-input > input:focus {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.5);
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
        }

    .login-form .form-input input::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }

    .login-form .form-input input[type="submit"] {
        background: linear-gradient(135deg, #1a7f5f 0%, #298376 100%);
        color: #fff;
        border: none;
        cursor: pointer;
        text-transform: capitalize;
        line-height: 1;
        font-size: 18px;
        font-weight: 700;
        border-radius: 25px;
        transition: all 0.4s ease;
        height: 50px;
        box-shadow: 0 4px 15px rgba(41, 131, 118, 0.4);
    }

        .login-form .form-input input[type="submit"]:hover {
            background: linear-gradient(135deg, #15664d 0%, #206b5f 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(41, 131, 118, 0.6);
        }

        .login-form .form-input input[type="submit"]:active {
            transform: translateY(0);
        }

.login-form .forget,
.login-form .registration {
    display: block;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 8px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
    font-size: 14px;
}

    .login-form .forget:hover,
    .login-form .registration:hover {
        color: #ffd700;
        text-decoration: underline;
    }

/* ===============================
   FIX MudTextField - إصلاح نهائي
   =============================== */

/* إزالة كل الخلفيات البيضاء */
.login-form .mud-input-root,
.login-form .mud-input-control,
.login-form .mud-input-slot,
.login-form .mud-input,
.login-form .login-email *,
.login-form .login-password *,
.login-form .login-field * {
    background-color: transparent !important;
    background: transparent !important;
}

/* Container الرئيسي للحقل */
.login-form .mud-input-control-input-container {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 8px !important;
    padding: 2px 0 !important;
    transition: all 0.3s ease !important;
}

/* عند التركيز */
.login-form .mud-input-root:hover .mud-input-control-input-container,
.login-form .mud-input-root.mud-input-focused .mud-input-control-input-container {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15) !important;
}

/* النص داخل الحقل - الأهم */
.login-form input.mud-input-slot,
.login-form .mud-input-slot input,
.login-form input {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
}

    /* placeholder */
    .login-form input::placeholder,
    .login-form .mud-input-slot::placeholder {
        color: rgba(255, 255, 255, 0.5) !important;
        opacity: 1 !important;
    }

/* الأيقونات */
.login-form .mud-input-adornment svg,
.login-form .login-email .mud-input-adornment svg,
.login-form .login-password .mud-input-adornment svg {
    color: rgba(255, 255, 255, 0.7) !important;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* إزالة الخط السفلي من MudBlazor */
.login-form .mud-input-underline::before,
.login-form .mud-input-underline::after,
.login-form .mud-input-line::before,
.login-form .mud-input-line::after {
    display: none !important;
    border: none !important;
}

/* إزالة أي filled overlay */
.login-form .mud-input-filled::before,
.login-form .mud-input-filled::after {
    display: none !important;
}

/* ===============================
   AUTOFILL FIX - إصلاح شامل
   =============================== */

.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus,
.login-form input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 9999s ease-in-out 0s;
    caret-color: #ffffff !important;
}

.login-form input:-moz-autofill {
    box-shadow: 0 0 0 1000px transparent inset !important;
    color: #ffffff !important;
}

/* ===== تحسين Grid Links ===== */
.login-form .MudGrid .MudItem a {
    display: inline-block;
    transition: all 0.3s ease;
}

    .login-form .MudGrid .MudItem a:hover {
        transform: translateX(3px);
    }

    .login-form .MudGrid .MudItem a label {
        cursor: pointer;
        transition: all 0.3s ease;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    }

    .login-form .MudGrid .MudItem a:hover label {
        color: #ffd700 !important;
    }

/* ===== Animation ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.login-form {
    animation: fadeIn 0.6s ease-out;
}

    /* ===== إصلاح Label في MudTextField ===== */
    .login-form .mud-input-label {
        color: rgba(255, 255, 255, 0.8) !important;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    }

    .login-form .mud-input-label-inputcontrol {
        transform: none !important;
        position: relative !important;
    }
