
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');

:root {
    /* ألوان أساسية - متناغمة ومحسّنة التباين (WCAG AA) */
    --purple:         #6c4bff;
    --purple-deep:    #4f33d6;
    --cyan:           #2eb8ff;
    --green:          #1fa84a;
    --orange:         #ff9a1f;
    --red:            #ff4d6d;
    --amber:          #ffc043;

    --grad-primary:   linear-gradient(135deg, #6c4bff 0%, #2eb8ff 100%);
    --grad-secondary: linear-gradient(135deg, #34d97e 0%, #1fa84a 100%);
    --grad-warm:      linear-gradient(135deg, #ffb547 0%, #ff7e5f 100%);
    --grad-bg:        radial-gradient(at 12% 10%, #fff4d6 0, transparent 45%),
                      radial-gradient(at 90% 0%,  #ffdcec 0, transparent 50%),
                      radial-gradient(at 80% 90%, #d6f0ff 0, transparent 55%),
                      radial-gradient(at 10% 95%, #e7e0ff 0, transparent 55%),
                      linear-gradient(180deg, #fbfaff 0%, #f3f1ff 100%);
    --grad-card-bg:   linear-gradient(135deg, rgba(255,255,255,0.92) 0%, rgba(253,250,255,0.88) 100%);

    --text-dark:      #1d1b2e;
    --text-mid:       #4a4961;
    --text-light:     #7a7990;

    --border-light:   #e7e3f5;
    --border-dashed:  rgba(108, 75, 255, 0.30);

    --surface:        #ffffff;
    --surface-soft:   #fbfaff;
    --white-card:     rgba(255, 255, 255, 0.85);

    /* ظلال بطبقتين (ambient + key) */
    --shadow-card:    0 1px 2px rgba(40,28,90,0.04),
                      0 20px 50px -12px rgba(76, 49, 178, 0.18);
    --shadow-btn:     0 4px 10px rgba(76, 49, 178, 0.18),
                      0 12px 28px -6px rgba(76, 49, 178, 0.32);
    --shadow-header:  0 8px 24px rgba(60, 30, 120, 0.22);

    --radius-card:    26px;
    --radius-btn:     30px;
    --radius-pill:    999px;
    --radius-input:   18px;


    --focus-ring:     0 0 0 4px rgba(108, 75, 255, 0.22);

    --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── DARK MODE ── */
html[data-theme="dark"] {
    --grad-bg:        radial-gradient(at 12% 10%, #2a1d55 0, transparent 50%),
                      radial-gradient(at 90% 5%,  #3b1d4a 0, transparent 55%),
                      radial-gradient(at 80% 95%, #102a4a 0, transparent 55%),
                      linear-gradient(180deg, #0c0b1f 0%, #14122e 100%);
    --grad-card-bg:   linear-gradient(135deg, rgba(30,27,55,0.82) 0%, rgba(38,32,70,0.78) 100%);

    --text-dark:      #f3f0ff;
    --text-mid:       #c8c3e0;
    --text-light:     #9690b8;

    --border-light:   rgba(255,255,255,0.10);
    --surface:        #1a1832;
    --surface-soft:   #221f3d;
    --white-card:     rgba(30, 27, 55, 0.78);

    --shadow-card:    0 1px 2px rgba(0,0,0,0.4),
                      0 24px 60px -16px rgba(0,0,0,0.55);
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme]) {
        color-scheme: dark;
    }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a       { text-decoration: none; color: inherit; }
button  { cursor: pointer; font-family: inherit; border: none; }
input   { font-family: inherit; }
img     { display: block; max-width: 100%; }

/* ── Base ── */
html, body {
    min-height: 100%;
    font-family: "Almarai", "Segoe UI", sans-serif;
    background: var(--grad-bg);
    background-attachment: fixed;
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 90vh;
    transition: background 0.3s ease;
}

/* Focus accessibility */
:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 8px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar               { width: 10px; }
::-webkit-scrollbar-track         { background: var(--surface-soft, #f0eeff); }
::-webkit-scrollbar-thumb         { background: var(--border, #a297d6); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover   { background: var(--purple-deep, #3076de); }

/* =================================================================
   HEADER
   ================================================================= */
.header {
    background: var(--grad-primary);
    color: white;
    padding: 22px 18px;
    text-align: center;
    box-shadow: var(--shadow-header);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-card);
    width: 98%;
    align-self:center;
    margin-top: 15px;
}
.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18), transparent 40%),
      radial-gradient(circle at 80% 70%, rgba(255,255,255,0.10), transparent 40%);
    pointer-events: none;
}
.header::after {
    content: '';
    position: absolute;
    top: 0; left: -30%;
    width: 20%; height: 90%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transform: skewX(-20deg);
    animation: shine 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes shine {
    0%, 100% { left: -30%; }
    50%      { left: 110%; }
}

/* Brand */
.header-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    text-decoration: none;
    color: white;
}
.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    backdrop-filter: blur(6px);
    flex-shrink: 0;
}
.brand-text   { display: flex; flex-direction: column; gap: 1px; }
.brand-name   { font-size: 19px; font-weight: 800; line-height: 1; letter-spacing: -0.3px; }
.brand-tag    { font-size: 10.5px; font-weight: 400; opacity: 0.75; letter-spacing: 0.2px; }


.header-title {
    font-size: 45px;
    font-weight: 900;
    position: relative;
    z-index: 1;
    letter-spacing: -0.1px;
}
.header-subtitle {
    font-size: 20px;
    margin-top: 8px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    text-align: center;
}

/* زر الوضع الليلي */
.theme-toggle {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: white;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    padding: 0;
    backdrop-filter: blur(6px);
    transition: background 0.2s, transform 0.2s;
    z-index: 2;
}
.theme-toggle:hover { background: rgba(255,255,255,0.30); transform: translateY(-50%) scale(1.08); }

/* =================================================================
   PAGE BODY LAYOUT
   ================================================================= */
.page-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px;
    position: relative;
    z-index: 1;
}

/* =================================================================
   LOGIN CARD (Glassmorphism)
   ================================================================= */
.login-card {
    background: var(--grad-card-bg);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 28px 32px;
    width: 100%;
    max-width: 600px;
    position: relative;
    overflow: hidden;
    animation: card-rise 0.65s var(--ease-spring) both;
    height:70%;
    max-height: min-content;
}
html[data-theme="dark"] .login-card { border-color: rgba(255,255,255,0.08); }

@keyframes card-rise {
    from { opacity: 0; transform: translateY(28px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.login-card::before {
    content: '';
    position: absolute;
    top: -80px; left: -80px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 75, 255, 0.18), transparent 70%);
    pointer-events: none;
}
.login-card::after {
    content: '';
    position: absolute;
    bottom: -60px; right: -60px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 184, 255, 0.18), transparent 70%);
    pointer-events: none;
}

/* ── Welcome ── */
.login-icon {
    font-size: 45px;
    text-align: center;
    line-height: 0.8;
    margin-bottom: 8px;
    animation: wave 2.2s ease-in-out 0.6s infinite;
    display: block;
    transform-origin: 70% 70%;
    filter: drop-shadow(0 6px 12px rgba(108,75,255,0.25));
}
@keyframes wave {
    0%, 60%, 100% { transform: rotate(0deg); }
    15%           { transform: rotate(16deg); }
    30%           { transform: rotate(-8deg); }
    45%           { transform: rotate(12deg); }
}

.login-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 5px;
    letter-spacing: -0.4px;
}
.login-subtitle {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    line-height: 1.2;
    margin-bottom: 20px;
}

/* ── Role tabs ── */
.role-tabs {
    display: flex;
    gap: 6px;
    background: rgba(108,75,255,0.07);
    border-radius: 18px;
    padding: 5px;
    margin-bottom: 20px;
    border: 1px solid rgba(108,75,255,0.08);
}
html[data-theme="dark"] .role-tabs {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
}

.role-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 8px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-mid);
    background: transparent;
    cursor: pointer;
    transition: transform 0.22s var(--ease-spring), background 0.22s, color 0.22s, box-shadow 0.22s;
    font-family: inherit;
    min-height: 40px;
}
.role-tab:hover:not(.active) { background: rgba(108,75,255,0.08); transform: translateY(-1px); }
.role-tab .tab-icon { font-size: 18px; transition: transform 0.3s var(--ease-spring); }
.role-tab:hover .tab-icon { transform: scale(1.15) rotate(-6deg); }

.role-tab.active {
    background: var(--grad-primary);
    color: white;
    box-shadow: 0 8px 20px rgba(108, 75, 255, 0.35);
    transform: translateY(-1px);
}

/* ── Form fields ── */
.form-group { margin-bottom: 5px; }

.form-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-mid);
    margin-bottom: 5px;
}
.label-icon { font-size: 12px; }

.input-wrap { position: relative; }

.form-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-input);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-dark);
    background-color: var(--surface-soft);
    direction: rtl;
    outline: none;
    min-height: 48px;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s, transform 0.2s;
}
.form-input::placeholder { color: var(--text-light); opacity: 0.6; font-weight: 400; }

.form-input:hover { border-color: rgba(108,75,255,0.35); }
.form-input:focus {
    border-color: var(--purple);
    background-color: var(--surface);
    box-shadow: var(--focus-ring);
}
.form-input.error {
    border-color: var(--red);
    background-color: rgba(255,77,109,0.06);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--text-light);
    pointer-events: none;
    transition: color 0.2s, transform 0.2s;
}
.form-input:focus + .input-icon { color: var(--purple); transform: translateY(-50%) scale(1.1); }

