/* header.css - أنماط الشريط العلوي فقط */

/* Top Bar */
.dashboard .top-bar {
    grid-area: top-bar;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed; /* تغيير من sticky إلى fixed */
    top: 0;
    left: 255px; /* إضافة left للتعويض عن عرض الـ Sidebar */
    right: 0;
    z-index: 999; /* z-index أقل من الـ Sidebar */
    height: 80px;
}

.dashboard .background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.7;
}

.dashboard .search-container {
    flex: 0 0 300px;
}

.dashboard .search {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--gray-light);
    border-radius: 25px;
    padding: 12px 20px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.dashboard .search:focus-within {
    background: var(--white);
    border-color: var(--primary-red-light);
    box-shadow: 0 0 0 3px rgba(122, 1, 21, 0.1);
}

.dashboard .search-2 {
    width: 18px;
    height: 18px;
    margin-left: 10px;
    opacity: 0.7;
}

.dashboard .input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: "Inter-Regular", Helvetica;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
}

.dashboard .input::placeholder {
    color: var(--text-secondary);
}

.dashboard .top-bar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dashboard .icon-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard .icon-btn:hover {
    background-color: var(--gray-light);
}

.dashboard .notification-btn {
    position: relative;
}

.dashboard .notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-red);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.dashboard .notification {
    width: 20px;
    height: 20px;
}

.dashboard .divider {
    width: 1px;
    height: 30px;
    background: var(--gray-light);
}

.dashboard .profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
}

.dashboard .profile:hover {
    background-color: var(--gray-light);
}

.dashboard .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-red-light);
}

.dashboard .details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard .text-wrapper-71 {
    font-family: "Inter-SemiBold", Helvetica;
    font-weight: 600;
    color: var(--primary-red);
    font-size: 15px;
    white-space: nowrap;
}

.dashboard .chevron-down-4 {
    width: 12px;
    height: 7px;
    transition: var(--transition);
}

.dashboard .profile:hover .chevron-down-4 {
    transform: rotate(180deg);
}

/* Profile wrapper & dropdown */
.dashboard .profile-wrapper {
    position: relative;
}

.dashboard .avatar-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid var(--primary-red-light);
}

.dashboard .profile-name {
    font-family: "Inter-SemiBold", Helvetica;
    font-weight: 600;
    color: var(--primary-red);
    font-size: 15px;
    white-space: nowrap;
}

.dashboard .chevron-down-4.ti {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

.dashboard .profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 1px solid var(--gray-light);
    padding: 8px 0;
    z-index: 1000;
}

.dashboard .profile-dropdown[hidden] {
    display: none !important;
}

.dashboard .profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    text-align: right;
    transition: background 0.2s;
}

.dashboard .profile-dropdown-item:hover {
    background: var(--gray-light);
}

.dashboard .profile-dropdown-item .ti {
    font-size: 18px;
    opacity: 0.8;
}

.dashboard .profile-dropdown-form {
    margin: 0;
}

.dashboard .profile-dropdown-logout {
    color: var(--primary-red);
    font-weight: 500;
}

/* Responsive Design for Header */
@media (max-width: 992px) {
    .dashboard .top-bar {
        padding: 0 20px;
        left: 80px;
    }
    
    .dashboard .search-container {
        flex: 0 0 200px;
    }
    
    .dashboard .text-wrapper-71,
    .dashboard .profile-name {
        display: none;
    }
}

@media (max-width: 768px) {
    .dashboard .top-bar {
        left: 0; /* إزالة الـ left على الشاشات الصغيرة */
        padding: 0 15px;
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
    }
    
    .dashboard .search-container {
        flex: 0 0 100%;
        order: 2;
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .dashboard .top-bar {
        padding: 0 15px;
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
    }
    
    .dashboard .search-container {
        flex: 0 0 100%;
        order: 2;
        margin-top: 15px;
    }
}