/* =====================================================================
   منصة الحقيبة الأكاديمية — جامعة الشطرة
   هوية بصرية: أزرق سومري عميق + ذهب النخيل، خط عربي معاصر
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
    /* الألوان الأساسية — مستمدة من شعار الجامعة */
    --navy-900: #0a2452;
    --navy-800: #0b2e6b;
    --navy-700: #123a82;
    --navy-600: #1b4aa0;
    --sky-500:  #2f7fd1;
    --sky-100:  #e8f1fb;
    --gold-600: #b8862f;
    --gold-500: #d4a13c;
    --gold-100: #f7ecd4;

    --ink:      #16233d;
    --muted:    #64748b;
    --line:     #e3e8f0;
    --bg:       #eef2f7;
    --card:     #ffffff;
    --success:  #1a7f52;
    --danger:   #c0392b;
    --warning:  #b8862f;

    --radius:   14px;
    --radius-sm: 9px;
    --shadow:   0 10px 40px rgba(10, 36, 82, 0.10);
    --shadow-sm: 0 2px 10px rgba(10, 36, 82, 0.06);
    --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-600); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- شاشة الدخول ---------------- */
.auth-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

/* اللوحة الجانبية الزخرفية */
.auth-side {
    position: relative;
    background:
        radial-gradient(1200px 600px at 20% -10%, rgba(212,161,60,.22), transparent 55%),
        linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 60%, var(--navy-800) 100%);
    color: #fff;
    padding: clamp(32px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* شعاع خافت خلف المحتوى مستوحى من الشعار */
.auth-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-conic-gradient(
        from 0deg at 50% 30%,
        rgba(255,255,255,.035) 0deg 6deg,
        transparent 6deg 12deg
    );
    -webkit-mask-image: radial-gradient(600px 500px at 50% 25%, #000, transparent 70%);
            mask-image: radial-gradient(600px 500px at 50% 25%, #000, transparent 70%);
    pointer-events: none;
}

.auth-side__top { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; }
.auth-side__top img { height: 74px; width: 74px; object-fit: contain;
    background: #fff; border-radius: 50%; padding: 5px; }
.auth-side__ministry { height: 60px !important; width: 60px !important; }

.auth-side__body { position: relative; z-index: 1; }
.auth-side__eyebrow {
    color: var(--gold-500);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .5px;
    margin-bottom: 14px;
}
.auth-side__title {
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 18px;
}
.auth-side__verse {
    font-size: clamp(16px, 1.6vw, 19px);
    color: #dbe6f7;
    max-width: 30ch;
}
.auth-side__foot { position: relative; z-index: 1; color: #9fb4d6; font-size: 13px; }

/* لوحة النموذج */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 56px);
    background: var(--card);
}
.auth-card { width: 100%; max-width: 400px; }

.auth-card__head { margin-bottom: 28px; }
.auth-card__head h1 { font-size: 24px; font-weight: 700; color: var(--navy-800); }
.auth-card__head p  { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* الحقول */
.field { margin-bottom: 18px; }
.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--ink);
}
.field input, .field select, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14.5px;
    background: #fbfcfe;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--sky-500);
    background: #fff;
    box-shadow: 0 0 0 4px var(--sky-100);
}
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.field-row { display: flex; align-items: center; justify-content: space-between; }
.field-row a { font-size: 13px; font-weight: 500; }

/* الأزرار */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%;
    padding: 12.5px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .06s, box-shadow .15s, background .15s;
}
.btn-primary {
    background: linear-gradient(180deg, var(--navy-600), var(--navy-800));
    color: #fff;
    box-shadow: 0 6px 18px rgba(11, 46, 107, .28);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(11, 46, 107, .36); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
    background: #fff; color: var(--navy-700);
    border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--sky-500); background: var(--sky-100); }
.btn-gold {
    background: linear-gradient(180deg, var(--gold-500), var(--gold-600));
    color: #fff;
}
.btn-sm { width: auto; padding: 8px 14px; font-size: 13.5px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

.auth-alt {
    margin-top: 22px; padding-top: 20px;
    border-top: 1px solid var(--line);
    text-align: center; font-size: 14px; color: var(--muted);
}

/* التنبيهات */
.alert {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert-error   { background: #fdecea; color: var(--danger);  border-color: #f5c6c0; }
.alert-success { background: #e7f6ee; color: var(--success); border-color: #b9e2cb; }
.alert-info    { background: var(--sky-100); color: var(--navy-700); border-color: #c3ddf5; }
.alert-warning { background: var(--gold-100); color: #8a6220; border-color: #ecd9a8; }

/* عرض/إخفاء كلمة المرور */
.pw-wrap { position: relative; }
.pw-toggle {
    position: absolute; inset-inline-start: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--muted); font-size: 13px; padding: 4px;
}

/* الاستجابة للموبايل */
@media (max-width: 860px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side {
        padding: 28px 24px;
        flex-direction: row; align-items: center; gap: 16px;
        min-height: auto;
    }
    .auth-side__body, .auth-side__foot { display: none; }
    .auth-side__top { flex-direction: row; }
    .auth-side__top img { height: 56px; width: 56px; }
    .auth-main { padding: 32px 22px 48px; }
}

/* ---------------- زر Google والفاصل (الدخول المزدوج) ---------------- */
.btn-google {
    display: flex; align-items: center; justify-content: center;
    width: 100%; background: #fff; color: #3c4043;
    border: 1.5px solid #dadce0; border-radius: var(--radius-sm);
    padding: 12px 16px; font-family: var(--font); font-size: 15px; font-weight: 600;
    cursor: pointer; transition: background .15s, box-shadow .15s; text-decoration: none;
}
.btn-google:hover { background: #f8faff; box-shadow: 0 1px 4px rgba(60,64,67,.15); text-decoration: none; }
.auth-divider {
    display: flex; align-items: center; text-align: center;
    color: var(--muted); font-size: 13px; margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
    content: ""; flex: 1; height: 1px; background: var(--line);
}
.auth-divider span { padding: 0 14px; white-space: nowrap; }