/* Password toggle */
.pw-toggle {
    position: absolute;
    right: 5px;
    top: 22%;
    background: transparent;
    width: 30px; height: 30px;
    border-radius: 10px;
    padding: 0;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    box-shadow: none;
    transition: color 0.2s, background 0.2s;
}
.pw-toggle:hover { color: var(--purple); background: rgba(108,75,255,0.10); }

/* Inline field error + shake */
.field-error {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
    margin-top: 6px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.22s, transform 0.22s;
    pointer-events: none;
}
.field-error.show { opacity: 1; transform: translateY(0); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}
.shake { animation: shake 0.42s ease; }

/* Caps lock warning */
.caps-warning {
    display: none;
    margin-top: 8px;
    padding: 7px 12px;
    background: linear-gradient(90deg, rgba(255,154,31,0.15), rgba(255,192,67,0.15));
    border: 1px solid rgba(255,154,31,0.35);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: #b56a00;
}
.caps-warning.show { display: block; animation: fade-in 0.2s ease; }
html[data-theme="dark"] .caps-warning { color: #ffd089; }


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

/* ── Options row ── */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0 10px;
    font-size: 12px;
}
.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.checkbox-wrap input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--purple);
    cursor: pointer;
}
.checkbox-label { font-weight: 700; color: var(--text-mid); }

