/* =========================================================
   LOGIN PAGE — Mr Sherif English Platform
========================================================= */

* {
    box-sizing: border-box;
}


/* =========================================================
   BACKGROUND (3 طبقات)
========================================================= */

body {
    margin: 0;
    min-height: 100vh;

    font-family: var(--font-body);
    background: #F4F7FE;

    position: relative;
    overflow: hidden;

    display: grid;
    place-items: center;

    padding: 24px;
    color: var(--ink);

    -webkit-font-smoothing: antialiased;
}

/* الطبقة 2: جراديانت خفيف فوق اللون */
body::before {
    content: '';
    position: fixed;
    inset: 0;

    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37, 88, 212, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 100%, rgba(220, 38, 38, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 70% 60% at 10% 90%, rgba(37, 88, 212, 0.10) 0%, transparent 55%);

    pointer-events: none;
    z-index: 0;
}

/* الطبقة 3: دوائر ضبابية */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}

.blob-1 {
    width: 380px;
    height: 380px;
    background: rgba(37, 88, 212, 0.35);
    top: -120px;
    right: -80px;
}

.blob-2 {
    width: 320px;
    height: 320px;
    background: rgba(91, 142, 242, 0.28);
    bottom: -100px;
    left: -60px;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: rgba(220, 38, 38, 0.12);
    bottom: 15%;
    right: 8%;
}


/* =========================================================
   CARD (زجاجي)
========================================================= */

.login-card {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 460px;

    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;

    padding: 52px 40px 36px;

    box-shadow:
        0 30px 60px -20px rgba(11, 31, 82, 0.25),
        0 18px 36px -18px rgba(11, 31, 82, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================================
   BRAND
========================================================= */

.brand {
    text-align: center;
    margin-bottom: 42px;
}


/* ---------- Monogram ---------- */

.monogram {
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    border-radius: 26px;

    background: linear-gradient(145deg,
        #3D6FE0 0%,
        #2558D4 35%,
        #163DA0 75%,
        #0B1F52 100%
    );

    display: grid;
    place-items: center;
    position: relative;

    box-shadow:
        0 20px 40px -8px rgba(30, 80, 199, 0.45),
        0 10px 20px -8px rgba(11, 31, 82, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -2px 8px rgba(0, 0, 0, 0.15);

    animation: monogramFloat 4s ease-in-out infinite;
}

@keyframes monogramFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* اللمعة الزجاجية */
.monogram::before {
    content: '';
    position: absolute;
    inset: 1px 1px auto 1px;
    height: 50%;
    border-radius: 25px 25px 60% 60%;

    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.28),
        rgba(255, 255, 255, 0.02)
    );

    pointer-events: none;
}

/* الهالة النابضة */
.monogram::after {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;

    background: radial-gradient(circle,
        rgba(37, 88, 212, 0.25) 0%,
        transparent 65%
    );

    z-index: -1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.08); }
}

.monogram-text {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 700;
    color: #FFFFFF;

    letter-spacing: 2px;
    line-height: 1;

    position: relative;
    z-index: 1;

    padding-bottom: 3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


/* ---------- اسم المنصة ---------- */

.brand-name-wrap {
    position: relative;
    display: inline-block;
}

.brand-name-wrap::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);

    width: 42px;
    height: 3px;

    background: var(--red, #DC2626);
    border-radius: 3px;

    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}

.brand-name {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--ink);

    letter-spacing: -0.6px;
    margin: 0;

    background: linear-gradient(180deg, #0F172A 0%, #1E50C7 130%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* ---------- Tagline ---------- */

.brand-tagline {
    margin: 30px 0 0;

    font-family: var(--font-display);
    font-style: italic;

    font-size: 13px;
    font-weight: 600;

    color: var(--ink-soft);

    letter-spacing: 3px;
    text-transform: uppercase;
}


/* =========================================================
   FORM
========================================================= */

.form-section {
    margin-bottom: 26px;
}


/* ---------- Labels ---------- */

.field-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    gap: 10px;
    margin-bottom: 10px;
}

