:root {
    --hub-bg: #071426;
    --hub-bg-soft: #0b1c33;
    --hub-surface: rgba(10, 22, 40, 0.88);
    --hub-surface-strong: rgba(8, 16, 30, 0.96);
    --hub-surface-soft: rgba(12, 26, 48, 0.72);
    --hub-border: rgba(59, 130, 246, 0.18);
    --hub-border-strong: rgba(59, 130, 246, 0.28);
    --hub-text: #eaf2ff;
    --hub-muted: #a7bddb;
    --hub-primary: #3b82f6;
    --hub-primary-dark: #1d4ed8;
    --hub-primary-rgb: 59, 130, 246;
    --hub-primary-dark-rgb: 29, 78, 216;
    --hub-on-primary: #061326;
    --hub-danger: #ff6b6b;
    --hub-warning: #ffbf47;
    --hub-info: #38bdf8;
    --hub-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    --hub-sidebar-width: 234px;
    --hub-sidebar-footer-space: 182px;
    --hub-radius-xl: 28px;
    --hub-radius-lg: 22px;
    --hub-radius-md: 18px;
}

html,
body {
    min-height: 100%;
}

.card,
.modal-content,
.offcanvas {
    background: var(--hub-surface-strong);
    color: var(--hub-text);
    border: 1px solid var(--hub-border);
    box-shadow: var(--hub-shadow);
}

.card {
    border-radius: var(--hub-radius-md);
}

.card .card-title,
.card .card-text,
.card .card-body {
    color: var(--hub-text);
}

.modal-header,
.modal-footer,
.offcanvas-header {
    border-color: rgba(255, 255, 255, 0.08);
}

.btn-primary {
    border: 0;
    background: linear-gradient(135deg, var(--hub-primary), var(--hub-primary-dark));
    color: var(--hub-on-primary);
    box-shadow: 0 14px 32px rgba(var(--hub-primary-rgb), 0.16);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, rgba(var(--hub-primary-rgb), 0.92), rgba(var(--hub-primary-dark-rgb), 0.92));
    color: var(--hub-on-primary);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger {
    border-radius: 14px;
}

.btn-outline-primary {
    border-color: rgba(var(--hub-primary-rgb), 0.28);
    color: var(--hub-text);
    background: rgba(255, 255, 255, 0.04);
}

.btn-outline-primary:hover {
    background: rgba(var(--hub-primary-rgb), 0.16);
    border-color: rgba(var(--hub-primary-rgb), 0.28);
    color: var(--hub-text);
}

.btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--hub-text);
    background: rgba(255, 255, 255, 0.03);
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--hub-text);
}

.btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

.modal-content {
    background: var(--hub-surface-strong) !important;
    color: var(--hub-text) !important;
    border-color: var(--hub-border) !important;
}

.modal-header,
.modal-body,
.modal-footer {
    color: var(--hub-text) !important;
}

@media (max-width: 992px) {
    .modal-body,
    .hub-message-modal-body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    .table-responsive,
    div.dataTables_wrapper div.dataTables_scrollBody {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-x pan-y;
    }
}