.forgot-link {
    font-weight: 700;
    color: var(--purple);
    transition: opacity 0.2s, transform 0.2s;
    position: relative;
}
.forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px; right: 0;
    width: 0; height: 2px;
    background: var(--purple);
    transition: width 0.25s ease;
}
.forgot-link:hover::after { width: 100%; }

/* ── Buttons ── */
button {
    cursor: pointer;
    border-radius: var(--radius-btn);
    padding: 14px 26px;
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
    transition: transform 0.18s var(--ease-spring), box-shadow 0.18s ease, filter 0.18s;
}
button:hover { transform: translateY(-2px); }
button:active { transform: translateY(0); filter: brightness(0.96); }
button:disabled { cursor: not-allowed; opacity: 0.8; transform: none; }

.primary-btn {
    background: var(--grad-primary);
    color: white;
    box-shadow: var(--shadow-btn);
    position: relative;
    overflow: hidden;
}
.primary-btn:hover { box-shadow: 0 8px 16px rgba(76,49,178,0.22), 0 18px 36px -8px rgba(76,49,178,0.42); }

.secondary-btn { background: var(--grad-secondary); color: white; box-shadow: var(--shadow-btn); }
.alt-btn {
    background: var(--surface);
    color: var(--text-mid);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 54px;
}
.btn-login .btn-icon { font-size: 14px; }
.btn-login .btn-spinner {
    display: none;
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.btn-login.loading .btn-spinner { display: inline-block; }
.btn-login.loading .btn-text    { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(255,255,255,0.55);
    width: 12px; height: 12px;
    pointer-events: none;
    animation: ripple 0.6s ease-out;
}
@keyframes ripple {
    to { transform: translate(-50%, -50%) scale(28); opacity: 0; }
}

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-size: 10px;
    font-weight: 900;
    margin: 10px 0;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

/* ── Register note ── */
.register-box {
    border-radius: 18px;
    padding: 14px 18px;
    margin-top: 14px;
    background: linear-gradient(90deg, rgba(255,196,67,0.14), rgba(255,126,95,0.10));
    border: 2px dashed rgba(255, 154, 31, 0.55);
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-mid);
}
.register-box a {
    color: var(--purple);
    font-weight: 900;
    transition: opacity 0.2s;
    margin-right: 4px;
}
.register-box a:hover { opacity: 0.78; text-decoration: underline; }

