body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 40px;
    margin: 0;
    text-align: center;
}
.container {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    max-width: 1200px; 
    width: 90%;
    margin-bottom: 20px;
    box-sizing: border-box; 
}
#container {
    display: flex;
    flex-direction: column; /* Если селектов будет несколько, они красиво встанут друг под друга */
    gap: 10px;
    width: 100%;
}
@media (max-width: 600px) {
    .container {
        width: 100%; /* Вместо фиксированных 600px */
        max-width: 100%;
        padding: 1.5rem; /* Уменьшаем внутренние отступы на мобильных */
    }
}
h3 {
    margin-top: 0;
}
p {
    margin-bottom: 0;
}
/* Стиль для формы поиска */
.search-wrapper {
    padding: 1.5rem;
    max-width: 600px;
    width: 90%;
    margin-bottom: 30px;
    box-sizing: border-box;
}
.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}
.search-input:focus {
    border-color: #2563eb;
}
.search-button {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.search-button:hover {
    background-color: #1d4ed8;
}
/*================================================*/
.status-bar {
    display: flex;
    flex-wrap: wrap; 
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: 600px;
    width: 90%;
    margin-bottom: 20px;
    box-sizing: border-box;
}
.status-text {
    flex: 1;
    min-width: 200px;
    text-align: left;
    margin-right: 10px;
}
.status-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    margin-left: auto;
}
.status-actions a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
    transition: color 0.2s;
}
.status-actions a:hover {
    color: #1d4ed8;
}
.status-actions select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
    /* Свойства для ограничения ширины */
    width: 100%;         /* Занимает всю ширину своего блока на мобильных */
    max-width: 100%;     /* Гарантирует, что селект никогда не выйдет за границы родителя */
    box-sizing: border-box;    
    /* Ограничение длины текста внутри самого селекта (до раскрытия) */
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
/* СТИЛИ ДЛЯ ДИАЛОГА ЛОГИНА */
.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    max-width: 400px;
    width: 90%;
    margin-top: 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
}
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    width: 100%;             /* Занимает всю ширину контейнера */
    max-width: 100%;         /* Защита от вылезания */
    box-sizing: border-box;  /* Включает padding в общую ширину */
    display: flex;
    flex-direction: column;  /* Элемент ввода встает строго ПОД описанием */
    gap: 8px;                /* Красивый фиксированный отступ между описанием и полем ввода */
}
.form-group label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #1e293b;
    word-wrap: break-word;   /* Если описание слишком длинное, оно перенесется, а не выдавит блок */
    white-space: normal;
}
.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;             /* Растягиваем на всю ширину sub-блока */
    max-width: 100%;         /* Жесткое ограничение: не выходить за границы */
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;  /* КРИТИЧЕСКИ ВАЖНО: paddings не увеличат ширину больше 100% */
    outline: none;
    transition: all 0.2s;
    background-color: white;
}
/* Специфические хаки для textarea (чтобы убрать инлайновые стили из Java) */
.form-group textarea {
    resize: vertical;        /* Разрешаем менять размер только по вертикали, чтобы не сломать адаптивность по ширине */
    min-height: 120px;
}
/* Эффект фокуса для всех элементов */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* Контейнер для полей, стоящих в одну строку (например, Зарплата + Валюта) */
.form-row-group {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap; /* КРИТИЧЕСКИ ВАЖНО: переносит элементы на мобильных, предотвращая выход за контейнер */
}
/* Пропорции элементов внутри строки на десктопах */
.form-row-group .flex-2 {
    flex: 2;
    min-width: 180px; /* Чтобы инпут не сжимался до критического минимума */
}
.form-row-group .flex-1 {
    flex: 1;
    min-width: 100px; /* Минимальная ширина для селекта валюты */
}
/* На маленьких экранах делаем элементы полноценно адаптивными на 100% ширины */
@media (max-width: 480px) {
    .form-row-group .flex-2,
    .form-row-group .flex-1 {
        flex: 1 1 100%; /* Каждый элемент занимает всю строку целиком */
    }
}
.form-additional-group {
    background:#f8fafc; 
    padding:20px; 
    border-radius:8px; 
    border:1px dashed #cbd5e1; 
    margin-top:10px;
}
/* Контейнер для сетки чекбоксов */
.form-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* Автоматически делит на колонки в зависимости от ширины */
    gap: 12px 20px; /* Отступы: 12px между строками, 20px между колонками */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
}
/* Элемент строки: чекбокс + текст */
.checkbox-label {
    display: flex;
    align-items: center;      /* Выравнивание чекбокса и текста строго по центру вертикали */
    gap: 10px;                /* Фиксированный отступ между квадратиком чекбокса и текстом */
    font-size: 15px;
    font-weight: 400;
    color: #334155;
    cursor: pointer;
    white-space: normal;      /* Разрешаем перенос текста, если он очень длинный */
    word-wrap: break-word;    /* Защита от вылезания длинных слов */
    line-height: 1.4;
    user-select: none;        /* Запрещаем случайное выделение текста при кликах */
}

