/* =========================================
   Main (Login) page-specific styles only
   ========================================= */

/* ===== تثبيت صفحة الدخول على حجم الشاشة (بدون تمرير للصفحة) =====
   الهيدر ثابت بالأعلى، ومنطقة الدخول تملأ باقي الشاشة وتُوسّط الكارت.
   النماذج الطويلة (تسجيل حساب) تتمرّر داخليًا فقط، فالـ3 شاشات دخول ثابتة بلا تمرير. */
html, body { height: 100%; }
body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.main-header { flex-shrink: 0; }
#login-page.page {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.login-split-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.platform-side {
    flex: 1;
    background: linear-gradient(135deg, var(--bg-dark-core) 0%, rgba(245, 158, 11, 0.08) 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(30px, 2.78vw, 40px);
    border-left: 1px solid var(--border-color);
    justify-content: center;
}

.platform-content {
    text-align: center;
    max-width: 500px;
    z-index: 2;
    margin-bottom: auto;
    margin-top: auto;
}

.platform-content h1 {
    font-size: clamp(28px, 2.5vw, 42px);
    color: var(--accent-gold);
    margin-bottom: 20px;
    font-weight: 900;
}

.platform-content p {
    font-size: clamp(15px, 1.3vw, 18px);
    color: var(--text-white);
    line-height: 1.6;
}

#footer-portal {
    width: 100%;
    margin-top: auto;
}

.login-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    background: var(--bg-card);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.login-side::-webkit-scrollbar { width: clamp(4px, 0.42vw, 6px); }
.login-side::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.login-side::-webkit-scrollbar-track { background: transparent; }
.login-side::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
.login-side::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); }

.login-wrapper {
    flex: 1;
    width: 100%;
    min-height: max-content;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    justify-items: center;
    padding: clamp(20px, 2vw, 40px);
}

#rova-global-footer {
    flex-shrink: 0;
    margin-top: 0 !important;
}

.login-card {
    max-height: none;
    overflow: visible;
    width: 100%;
    max-width: clamp(345px, 31.94vw, 460px);
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

.login-header-visual {
    flex-shrink: 0;
    margin-bottom: 30px;
}

.auth-form, #no-role-msg {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: visible;
    padding: 0;
}

@media (max-width: 992px) {
    .login-split-container {
        flex-direction: column;
        overflow-y: auto;
    }
    .platform-side {
        flex: none;
        min-height: 50vh;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding: 40px 20px;
    }
    .login-side {
        flex: none;
        min-height: 100vh;
        overflow-y: visible;
    }
}


/* ---- عناوين النماذج / المودالات (بدل style= داخل HTML) ---- */
.login-header-visual h2 {
    color: var(--primary-color);
}

/* رسالة "رابط الدخول غير صالح" */
#no-role-msg {
    text-align: center;
    padding: var(--space-5) var(--space-2);
}
.no-role-icon {
    font-size: clamp(39px, 3.61vw, 52px);
    margin-bottom: var(--space-3);
}
.no-role-title {
    color: var(--primary-color);
    margin-bottom: var(--space-2);
}
.no-role-text {
    color: var(--text-muted);
}

/* عناوين ونصوص المودالات على هذه الصفحة (استعادة كلمة المرور / تنبيه النظام) */
.modal-box h3 {
    color: var(--accent-gold);
    margin-bottom: var(--space-4);
}
.modal-hint {
    margin-bottom: var(--space-4);
    font-size: var(--fs-sm);
    color: var(--text-white);
}

/* =========================================
   استعادة كلمة المرور — تحذير خطوة الواتساب
   ألوان متوافقة مع الوضع الفاتح والداكن لضمان وضوح النص
   ========================================= */
.fp-wa-warning {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-inline-start: 4px solid var(--danger-color);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 4px 0 16px;
    text-align: right;
}
.fp-wa-warning .fp-wa-icon {
    font-size: 22px;
    line-height: 1.4;
    flex-shrink: 0;
}
.fp-wa-warning .fp-wa-title {
    display: block;
    color: #b91c1c;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}
.fp-wa-warning .fp-wa-text {
    margin: 0;
    color: #991b1b;
    font-size: 14.5px;
    line-height: 1.8;
    font-weight: 600;
}
body.dark-mode .fp-wa-warning,
html.dark-mode .fp-wa-warning {
    background: rgba(239, 68, 68, 0.14);
}
body.dark-mode .fp-wa-warning .fp-wa-title,
html.dark-mode .fp-wa-warning .fp-wa-title {
    color: #f87171;
}
body.dark-mode .fp-wa-warning .fp-wa-text,
html.dark-mode .fp-wa-warning .fp-wa-text {
    color: #fca5a5;
}

/* زر إرسال رسالة الواتساب داخل خطوة الاستعادة */
.fp-wa-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 6px 0;
    padding: 13px 24px;
    border-radius: 14px;
    background: linear-gradient(135deg, #25D366 0%, #1ebe5a 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fp-wa-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
}
.fp-wa-send-btn:active {
    transform: translateY(0);
}
#custom-alert-message {
    margin-top: var(--space-4);
    color: var(--text-white);
    font-size: var(--fs-sm);
}
#custom-alert-input-holder {
    margin-top: var(--space-4);
}

