/**
 * Signal UI — Unified Design System
 * Consolidated framework for python-switcher
 * Version: 2.0
 */

/* --- 1. GLOBAL & THEME --- */
body,
.content-wrapper {
    background-color: #f4f7fa;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dark-mode body,
.dark-mode .content-wrapper {
    background-color: #0d1117;
}

/* Global Button & Interactive Elements Focus Reset */
*:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

button:focus,
button:active,
.btn:focus,
.btn:active,
.sui-btn-back:focus,
.sui-btn-back:active,
.sui-btn-save:focus,
.sui-btn-save:active,
.sui-btn-filter:focus,
.sui-btn-filter:active,
.btn-status-filter:focus,
.btn-status-filter:active,
a:focus,
a:active,
[role="button"]:focus,
[role="button"]:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Page Header & Typography — Standard Scaling */
.content-header h1 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.dark-mode .content-header h1 {
    color: #ffffff;
}

/* --- 2. TYPOGRAPHY & LABELS --- */
.sui-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.2rem;
    letter-spacing: -0.3px;
    font-family: 'Outfit', sans-serif;
}

.dark-mode .sui-title {
    color: #ffffff;
}

.sui-subtitle {
    font-size: 0.82rem;
    color: #6c757d;
    margin-bottom: 0;
    font-family: 'Outfit', sans-serif !important;
}