/* Стилизация самого квадратика чекбокса (опционально, для аккуратного размера) */
.checkbox-label input[type="checkbox"] {
    width: 18px !important;   /* Жестко задаем размер квадратика */
    height: 18px !important;
    margin: 0;                /* Сбрасываем дефолтные браузерные отступы */
    cursor: pointer;
    flex-shrink: 0;           /* КРИТИЧЕСКИ ВАЖНО: не дает чекбоксу сжиматься, если текст рядом переносится */
    vertical-align: middle;
}

/* На мобильных устройствах выстраиваем все строго в один столбец */
@media (max-width: 500px) {
    .form-checkbox-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
.field-error {
    color: #dc2626;
    font-size: 0.8em;
    margin-top: 5px;
}
.submit-button {
    width: 100%;
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}
.submit-button:hover {
    background-color: #1d4ed8;
}
.login-footer {
    margin-top: 1.5rem;
    font-size: 14px;
    text-align: center;
}
.login-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.login-footer a:hover {
    text-decoration: underline;
}
/*------------------------------*/
.subcategories {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); 
    gap: 8px 20px; 
    margin-top: 10px;
    justify-content: start; 
}
.sub-item {
    font-size: 0.9em;
    color: #0066cc;
    text-decoration: none;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.sub-item:hover {
    text-decoration: underline;
}

.sub-item-word-wrap {
    font-size: 0.9em;
    color: #0066cc;
    text-decoration: none;
    text-align: left;
    display: block;   
    white-space: normal;      /* Разрешаем перенос текста */
    word-wrap: break-word;    /* Перенос длинных слов, если нужно */
    overflow: visible;        /* Убираем скрытие текста */
    text-overflow: clip;      /* Убираем многоточие */
    line-height: 1.4;         /* Улучшаем читаемость при переносе */
}

.sub-item-word-wrap:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .subcategories {
        grid-template-columns: 1fr;
    }
}
/*-----------------------------------*/
.tip-container {
    display: flex;
    justify-content: center;
    padding: 0 20px;
    font-size: 12px;
}
.tip-text {
    text-align: center;
    max-width: 100%;
    width: 100%;
}
.copyright {
    margin-bottom: 8px;
    word-wrap: break-word;
}
.tip-actions form {
    margin: 0;
}
.tip-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.tip-actions a,
.tip-actions a:link,
.tip-actions a:visited,
.tip-actions a:hover,
.tip-actions a:active,
.tip-actions a:focus,
.tip-actions a:-webkit-any-link {
    text-decoration: none !important;
    color: #2563eb !important;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.alert {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.alert-error {
    color: red;
    border: 1px solid red;
    background: #fff5f5;
}
.alert-success {
    color: green;
    border: 1px solid green;
    background: #f5fff5;
}
.alert-green {
    border: 1px solid green;
}
.alert-green p {
    text-align: left;
    margin-bottom: 0;
    line-height: 1.5; /* Задает хорошую высоту строки для выравнивания */
    word-wrap: break-word; /* Безопасный перенос длинных строк */
    overflow-wrap: anywhere;
}
.alert-green p form {
    display: inline;
}

