:root {
    --inv-ink: #17231d;
    --inv-muted: #68756e;
    --inv-brand: #16784a;
    --inv-brand-dark: #0f5e39;
    --inv-brand-soft: #eaf6ef;
    --inv-bg: #f4f7f5;
    --inv-surface: #ffffff;
    --inv-border: #dfe7e2;
    --inv-danger: #c23b3b;
    --inv-warning: #b56b08;
    --inv-radius: 14px;
    --inv-shadow: 0 10px 30px rgba(28, 54, 40, .07);
}

html { scroll-behavior: smooth; }

body {
    color: var(--inv-ink);
    background: var(--inv-bg);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a, button, input, select, textarea { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, transform .18s ease; }
.ui-icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; vertical-align: middle; }

:focus-visible {
    outline: 3px solid rgba(22, 120, 74, .22) !important;
    outline-offset: 2px;
}

.navbar-custom.topnav-navbar {
    background: #123c2b !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.09), 0 8px 24px rgba(14, 48, 33, .13);
}
.navbar-custom.topnav-navbar > .container-fluid {
    display: flex;
    align-items: center;
    min-height: 70px;
}
.navbar-custom .topnav-logo {
    display: inline-flex !important;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
}
.navbar-custom .topbar-menu {
    display: flex;
    align-items: stretch;
    margin-left: auto;
}

