:root {
    --bg-main: #0b1120;
    --card-bg: rgba(15, 23, 42, 0.88);
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-glow: rgba(56, 189, 248, 0.35);
    --accent: #38bdf8;
    --text-primary: #f8fafc;
    --border-color: rgba(255, 255, 255, 0.15);
    --danger-bg: rgba(239, 68, 68, 0.15);
    --danger-border: rgba(239, 68, 68, 0.35);
    --danger-text: #fca5a5;
    --info-bg: rgba(56, 189, 248, 0.12);
    --info-border: rgba(56, 189, 248, 0.3);
    --info-text: #7dd3fc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

.bg-glow {
    position: fixed;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    filter: blur(130px);
    z-index: 0;
    pointer-events: none;
}

.bg-glow-1 {
    top: -60px;
    right: -60px;
    background: rgba(2, 132, 199, 0.28);
}

.bg-glow-2 {
    bottom: -60px;
    left: -60px;
    background: rgba(16, 185, 129, 0.18);
}

/* ==========================================================
   الترويسة وعناوين الغلاف
   ========================================================== */
.hero-cover {
    position: relative;
    width: 100%;
    min-height: 290px;
    background-image: url('Cover.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    padding: 25px 20px;
    z-index: 1;
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(11, 17, 32, 0.4) 0%, rgba(11, 17, 32, 0.96) 100%);
    z-index: 1;
}

.header-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* العنوان الأول في المنتصف تماماً */
.center-titles {
    text-align: center;
    width: 100%;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.95);
}

.country-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
}

.ministry-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-top: 4px;
}

/* العنوان الثاني أسفل الأول وعلى اليمين */
.right-titles-container {
    width: 100%;
    display: flex;
    justify-content: flex-start; /* توجيه لليمين لـ RTL */
}

.hospital-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    border-right: 4px solid var(--primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.badge-icon {
    font-size: 1.2rem;
}

.badge-text {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
}

/* ==========================================================
   الشعار الرسمي ومؤثر الوميض الضوئي
   ========================================================== */
.main-content {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 35px 15px;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px 32px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.logo-wrapper {
    width: 110px;
    height: 110px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    background: #ffffff;
    padding: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.hospital-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

/* حركة وميض الشعار الضوئية (تنفض وتضيء مثل المصباح) */
.pulsing-logo {
    animation: lampGlow 2.5s infinite ease-in-out;
}

@keyframes lampGlow {
    0% {
        box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
        transform: scale(1);
    }
    45% {
        box-shadow: 0 0 35px rgba(56, 189, 248, 0.9), 0 0 60px rgba(2, 132, 199, 0.6);
        transform: scale(1.05);
    }
    50% {
        box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
        transform: scale(0.98);
    }
    55% {
        box-shadow: 0 0 40px rgba(56, 189, 248, 1), 0 0 70px rgba(2, 132, 199, 0.8);
        transform: scale(1.06);
    }
    100% {
        box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
        transform: scale(1);
    }
}

.card-header h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.5;
    margin-bottom: 25px;
}

.form-group {
    text-align: right;
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #e2e8f0;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 45px 14px 16px;
    background: #0f172a;
    border: 1.5px solid #334155;
    border-radius: 12px;
    font-size: 1rem;
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.toggle-btn {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toggle-btn:hover {
    opacity: 1;
}

.error-message {
    color: #f87171;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 8px;
    display: none;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.5);
}

.notices-container {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice-card {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.5;
}

.notice-danger {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
}

.notice-info {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    color: var(--info-text);
}

/* شاشة إقلاع XP */
.xp-boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    font-family: 'Tahoma', sans-serif;
}

.xp-boot-content {
    text-align: center;
}

.xp-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
}

.xp-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
}

.xp-logo-box h2 {
    font-size: 2rem;
    color: var(--accent);
    letter-spacing: 1px;
    font-family: 'Inter', sans-serif;
}

.xp-status {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.xp-progress-bar {
    width: 240px;
    height: 22px;
    border: 2px solid #334155;
    border-radius: 4px;
    padding: 2px;
    margin: 0 auto;
    background: #000;
    overflow: hidden;
}

.xp-progress-blocks {
    display: flex;
    gap: 4px;
    width: 100%;
    height: 100%;
}

.xp-block {
    flex: 1;
    background: var(--primary);
    opacity: 0.2;
    border-radius: 2px;
    animation: xpLoader 1.2s infinite steps(4);
}

.xp-block:nth-child(2) { animation-delay: 0.2s; }
.xp-block:nth-child(3) { animation-delay: 0.4s; }

@keyframes xpLoader {
    0% { opacity: 0.2; }
    50% { opacity: 1; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
    100% { opacity: 0.2; }
}

@media (max-width: 768px) {
    .right-titles-container {
        justify-content: center;
    }
    
    .hospital-badge {
        width: 100%;
        justify-content: center;
    }
}