@media (max-width: 1024px) {
    html,
    body {
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
    }

    input,
    select,
    textarea,
    .form-control,
    .form-select {
        font-size: 16px !important;
    }

    .btn,
    button,
    .page-link,
    .input-group-text,
    [role="button"] {
        min-height: 48px;
    }

    .hub-elite-toggle {
        min-height: 19px !important;
        height: 19px !important;
        max-height: 19px !important;
    }

    .mobile-card-table thead {
        display: none !important;
    }

    .mobile-card-table,
    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table td,
    .mobile-card-table th {
        width: 100%;
    }

    .mobile-card-table {
        min-width: 0 !important;
        border-collapse: separate;
        border-spacing: 0;
    }

    .mobile-card-table tbody tr {
        display: block;
        margin-bottom: 14px;
        border-radius: 18px;
        border: 1px solid var(--hub-border);
        background: rgba(255, 255, 255, 0.03);
        overflow: hidden;
    }

    .mobile-card-table tbody td,
    .mobile-card-table tbody th {
        display: flex !important;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        white-space: normal !important;
        word-break: break-word;
    }

    .mobile-card-table tbody td:first-child,
    .mobile-card-table tbody th:first-child {
        border-top: 0;
    }

    .mobile-card-table tbody td::before,
    .mobile-card-table tbody th::before {
        content: attr(data-label);
        display: inline-block;
        flex: 0 0 42%;
        max-width: 42%;
        font-size: 0.76rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--hub-muted);
    }

    .mobile-card-table tbody td[style*="display: none"],
    .mobile-card-table tbody td.dtr-hidden,
    .mobile-card-table tbody td[data-skip-mobile="1"],
    .mobile-card-table tbody th[style*="display: none"],
    .mobile-card-table tbody th.dtr-hidden,
    .mobile-card-table tbody th[data-skip-mobile="1"] {
        display: none !important;
    }

    .mobile-control-strip {
        display: flex !important;
        gap: 8px;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 0 8px;
        margin-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .mobile-control-strip::-webkit-scrollbar {
        display: none;
    }

    .mobile-control-strip > * {
        flex: 0 0 auto;
    }

    .mobile-chip {
        min-height: 40px;
        padding: 8px 14px !important;
        border-radius: 999px !important;
        white-space: nowrap;
    }

    .mobile-action-quick {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
        width: 100%;
    }

    .mobile-actions-menu {
        width: 100%;
    }

    .mobile-actions-summary {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 46px;
        padding: 10px 14px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: #fff;
        font-weight: 700;
        list-style: none;
        cursor: pointer;
        user-select: none;
    }

    .mobile-actions-summary::-webkit-details-marker {
        display: none;
    }

    .mobile-actions-sheet {
        display: grid;
        gap: 8px;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-top: 0;
        border-bottom-left-radius: 14px;
        border-bottom-right-radius: 14px;
        background: rgba(8, 18, 34, 0.94);
    }

    .mobile-actions-sheet > * {
        width: 100%;
        justify-content: center;
    }

    .mobile-card-hidden {
        display: none !important;
    }

    .mobile-load-more-wrap {
        display: flex;
        justify-content: center;
        padding: 10px 0 2px;
    }

    .mobile-load-more-btn {
        min-height: 46px;
        padding: 10px 18px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.05);
        color: #fff;
        font-weight: 700;
    }
}

.modal-title,
.modal .form-label {
    color: var(--hub-text) !important;
}

.lable-table {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 999px;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.lable-table.font-text2 {
    font-size: 0.58rem !important;
}

.lable-table.bg-danger {
    background-color: rgb(220 53 53 / 48%) !important;
    color: rgb(255, 50, 70) !important;
    border-color: rgb(255, 50, 70) !important;
}

.bg-danger {
    background-color: rgb(220 53 53 / 48%) !important;
}

.lable-table.rounded {
    border-radius: 999px !important;
}

.lable-table.border {
    border-color: var(--hub-border) !important;
}

.swal2-popup {
    background: var(--hub-surface-strong) !important;
    color: var(--hub-text) !important;
    border: 1px solid var(--hub-border) !important;
    border-radius: 18px !important;
    box-shadow: var(--hub-shadow) !important;
}

.swal2-title,
.swal2-html-container,
.swal2-content,
.swal2-footer,
.swal2-input-label {
    color: var(--hub-text) !important;
}

.swal2-close {
    color: var(--hub-muted) !important;
}

.swal2-actions {
    gap: 10px;
}

.swal2-styled {
    border-radius: 14px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.swal2-styled:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--hub-primary-rgb), 0.22) !important;
}

.swal2-styled.swal2-confirm {
    border: 0 !important;
    background: linear-gradient(135deg, var(--hub-primary), var(--hub-primary-dark)) !important;
    color: var(--hub-on-primary) !important;
}

.swal2-popup.swal2-icon-warning .swal2-styled.swal2-confirm,
.swal2-popup.swal2-icon-error .swal2-styled.swal2-confirm {
    background: var(--hub-danger) !important;
    color: #1b0b0b !important;
}

.swal2-styled.swal2-cancel {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--hub-text) !important;
}

.swal2-styled.swal2-deny {
    background: var(--hub-danger) !important;
    border: 0 !important;
    color: #1b0b0b !important;
}

.swal2-input,
.swal2-textarea,
.swal2-select {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--hub-text) !important;
    border: 1px solid var(--hub-border) !important;
    border-radius: 14px !important;
}

.swal2-timer-progress-bar {
    background: rgba(var(--hub-primary-rgb), 0.55) !important;
}

.swal2-toast {
    background: var(--hub-surface-strong) !important;
    color: var(--hub-text) !important;
    border: 1px solid var(--hub-border) !important;
    box-shadow: var(--hub-shadow) !important;
}

.swal2-toast .swal2-title,
.swal2-toast .swal2-html-container {
    color: var(--hub-text) !important;
}

.modal .form-label {
    font-weight: 600;
}

.modal .form-control,
.modal .form-select,
.modal textarea.form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--hub-text) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.modal .form-control::placeholder,
.modal textarea.form-control::placeholder {
    color: rgba(236, 255, 244, 0.48) !important;
}