.sui-header {
    padding-top: 0.75rem !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 0.75rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

@media (min-width: 576px) {
    .sui-header {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

.dark-mode .sui-subtitle {
    color: #94a3b8;
}

.sui-label {
    font-weight: 500;
    color: #475569;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: block;
}

.dark-mode .sui-label {
    color: #94a3b8;
}

.text-warning {
    color: #ff7400 !important;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* --- 3. NAVIGATION --- */

/* Pill Tabs (Outline Style) */
.nav-pills-sui {
    gap: 2px !important;
    padding: 2px !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: blur(8px);
}

.dark-mode .nav-pills-sui {
    background: rgba(48, 54, 61, 0.4) !important;
    border: 1px solid #30363d !important;
}

.nav-pills-sui .nav-link {
    border-radius: 10px !important;
    padding: 0.15rem 0.75rem !important;
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569 !important;
    border: 1px solid transparent !important;
    outline: none !important;
    box-shadow: none !important;
    transition: all 0.2s ease;
    background: transparent !important;
}

.dark-mode .nav-pills-sui .nav-link {
    color: #8b949e !important;
}

.nav-pills-sui .nav-link:hover {
    color: #334155 !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

.dark-mode .nav-pills-sui .nav-link:hover {
    color: #2dd4bf !important;
    background: rgba(45, 212, 191, 0.05) !important;
}

.nav-pills-sui .nav-link:focus,
.nav-pills-sui .nav-link:active {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

.nav-pills-sui .nav-link.active {
    background-color: #dee2e6 !important;
    color: #1a1a1a !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}

.dark-mode .nav-pills-sui .nav-link.active {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

/* Tabs (Underline Style) */
.nav-tabs-sui {
    border-bottom: 1px solid #e2e8f0;
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
}

.nav-tabs-sui .nav-link {
    color: #64748b;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    margin-bottom: -1px;
    transition: all 0.2s ease;
}

.nav-tabs-sui .nav-link:hover {
    color: #0f172a;
    border-bottom-color: #cbd5e1;
}

.nav-tabs-sui .nav-link.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background-color: transparent;
}

/* --- 4. FORMS & INPUTS (UNIFIED SIGNAL UI) --- */
.form-control,
.form-control-sui {
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0 12px !important;
    width: 100% !important;
    color: #1e293b !important;
    background-color: #ffffff !important;
    font-family: 'Outfit', 'Inter', sans-serif !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color 0.2s ease, background-color 0.2s ease !important;
}

input.form-control,
input.form-control-sui,
select.form-control,
select.form-control-sui {
    min-height: 38px !important;
    height: 38px !important;
    line-height: 36px !important;
}

textarea.form-control,
textarea.form-control-sui,
textarea {
    min-height: 125px;
    line-height: 1.5;
    padding: 10px 12px;
    resize: vertical;
}

.sui-form-hint,
.form-text.text-muted,
.sui-help-text {
    font-size: 0.78rem !important;
    color: #64748b !important;
    margin-top: 4px !important;
    margin-bottom: 0 !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    display: block;
}

.dark-mode .sui-form-hint,
.dark-mode .form-text.text-muted,
.dark-mode .sui-help-text {
    color: #94a3b8 !important;
}

.form-control:hover,
.form-control-sui:hover,
input.form-control-sui:hover,
select.form-control-sui:hover {
    border-color: #cbd5e1 !important;
}

.form-control:focus,
.form-control-sui:focus,
input.form-control-sui:focus,
select.form-control-sui:focus {
    border-color: #3b82f6 !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
    outline: none !important;
}

.dark-mode .form-control,
.dark-mode .form-control-sui,
.dark-mode input.form-control-sui,
.dark-mode select.form-control-sui {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    color: #f0f6fc !important;
}

.dark-mode .form-control:focus,
.dark-mode .form-control-sui:focus,
.dark-mode input.form-control-sui:focus,
.dark-mode select.form-control-sui:focus {
    border-color: #60a5fa !important;
    background-color: #0d1117 !important;
}

/* Search Bar & Input Groups with Icon (Rounded Signal UI) */
.search-group-sui,
.input-group-sui {
    position: relative;
    width: 100%;
    margin-top: 0;
    display: flex !important;
    align-items: center !important;
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    height: 38px !important;
    overflow: hidden !important;
    padding: 0 !important;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.search-group-sui:hover,
.input-group-sui:hover {
    border-color: #94a3b8 !important;
}

.dark-mode .search-group-sui,
.dark-mode .input-group-sui {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
}

.search-group-sui:focus-within,
.input-group-sui:focus-within {
    border-color: #3b82f6 !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
}

.search-group-sui .form-control,
.search-group-sui .form-control-sui,
.input-group-sui .form-control,
.input-group-sui .form-control-sui,
.input-group-sui input {
    flex: 1 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    height: 100% !important;
    padding: 0 8px !important;
    font-size: 0.875rem !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 400 !important;
    box-shadow: none !important;
    outline: none !important;
    color: #1e293b;
    margin: 0 !important;
}

.search-group-sui .form-control:focus,
.search-group-sui .form-control-sui:focus,
.input-group-sui .form-control:focus,
.input-group-sui .form-control-sui:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}

.dark-mode .search-group-sui .form-control,
.dark-mode .search-group-sui .form-control-sui,
.dark-mode .input-group-sui .form-control,
.dark-mode .input-group-sui .form-control-sui {
    color: #f0f6fc !important;
}

.search-group-sui .search-icon,
.input-group-sui .input-icon,
.input-group-sui .search-icon {
    width: 28px !important;
    height: 28px !important;
    margin-left: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #94a3b8;
    transition: all 0.2s ease;
    border-radius: 6px !important;
    flex-shrink: 0;
}

.search-group-sui:focus-within .search-icon,
.input-group-sui:focus-within .input-icon,
.input-group-sui:focus-within .search-icon {
    color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.12) !important;
}

.search-clear-btn {
    width: 34px !important;
    height: 34px !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    color: #94a3b8;
    transition: color 0.1s;
}

.search-clear-btn:hover {
    color: #ef4444;
}

/* Select2 Signal UI Styles */
.select2-container--bootstrap4 .select2-selection {
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #fff !important;
    min-height: 38px !important;
    padding: 0 !important;
    transition: all 0.2s;
    font-family: 'Outfit', 'Inter', sans-serif !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--bootstrap4 .select2-selection--single {
    height: 38px !important;
}

.dark-mode .select2-container--bootstrap4 .select2-selection {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection {
    border-color: #3b82f6 !important;
    background-color: #fff !important;
    box-shadow: none !important;
}

/* --- FLATPICKR SIGNAL UI THEME --- */
.flatpickr-calendar {
    width: 324px !important;
    max-width: calc(100vw - 32px) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #e2e8f0 !important;
    font-family: 'Outfit', 'Inter', sans-serif !important;
    background: #ffffff !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
}

.flatpickr-calendar * {
    box-sizing: border-box !important;
}

.flatpickr-months {
    padding-bottom: 6px !important;
    position: relative;
    display: flex !important;
    align-items: center !important;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month {
    background: transparent !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

.flatpickr-current-month .cur-month {
    font-weight: 600 !important;
}

.flatpickr-innerContainer {
    width: 100% !important;
    display: block !important;
}

.flatpickr-rContainer {
    width: 100% !important;
    display: block !important;
}

.flatpickr-weekdays {
    width: 100% !important;
    display: flex !important;
    margin-bottom: 6px !important;
}

.flatpickr-weekdaycontainer {
    width: 100% !important;
    display: flex !important;
}

span.flatpickr-weekday {
    color: #94a3b8 !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    flex: 1 0 14.2857% !important;
    width: 14.2857% !important;
    max-width: 14.2857% !important;
    text-align: center !important;
}

.flatpickr-days {
    width: 100% !important;
    display: block !important;
}

.dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    padding: 0 !important;
}

.flatpickr-day {
    border-radius: 8px !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    height: 36px !important;
    line-height: 36px !important;
    flex: 0 0 calc(14.2857% - 4px) !important;
    width: calc(14.2857% - 4px) !important;
    max-width: calc(14.2857% - 4px) !important;
    margin: 2px !important;
    text-align: center !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #cbd5e1 !important;
}

.flatpickr-day.today {
    border-radius: 8px !important;
    border: 1.5px solid #3b82f6 !important;
    color: #2563eb !important;
    font-weight: 600 !important;
    background: transparent !important;
}

.flatpickr-day.inRange,
.flatpickr-day:hover,
.flatpickr-day.inRange:hover,
.flatpickr-day.today:hover {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: transparent !important;
    color: #2563eb !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.startRange,
.flatpickr-day.selected.endRange,
.flatpickr-day.startRange.startRange,
.flatpickr-day.endRange.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

.flatpickr-day.inRange {
    border-radius: 8px !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* Повне відключення паразитичних псевдо-тіней Flatpickr */
.flatpickr-day,
.flatpickr-day:hover,
.flatpickr-day.inRange,
.flatpickr-day.today,
.flatpickr-day.today:hover,
.flatpickr-day.today:focus,
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* Кнопка "Очистити" у Flatpickr */
.flatpickr-clear-btn,
.flatpickr-calendar button {
    display: block !important;
    width: 100% !important;
    margin-top: 8px !important;
    padding: 7px 0 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    border-radius: 8px !important;
    color: #64748b !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    font-family: 'Outfit', 'Inter', sans-serif !important;
    cursor: pointer !important;
    text-align: center !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: all 0.2s ease !important;
}

.flatpickr-clear-btn:hover,
.flatpickr-calendar button:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    outline: none !important;
}

.flatpickr-clear-btn:focus,
.flatpickr-clear-btn:active,
.flatpickr-calendar button:focus,
.flatpickr-calendar button:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
}

.dark-mode .flatpickr-calendar {
    background: #0d1117 !important;
    border-color: #30363d !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4) !important;
}

.dark-mode .flatpickr-months .flatpickr-month,
.dark-mode .flatpickr-current-month,
.dark-mode .flatpickr-day {
    color: #f0f6fc !important;
}

.dark-mode .flatpickr-day.prevMonthDay,
.dark-mode .flatpickr-day.nextMonthDay,
.dark-mode .flatpickr-day.flatpickr-disabled {
    color: #484f58 !important;
}

.dark-mode .flatpickr-day.inRange {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
}

/* Universal Signal UI Placeholder Styling */
::placeholder,
.form-control::placeholder,
.form-control-sui::placeholder,
input.form-control-sui::placeholder,
.search-group-sui input::placeholder,
.input-group-sui input::placeholder,
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder,
.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field::placeholder {
    color: #64748b !important;
    font-size: 0.875rem !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}

.dark-mode ::placeholder,
.dark-mode .form-control::placeholder,
.dark-mode .form-control-sui::placeholder,
.dark-mode .select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder,
.dark-mode .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field::placeholder {
    color: #64748b !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    color: #1e293b !important;
    line-height: 36px !important;
    padding-left: 12px !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    font-family: 'Outfit', sans-serif !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    position: absolute !important;
    top: 1px !important;
    right: 10px !important;
    width: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
    border-color: #94a3b8 transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
    margin-top: -2px !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__clear {
    color: #94a3b8 !important;
    font-size: 1.1rem !important;
    position: absolute !important;
    right: 2.2rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    line-height: 1 !important;
    font-weight: 300 !important;
    transition: color 0.2s;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__clear:hover {
    color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.select2-container--bootstrap4 .select2-results__option {
    font-size: 0.875rem !important;
    padding: 8px 14px !important;
    font-family: 'Outfit', sans-serif !important;
    color: #334155 !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* Наведення курсору на звичайний пункт */
.select2-container--bootstrap4 .select2-results__option--highlighted {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Справді вибрані пункти завжди залишаються виділеними */
.select2-container--bootstrap4 .select2-results__option:has(.is-selected),
.select2-container--bootstrap4 .select2-results__option:has(.sui-select2-row.is-selected) {
    background-color: #eff6ff !important;
    color: #2563eb !important;
    font-weight: 500 !important;
}

/* Наведення курсору на вибраний пункт */
.select2-container--bootstrap4 .select2-results__option--highlighted:has(.is-selected),
.select2-container--bootstrap4 .select2-results__option--highlighted:has(.sui-select2-row.is-selected) {
    background-color: #dbeafe !important;
    color: #1d4ed8 !important;
}

.dark-mode .select2-container--bootstrap4 .select2-results__option {
    color: #cbd5e1 !important;
}

.dark-mode .select2-container--bootstrap4 .select2-results__option--highlighted {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

.dark-mode .select2-container--bootstrap4 .select2-results__option:has(.is-selected) {
    background-color: rgba(59, 130, 246, 0.18) !important;
    color: #60a5fa !important;
}

.dark-mode .select2-container--bootstrap4 .select2-results__option--highlighted:has(.is-selected) {
    background-color: rgba(59, 130, 246, 0.28) !important;
    color: #93c5fd !important;
}

.dark-mode .select2-container--bootstrap4 .select2-selection__rendered {
    color: #c9d1d9 !important;
}

.select2-container--bootstrap4 .select2-selection--multiple {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 38px !important;
    padding: 2px 6px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    border-radius: 10px !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field {
    color: #1e293b !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    font-family: 'Outfit', sans-serif !important;
    padding-left: 6px !important;
    margin: 0 !important;
    height: 32px !important;
    line-height: 32px !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    background-color: #eff6ff !important;
    border: 1px solid #dbeafe !important;
    border-radius: 6px !important;
    padding: 2px 4px 2px 10px !important;
    color: #2563eb !important;
    font-weight: 500 !important;
    font-size: 0.78rem !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin: 2px 4px 2px 0 !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
    order: 2 !important;
    color: #3b82f6 !important;
    border: none !important;
    margin-left: 6px !important;
    margin-right: 0 !important;
    padding: 0 !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    border-radius: 4px !important;
}

.dark-mode .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    background-color: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #60a5fa !important;
}

.dark-mode .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
    color: #60a5fa !important;
}

.dark-mode .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
}

/* --- 5. BUTTONS --- */

.sui-btn {
    border-radius: 10px !important;
    font-weight: 400 !important;
    transition: all 0.2s !important;
    padding: 0.5rem 1.25rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Header Action Buttons */
.btn-sui-header {
    background-color: transparent !important;
    color: #475569 !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 0.2rem 0.8rem !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    font-family: 'Outfit', sans-serif !important;
    transition: all 0.25s ease !important;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
}

.dark-mode .btn-sui-header {
    background-color: rgba(45, 212, 191, 0.05) !important;
    border-color: #2dd4bf !important;
    color: #2dd4bf !important;
}

.btn-sui-header:hover {
    background-color: rgba(71, 85, 105, 0.07) !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}

.dark-mode .btn-sui-header:hover {
    background-color: #2dd4bf !important;
    color: #010409 !important;
}

/* Unified Action Buttons (SUI Style) */
.sui-btn-header,
.sui-btn-back,
.sui-btn-save,
.sui-btn-add,
.sui-btn-danger,
.sui-btn-magic,
.sui-btn-edit,
.sui-btn-add-lg {
    border-radius: 10px !important;
    font-weight: 400 !important;
    padding: 0 1.1rem !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease-in-out !important;
    font-size: 0.875rem !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer;
    white-space: nowrap !important;
    font-family: 'Outfit', sans-serif !important;
    outline: none !important;
    box-shadow: none !important;
    line-height: 34px !important;
}

.sui-btn-icon {
    width: 34px !important;
    padding: 0 !important;
}

.sui-btn-header:focus,
.sui-btn-back:focus,
.sui-btn-save:focus,
.sui-btn-add:focus,
.sui-btn-danger:focus,
.sui-btn-edit:focus,
.sui-btn-add-lg:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Modifier: Back (ghost gray) */
.sui-btn-back,
a.sui-btn-back {
    color: #64748b !important;
    background: rgba(100, 116, 139, 0.08) !important;
    border: 1.5px solid rgba(100, 116, 139, 0.3) !important;
}

.sui-btn-back:hover,
a.sui-btn-back:hover,
button.sui-btn-back:hover {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

.sui-btn-back:hover i,
a.sui-btn-back:hover i,
button.sui-btn-back:hover i {
    color: #ffffff !important;
}

/* Modifier: Save (ghost blue) */
.sui-btn-save,
button.sui-btn-save {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.08) !important;
    border: 1.5px solid rgba(59, 130, 246, 0.3) !important;
}

.sui-btn-save:hover,
button.sui-btn-save:hover,
a.sui-btn-save:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

.sui-btn-save:hover i,
button.sui-btn-save:hover i,
a.sui-btn-save:hover i {
    color: #ffffff !important;
}

/* Modifier: Add (ghost green) */
.sui-btn-add,
a.sui-btn-add,
.sui-btn-add-lg {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.08) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.3) !important;
}

.sui-btn-add:hover,
a.sui-btn-add:hover,
.sui-btn-add-lg:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

/* Modifier: Danger (ghost red) */
.sui-btn-danger,
button.sui-btn-danger {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.3) !important;
}

.sui-btn-danger:hover,
button.sui-btn-danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

/* Modifier: Magic (ghost purple) */
.sui-btn-magic,
button.sui-btn-magic,
a.sui-btn-magic {
    color: #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.08) !important;
    border: 1.5px solid rgba(139, 92, 246, 0.3) !important;
}

.sui-btn-magic:hover,
button.sui-btn-magic:hover,
a.sui-btn-magic:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

/* Status Filter Buttons (Pills) */
.btn-status-filter,
.btn-group-toggle .btn.btn-status-filter {
    border-radius: 10px !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

.btn-status-filter:focus,
.btn-status-filter.focus,
.btn-status-filter:active,
.btn-group-toggle .btn.btn-status-filter:focus,
.btn-group-toggle .btn.btn-status-filter.focus {
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

/* Hovering states (градієнтний стиль у відповідних кольорах із білим текстом) */
.btn-status-filter.active-all:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

.btn-status-filter.active-online:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

.btn-status-filter.active-offline:hover,
.btn-status-filter.active-critical:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

.btn-status-filter.active-inactive:hover {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

.btn-status-filter.active-problem:hover,
.btn-status-filter.active-warning:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

.btn-status-filter.active-purple:hover,
.btn-status-filter.active-magic:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

/* Active states (strictly color only - no shift, no border jump) */
.btn-status-filter.active,
.btn-group-toggle .btn.btn-status-filter.active {
    box-shadow: none !important;
    transform: none !important;
}

.btn-status-filter.active-all.active {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #2563eb !important;
    font-weight: 500 !important;
}

.btn-status-filter.active-online.active {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #059669 !important;
    font-weight: 500 !important;
}

.btn-status-filter.active-offline.active,
.btn-status-filter.active-critical.active {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #dc2626 !important;
    font-weight: 500 !important;
}

.btn-status-filter.active-inactive.active {
    background: rgba(100, 116, 139, 0.08) !important;
    border-color: rgba(100, 116, 139, 0.4) !important;
    color: #475569 !important;
    font-weight: 500 !important;
}

.btn-status-filter.active-problem.active,
.btn-status-filter.active-warning.active {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #d97706 !important;
    font-weight: 500 !important;
}

.btn-status-filter.active-purple.active,
.btn-status-filter.active-magic.active {
    background: rgba(139, 92, 246, 0.08) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    color: #7c3aed !important;
    font-weight: 500 !important;
}

.dark-mode .btn-status-filter {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    color: #8b949e !important;
}

.dark-mode .btn-status-filter:not(.active):hover {
    background-color: #161b22 !important;
    border-color: #484f58 !important;
    color: #f0f6fc !important;
}

.dark-mode .btn-status-filter.active-online.active {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #34d399 !important;
}

.dark-mode .btn-status-filter.active-offline.active,
.dark-mode .btn-status-filter.active-critical.active {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}

.dark-mode .btn-status-filter.active-all.active {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #60a5fa !important;
}

.sui-btn-add:active,
.sui-btn-header:active,
.sui-btn-save:active,
.sui-btn-back:active,
.sui-btn-danger:active,
.sui-btn-edit:active {
    box-shadow: none !important;
}

.sui-btn-icon-only {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sui-btn-sm.sui-btn-icon-only {
    width: 34px !important;
    height: 34px !important;
}

button.sui-btn-icon-only,
a.sui-btn-icon-only {
    padding: 0 !important;
}

/* Large ADD Button (for Empty States) */
.sui-btn-add-lg {
    padding: 0.85rem 2.5rem !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
    margin-top: 1.5rem !important;
    display: inline-flex !important;
}

/* Compact version for filters/modals */
.sui-btn-sm {
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    border-radius: 10px !important;
}

/* --- Signal UI Outline Variants (for Headers) --- */
.sui-btn-outline,
[class*="sui-btn-outline-"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease !important;
    border: 1.5px solid transparent !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1.2 !important;
}

.sui-btn-outline-green {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
}

.sui-btn-outline-green:hover,
.sui-btn-outline-green:focus,
.sui-btn-outline-green:active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
}


/* Compact square icon variant — same green style as sui-btn-outline-green, height matches input fields (38px) */
.sui-input-btn-green {
    height: 38px !important;
    width: 44px !important;
    border-radius: 10px !important;
    border: 1.5px solid transparent !important;
    background: rgba(16, 185, 129, 0.10) !important;
    color: #10b981 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
.sui-input-btn-green:hover,
.sui-input-btn-green:focus,
.sui-input-btn-green:active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    text-decoration: none !important;
    outline: none !important;
}
.sui-input-btn-green i {
    font-size: 1.1rem !important;
}

.sui-btn-outline-blue {
    background: rgba(59, 130, 246, 0.08) !important;
    color: #3b82f6 !important;
}

.sui-btn-outline-blue:hover,
.sui-btn-outline-blue:focus,
.sui-btn-outline-blue:active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
}

.sui-btn-outline-red {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
}

.sui-btn-outline-red:hover,
.sui-btn-outline-red:focus,
.sui-btn-outline-red:active {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
}

.sui-btn-outline-gray:hover,
.sui-btn-outline-gray:focus,
.sui-btn-outline-gray:active {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: #ffffff !important;
}

/* Table Tag Buttons (XS sizing for cells) */
.sui-tag-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 3px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    border: 1.2px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #64748b !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.4 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.sui-tag-btn:hover {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.04) !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1) !important;
}

.dark-mode .sui-tag-btn {
    background: rgba(48, 54, 61, 0.4) !important;
    border-color: #30363d !important;
    color: #8b949e !important;
}

.dark-mode .sui-tag-btn:hover {
    border-color: #2dd4bf !important;
    color: #2dd4bf !important;
    background: rgba(45, 212, 191, 0.05) !important;
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.1) !important;
}

/* Ghost variant of tag buttons (Diag, Log) */
.sui-tag-btn-ghost {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2px 6px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: #64748b !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.05em;
    line-height: 1.2 !important;
    box-shadow: none !important;
}

.sui-tag-btn-ghost:hover {
    background: rgba(100, 116, 139, 0.1) !important;
    color: #3b82f6 !important;
}

.dark-mode .sui-tag-btn-ghost {
    color: #8b949e !important;
}

.dark-mode .sui-tag-btn-ghost:hover {
    background: rgba(139, 148, 158, 0.1) !important;
    color: #58a6ff !important;
}


/* Section Headers (in Cards) */
.sui-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

/* Global Card Titles Transformation */
.sui-card .card-title,
.card-sui .card-title {
    text-transform: none !important;
    letter-spacing: 0.2px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
}

.sui-section-header h5 {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0;
    font-size: 1rem;
}

/*  Labels */
.sui-label {
    font-weight: 500;
    color: #475569;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.filter-group-label {
    font-size: 0.8125rem;
    font-weight: 400 !important;
    text-transform: none;
    letter-spacing: normal;
    color: #94a3b8;
    display: block;
    margin-bottom: 6px;
}

/* Modern Form Controls */
.form-control,
input.form-control,
select.form-control {
    height: auto;
}

textarea.form-control {
    min-height: 120px !important;
    resize: vertical !important;
    height: auto;
}

.form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: none !important;
    outline: none !important;
}

/*  Interaction Cards (Specialization/Features) */
.specialization-card {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
}

.specialization-card:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.specialization-card.active {
    border-color: #3b82f6;
    background-color: #eff6ff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.specialization-card .icon-box {
    width: 44px;
    height: 44px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: #64748b;
    transition: all 0.2s;
    font-size: 1.2rem;
}

.specialization-card.active .icon-box {
    background-color: #3b82f6;
    color: #fff;
}

.specialization-card .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.specialization-card .card-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Check Badge for Cards */
.check-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1rem;
}

.check-badge .active-icon {
    color: #3b82f6;
    display: none;
}

.check-badge .inactive-icon {
    color: #e2e8f0;
}

.specialization-card.active .check-badge .active-icon {
    display: block;
}

.specialization-card.active .check-badge .inactive-icon {
    display: none;
}

/* Hidden elements */
.hidden-checkbox {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
    pointer-events: none;
}

/* Action Buttons (Table Rows) */
.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
    font-size: 0.85rem;
    text-decoration: none !important;
    background: transparent;
    color: #64748b;
    outline: none !important;
    box-shadow: none !important;
}

.action-btn:focus,
.action-btn:active {
    outline: none !important;
    box-shadow: none !important;
}

.action-btn:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

/* 2-Line Cell Content Standard */
.sui-cell-2line {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.25;
}

.sui-cell-primary {
    color: #1e293b !important;
    font-weight: 500 !important;
}

.sui-cell-secondary {
    color: #64748b !important;
    font-size: 0.75rem !important;
    font-weight: 400 !important;
}

.action-btn-edit {
    color: #64748b;
    /* Базовий сірий */
    background: transparent;
}

.action-btn-edit:hover {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

.action-btn-grey {
    color: #94a3b8;
    background: transparent;
}

.action-btn-grey:hover {
    color: #64748b !important;
    background: rgba(148, 163, 184, 0.1) !important;
}

.action-btn-delete {
    color: #ef4444;
    background: transparent;
}

.action-btn-delete:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.action-btn-view {
    color: #3b82f6;
    background: transparent;
}

.action-btn-view:hover {
    color: #2563eb !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

.action-btn-primary {
    color: #2563eb;
    background: #eff6ff;
}

.action-btn-primary:hover {
    color: #1d4ed8 !important;
    background: #dbeafe !important;
}

/* 7. SEGMENTED CONTROL & ACTION PILLS */

/* Action Pills for Device Management */
.sui-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: none;
    outline: none !important;
    background: none;
    line-height: 1.2;
}

.sui-action-pill-sm {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    gap: 6px !important;
    border-radius: 8px !important;
}

button.sui-action-pill {
    cursor: pointer;
    border: 1.5px solid transparent;
}

.sui-action-pill i {
    font-size: 1.1rem;
}

.sui-action-pill-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.sui-action-pill-danger:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #ffffff !important;
}

.sui-action-pill-success {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
}

.sui-action-pill-success:hover {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
}

.sui-action-pill-blue {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
}

.sui-action-pill-blue:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #ffffff !important;
}

.sui-action-pill-gray {
    background: rgba(100, 116, 139, 0.08);
    color: #64748b;
}

.sui-action-pill-gray:hover {
    background: linear-gradient(135deg, #64748b, #475569) !important;
    color: #ffffff !important;
}

.sui-action-pill-orange {
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
}

.sui-action-pill-orange:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
}

.sui-action-pill-purple {
    background: rgba(139, 92, 246, 0.08);
    color: #8b5cf6;
}

.sui-action-pill-purple:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    color: #ffffff !important;
}

/* Vertical Pill Variant */
.sui-action-pill-vertical {
    flex-direction: column !important;
    padding: 8px 4px !important;
    min-width: 86px !important;
    gap: 4px !important;
    text-align: center;
    justify-content: center;
}

.sui-action-pill-vertical i {
    font-size: 1.15rem !important;
    margin-right: 0 !important;
    margin-bottom: 2px;
}

.sui-action-pill-vertical span {
    font-size: 0.78rem;
    font-weight: 500;
}

/* Identifiers Style */
.port-id-cell,
.sui-id-badge {
    font-weight: 700 !important;
    color: #1e293b !important;
    font-family: 'Outfit', 'Inter', sans-serif !important;
}

/* --- 6. TABLES & CARDS --- */

.sui-card,
.card-sui,
.card {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.07), 0 4px 12px -3px rgba(0, 0, 0, 0.03) !important;
    margin-bottom: 1rem;
    overflow: hidden;
}

.dark-mode .sui-card,
.dark-mode .card-sui,
.dark-mode .card {
    background: rgba(22, 27, 34, 0.85) !important;
    border: 1px solid rgba(48, 54, 61, 0.8) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}
.card-header,
.card>.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 0.65rem 1.25rem !important;
    border-radius: 12px 12px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.card-header .card-tools {
    margin-left: auto !important;
    margin-right: -0.25rem !important;
    display: flex !important;
    align-items: center !important;
}

.card-title,
.card>.card-header .card-title {
    text-transform: none !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    color: #475569 !important;
    letter-spacing: 0.2px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.dark-mode .card-header {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

.dark-mode .card-title {
    color: #94a3b8 !important;
}

/* group-card & group-header — DevOps  Finish */
.sui-group-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.7);
    margin-bottom: 0.85rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.sui-group-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    border-color: rgba(14, 165, 233, 0.3);
}

.sui-group-header {
    padding: 0.85rem 1.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s;
}

.sui-group-header:hover {
    background: rgba(248, 250, 252, 0.8);
}

.sui-group-header .fa-chevron-down {
    transition: transform 0.3s;
}

.sui-group-header.collapsed .fa-chevron-down {
    transform: rotate(-90deg);
}

.sui-group-body {
    padding: 0 0.5rem 0.5rem 0.5rem;
    /* М'який внутрішній відступ для таблиці */
    background: #ffffff;
}

/* table & tables — Refined Precision */
.card-body.p-0 {
    width: 100% !important;
}

.sui-table-container {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    position: relative;
    margin-bottom: 1rem;
}

.sui-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100% !important;
    display: table !important;
    table-layout: auto !important;
    font-size: 0.85rem;
}

.sui-table-scrollable {
    min-width: 1200px !important; /* Гарантована ширина для скролу в великих таблицях */
}


.sui-table thead th {
    background-color: rgba(248, 250, 252, 0.85) !important;
    color: #475569 !important;
    font-weight: 700;
    text-transform: none;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    padding: 0.75rem 0.65rem;
    border-bottom: 2px solid #e2e8f0 !important;
    border-top: none;
    text-align: left;
    vertical-align: middle;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.sui-table thead th:last-child {
    cursor: default;
}

.sui-table thead th.text-center {
    text-align: center !important;
}

.sui-table thead th.text-right {
    text-align: right !important;
}

/* Дворядковий заголовок Signal UI */
.th-title {
    display: block;
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.25;
    color: #334155;
}

.th-subtitle {
    display: block;
    font-size: 0.73rem;
    font-weight: 400;
    color: #94a3b8;
    line-height: 1.2;
    margin-top: 2px;
    text-transform: none;
}

/* Гарантуємо однаковий колір та вирівнювання для посилань сортування */
.sui-table thead th a,
.sui-table thead th a.ajax-filter {
    color: #475569 !important;
    text-decoration: none !important;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    transition: color 0.2s;
}

.sui-table thead th.text-center a,
.sui-table thead th.text-center a.ajax-filter {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.sui-table thead th.text-right a,
.sui-table thead th.text-right a.ajax-filter {
    align-items: flex-end !important;
    justify-content: flex-end !important;
    text-align: right !important;
}

/* Якщо у посиланні є лише один рядок (без .th-subtitle), тримаємо іконку поруч із заголовком */
.sui-table thead th a:not(:has(.th-subtitle)) {
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

/* Ховери для заголовків та посилань */
.sui-table thead th:hover,
.sui-table thead th:hover a,
.sui-table thead th a:hover {
    color: #0f172a !important;
    background-color: rgba(241, 245, 249, 0.9) !important;
}

/* Зменшені трикутнички / стрілочки сортування */
.sui-table thead th i,
.sui-table thead th a i {
    font-size: 0.68rem !important;
    vertical-align: middle;
    margin-left: 3px;
    opacity: 0.75;
}

.dark-mode .sui-table thead th {
    background-color: rgba(22, 27, 34, 0.6) !important;
    border-bottom: 2px solid #30363d !important;
    color: #c9d1d9 !important;
}

.dark-mode .sui-table thead th a {
    color: #c9d1d9 !important;
}

.sort-th {
    cursor: pointer;
}

.sort-th:hover {
    background-color: rgba(59, 130, 246, 0.04) !important;
}

.sort-th i {
    font-size: 0.65rem;
    transition: all 0.2s;
}

.sui-table tbody tr {
    transition: background-color 0.2s;
}

.sui-table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.04) !important;
}

.sui-table td {
    padding: 0.5rem 0.5rem !important;
    vertical-align: middle !important;
    border-top: 1px solid #f1f5f9 !important;
    font-size: 0.875rem;
}

.dark-mode .sui-table td {
    border-top-color: #30363d !important;
    color: #c9d1d9 !important;
}

.sui-table td:first-child {
    padding-left: 0.5rem !important;
}

/* Redundant sort pseudo-elements removed to prevent double icons */

/* --- 7. BADGES & STATUS INDICATORS --- */

.sui-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sui-tag-blue-soft { background: #eff6ff; color: #3b82f6; border-color: #dbeafe; }
.sui-tag-success-soft, .sui-tag-green-soft { background: #ecfdf5; color: #10b981; border-color: #d1fae5; }
.sui-tag-warning-soft, .sui-tag-yellow-soft { background: #fffbeb; color: #d97706; border-color: #fef3c7; }
.sui-tag-danger-soft, .sui-tag-red-soft { background: #fef2f2; color: #ef4444; border-color: #fee2e2; }
.sui-tag-gray-soft { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }

.dark-mode .sui-tag-blue-soft { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border-color: rgba(59, 130, 246, 0.2); }
.dark-mode .sui-tag-green-soft { background: rgba(16, 185, 129, 0.1); color: #34d399; border-color: rgba(16, 185, 129, 0.2); }
.dark-mode .sui-tag-yellow-soft { background: rgba(217, 119, 6, 0.1); color: #fbbf24; border-color: rgba(217, 119, 6, 0.2); }
.dark-mode .sui-tag-red-soft { background: rgba(239, 68, 68, 0.1); color: #f87171; border-color: rgba(239, 68, 68, 0.2); }
.dark-mode .sui-tag-gray-soft { background: rgba(148, 163, 184, 0.1); color: #94a3b8; border-color: rgba(148, 163, 184, 0.2); }

.sui-stat-badge {
    display: flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1.5px solid transparent;
}
.sui-stat-badge .stat-divider { opacity: 0.4; margin: 0 3px; }

.sui-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.sui-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.sui-modal-close:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

.bg-success-soft { background-color: rgba(16, 185, 129, 0.1) !important; color: #10b981 !important; }
.bg-warning-soft { background-color: rgba(245, 158, 11, 0.1) !important; color: #d97706 !important; }
.bg-danger-soft { background-color: rgba(239, 68, 68, 0.1) !important; color: #ef4444 !important; }
.bg-primary-soft { background-color: rgba(59, 130, 246, 0.1) !important; color: #3b82f6 !important; }
.bg-info-soft { background-color: rgba(6, 182, 212, 0.1) !important; color: #0891b2 !important; }

.sig-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.sig-good {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
    border: 1.5px solid #10b981 !important;
}

.sig-warning {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #f59e0b !important;
    border: 1.5px solid #f59e0b !important;
}

.sig-critical {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border: 1.5px solid #ef4444 !important;
}

.badge-sui {
    padding: 0.2rem 0.6rem !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-sui-success {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.badge-sui-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 500;
}

/* Dots removed as per UI request */

/* Technical typography for device rows */
.device-row td {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #334155;
}

.device-link {
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.device-link:hover {
    color: #3b82f6;
    text-decoration: none;
}

.ip-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #3b82f6;
    text-decoration: none;
}

.ip-mono:hover {
    color: #2563eb;
}

.device-row .font-weight-600.text-dark {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

/* Resource Bar Style (DevOps inspired) */
.sui-resource-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    width: 60px;
}

.sui-resource-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

.badge-sui-warning,
.badge-sui-orange {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #d97706 !important;
    border: none !important;
}

.badge-sui-info,
.badge-sui-primary,
.badge-sui-blue {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #2563eb !important;
    border: none !important;
}

.badge-sui-purple,
.badge-sui-magic {
    background: rgba(139, 92, 246, 0.12) !important;
    color: #7c3aed !important;
    border: none !important;
}

.badge-sui-teal {
    background: rgba(20, 184, 166, 0.12) !important;
    color: #0d9488 !important;
    border: none !important;
}

.badge-h-30 {
    height: 30px !important;
}

.badge-sui-gray,
.badge-sui-secondary {
    background: rgba(100, 116, 139, 0.1) !important;
    color: #475569 !important;
    border: none !important;
}

.badge-gpon {
    background: rgba(111, 66, 193, 0.12) !important;
    color: #7c3aed !important;
    border: none !important;
}

.badge-epon {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #d97706 !important;
    border: none !important;
}

.badge-switch {
    background: rgba(14, 165, 233, 0.12) !important;
    color: #0284c7 !important;
    border: none !important;
}

/* Dark Mode Badges */
.dark-mode .badge-sui-success {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
}

.dark-mode .badge-sui-danger {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
}

.dark-mode .badge-sui-warning,
.dark-mode .badge-sui-orange {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fbbf24 !important;
}

.dark-mode .badge-sui-info,
.dark-mode .badge-sui-primary,
.dark-mode .badge-sui-blue {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #60a5fa !important;
}

.dark-mode .badge-sui-purple,
.dark-mode .badge-sui-magic {
    background: rgba(139, 92, 246, 0.18) !important;
    color: #a78bfa !important;
}

.dark-mode .badge-sui-gray,
.dark-mode .badge-sui-secondary {
    background: rgba(100, 116, 139, 0.2) !important;
    color: #94a3b8 !important;
}

/* Nearby Devices Cards (Analytics Style) */
.sui-nearby-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background-color: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #f1f5f9;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
}

.sui-nearby-item:hover {
    background-color: #eff6ff;
    border-color: #dbeafe;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.05);
}

.sui-nearby-item:last-child {
    margin-bottom: 0;
}

.sui-nearby-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 10px;
    margin-right: 16px;
    color: #3b82f6;
    transition: all 0.3s;
}

.sui-nearby-item:hover .sui-nearby-icon {
    background: #3b82f6;
    color: #ffffff;
}

/* Action Text Links (Micro-actions in headers) */
.sui-link-action {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    font-family: 'Outfit', sans-serif !important;
    color: #64748b !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: none !important;
    transition: color 0.15s ease !important;
    line-height: 1 !important;
    text-decoration: none !important;
}

.sui-link-action:hover {
    color: #2563eb !important;
}

.sui-link-action.active {
    color: #2563eb !important;
    font-weight: 600 !important;
}

.dark-mode .sui-link-action {
    color: #8b949e !important;
}

.dark-mode .sui-link-action:hover,
.dark-mode .sui-link-action.active {
    color: #60a5fa !important;
}

/* --- Nearby Objects / Map Filter Chips & Radius Controls --- */
.sui-type-chips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.sui-type-chip {
    display: block;
    margin: 0 !important;
    cursor: pointer;
    user-select: none;
}

.sui-type-chip input[type="checkbox"] {
    display: none;
}

.sui-type-chip .chip-content {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
}

.sui-type-chip .chip-icon {
    width: 16px;
    text-align: center;
    margin-right: 6px;
    font-size: 0.85rem;
}

.sui-type-chip .chip-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sui-type-chip .chip-check {
    font-size: 0.72rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    margin-left: 4px;
}

/* Active States for Chips */
.sui-type-chip input[type="checkbox"]:checked + .chip-content {
    border-color: transparent;
}

.sui-type-chip input[type="checkbox"]:checked + .chip-content .chip-check {
    opacity: 1;
    transform: scale(1);
}

/* Blue (PON Box) */
.sui-type-chip.chip-blue input[type="checkbox"]:checked + .chip-content {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}
.sui-type-chip.chip-blue .chip-icon { color: #3b82f6; }

/* Gray / Slate (Closure) */
.sui-type-chip.chip-gray input[type="checkbox"]:checked + .chip-content {
    background: rgba(100, 116, 139, 0.12);
    color: #334155;
}
.sui-type-chip.chip-gray .chip-icon { color: #64748b; }

/* Orange / Amber (FOB) */
.sui-type-chip.chip-orange input[type="checkbox"]:checked + .chip-content {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}
.sui-type-chip.chip-orange .chip-icon { color: #f59e0b; }

/* Green (Switch) */
.sui-type-chip.chip-green input[type="checkbox"]:checked + .chip-content {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}
.sui-type-chip.chip-green .chip-icon { color: #10b981; }

/* Purple (OLT) */
.sui-type-chip.chip-purple input[type="checkbox"]:checked + .chip-content {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
}
.sui-type-chip.chip-purple .chip-icon { color: #8b5cf6; }

/* Dark mode for Chips */
.dark-mode .sui-type-chip .chip-content {
    background: #161b22;
    border-color: #30363d;
    color: #8b949e;
}
.dark-mode .sui-type-chip.chip-blue input[type="checkbox"]:checked + .chip-content { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.dark-mode .sui-type-chip.chip-gray input[type="checkbox"]:checked + .chip-content { background: rgba(100, 116, 139, 0.2); color: #cbd5e1; }
.dark-mode .sui-type-chip.chip-orange input[type="checkbox"]:checked + .chip-content { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.dark-mode .sui-type-chip.chip-green input[type="checkbox"]:checked + .chip-content { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.dark-mode .sui-type-chip.chip-purple input[type="checkbox"]:checked + .chip-content { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }

/* --- Segmented Radius Pill Group (Variant A) --- */
.sui-radius-segmented-group {
    display: flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    gap: 3px;
}

.sui-radius-segmented-group .btn-radius-pill {
    flex: 1;
    height: 32px;
    border: none !important;
    background: transparent;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none !important;
}

.sui-radius-segmented-group .btn-radius-pill:hover {
    color: #1e293b;
}

.sui-radius-segmented-group .btn-radius-pill.active {
    background: #ffffff !important;
    color: #2563eb !important;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.dark-mode .sui-radius-segmented-group {
    background: #161b22;
}

.dark-mode .sui-radius-segmented-group .btn-radius-pill {
    color: #8b949e;
}

.dark-mode .sui-radius-segmented-group .btn-radius-pill.active {
    background: #21262d !important;
    color: #60a5fa !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* --- 8. WIDGETS & SPECIALTIES --- */

/* Stat Cards */
/* Stat Cards - Modern Containers Style */
.sui-stat-card {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 12px !important;
    padding: 1rem 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
}

.dark-mode .sui-stat-card {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
}

.sui-stat-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06) !important;
}

.sui-stat-icon,
.stat-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 0.85rem !important;
    font-size: 1.15rem !important;
    flex-shrink: 0 !important;
}

/* Icon Soft Backgrounds */
.stat-icon-info,
.stat-icon-primary,
.stat-icon-blue {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: #2563eb !important;
}

.stat-icon-success,
.stat-icon-green {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
}

.stat-icon-danger,
.stat-icon-critical,
.stat-icon-red {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
}

.stat-icon-warning,
.stat-icon-orange {
    background-color: rgba(245, 158, 11, 0.12) !important;
    color: #d97706 !important;
}

.stat-icon-purple,
.stat-icon-magic {
    background-color: rgba(139, 92, 246, 0.12) !important;
    color: #7c3aed !important;
}

.stat-icon-teal {
    background-color: rgba(20, 184, 166, 0.12) !important;
    color: #0d9488 !important;
}

.stat-icon-gray,
.stat-icon-secondary {
    background-color: rgba(100, 116, 139, 0.1) !important;
    color: #475569 !important;
}

.dark-mode .stat-icon-info,
.dark-mode .stat-icon-primary,
.dark-mode .stat-icon-blue {
    background-color: rgba(59, 130, 246, 0.18) !important;
    color: #60a5fa !important;
}

.dark-mode .stat-icon-success,
.dark-mode .stat-icon-green {
    background-color: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
}

.dark-mode .stat-icon-danger,
.dark-mode .stat-icon-critical,
.dark-mode .stat-icon-red {
    background-color: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
}

.dark-mode .stat-icon-warning,
.dark-mode .stat-icon-orange {
    background-color: rgba(245, 158, 11, 0.18) !important;
    color: #fbbf24 !important;
}

.dark-mode .stat-icon-purple,
.dark-mode .stat-icon-magic {
    background-color: rgba(139, 92, 246, 0.18) !important;
    color: #a78bfa !important;
}

.dark-mode .stat-icon-teal {
    background-color: rgba(20, 184, 166, 0.18) !important;
    color: #2dd4bf !important;
}

.dark-mode .stat-icon-gray,
.dark-mode .stat-icon-secondary {
    background-color: rgba(100, 116, 139, 0.2) !important;
    color: #94a3b8 !important;
}

.sui-stat-content,
.stat-details {
    display: flex !important;
    flex-direction: column !important;
}

.sui-stat-label,
.stat-label {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    margin-bottom: 2px !important;
    line-height: 1.25 !important;
}

.dark-mode .sui-stat-label,
.dark-mode .stat-label {
    color: #8b949e !important;
}

.sui-stat-value,
.stat-value {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    font-family: 'Outfit', sans-serif !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.dark-mode .sui-stat-value,
.dark-mode .stat-value {
    color: #f0f6fc !important;
}

/* Monitor Progress */
.monitor-bar-container {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.dark-mode .monitor-bar-container {
    background: #161b22 !important;
}

.monitor-bar-fill {
    height: 100%;
    background: #0d9488;
}

.dark-mode .monitor-bar-fill {
    background: #2dd4bf !important;
}

/* --- 9. LAYOUT & RESPONSIVE --- */

/* Sidebar / Filter Column Responsiveness */
@media (min-width: 992px) {
    .mobile-filter-toggle {
        display: none !important;
    }

    #filter-content-wrapper.collapse {
        display: block !important;
        height: auto !important;
        visibility: visible !important;
    }
}

@media (max-width: 767.98px) {
    .filter-column {
        order: -1;
        margin-bottom: 15px;
    }
}

@media (max-width: 991.98px) {
    .mobile-filter-toggle {
        display: block !important;
        width: 100%;
        margin-bottom: 10px;
    }

    #filter-content-wrapper {
        display: none;
    }

    #filter-content-wrapper.show {
        display: block;
    }
}

.main-footer {
    padding: 0.5rem 1rem !important;
    font-size: 0.75rem !important;
    color: #64748b !important;
}

.dark-mode .main-footer {
    background: #010409 !important;
    border-top: 1px solid #30363d !important;
}

/* Sidebar Fixes */
.nav-sidebar .nav-link.active {
    background-color: rgba(59, 130, 246, 0.08) !important;
    color: #3b82f6 !important;
    font-weight: 700 !important;
}

.dark-mode .nav-sidebar .nav-link.active {
    background-color: rgba(45, 212, 191, 0.1) !important;
    color: #2dd4bf !important;
}

/* --- 8. COLOR PICKER (FIBER STYLE) --- */
.sui-color-picker-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
}

.sui-fiber-preview {
    margin-bottom: 12px;
    height: 60px;
    width: 60px;
}

.pcr-app {
    border-radius: 12px !important;
}

.sui-fiber-picker .pcr-button {
    display: block !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    border: 4px solid white !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12), 0 0 0 1px #e2e8f0 !important;
    transition: transform 0.2s !important;
    padding: 0 !important;
}

.sui-fiber-picker .pcr-button:hover {
    transform: scale(1.1);
}

.sui-fiber-picker .pcr-button::after {
    border-radius: 50% !important;
}

.sui-fiber-picker .pcr-button::before {
    border-radius: 50% !important;
}

.sui-color-hex {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    padding: 4px 12px;
    background: #f1f5f9;
    border-radius: 20px;
    font-family: 'Monaco', 'Consolas', monospace;
}

/* --- 7. SPECIALIZED FORM COMPONENTS --- */

/* Line & Map Previewers */
.line-preview-wrapper {
    background: #f8fafc;
    border-radius: 10px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border: 1px solid #e2e8f0;
}

.line-preview-svg {
    width: 100%;
    height: 20px;
}

.color-selector-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 12px;
    cursor: pointer;
    width: 100%;
    height: 44px;
    transition: all 0.2s;
}

.color-selector-card:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.color-preview-box {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.hex-val {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #475569;
}

/* Pickr Overrides for card-based selectors */
.color-preview-box .pickr .pcr-button {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.pickr-target {
    display: none !important;
}

/* --- Card Tools & Collapse Icons --- */
.btn-tool {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    color: #94a3b8 !important;
    transition: all 0.2s ease !important;
    margin-top: -2px;
}

.btn-tool:hover,
.btn-tool:focus,
.btn-tool:active {
    color: #0ea5e9 !important;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

.card-header[data-card-widget="collapse"] {
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    background-color: #f8fafc !important;
    transition: background-color 0.15s ease !important;
}

.card-header[data-card-widget="collapse"]:hover {
    background-color: #f1f5f9 !important;
}

/* Автоматична заміна іконок для згортання на шеврони (Angle Up/Down) */
/* Стан: РОЗГОРНУТО (немає класу .collapsed-card) */
.card:not(.collapsed-card) .card-header [data-card-widget="collapse"] i::before {
    content: "\f106" !important;
    /* fa-angle-up */
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    transition: all 0.3s ease;
}

/* Стан: ЗГОРНУТО (є клас .collapsed-card) */
.card.collapsed-card .card-header [data-card-widget="collapse"] i::before {
    content: "\f107" !important;
    /* fa-angle-down */
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
}

/* --- 9. UTILITIES --- */
.font-weight-700 {
    font-weight: 700 !important;
}

.ls-1 {
    letter-spacing: 0.5px;
}

/* ==========================================
   10. PAGINATION (SIGNAL UI STYLE)
   ========================================== */
.sui-pagination {
    gap: 3px !important;
    margin: 0 !important;
}

.sui-pagination .page-item .page-link {
    border: 0 !important;
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border-radius: 6px !important;
    min-width: 26px;
    height: 26px;
    padding: 0 4px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.sui-pagination .page-item .page-link:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
}

.sui-pagination .page-item.active .page-link,
.sui-pagination .page-item.active .page-link:hover {
    background-color: #0d9488 !important;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25) !important;
    transform: translateY(-1px);
}

.sui-pagination .page-item.disabled .page-link {
    background-color: transparent !important;
    opacity: 0.35;
    cursor: default;
    transform: none !important;
}

.sui-per-page-select {
    border-radius: 6px !important;
    width: 60px !important;
    font-weight: 600 !important;
    height: 26px !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #f8fafc !important;
    font-size: 0.75rem !important;
    padding: 0 4px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sui-per-page-select:hover {
    background-color: #e2e8f0 !important;
}

.dark-mode .sui-pagination .page-item .page-link {
    background-color: #161b22 !important;
    color: #8b949e !important;
}

.dark-mode .sui-pagination .page-item .page-link:hover {
    background-color: #21262d !important;
    color: #f0f6fc !important;
}

.dark-mode .sui-pagination .page-item.active .page-link {
    background-color: #3b82f6 !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2) !important;
}

.dark-mode .sui-per-page-select {
    background-color: #21262d !important;
    color: #c9d1d9 !important;
    border-color: #30363d !important;
}

/* === NAVIGATION HUBS (Logs, Settings, etc.) === */
.sui-section-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    color: #94a3b8;
    margin-bottom: 1.25rem;
    margin-left: 5px;
    margin-top: 1.5rem;
}

.card-sui-nav {
    border-radius: 16px !important;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
    background: white;
    border: 1px solid #f1f5f9 !important;
    height: 100%;
}

.card-sui-nav .card-body {
    padding: 1.25rem !important;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-right: 1.25rem;
    margin-bottom: 0 !important;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nav-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    overflow: hidden;
}

.nav-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.nav-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-arrow {
    font-size: 0.75rem;
    color: #cbd5e1;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.card-sui-nav:hover {
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.06) !important;
    border-color: #e2e8f0 !important;
    text-decoration: none !important;
}

.card-sui-nav:hover .nav-arrow {
    color: #1e293b;
    transform: translateX(3px);
    opacity: 1;
}

/* Theme Variants (Gradient Hover Effects) */
.card-sui-nav:hover {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%) !important;
}

.nav-theme-red:hover {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%) !important;
}

.nav-theme-blue:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important;
}

.nav-theme-teal:hover {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%) !important;
}

.nav-theme-amber:hover {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
}

.nav-theme-slate:hover {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%) !important;
}

/* Invert colors on hover */
.card-sui-nav:hover .nav-title {
    color: white !important;
}

.card-sui-nav:hover .nav-desc {
    color: rgba(255, 255, 255, 0.8) !important;
}

.card-sui-nav:hover .nav-arrow {
    color: rgba(255, 255, 255, 0.9) !important;
    opacity: 1;
}

.card-sui-nav:hover .nav-icon-box {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Soft Colors Support */
.bg-danger-soft {
    background-color: rgba(239, 68, 68, 0.08);
}

.bg-primary-soft {
    background-color: rgba(59, 130, 246, 0.08);
}

.bg-teal-soft {
    background-color: rgba(13, 148, 136, 0.08);
}

.bg-warning-soft {
    background-color: rgba(245, 158, 11, 0.08);
}

.bg-info-soft {
    background-color: rgba(100, 116, 139, 0.08);
}

/* --- 10. SIGNAL UI ADDITIONS (Passports, Tags, Gallery) --- */

.rounded-xl {
    border-radius: 12px !important;
}

.ls-1 {
    letter-spacing: 0.5px;
}

/* Category/Specialization Tags */
.tag-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
}

.tag-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.tag-orange {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.tag-green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* Passport/Summary Block */
.passport-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

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

.passport-label {
    color: #64748b;
    font-weight: 500;
}

.passport-value {
    font-weight: 700;
    color: #1e293b;
}

/* Upload Zone & Gallery */
.upload-zone {
    border: 2px dashed #e2e8f0;
    transition: all 0.2s;
    border-radius: 12px;
}

.upload-zone:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.02) !important;
}

.preview-box {
    position: relative;
    padding-top: 100%;
    background-color: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}

.preview-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delete-img-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transition: all 0.2s;
    z-index: 10;
}

.delete-img-btn:hover {
    background: #ef4444 !important;
    color: #fff !important;
    transform: scale(1.1);
}

/* --- 11. SWEETALERT2 SIGNAL UI CUSTOMIZATION --- */

.sui-swal-container {
    backdrop-filter: blur(4px);
}

.sui-swal-popup {
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    padding: 0 0 1rem 0 !important;
    /* Скидаємо стандартні відступи Swal */
}

.sui-swal-title-left {
    text-align: left !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    padding: 1rem 3rem 0.65rem 0.65rem !important;
    color: #1e293b !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 0.5rem !important;
    width: 100%;
}

.dark-mode .sui-swal-title-left {
    color: #f1f5f9 !important;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.sui-log-scroll-container::-webkit-scrollbar {
    width: 5px;
}

.sui-log-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.sui-log-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.dark-mode .sui-log-scroll-container::-webkit-scrollbar-thumb {
    background: #334155;
}

/* Custom Close Button for SweetAlert2 */
.swal2-close {
    font-size: 22px !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 10px !important;
    margin-right: 10px !important;
    color: #94a3b8 !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    border: none !important;
    box-shadow: none !important;
    font-family: serif !important;
    /* For a thinner '×' */
}

.swal2-close:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #475569 !important;
    outline: none !important;
}

.swal2-close:focus {
    box-shadow: none !important;
    outline: none !important;
}

.dark-mode .swal2-close {
    color: #64748b !important;
}

.dark-mode .swal2-close:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
}

/* ========================================= */
/* DEVICE SWITCH PORT STYLES                 */
/* ========================================= */
    .device-summary-card {
        border-radius: 12px;
        border-left: none !important;
    }

    .text-status-online {
        color: #22c55e !important;
    }

    .text-status-offline {
        color: #ef4444 !important;
    }

    /* Стиль іконок у кутках комірок (Old Simple Style) */
    .sui-table td {
        position: relative !important;
        vertical-align: middle !important;
        text-align: left !important;
        font-size: 0.9em;
        line-height: 1.4;
    }

    .port-action-icon {
        position: absolute !important;
        top: 5px !important;
        right: 5px !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
        padding: 0 !important;
        z-index: 10;
        cursor: pointer;
        color: #adb5bd !important;
        transition: all 0.2s ease !important;
        font-size: 0.85rem !important;
        line-height: 1 !important;
        z-index: 10;
        cursor: pointer;
        opacity: 0.8;
    }
    .port-action-icon:focus,
    .port-action-icon:active,
    .btn-nodeny-inline:focus,
    .btn-nodeny-inline:active {
        outline: none !important;
        box-shadow: none !important;
        border: none !important;
    }

    .port-action-icon:hover {
        opacity: 1;
        transform: scale(1.2);
    }

    /* Модифікатори кольорів при наведенні */
    .port-action-icon.hover-primary:hover {
        color: #007bff !important;
    }

    .port-action-icon.hover-info:hover {
        color: #17a2b8 !important;
    }

    .port-action-icon.hover-danger:hover {
        color: #dc3545 !important;
    }

    .port-action-icon.hover-success:hover {
        color: #28a745 !important;
        font-size: 0.95rem !important;
    }

    .port-action-icon.hover-warning:hover {
        color: #ffc107 !important;
    }

    .port-actions-container {
        position: absolute !important;
        top: 5px !important;
        right: 14px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        z-index: 11;
        align-items: flex-end !important;
    }

    .port-actions-container .port-action-icon {
        position: static !important;
    }

    /* Іконка картки абонента вбудована в рядок */
    .btn-nodeny-inline {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
        padding: 0 2px !important;
        margin-left: auto !important;
        cursor: pointer;
        color: #adb5bd;
        font-size: 0.85rem;
        line-height: 1;
        opacity: 0.8;
        transition: all 0.2s ease;
        z-index: 10;
    }
    .btn-nodeny-inline:hover {
        opacity: 1;
        color: #17a2b8;
        transform: scale(1.2);
    }

    /* Рядок абонента */
    .nodeny-abonent-item {
        position: relative !important;
        width: 100%;
    }

    .sui-table th {
        vertical-align: top !important;
        text-align: left !important;
        font-weight: 600;
        font-size: 0.9rem;
        background-color: #f8f9fa;
    }

    /* Спільні стилі для колонок обох таблиць */
    .port-id-cell {
        vertical-align: top !important;
        font-weight: bold;
        font-size: 1.1em;
        min-width: 60px;
    }

    .description-cell {
        min-width: 150px;
    }

    .link-status {
        min-width: 140px;
    }

    .counters-data {
        min-width: 130px;
    }

    .fdb-cell {
        min-width: 140px;
    }

    .cable-diag-cell {
        min-width: 200px !important;
    }

    .counters-data .text-muted,
    .errors-data .text-muted,
    .link-status .text-muted {
        margin-right: 3px;
        color: #6c757d !important;
    }

    .errors-data .error-in-out-container {
        white-space: nowrap;
    }

    .fdb-data-container {
        max-height: 100px;
        overflow-y: auto;
        overflow-x: hidden;
        line-height: 1.3;
        white-space: nowrap
    }

    .rmon-errors-container {
        line-height: 1.2;
    }

    .rmon-errors-container span {
        margin-right: 0;
        display: inline;
        min-width: 0;
    }

    .rmon-value {
        font-size: 0.9em;
    }

    .rmon-value.text-danger {
        color: #dc3545 !important;
        font-weight: normal;
    }

    .sfp-data span {
        display: block;
        line-height: 1.3;
        font-size: 0.9em;
        white-space: nowrap;
    }

    .sfp-data .tx-power {
        color: #ff7400;
    }

    .sfp-data .rx-power {
        color: #1f77b4;
    }

    .sfp-data .text-danger {
        color: #dc3545 !important;
    }

    .sfp-data .text-warning {
        color: #ff7400 !important;
    }

    .loading-cell {
        text-align: left !important;
        font-size: 1.2em;
        color: #6c757d;
        padding-left: 8px;
    }

    #module-action-result {
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 0.25rem;
        padding: 1rem;
        font-family: monospace;
        white-space: pre-wrap;
        word-wrap: break-word;
        max-height: 300px;
        overflow-y: auto;
    }

    .explanation-block p {
        margin-bottom: 0.75rem;
    }

    .explanation-block p strong {
        color: #333;
    }

    .device-info-card dl {
        margin-bottom: 0;
    }

    .device-info-card dt {
        font-weight: 700 !important;
        color: #495057;
        text-align: left;
        font-size: 0.9rem;
    }

    .device-info-card dd {
        font-weight: 500;
        color: #333;
        word-wrap: break-word;
        margin-bottom: 0.25rem;
        font-size: 0.9rem;
    }

    @media (min-width: 768px) {
        .device-info-card dt {
            text-align: right;
            padding-right: 10px;
        }

        .device-info-card dd {
            margin-bottom: 0.5rem;
        }
    }

    /* Traffic colored left border */
    .traffic-bar-success td:first-child {
        border-left: 4px solid #86efac !important; /* М'який пастельний зелений - трафік за останні 30 днів */
    }

    .traffic-bar-danger td:first-child {
        border-left: 4px solid #fca5a5 !important; /* М'який пастельний червоний - немає трафіку більше 30 днів */
    }

    .traffic-bar-warning td:first-child {
        border-left: 4px solid #fde047 !important; /* М'який пастельний жовтий - немає даних (не активувався) */
    }

    /* Ефект пульсації для кнопки Save */
    @keyframes pulse-green {
        0% {
            box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
        }

        70% {
            box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
        }

        100% {
            box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        }
    }

    .btn-pulse-save {
        animation: pulse-green 2s infinite !important;
        background: linear-gradient(135deg, #10b981, #059669) !important;
        color: #ffffff !important;
    }



    /* Signal UI App Buttons Styles */
    /* Signal UI App Buttons Styles — Modernized */
    .sui-action-pill-danger:active,
    .sui-action-pill-success:active,
    .sui-action-pill-blue:active,
    .sui-action-pill-gray:active {
        transform: none !important;
        opacity: 0.8;
    }

    /* Small Action Buttons Styling */
    .btn-sui-action {
        background-color: #ffffff !important;
        color: #64748b !important;
        border: 1px solid #e2e8f0 !important;
        transition: all 0.2s ease !important;
        font-weight: 500 !important;
        border-radius: 6px !important;
        padding: 0.25rem 0.5rem !important;
    }

    .btn-sui-action:hover {
        background-color: #eff6ff !important;
        color: #2563eb !important;
        border-color: #dbeafe !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    }

    /* === SIGNAL UI SIGNAL UI 2.0 GLOBAL DESIGN SYSTEM === */

    /* Typography & Labels */
    .sui-label {
        font-size: 0.8125rem !important;
        text-transform: none !important;
        letter-spacing: normal !important;
        font-weight: 500 !important;
        color: #64748b !important;
        margin-bottom: 0.4rem !important;
        display: block !important;
    }

    .text-xs { font-size: 0.75rem !important; }
    .ls-1 { letter-spacing: 1px !important; }
    .font-weight-500 { font-weight: 500 !important; }
    .font-weight-600 { font-weight: 600 !important; }
    .font-weight-700 { font-weight: 700 !important; }

    /* Cards & Layout */
    .rounded-xl { border-radius: 16px !important; }
    .bg-primary-soft { background-color: rgba(59, 130, 246, 0.08) !important; }
    
    .sui-card {
        border-radius: 16px !important;
        border: none !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    }

    /* Modern Status Switch (SUI Standard) */
    .sui-status-switch .custom-control-label {
        padding-top: 1px !important;
        cursor: pointer !important;
        user-select: none !important;
        font-weight: 600 !important;
        color: #334155 !important;
    }
    .sui-status-switch .custom-control-input:checked ~ .custom-control-label::before {
        border-color: #22c55e !important;
        background-color: #22c55e !important;
    }
    .custom-switch.sui-status-switch {
        padding-left: 2.5rem !important;
    }
    .sui-status-switch .custom-control-label::before {
        left: -2.5rem !important;
        width: 2.1rem !important;
        height: 1.15rem !important;
        border-radius: 1rem !important;
    }
    .sui-status-switch .custom-control-label::after {
        left: calc(-2.5rem + 2px) !important;
        width: calc(1.15rem - 4px) !important;
        height: calc(1.15rem - 4px) !important;
        border-radius: 1rem !important;
    }
    .sui-status-switch .custom-control-input:checked ~ .custom-control-label::after {
        transform: translateX(0.95rem) !important;
    }

    /* Map Elements */
    .sui-map-container {
        border: 1px solid #e2e8f0 !important;
        border-radius: 16px !important;
        overflow: hidden !important;
        transition: all 0.3s ease !important;
    }
    .sui-map-container:hover {
        border-color: #3b82f6 !important;
        box-shadow: 0 8px 15px rgba(59, 130, 246, 0.1) !important;
    }
    .leaflet-control-attribution {
        display: none !important;
    }

    /* Виправлення білих розривів (ліній) між тайлами Leaflet */
    .leaflet-tile {
        outline: 1px solid transparent;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    /* Forms Styling */
    textarea.form-control-sui {
        min-height: 70px;
        padding: 8px 12px !important;
        resize: vertical;
    }
    
    /* Unified Input Addon Buttons */
    .sui-input-btn {
        height: 38px !important;
        width: 50px !important;
        border-radius: 10px !important;
        border: 1px solid #e2e8f0 !important;
        background-color: #ffffff !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
        transition: all 0.2s ease !important;
        box-shadow: none !important;
        cursor: pointer !important;
    }
    .sui-input-btn:hover {
        background-color: #f8fafc !important;
        border-color: #cbd5e1 !important;
    }
    .sui-input-btn i {
        font-size: 1.1rem !important;
    }


/* --- ONU Signal Badges --- */

.sig-badge {
    padding: 2px 8px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: 0.72rem !important;
    display: inline-block !important;
    min-width: 60px !important;
    text-align: center !important;
    border: 1px solid transparent !important;
}
.sig-critical { 
    background-color: #fee2e2 !important; 
    color: #dc2626 !important; 
    border: 1px solid #fecaca !important; 
}
.sig-warning { 
    background-color: #ffedd5 !important; 
    color: #ea580c !important; 
    border: 1px solid #fed7aa !important; 
}
.sig-good { 
    background-color: #dcfce7 !important; 
    color: #16a34a !important; 
    border: 1px solid #bbf7d0 !important; 
}

/* Port number link in flapping ports table */
.port-num-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.07);
    border: 1.5px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 2px 9px;
    text-decoration: none !important;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    letter-spacing: 0.02em;
}
.port-num-link:hover {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.45);
    color: #1d4ed8;
    text-decoration: none !important;
}

/* ONU Status & Offline Sizing */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-online {
    background-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.status-offline {
    background-color: #94a3b8;
}

.row-offline {
    opacity: 0.65;
}

/* --- 15. NETWORK TOPOLOGY (HARMONIOUS ROW STYLE) --- */

/* --- COMPACT FULL-WIDTH TOPOLOGY (Signal UI Standard) --- */
.topology-container {
    background: #fdfdfe;
    padding: 15px;
    border-radius: 8px;
    width: 100% !important;
}

.topology-tree, .topology-tree ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.topology-tree ul {
    position: relative;
    padding-top: 0 !important;
    padding-left: 25px !important;
    border-left: none !important; /* Прибираємо бордер, бо він дає хвости */
}

#topology-root {
    padding-left: 0 !important;
}

.topology-item {
    position: relative !important;
    padding: 8px 0 !important;
}

/* Вертикальна лінія - тепер сегментована для кожного li */
.topology-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: -15px; /* Позиція лінії в padding-left списку */
    width: 2px;
    height: 100%;
    background: #e2e8f0;
    z-index: 1;
}

/* Фікс для останнього елемента - лінія зупиняється на центрі вузла */
.topology-item:last-child::after {
    height: 28px; 
}

/* Кореневий елемент не має вертикальної лінії зверху */
#topology-root > .topology-item::after {
    display: none !important;
}

/* Горизонтальна лінія - іде від вертикальної до вузла */
.topology-item::before {
    content: "";
    position: absolute;
    top: 28px; /* Опущено для потрапляння рівно по центру картки */
    left: -15px; /* Починається рівно від вертикальної лінії */
    width: 15px; /* Тягнеться до самого вузла */
    height: 2px;
    background: #e2e8f0;
    z-index: 2;
}

/* Стрілка розгортання - поворот */
.toggle-sc {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.toggle-sc.expanded {
    transform: rotate(90deg);
}




/* Картка вузла пристрою - FULL WIDTH */
.topo-device-node {
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important;
    padding: 6px 12px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    gap: 12px !important;
    width: 100% !important;
    box-shadow: none !important;
    position: relative;
}

.topo-device-node:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
}

/* Бейджі портів */
.ppo-badge, .upo-badge {
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    font-family: 'JetBrains Mono', monospace !important;
    min-width: 40px !important;
    text-align: center !important;
}

.ppo-badge { background: #ecfdf5 !important; color: #059669 !important; border: 1px solid #d1fae5 !important; }
.upo-badge { background: #eff6ff !important; color: #2563eb !important; border: 1px solid #dbeafe !important; }

/* Кнопка розгортання */
.toggle-sc {
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.toggle-sc:hover {
    color: #2563eb;
    transform: scale(1.2);
}


/* Ранги IP (Світлі бейджі) */
.rnk {
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 3px 10px !important;
    border-radius: 6px !important;
    margin-right: 12px !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
    transition: all 0.2s ease;
}

.rnk.r0 { background: #ecfdf5 !important; color: #065f46 !important; }
.rnk.r1 { background: #f0fdf4 !important; color: #166534 !important; }
.rnk.r2 { background: #f0fdfa !important; color: #0d9488 !important; }
.rnk.r3 { background: #f0fdf4 !important; color: #15803d !important; }
.rnk.r4 { background: #f0fdf9 !important; color: #059669 !important; }
.rnk.r5 { background: #f8fafc !important; color: #64748b !important; }

/* Technology Badges - Pastel */
.rnk.epon { background: #fff7ed !important; color: #c2410c !important; border-color: #ffedd5 !important; } 
.rnk.gpon { background: #f3e8ff !important; color: #7e22ce !important; border-color: #e9d5ff !important; }

/* АВАРІЯ - ЧЕРВОНИЙ БЕЙДЖ */
.rnk.status-offline { 
    background: #fee2e2 !important; 
    color: #b91c1c !important; 
    border-color: #fecaca !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3) !important;
}

.topo-name {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    flex-grow: 1;
}

.topo-addr {
    font-size: 11px;
    color: #94a3b8;
}

.topo-states {
    padding: 2px 10px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    display: flex;
    align-items: center;
    gap: 5px;
}

.topo-states.stat-online { background: #f1f5f9 !important; color: #64748b !important; opacity: 0.6; }
.topo-states.stat-partial { 
    background: #ffedd5 !important; 
    color: #9a3412 !important; 
    box-shadow: 0 0 0 1px #fdba74 !important;
}
.topo-states.stat-down { 
    background: #fee2e2 !important; 
    color: #991b1b !important; 
    box-shadow: 0 0 0 1px #fca5a5 !important;
    font-weight: 900 !important;
}
.topo-states.stat-leaf { background: #f1f5f9 !important; color: #64748b !important; opacity: 0.6; }

/* Специфічні типи ONU */
.rnk.epon { border-color: #f59e0b !important; color: #f59e0b !important; } /* Жовтий */
.rnk.gpon { border-color: #a855f7 !important; color: #a855f7 !important; } /* Фіолетовий */

/* Рядок пристрою */
.topo-device-node {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    gap: 12px;
    min-width: 800px;
}

/* Кнопка розгортання */
.toggle-sc {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    font-size: 12px;
    transition: transform 0.2s;
}
.toggle-sc.hidden {
    visibility: hidden;
    width: 0;
    margin: 0;
}
.toggle-sc.expanded {
    transform: rotate(90deg);
}

/* Назва пристрою */
.topo-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 13.5px;
}

/* Текст адреси */
.topo-addr {
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    padding: 0 10px;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Статистика піддерева */
.topo-states {
    height: 24px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: #e2e8f0;
    color: #1e293b;
    font-size: 11px;
    font-weight: 800;
    border-radius: 4px;
    margin-left: auto;
}

/* Виділення магістральних портів (Trunk/Uplink) */
.trunk-port-row {
    background-color: rgba(59, 130, 246, 0.03) !important;
}
.trunk-port-row td:first-child {
    border-left: 4px solid #93c5fd !important;
    position: relative;
}
.trunk-port-row:hover {
    background-color: rgba(59, 130, 246, 0.07) !important;
}
.dark-mode .trunk-port-row {
    background-color: rgba(59, 130, 246, 0.05) !important;
}

/* Specific Port Technology Colors */
.ppo-badge.epon-port { background: #fff7ed !important; color: #c2410c !important; border: 1px solid #ffedd5 !important; }
.ppo-badge.gpon-port { background: #f3e8ff !important; color: #7e22ce !important; border: 1px solid #e9d5ff !important; }

/* --- Port row highlight (from flapping ports / MAC navigation) --- */
@keyframes row-pulse-in {
    0%   { 
        background: transparent; 
    }
    35%  { 
        background: linear-gradient(to bottom, rgba(34, 197, 94, 0.24) 0%, rgba(34, 197, 94, 0.08) 50%, rgba(34, 197, 94, 0.24) 100%) !important;
    }
    100% { 
        background: linear-gradient(to bottom, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.04) 50%, rgba(34, 197, 94, 0.12) 100%) !important;
    }
}
tr.highlight-row {
    animation: row-pulse-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    background: linear-gradient(to bottom, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.04) 50%, rgba(34, 197, 94, 0.12) 100%) !important;
}
tr.highlight-row td {
    background: transparent !important;
    border-top: 1px solid rgba(34, 197, 94, 0.25) !important;
    border-bottom: 1px solid rgba(34, 197, 94, 0.25) !important;
}
th.sort-th {
    white-space: nowrap !important;
}

/* Спеціальний перемикач статусу інфраструктури */
.sui-status-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-bottom: 0;
    margin-right: 12px;
}
.sui-status-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Малий перемикач статусу */
.sui-status-switch-sm {
    position: relative !important;
    display: inline-block !important;
    width: 34px !important;
    height: 18px !important;
    margin-bottom: 0;
    flex-shrink: 0;
}
.sui-status-switch-sm input {
    opacity: 0;
    width: 0;
    height: 0;
}
.sui-status-switch-sm .sui-status-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .25s ease-in-out;
    border-radius: 18px;
}
.sui-status-switch-sm .sui-status-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s ease-in-out;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.sui-status-switch-sm input:checked + .sui-status-slider {
    background-color: #10b981;
}
.sui-status-switch-sm input:checked + .sui-status-slider:before {
    transform: translateX(16px);
}

.sui-status-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #6c757d;
    transition: .3s;
    border-radius: 20px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.sui-status-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .sui-status-slider {
    background-color: #10b981; /* гарний зелений */
}
input:checked + .sui-status-slider:before {
    transform: translateX(20px);
}
input:disabled + .sui-status-slider {
    opacity: 0.6;
    cursor: not-allowed;
}
.sui-status-wrapper {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}
.sui-status-text {
    font-size: 0.95rem;
    font-weight: 600;
    user-select: none;
    transition: color 0.3s ease;
}
.sui-status-text.built {
    color: #10b981;
}
.sui-status-text.project {
    color: #6c757d;
}

/* Виправлення примусового вирівнювання по центру та по правому краю */
.sui-table td.text-center, 
.sui-table td[colspan] {
    text-align: center !important;
}

.sui-table td.text-right,
.sui-table th.text-right,
.sui-table thead th.text-right {
    text-align: right !important;
}


/* --- STYLES FOR BUILDING DETAIL (КАРТКА БУДИНКУ) --- */
.location-red-icon {
    color: #ef4444;
}

.entrance-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s ease;
}
.entrance-badge-yes { background-color: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.entrance-badge-no { background-color: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.entrance-badge-unknown { background-color: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }

.quick-select-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
}

#entrancesAccordion {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02) !important;
    border-radius: 12px;
    padding: 8px;
    background: rgba(248, 250, 252, 0.4);
    border: 1px solid #e2e8f0;
}

#entrancesAccordion .card {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    overflow: hidden;
    margin-bottom: 0.75rem !important;
    background: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

.entrance-header {
    transition: background-color 0.2s ease;
    background-color: #f8fafc !important;
    border: none !important;
    border-radius: 0 !important;
}
.entrance-header:hover {
    background-color: #f1f5f9 !important;
}
.entrance-header[aria-expanded="false"] {
    border-bottom: none !important;
}
.entrance-header[aria-expanded="true"] {
    background-color: #e2e8f0 !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

.entrance-details-textarea {
    border-radius: 4px !important;
    border: 1px solid #cbd5e1 !important;
    resize: vertical;
    min-height: 52px;
    font-size: 0.85rem !important;
    padding: 6px 10px !important;
}
.entrance-details-textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Стилізація Select2 під загальну тему */
.select2-container--bootstrap4 .select2-selection {
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    min-height: 38px !important;
    font-size: 0.875rem !important;
}

.select2-container--bootstrap4 .select2-selection--single {
    height: 38px !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
}

/* --- 5. AUTH & LOCKSCREEN GLASSMORPHISM SYSTEM --- */
body.sui-auth-page {
    background: radial-gradient(circle at 50% 35%, #8792a5 0%, #526075 65%, #334155 100%) !important;
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    overflow: hidden;
    position: relative;
}

body.sui-auth-page::before {
    content: '';
    position: absolute;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.sui-auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 390px;
    padding: 20px;
    animation: suiSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes suiSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.sui-auth-card {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.22) !important;
    padding: 40px 36px !important;
    text-align: center;
}

.sui-auth-logo {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.sui-auth-logo b {
    color: #3b82f6;
}

.sui-auth-msg {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 400;
}

.sui-form-group {
    margin-bottom: 1.15rem;
    text-align: left;
}

.sui-form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
    display: block;
}

/* Група полів авторизації 1-в-1 за референсом скріншота з пастельно-блакитним фоном */
.input-group-sui {
    position: relative !important;
    width: 100% !important;
    height: 38px !important;
    background-color: #eff6ff !important;
    border: 1px solid #dbeafe !important;
    border-radius: 10px !important;
    padding: 0 !important;
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.search-group-sui:hover,
.input-group-sui:hover {
    border-color: #bfdbfe !important;
}

.input-group-sui:focus-within {
    border-color: #3b82f6 !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
}

.input-group-sui .form-control-sui {
    width: 100% !important;
    height: 100% !important;
    padding: 0 58px 0 36px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-size: 0.9rem !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 400 !important;
    color: #1e293b !important;
}

.input-group-sui .form-control-sui:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.input-group-sui .input-icon {
    position: absolute !important;
    left: 3px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    border-radius: 6px !important;
    z-index: 5 !important;
    pointer-events: none !important;
    transition: all 0.2s ease !important;
}

.input-group-sui:focus-within .input-icon {
    color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.12) !important;
}

.input-group-sui .input-icon.input-icon-danger {
    color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.12) !important;
}

.input-group-sui .input-icon.input-icon-success {
    color: #10b981 !important;
    background-color: rgba(16, 185, 129, 0.12) !important;
}

.input-group-sui .eye-icon {
    position: absolute !important;
    right: 3px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    border-radius: 6px !important;
    z-index: 5 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.input-group-sui .eye-icon:hover {
    color: #1e293b !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.input-group-sui .clear-icon {
    position: absolute !important;
    right: 32px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 22px !important;
    height: 22px !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    color: #94a3b8 !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    z-index: 6 !important;
    transition: all 0.15s ease !important;
}

.input-group-sui .clear-icon:hover {
    color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.12) !important;
}

/* Chrome/Safari Autofill Fix для 100% інпута */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #eff6ff inset !important;
    -webkit-text-fill-color: #1e293b !important;
    border-radius: 10px !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Кнопки авторизації 100% ширини */
.sui-auth-btn-primary {
    width: 100% !important;
    height: 38px !important;
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25) !important;
    margin-top: 10px !important;
    text-decoration: none !important;
}

.sui-auth-btn-primary:hover {
    background-color: #2563eb !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35) !important;
    color: #ffffff !important;
}

.sui-auth-btn-secondary {
    width: 100% !important;
    height: 38px !important;
    background-color: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 10px !important;
    text-decoration: none !important;
}

.sui-auth-btn-secondary:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

/* Overlay Specifics - Нейтральний фон відкритої сторінки, картка 1-в-1 як за референсом */
.sui-overlay-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(14px) grayscale(30%) !important;
    -webkit-backdrop-filter: blur(14px) grayscale(30%) !important;
    z-index: 999999; display: flex; align-items: center; justify-content: center;
}

.sui-overlay-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: 24px !important; padding: 40px 36px !important;
    width: 100%; max-width: 390px !important; text-align: center;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.12) !important;
}

.sui-overlay-badge {
    width: 80px; height: 80px; margin: 0 auto 1.25rem; border-radius: 24px;
    background: linear-gradient(135deg, #3b82f6, #6366f1) !important; color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 700;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.25); border: 3px solid #ffffff;
}

.sui-overlay-avatar-img {
    width: 80px; height: 80px; margin: 0 auto 1.25rem; border-radius: 24px;
    object-fit: cover; border: 3px solid #ffffff; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* --- SQUIRCLE AVATARS & USER DROPDOWN SYSTEM --- */
.sui-user-avatar-squircle {
    width: 60px;
    height: 60px;
    border-radius: 18px !important;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    margin: 0 auto 8px;
    display: block;
}

.sui-user-badge-squircle {
    width: 60px;
    height: 60px;
    border-radius: 18px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    border: 3px solid #ffffff;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.3);
    margin: 0 auto 8px;
}

.sui-user-avatar-squircle-sm {
    width: 38px;
    height: 38px;
    border-radius: 10px !important;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.sui-user-badge-squircle-sm {
    width: 38px;
    height: 38px;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.25);
}

.sui-user-dropdown-menu {
    width: 270px !important;
    border-radius: 18px !important;
    padding: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.18) !important;
    background: #ffffff !important;
    margin-top: 8px !important;
}

.sui-user-dropdown-header {
    padding: 12px 10px 14px !important;
    text-align: center;
    background: transparent !important;
    border-bottom: 1px solid #f1f5f9 !important;
    margin-bottom: 8px !important;
}

.sui-user-dropdown-header .user-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 6px;
    margin-bottom: 2px;
    line-height: 1.2;
}

.sui-user-dropdown-header .user-joined {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 400;
}

.sui-user-dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #334155 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    margin-bottom: 3px !important;
}

.sui-user-dropdown-item:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    transform: translateX(2px);
}

.sui-user-dropdown-item i {
    width: 22px;
    font-size: 1rem;
    margin-right: 10px;
}

.sui-user-dropdown-item.item-danger:hover {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
}

.sui-user-dropdown-item.item-warning:hover {
    background-color: #fffbeb !important;
    color: #d97706 !important;
}

/* Dark mode adjustments for user dropdown */
.dark-mode .sui-user-dropdown-menu {
    background: #0d1117 !important;
    border: 1px solid #30363d !important;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5) !important;
}

.dark-mode .sui-user-dropdown-header {
    border-bottom-color: #21262d !important;
}

.dark-mode .sui-user-dropdown-header .user-name {
    color: #f0f6fc !important;
}

.dark-mode .sui-user-dropdown-header .user-joined {
    color: #8b949e !important;
}

.dark-mode .sui-user-dropdown-item {
    color: #c9d1d9 !important;
}

.dark-mode .sui-user-dropdown-item:hover {
    background-color: #161b22 !important;
    color: #58a6ff !important;
}

.dark-mode .sui-user-dropdown-item.item-danger:hover {
    background-color: rgba(248, 81, 73, 0.15) !important;
    color: #f85149 !important;
}

.dark-mode .sui-user-dropdown-item.item-warning:hover {
    background-color: rgba(210, 153, 34, 0.15) !important;
    color: #d29922 !important;
}

/* --- PROFILE PAGE SQUIRCLE AVATARS --- */
.sui-profile-badge-squircle {
    width: 100px;
    height: 100px;
    border-radius: 24px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    border: 4px solid #ffffff;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    margin: 0 auto;
}

.sui-profile-avatar-squircle {
    width: 100px;
    height: 100px;
    border-radius: 24px !important;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    margin: 0 auto;
    display: block;
}

.dark-mode .sui-profile-badge-squircle,
.dark-mode .sui-profile-avatar-squircle {
    border-color: #30363d !important;
}

/* --- READ-ONLY DATA DISPLAY SYSTEM --- */
.sui-read-only-field {
    margin-bottom: 1rem;
}

.sui-read-only-label {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin-bottom: 0.25rem !important;
    display: block;
}

.sui-read-only-value {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    min-height: auto !important;
    display: block !important;
    word-break: break-word;
}

.dark-mode .sui-read-only-label {
    color: #8b949e !important;
}

.dark-mode .sui-read-only-value {
    background: transparent !important;
    border: none !important;
    color: #f0f6fc !important;
}

/* --- CODE TAG OVERRIDES --- */
code {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.82rem !important;
    color: #475569 !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 2px 6px !important;
    font-weight: 600 !important;
}

.dark-mode code {
    color: #94a3b8 !important;
    background-color: #161b22 !important;
    border-color: #30363d !important;
}