/* ── Trust badges ── */
.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}
.badge {
    background: var(--grad-warm);
    color: white;
    border-radius: var(--radius-pill);
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(255, 154, 31, 0.28);
    transition: transform 0.2s var(--ease-spring);
}
.badge:hover { transform: translateY(-2px) scale(1.04); }
.badge.purple {
    background: var(--grad-primary);
    box-shadow: 0 4px 12px rgba(108, 75, 255, 0.32);
}
.badge.green {
    background: var(--grad-secondary);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.30);
}

/* =================================================================
   FOOTER
   ================================================================= */
.footer {
    text-align: center;
    padding: 18px;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* =================================================================
   FLOATING BACKGROUND SHAPES
   ================================================================= */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(20px);
    animation: drift 9s ease-in-out infinite;
}
.bg-shape.s1 {
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(108, 75, 255, 0.22), transparent 70%);
    top: -100px; right: -90px;
    animation-delay: 0s;
}
.bg-shape.s2 {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(46, 184, 255, 0.22), transparent 70%);
    bottom: 40px; left: -70px;
    animation-delay: 2s;
}
.bg-shape.s3 {
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(255, 154, 31, 0.22), transparent 70%);
    top: 38%; left: 28%;
    animation-delay: 4s;
}
@keyframes drift {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-24px) scale(1.06); }
}

/* =================================================================
   TOAST
   ================================================================= */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translate(-50%, -120%);
    background: var(--surface);
    color: var(--text-dark);
    padding: 13px 22px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.14);
    border: 1px solid var(--border-light);
    z-index: 100;
    opacity: 0;
    transition: transform 0.4s var(--ease-spring), opacity 0.3s;
    max-width: 90vw;
    text-align: center;
}
.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}
.toast.success { border-color: rgba(40,167,69,0.4); color: #1c7a36; }
.toast.error   { border-color: rgba(255,77,109,0.4); color: #b8324a; }
html[data-theme="dark"] .toast.success { color: #6ee395; }
html[data-theme="dark"] .toast.error   { color: #ff8aa0; }

/* =================================================================
   TEAM SECTION
   ================================================================= */
.team-section {
    position: relative;
    z-index: 1;
    padding: 0 20px 48px;
}

.team-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ── Header block ── */
.team-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.team-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.team-eyebrow {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--grad-bg);
    background: var(--grad-card-bg);
    border: 1px solid rgba(108, 75, 255, 0.20);
    border-radius: var(--radius-pill);
    display: inline-block;
    margin-bottom: 20px;
    margin-top: 20px;
    padding: 15px 25px;
    width: 100%;
}
html[data-theme="dark"] .team-eyebrow {
    background: rgba(108, 75, 255, 0.18);
    border-color: rgba(108, 75, 255, 0.35);
}

.team-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--text-dark);
    letter-spacing: -0.3px;
    line-height: 1.15;
}

.team-subtitle {
    font-size: 13.5px;
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.7;
    max-width: 400px;
}

.team-divider-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--border-light) 20%,
        rgba(108, 75, 255, 0.35) 50%,
        var(--border-light) 80%,
        transparent 100%);

    margin-top: 30px;
}

/* ── Supervisor card ── */
.supervisor-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--grad-card-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(108, 75, 255, 0.22);
    border-radius: var(--radius-card);
    padding: 18px 22px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    animation: card-rise 0.65s var(--ease-spring) both;
    animation-delay: 0.1s;
}



.supervisor-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--grad-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(108, 75, 255, 0.32);
}
.supervisor-icon .material-symbols-outlined {
    color: white;
    font-size: 26px;
    font-variation-settings: 'FILL' 1;
}