.modal .btn-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--hub-text) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.modal .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    color: var(--hub-text) !important;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(var(--hub-primary-rgb), 0.20), transparent 32%),
        radial-gradient(circle at top right, rgba(var(--hub-primary-dark-rgb), 0.18), transparent 26%),
        radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.10), transparent 22%),
        linear-gradient(135deg, #071426 0%, #081a33 48%, #050a16 100%);
    color: var(--hub-text);
    overflow-x: hidden;
}

body.hub-scroll-locked {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
}

.page-content {
    margin-left: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

a {
    color: inherit;
}

.hub-app {
    min-height: 100vh;
    display: flex;
}

.hub-sidebar {
    width: var(--hub-sidebar-width);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1045;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.hub-sidebar-inner {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border: 1px solid var(--hub-border);
    border-radius: 0 30px 30px 0;
    background:
        linear-gradient(180deg, rgba(12, 26, 48, 0.96) 0%, rgba(7, 15, 28, 0.98) 100%);
    box-shadow: var(--hub-shadow);
    backdrop-filter: blur(18px);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) rgba(255, 255, 255, 0.06);
    touch-action: pan-y;
}

.hub-sidebar-inner::-webkit-scrollbar {
    width: 10px;
}

.hub-sidebar-inner::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.hub-sidebar-inner::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.06);
}

.hub-sidebar-inner::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hub-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hub-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-brand-title {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.hub-brand-icon,
.hero-icon,
.icon-wrap {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(var(--hub-primary-rgb), 0.18), rgba(var(--hub-primary-dark-rgb), 0.34));
    color: #dbeafe;
    font-size: 1.35rem;
    border: 1px solid rgba(var(--hub-primary-rgb), 0.20);
}

.hub-brand-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.hub-sidebar-close,
.hub-menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--hub-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hub-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-sidebar-accordion.accordion {
    width: 100%;
}

.hub-sidebar-accordion .accordion-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.hub-sidebar-accordion .accordion-button {
    background: transparent;
    color: var(--hub-muted);
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: none;
}

.hub-sidebar-accordion .accordion-button::after {
    opacity: 0.6;
    filter: brightness(0) invert(1);
}

.hub-sidebar-accordion .accordion-button:not(.collapsed) {
    color: var(--hub-text);
    background: rgba(255, 255, 255, 0.03);
}

.hub-sidebar-accordion .accordion-body {
    padding: 10px 10px 12px;
}

.hub-sidebar-label {
    color: var(--hub-muted);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0 6px;
}

.hub-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hub-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 13px;
    text-decoration: none;
    color: var(--hub-muted);
    border: 1px solid transparent;
    transition: .2s ease;
    line-height: 1.2;
    font-size: 0.92rem;
}

.hub-nav-link:hover {
    color: var(--hub-text);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.hub-nav-link.active {
    color: var(--hub-on-primary);
    background: linear-gradient(135deg, var(--hub-primary), var(--hub-primary-dark));
    box-shadow: 0 14px 32px rgba(var(--hub-primary-rgb), 0.2);
}

.hub-nav-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-nav-link--with-toggle {
    flex: 1 1 auto;
    min-width: 0;
}

.hub-nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    flex: 0 0 auto;
    font-size: 0.92rem;
}

.hub-nav-group {
    display: block;
}

.hub-nav-group summary {
    list-style: none;
}

.hub-nav-group summary::-webkit-details-marker {
    display: none;
}

.hub-nav-link-toggle {
    cursor: pointer;
}

.hub-nav-caret {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: transform .2s ease;
}

.hub-nav-group[open] .hub-nav-caret {
    transform: rotate(180deg);
}

