/* frontend/css/dictionaries.css */
.dictionaries-container {
    animation: fadeIn 0.3s ease;
}

/* Табы */
.dictionaries-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 0;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #7f8c8d;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #2e8bd5;
}

.tab-btn.active {
    color: #2e8bd5;
    border-bottom-color: #2e8bd5;
}

/* Панели */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.panel-header h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

.panel-header h3 i {
    color: #2e8bd5;
    margin-right: 8px;
}

/* Таблицы */
.table-container {
    background: white;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #ecf0f1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead th {
    text-align: left;
    padding: 14px 16px;
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #ecf0f1;
}

.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #fafbfc;
}

.loading-cell {
    text-align: center;
    padding: 40px !important;
    color: #95a5a6;
}

/* Бейджи статуса */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-inactive {
    background: #ffebee;
    color: #c62828;
}

/* Цветовые индикаторы рисков */
.risk-color-preview {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-block;
}

/* Кнопки действий */
.action-buttons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #7f8c8d;
}

.icon-btn:hover {
    background: #e9ecef;
    color: #2e8bd5;
}

.icon-btn.danger:hover {
    color: #e74c3c;
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-md {
    width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #ecf0f1;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #95a5a6;
}

.modal-body {
    padding: 24px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #ecf0f1;
}

/* Toast уведомления */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
}

.toast {
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #27ae60;
}

.toast-success i { color: #27ae60; }

.toast-error {
    border-left: 4px solid #e74c3c;
}

.toast-error i { color: #e74c3c; }

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}