/* === Global Base === */
body {
    font-family: "Cairo", "Tahoma", sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
    direction: rtl;
    color: #1f2937;
}

/* === Layout === */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* === Login Box === */
.login-box {
    background: #ffffff;
    padding: 56px 60px;
    border-radius: 18px;
    width: 100%;
    max-width: 480px;
    text-align: center;
    position: relative;
    box-shadow:
        0 10px 25px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 35px rgba(0,0,0,0.12);
}

/* Decorative corner */
.login-box::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle at top right, #1e3a8a22, transparent 70%);
    border-bottom-left-radius: 100%;
}

/* === Logos === */
.logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 36px;
    margin-bottom: 22px;
}

.logos img {
    height: 65px;
    object-fit: contain;
}

.logos img[alt="عمادة البحث العلمي"] {
    height: 105px;
}

/* === Titles === */
.login-box h2 {
    margin: 10px 0 6px;
    color: #1e3a8a;
    font-size: 28px;
    font-weight: 800;
}

.subtitle {
    color: #475569;
    font-size: 15px;
    margin-bottom: 34px;
    font-weight: 500;
}

/* === Form === */
.login-box form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* === Inputs === */
.login-box input {
    padding: 15px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    background-color: #f8fafc;
    transition: all 0.25s ease;
}

.login-box input:hover {
    background-color: #ffffff;
}

.login-box input:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30,58,138,0.15);
    outline: none;
}

/* === Password Field === */
.password-box {
    position: relative;
}

.password-box input {
    width: 100%;
    box-sizing: border-box;
    padding: 15px 42px 15px 16px; 
}


.password-box span {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 17px;
    color: #6b7280;
    transition: color 0.2s ease, transform 0.2s ease;
}

.password-box span:hover {
    color: #1e3a8a;
    transform: translateY(-50%) scale(1.1);
}

/* === Button === */
.login-box button {
    margin-top: 8px;
    padding: 15px;
    background: linear-gradient(135deg, #1e3a8a, #16306b);
    color: #ffffff;
    border: none;
    border-radius: 11px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.login-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.login-box button:active {
    transform: translateY(0);
}

/* === Error Message === */
.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    padding: 13px 15px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: right;
    animation: fadeIn 0.3s ease-in-out;
    border-right: 4px solid #dc2626;
}

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

/* === Forgot Password === */
.forgot-password {
    margin-top: 16px;
    text-align: right;
}

.forgot-password a {
    font-size: 13px;
    color: #1e3a8a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: #0f2c6d;
    text-decoration: underline;
}

/* === Responsive === */
@media (max-width: 500px) {
    .login-box {
        padding: 36px 26px;
        max-width: 92%;
    }

    .logos {
        gap: 22px;
        margin-bottom: 16px;
    }

    .logos img {
        height: 54px;
    }

    .logos img[alt="عمادة البحث العلمي"] {
        height: 86px;
    }

    .login-box h2 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
        margin-bottom: 26px;
    }

    .login-box input {
        font-size: 14px;
        padding: 13px;
    }

    .login-box button {
        font-size: 15px;
        padding: 13px;
    }
}