.hub-nav-submenu {
    margin-top: 6px;
    margin-left: 16px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hub-nav-sublink {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 13px;
    text-decoration: none;
    color: var(--hub-muted);
    border: 1px solid transparent;
    transition: .2s ease;
    line-height: 1.2;
    font-size: 0.9rem;
}

.hub-nav-sublink:hover {
    color: var(--hub-text);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.hub-nav-sublink.active {
    color: var(--hub-on-primary);
    background: linear-gradient(135deg, var(--hub-primary), var(--hub-primary-dark));
    box-shadow: 0 14px 32px rgba(var(--hub-primary-rgb), 0.2);
}

.hub-nav-icon .app-ibo-icon {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}

.hub-nav-icon .app-quick-icon {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}

.hub-nav-icon .app-bhtvbr-icon {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}

.hub-nav-text {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 0.92rem;
    font-weight: 500;
}

.hub-nav-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.hub-nav-badge-danger {
    background: rgba(239, 68, 68, 0.22);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.hub-nav-badge-warning {
    background: rgba(245, 158, 11, 0.22);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.hub-elite-toggle-form {
    margin: 0;
    flex: 0 0 auto;
}

.hub-elite-toggle {
    height: 19px !important;
    min-height: 19px !important;
    max-height: 19px;
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    padding: 0 8px 0 5px;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: rgba(13, 33, 60, 0.96);
    color: rgba(234, 242, 255, 0.84);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.hub-elite-toggle:hover {
    background: rgba(16, 42, 77, 0.98);
    border-color: rgba(59, 130, 246, 0.28);
}

.hub-elite-toggle-thumb {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.16);
    transition: transform .2s ease, background .2s ease;
}

.hub-elite-toggle.is-on {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.98), rgba(37, 99, 235, 0.98));
    border-color: rgba(96, 165, 250, 0.34);
    color: #f8fbff;
}

.hub-elite-toggle.is-on .hub-elite-toggle-thumb {
    background: #f8fbff;
    transform: translateX(0);
}

.hub-elite-toggle.is-off {
    background: rgba(12, 28, 50, 0.98);
    border-color: rgba(59, 130, 246, 0.14);
    color: rgba(191, 219, 254, 0.72);
}

.hub-elite-toggle.is-off .hub-elite-toggle-thumb {
    background: rgba(255, 255, 255, 0.9);
}

.hub-elite-toggle-state {
    display: inline-block;
    min-width: 18px;
    text-align: center;
}

.hub-sidebar-status-card {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.hub-sidebar-status-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.hub-sidebar-status-dot {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--hub-text);
}

.hub-sidebar-semaphore-danger {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.28);
}

.hub-sidebar-semaphore-warning {
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.28);
}

.hub-sidebar-semaphore-info {
    background: rgba(56, 189, 248, 0.18);
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.28);
}

.hub-sidebar-semaphore-success {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.28);
}

.hub-sidebar-status-title {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--hub-text);
}

.hub-sidebar-status-text {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--hub-muted);
}

.hub-sidebar-automation-list {
    display: grid;
    gap: 8px;
}

.hub-sidebar-automation-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--hub-text);
    transition: .18s ease;
}

.hub-sidebar-automation-item:hover {
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--hub-text);
}

.hub-sidebar-automation-item strong {
    display: block;
    font-size: 0.78rem;
    line-height: 1.2;
}

.hub-sidebar-automation-item span {
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--hub-text);
}

.hub-sidebar-automation-item.is-danger {
    border-color: rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.08);
}

.hub-sidebar-automation-item.is-warning {
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.08);
}

.hub-sidebar-automation-item.is-info {
    border-color: rgba(56, 189, 248, 0.22);
    background: rgba(56, 189, 248, 0.08);
}

.hub-sidebar-automation-item.is-success {
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(34, 197, 94, 0.08);
}

.hub-sidebar-footer {
    margin-top: auto;
    position: relative;
    z-index: 1;
    padding-top: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.hub-sidebar-footer-card {
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.hub-sidebar-footer-card .text-uppercase.small {
    margin-bottom: 0.45rem !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.12em;
}

.hub-sidebar-footer-card .btn-hub {
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.hub-sidebar-footer-card .btn-hub i {
    margin-right: 0.45rem !important;
}

.hub-sidebar-footer-card .btn-hub.mb-2 {
    margin-bottom: 0.45rem !important;
}

.hub-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 5, 0.58);
    backdrop-filter: blur(6px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.hub-main {
    flex: 1;
    min-width: 0;
    padding-left: calc(var(--hub-sidebar-width) + 16px);
}

.hub-shell {
    max-width: 1680px;
    margin: 0 auto;
    padding: 20px 20px 44px;
}

.hub-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.hub-topbar-minimal {
    margin-bottom: 12px;
}

.hub-page-intro {
    max-width: 840px;
}

.hub-topbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--hub-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--hub-muted);
    white-space: nowrap;
}

.hub-content {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hero-card,
.panel-card,
.metric-card,
.nav-card {
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
    backdrop-filter: blur(18px);
    border-radius: var(--hub-radius-lg);
    box-shadow: var(--hub-shadow);
}

.hero-card {
    padding: 30px;
    overflow: hidden;
    position: relative;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(var(--hub-primary-rgb), 0.14), transparent 28%),
        radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.10), transparent 24%);
    pointer-events: none;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -40px auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(var(--hub-primary-rgb), 0.24), transparent 65%);
    pointer-events: none;
}

