/* ---------- RESET ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* ---------- BODY ---------- */
body {
    background: #C0c0c0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 100px; /* space for header */
    color: #333;
}

/* -----------------------------------------------------------
   HEADER — MATCHES THE HOMEPAGE (Same Styling!)
------------------------------------------------------------ */
header {
    background: linear-gradient(135deg, #005c97, #363795);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 38px;
}

.logo-text {
    font-size: 26px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

/* ---------------- NAV LIST (Same as Homepage) ---------------- */
nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

nav a {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: 0.25s ease;
    position: relative;
}

nav a:hover {
    background: rgba(255,255,255,0.15);
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: white;
    transition: 0.3s ease;
    border-radius: 2px;
}

nav a:hover::after {
    width: 100%;
}

/* ---------------- LANGUAGE SELECTOR ---------------- */

.lang-selector {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Updated for 🌐 button */
.lang-icon {
    font-size: 20px;
    background: transparent;
    border: none;
    color: white;          /* matches navbar style */
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: 0.2s ease;
}

.lang-icon:hover {
    opacity: 0.7;
}

.lang-menu {
    position: absolute;
    top: 32px;
    right: 0;
    background-color: #ffffff;
    color: #333;
    border-radius: 8px;
    min-width: 140px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    display: none;
    overflow: hidden;
    animation: fadeDown 0.25s ease;
}

.lang-menu div {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s ease;
    white-space: nowrap;
}

.lang-menu div:hover {
    background: #f5f5f5;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0px); }
}

/* ---------------- LOGIN BOX ---------------- */
.container {
    width: 100%;
    max-width: 400px;
    margin-top: 60px;
}

.login-box {
    background: white;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    text-align: center;
}

/* ---------- UPDATED LOGIN BRAND (Logo + Title inside card) ---------- */
.login-brand {
    display: flex;
    flex-direction: column;        /* logo above title */
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    gap: 10px;
}

.login-brand img {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.brand-title {
    font-size: 26px;
    font-weight: 700;
    color: #1f1f1f;
    letter-spacing: 0.5px;
}

/* ---------- FORM ELEMENTS ---------- */
.input-group {
    text-align: left;
    margin-bottom: 18px;
}

.input-group label {
    font-weight: 600;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    transition: 0.3s;
}

.input-group input:focus {
    border-color: #4f6cff;
    box-shadow: 0 0 6px rgba(79,108,255,0.5);
}

.login-btn {
    width: 100%;
    background: #4f6cff;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

.login-btn:hover {
    background: #394ecc;
}

.footer-text {
    margin-top: 25px;
    font-size: 13px;
    color: #888;
}

/* ---------- RTL Input Handling ---------- */
input {
    text-align: left;
    direction: ltr;
}
body[dir="rtl"] input {
    text-align: right;
    direction: rtl;
}

/* ---------- Forgot Password UI ---------- */
.forgot-pass {
    margin-top: 12px;
    text-align: right;
}

#forgotPasswordBtn {
    background: none;
    border: none;
    color: #0096c7;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

#forgotPasswordBtn:hover {
    color: #0077a3;
}

/* Popup */
.reset-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.reset-box {
    background: #fff;
    padding: 20px;
    width: 300px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.close-btn {
    background: #888;
    color: white;
    padding: 8px;
    border-radius: 6px;
}


/* Error message box */
.login-error {
    background-color: #ffe6e6;   /* light red */
    color: #b20000;              /* dark red text */
    border-left: 5px solid #b20000;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 0.95rem;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
