/* Google Font Import - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    background-color: var(--body-color);
    transition: var(--tran-05);
}

::selection {
    background-color: var(--primary-color);
    color: #fff;
}

.navbar-brand {
    margin-right: 0rem !important;
    margin-left: 0px;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    padding: 10px 14px;
    background: var(--bg-color-1);
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 100;
    border-right: 1px solid #E5E5E5;
    touch-action: pan-y;
}

.sidebar.close {
    width: 88px;
}

/* ===== Reusable code - Here ===== */
.sidebar li {
    height: 50px;
    list-style: none;
    display: flex;
    align-items: center;
}

.sidebar header .image,
.sidebar .icon {
    min-width: 60px;
    border-radius: 6px;
}

.sidebar .icon {
    min-width: 40px;
    border-radius: 6px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 24px;
    color: var(--text-color);
    padding-left: 2px;
}

ol, ul {
    padding-left: 0rem !important;
}

.sidebar .text,
.sidebar .icon {
    color: var(--text-color);
    transition: var(--tran-03);
}

.sidebar .text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
    margin-left: 5px;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s,
                visibility 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s,
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(0);
}

.sidebar.close .text {
    opacity: 0;
    visibility: hidden;
    width: 0;
    margin-left: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                visibility 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sidebar header {
    position: relative;
}

.sidebar header .image-text {
    display: flex;
    align-items: center;
}

.sidebar header .logo-text {
    display: flex;
    flex-direction: column;
}

header .image-text .name {
    margin-top: 2px;
    font-size: 18px;
    font-weight: 600;
}

header .image-text .profession {
    font-size: 12px;
    margin-top: -2px;
    display: block;
}

.sidebar header .image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar header .image img {
    width: 40px;
    border-radius: 6px;
}

.sidebar header .toggle {
    position: absolute;
    top: 50%;
    right: -25.5px;
    transform: translateY(-50%) rotate(180deg);
    height: 25px;
    width: 25px;
    background-color: var(--primary-color);
    color: var(--bg-color-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.3s ease;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.dark .sidebar header .toggle {
    color: var(--text-color);
}

.sidebar.close .toggle {
    transform: translateY(-50%) rotate(0deg);
}

.sidebar header .toggle:hover {
    background-color: var(--highlight-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) rotate(180deg) scale(1.1);
}

.sidebar.close .toggle:hover {
    transform: translateY(-50%) rotate(0deg) scale(1.1);
}

.sidebar .menu {

}

.sidebar li.search-box {
    border-radius: 6px;
    background-color: var(--primary-color-light);
    cursor: pointer;
    transition: var(--tran-05);
}

.sidebar li.search-box input {
    height: 100%;
    width: 100%;
    outline: none;
    border: none;
    background-color: var(--primary-color-light);
    color: var(--text-color);
    border-radius: 6px;
    font-size: 17px;
    font-weight: 500;
    transition: var(--tran-05);
}

.sidebar li a {
    list-style: none;
    height: 100%;
    background-color: transparent;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--tran-03);
}

.sidebar li a:hover {
    background-color: var(--primary-color);
}

.sidebar li a:hover .icon,
.sidebar li a:hover .text {
    color: var(--bg-color-1);
}

body.dark .sidebar li a:hover .icon,
body.dark .sidebar li a:hover .text {
    color: var(--text-color);
}

.sidebar .menu-bar {
    height: calc(100% - 55px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: scroll;
}

.menu-bar::-webkit-scrollbar {
    display: none;
}

.sidebar .menu-bar .mode {
    border-radius: 6px;
    background-color: var(--primary-color-light);
    position: relative;
    transition: var(--tran-05);
}

.menu-bar .mode .sun-moon {
    height: 50px;
    width: 60px;
}

.mode .sun-moon i {
    position: absolute;
}

.mode .sun-moon i.sun {
    opacity: 0;
}

body.dark .mode .sun-moon i.sun {
    opacity: 1;
}

body.dark .mode .sun-moon i.moon {
    opacity: 0;
}

.menu-bar .bottom-content .toggle-switch {
    position: absolute;
    right: 0;
    height: 100%;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}

.toggle-switch .switch {
    position: relative;
    height: 22px;
    width: 40px;
    border-radius: 25px;
    background-color: var(--toggle-color);
    transition: var(--tran-05);
}

.switch::before {
    content: '';
    position: absolute;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    background-color: var(--bg-color-1);
    transition: var(--tran-04);
}

body.dark .switch::before {
    left: 20px;
}

/* Стили для основного контента */
.home {
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    background-color: var(--body-color);
    z-index: 1;
    padding-left: 88px !important;
}

/* Убираем реакцию контента на состояние сайдбара */
.sidebar.close ~ .home {
    padding-left: 0; /* Контент не смещается */
}

/* Дополнительные стили для элементов */
.language-selector {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.language-select-wrapper {
    position: relative;
    width: 100%;
}

.language-select-wrapper .icon {
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-color);
    pointer-events: none;
}

.language-selector select {
    background-color: var(--primary-color-light);
    color: var(--text-color);
    border: none;
    padding: 5px 5px 5px 40px;
    border-radius: 4px;
    width: 100%;
    font-size: 17px;
    font-weight: 500;
    appearance: none;
    cursor: pointer;
}

.language-selector:hover select {
    background-color: var(--primary-color);
    color: var(--bg-color-1);
}

.language-selector:hover .icon {
    color: var(--bg-color-1);
}

.language-form {
    width: 100%;
    display: flex;
    align-items: center;
}

.nav-link form {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.logout-button {
    width: 100%;
    height: 100%;
    text-align: left;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--tran-03);
}

.logout-button:hover {
    background-color: var(--primary-color);
    color: var(--bg-color-1);
}

.logout-button .icon {
    min-width: 40px;
    border-radius: 6px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 24px;
    color: var(--text-color);
}

.logout-button .text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
    margin-left: 5px;
    color: var(--text-color);
}

.logout-button:hover .icon,
.logout-button:hover .text {
    color: var(--bg-color-1);
}

.divider {
    border-color: var(--primary-color-light);
    margin: 10px 0;
}

.user-info-container {
    display: flex;
    align-items: center;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-rating {
    display: flex;
    align-items: center;
    font-size: 0.85em;
    color: #727272;
}

.user-rating i {
    margin-right: 2px;
    font-size: 0.9em;
}

.user-rating-display {
    list-style: none;
    display: flex;
    align-items: center;
    margin-top: -10px;
    margin-bottom: 10px;
    padding-left: 10px;
}

.user-rating-number {
    display: flex;
    align-items: center;
    min-width: 40px;
    height: 30px;
    border-radius: 6px;
    margin-left: 9px;
}

.user-rating-value {
    font-size: 14px;
    font-weight: 600;
    color: #ffcc00;
}

.sidebar.close .user-rating-number {
    min-width: 60px;
}

.user-energy-display {
    list-style: none;
    display: flex;
    align-items: center;
    margin-top: -35px;
    margin-bottom: 10px;
    padding-left: 10px;
}

.user-energy-number {
    display: flex;
    align-items: center;
    margin-left: 9px;
    min-width: 40px;
    height: 30px;
    border-radius: 6px;
}

.user-energy-value {
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
}

.sidebar.close .user-energy-number {
    min-width: 60px;
}

.high-energy {
    color: #4CAF50;
}

.medium-energy {
    color: #FFC107;
}

.low-energy {
    color: #F44336;
}

.high-rating {
    color: #4CAF50;
}

.medium-rating {
    color: #FFC107;
}

.low-rating {
    color: #F44336;
}

.notification-icon {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: 25px;
    min-width: 18px;
    height: 18px;
    background-color: #F44336;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px;
}

.notification-badge.hidden {
    display: none;
}

.myname {
    margin-right: 16px !important;
}

/* Анимации */
.sidebar header .image-text {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sidebar.close header .image-text .logo-text {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidebar header .image-text .logo-text {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s,
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}