:root {
    --primary: #3498db;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --dark: #2c3e50;
    --light: #ecf0f1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 
                 'Helvetica Neue', Arial, sans-serif;
}

.filter-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background-color: #d1d7d5;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.filter-group {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    font-weight: 600;
}

label {
    margin-bottom: 5px;
    font-weight: 700;
    font-size: 16px;
}

select, input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary);
}

.clear-btn {
    align-self: flex-end;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-btn:hover {
    background-color: #e9ecef;
}

/* ===== ОСНОВНЫЕ СТИЛИ ТАБЛИЦЫ ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: center;
    font-size: 20px;
	font-weight: 800;
	
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #eee;
}

th {
    background-color: #3c616a;
    color: white;
    position: sticky;
    top: 0;
    font-weight: 700;
}

th:last-child, td:last-child {
    border-right: none;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* ===== СТАТУСЫ ===== */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 800;
}

.status-active {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-trial {
    background-color: rgba(241, 196, 15, 0.15);
    color: #e18e0b;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.status-blocked {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.status-inactive {
    background-color: rgba(149, 165, 166, 0.2);
    color: #7f8c8d;
}

/* ===== КНОПКИ ДЕЙСТВИЙ ===== */
.vertical-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.action-btn {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
    width: 100%;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-warning {
    background-color: var(--warning);
    color: white;
}

.btn-info {
    background-color: rgb(10 75 118);
    color: white;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    align-items: center;
}

.pagination-info {
    font-size: 14px;
    color: #777;
}

.pagination-controls {
    display: flex;
    gap: 5px;
}

.pagination-btn {
    padding: 8px 12px;
    min-width: 40px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.pagination-btn.active {
    background-color: rgb(10 75 118);
    color: white;
    border-color: rgb(10 75 118);
}

.pagination-btn:hover:not(.active) {
    background-color: #f8f9fa;
}

/* ===== ПОДСВЕТКА СТРОК ===== */
.establishment-row.status-active {
    background-color: rgba(46, 204, 113, 0.08);
    border-left: 4px solid #2ecc71;
}

.establishment-row.status-inactive {
    background-color: rgba(243, 156, 18, 0.08);
    border-left: 4px solid #f39c12;
}

.establishment-row.status-trial {
    background-color: rgba(52, 152, 219, 0.08);
    border-left: 4px solid #3498db;
}

.establishment-row.status-blocked {
    background-color: rgba(231, 76, 60, 0.08);
    border-left: 4px solid #e74c3c;
}

.establishment-row:hover {
    filter: brightness(0.98);
    transition: all 0.2s;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 25px;
    border: none;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-header {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* ===== ФОРМЫ ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    max-width: 350px;
    display: none;
}

.notification-content {
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease-out;
}

.notification-message {
    flex-grow: 1;
    margin-right: 15px;
    font-size: 14px;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 15px;
    }
    .stats-cards {
        grid-template-columns: 1fr;
    }
    .filter-section {
        grid-template-columns: 1fr;
    }
    th, td {
        padding: 8px;
        font-size: 12px;
    }
    .vertical-actions {
        flex-direction: column;
        gap: 5px;
    }
    .action-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
}