/* صفوف إدخال كود التحقق (OTP) */
.otp-container {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    direction: ltr;
    margin-bottom: var(--space-4);
}

/* Header controls */
.header-controls {
    display: flex;
    gap: clamp(7px, 0.69vw, 10px);
    align-items: center;
}

/* Staff login switcher */
.staff-switcher {
    position: relative;
}

/* ===== زر موقع EUC CENTER في صفحة الدخول — نبض + لمعة عند المرور ===== */
.euc-site-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: clamp(18px, 1.7vw, 26px);
    padding: clamp(11px, 1vw, 15px) clamp(20px, 1.9vw, 28px);
    border-radius: 40px;
    background: linear-gradient(135deg, var(--accent-gold), #f7b733);
    color: #000;
    font-weight: 800;
    font-size: clamp(13px, 1.2vw, 16px);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
    animation: eucPulse 2.4s ease-in-out infinite;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.euc-site-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.55);
}
.euc-site-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.euc-site-btn:hover::before { left: 140%; }
.euc-site-icon {
    font-size: 1.2em;
    animation: eucSpin 6s linear infinite;
}
@keyframes eucPulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35); }
    50%      { box-shadow: 0 6px 30px rgba(245, 158, 11, 0.62); }
}
@keyframes eucSpin {
    to { transform: rotate(360deg); }
}

/* ===== قائمة المحافظة (dropdown مخصّص في تسجيل الطالب) ===== */
.custom-dropdown { position: relative; }
.dropdown-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 200;
    max-height: 240px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.dropdown-list.show { display: block; }
.dropdown-item {
    padding: clamp(9px, 0.83vw, 12px) clamp(11px, 1.04vw, 15px);
    cursor: pointer;
    font-size: clamp(13px, 1.2vw, 15px);
    color: var(--text-white);
    transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-item:hover { background: var(--accent-gold); color: #000; }

.staff-switcher-btn {
    padding: clamp(6px, 0.56vw, 8px) clamp(9px, 0.83vw, 12px);
    border-radius: 8px;
    font-size: clamp(12px, 1.11vw, 16px);
}

.staff-dropdown {
    display: none;
    position: absolute;
    top: 120%;
    left: 0;
    background: var(--bg-dark-core);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    min-width: min(100%, clamp(120px, 11.11vw, 160px));
    z-index: 1000;
    flex-direction: column;
    overflow: hidden;
}

/* Password field wrapper */
.pw-field {
    position: relative;
}

.has-pw-toggle {
    padding-left: clamp(30px, 2.78vw, 40px) !important;
}

.pw-toggle {
    position: absolute;
    left: clamp(11px, 1.04vw, 15px);
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Required asterisk */
.required {
    color: #ef4444;
}

/* Forgot password link */
.forgot-link-wrap {
    text-align: left;
    margin-top: clamp(3px, 0.35vw, 5px);
}

.forgot-link {
    color: var(--accent-gold);
    font-size: clamp(9px, 0.90vw, 13px);
    text-decoration: underline;
    cursor: pointer;
}

.student-sub-tabs {
    display: flex;
    justify-content: center;
    gap: clamp(7px, 0.69vw, 10px);
    margin-bottom: clamp(15px, 1.39vw, 20px);
}

.sub-tab-btn {
    flex: 1;
    background: rgba(245, 158, 11, 0.08);
    color: var(--accent-gold);
    border: 2px solid rgba(245, 158, 11, 0.3);
    padding: clamp(8px, 0.76vw, 11px);
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sub-tab-btn:hover {
    background: var(--accent-gold);
    color: #000;
}

.sub-tab-btn.active {
    background-color: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.student-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.student-section.active {
    display: block;
}



/* OTP Inputs */
.otp-input {
    width: clamp(33px, 3.13vw, 45px);
    height: clamp(37px, 3.47vw, 50px);
    text-align: center;
    font-size: clamp(18px, 1.67vw, 24px);
    font-weight: bold;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-dark-core);
    color: var(--accent-gold);
    transition: all 0.3s ease;
}

.otp-input:focus {
    border-color: var(--accent-gold);
    outline: none;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Stepper Styles */
.reg-stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    gap: 15px;
}
.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}
.step-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--bg-dark-core);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.step-item.active .step-circle {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-dark);
}
.step-label {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.step-item.active .step-label {
    color: var(--accent-gold);
    font-weight: bold;
}
.step-line {
    flex-grow: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    max-width: 60px;
    margin-top: -20px;
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}
.step-line::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-gold);
    transition: width 0.5s ease-in-out;
}
.step-line.active::after {
    width: 100%;
}
