.header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: rgba(250, 248, 245, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 260px;
    padding: 0 var(--sp-32);
    z-index: 1000;
    transition: left var(--duration-slow) var(--ease-out);
}

.headerLeft {
    display: flex;
    align-items: center;
    gap: var(--sp-16);
}

.menuBtn {
    display: none;
    font-size: 1.5rem;
    padding: var(--sp-4);
    cursor: pointer;
}

.pageTitle {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
}

.headerRight {
    display: flex;
    align-items: center;
    gap: var(--sp-16);
}

.streakBadge {
    display: flex;
    align-items: center;
    gap: var(--sp-8);
    padding: var(--sp-4) var(--sp-16);
    background: var(--gold-glow);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
}

.streakFire {
    font-size: 1.1rem;
    animation: pulse 2s ease-in-out infinite;
}

.notifBtn {
    position: relative;
    font-size: 1.3rem;
    padding: var(--sp-8);
    border-radius: var(--radius-full);
    transition: background var(--duration-fast);
    cursor: pointer;
}

.notifBtn:hover {
    background: var(--bg-secondary);
}

.notifDot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-elevated);
}

@media (max-width: 768px) {
    .header {
        left: 0;
        padding: 0 var(--sp-16);
    }

    .menuBtn {
        display: block;
    }
}

/* Tổng thể Header */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px); /* Hiệu ứng kính mờ */
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.pageTitle {
    font-size: 1.2rem;
    font-weight: 800;
    color: #2D3436;
    margin: 0;
}

/* Nút bấm thông báo & Cảnh báo */
.notifBtn {
    background: #F7F8FA;
    border: none;
    font-size: 20px;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 4px;
}

.notifBtn:hover {
    background: #F0F2F5;
    transform: translateY(-2px);
}

.notifBtn:active {
    transform: scale(0.95);
}

/* Chấm đỏ thông báo */
.notifDot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background: #FF4757;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
}

.alert-dot {
    background: #E63946;
    animation: pulseAlert 2s infinite;
}

@keyframes pulseAlert {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Dropdown Panel - Thiết kế Floating */
.dropdown-panel {
    display: none;
    position: absolute;
    right: 0;
    top: 55px;
    width: 320px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    z-index: 2000;
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transform-origin: top right;
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.panel-header {
    padding: 18px 20px;
    font-weight: 700;
    font-size: 1rem;
    color: #2D3436;
    border-bottom: 1px solid #F1F2F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

/* Từng item trong danh sách */
.item {
    padding: 14px 20px;
    transition: 0.2s;
    border-left: 4px solid transparent;
}

.item:hover {
    background: #F8F9FA;
}

.item span {
    display: block;
    font-size: 0.9rem;
    color: #4A4A4A;
    line-height: 1.4;
    margin-bottom: 4px;
}

.item small {
    color: #B2BEC3;
    font-size: 0.75rem;
}

/* Trạng thái chưa đọc */
.item.unread {
    background: #F0F7FF;
    border-left-color: #007AFF;
}

.item.unread span {
    font-weight: 600;
    color: #000;
}

.alert-item.unread {
    background: #FFF5F6;
    border-left-color: #E63946;
}

/* Nút Logout */
.logoutBtn {
    background: #F7F8FA;
    border: none;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    margin-left: 8px;
}

.logoutBtn:hover {
    background: #FFE5E9;
}

.streakBadge {
    background: #FFF9F0;
    color: #FF9F43;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #FFEAA7;
}