fw_rules_builder/app/static/style.css

256 lines
5.9 KiB
CSS

/* ─── Общие стили ─────────────────────────────────────────────────────────── */
body {
background: #f4f6f9;
font-size: 13px;
}
.navbar-brand {
font-size: 1.1rem;
letter-spacing: 0.5px;
}
/* ─── Таблицы ─────────────────────────────────────────────────────────────── */
.table th {
font-size: 12px;
white-space: nowrap;
}
.table td {
vertical-align: middle;
font-size: 12px;
}
.table-responsive {
max-height: calc(100vh - 200px);
overflow-y: auto;
}
/* Закреплённый заголовок таблицы */
.table thead th {
position: sticky;
top: 0;
z-index: 2;
}
/* ─── Строки правил ───────────────────────────────────────────────────────── */
tr.rule-allow {
background-color: #e8f5e9 !important;
}
tr.rule-deny, tr.rule-drop, tr.rule-reject {
background-color: #fce4d6 !important;
}
tr.rule-span td {
background-color: #d6e4f0 !important;
color: #1f4e79;
font-weight: bold;
text-align: center;
font-size: 13px;
}
/* ─── Бейджи типов ────────────────────────────────────────────────────────── */
.badge-host {
background-color: #0d6efd;
color: white;
padding: 2px 7px;
border-radius: 4px;
font-size: 11px;
}
.badge-network {
background-color: #198754;
color: white;
padding: 2px 7px;
border-radius: 4px;
font-size: 11px;
}
.badge-action-allow {
background-color: #198754;
color: white;
padding: 2px 8px;
border-radius: 4px;
font-size: 11px;
font-weight: bold;
}
.badge-action-deny, .badge-action-drop, .badge-action-reject {
background-color: #dc3545;
color: white;
padding: 2px 8px;
border-radius: 4px;
font-size: 11px;
font-weight: bold;
}
/* ─── Элементы выбора (picker) ────────────────────────────────────────────── */
.picker-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 3px 6px;
border-radius: 4px;
cursor: pointer;
margin-bottom: 2px;
font-size: 12px;
transition: background 0.1s;
}
.picker-item:hover {
background: #e9ecef;
}
.picker-item .item-label {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.picker-item .item-badge {
font-size: 10px;
margin-left: 4px;
flex-shrink: 0;
}
.picker-item .item-action {
flex-shrink: 0;
margin-left: 4px;
color: #6c757d;
font-size: 14px;
line-height: 1;
}
.picker-item .item-action:hover {
color: #0d6efd;
}
.picker-item-selected {
background: #cfe2ff;
}
.picker-item-selected:hover {
background: #b6d4fe;
}
.picker-item-selected .item-action:hover {
color: #dc3545;
}
/* ─── Кнопки действий в таблице ───────────────────────────────────────────── */
.btn-action {
padding: 2px 6px;
font-size: 12px;
}
/* ─── Теги в ячейках таблицы ─────────────────────────────────────────────── */
.cell-tags {
display: flex;
flex-wrap: wrap;
gap: 2px;
}
.cell-tag {
background: #e9ecef;
border-radius: 3px;
padding: 1px 5px;
font-size: 11px;
white-space: nowrap;
}
.cell-tag-group {
background: #d1ecf1;
color: #0c5460;
}
.cell-tag-server {
background: #d4edda;
color: #155724;
}
.cell-tag-net {
background: #fff3cd;
color: #856404;
}
.cell-tag-svc {
background: #f8d7da;
color: #721c24;
}
.cell-tag-sgr {
background: #e2d9f3;
color: #432874;
}
.cell-tag-missing {
background: #f8d7da;
color: #842029;
border: 1px solid #f5c2c7;
}
/* ─── Удалённые элементы в пикере ────────────────────────────────────────── */
.picker-item-missing {
background: #fff3cd !important;
border: 1px solid #ffc107;
}
.picker-item-missing:hover {
background: #ffe69c !important;
}
/* ─── Модальные окна ──────────────────────────────────────────────────────── */
.modal-header {
padding: 10px 16px;
}
.modal-body {
padding: 16px;
}
.modal-footer {
padding: 8px 16px;
}
/* ─── Toast ───────────────────────────────────────────────────────────────── */
.toast {
min-width: 260px;
}
/* ─── Скроллбар ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #adb5bd;
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: #6c757d;
}
/* ─── Drag handle для правил ──────────────────────────────────────────────── */
.drag-handle {
cursor: grab;
color: #adb5bd;
font-size: 16px;
padding: 0 4px;
}
.drag-handle:active {
cursor: grabbing;
}
tr.dragging {
opacity: 0.5;
background: #cfe2ff !important;
}
tr.drag-over {
border-top: 2px solid #0d6efd;
}