/* Cinzel مستضاف محليًا بدل تحميله من Google Fonts: الرابط الخارجي كان بيرجع CSS
   مختلف حسب المتصفح (User-Agent)، فمفيش SRI hash واحد يقدر يتحقق منه بأمان.
   استضافته هنا بيحل مشكلة الـ SRI Missing من ZAP نهائيًا لصفحة اللوجين. */
@font-face {
    font-family: 'Cinzel';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/cinzel-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(rgba(74, 53, 37, 0.45), rgba(74, 53, 37, 0.45)), url('../background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

.lang-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(212, 163, 115, 0.25);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background 0.2s;
}
.lang-switcher:hover {
    background: rgba(212, 163, 115, 0.5);
}
.lang-switcher a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid #d4a373;
    box-sizing: border-box;
}

.login-brand {
    text-align: center;
    margin-bottom: 25px;
}
.login-brand h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #fff;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e8dcc8;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    text-align: left;
}
.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 6px;
    font-size: 1rem;
    color: #fff;
    box-sizing: border-box;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
}
.form-group input::placeholder { color: rgba(255, 255, 255, 0.5); }
.form-group input:focus {
    outline: none;
    border-color: #d4a373;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.25);
}
/* كروم بيفرض خلفية بيضاء صلبة على الحقول اللي بيعملها Autofill، فبنجبره يستخدم نفس لون الزجاج بدل ما يغطي التصميم */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.12) inset;
    box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.12) inset;
    transition: background-color 9999s ease-in-out 0s;
    caret-color: #fff;
}

.btn-login {
    width: 100%;
    background: #d4a373;
    color: #2b1d12;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: filter 0.2s ease, transform 0.2s ease;
}
.btn-login:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.error-msg {
    background: rgba(201, 74, 74, 0.18);
    color: #f0a8a8;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid #c94a4a;
}

.success-msg {
    background: rgba(40, 167, 69, 0.18);
    color: #a8e6b8;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid #28a745;
    line-height: 1.5;
}

/* "Forgot password?" + back-to-login links, and the forgot/reset page headings */
.auth-link {
    display: block;
    margin-top: 18px;
    text-align: center;
    color: #e8dcc8;
    font-size: 0.88rem;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color 0.2s ease;
}
.auth-link:hover { color: #d4a373; text-decoration: underline; }
.auth-title {
    color: #fdfbf7;
    text-align: center;
    margin: -6px 0 14px;
    font-size: 1.1rem;
}
.auth-intro {
    color: #e8dcc8;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 18px;
}
.auth-btn-link {
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.login-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 0 0 20px 0;
}
.login-divider-line {
    height: 1px;
    width: 50px;
    background: #d4a373;
    box-shadow: 0 0 8px #d4a373;
}
.login-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #fdfbf7;
    font-weight: 600;
    letter-spacing: 3px;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 1px 2px 4px rgba(0,0,0,0.5);
}

html[dir="rtl"] .lang-switcher {
    left: 20px;
    right: auto;
}
html[dir="rtl"] .form-group label {
    text-align: right;
}
html[dir="rtl"] .form-group input {
    text-align: right;
}