.topnav-logo-lg {
    letter-spacing: -.025em;
    font-size: 1.05rem;
}
.topbar-brand-name { display: inline-flex !important; align-items: center; gap: 10px; color: #fff; font-weight: 720; }
.topbar-brand-mark { display: inline-grid !important; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #fff; color: var(--inv-brand-dark); }
.navbar-custom .topnav-logo .topnav-logo-sm.topbar-brand-mark { display: none !important; }
.topbar-brand-mark .ui-icon { width: 19px; height: 19px; }

.brand-mark {
    display: inline-grid;
    width: 32px;
    height: 32px;
    margin-right: 9px;
    place-items: center;
    border-radius: 9px;
    background: #fff;
    color: var(--inv-brand-dark);
    vertical-align: middle;
}

.topbar-alerts { height: 70px; display: flex; align-items: stretch; }
.topbar-alert-button {
    display: inline-grid !important;
    position: relative;
    width: 52px;
    height: 70px;
    place-items: center;
    color: #fff !important;
    background: transparent !important;
    border: 0;
}
.topbar-alert-button::before {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.07);
}
.topbar-alert-button:hover::before,
.topbar-alert-button[aria-expanded="true"]::before { background: rgba(255,255,255,.14); }
.topbar-alert-button .ui-icon { position: relative; z-index: 1; width: 18px; height: 18px; }
.topbar-alert-badge {
    position: absolute;
    top: 16px;
    right: 7px;
    z-index: 2;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border: 2px solid #123c2b;
    border-radius: 999px;
    background: #efb22d;
    color: #fff;
    font-size: .6rem;
    font-weight: 800;
    line-height: 13px;
    text-align: center;
}
.topbar-alert-menu {
    width: min(320px, calc(100vw - 24px)) !important;
    padding: 8px !important;
    border: 1px solid var(--inv-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 45px rgba(20,38,29,.2) !important;
}
.topbar-alert-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 8px 12px;
}
.topbar-alert-header div { display: flex; flex-direction: column; }
.topbar-alert-header strong { color: var(--inv-ink); font-size: .92rem; }
.topbar-alert-header span { color: var(--inv-muted); font-size: .76rem; }
.topbar-alert-header a { color: var(--inv-brand); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.topbar-alert-list { display: grid; gap: 2px; }
.topbar-alert-item {
    display: grid !important;
    position: relative !important;
    grid-template-columns: 1fr auto !important;
    gap: 12px !important;
    align-items: center !important;
    min-height: auto !important;
    padding: 9px 9px 9px 27px !important;
    border-radius: 9px !important;
    color: #405047 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
}
.topbar-alert-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #9aa8a1;
    transform: translateY(-50%);
}
.topbar-alert-item:hover { background: #f6f9f7 !important; color: var(--inv-brand-dark) !important; }
.topbar-alert-item > span {
    display: inline-grid !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 28px !important;
    height: 24px !important;
    padding: 0 8px !important;
    place-items: center !important;
    border-radius: 999px !important;
    font-weight: 800 !important;
    font-size: .74rem !important;
    line-height: 1 !important;
}
.topbar-alert-item div { display: flex !important; grid-column: 1 !important; grid-row: 1 !important; min-width: 0 !important; flex-direction: column !important; }
.topbar-alert-item strong { display: block !important; color: var(--inv-ink) !important; font-size: .85rem !important; font-weight: 760 !important; line-height: 1.15 !important; }
.topbar-alert-item small { display: block !important; margin-top: 2px !important; color: var(--inv-muted) !important; font-size: .72rem !important; line-height: 1.2 !important; }
.topbar-alert-danger::before { background: #c23b3b; }
.topbar-alert-warning::before { background: #d18a26; }
.topbar-alert-info::before { background: #368aa0; }
.topbar-alert-neutral::before { background: #7a8580; }
.topbar-alert-danger > span { background: #fff0f0; color: #c23b3b; }
.topbar-alert-warning > span { background: #fff7e8; color: #b56b08; }
.topbar-alert-info > span { background: #edf8fb; color: #257a90; }
.topbar-alert-neutral > span { background: #f1f4f2; color: #64726b; }

.topbar-profile { height: 70px; display: flex; align-items: stretch; }
.topbar-profile-button { display: flex !important; align-items: center; gap: 10px; height: 70px; min-width: 190px; padding: 0 16px !important; color: #fff !important; background: rgba(255,255,255,.06) !important; border: 0; text-align: left; }
.topbar-profile-button:hover, .topbar-profile-button[aria-expanded="true"] { background: rgba(255,255,255,.12) !important; }
.session-avatar { display: inline-grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #eaf6ef; color: var(--inv-brand-dark); font-size: .9rem; font-weight: 780; }
.session-summary { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.25; }
.topbar-profile-button .account-user-name { max-width: 155px; overflow: hidden; color: #fff !important; font-size: .86rem; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.topbar-profile-button .account-position { max-width: 155px; overflow: hidden; color: rgba(255,255,255,.62) !important; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.session-chevron { width: 16px; height: 16px; color: rgba(255,255,255,.68); transition: transform .2s ease; }
.topbar-profile-button[aria-expanded="true"] .session-chevron { transform: rotate(180deg); }
.session-menu { width: 280px !important; padding: 10px !important; border: 1px solid var(--inv-border) !important; border-radius: 13px !important; box-shadow: 0 18px 45px rgba(20,38,29,.18) !important; }
.session-menu-header { display: flex; align-items: center; gap: 11px; padding: 9px 8px 12px; }
.session-avatar-lg { width: 42px; height: 42px; }
.session-menu-header div { display: flex; min-width: 0; flex-direction: column; }
.session-menu-header strong, .session-menu-header span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-menu-header strong { color: var(--inv-ink); font-size: .9rem; }
.session-menu-header span { color: var(--inv-muted); font-size: .76rem; }
.session-company { display: flex; align-items: center; gap: 10px; margin: 0 3px 7px; padding: 10px; border-radius: 9px; background: #f4f8f5; color: #5f6e66; }
.session-company .ui-icon { width: 18px; height: 18px; color: var(--inv-brand); }
.session-company div { display: flex; min-width: 0; flex-direction: column; }
.session-company small { color: #8a958f; font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; }
.session-company span { overflow: hidden; color: #46544d; font-size: .78rem; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.session-menu-section {
    margin: 2px 8px 5px;
    color: #8a958f;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.session-logout { display: flex !important; align-items: center; gap: 9px; border-radius: 8px; color: #a83434 !important; }
.session-logout:hover { background: #fff0f0 !important; }
.session-logout .ui-icon { width: 18px; height: 18px; }
.session-action { display: flex !important; align-items: center; gap: 9px; border-radius: 8px; color: #46544d !important; }
.session-action:hover { background: #f0f7f3 !important; color: var(--inv-brand-dark) !important; }
.session-action i { width: 18px; font-size: 1rem; text-align: center; color: var(--inv-brand); }
.password-toggle i { pointer-events: none; }

.button-menu-mobile {
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 70px;
    color: #fff;
}

.button-menu-mobile .lines {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
}

.button-menu-mobile .lines span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.button-menu-mobile.is-active .lines span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.button-menu-mobile.is-active .lines span:nth-child(2) { opacity: 0; }
.button-menu-mobile.is-active .lines span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 70px 0 0 0;
    z-index: 1000;
    border: 0;
    background: rgba(15, 33, 24, .45);
    padding: 0;
}

.leftside-menu-detached {
    border: 0;
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 18px 40px rgba(28, 54, 40, .08);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.leftbar-user {
    margin: 10px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff8f3, #f8fbf9);
}
.leftbar-user > a { display: grid !important; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 11px; align-items: center; text-align: left !important; }
.leftbar-user img, .sidebar-session-avatar { grid-row: 1 / 3; }
.sidebar-session-avatar { width: 42px; height: 42px; }
.leftbar-user-name { color: var(--inv-ink) !important; font-weight: 650; }
.leftbar-user-role { color: var(--inv-muted); font-size: .72rem; line-height: 1; }
.side-nav {
    padding: 2px 0 12px !important;
}
.side-nav-title {
    margin: 10px 18px 8px !important;
    padding: 0 !important;
    color: #9aa8a1 !important;
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .12em;
}
.side-nav .side-nav-link {
    min-height: 42px;
    border-radius: 12px;
    margin: 3px 10px;
    width: auto;
    color: #526159;
}
.side-nav .side-nav-link:hover { color: var(--inv-brand-dark); background: var(--inv-brand-soft); }
.side-nav .side-nav-link.active {
    color: var(--inv-brand-dark) !important;
    background: var(--inv-brand-soft);
    font-weight: 650;
    box-shadow: inset 4px 0 var(--inv-brand);
}
.side-nav .side-nav-link > .ui-icon:first-child { color: #708078; }
.side-nav .side-nav-link.active > .ui-icon:first-child { color: var(--inv-brand); }
.side-nav-group-toggle { position: relative; }
.side-nav-group-toggle.group-active { color: var(--inv-brand-dark) !important; background: #f3f8f5; font-weight: 650; }
.nav-group-chevron { position: absolute; right: 13px; width: 16px; height: 16px; margin: 0 !important; transition: transform .2s ease; }
.side-nav-group-toggle:not(.collapsed) .nav-group-chevron { transform: rotate(180deg); }
.side-nav-second-level {
    margin: 2px 14px 8px 28px !important;
    padding: 4px 0 4px 18px !important;
    border-left: 1px solid #dbe6df;
    list-style: none;
}
.side-nav-second-level li a { display: block; position: relative; padding: 6px 10px !important; border-radius: 9px; color: #69766f !important; font-size: .82rem; }
.side-nav-second-level li a::before { content: ''; position: absolute; left: -13px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #c0cec5; transform: translateY(-50%); }
.side-nav-second-level li a:hover { color: var(--inv-brand-dark) !important; background: #f2f7f4; }
.side-nav-second-level li a.active { color: var(--inv-brand-dark) !important; background: var(--inv-brand-soft); font-weight: 680; }
.side-nav-second-level li a.active::before { background: var(--inv-brand); box-shadow: 0 0 0 3px rgba(22,120,74,.12); }

body[data-layout=detached] .leftside-menu .side-nav .side-nav-link.active,
body[data-layout=detached] .leftside-menu .side-nav .side-nav-link.group-active,
body[data-layout=detached] .leftside-menu .side-nav .side-nav-link[aria-expanded="true"] {
    color: var(--inv-brand-dark) !important;
    background: #eef7f2 !important;
    font-weight: 680 !important;
    box-shadow: none !important;
}

body[data-layout=detached] .leftside-menu .side-nav .side-nav-link.active .ui-icon,
body[data-layout=detached] .leftside-menu .side-nav .side-nav-link.group-active .ui-icon,
body[data-layout=detached] .leftside-menu .side-nav .side-nav-link[aria-expanded="true"] .ui-icon,
body[data-layout=detached] .leftside-menu .side-nav .side-nav-link.active i,
body[data-layout=detached] .leftside-menu .side-nav .side-nav-link.group-active i,
body[data-layout=detached] .leftside-menu .side-nav .side-nav-link[aria-expanded="true"] i {
    color: var(--inv-brand) !important;
}

body[data-layout=detached] .leftside-menu .side-nav-second-level li a.active,
body[data-layout=detached] .leftside-menu .side-nav-second-level li.active > a {
    color: var(--inv-brand-dark) !important;
    background: var(--inv-brand-soft) !important;
    font-weight: 700 !important;
}

body[data-layout=detached] .leftside-menu .side-nav-second-level li a.active::before,
body[data-layout=detached] .leftside-menu .side-nav-second-level li.active > a::before {
    background: var(--inv-brand) !important;
    box-shadow: 0 0 0 3px rgba(22,120,74,.12) !important;
}

body[data-layout=detached] .leftside-menu,
body[data-layout=detached] .leftside-menu-detached {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body[data-layout=detached] .leftside-menu::-webkit-scrollbar,
body[data-layout=detached] .leftside-menu-detached::-webkit-scrollbar,
body[data-layout=detached] .leftside-menu .simplebar-scrollbar,
body[data-layout=detached] .leftside-menu .simplebar-track {
    display: none !important;
    width: 0 !important;
}

.content-page .content { padding-bottom: 48px; }
.page-title-box { padding: 30px 0 20px; }
.page-title-box .page-title { color: var(--inv-ink); font-size: 1.65rem; font-weight: 720; letter-spacing: -.035em; }
.page-title-subtitle { color: var(--inv-muted); max-width: 680px; margin: -12px 0 0; }
.content-page { min-height: calc(100vh - 70px); }
.content-page .content > .d-flex:first-child,
.content-page .content > .card:first-child { animation: invFadeUp .22s ease both; }

.card {
    border: 1px solid var(--inv-border);
    border-radius: var(--inv-radius);
    box-shadow: var(--inv-shadow);
    overflow: hidden;
}
.card-body { padding: 1.4rem; }
.table-card-body { overflow-x: auto; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    border-radius: 9px;
    font-weight: 650;
    padding: .55rem .9rem;
}
.btn-sm { gap: .2rem; padding: .38rem .62rem; }
.btn i { font-size: 1rem; line-height: 1; }
.btn-success { background: var(--inv-brand); border-color: var(--inv-brand); }
.btn-success:hover, .btn-success:focus { background: var(--inv-brand-dark); border-color: var(--inv-brand-dark); transform: translateY(-1px); }
.btn-light { background: #fff; border-color: var(--inv-border); color: #4f5d55; }
.btn-outline-primary { border-color: rgba(22,120,74,.28); color: var(--inv-brand-dark); }
.btn-outline-primary:hover { background: var(--inv-brand); border-color: var(--inv-brand); color: #fff; }
.btn-outline-danger { border-color: rgba(194,59,59,.32); }
.btn-outline-success { border-color: rgba(22,120,74,.32); }
.d-inline + .d-inline,
.btn + .btn,
.btn + form,
form + .btn,
form.d-inline + form.d-inline,
a.btn + form.d-inline,
form.d-inline + a.btn { margin-left: .28rem; }

.form-label { color: #35423b; font-weight: 620; margin-bottom: .45rem; }
.form-control, .form-select {
    min-height: 44px;
    border-color: #cfd9d3;
    border-radius: 9px;
    color: var(--inv-ink);
}
.form-control:focus, .form-select:focus { border-color: var(--inv-brand); box-shadow: 0 0 0 .2rem rgba(22,120,74,.12); }
.form-text { color: var(--inv-muted); }

.table { color: #314039; }
.table > :not(caption) > * > * { padding: .9rem .8rem; border-bottom-color: #e9eeeb; vertical-align: middle; }
.table thead th { color: #66736c; background: #f7faf8 !important; border-bottom: 1px solid var(--inv-border); font-size: .72rem; letter-spacing: .045em; text-transform: uppercase; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --ct-table-accent-bg: rgba(242,247,244,.62); }
.table tbody tr:hover > * { background: #f0f7f3; }
.table td .btn { white-space: nowrap; }
.table code {
    padding: .22rem .45rem;
    border-radius: 7px;
    background: #f2f7f4;
    color: var(--inv-brand-dark);
    font-weight: 700;
}
.action-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; }
.action-icon:hover { background: var(--inv-brand-soft); }

.dataTables_wrapper .dataTables_filter input { min-height: 40px; border: 1px solid #cfd9d3; border-radius: 9px; padding: .4rem .7rem; }
.dataTables_wrapper .dataTables_length select { border: 1px solid #cfd9d3; border-radius: 8px; }
.dataTables_info { color: var(--inv-muted) !important; }
.page-link { border-radius: 7px !important; margin: 0 2px; border: 0; color: var(--inv-brand-dark); }
.page-item.active .page-link { background: var(--inv-brand); }

.badge { border-radius: 999px; padding: .42em .7em; font-weight: 650; }
.alert { border: 0; border-radius: 11px; box-shadow: 0 8px 22px rgba(23,35,29,.06); }
.modal-content { border: 0; border-radius: var(--inv-radius); box-shadow: 0 24px 70px rgba(23,35,29,.2); }
.dropdown-menu {
    border-color: var(--inv-border);
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(20,38,29,.15);
}
.dropdown-item { border-radius: 8px; }
.dropdown-item.active,
.dropdown-item:active { background: var(--inv-brand); }

.inv-toast-container {
    z-index: 11050;
    top: 78px !important;
    width: min(390px, calc(100vw - 20px));
    pointer-events: none;
}

.inv-toast {
    width: 100%;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid rgba(223, 231, 226, .95);
    border-left: 5px solid var(--toast-color, var(--inv-brand));
    border-radius: 14px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 46px rgba(20,38,29,.18);
    color: var(--inv-ink);
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.inv-toast .toast-body {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 12px 12px 12px 13px;
}

.inv-toast-icon {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    background: var(--toast-bg, var(--inv-brand-soft));
    color: var(--toast-color, var(--inv-brand));
    font-size: 1.2rem;
}

.inv-toast-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.25;
}

.inv-toast-copy strong {
    color: var(--inv-ink);
    font-size: .86rem;
    font-weight: 780;
}

.inv-toast-copy span {
    color: #5c6a62;
    font-size: .82rem;
}

.inv-toast .btn-close {
    width: .75rem;
    height: .75rem;
    margin-right: 2px;
}

.inv-toast-success { --toast-color: #16784a; --toast-bg: #eaf6ef; }
.inv-toast-error { --toast-color: #c23b3b; --toast-bg: #fff0f0; }
.inv-toast-warning { --toast-color: #b56b08; --toast-bg: #fff7e8; }
.inv-toast-info { --toast-color: #257a90; --toast-bg: #edf8fb; }

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 28px 0 22px;
    padding: 26px 28px;
    color: #fff;
    border-radius: 18px;
    background: linear-gradient(120deg, #113d2b 0%, #16784a 66%, #319260 100%);
    box-shadow: 0 16px 38px rgba(18, 87, 54, .18);
    overflow: hidden;
    position: relative;
}
.dashboard-hero::after { content: ''; position: absolute; width: 230px; height: 230px; right: -60px; top: -100px; border: 45px solid rgba(255,255,255,.07); border-radius: 50%; }
.dashboard-hero > * { position: relative; z-index: 1; }
.dashboard-eyebrow { color: #a9dfc0; font-weight: 700; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.dashboard-hero h1 { color: #fff; margin: 5px 0 6px; font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -.04em; }
.dashboard-hero p { color: rgba(255,255,255,.74); margin: 0; }
.dashboard-quick-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.dashboard-quick-actions .btn { white-space: nowrap; background: #fff; color: var(--inv-brand-dark); border: 0; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 25px 0 12px; }
.section-heading h2 { margin: 0; font-size: 1.05rem; font-weight: 720; letter-spacing: -.02em; }
.section-heading p { margin: 3px 0 0; color: var(--inv-muted); font-size: .86rem; }

.metric-card { height: 100%; box-shadow: none; }
.metric-card .card-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.metric-label { color: var(--inv-muted); font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .045em; }
.metric-value { margin: 4px 0 0; font-size: 2rem; line-height: 1; font-weight: 750; letter-spacing: -.045em; }
.metric-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--inv-brand-soft); color: var(--inv-brand); font-size: 1.35rem; }

.alert-card { height: 100%; box-shadow: none; border-left: 4px solid var(--alert-color, #809087); }
.alert-card .alert-number { font-size: 1.65rem; font-weight: 740; line-height: 1; margin: 12px 0 7px; }
.alert-card .alert-label { color: var(--inv-muted); }
.alert-card-danger { --alert-color: #d35454; }
.alert-card-warning { --alert-color: #d18a26; }
.alert-card-info { --alert-color: #368aa0; }
.alert-card-neutral { --alert-color: #7a8580; }

.chart-card { height: 100%; }
.chart-card .card-title { font-size: 1rem; font-weight: 700; }
.empty-chart { display: grid; place-items: center; height: 280px; color: var(--inv-muted); text-align: center; }
.empty-state {
    display: grid;
    place-items: center;
    min-height: 180px;
    padding: 32px;
    border: 1px dashed #cfd9d3;
    border-radius: var(--inv-radius);
    background: #f9fbfa;
    color: var(--inv-muted);
    text-align: center;
}

.password-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(22,120,74,.14);
    border-radius: 14px;
    background: linear-gradient(135deg, #f4fbf7, #fff);
}

.password-panel-icon {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 14px;
    background: var(--inv-brand-soft);
    color: var(--inv-brand);
    font-size: 1.45rem;
}

.password-input-group .btn {
    border-color: #cfd9d3;
}

.password-strength {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.password-strength span {
    height: 6px;
    border-radius: 999px;
    background: #dfe7e2;
}

.password-strength[data-score="1"] span:nth-child(-n+1) { background: #c23b3b; }
.password-strength[data-score="2"] span:nth-child(-n+2) { background: #d18a26; }
.password-strength[data-score="3"] span:nth-child(-n+3) { background: #35b8e0; }
.password-strength[data-score="4"] span:nth-child(-n+4) { background: var(--inv-brand); }

.ceco-sector-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(22,120,74,.16);
    border-radius: 13px;
    background: linear-gradient(135deg, #f4fbf7, #fff);
    color: #536159;
}

.ceco-sector-summary span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e2ebe6;
    font-weight: 680;
}

.ceco-sector-summary i {
    color: var(--inv-brand);
}

.alerts-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 18px;
    margin: 24px 0 18px;
    padding: 26px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 88% 0%, rgba(255,255,255,.16), transparent 14rem),
        linear-gradient(120deg, #123c2b, #16784a 68%, #319260);
    color: #fff;
    box-shadow: 0 16px 38px rgba(18, 87, 54, .18);
}

.alerts-hero h1 {
    margin: 5px 0 6px;
    color: #fff;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    letter-spacing: -.045em;
}

.alerts-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255,255,255,.76);
}

.alerts-priority {
    display: grid;
    min-width: min(320px, 100%);
    align-content: center;
    gap: 2px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 15px;
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(8px);
}

.alerts-priority span {
    color: rgba(255,255,255,.68);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.alerts-priority strong {
    color: #fff;
    font-size: 1.55rem;
    line-height: 1.1;
}

.alerts-priority small {
    color: rgba(255,255,255,.78);
}

.alerts-command-grid {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(420px, 1.25fr) minmax(260px, .75fr);
    gap: 16px;
    margin-bottom: 22px;
}

.alerts-health-card,
.alerts-next-card {
    height: 100%;
}

.alerts-health-card .card-body,
.alerts-next-card .card-body {
    display: flex;
    flex-direction: column;
}

.alerts-health-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.alerts-health-top span,
.alerts-detail-header span {
    color: var(--inv-muted);
    font-size: .72rem;
    font-weight: 820;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.alerts-health-top strong {
    color: var(--inv-ink);
    font-size: 2.2rem;
    line-height: .95;
    font-weight: 860;
}

.alerts-health-bar {
    height: 10px;
    margin: 18px 0 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7eee9;
}

.alerts-health-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--health-color, var(--inv-brand));
}

.alerts-health-card p {
    margin: 0 0 16px;
    color: #5f6e66;
    line-height: 1.55;
}

.alerts-health-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: auto;
}

.alerts-health-metrics div {
    padding: 10px;
    border-radius: 12px;
    background: #f7faf8;
}

.alerts-health-metrics span {
    display: block;
    color: var(--inv-muted);
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.alerts-health-metrics strong {
    display: block;
    margin-top: 3px;
    color: var(--inv-ink);
    font-size: .95rem;
    font-weight: 820;
}

.alerts-health-success { --health-color: #16784a; }
.alerts-health-warning { --health-color: #d18a26; }
.alerts-health-danger { --health-color: #c23b3b; }

.alerts-action-list {
    display: grid;
    gap: 8px;
}

.alerts-action-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 22px;
    gap: 12px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid #e2ebe6;
    border-radius: 13px;
    color: inherit;
    background: #fff;
}

.alerts-action-item:hover {
    color: inherit;
    border-color: rgba(22,120,74,.25);
    background: #f8fbf9;
    transform: translateY(-1px);
}

.alerts-action-rank {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 11px;
    background: var(--inv-brand-soft);
    color: var(--inv-brand-dark);
    font-weight: 860;
}

.alerts-action-copy {
    min-width: 0;
}

.alerts-action-copy strong,
.alerts-action-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alerts-action-copy strong {
    color: var(--inv-ink);
    font-weight: 780;
}

.alerts-action-copy small {
    margin-top: 2px;
    color: var(--inv-muted);
}

.alerts-action-item > i {
    color: var(--inv-brand);
}

.alerts-summary-stack {
    display: grid;
    gap: 10px;
}

.alert-pill-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e2ebe6;
    border-left: 4px solid var(--alert-color, var(--inv-brand));
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.alert-pill-card:hover {
    color: inherit;
    background: #f8fbf9;
    transform: translateY(-1px);
}

.alert-pill-card span {
    color: var(--inv-ink);
    font-weight: 800;
}

.alert-pill-card strong {
    grid-column: 2;
    grid-row: 1 / 3;
    color: var(--inv-ink);
    font-size: 1.55rem;
    line-height: 1;
    font-weight: 860;
}

.alert-pill-card small {
    color: var(--inv-muted);
    line-height: 1.35;
}

.alert-pill-danger { --alert-color: #c23b3b; }
.alert-pill-warning { --alert-color: #d18a26; }
.alert-pill-info { --alert-color: #257a90; }
.alert-pill-neutral { --alert-color: #6c757d; }

.alerts-detail-shell {
    margin-top: 24px;
}

.alerts-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    margin-bottom: 14px;
}

.alerts-detail-header h2 {
    margin: 3px 0 0;
    color: var(--inv-ink);
    font-size: 1.25rem;
    font-weight: 820;
    letter-spacing: -.025em;
}

.alerts-detail-header p {
    max-width: 560px;
    margin: 0;
    color: var(--inv-muted);
    line-height: 1.55;
}

.alert-summary-card {
    display: block;
    height: 100%;
    border-left: 4px solid var(--alert-color, var(--inv-brand));
    color: inherit;
    text-decoration: none;
}

.alert-summary-card:hover {
    color: inherit;
    transform: translateY(-2px);
}

.alert-summary-card .card-body {
    display: grid;
    gap: 3px;
}

.alert-summary-card span {
    color: var(--inv-muted);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.alert-summary-card strong {
    color: var(--inv-ink);
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
}

.alert-summary-card small {
    color: var(--inv-muted);
}

.alert-summary-danger { --alert-color: #c23b3b; }
.alert-summary-warning { --alert-color: #d18a26; }
.alert-summary-info { --alert-color: #257a90; }
.alert-summary-neutral { --alert-color: #6c757d; }

.mini-kpi {
    display: grid;
    gap: 2px;
    min-height: 74px;
    padding: 12px 14px;
    border-radius: 13px;
    background: #f8fbf9;
}

.mini-kpi span,
.mini-kpi small {
    color: var(--inv-muted);
}

.mini-kpi span {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.mini-kpi strong {
    color: var(--inv-ink);
    font-size: 1.4rem;
    font-weight: 800;
}

.alert-section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.alert-section-heading h5 {
    margin-bottom: 3px;
    font-weight: 800;
}

.alert-section-heading p {
    margin: 0;
    color: var(--inv-muted);
}

@media (max-width: 991.98px) {
    .alerts-hero {
        flex-direction: column;
        padding: 22px;
    }

    .alerts-command-grid {
        grid-template-columns: 1fr;
    }

    .alerts-detail-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* UX/UI refinement layer: lectura, densidad, responsive y consistencia visual */
body[data-layout=detached] .container-fluid {
    width: min(100%, 1920px);
}

.content-page .content {
    max-width: 1720px;
    margin-inline: auto;
}

.page-title-box {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.page-title-box::after {
    content: '';
    display: block;
    clear: both;
}

.page-title-box .page-title-right {
    float: none;
    margin-top: 0;
}

.page-title-box .page-title + p,
.page-title-subtitle {
    line-height: 1.55;
}

.card {
    background: linear-gradient(180deg, #fff 0%, #fff 78%, #fbfdfc 100%);
}

.card:hover {
    box-shadow: 0 14px 34px rgba(28, 54, 40, .09);
}

.card > .card-header {
    border-bottom-color: var(--inv-border);
    background: #fbfdfc;
}

.card h5,
.card .card-title {
    color: var(--inv-ink);
    font-weight: 760;
    letter-spacing: -.02em;
}

.metric-card {
    border-color: rgba(22, 120, 74, .16);
    background: radial-gradient(circle at top right, rgba(22,120,74,.08), transparent 36%), #fff;
}

.metric-card small {
    color: var(--inv-muted);
}

.metric-card .metric-value,
.tr-kpi-value,
.card-body > h3 {
    font-variant-numeric: tabular-nums;
}

.report-action-grid .btn {
    min-height: 42px;
    justify-content: center;
}

.btn-primary {
    background: #536de6;
    border-color: #536de6;
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-1px);
}

.btn-danger:hover,
.btn-warning:hover,
.btn-secondary:hover,
.btn-outline-secondary:hover,
.btn-light:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0) scale(.99);
}

.btn.btn-link {
    border-radius: 8px;
    text-decoration: none;
}

.table-responsive,
.table-card-body {
    scrollbar-color: rgba(22, 120, 74, .35) transparent;
    scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar,
.table-card-body::-webkit-scrollbar {
    height: 9px;
}

.table-responsive::-webkit-scrollbar-thumb,
.table-card-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(22, 120, 74, .26);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.table tbody td {
    max-width: 420px;
}

.table tbody td:not(.text-end):not(.text-center) {
    overflow-wrap: anywhere;
}

.table td.text-end,
.table th.text-end {
    font-variant-numeric: tabular-nums;
}

.table td.is-money,
.table td.money-cell {
    color: #18251e;
    font-weight: 720;
}

.table tr.row-attention > * {
    background: #fff8e8 !important;
}

.table tr.row-danger > * {
    background: #fff1f1 !important;
}

.row-actions,
td.row-actions,
td:has(.btn-sm),
td:has(.action-icon) {
    white-space: nowrap;
}

.badge.bg-light,
.badge.text-dark {
    border: 1px solid #dce7e1;
    background: #f6faf8 !important;
    color: #405047 !important;
}

.badge.bg-success,
.badge.bg-primary,
.badge.bg-info,
.badge.bg-warning,
.badge.bg-danger,
.badge.bg-secondary {
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.08);
}

.form-control:hover,
.form-select:hover {
    border-color: #afbeb6;
}

.form-control::placeholder {
    color: #9aa8a1;
}

textarea.form-control {
    min-height: 104px;
}

.modal-header,
.modal-footer {
    border-color: var(--inv-border);
}

.modal-header {
    background: #fbfdfc;
}

.modal-title {
    font-weight: 760;
    letter-spacing: -.02em;
}

.apexcharts-tooltip {
    border: 1px solid var(--inv-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 36px rgba(23,35,29,.16) !important;
}

.apexcharts-tooltip-title {
    border-bottom-color: var(--inv-border) !important;
    background: #f7faf8 !important;
    font-weight: 720 !important;
}

.chart-card .card-body {
    min-height: 360px;
}

.chart-card h5,
.chart-card .card-title {
    margin-bottom: 16px;
}

.empty-chart,
.empty-state {
    background:
        linear-gradient(#fff, #fff) padding-box,
        repeating-linear-gradient(135deg, rgba(22,120,74,.13) 0 8px, rgba(22,120,74,.03) 8px 16px) border-box;
}

.empty-chart {
    border: 1px dashed #d4e0d9;
    border-radius: 14px;
}

.inv-soft-panel {
    border: 1px solid var(--inv-border);
    border-radius: var(--inv-radius);
    background: #fbfdfc;
}

.inv-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.inv-toolbar .btn,
.page-title-right .btn {
    white-space: nowrap;
}

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

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(330px, .9fr) minmax(520px, 1.1fr);
    background: #f4f7f5;
}
.auth-panel { display: grid; place-items: center; padding: 48px clamp(28px, 6vw, 90px); }
.auth-card { width: min(430px, 100%); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 50px; color: var(--inv-ink); font-weight: 750; font-size: 1.05rem; }
.auth-brand .brand-mark { background: var(--inv-brand); color: #fff; margin: 0; }
.auth-title { font-size: 2rem; font-weight: 760; letter-spacing: -.045em; margin-bottom: 8px; }
.auth-copy { color: var(--inv-muted); margin-bottom: 32px; }
.auth-submit { min-height: 48px; margin-top: 8px; }
.auth-footer { color: #89948e; font-size: .78rem; margin-top: 38px; }
.auth-visual { margin: 16px 16px 16px 0; padding: clamp(36px, 6vw, 80px); border-radius: 24px; background: linear-gradient(145deg, #0f3d2a, #177d4c 70%, #40a26e); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.auth-visual::before, .auth-visual::after { content: ''; position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.auth-visual::before { width: 520px; height: 520px; right: -170px; top: -170px; }
.auth-visual::after { width: 360px; height: 360px; right: -90px; top: -90px; }
.auth-visual-content { position: relative; z-index: 1; max-width: 540px; }
.auth-visual-kicker { color: #a8dfbf; text-transform: uppercase; letter-spacing: .13em; font-size: .75rem; font-weight: 700; }
.auth-visual h2 { color: #fff; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.05; letter-spacing: -.055em; margin: 13px 0 18px; }
.auth-visual p { color: rgba(255,255,255,.74); font-size: 1rem; max-width: 470px; }
.auth-points { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.auth-point { padding: 9px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.07); font-size: .82rem; }

@media (max-width: 991.98px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { min-height: 100vh; }
    .dashboard-hero { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 991.98px) {
    .navbar-custom.topnav-navbar > .container-fluid {
        gap: 8px;
        padding-right: 10px;
        padding-left: 10px;
    }
    .button-menu-mobile {
        display: inline-flex !important;
        order: 0;
        flex: 0 0 44px;
    }
    .navbar-custom .topnav-logo {
        order: 1;
        flex: 1 1 auto;
        width: auto !important;
        max-width: calc(100vw - 170px);
    }
    .navbar-custom .topbar-menu {
        order: 2;
        flex: 0 0 auto;
        margin-left: 0 !important;
    }
    .topbar-brand-name {
        max-width: 100%;
        overflow: hidden;
    }
    .topbar-brand-name > span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .topnav-logo-lg { display: none !important; }
    .navbar-custom .topnav-logo .topnav-logo-sm.topbar-brand-mark { display: inline-grid !important; }
    .navbar-custom.topnav-navbar { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; }
    body { padding-top: 70px; }
    body[data-layout=detached] .wrapper,
    body[data-layout=detached] .container-fluid {
        max-width: 100% !important;
    }
    body[data-layout=detached] .content-page,
    body[data-layout=detached] .wrapper .content-page {
        margin-left: 0 !important;
        padding-left: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    body[data-layout=detached] .content-page .content {
        padding-right: 12px !important;
        padding-left: 12px !important;
    }
    body[data-layout=detached] .leftside-menu.leftside-menu-detached,
    body[data-layout=detached] .leftside-menu {
        display: block !important;
        position: fixed !important;
        top: 70px !important;
        bottom: 0 !important;
        left: 0 !important;
        width: min(86vw, 320px) !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: 0 16px 16px 0 !important;
        overflow-y: auto !important;
        transform: translateX(-105%);
        transition: transform .22s ease;
        z-index: 1001 !important;
    }
    body.mobile-sidebar-open,
    body.sidebar-enable { overflow: hidden; }
    body.mobile-sidebar-open .leftside-menu,
    body.sidebar-enable .leftside-menu {
        transform: translateX(0);
    }
    body.mobile-sidebar-open .mobile-sidebar-backdrop,
    body.sidebar-enable .mobile-sidebar-backdrop {
        display: block;
    }
    body[data-layout=detached] .content-page {
        padding-top: 0 !important;
    }
    .mobile-sidebar-backdrop { inset: 70px 0 0 0; }
    .leftbar-user { border-radius: 0; }
}

@media (max-width: 575.98px) {
    .auth-panel { padding: 32px 22px; }
    .auth-brand { margin-bottom: 36px; }
    .page-title-box .page-title { font-size: 1.4rem; }
    .page-title-box .page-title-right { float: none; margin-bottom: 12px; }
    .page-title-box .page-title-right .btn { width: 100%; }
    .dashboard-hero { margin-top: 16px; padding: 22px; }
    .dashboard-quick-actions { width: 100%; }
    .dashboard-quick-actions .btn { flex: 1; }
    .card-body { padding: 1.1rem; }
    .topbar-alert-button { width: 48px; }
    .topbar-alert-badge { right: 7px; }
    .topbar-profile-button { min-width: auto; padding: 0 10px !important; }
    .session-summary, .topbar-profile-button .session-chevron { display: none; }
    .navbar-custom .topnav-logo {
        max-width: calc(100vw - 148px);
    }
    .topbar-alerts { display: none; }
    .topbar-profile { height: 70px; }
    .session-avatar { width: 34px; height: 34px; border-radius: 10px; }

    .page-title-box {
        display: block;
        padding-top: 20px;
        padding-bottom: 14px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .inv-toolbar,
    .page-title-right {
        width: 100%;
    }

    .inv-toolbar .btn,
    .page-title-right .btn,
    .report-action-grid .btn {
        width: 100%;
    }

    .metric-value {
        font-size: 1.6rem;
    }

    .chart-card .card-body {
        min-height: 310px;
    }

    .table-responsive {
        margin-inline: -1.1rem;
        padding-inline: 1.1rem;
    }

    table.inv-enhanced-table:not(.dataTable):not(.datatable) {
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    table.inv-enhanced-table:not(.dataTable):not(.datatable) thead {
        display: none;
    }

    table.inv-enhanced-table:not(.dataTable):not(.datatable) tbody,
    table.inv-enhanced-table:not(.dataTable):not(.datatable) tr,
    table.inv-enhanced-table:not(.dataTable):not(.datatable) td {
        display: block;
        width: 100%;
    }

    table.inv-enhanced-table:not(.dataTable):not(.datatable) tbody tr {
        padding: 10px 12px;
        border: 1px solid var(--inv-border);
        border-radius: 13px;
        background: #fff;
        box-shadow: 0 8px 18px rgba(23,35,29,.05);
    }

    table.inv-enhanced-table:not(.dataTable):not(.datatable) tbody td {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        max-width: none;
        padding: .52rem .2rem;
        border: 0;
        text-align: right !important;
    }

    table.inv-enhanced-table:not(.dataTable):not(.datatable) tbody td::before {
        content: attr(data-label);
        color: var(--inv-muted);
        font-size: .72rem;
        font-weight: 720;
        letter-spacing: .04em;
        text-align: left;
        text-transform: uppercase;
    }

    table.inv-enhanced-table:not(.dataTable):not(.datatable) td.row-actions {
        justify-content: flex-end;
        flex-wrap: wrap;
        padding-top: .75rem;
    }

    table.inv-enhanced-table:not(.dataTable):not(.datatable) td.row-actions::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Sistema visual 100%: capa UX/UI global */
.inv-app-shell {
    background:
        radial-gradient(circle at 18% 0%, rgba(22,120,74,.08), transparent 30rem),
        radial-gradient(circle at 90% 8%, rgba(83,109,230,.06), transparent 28rem),
        var(--inv-bg);
}

.inv-page-content {
    display: flow-root;
}

.inv-page-header {
    position: relative;
    margin: 20px 0 22px;
    padding: 18px 0 14px;
    border-bottom: 1px solid rgba(223,231,226,.72);
}

.inv-page-header .page-title {
    margin: 2px 0 0;
    line-height: 1.05;
}

.inv-page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    color: var(--inv-brand);
    font-size: .72rem;
    font-weight: 820;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.inv-page-kicker::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 5px rgba(22,120,74,.10);
}

.inv-card {
    isolation: isolate;
    position: relative;
}

.inv-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    opacity: 0;
    background: linear-gradient(90deg, var(--inv-brand), #87c9a2, transparent);
    transition: opacity .18s ease;
}

.inv-card:hover::before {
    opacity: 1;
}

.inv-card-heading {
    display: flex;
    align-items: center;
    gap: 9px;
}

.inv-card-heading::before {
    content: '';
    width: 9px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--inv-brand), #8fc9a8);
}

.inv-soft-panel,
.card .bg-light,
.card .bg-light-subtle {
    border-color: rgba(22,120,74,.13) !important;
    background: linear-gradient(135deg, #f8fbf9, #fff) !important;
}

.inv-form {
    --field-gap: 1rem;
}

.inv-form .row {
    row-gap: var(--field-gap);
}

.inv-form .form-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.inv-form .input-group-text {
    border-color: #cfd9d3;
    border-radius: 9px;
    background: #f7faf8;
    color: var(--inv-muted);
}

.inv-form .form-control,
.inv-form .form-select {
    background-color: rgba(255,255,255,.96);
}

.inv-form .form-control:disabled,
.inv-form .form-select:disabled,
.inv-form .form-control[readonly] {
    background-color: #f4f8f5;
    color: #7a8580;
}

.inv-tabs {
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--inv-border) !important;
    border-radius: 16px;
    background: rgba(255,255,255,.76);
    box-shadow: 0 10px 26px rgba(28,54,40,.055);
}

.inv-tabs .nav-item {
    margin: 0 !important;
}

.inv-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: .58rem .9rem;
    border: 0 !important;
    border-radius: 11px !important;
    color: #536159;
    font-weight: 720;
    white-space: nowrap;
}

.inv-tabs .nav-link:hover {
    background: #f0f7f3;
    color: var(--inv-brand-dark);
}

.inv-tabs .nav-link.active,
.inv-tabs .nav-item.show .nav-link {
    background: linear-gradient(135deg, #536de6, #16784a) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(22,120,74,.18);
}

.inv-tabs .nav-link.active i {
    color: currentColor;
}

.inv-enhanced-table {
    --table-radius: 12px;
}

.inv-enhanced-table thead th:first-child {
    border-top-left-radius: var(--table-radius);
}

.inv-enhanced-table thead th:last-child {
    border-top-right-radius: var(--table-radius);
}

.inv-enhanced-table tbody tr {
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.inv-enhanced-table tbody tr:hover {
    transform: translateY(-1px);
}

.inv-enhanced-table .row-actions {
    min-width: 112px;
}

.inv-empty-inline {
    display: grid;
    place-items: center;
    gap: 7px;
    min-height: 130px;
    width: 100%;
    color: var(--inv-muted);
    text-align: center;
}

.inv-empty-inline i {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: var(--inv-brand-soft);
    color: var(--inv-brand);
    font-size: 1.35rem;
}

.inv-chart-ready {
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94)),
        radial-gradient(circle at 88% 8%, rgba(22,120,74,.10), transparent 14rem);
}

.apexcharts-xaxis-label,
.apexcharts-yaxis-label {
    fill: #8b9a92 !important;
    font-size: 11px;
}

.apexcharts-legend-text {
    color: #5f6e66 !important;
    font-weight: 650 !important;
}

.apexcharts-menu {
    border: 1px solid var(--inv-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 34px rgba(23,35,29,.15) !important;
    overflow: hidden;
}

.dataTables_wrapper {
    display: grid;
    gap: 12px;
}

.dataTables_wrapper .row:first-child,
.dataTables_wrapper .row:last-child {
    align-items: center;
    row-gap: 10px;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
    color: var(--inv-muted);
    font-size: .84rem;
    font-weight: 650;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: min(280px, 100%);
    margin-left: 8px;
    background: #fff;
}

.pagination {
    gap: 3px;
}

.page-link:hover {
    background: var(--inv-brand-soft);
    color: var(--inv-brand-dark);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge.bg-success::before,
.badge.text-success::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}

.badge.bg-danger::before,
.badge.text-danger::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}

.topbar-dropdown-menu {
    animation: invDropdown .16s ease both;
}

@keyframes invDropdown {
    from { opacity: 0; transform: translateY(4px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 992px) {
    .leftside-menu-detached {
        position: sticky;
        top: 82px;
        max-height: calc(100vh - 92px);
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .leftside-menu-detached::-webkit-scrollbar {
        width: 0;
        height: 0;
    }
}

@media (max-width: 767.98px) {
    .inv-page-header {
        margin-top: 12px;
    }

    .inv-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 7px;
        scroll-snap-type: x mandatory;
    }

    .inv-tabs .nav-item {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .inv-tabs .nav-link {
        min-width: max-content;
        padding-inline: .82rem;
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        text-align: left !important;
    }

    .dataTables_wrapper .dataTables_filter label,
    .dataTables_wrapper .dataTables_length label {
        display: grid;
        gap: 6px;
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dataTables_length select {
        width: 100% !important;
        margin-left: 0;
    }

    .btn {
        min-height: 42px;
    }

    .btn-sm {
        min-height: 36px;
    }
}

/* Respiración visual: evita textos pegados en tablas, tarjetas y centros de gestión */
.content-page .content {
    line-height: 1.58;
}

.card-body > p,
.card-body .text-muted,
.alert-section-heading p,
.section-heading p {
    line-height: 1.55;
}

.card-body {
    --card-inner-gap: 1rem;
}

.card-body > * + *:not(.table-responsive):not(table):not(.row):not(.tab-content) {
    margin-top: var(--card-inner-gap);
}

.table > :not(caption) > * > * {
    padding-top: 1rem;
    padding-bottom: 1rem;
    line-height: 1.45;
}

.table td strong,
.table td code,
.table td small,
.table td .badge {
    margin-block: 2px;
}

.table td small {
    display: inline-block;
    line-height: 1.45;
}

.table td code {
    display: inline-block;
    line-height: 1.35;
}

.table td .btn,
.row-actions .btn,
td.row-actions .btn {
    margin-top: 2px;
    margin-bottom: 2px;
}

.badge {
    min-height: 24px;
    line-height: 1.2;
}

.btn {
    gap: .4rem;
}

.btn-sm {
    gap: .32rem;
}

.alerts-hero {
    margin-bottom: 22px;
}

.alerts-hero p {
    line-height: 1.65;
}

.alerts-priority {
    gap: 7px;
}

.alerts-priority small {
    line-height: 1.5;
}

.alert-summary-card .card-body {
    gap: 8px;
    padding-block: 1.25rem;
}

.alert-summary-card small {
    display: block;
    line-height: 1.45;
}

.mini-kpi {
    gap: 6px;
}

.mini-kpi small {
    line-height: 1.4;
}

.alert-section-heading {
    margin-bottom: 18px;
}

.alert-section-heading h5 {
    margin-bottom: 7px;
}

.alert-tabs {
    margin-top: 18px;
}

.alert-tabs .nav-link {
    gap: 7px;
    padding-block: .72rem;
}

@media (max-width: 575.98px) {
    .table > :not(caption) > * > * {
        padding-top: .85rem;
        padding-bottom: .85rem;
    }

    .alerts-hero {
        padding-inline: 1rem;
    }
}
