/* Custom styles for RouterOS Manager */ /* Layout: Tabler Fluid Vertical (https://preview.tabler.io/layout-fluid-vertical.html) */ /* --- Fluid Vertical: page structure --- */ .page { min-height: 100vh; } /* Сайдбар: всегда тёмный (как на референсе Tabler) */ .navbar-vertical { --tblr-body-color: rgba(255, 255, 255, 0.9); --tblr-body-color-rgb: 255, 255, 255; --tblr-border-color: rgba(255, 255, 255, 0.1); --tblr-bg-surface: #1e293b; --tblr-bg-surface-hover: rgba(255, 255, 255, 0.05); --tblr-navbar-active-bg: rgba(255, 255, 255, 0.08); --tblr-navbar-active-color: #fff; --tblr-primary: #6ea8fe; --tblr-muted: rgba(255, 255, 255, 0.6); background-color: #1e293b !important; color: rgba(255, 255, 255, 0.9); } .navbar-vertical .navbar-brand, .navbar-vertical .nav-link, .navbar-vertical .dropdown-item { color: inherit; } .navbar-vertical .navbar-brand:hover, .navbar-vertical .nav-link:hover, .navbar-vertical .dropdown-item:hover { color: #fff; } .navbar-vertical .nav-link.active, .navbar-vertical .dropdown-item.active { background-color: var(--tblr-navbar-active-bg); color: var(--tblr-navbar-active-color); } .navbar-vertical .dropdown-toggle::after { border-top-color: rgba(255, 255, 255, 0.6); } .navbar-vertical .navbar-toggler { border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.9); } /* Сайдбар: у бренда убираем лишний отступ и стрелку (Tabler не должен добавлять caret к brand) */ .navbar-vertical .navbar-brand { padding-left: 0; padding-right: 0; } .navbar-vertical .navbar-brand::after { display: none !important; } .navbar-vertical > .container-fluid { padding-left: 1rem; padding-right: 1rem; display: flex; flex-direction: column; min-height: 100%; } .navbar-vertical .collapse.navbar-collapse { display: flex; flex-direction: column; flex: 1; min-height: 0; } .navbar-vertical .collapse .navbar-nav.pt-lg-3 { flex: 1 1 auto; min-height: 0; overflow-y: auto; } .navbar-vertical .navbar-sidebar-footer { flex-shrink: 0; border-top-color: rgba(255, 255, 255, 0.1) !important; overflow: visible; } .navbar-vertical .navbar-sidebar-footer .nav-link.btn-icon { padding: 0.35rem; color: rgba(255, 255, 255, 0.75); border: none; display: inline-flex; align-items: center; justify-content: center; } .navbar-vertical .navbar-sidebar-footer .nav-link.btn-icon:hover { color: #fff; background: rgba(255, 255, 255, 0.08); } .navbar-vertical .navbar-sidebar-footer .nav-link.btn-icon .badge { font-size: 0.7rem; padding: 0.2rem 0.35rem; } .navbar-vertical .navbar-sidebar-footer .dropdown-toggle::after { display: none; } /* Все выпадающие меню в футере сайдбара — поверх контента и без обрезки */ .navbar-vertical .navbar-sidebar-footer .dropdown-menu { z-index: 1050; } .navbar-vertical .navbar-sidebar-footer .dropdown-menu-card { overflow-x: hidden; box-sizing: border-box; } .navbar-vertical .navbar-sidebar-footer .dropdown-menu-card .card-footer { flex-wrap: nowrap; min-width: 0; } .navbar-vertical .navbar-sidebar-footer .dropdown-menu-card .card-footer .btn { flex: 1 1 auto; min-width: 0; justify-content: center; } /* Стрелка только у пунктов с подменю (dropdown-toggle), не у обычных ссылок и не у бренда */ .navbar-vertical .nav-link:not(.dropdown-toggle)::after { display: none !important; } /* Sidebar: nav-link with icon (Tabler vertical) */ .navbar-vertical .nav-link { display: flex; align-items: center; gap: 0.5rem; } .navbar-vertical .nav-link-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; flex-shrink: 0; } .navbar-vertical .nav-link-icon .icon { width: 1.25rem; height: 1.25rem; } /* Sidebar dropdown: inline submenu (no popup) — только для основного списка меню, не затрагиваем иконки в нижнем футере сайдбара (язык, тема, колокол и т.д.) */ .navbar-vertical .navbar-nav > .nav-item.dropdown .dropdown-menu { position: static; float: none; border: none; box-shadow: none; background: transparent; padding: 0 0 0.5rem 0; margin: 0; } .navbar-vertical .navbar-nav > .nav-item.dropdown .dropdown-item { padding-left: 1rem; padding-top: 0.35rem; padding-bottom: 0.35rem; } .navbar-vertical .navbar-nav > .nav-item.dropdown .dropdown-item .nav-link-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; } .navbar-vertical .navbar-nav > .nav-item.dropdown .dropdown-item .nav-link-icon .icon { width: 1rem; height: 1rem; } /* Custom avatar background */ .avatar { background-image: url('data:image/svg+xml,'); } /* Navbar styles */ .navbar { position: relative; z-index: 1030; } .navbar-nav .nav-item.dropdown { position: relative; } .navbar-nav .nav-link { display: flex; align-items: center; padding: 0.5rem 1rem; color: var(--tblr-body-color); text-decoration: none; transition: color 0.15s ease-in-out; } .navbar-nav .nav-link:hover { color: var(--tblr-primary); } .navbar-nav .nav-link.active { color: var(--tblr-primary); font-weight: 600; } .navbar-nav .nav-link .icon { margin-right: 0.5rem; width: 1.25rem; height: 1.25rem; } .navbar-nav .dropdown-toggle::after { margin-left: 0.5rem; vertical-align: middle; } .navbar-nav .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; min-width: 10rem; padding: 0.5rem 0; margin: 0; font-size: 0.875rem; color: var(--tblr-body-color); text-align: left; list-style: none; background-color: var(--tblr-bg-surface); background-clip: padding-box; border: 1px solid var(--tblr-border-color); border-radius: 0.375rem; box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); } .navbar-nav .dropdown-menu.show { display: block; } .navbar-nav .dropdown-menu-columns { display: flex; flex-wrap: wrap; min-width: 16rem; } .navbar-nav .dropdown-menu-column { flex: 1; min-width: 8rem; } .navbar-nav .dropdown-item { display: flex; align-items: center; width: 100%; padding: 0.5rem 1rem; clear: both; font-weight: 400; color: var(--tblr-body-color); text-align: inherit; text-decoration: none; white-space: nowrap; background-color: transparent; border: 0; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out; } .navbar-nav .dropdown-item:hover { color: var(--tblr-primary); background-color: var(--tblr-bg-surface-hover); } .navbar-nav .dropdown-item.active { color: var(--tblr-primary); background-color: var(--tblr-primary-lt); } .navbar-nav .dropdown-item .icon { margin-right: 0.5rem; width: 1rem; height: 1rem; } /* Navbar brand */ .navbar-brand { display: flex; align-items: center; padding-top: 0.3125rem; padding-bottom: 0.3125rem; margin-right: 1rem; font-size: 1.25rem; line-height: inherit; white-space: nowrap; text-decoration: none; color: var(--tblr-body-color); } .navbar-brand:hover { color: var(--tblr-primary); text-decoration: none; } .navbar-brand-icon { margin-right: 0.5rem; } /* User menu */ .navbar-nav .nav-item.dropdown .nav-link { padding: 0.25rem 0.5rem; } .navbar-nav .nav-item.dropdown .avatar { width: 2rem; height: 2rem; border-radius: 50%; background-size: cover; background-position: center; } /* Убрали глобальную перекраску .badge, чтобы работали текстовые цвета Tabler (например, badge bg-blue-lt text-blue) */ /* --- Server sidebar (фильтры на /servers) — Tabler card + list-group --- */ .server-sidebar { width: 280px; min-width: 280px; max-height: calc(100vh - 180px); display: flex; flex-direction: column; } .server-sidebar .card-header { flex-shrink: 0; } .server-sidebar .card-body.border-bottom, .server-sidebar .card-footer { flex-shrink: 0; } .server-sidebar-body { flex: 1; min-height: 0; max-height: 50vh; } .server-sidebar .filter-section .list-group-header { cursor: pointer; font-size: 0.8125rem; font-weight: 600; text-transform: none; color: var(--tblr-body-color); } .server-sidebar .filter-section .list-group-header:hover { background-color: var(--tblr-bg-surface-tertiary); } .server-sidebar .list-group-item { font-size: 0.8125rem; padding-top: 0.375rem; padding-bottom: 0.375rem; } /* Полные названия в фильтрах (без обрезания), перенос по словам */ .server-sidebar .list-group-item .text-break, #server-filters-offcanvas .list-group-item span:first-of-type span { word-break: break-word; white-space: normal; min-width: 0; } /* Tabler-style subheader (как на preview.tabler.io/settings.html) */ .subheader { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--tblr-muted-color, #6c757d); margin-bottom: 0.25rem; padding-left: 0; } /* ===== Мобильный сайдбар: верхняя полоса + оверлей меню (Tabler-style) ===== */ .sidebar-backdrop { position: fixed; inset: 0; z-index: 1035; background: rgba(0, 0, 0, 0.4); transition: opacity 0.2s ease; } body.sidebar-overlay-open { overflow: hidden; touch-action: none; } @media (max-width: 767.98px) { /* На мобильных: колоночный layout — сайдбар сверху как полоса, контент на всю ширину снизу */ .page { display: flex; flex-direction: column; } .page .navbar-vertical { position: relative; width: 100% !important; max-width: 100% !important; min-height: auto !important; flex-shrink: 0; flex-direction: row; align-items: center; z-index: 1041; /* выше бэкдропа (1035), чтобы меню и верхняя полоса были кликабельны */ } .page .navbar-vertical > .container-fluid { flex-direction: row !important; flex-wrap: nowrap; width: 100%; min-height: 3.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; } .page .navbar-vertical .navbar-brand { flex-shrink: 0; margin-right: 0.5rem; } .page .navbar-vertical .navbar-brand .fw-bold { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 12rem; } .page .navbar-vertical .navbar-nav.flex-row { margin-left: auto; } .page .navbar-vertical .navbar-toggler { padding: 0.5rem; } /* Меню скрыто по умолчанию, при открытии — оверлей слева (z-index внутри контекста навбара) */ .page .navbar-vertical .navbar-collapse { position: fixed; top: 0; left: 0; bottom: 0; width: min(100vw, 280px); max-width: 280px; z-index: 1042; background: #1e293b; margin: 0; padding: 1rem 0; overflow-y: auto; -webkit-overflow-scrolling: touch; box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15); flex-direction: column; display: none; } .page .navbar-vertical .navbar-collapse.show { display: flex !important; } .page-wrapper { margin-left: 0 !important; flex: 1; min-width: 0; width: 100%; } .navbar-vertical .nav-link, .navbar-vertical .dropdown-item { min-height: 44px; padding-top: 0.5rem; padding-bottom: 0.5rem; display: flex; align-items: center; } } /* Responsive navbar */ @media (max-width: 991.98px) { .navbar-collapse { flex-basis: 100%; flex-grow: 1; align-items: center; } .navbar-nav { flex-direction: column; width: 100%; } .navbar-nav .dropdown-menu { position: static; float: none; width: 100%; margin-top: 0.25rem; background-color: var(--tblr-bg-surface); border: 1px solid var(--tblr-border-color); box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.08); } .navbar-nav .dropdown-item { padding: 0.5rem 0.75rem; } } /* Custom animations */ @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .fade-in { animation: fadeIn 0.3s ease-out; } /* Custom focus states */ .btn:focus, .form-control:focus, .nav-link:focus { outline: 2px solid var(--tblr-primary); outline-offset: 2px; } /* Loading states */ .btn:disabled { transform: none !important; box-shadow: none !important; } /* Spinning animation for loading icons */ .spin { animation: spin 1s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* Utility: pointer cursor */ .cursor-pointer { cursor: pointer; } /* Header actions toolbar: single row, nice spacing, scroll on overflow */ .header-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; /* to avoid cutting off focus outline */ /* Ensure dropdowns are not covered by following content (e.g., tables) */ position: relative; /* local stacking context for toolbar controls */ z-index: auto; /* keep toolbar below modals */ } .header-actions .btn-group { display: flex; align-items: stretch; gap: 0.5rem; } .header-actions .btn-group .btn-group { gap: 0; align-items: stretch; } .header-actions .btn-group .dropdown-toggle-split { padding-left: .5rem; padding-right: .5rem; display: inline-flex; align-items: center; height: 100%; } .header-actions .btn { display: inline-flex; align-items: center; white-space: nowrap; height: 100%; } .header-actions .btn svg { width: 18px; height: 18px; } .header-actions .header-actions-right { flex-shrink: 0; } /* Ensure dropdowns in main content (and header) are above the sidebar, below modals */ .header-actions .dropdown-menu, .page-header .dropdown-menu, .page-wrapper .dropdown-menu { z-index: 1035; /* above navbar(1030), below modal-backdrop(1040) and modal(1050) */ } /* Keep page-header in normal stacking order (below modals) */ .page-header { position: relative; z-index: auto; } /* Responsive sizing for small screens */ @media (max-width: 992px) { .header-actions { gap: 0.4rem; flex-wrap: wrap; } .header-actions .btn { padding: 0.35rem 0.6rem; font-size: 0.875rem; } .header-actions .btn .me-1 { margin-right: 0.4rem !important; } } @media (max-width: 576px) { .page-header .col-auto.ms-auto { width: 100%; } .header-actions { width: 100%; } } /* Мобильные отступы контента */ @media (max-width: 767.98px) { .page-body .container-fluid, .page-body .container-xl { padding-left: 0.75rem; padding-right: 0.75rem; } .card .card-body { padding: 0.75rem 1rem; } .offcanvas-start { width: min(320px, 100vw) !important; max-width: 100vw !important; } .modal-dialog { margin: 0.5rem; max-width: calc(100% - 1rem); } .modal-fullscreen-sm-down .modal-dialog { max-width: 100%; margin: 0; } } /* Custom responsive adjustments */ @media (max-width: 992px) { .page-wrapper { margin-left: 0; } } /* Custom dark mode support */ @media (prefers-color-scheme: dark) { .card { background-color: var(--tblr-dark); border-color: var(--tblr-border-color); } .navbar { background-color: var(--tblr-dark); border-color: var(--tblr-border-color); } .navbar-vertical { background-color: var(--tblr-dark); border-color: var(--tblr-border-color); } } /* ===== UX/UI Enhancement Animations ===== */ /* Плавные переходы для всех интерактивных элементов */ .transition-all { transition: all 0.2s ease; } /* Анимация появления карточек */ @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .card.animate-in { animation: fadeInUp 0.3s ease-out; } /* Анимация при добавлении элемента в таблицу */ @keyframes slideInRight { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } } .table tbody tr.new-item { animation: slideInRight 0.3s ease-out; background-color: rgba(32, 107, 196, 0.1); } /* Пульсация при обновлении */ @keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(32, 107, 196, 0.4); } 50% { box-shadow: 0 0 0 6px rgba(32, 107, 196, 0); } } .badge.updating { animation: pulse 1.5s infinite; } /* Hover эффекты для интерактивных карточек */ .card.interactive { cursor: pointer; transition: all 0.2s ease; } .card.interactive:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } /* Easy Switch: bring visuals in line with Tabler pages */ .easy-switch-page .card-tabs .nav-link { font-weight: 500; } .easy-switch-server-header { background-color: rgba(32, 107, 196, 0.05); cursor: pointer; user-select: none; } .easy-switch-flag { font-size: 1.5rem; line-height: 1; } .easy-switch-gateway-card { cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; border: 1px solid var(--tblr-border-color); position: relative; } .easy-switch-gateway-card:hover { transform: translateY(-1px); box-shadow: 0 0.125rem 0.375rem rgba(32, 41, 57, 0.1); } .easy-switch-gateway-card-active { border: 1px solid var(--tblr-primary) !important; box-shadow: 0 0.25rem 0.75rem rgba(32, 107, 196, 0.25); } .easy-switch-active-check { width: 20px; height: 20px; position: absolute; top: 8px; right: 8px; } .easy-switch-fast-slot { min-height: 18px; } .easy-switch-fast-badge { font-size: 0.65rem; padding: 2px 6px; } .easy-switch-gateway-flag { width: 28px; height: 28px; font-size: 1.25rem; line-height: 1; background-color: rgba(0, 0, 0, 0.06); } .easy-switch-gateway-flag-active { background-color: rgba(255, 255, 255, 0.25); } .easy-switch-gateway-title { font-size: 0.85rem; line-height: 1.2; word-break: break-word; } .easy-switch-gateway-ip { font-size: 0.75rem; } .easy-switch-gateway-ping { font-size: 1.1rem; } /* Ripple effect для кнопок */ @keyframes ripple { to { transform: scale(4); opacity: 0; } } .btn-ripple { position: relative; overflow: hidden; } .btn-ripple::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.5); transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; } .btn-ripple:active::after { width: 100px; height: 100px; transition: 0s; animation: ripple 0.6s ease-out; } /* Улучшенная анимация skeleton loader */ @keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } } .placeholder-glow .placeholder { animation: shimmer 2s infinite linear; background: linear-gradient( 90deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100% ); background-size: 1000px 100%; } /* Анимация модальных окон */ .modal.fade.show .modal-dialog { animation: modalSlideIn 0.3s ease-out; } @keyframes modalSlideIn { from { opacity: 0; transform: scale(0.95) translateY(-20px); } to { opacity: 1; transform: scale(1) translateY(0); } } /* Плавный скролл */ html { scroll-behavior: smooth; } /* Улучшенные focus rings для доступности */ *:focus-visible { outline: 2px solid var(--tblr-primary, #206bc4); outline-offset: 2px; border-radius: 3px; } button:focus-visible, .btn:focus-visible { box-shadow: 0 0 0 3px rgba(32, 107, 196, 0.3); } /* Skip link для клавиатурных пользователей */ .skip-link { position: absolute; top: -40px; left: 0; background: var(--tblr-primary, #206bc4); color: white; padding: 8px 16px; text-decoration: none; z-index: 10000; border-radius: 0 0 4px 0; transition: top 0.2s; } .skip-link:focus { top: 0; } /* Hover эффект для строк таблицы с focus */ .table tr:focus-within { background-color: rgba(32, 107, 196, 0.05); } /* Pulse для кнопок загрузки */ .btn.loading { position: relative; } .btn.loading::before { content: ''; position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; border-radius: inherit; background: rgba(255, 255, 255, 0.2); transform: translate(-50%, -50%); animation: pulse-button 1.5s infinite; } @keyframes pulse-button { 0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } } /* Анимация badge появления */ .badge.animate { animation: badgePop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); } @keyframes badgePop { 0% { transform: scale(0); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } } /* ===== GraphView / ReactFlow custom styling ===== */ /* Плавные, аккуратные линии графа */ .react-flow__edge-path { stroke-linecap: round; transition: stroke 0.15s ease, stroke-width 0.15s ease, filter 0.15s ease; } /* Лёгкий ховер по связи, без агрессивной анимации */ .react-flow__edge:hover .react-flow__edge-path { stroke-width: 3.2px; filter: drop-shadow(0 0 4px rgba(15, 23, 42, 0.25)); } /* Базовая прозрачность для всех связей, чтобы граф не выглядел «забитым» */ .react-flow__edge .react-flow__edge-path { stroke-opacity: 0.9; } /* Подписи к рёбрам: не обрезаем, делаем «таблетку» поверх линий */ .react-flow__edge-textwrapper { overflow: visible; } .react-flow__edge-textbg { fill: #ffffff; stroke: #e5e7eb; stroke-width: 1; rx: 999px; ry: 999px; } .react-flow__edge-text { font-size: 11px; font-weight: 500; fill: #0f172a; white-space: nowrap; } /* Небольшие отличия по типу туннеля (на будущее, сейчас основное зашито в JS) */ .react-flow__edge.edge-tunnel-gre .react-flow__edge-path { /* GRE — базовый синий, уже задан в JS, здесь только подчёркиваем плавность */ } .react-flow__edge.edge-tunnel-ipsec .react-flow__edge-path { stroke-dasharray: 6 4; } .react-flow__edge.edge-tunnel-wireguard .react-flow__edge-path { stroke-width: 3px; } .react-flow__edge.edge-tunnel-openvpn .react-flow__edge-path { stroke-dasharray: 3 3; }