.supervisor-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.supervisor-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--purple);
    text-transform: uppercase;
}

.supervisor-name {
    font-size: 15px;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.2;
}

.supervisor-dept {
    font-size: 12.5px;
    color: var(--text-light);
    font-weight: 500;
}

/* ── Developers grid ── */
.developers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.dev-card {
    background: var(--grad-card-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 20px 14px 0;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    overflow: hidden;
    position: relative;
    transition: transform 0.22s var(--ease-spring), box-shadow 0.22s ease,
                border-color 0.22s ease;
    animation: card-rise 0.65s var(--ease-spring) both;
}
.dev-card:nth-child(1) { animation-delay: 0.18s; }
.dev-card:nth-child(2) { animation-delay: 0.26s; }
.dev-card:nth-child(3) { animation-delay: 0.34s; }

.dev-card:hover {
    transform: translateY(-5px);
    border-color: rgba(108, 75, 255, 0.30);
    box-shadow: 0 1px 2px rgba(40,28,90,0.05),
                0 24px 50px -12px rgba(76, 49, 178, 0.22);
}

/* Avatar circle */
.dev-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: white;
    font-size: 24px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(108, 75, 255, 0.28);
    border: 3px solid rgba(255, 255, 255, 0.55);
    transition: transform 0.22s var(--ease-spring);
}
.dev-card:hover .dev-avatar { transform: scale(1.08); }

html[data-theme="dark"] .dev-avatar {
    border-color: rgba(255, 255, 255, 0.15);
}

.dev-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-bottom: 16px;
}

.dev-name {
    font-size: 16px;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.2;
}

.dev-role {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-light);
}

/* Gradient bar at the bottom of each card */
.dev-grad-bar {
    width: 90%;
    height: 3px;
    margin-bottom: 6px;
    background: var(--grad-primary);
    margin-top: auto;
    opacity: 0.55;
    transition: opacity 0.22s ease;
    border-radius: var(--radius-pill);
}
.dev-card:hover .dev-grad-bar { opacity: 1; }

/* ── Made with love line ── */
.team-made-with {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    line-height: 1.6;
    padding-top: 4px;
}
.team-made-with .material-symbols-outlined {
    font-size: 16px;
    color: var(--red);
    font-variation-settings: 'FILL' 1;
    animation: heartbeat 1.6s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14%       { transform: scale(1.25); }
    28%       { transform: scale(1); }
    42%       { transform: scale(1.18); }
}

/* ── Responsive: stack on small screens ── */
@media (max-width: 520px) {
    .developers-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .dev-card {
        flex-direction: row;
        padding: 16px 18px 16px 14px;
        text-align: right;
        gap: 14px;
    }
    .dev-grad-bar {
        display: none;
    }
    .dev-info { padding-bottom: 0; }
    .dev-avatar { width: 48px; height: 48px; font-size: 20px; flex-shrink: 0; }
    .supervisor-card { gap: 12px; }
    .team-title { font-size: 22px; }
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 520px) {
    .header-title    { font-size: 24px; }
    .header-subtitle { font-size: 13px; }
    .theme-toggle    { width: 36px; height: 36px; left: 12px; font-size: 16px; }
    .login-card      { padding: 26px 20px; border-radius: 20px; }
    .login-icon      { font-size: 48px; }
    .login-title     { font-size: 21px; }
    .login-subtitle  { font-size: 13.5px; margin-bottom: 22px; }
    .role-tabs       { gap: 4px; padding: 4px; }
    .role-tab        { font-size: 12.5px; padding: 10px 4px; }
    .role-tab .tab-icon { font-size: 16px; }
    .form-input      { font-size: 15px; min-height: 50px; } /* أكبر للمس */
    .form-options    { flex-direction: row; flex-wrap: wrap; gap: 10px; }
    .btn-login       { padding: 15px; font-size: 16px; }
    .trust-row       { gap: 6px; }
    .badge           { font-size: 11.5px; padding: 6px 12px; }
    .bg-shape        { opacity: 0.7; }
}

/* =================================================================
   REDUCED MOTION (Accessibility)
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .bg-shape, .header::after, .login-icon { animation: none !important; }
}
