:root {
    --white: #ffffff;
    --graphite: #2c3e50;
    --sky-blue: #3498db;
    --soft-gray: #f8f9fa;
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--white);
    color: var(--graphite);
    font-family: 'Inter', sans-serif;
    margin: 0;
}

/* Navbar */
.navbar-custom {
    background-color: var(--graphite) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--white) !important;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .navbar-brand { font-size: 1.1rem !important; }
}
@media (max-width: 400px) {
    .navbar-brand { font-size: 0.95rem !important; letter-spacing: 0; }
}

.brand-accent { color: var(--sky-blue); }

.nav-link.position-relative {
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-custom {
    position: absolute;
    top: 5px;
    right: 5px;

    font-size: 0.65rem;
    padding: 3px 5px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid var(--graphite);
    z-index: 1;
}

.notification-bell-icon {
    font-size: 1.3rem;
    display: inline-block;
    line-height: 1;
}

/* Контейнер списка */
#notification-items {
    padding: 5px 0;
}

/* Элемент уведомления */
.notification-item {
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    padding: 12px 15px;
}

.notification-link:hover {
    background-color: var(--soft-gray);
}

.notification-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-time {
    font-size: 0.75rem;
    color: #95a5a6;
    font-weight: 600;
}

.notification-message {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--graphite);
}

.text-muted.text-center {
    padding: 20px;
    font-style: italic;
}

/* Mobile Menu (Offcanvas) */
.mobile-link {
    display: block;
    color: var(--graphite) !important; /* Исправление: темный текст на белом фоне */
    text-decoration: none;
    padding: 15px 0;
    font-weight: 500;
    border-bottom: 1px solid #eee;
}

.mobile-link i { color: var(--sky-blue); }

.offcanvas-body .avatar-circle {
    width: 45px;
    height: 45px;
    background-color: var(--sky-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* UI Elements */
.notification-bell-icon { font-size: 1.2rem; color: var(--white); }

.avatar-circle {
    width: 35px;
    height: 35px;
    background-color: var(--sky-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
}

.btn-auth {
    background-color: var(--sky-blue);
    color: white;
    border: none;
    font-weight: 600;
    padding: 8px 25px;
    border-radius: 6px;
}

/* Notifications Dropdown Fix */
#notification-items {
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    #notification-items { width: 260px !important; }
}


/* Шапка всегда сверху */
.navbar-custom {
    background-color: var(--graphite) !important;
    z-index: 1060 !important; /* Выше чем выпадающее меню */
    position: sticky;
    top: 0;
}

/* Веб-панель (Side Panel) */
.dropdown-menu.user-side-panel {
    position: fixed !important;
    top: 60px !important; /* Высота твоей шапки */
    right: -320px !important; /* Спрятано за экраном */
    width: 320px !important;
    height: calc(100vh - 60px) !important;
    background-color: var(--graphite) !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 20px !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: -5px 10px 20px rgba(0,0,0,0.2) !important;
    transition: right 0.3s ease-in-out !important;
    z-index: 1050; /* Чуть ниже шапки */
}

/* Класс для анимации (добавляется через JS) */
.dropdown-menu.user-side-panel.show {
    right: 0 !important;
}

/* Стили кнопок-карточек (как на фото) */
.side-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 800;
    text-transform: lowercase;
    transition: 0.2s;
}

.card-profile {
    background-color: var(--white);
    color: var(--graphite) !important;
    margin-bottom: 10px;
}

.card-action {
    background-color: var(--sky-blue);
    color: var(--white) !important;
}

.card-action i {
    font-size: 1.2rem;
    margin-right: 15px;
}

.card-logout {
    background-color: #e74c3c;
    color: white !important;
    margin-top: auto; /* Прижать к низу */
}

/* Убираем стрелочку у ника */
.dropdown-toggle::after { display: none !important; }

/* --- Адаптивность для мобильных устройств --- */
@media (max-width: 768px) {
    /* Чтобы текст в шапке не наезжал на иконки */
    .navbar-brand {
        font-size: 1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    /* Боковая панель на весь экран для удобства */
    .user-side-panel {
        width: 100% !important;
        right: -100% !important;
        top: 60px !important; /* Уменьшаем отступ под мобильную шапку */
        height: calc(100vh - 60px) !important;
    }

    /* Увеличиваем кнопки, чтобы по ним было легко попадать пальцем */
    .side-card {
        padding: 18px 20px;
        font-size: 1.1rem;
    }

    /* Скрываем имя пользователя на мобилках, оставляем только аватарку */
    #userDropdown span {
        display: none;
    }

    .avatar-circle {
        margin-right: 0 !important;
    }
}