.hero-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hero-kpis-full {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hero-kpis-dashboard {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: relative;
    z-index: 1;
}

.hero-mini-card {
    min-width: 0;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.hero-stat-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
        var(--hub-surface-soft);
}

.hero-mini-value,
.hero-mini-strong {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-mini-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-mini-value.is-success {
    color: #dbeafe;
}

.hero-mini-value.is-danger {
    color: #ffd3d3;
}

.hero-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.metric-card {
    padding: 18px 20px;
    height: 100%;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
        var(--hub-surface-soft);
}

.metric-label {
    color: var(--hub-muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 6px;
}

.metric-value {
    font-size: clamp(1.45rem, 1.75vw, 2rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 4px;
}

.panel-card {
    padding: clamp(16px, 1.6vw, 22px);
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}

.panel-card > * {
    min-width: 0;
}

.panel-title {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 0;
}

.panel-title .icon-wrap {
    flex: 0 0 auto;
}

.panel-card .table-responsive,
.panel-card .xlsx-preview,
.panel-card .input-group {
    max-width: 100%;
}

.table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.table-responsive::-webkit-scrollbar {
    height: 10px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.06);
}

div.dataTables_wrapper div.dataTables_scrollBody {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

div.dataTables_wrapper div.dataTables_scrollBody::-webkit-scrollbar {
    height: 10px;
}

div.dataTables_wrapper div.dataTables_scrollBody::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

div.dataTables_wrapper div.dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.06);
}

.panel-card .form-control,
.panel-card .form-select {
    min-width: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: .9rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--hub-text);
}

.status-pill.active {
    background: rgba(var(--hub-primary-rgb), 0.18);
    color: #dbeafe;
}

.status-pill.inactive {
    background: rgba(255, 107, 107, 0.12);
    color: #ffd3d3;
}

.btn-hub {
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 600;
}

.btn-hub-primary {
    background: linear-gradient(135deg, var(--hub-primary), var(--hub-primary-dark));
    color: var(--hub-on-primary);
    box-shadow: 0 14px 32px rgba(var(--hub-primary-rgb), 0.2);
}

.btn-hub-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--hub-text);
    border: 1px solid var(--hub-border);
}

.btn-hub-danger {
    background: #fd0404;
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(253, 4, 4, 0.18);
}

.btn.btn-hub-danger {
    background: #fd0404;
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(253, 4, 4, 0.18);
    border-color: transparent;
}

.btn-hub-danger:hover,
.btn-hub-danger:focus {
    background: #d90303;
    color: #ffffff;
}

.btn.btn-hub-danger:hover,
.btn.btn-hub-danger:focus {
    background: #d90303;
    color: #ffffff;
    border-color: transparent;
}

.btn-hub-danger:active {
    background: #c60303;
    color: #ffffff;
}

.btn.btn-hub-danger:active {
    background: #c60303;
    color: #ffffff;
    border-color: transparent;
}

.btn-hub-secondary:hover,
.hub-sidebar-close:hover,
.hub-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--hub-text);
}

.form-control,
.form-select {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--hub-text);
    min-height: 48px;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(var(--hub-primary-rgb), 0.45);
    box-shadow: 0 0 0 0.2rem rgba(var(--hub-primary-rgb), 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--hub-text);
}

.form-control::placeholder {
    color: rgba(236, 255, 244, 0.48);
}

.automation-switch-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 18px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    user-select: none;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.automation-switch-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.16);
}

.automation-switch-card.is-saving {
    opacity: 0.74;
    cursor: wait;
    pointer-events: none;
}

.automation-switch-card.is-on {
    border-color: rgba(var(--hub-primary-rgb), 0.28);
    background: linear-gradient(180deg, rgba(8, 31, 74, 0.84), rgba(6, 23, 54, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 22px rgba(30, 64, 175, 0.16);
}

.automation-switch-card.is-off {
    border-color: rgba(255, 255, 255, 0.10);
}

.automation-switch-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.automation-switch-track {
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: background .2s ease, border-color .2s ease;
}

.automation-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.26);
    transition: transform .2s ease;
}

.automation-switch-card.is-on .automation-switch-track {
    background: linear-gradient(135deg, #0d6efd, #2563eb);
    border-color: rgba(147, 197, 253, 0.36);
}

.automation-switch-card.is-on .automation-switch-thumb {
    transform: translateX(20px);
}

.automation-switch-meta {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    min-width: 0;
}

.automation-switch-title {
    font-size: .98rem;
    font-weight: 700;
    color: var(--hub-text);
    line-height: 1;
}

.automation-switch-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .07em;
    line-height: 1;
    text-transform: uppercase;
    color: #c7d2e4;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.automation-switch-card.is-on .automation-switch-state {
    color: #dbeafe;
    background: rgba(var(--hub-primary-rgb), 0.16);
    border-color: rgba(var(--hub-primary-rgb), 0.22);
}

