/* =========================================================
   أنماط الهيدر
   تعتمد على المتغير --primary المعرّف في :root بالصفحة الرئيسية،
   وعلى keyframes الخاصة بـ pulseGlow (تبقى في الصفحة الرئيسية).
   ========================================================= */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 5px 12px;
    border-radius: 2px 2px 0 0;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: bold;
}

.header-title {
    flex: 1 1 auto; /* يدفع الأزرار إلى اليسار */
    min-width: 0;
}



.header-title-manneger {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline-start: 8px;
    border-inline-start: 3px solid #ffb347;
    color: #ffe66d;
    font-family: 'Reem Kufi', Tahoma, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

/* ---------------------------------------------------------
   الزر الأساسي
   --------------------------------------------------------- */

.fun-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
    padding: 10px 18px;
    border-radius: 15px;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: .3px;
    color: #243746;
    background: linear-gradient(135deg, #ffe66d, #ffb347);
    background-size: 120% 120%;
    box-shadow:
        0 6px 0 #a3235a,
        0 12px 22px rgba(255, 61, 129, .35);
    transition: transform .15s ease, box-shadow .15s ease, background-position .4s ease;
    animation: pulseGlow 2.4s ease-in-out infinite;
}

/* ---------------------------------------------------------
   أزرار الهيدر
   --------------------------------------------------------- */

.fun-btn.toggle-view {
    margin: 0;
    padding: 2px 4px;
    gap: 6px;
    font-size: 10px;
    color: #243746;
    background: linear-gradient(135deg, #ffe66d, #ffb347);
    box-shadow:
        0 3px 0 #c9822b,
        0 5px 10px rgba(0, 0, 0, .22);
    white-space: nowrap;
    animation: none;
}

.fun-btn.toggle-view .emoji {
    font-size: 10px;
    animation: none;
}

.fun-btn.toggle-view:hover:not(:disabled) {
    background-position: 0 0;
    transform: translateY(-1px) scale(1.03);
    box-shadow:
        0 4px 0 #c9822b,
        0 8px 14px rgba(0, 0, 0, .28);
}

.fun-btn.toggle-view:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #c9822b;
}

/* الزر الفعّال (القسم المعروض حالياً) */
.fun-btn.toggle-view.is-active,
.fun-btn.toggle-view.is-active:hover:not(:disabled),
.fun-btn.toggle-view.is-active:active:not(:disabled) {
    color: #fff;
    background: linear-gradient(135deg, #17c3b2, #2d9cdb);
    box-shadow:
        0 1px 0 #1b5f8c,
        0 2px 6px rgba(0, 0, 0, .25);
    transform: translateY(2px);
}

/* فرض حجم أزرار الهيدر */
.header button.fun-btn {
    padding: 12px 15px !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
    min-height: 0 !important;
    height: auto !important;
    min-width: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
}

.header button.fun-btn .emoji {
    font-size: 12px !important;
}

/* ---------------------------------------------------------
   الهاتف
   --------------------------------------------------------- */

@media (max-width: 600px) {
    .header {
        padding: 14px;
        font-size: 17px;
    }

    .header button.fun-btn {
        flex: 0 0 auto !important;
    }
}