/* ===== Fonts ===== */
@font-face {
    font-family: Tajawal;
    src: url("fonts/Tajawal-Medium.ttf");
}

@font-face {
    font-family: Cairo-ExtraBold;
    src: url("fonts/Cairo-ExtraBold.ttf");
}

//* ===== Base ===== */
body {
    margin: 0;
    height: 100vh;
    font-family: 'Tajawal';
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;

    /* animated gradient */
    background: linear-gradient(-45deg, #0f172a, #1e293b, #334155, #0f172a);
    background-size: 400% 400%;
    animation: gradientMove 12s ease infinite;
}

/* ===== Gradient Animation ===== */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== Floating particles ===== */
body::before {
    content: "";
    position: fixed;
    inset: 0;

    background: rgba(255, 255, 255, 0.4); /* شفافية */
    backdrop-filter: blur(px);
    -webkit-backdrop-filter: blur(8px);

    z-index: 1;
}

/* 👇 خليه فوق overlay */
.login-container {
    position: relative;
    z-index: 2;
}

@keyframes moveParticles {
    from { transform: translate(0,0); }
    to { transform: translate(-100px,-100px); }
}

/* ===== Base ===== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* 👈 هذا مهم بزاف */
}
body {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    font-family: 'Tajawal';
    background: linear-gradient(135deg, #eef2f7, #f8fafc);
}

/* ===== Container ===== */
.login-container {
    width: 100%;
    display: flex;
    justify-content: center;
}
/* ===== Card ===== */
.login-box {
    width: 380px;
    padding: 40px 30px;
    margin: 0px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(25px);

    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.05);

    box-shadow: 0 20px 50px rgba(0,0,0,0.08);

    text-align: center;
}

/* ===== Logo ===== */
.logo {
    width: 200px;
    margin-bottom: 0px;
}

/* ===== Title ===== */
.login-box h2 {
    margin-bottom: 30px;
    font-family: 'Cairo-ExtraBold';
    color: #0f172a;
}

/* ===== Inputs (Centered) ===== */
.login-box input {
    display: block;
    margin: 0 auto 13px auto;

    width: 75%; /* 🔥 centered */
    padding: 18px;

    border-radius: 12px;
    border: 1px solid #e2e8f0;

    background: #ffffff;
    color: #0f172a;
      font-family: Tajawal;
    transition: 0.25s;
}

/* placeholder */
.login-box input::placeholder {
    color: #94a3b8;
}

/* focus */
.login-box input:focus {
    border-color: #b58e4f;
    box-shadow: 0 0 0 3px rgba(181,142,79,0.15);
    outline: none;
}

/* ===== Button ===== */
.login-box button {
    width: 40%;
    padding: 13px;
    font-family: Tajawal;
    border-radius: 12px;
    border: none;
    font-size:14px;
    background: linear-gradient(135deg, #b58e4f, #8a6a3c);
    color: white;
    margin-top:20px;
    cursor: pointer;
    transition: 0.3s;
}

.login-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(181,142,79,0.3);
}

/* ===== Error ===== */
.error {
    color: #e11d48;
    margin-bottom: 10px;
}

/* ===== Shake ===== */
.login-box.shake {
    animation: shake 0.3s;
}

/****************************** show-password ************************/
.password-box{
    position: relative;
    width: 100%;
}

.password-box input{
    width: 85%;
    padding-right: 20px; /* 👈 مساحة للأيقونة (RTL) */
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    box-sizing: border-box;
}

.toggle-password{
    position: absolute;
    left: 40px; /* 👈 بدل left */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: #666;
}
.toggle-password:hover{
    color: #a16207;
}

@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

@media (max-width: 768px){

/* الجسم */
body{
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* الكونتينر */
.login-container{
    width: 100%;
    padding: 15px;
}

/* الكارت */
.login-box{
    width: 100%;
    max-width: 350px;
    margin: auto;
    padding: 25px 20px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    text-align: center;
}

/* اللوقو */
.logo{
    width: 90px;
    margin-bottom: 0px;
}

/* العنوان */
.login-box h2{
    font-size: 20px;
    margin-bottom: 20px;
}

/* inputs */
.login-box input{
    width: 95%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
}

/* focus */
.login-box input:focus{
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.1);
}

/* الزر */
.login-box button{
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #a16207;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
}

/* hover */
.login-box button:hover{
    background: #854d0e;
}

/* error */
.error{
    font-size: 13px;
    margin-bottom: 10px;
    color: red;
}
.login-box{
    animation: fadeIn 0.4s ease;
}
.password-box{
    position: relative;
    width: 100%;
}

.password-box input{
    width: 103%;
    padding-right: 20px; /* 👈 مساحة للأيقونة (RTL) */
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    box-sizing: border-box;
}

.toggle-password{
    position: absolute;
    left:15px; /* 👈 بدل left */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: #666;
}
}