.automation-switch-card.is-off .automation-switch-state {
    color: #d7deea;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.automation-form.is-auto-saving {
    opacity: 0.96;
}

@media (max-width: 767px) {
    .automation-switch-card {
        width: 100%;
        justify-content: space-between;
    }
}

.form-select {
    background-color: rgba(255, 255, 255, 0.05);
    color-scheme: dark;
}

.form-select option,
.form-select optgroup {
    background: #0b1c33;
    color: var(--hub-text);
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
    background: rgba(255, 255, 255, 0.035);
    color: rgba(236, 255, 244, 0.76);
    opacity: 1;
}

#xlsx-number-column,
#xlsx-name-column {
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--hub-text) !important;
}

#xlsx-number-column:disabled,
#xlsx-name-column:disabled {
    background-color: rgba(255, 255, 255, 0.035) !important;
    color: rgba(236, 255, 244, 0.76) !important;
}

#xlsx-number-column option,
#xlsx-name-column option {
    background: #0b1c33 !important;
    color: var(--hub-text) !important;
}

input[type="file"].form-control {
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

input[type="file"].form-control::file-selector-button {
    height: 100%;
    min-height: 48px;
    margin-right: 14px;
    padding: 0 16px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    color: var(--hub-text);
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

input[type="file"].form-control:hover::file-selector-button,
input[type="file"].form-control:focus::file-selector-button {
    background: linear-gradient(180deg, rgba(var(--hub-primary-rgb), 0.24), rgba(var(--hub-primary-rgb), 0.12));
    color: #f4fff8;
}

.form-text,
.text-muted-soft {
    color: var(--hub-muted) !important;
}

.table-hub {
    --bs-table-bg: transparent;
    --bs-table-color: var(--hub-text);
    --bs-table-border-color: rgba(255, 255, 255, 0.08);
    margin-bottom: 0;
}

.table,
.table.dataTable {
    --bs-table-bg: transparent;
    --bs-table-color: var(--hub-text);
    --bs-table-border-color: rgba(255, 255, 255, 0.08);
    color: var(--hub-text);
}

.table thead th,
.table thead td,
.table.dataTable thead th,
.table.dataTable thead td {
    color: var(--hub-text);
}

.table-light {
    --bs-table-bg: rgba(255, 255, 255, 0.04);
    --bs-table-color: var(--hub-text);
}

div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_filter label,
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_paginate {
    color: var(--hub-text) !important;
}

div.dataTables_wrapper .dataTables_filter input,
div.dataTables_wrapper .dataTables_length select {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--hub-text);
}

div.dataTables_wrapper .page-link {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--hub-text);
}

div.dataTables_wrapper .page-item.active .page-link {
    background: linear-gradient(135deg, var(--hub-primary), var(--hub-primary-dark));
    border-color: transparent;
    color: var(--hub-on-primary);
}

table.dataTable,
table.dataTable tbody td,
table.dataTable tbody th,
table.dataTable thead th,
table.dataTable thead td,
table.dataTable tfoot th,
table.dataTable tfoot td {
    color: var(--hub-text) !important;
}

table.dataTable tbody tr {
    color: var(--hub-text) !important;
}

table.table-striped > tbody > tr:nth-of-type(odd) > *,
table.table-striped > tbody > tr:nth-of-type(even) > * {
    color: var(--hub-text) !important;
}

#listar-clientes td,
#listar-clientes th {
    color: var(--hub-text) !important;
}

div.dataTables_wrapper .dataTables_filter input,
div.dataTables_wrapper .dataTables_length select,
div.dataTables_wrapper .dataTables_filter label,
div.dataTables_wrapper .dataTables_length label,
div.dataTables_wrapper .dataTables_info,
div.dataTables_wrapper .dataTables_paginate {
    color: var(--hub-text) !important;
}

div.dataTables_wrapper .dataTables_paginate .pagination .page-link {
    color: var(--hub-text) !important;
}

.dt-buttons .btn,
.dt-buttons .btn:focus,
.dt-buttons .btn:hover {
    color: var(--hub-text) !important;
}

.table-hub td,
.table-hub th {
    vertical-align: middle;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.badge-success-soft {
    background: rgba(var(--hub-primary-rgb), 0.16);
    color: #dbeafe;
}

.badge-danger-soft {
    background: rgba(255, 107, 107, 0.16);
    color: #ffd3d3;
}

.badge-warning-soft {
    background: rgba(255, 191, 71, 0.14);
    color: #ffe8ae;
}

.badge-info-soft {
    background: rgba(116, 192, 252, 0.14);
    color: #cce9ff;
}

.incoming-card {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
        var(--hub-surface-soft);
}

.incoming-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.incoming-card-user {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.incoming-card-user strong {
    line-height: 1.2;
}

.incoming-card-message {
    color: var(--hub-text);
    font-size: .94rem;
    line-height: 1.45;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.incoming-eye-btn {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--hub-text);
}

.incoming-eye-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--hub-text);
}