/* Выравниваем иконку внутри ссылки строго по центру текста */
.alert-green p form a {
    display: inline-flex;
    vertical-align: middle;
}
.alert-green p img {
    vertical-align: middle;
    display: inline-block;
}
.alert-green pre {
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.pagination {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center; /* Выравнивает элементы по вертикали по центру */
}
.search-snippet {
    font-size: 0.85em;
    color: #64748b;
    margin-top: 4px;
    text-align: left; /* Чтобы описание аккуратно выравнивалось по левому краю под заголовком */
}

/* 1. Общий контейнер для всех карточек Listings */
.listings-container {
    display: flex;
    flex-direction: column; /* элементы идут вертикально */
    align-items: flex-start; /* выравнивание по левому краю */
    width: 100%;
    gap: 12px; /* расстояние между карточками */
    box-sizing: border-box;
}

/* 2. Внутренний контейнер для элементов с переносом */
.listings-row {
    display: flex;
    flex-wrap: wrap; /* перенос на следующую строку при нехватке места */
    justify-content: flex-start; /* строки начинаются слева */
    align-items: center; /* центрирование по вертикали элементов в строке */
    gap: 12px; /* расстояние между элементами */
}

/* 3. Карточка объявления со скруглением и цветами */
.listing-box {
    width: 100%;
    max-width: 100%;
    border: 1px solid #43a047;
    border-radius: 12px;
    padding: 12px 16px;
    box-sizing: border-box;
}

/* Цветовые варианты */
.listing-box-red { border-color: #e53935; }
.listing-box-green { border-color: #43a047; }
.listing-box-blue { border-color: #1e88e5; }

/* 4. Контейнер для двух элементов (лево-право) */
.listing-row-two {
    display: flex;
    justify-content: space-between; /* левый и правый край */
    align-items: center; /* по вертикали */
    width: 100%;
}

/* 5. Контейнер для трёх элементов (по центру) */
.listing-row-three {
    display: flex;
    justify-content: center; /* горизонтальный центр */
    align-items: center; /* вертикальный центр */
    gap: 12px;
    width: 100%;
}

/* Подсетка для текста и описания в карточке */
.listing-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

.listing-price {
    font-weight: 700;
    color: #2563eb;
}

.listing-snippet {
    font-size: 0.85em;
    color: #64748b;
    line-height: 1.4;
}
.listing-details-title {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-all; 
}

/* Кнопка избранного (сердечко) */
.favorites-btn {
    cursor: pointer;
    font-size: 1.3em;
    line-height: 1;
    user-select: none;
    color: #94a3b8;
    transition: color 0.15s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    padding: 4px 6px;
    border-radius: 6px;
}
.favorites-btn:hover {
    color: #e11d48;
    transform: scale(1.2);
    background-color: #fff1f2;
}

/* Стили для карточки детального просмотра объявления (Job Listing Details) */
.job-listings-details-container {
    text-align: left;
    max-width: 900px;
    margin: 20px auto;
}
.job-listings-details-breadcrumbs {
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #64748b;
}
.job-listings-details-breadcrumbs a {
    color: #2563eb;
    text-decoration: none;
}
.job-listings-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}
@media (max-width: 768px) {
    .job-listings-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
.job-listings-details-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.85em;
    color: #64748b;
    margin-bottom: 16px;
}
.job-listings-details-sidebar {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.job-listings-details-price-title {
    font-size: 0.85em;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}
.job-listings-details-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
}
.job-listings-details-contacts-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 8px;
}
.job-listings-details-author {
    font-size: 1.05rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 15px;
}
.job-listings-details-contact-button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.job-listings-details-contact-button:hover {
    background-color: #1d4ed8;
}
.job-listings-details-description-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.job-listings-details-description {
    line-height: 1.6;
    color: #334155;
    font-size: 1.05rem;
    word-wrap: break-word;
}
.job-listings-attributes-container {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.job-listings-attribute-row {
    font-size: 0.9em;
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.job-listings-attribute-label {
    color: #94a3b8;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: bold;
}
.job-listings-attribute-value {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.job-listings-tag {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Тарифы - Второстепенная контурная кнопка */
.btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #1e293b;
}
.btn-outline:hover {
    border-color: #1e293b;
    background: #f8fafc;
}

/* Маленькая кнопка для микропакетов */
.btn-sm {
    width: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* УНИКАЛЬНАЯ СЕТКА ТАРИФОВ */
.tariffs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    align-items: stretch;
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: left;
    width: 100%;
}

.tariff-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.tariff-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
}

.tariff-card.popular {
    border: 2px solid #2563eb;
    box-shadow: 0 15px 25px rgba(37, 99, 235, 0.08);
}

.tariff-card.popular:hover {
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.15);
}

.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.tariff-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.tariff-audience {
    font-size: 0.85rem;
    color: #64748b;
    min-height: 70px;
    margin-bottom: 15px;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 12px;
    line-height: 1.4;
}

.tariff-price {
    margin-bottom: 20px;
}

.price-num {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.price-period {
    font-size: 0.85rem;
    color: #64748b;
}

.price-subtext {
    display: block;
    font-size: 0.8rem;
    color: #43a047;
    font-weight: 600;
    margin-top: 4px;
}

.features-list {
    list-style: none;
    margin-bottom: 25px;
    padding: 0;
    flex-grow: 1;
}

.features-list li {
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    color: #334155;
}

.features-list li::before {
    content: "✓";
    color: #43a047;
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
}

.features-list li.not-available {
    color: #94a3b8;
}

.features-list li.not-available::before {
    content: "✕";
    color: #cbd5e1;
}

.packages-section {
    margin-top: 20px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.package-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    background: white;
}

.package-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.package-info p {
    font-size: 0.8rem;
    color: #64748b;
}

/* --- СТИЛИ ДЛЯ ВИДЖЕТА ТАРИФА И ЛИМИТОВ --- */
.user-tariff-widget {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    text-align: left;
    margin-bottom: 20px;
}

/* Верхняя строка: Название тарифа и дата окончания */
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.tariff-info, .tariff-date {
    display: flex;
    flex-direction: column;
}

.tariff-label, .date-label {
    font-size: 13px;
    color: #718096;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tariff-name {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.tariff-date {
    text-align: right;
}

.date-value {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
}

.date-value .time {
    font-weight: 400;
    color: #718096;
    font-size: 14px;
    margin-left: 2px;
}

/* Сетка элементов лимитов */
.widget-limits {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.limit-item {
    display: flex;
    flex-direction: column;
}

/* Мета-данные над прогресс-баром */
.limit-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.limit-title {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

.limit-count {
    font-size: 13px;
    color: #718096;
}

.limit-count strong {
    color: #1a202c;
    font-size: 16px;
    font-weight: 700;
}

/* Контейнер шкалы (Progress Bar) */
.progress-bar {
    background: #edf2f7;
    border-radius: 8px;
    height: 10px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* Заполнение шкалы */
.progress-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: #3182ce; /* Базовый синий цвет */
}

/* Цветовые состояния в зависимости от использования лимитов */
.progress-fill.warning {
    background: #dd6b20; /* Оранжевый: лимит почти исчерпан */
}

.progress-fill.danger {
    background: #e53e3e; /* Красный: лимит исчерпан полностью */
}

/* Элементы, которые не активны или равны 0/0 */
.limit-item.empty .limit-title {
    color: #a0aec0;
}

.limit-item.empty .limit-count strong {
    color: #a0aec0;
}

.limit-item.empty .progress-bar {
    background: #f7fafc;
}

/* Кнопка/ссылка действия */
.limit-action {
    margin: 6px 0 0 0;
    font-size: 13px;
    text-align: right;
}

.limit-action form {
    display: inline;
}

.limit-action-btn {
    background: none;
    border: none;
    color: #3182ce;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: 13px;
    text-decoration: none;
}

.limit-action-btn:hover {
    text-decoration: underline;
    color: #2b6cb0;
}

/* Мобильная адаптивность */
@media (max-width: 480px) {
    .widget-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .tariff-date {
        text-align: left;
    }
}

/* --- СТИЛИ ДЛЯ МОДАЛЬНЫХ ОКОН КАТАЛОГА --- */
.modal-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-dialog-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.modal-dialog-content-center {
    max-width: 400px;
    text-align: center;
}

.modal-dialog-content-left {
    max-width: 450px;
    text-align: left;
}

.modal-dialog-text {
    color: #334155;
    font-size: 1.05rem;
    margin-bottom: 24px;
}

.modal-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-dialog-btn-primary {
    display: inline-block;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s;
}

.modal-dialog-btn-primary:hover {
    background-color: #1d4ed8;
}

.modal-dialog-btn-secondary {
    display: inline-block;
    text-decoration: none;
    background-color: #f1f5f9;
    color: #475569;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
}

.modal-dialog-btn-secondary:hover {
    background-color: #e2e8f0;
}

.modal-dialog-btn-close {
    display: block;
    margin-top: 25px;
    width: 100%;
    box-sizing: border-box;
}

.modal-dialog-title {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.modal-dialog-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: #334155;
}

.modal-dialog-link {
    color: #2563eb;
    text-decoration: none;
}

.modal-dialog-link:hover {
    text-decoration: underline;
}

.modal-dialog-info {
    margin-top: 5px;
    color: #475569;
    background: #f8fafc;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 0.95em;
    max-height: 150px;
    overflow-y: auto;
}

.limit-notice {
    font-size: 0.7em;
    color: #6b7280;
    margin-top: 10px;
    line-height: 1.4;
}

/* Стили для формы поиска (параметры выпадающего списка) */
.search-container {
    margin-top: 50px;
    width: 90%;
    max-width: 600px;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: left;
    box-sizing: border-box;
}

.search-main {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.advanced-options {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    padding-top: 0;
    padding-left: 15px;
    padding-right: 15px;
}

.advanced-options.open {
    max-height: 2000px; 
    opacity: 1;
    padding-top: 20px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

@media (max-width: 480px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    .advanced-options {
        padding-left: 10px;
        padding-right: 25px;
    }
    .search-container {
        padding: 1.5rem;
        width: 95%;
    }
}

#category_id, 
#category_id option {
    white-space: normal;
    text-overflow: clip;
    overflow: visible;
}

.checkbox-section {
    margin-top: 25px;
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
    text-align: left;
    width: 100%;
}

.section-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 12px;
}

.autocomplete-suggestions {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    transition: background 0.15s;
}

.autocomplete-suggestion-item:hover {
    background: #f1f5f9;
}
