/* Фиксированный хедер */
.messages {
    position: fixed;
    top: 200px; /* Увеличиваем значение, чтобы опустить уведомление ниже */
    right: 20px;
    z-index: 1001;
}
.messages .alert {
    animation: slideIn 0.5s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    color: #333;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    align-items: center;
    
}

.nav-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu ul li {
    margin-left: 20px;
    padding: 8px 12px;
    background-color: transparent;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.nav-menu ul li:hover {
    background-color: #E5E7EB;
}

.nav-menu ul li a {
    text-decoration: none;
    color: #333;
}

.user-menu {
    margin-left: 20px;
}

.user-menu a {
    color: #007bff;
    text-decoration: none;
}

.user-menu ul li:hover {
    background-color: #3399ff;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.user-menu ul li:hover a {
    color: #ffffff;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: #333;
    transition: all 0.3s;
}

/* Стили для карточек */
.card {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 200px;
        height: 100%;
        background: #f4f4f8;
        flex-direction: column;
        padding: 10px;
        transition: right 0.3s ease-in-out;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
    }

    .nav-menu ul li {
        margin-left: 0;
        margin-bottom: 10px;
        padding: 5px 10px;
        border-radius: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-menu ul li a {
        display: block;
        width: 100%;
    }

    .nav-menu ul li:hover {
        background-color: #E5E7EB;
    }

    .user-menu {
        margin-top: 20px;
        text-align: center;
    }

    .user-menu ul li:hover a {
        color: #000000;
    }

    /* Уменьшение шрифтов */
    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    p, a, span, div {
        font-size: 0.875rem;
    }

    .text-sm {
        font-size: 0.75rem;
    }

    .text-xs {
        font-size: 0.625rem;
    }

    /* Стили для карточек */
    .grid {
        display: flex;
        flex-direction: column;
    }

    .card {
        width: 100%;
        min-height: auto;
    }

    .card:last-child {
        position: sticky;
        bottom: 0;
        background: #fff;
        z-index: 1000;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    }

    #priceChart {
        max-height: 250px;
    }
}

/* Стили для больших экранов */
@media (min-width: 769px) {
    #priceChart {
        max-height: 400px;
    }
}

/* Добавляем видимые границы для полей формы */
input, select, textarea {
    border: 1px solid #ccc; /* Граница по умолчанию */
    padding: 8px;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

/* Стили при фокусе для выделения активного поля */
input:focus, select:focus, textarea:focus {
    border-color: #007bff; /* Цвет границы при фокусе */
    outline: none; /* Убираем стандартный outline браузера */
}
/* Добавлено: стили для формы логина */
form p {
    margin-bottom: 1rem;
}

form input[type="text"],
form input[type="password"],
form input[type="email"] {
    width: 100%;
    box-sizing: border-box;
}


/* Изменение: сдвиг логотипа на 50px вправо */
.logo img {
    height: 40px;
    margin-right: 10px;
    margin-left: 50px; /* Добавлено: сдвиг вправо на 50px */
}

.auth-links {
    display: flex;
    gap: 20px; /* расстояние между ссылками */
}

.auth-links a {
    flex: 1; /* равномерное распределение пространства */
    text-align: center;
}

@media (max-width: 600px) {
    .auth-links {
        flex-direction: column;
    }
}

a:hover {
    text-decoration: underline;
}