.swal2-popup.hub-message-modal {
    width: min(720px, calc(100vw - 28px)) !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background:
        radial-gradient(circle at top right, rgba(var(--hub-primary-rgb), 0.12), transparent 28%),
        linear-gradient(180deg, rgba(12, 26, 48, 0.98), rgba(7, 15, 28, 0.98)) !important;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34) !important;
}

.swal2-popup.hub-message-modal .swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--hub-text) !important;
}

.swal2-popup.hub-message-modal .swal2-actions {
    width: 100%;
    margin: 0 !important;
    padding: 16px 22px 22px;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.swal2-popup.hub-message-modal .swal2-confirm,
.swal2-popup.hub-message-modal .swal2-cancel {
    min-width: 132px;
    min-height: 44px;
    margin: 0;
    border-radius: 14px !important;
    box-shadow: none !important;
    font-weight: 600;
}

.swal2-popup.hub-message-modal .swal2-cancel {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--hub-text) !important;
}

.hub-message-modal-layout {
    display: flex;
    flex-direction: column;
}

.hub-message-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 22px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hub-message-modal-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(var(--hub-primary-rgb), 0.16);
    color: #dbeafe;
    font-size: 1.2rem;
}

.hub-message-modal-title {
    display: flex;
    gap: 14px;
    min-width: 0;
}

.hub-message-modal-user {
    min-width: 0;
}

.hub-message-modal-user strong {
    display: block;
    font-size: 1.04rem;
    line-height: 1.3;
}

.hub-message-modal-user span {
    display: block;
    margin-top: 4px;
    color: var(--hub-muted);
    font-size: 0.9rem;
    word-break: break-all;
}

.hub-message-modal-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--hub-text);
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}

.hub-message-modal-body {
    padding: 18px 22px 22px;
}

.hub-message-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.hub-message-modal-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--hub-muted);
    font-size: 0.8rem;
}

.hub-message-bubble-wrap {
    display: flex;
    justify-content: flex-start;
}

.hub-message-media {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hub-message-media-stage {
    width: 100%;
    max-height: 420px;
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.hub-message-media-image-wrap {
    min-height: 240px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 14px;
}

.hub-message-media-image {
    width: auto;
    max-width: 100%;
    max-height: none;
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    transition: width .18s ease;
}

.hub-message-media-image.is-zoomable {
    cursor: zoom-in;
}

.hub-message-media-audio {
    width: 100%;
    border-radius: 16px;
}

.hub-message-media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hub-message-media-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(var(--hub-primary-rgb), 0.22);
    background: rgba(var(--hub-primary-rgb), 0.12);
    color: #dbeafe;
}

.hub-message-media-control {
    cursor: pointer;
}

.hub-message-media-link:hover {
    color: #ecfff4;
    background: rgba(var(--hub-primary-rgb), 0.18);
}

.hub-message-media-zoom-label {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--hub-muted);
    font-weight: 600;
    font-size: .9rem;
}

.hub-message-media-file {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.hub-message-media-file-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(var(--hub-primary-rgb), 0.16);
    color: #dbeafe;
    font-size: 1.2rem;
}

.hub-message-media-file-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hub-message-media-file-body strong,
.hub-message-media-file-body span {
    word-break: break-word;
}

.hub-message-media-file-body span {
    color: var(--hub-muted);
    font-size: 0.9rem;
}

.hub-message-media-pdf-wrap {
    width: 100%;
    height: 460px;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.hub-message-media-pdf {
    width: 100%;
    height: 100%;
    border: 0;
    background: #071426;
}

.hub-message-bubble {
    width: 100%;
    max-width: 100%;
    padding: 16px 18px;
    border-radius: 20px 20px 20px 8px;
    border: 1px solid rgba(var(--hub-primary-rgb), 0.16);
    background:
        linear-gradient(180deg, rgba(var(--hub-primary-rgb), 0.08), rgba(var(--hub-primary-rgb), 0.03)),
        rgba(255, 255, 255, 0.02);
    color: var(--hub-text);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.65;
    font-size: 0.96rem;
}

.hub-message-modal-empty {
    color: var(--hub-muted);
    font-style: italic;
}

@media (max-width: 640px) {
    .hub-message-modal-head,
    .hub-message-modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hub-message-modal-title {
        gap: 12px;
    }

    .hub-message-modal-tag {
        display: none;
    }
}

.error-card {
    gap: 0;
}

.error-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.error-card-title {
    font-weight: 700;
    color: #ffe8ae;
    margin-bottom: 6px;
    line-height: 1.35;
}

.error-card-summary {
    line-clamp: 2;
    -webkit-line-clamp: 2;
    margin-bottom: 8px;
}

.error-card-context {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .88rem;
    line-height: 1.45;
    color: var(--hub-text);
    margin-bottom: 8px;
}

.error-card-raw {
    font-size: .8rem;
    line-height: 1.45;
    color: var(--hub-muted);
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    word-break: break-word;
}

.list-suggestions {
    position: absolute;
    z-index: 30;
    width: 100%;
    background: var(--hub-surface-strong);
    border: 1px solid var(--hub-border);
    border-radius: 16px;
    max-height: 260px;
    overflow: auto;
    display: none;
}

.list-suggestions button {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--hub-text);
    text-align: left;
    padding: 12px 14px;
}