.field-label-en {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;

    color: var(--brand, #1E50C7);

    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.field-label-ar {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}


/* ---------- Input ---------- */

#studentCode {
    width: 100%;
    height: 66px;

    padding: 0 22px;

    border: 1.5px solid #DDE5F5;
    border-radius: 16px;

    background: #F8FAFF;
    color: var(--ink);

    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 600;

    letter-spacing: 8px;

    text-align: center;
    direction: ltr;
    text-transform: uppercase;

    transition: all 0.25s ease;
    outline: none;

    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.04);
}

#studentCode::placeholder {
    color: #B8C4DB;
    font-weight: 500;
    letter-spacing: 6px;
}

#studentCode:hover:not(:disabled) {
    border-color: #C2D0EB;
    background: #FFFFFF;
}

#studentCode:focus {
    border-color: var(--brand, #1E50C7);
    background: #FFFFFF;

    box-shadow:
        inset 0 1px 3px rgba(15, 23, 42, 0.02),
        0 0 0 5px rgba(37, 88, 212, 0.12);
}

#studentCode:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#studentCode:focus-visible {
    outline: none;
}


/* ---------- Error ---------- */

.error-message {
    min-height: 20px;

    margin: 10px 0 12px;

    text-align: center;

    font-size: 13px;
    font-weight: 700;

    color: var(--danger, #DC2626);

    line-height: 1.6;
}


/* ---------- Submit button ---------- */

.submit-btn {
    width: 100%;
    height: 60px;

    border: none;
    border-radius: 16px;

    background: linear-gradient(135deg,
        #2E63DB 0%,
        #1E50C7 55%,
        #163DA0 100%
    );

    color: #FFFFFF;

    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 800;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    position: relative;
    overflow: hidden;

    transition: all 0.25s ease;

    box-shadow:
        0 12px 28px -8px rgba(30, 80, 199, 0.55),
        0 6px 14px -6px rgba(11, 31, 82, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* لمعة تمر عند الـ hover */
.submit-btn::before {
    content: '';
    position: absolute;

    top: 0;
    left: -100%;

    width: 100%;
    height: 100%;

    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );

    transition: left 0.6s ease;
}

.submit-btn:hover:not(:disabled)::before {
    left: 100%;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow:
        0 18px 36px -10px rgba(30, 80, 199, 0.6),
        0 8px 18px -6px rgba(11, 31, 82, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn .arrow {
    font-size: 22px;
    font-weight: 400;
    line-height: 1;

    transition: transform 0.25s ease;
}

.submit-btn:hover:not(:disabled) .arrow {
    transform: translateX(-5px);
}


/* =========================================================
   FOOTER
========================================================= */

.footer-line {
    margin-top: 34px;
    padding-top: 26px;

    border-top: 1px solid rgba(229, 234, 242, 0.7);

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 14px;

    font-size: 13.5px;
    font-weight: 600;

    color: var(--ink-soft);
}

.footer-line .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;

    background: #5B8EF2;

    flex-shrink: 0;
    opacity: 0.5;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 480px) {

    body {
        padding: 16px;
    }

    .login-card {
        padding: 40px 24px 28px;
        border-radius: 24px;
    }

    .monogram {
        width: 78px;
        height: 78px;
        border-radius: 22px;
        margin-bottom: 20px;
    }

    .monogram-text {
        font-size: 30px;
    }

    .brand-name {
        font-size: 30px;
    }

    .brand-tagline {
        font-size: 11.5px;
        letter-spacing: 2px;
    }

    #studentCode {
        height: 60px;
        font-size: 19px;
        letter-spacing: 6px;
    }

    .submit-btn {
        height: 56px;
        font-size: 15px;
    }

    .blob {
        filter: blur(60px);
    }

    .blob-1 {
        width: 280px;
        height: 280px;
    }

    .blob-2 {
        width: 240px;
        height: 240px;
    }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

:focus-visible {
    outline: 2px solid var(--danger, #DC2626);
    outline-offset: 3px;
    border-radius: 8px;
}