/* Стили верхней панели */
.top-header {
    height: 45px;
    background: var(--header-bg);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    z-index: 1000;
    width: 100vw; /* На всю ширину экрана */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

/* Границы для визуализации - отключены */
/* .top-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid red;
    pointer-events: none;
    z-index: 9999;
} */

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
    /* border: 1px solid blue;  Убрана граница для визуализации */
    padding: 5px;
    position: relative;
}

/* .logo-section::before - отключена подпись */
/* .logo-section::before {
    content: 'logo-section';
    position: absolute;
    top: -1px;
    left: -1px;
    font-size: 8px;
    color: blue;
    background: rgba(255,255,255,0.9);
    padding: 0 2px;
} */

.logo {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

.search-bar {
    flex: 1;
    max-width: 400px;
    margin: 0 15px;
    position: relative;
    /* border: 1px solid green;  Убрана граница для визуализации */
    padding: 5px;
    position: relative;
}

/* .search-bar::before - отключена подпись */
/* .search-bar::before {
    content: 'search-bar';
    position: absolute;
    top: -1px;
    left: -1px;
    font-size: 8px;
    color: green;
    background: rgba(255,255,255,0.9);
    padding: 0 2px;
} */

.search-input {
    width: 100%;
    padding: 6px 30px 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--secondary-color);
    font-size: 13px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(51, 122, 183, 0.1);
}

.search-button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 3px;
    border-radius: 50%;
    transition: all 0.2s;
}

.search-button:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    /* border: 1px solid orange;  Убрана граница для визуализации */
    padding: 5px;
    position: relative;
}

/* .header-actions::before - отключена подпись */
/* .header-actions::before {
    content: 'header-actions';
    position: absolute;
    top: -1px;
    left: -1px;
    font-size: 8px;
    color: orange;
    background: rgba(255,255,255,0.9);
    padding: 0 2px;
} */

.notification-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
}

.notification-btn:hover {
    background: var(--hover-bg);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--hover-bg);
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    border: none;
    transition: all 0.2s;
}

.user-avatar:hover {
    background: var(--primary-dark);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 150px;
    display: none;
    z-index: 1001;
}

.user-dropdown a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 13px;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: var(--hover-bg);
}

.user-menu:hover .user-dropdown {
    display: block;
}

/* Стили результатов поиска */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-filters {
    display: flex;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    gap: 4px;
}

.filter-btn {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--secondary-color);
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--hover-bg);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.search-results-list {
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--hover-bg);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-type {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.search-result-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.search-result-description {
    font-size: 12px;
    color: var(--text-secondary);
}
