/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Заголовок */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header h1 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Вкладки */
.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 5px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Контент вкладок */
.tab-content {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
}

.tab-actions {
    display: flex;
    gap: 10px;
}

/* Кнопки */
.btn-primary, .btn-oauth, .btn-direct, .btn-ozon, .btn-refresh, .btn-logout {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-oauth {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.btn-oauth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.3);
}

.btn-direct {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.btn-direct:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.btn-ozon {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
}

.btn-ozon:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.3);
}

.btn-refresh {
    background: linear-gradient(135deg, #fa709a, #fee140);
    color: white;
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(250, 112, 154, 0.3);
}

.btn-logout {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

/* Таблицы */
.vacancies-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.vacancies-table th,
.vacancies-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.vacancies-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.vacancies-table tr:hover {
    background: #f8f9fa;
}

/* Статусы */
.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-draft {
    background: #fff3cd;
    color: #856404;
}

.status-archived {
    background: #f8d7da;
    color: #721c24;
}

.status-moderation {
    background: #cce5ff;
    color: #004085;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* Кнопки действий */
.btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 2px;
    transition: all 0.3s ease;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

/* Messenger */
.messenger-container {
    display: flex;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.messenger-sidebar {
    width: 350px;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.messenger-search {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.messenger-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.chats-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.chat-item:hover {
    background-color: #f8f9fa;
}

.chat-item.active {
    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
    flex-shrink: 0;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-title {
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-subtitle {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-meta {
    text-align: right;
    flex-shrink: 0;
}

.chat-time {
    color: #999;
    font-size: 12px;
    margin-bottom: 5px;
}

.unread-badge {
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: auto;
}

.messenger-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.chat-details {
    margin-left: 15px;
}

.chat-actions {
    display: flex;
    gap: 10px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fafafa;
}

.no-chat-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
}

.no-chat-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.no-chat-text {
    font-size: 18px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.message-outgoing {
    align-self: flex-end;
}

.message-incoming {
    align-self: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message-outgoing .message-content {
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-incoming .message-content {
    background-color: white;
    color: #333;
    border: 1px solid #ddd;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

.message-incoming .message-time {
    text-align: left;
}

.no-messages {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

.chat-input-container {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: white;
}

.chat-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
}

.chat-input input:focus {
    border-color: #007bff;
}

.chat-input button {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.chat-input button:hover {
    background-color: #0056b3;
}

/* Отклики */
.responses-container {
    margin-top: 20px;
}

.response-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.response-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.response-info {
    flex: 1;
}

.response-candidate {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

.response-vacancy {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.response-phone {
    color: #999;
    font-size: 0.9rem;
}

.response-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ozon-sent {
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Модальное окно - Универсальные стили */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background: white;
    margin: 20px auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: calc(100vh - 40px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn-cancel {
    background: #6c757d;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Состояния */
.loading, .error, .empty {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

.error {
    color: #dc3545;
}

.empty {
    color: #6c757d;
}

/* Статистика */
.vacancies-stats {
    margin-bottom: 30px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.stat-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .tab-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .tab-actions {
        flex-wrap: wrap;
    }
    
    .chat-item, .response-item {
        flex-direction: column;
        text-align: center;
    }
    
    .chat-meta, .response-actions {
        margin-top: 15px;
    }
    
    .vacancies-table {
        font-size: 0.9rem;
    }
    
    .vacancies-table th,
    .vacancies-table td {
        padding: 10px 8px;
    }
}

/* ===== СТИЛИ ДЛЯ ИНТЕГРАЦИЙ ===== */

.integrations-container {
    margin-top: 20px;
}

.integrations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.integration-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.integration-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.integration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.integration-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.integration-toggle {
    display: flex;
    align-items: center;
}

/* Переключатель (toggle switch) */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.integration-info {
    margin-bottom: 15px;
}

.integration-info p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

.integration-actions {
    display: flex;
    gap: 10px;
}

.btn-test {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.btn-test:hover {
    background: #138496;
}

.btn-form {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.btn-form:hover {
    background: #218838;
}

/* Адаптивность для интеграций */
@media (max-width: 768px) {
    .integrations-list {
        grid-template-columns: 1fr;
    }
    
    .integration-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .integration-actions {
        flex-direction: column;
    }
}

/* ===== СТИЛИ ДЛЯ ЛИДОВ ===== */

.leads-filters {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.leads-stats {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leads-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.leads-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
}

.leads-table th:hover {
    background: #e9ecef;
}

.leads-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.leads-table tbody tr:hover {
    background: #f8f9fa;
}

.leads-table tbody tr:last-child td {
    border-bottom: none;
}

/* Бейджи статусов */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-error {
    background: #f8d7da;
    color: #721c24;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.badge-warning {
    background: #ffeaa7;
    color: #6c5ce7;
}

.badge-unknown {
    background: #e2e3e5;
    color: #6c757d;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-pagination {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    color: #2c3e50;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-pagination:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pageInfo {
    font-weight: 600;
    color: #2c3e50;
}

/* Стили для пагинации вакансий */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-settings {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-settings label {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.pagination-settings select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #2c3e50;
    font-size: 0.9rem;
    cursor: pointer;
}

.pagination-settings select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Кнопки действий */
.btn-small {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-export {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.btn-export:hover {
    background: #218838;
}

/* Модальное окно деталей лида */
.lead-details {
    max-height: 400px;
    overflow-y: auto;
}

.detail-row {
    display: flex;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    min-width: 120px;
    color: #2c3e50;
    font-weight: 600;
}

.error-text {
    color: #dc3545;
    font-weight: 500;
}

.response-data {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    max-height: 100px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Адаптивность для лидов */
@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .leads-table {
        font-size: 0.8rem;
    }
    
    .leads-table th,
    .leads-table td {
        padding: 8px 4px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== СТИЛИ ДЛЯ КОНФИГУРАЦИЙ ИНТЕГРАЦИЙ ===== */

.integration-configs-section {
    margin-bottom: 30px;
}

.integration-configs-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.configs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.config-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.config-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.config-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.config-status {
    display: flex;
    align-items: center;
}

.config-info {
    margin-bottom: 15px;
}

.config-info p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

.config-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-error {
    background: #dc3545;
    color: white;
}

.btn-error:hover {
    background: #c82333;
}

/* Стили для модального окна создания интеграции */
#createIntegrationModal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

#configFormFields {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Стили для модального окна редактирования интеграции */
#editIntegrationModal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

#editConfigFormFields {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

#editConfigFormFields .form-group {
    margin-bottom: 15px;
}

#editConfigFormFields label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

#editConfigFormFields input,
#editConfigFormFields select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

#editConfigFormFields input:focus,
#editConfigFormFields select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

#editIntegrationForm small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.8rem;
}

/* ===== СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА ЛИДА ===== */
/* Используем общие стили для модальных окон выше */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.btn-close:hover {
    background: #e9ecef;
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.lead-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    color: #2c3e50;
    font-weight: 600;
    min-width: 120px;
    margin-right: 15px;
}

.detail-row span {
    color: #666;
    flex: 1;
    text-align: right;
}

.detail-row a {
    color: #667eea;
    text-decoration: none;
}

.detail-row a:hover {
    text-decoration: underline;
}

.error-text {
    color: #dc3545 !important;
    font-weight: 500;
}

.response-data {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.response-data pre {
    margin: 0;
    font-size: 0.8rem;
    color: #495057;
    white-space: pre-wrap;
    word-break: break-word;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-row strong {
        min-width: auto;
        margin-right: 0;
    }
    
    .detail-row span {
        text-align: left;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
}

/* Адаптивность для конфигураций */
@media (max-width: 768px) {
    .configs-list {
        grid-template-columns: 1fr;
    }
    
    .config-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .config-actions {
        justify-content: center;
    }
}

/* Стили для фильтров вакансий */
.vacancies-filters {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Стили для статусов */
.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-old {
    background-color: #f8d7da;
    color: #721c24;
}

.status-draft {
    background-color: #fff3cd;
    color: #856404;
}

.status-moderation {
    background-color: #cce5ff;
    color: #004085;
}

.status-rejected {
    background-color: #f5c6cb;
    color: #721c24;
}

.status-blocked {
    background-color: #f5c6cb;
    color: #721c24;
}

.status-removed {
    background-color: #cce5ff;
    color: #004085;
}

/* Стили для массового создания вакансий */
.progress-container {
    text-align: center;
    padding: 20px;
}

.progress-header h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.progress-header p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
}

.progress-details {
    color: #7f8c8d;
    font-size: 14px;
}

.mass-create-results {
    padding: 20px;
}

.results-header h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.results-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.summary-item {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    min-width: 120px;
}

.summary-item.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.summary-item.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.summary-item.total {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
}

.summary-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
}

.created-vacancies, .errors-list {
    margin-bottom: 20px;
}

.created-vacancies h4, .errors-list h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
}

.vacancy-list, .error-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
}

.vacancy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

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

.vacancy-item .city {
    font-weight: bold;
    color: #495057;
    min-width: 100px;
}

.vacancy-item .title {
    flex: 1;
    margin: 0 10px;
    color: #6c757d;
    font-size: 14px;
}

.vacancy-item .status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.vacancy-item .status.success {
    background-color: #d4edda;
    color: #155724;
}

.error-item {
    padding: 8px 0;
    color: #dc3545;
    font-size: 14px;
    border-bottom: 1px solid #f8f9fa;
}

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

.results-actions {
    text-align: center;
    margin-top: 20px;
}

.results-actions button {
    margin: 0 10px;
}

/* Стили для массовых операций */
.bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bulk-info {
    font-weight: bold;
    font-size: 16px;
}

.bulk-buttons {
    display: flex;
    gap: 10px;
}

.bulk-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.bulk-buttons .btn-warning {
    background-color: #f39c12;
    color: white;
}

.bulk-buttons .btn-success {
    background-color: #27ae60;
    color: white;
}

.bulk-buttons .btn-primary {
    background-color: #3498db;
    color: white;
}

.bulk-buttons .btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.bulk-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Стили для чекбоксов */
.vacancy-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#selectAllCheckbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Стили для подробной информации о вакансиях */
.vacancy-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.vacancy-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    color: #7f8c8d;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.salary-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.salary-amount {
    font-weight: bold;
    color: #2c3e50;
}

.salary-cost {
    font-size: 12px;
    color: #7f8c8d;
}

/* Стили для упрощенной формы отклика */
.form-info {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
}

.form-info p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    text-align: center;
}

/* Стили для модальных окон создания вакансий */
/* Используем общие стили для модальных окон выше */

/* Стили для форм */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Стили для выбора городов */
.cities-selection {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.cities-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.city-item {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.city-item:hover {
    background-color: #f8f9fa;
}

.city-item input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.city-item label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.selected-cities {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.selected-city {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-remove-city {
    background: none;
    border: none;
    color: #1976d2;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-city:hover {
    color: #d32f2f;
}

/* Кнопки */
.btn-success {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Стили для откликов и интеграций */
.vacancy-info {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.vacancy-card {
    background: white;
    border-radius: 4px;
    padding: 10px;
}

.vacancy-card h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.vacancy-card p {
    margin: 5px 0;
    color: #666;
}

.integrations-list,
.connected-integrations {
    margin-bottom: 20px;
}

.integrations-list h4,
.connected-integrations h4 {
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 5px;
}

.integration-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 10px;
    background: white;
}

.integration-info h5 {
    margin: 0 0 5px 0;
    color: #333;
}

.integration-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.integration-actions {
    display: flex;
    gap: 10px;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Кнопки для интеграций */
.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Адаптивность */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .cities-list {
        grid-template-columns: 1fr;
    }
    
    .integration-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .integration-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Стили для расширенной формы создания вакансии */
.form-section {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.form-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

/* Стили для чекбоксов */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

/* Стили для множественного выбора */
select[multiple] {
    min-height: 100px;
    padding: 8px;
}

/* Стили для превью изображения */
.image-preview {
    margin-top: 10px;
    text-align: center;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Адаптивность для расширенной формы */
@media (max-width: 768px) {
    .form-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-content {
        margin: 1% auto;
        max-height: 95vh;
    }
}

/* Улучшенная адаптивность для больших экранов */
@media (min-width: 1200px) {
    .modal-content {
        max-width: 1200px;
        width: 95%;
    }
    
    .form-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }
    
    .form-section h4 {
        grid-column: 1 / -1;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
}

/* Улучшенная адаптивность для очень больших экранов */
@media (min-width: 1600px) {
    .modal-content {
        max-width: 1400px;
        width: 90%;
    }
    
    .form-section {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Улучшенная высота модальных окон */
.modal-content {
    max-height: 95vh;
    overflow-y: auto;
}

/* Улучшенная высота для форм интеграции */
#createIntegrationModal .modal-content,
#editIntegrationModal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Стили для секций формы интеграции */
.integration-form-section {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.integration-form-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.integration-form-section .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: end;
}

.integration-form-section .form-group {
    margin-bottom: 15px;
}

.integration-form-section .form-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    display: block;
}

/* Адаптивность для форм интеграции */
@media (max-width: 768px) {
    .integration-form-section .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .integration-form-section {
        padding: 15px;
        margin-bottom: 20px;
    }
}

/* Улучшенная адаптивность для больших экранов */
@media (min-width: 1200px) {
    .integration-form-section .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* Стили для карточек конфигураций */
.config-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.config-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.config-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.config-status {
    display: flex;
    align-items: center;
}

.config-info {
    margin-bottom: 15px;
}

.config-info p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.config-details {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.config-details p {
    margin: 3px 0;
    font-size: 13px;
}

.config-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.config-actions button {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.config-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Адаптивность для карточек конфигураций */
@media (max-width: 768px) {
    .config-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .config-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .config-card {
        padding: 15px;
    }
}

/* ===== ИДЕАЛЬНЫЙ ИНТЕРФЕЙС ВАКАНСИЙ ===== */

/* Контейнер для вакансий - табличный вид с возможностью переключения */
.vacancies-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Переключатель вида */
.view-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    background: #e9ecef;
    border-radius: 8px;
    width: fit-content;
}

.view-toggle button {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #666;
}

.view-toggle button.active {
    background: white;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Табличный вид вакансий */
.vacancies-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vacancies-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    font-size: 14px;
}

.vacancies-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.vacancies-table tr:hover {
    background: #f8f9fa;
}

/* Компактные карточки */
.vacancies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding: 0;
}

.vacancy-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    height: fit-content;
}

.vacancy-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: #667eea;
}

/* Заголовок карточки */
.vacancy-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.vacancy-checkbox-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.vacancy-checkbox {
    margin: 0;
    transform: scale(1.2);
    cursor: pointer;
}

.vacancy-status {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Контент карточки */
.vacancy-card-content {
    margin-bottom: 16px;
}

.vacancy-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vacancy-id {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 12px;
    font-family: 'Monaco', 'Menlo', monospace;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* Детали вакансии */
.vacancy-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
}

.detail-icon {
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.7;
}

.detail-text {
    color: #495057;
    flex: 1;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.3;
}

/* Кнопки действий */
.vacancy-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    align-items: center;
}

.vacancy-card-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
}

/* Специальные стили для статусов */
.status-badge.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.status-removed {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.status-blocked {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.status-old {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-badge.status-draft {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Изображения вакансий */
.vacancy-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e9ecef;
    margin-right: 12px;
    flex-shrink: 0;
}

.vacancy-image-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Стили для табличного вида */
.table-view {
    overflow-x: auto;
}

.vacancy-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vacancy-info .vacancy-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
}

.vacancy-info .vacancy-id {
    font-size: 11px;
    color: #6c757d;
    font-family: 'Monaco', 'Menlo', monospace;
    margin: 0;
}

.vacancy-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.vacancy-actions button {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    line-height: 1;
}

/* Улучшенные кнопки действий */
.btn-edit {
    background: #007bff;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.3);
}

.btn-edit:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4);
}

.btn-response {
    background: #28a745;
    color: white;
    box-shadow: 0 1px 3px rgba(40, 167, 69, 0.3);
}

.btn-response:hover {
    background: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.4);
}

.btn-activate {
    background: #6f42c1;
    color: white;
    box-shadow: 0 1px 3px rgba(111, 66, 193, 0.3);
}

.btn-activate:hover {
    background: #5a32a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(111, 66, 193, 0.4);
}

.btn-integrations {
    background: #6c757d;
    color: white;
    box-shadow: 0 1px 3px rgba(108, 117, 125, 0.3);
}

.btn-integrations:hover {
    background: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.4);
}

.btn-duplicate {
    background: #17a2b8;
    color: white;
    box-shadow: 0 1px 3px rgba(23, 162, 184, 0.3);
}

.btn-duplicate:hover {
    background: #138496;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.4);
}

.btn-archive {
    background: #dc3545;
    color: white;
    box-shadow: 0 1px 3px rgba(220, 53, 69, 0.3);
}

.btn-archive:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
}

/* Адаптивность для таблицы */
@media (max-width: 1200px) {
    .vacancies-table {
        font-size: 12px;
    }
    
    .vacancies-table th,
    .vacancies-table td {
        padding: 8px 12px;
    }
    
    .vacancy-actions {
        flex-direction: column;
        gap: 2px;
    }
    
    .vacancy-actions button {
        font-size: 10px;
        padding: 3px 6px;
    }
}

@media (max-width: 768px) {
    .vacancies-table {
        font-size: 11px;
    }
    
    .vacancies-table th,
    .vacancies-table td {
        padding: 6px 8px;
    }
    
    .vacancy-actions button {
        font-size: 9px;
        padding: 2px 4px;
    }
}

/* Адаптивность для плиток вакансий */
@media (max-width: 768px) {
    .vacancies-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 8px 0;
    }
    
    .vacancy-card {
        padding: 10px;
    }
    
    .vacancy-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .vacancy-card-actions {
        justify-content: center;
    }
}

@media (min-width: 1200px) {
    .vacancies-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (min-width: 1600px) {
    .vacancies-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 10px;
    }
}

@media (min-width: 1920px) {
    .vacancies-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 8px;
    }
}

/* Стили для пустого состояния */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* Стили для дублирования вакансий */
.duplicate-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.duplicate-info h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.duplicate-info p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.cities-selection {
    margin-top: 15px;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.cities-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.cities-grid label:hover {
    background-color: #e9ecef;
}

.cities-grid input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
}

.results-summary {
    margin-bottom: 20px;
}

.results-summary p {
    font-size: 16px;
    margin: 10px 0;
}

.errors-section {
    margin-top: 15px;
    padding: 15px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
}

.errors-section h4 {
    color: #c53030;
    margin: 0 0 10px 0;
    font-size: 14px;
}

.errors-section ul {
    margin: 0;
    padding-left: 20px;
}

.errors-section li {
    color: #c53030;
    font-size: 13px;
    margin: 5px 0;
}

/* Адаптивность для дублирования */
@media (max-width: 768px) {
    .cities-grid {
        grid-template-columns: 1fr;
        max-height: 250px;
    }
    
    .duplicate-info {
        padding: 10px;
    }
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МОДАЛЬНЫХ ОКОН ===== */

/* Мобильные устройства */
@media (max-width: 768px) {
    .modal {
        padding: 10px 0;
    }
    
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px auto;
        max-height: calc(100vh - 20px);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 12px 15px;
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer button {
        width: 100%;
        padding: 12px;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .modal-content {
        max-width: 700px;
    }
    
    .form-row {
        gap: 15px;
    }
}

/* Mac и большие экраны */
@media (min-width: 1200px) {
    .modal-content {
        max-width: 900px;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
}

/* Большие Mac экраны */
@media (min-width: 1440px) {
    .modal-content {
        max-width: 1000px;
    }
    
    .modal-body {
        padding: 28px;
    }
}

/* Очень большие экраны */
@media (min-width: 1920px) {
    .modal-content {
        max-width: 1200px;
    }
    
    .modal-body {
        padding: 32px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
}

/* Специальные стили для форм создания вакансий */
.form-section {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.form-section h4 {
    margin: 0 0 16px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #667eea;
    border-radius: 2px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Стили для изображений */
.image-preview {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    margin-top: 10px;
    border: 2px solid #e9ecef;
}

/* Стили для синхронизации */
.sync-info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 12px;
    margin-top: 16px;
    text-align: center;
}

.sync-info p {
    margin: 0;
    color: #1976d2;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Стили для таблицы вакансий - динамичные и тонкие */
.vacancies-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.vacancies-table th,
.vacancies-table td {
    padding: 8px 12px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.vacancies-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.vacancies-table tr:hover {
    background-color: #f8f9fa;
}

.vacancies-table tr:hover td {
    background-color: #f8f9fa;
}

/* Динамичные стили для форм */
.form-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-section:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .vacancies-table {
        font-size: 12px;
    }
    
    .vacancies-table th,
    .vacancies-table td {
        padding: 6px 8px;
    }
}

/* Адаптивность для больших экранов */
@media (min-width: 1200px) {
    .form-row {
        gap: 24px;
    }
    
    .form-section {
        padding: 20px;
    }
}