.list-suggestions button:hover {
    background: rgba(255, 255, 255, 0.06);
}

.xlsx-preview {
    max-height: 380px;
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.quick-link-card {
    display: block;
    padding: 20px;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    color: var(--hub-text);
    transition: .2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.quick-link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--hub-primary-rgb), 0.24);
    background: rgba(var(--hub-primary-rgb), 0.06);
}

.hub-swal-container {
    backdrop-filter: blur(8px);
}

.hub-swal-popup {
    border: 1px solid var(--hub-border) !important;
    border-radius: 24px !important;
    background:
        radial-gradient(circle at top right, rgba(var(--hub-primary-rgb), 0.10), transparent 28%),
        linear-gradient(180deg, rgba(12, 26, 48, 0.98), rgba(7, 15, 28, 0.98)) !important;
    color: var(--hub-text) !important;
    box-shadow: var(--hub-shadow) !important;
    padding: 26px !important;
}

.hub-swal-title {
    color: var(--hub-text) !important;
    font-size: clamp(1.45rem, 1.8vw, 2rem) !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
}

.hub-swal-label {
    color: var(--hub-muted) !important;
    font-size: 0.98rem !important;
    margin-bottom: 14px !important;
}

.hub-swal-textarea.swal2-textarea {
    width: 100% !important;
    min-height: 220px !important;
    margin: 0 !important;
    border-radius: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--hub-text) !important;
    box-shadow: none !important;
    padding: 16px 18px !important;
    resize: vertical !important;
}

.hub-swal-textarea.swal2-textarea::placeholder {
    color: rgba(236, 255, 244, 0.48) !important;
}

.hub-swal-textarea.swal2-textarea:focus {
    border-color: rgba(var(--hub-primary-rgb), 0.45) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--hub-primary-rgb), 0.12) !important;
}

.hub-swal-actions {
    gap: 12px !important;
    margin-top: 18px !important;
}

.hub-swal-actions .btn {
    min-width: 150px;
}

.page-subtitle {
    max-width: 820px;
}

@media (max-width: 1199px) {
    .hub-app.sidebar-open {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .hub-main {
        padding-left: 0;
    }

    .hub-sidebar {
        transform: translateX(-110%);
        transition: transform .22s ease;
        padding: 14px;
    }

    .hub-sidebar-inner {
        height: calc(100vh - 28px) !important;
        height: calc(100dvh - 28px) !important;
        max-height: calc(100vh - 28px) !important;
        max-height: calc(100dvh - 28px) !important;
        overflow-y: auto !important;
    }

    .hub-app.sidebar-open .hub-sidebar {
        transform: translateX(0);
    }

    .hub-app.sidebar-open .hub-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (min-width: 1200px) {
    .hub-menu-toggle,
    .hub-sidebar-close,
    .hub-sidebar-backdrop {
        display: none;
    }
}

@media (max-width: 992px) {
    .hero-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-kpis-full {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-kpis-dashboard {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hub-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .hub-shell {
        padding: 16px 12px 34px;
    }

    .hero-card,
    .panel-card,
    .metric-card {
        border-radius: 18px;
    }

    .panel-card {
        gap: 12px;
    }

    .panel-title {
        gap: 10px;
    }

    .hero-kpis {
        grid-template-columns: 1fr;
    }

    .hero-kpis-full {
        grid-template-columns: 1fr;
    }

    .hero-kpis-dashboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hub-sidebar-inner {
        border-radius: 24px;
    }

    .hub-topbar-badge {
        display: none;
    }
}

@media (max-width: 480px) {
    :root {
        --hub-sidebar-footer-space: 166px;
    }

    .hero-kpis-dashboard {
        grid-template-columns: 1fr;
    }
}
