/* =====================================================================
   Axsis UI kit - ui-modern.css v2.13 (AdminLTE 2 edition)
   Sections 1-21: SudamericaInspection src/Content/ui-modern.css ?v=2.10 (2026-11-23), verbatim. That app is the
   reference implementation; its base is the Catalogados design system v2.6. Section 22 (v2.11) is new in the kit.
   v2.12: section 1 focus rules restored from Catalogados v2.6 (lost in the port of SudamericaInspection v2.10).
   v2.12 also adds section 23: .ui-btn-soft / .ui-btn-ghost win again over the section 20 button colours.
   v2.13: section 24, legacy fixes found in TRACKER: headings use the body font, .hidden-xs hides on phones again,
   modal-footer .btn-outline is visible, MagicGrid group rows lose the inline #CECECE, no link URLs in print.
   Copy this file to <project>/Content/ui-modern.css unchanged. App-specific rules go in
   Content/ui-modules/<prefix>-<group>.css (see design-system/07-CSS-Policy.md); a change here is a
   design-system change for every Axsis app (log it in 10-Change-Log.md of the kit and of the app).
   Sections 19-21 are the AdminLTE layer added on top of Catalogados; section 15 still covers
   Select2 3.5 (BIACCO, ARTSPOT and TRACKER ship select2 3.5.1).
   Loaded after ~/Content/css. Values follow .docs/DESIGN_SYSTEM/02-Tokens.md.
   Literal values are used everywhere; --ui-* custom properties are a convenience
   layer only. Script-owned state (display, plugin geometry, menu state classes)
   is never overridden here.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Tokens and base
   --------------------------------------------------------------------- */
body.ui-modern {
    --ui-canvas: #f5f7fb;
    --ui-surface: #ffffff;
    --ui-surface-muted: #f8fafc;
    --ui-border: #e4e7ec;
    --ui-border-strong: #d0d5dd;
    --ui-border-input: #8a94a6;
    --ui-text: #101828;
    --ui-text-secondary: #475467;
    --ui-text-muted: #667085;
    --ui-primary: #2563eb;
    --ui-primary-hover: #1d4ed8;
    --ui-primary-pressed: #1e40af;
    --ui-primary-tint: #eff6ff;
    --ui-ring: 0 0 0 3px rgba(37,99,235,.30);
    --ui-shadow-card: 0 1px 2px rgba(16,24,40,.05);
    --ui-shadow-raised: 0 4px 12px rgba(16,24,40,.08);
    --ui-shadow-overlay: 0 12px 32px rgba(16,24,40,.18);
    color: #101828;
    background: #f5f7fb;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
body.ui-modern a { color: #1d4ed8; }
body.ui-modern a:hover,
body.ui-modern a:focus { color: #1e40af; }
body.ui-modern h1, body.ui-modern h2, body.ui-modern h3,
body.ui-modern h4, body.ui-modern h5, body.ui-modern h6 { color: #101828; font-weight: 600; letter-spacing: -.005em; }
body.ui-modern h1 { font-size: 22px; }
body.ui-modern h2 { font-size: 20px; }
body.ui-modern h3 { font-size: 18px; }
body.ui-modern h4 { font-size: 16px; }
body.ui-modern h5 { font-size: 14px; }
body.ui-modern hr { border-color: #e4e7ec; }
body.ui-modern small, body.ui-modern .small { font-size: 12px; }
body.ui-modern .text-muted { color: #667085; }
body.ui-modern .text-primary { color: #1d4ed8; }
body.ui-modern .text-success { color: #067647; }
body.ui-modern .text-warning { color: #93370d; }
body.ui-modern .text-danger { color: #b42318; }
body.ui-modern .text-info { color: #175cd3; }
body.ui-modern ::selection { background: #bfdbfe; color: #101828; }

/* Focus: keep :focus (old browsers), refine with :focus-visible. Inputs use a ring. */
body.ui-modern a:focus,
body.ui-modern button:focus,
body.ui-modern [tabindex]:focus,
body.ui-modern .btn:focus,
body.ui-modern input[type=checkbox]:focus,
body.ui-modern input[type=radio]:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
body.ui-modern a:focus:not(:focus-visible),
body.ui-modern button:focus:not(:focus-visible),
body.ui-modern .btn:focus:not(:focus-visible) { outline: none; }

/* ---------------------------------------------------------------------
   2. Shell: AdminLTE 2 top bar, sidebar, content, footer  (D-A)
   White 56px top bar, slate #0f172a 240px sidebar, blue #2563eb.
   Overrides skin-green; AdminLTE state classes (sidebar-collapse, sidebar-open)
   and the treeview markup stay authoritative. Drawer breakpoint 767px = AdminLTE's.
   --------------------------------------------------------------------- */
body.ui-modern .wrapper { background: #f5f7fb; }
body.ui-modern .main-header { max-height: none; z-index: 1030; background: #ffffff; border-bottom: 1px solid #e4e7ec; }
body.ui-modern .main-header .logo,
body.ui-modern .main-header .logo:hover {
    display: flex;
    align-items: center;
    gap: 10px;
    float: left;
    width: 240px;
    height: 56px;
    padding: 0 16px;
    overflow: hidden;
    background: #ffffff;
    color: #101828;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.2;
    text-align: left;
    border: 0;
}
body.ui-modern .main-header .logo .logo-lg { display: flex; align-items: center; gap: 10px; min-width: 0; }
body.ui-modern .main-header .logo .logo-mini { display: none; }
body.ui-modern .ui-brand-mark {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}
body.ui-modern .ui-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
body.ui-modern .ui-brand-text b { overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
body.ui-modern .ui-brand-text small { overflow: hidden; color: #667085; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

body.ui-modern .main-header .navbar {
    min-height: 56px;
    height: 56px;
    margin-left: 240px;
    margin-bottom: 0;
    background: #ffffff;
    border: 0;
}
body.ui-modern .main-header .navbar .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    float: left;
    width: 48px;
    height: 56px;
    padding: 0;
    background: transparent;
    color: #475467;
    font-family: FontAwesome;
    font-size: 18px;
}
body.ui-modern .main-header .navbar .sidebar-toggle:before { content: "\f0c9"; }
body.ui-modern .main-header .navbar .sidebar-toggle:hover,
body.ui-modern .main-header .navbar .sidebar-toggle:focus { background: #f2f4f7; color: #101828; }
body.ui-modern .main-header .navbar .navbar-custom-menu,
body.ui-modern .main-header .navbar .navbar-right { float: right; }
body.ui-modern .main-header .navbar .navbar-custom-menu > .navbar-nav { display: flex; align-items: center; height: 56px; margin: 0; }
body.ui-modern .main-header .navbar .navbar-nav > li { float: none; }
body.ui-modern .main-header .navbar .navbar-nav > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 56px;
    padding: 0 12px;
    color: #344054;
    background: transparent;
    line-height: 1;
}
body.ui-modern .main-header .navbar .navbar-nav > li > a:hover,
body.ui-modern .main-header .navbar .navbar-nav > li > a:focus,
body.ui-modern .main-header .navbar .navbar-nav > .open > a { background: #f2f4f7; color: #101828; }
body.ui-modern .main-header .navbar .navbar-nav > li > a:focus { outline: 2px solid #2563eb; outline-offset: -2px; }
body.ui-modern .main-header .navbar .navbar-nav > li > a:focus:not(:focus-visible) { outline: none; }
body.ui-modern .main-header .navbar .user-image { float: none; width: 32px; height: 32px; margin: 0; border-radius: 50%; object-fit: cover; }
body.ui-modern .main-header .navbar .navbar-nav > li:not(.user-menu) { margin: 0 4px 0 0; }
body.ui-modern .main-header .navbar .navbar-nav > li > .btn { margin: 0 12px 0 0; }
/* The expand / refresh buttons were green (.btn-success); they are tool buttons now. */
body.ui-modern .main-header .navbar .btn-success {
    width: 36px;
    height: 36px;
    padding: 0;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    color: #344054;
}
body.ui-modern .main-header .navbar .btn-success:hover { background: #f2f4f7; border-color: #98a2b3; color: #101828; }
body.ui-modern .main-header .navbar li[style] { margin-top: 0 !important; }

/* User menu */
body.ui-modern .navbar-nav > .user-menu > .dropdown-menu {
    width: 300px;
    max-width: calc(100vw - 16px);
    margin-top: 4px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(16,24,40,.18) !important;
}
body.ui-modern .navbar-nav > .user-menu > .dropdown-menu > li.user-header {
    height: auto;
    padding: 20px 16px 12px;
    background: #f8fafc;
    color: #101828;
    border-bottom: 1px solid #eaecf0;
}
body.ui-modern .navbar-nav > .user-menu > .dropdown-menu > li.user-header > img { width: 64px; height: 64px; border: 2px solid #ffffff; box-shadow: 0 1px 3px rgba(16,24,40,.2); object-fit: cover; }
body.ui-modern .navbar-nav > .user-menu > .dropdown-menu > li.user-header > p { margin-top: 8px; color: #101828; font-size: 15px; font-weight: 600; }
body.ui-modern .navbar-nav > .user-menu > .dropdown-menu > li.user-header > p > small { display: block; margin-top: 2px; color: #667085; font-size: 12px; font-weight: 400; }
body.ui-modern .navbar-nav > .user-menu > .dropdown-menu > li.user-body { padding: 12px 16px; border: 0; background: #ffffff; color: #344054; }
body.ui-modern .navbar-nav > .user-menu > .dropdown-menu > li.user-body label { font-size: 12px; color: #475467; }
body.ui-modern .navbar-nav > .user-menu > .dropdown-menu > li.user-body .form-group { margin-bottom: 8px; }
body.ui-modern .navbar-nav > .user-menu > .dropdown-menu > li.user-footer { padding: 12px 16px; background: #f8fafc; border-top: 1px solid #eaecf0; }
body.ui-modern .navbar-nav > .user-menu > .dropdown-menu > li.user-footer:after { content: ""; display: table; clear: both; }

/* Sidebar */
body.ui-modern .main-sidebar,
body.ui-modern .left-side { position: fixed; top: 0; bottom: 0; width: 240px; padding-top: 56px; background: #0f172a; box-shadow: none; }
body.ui-modern .sidebar { padding-bottom: 16px; }
body.ui-modern .sidebar .user-panel { display: none; }
body.ui-modern .sidebar-form {
    margin: 12px 12px 4px;
    background: transparent;
    border: 0;
    border-radius: 8px;
}
body.ui-modern .sidebar-form input[type=text],
body.ui-modern .sidebar-form .btn {
    height: 36px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    box-shadow: none;
}
body.ui-modern .sidebar-form input[type=text] { border-radius: 8px 0 0 8px; border-right: 0; }
body.ui-modern .sidebar-form .btn { border-radius: 0 8px 8px 0; border-left: 0; color: #94a3b8; }
body.ui-modern .sidebar-form input[type=text]::placeholder { color: #94a3b8; }
body.ui-modern .sidebar-form input[type=text]:focus { background: #1e293b; color: #ffffff; border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96,165,250,.35); }
body.ui-modern .sidebar-menu { padding: 0 12px; }
body.ui-modern .sidebar-menu > li.header {
    padding: 14px 10px 6px;
    background: transparent;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
body.ui-modern .sidebar-menu > li { margin: 2px 0; }
body.ui-modern .sidebar-menu > li > a {
    padding: 9px 10px;
    border-left: 0;
    border-radius: 8px;
    color: #cbd5e1;
    line-height: 20px;
    transition: background-color .14s ease, color .14s ease;
}
body.ui-modern .sidebar-menu > li > a > .fa:first-child { width: 20px; margin-right: 2px; color: #94a3b8; text-align: center; }
body.ui-modern .sidebar-menu > li > a > .fa.pull-right { margin-top: 3px; width: auto; color: #64748b; }
body.ui-modern .sidebar-menu > li:hover > a,
body.ui-modern .sidebar-menu > li > a:focus { background: #1e293b; color: #ffffff; }
body.ui-modern .sidebar-menu > li:hover > a > .fa:first-child { color: #e2e8f0; }
body.ui-modern .sidebar-menu > li > a:focus { outline: 2px solid #60a5fa; outline-offset: -2px; }
body.ui-modern .sidebar-menu > li > a:focus:not(:focus-visible) { outline: none; }
body.ui-modern .sidebar-menu > li.active > a,
body.ui-modern .sidebar-menu > li.menu-open > a { background: rgba(59,130,246,.16); border-left: 0; color: #ffffff; }
body.ui-modern .sidebar-menu > li.active:not(.treeview) > a { box-shadow: inset 3px 0 0 #60a5fa; }
body.ui-modern .sidebar-menu > li.active > a > .fa:first-child { color: #93c5fd; }
body.ui-modern .sidebar-menu > li > .treeview-menu {
    margin: 2px 0 6px 19px;
    padding: 0 0 0 10px;
    background: transparent;
    border-left: 1px solid #1e293b;
}
body.ui-modern .sidebar-menu .treeview-menu > li > a {
    padding: 6px 10px 6px 8px;
    border-radius: 6px;
    color: #a7b3c6;
    font-size: 13.5px;
}
body.ui-modern .sidebar-menu .treeview-menu > li > a > .fa { width: 16px; color: #64748b; }
body.ui-modern .sidebar-menu .treeview-menu > li > a:hover,
body.ui-modern .sidebar-menu .treeview-menu > li > a:focus { background: #1e293b; color: #ffffff; }
body.ui-modern .sidebar-menu .treeview-menu > li.active > a { color: #ffffff; background: rgba(59,130,246,.16); }

/* Content */
body.ui-modern .content-wrapper,
body.ui-modern .right-side { margin-left: 240px; min-height: calc(100vh - 105px) !important; background: #f5f7fb; }
body.ui-modern .content-header,
body.ui-modern.skin-green .content-header { padding: 16px 24px 0 !important; }
body.ui-modern .content-header:after { content: ""; display: table; clear: both; }
body.ui-modern .content-header > .row { margin: 0; }
body.ui-modern .content-header > .row > .col-lg-12 { padding: 0; }
body.ui-modern .content-header .breadcrumb {
    position: static;
    float: none;
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 13px;
}
body.ui-modern .content-header .breadcrumb > li + li:before { padding: 0 6px; color: #98a2b3; }
body.ui-modern .content-header .breadcrumb > li > a { color: #475467; }
body.ui-modern .content-header .breadcrumb > li > a:hover { color: #1d4ed8; }
body.ui-modern .content-header .breadcrumb > li.active,
body.ui-modern .content-header .breadcrumb > li.active > a { color: #101828; font-weight: 600; }
body.ui-modern .content-header .pull-right[style] { margin-top: 0 !important; padding-right: 0 !important; }
body.ui-modern .content { padding: 16px 24px 24px !important; min-height: 0; }

/* Footer */
body.ui-modern .main-footer {
    margin-left: 240px;
    padding: 14px 24px;
    background: #ffffff;
    border-top: 1px solid #e4e7ec;
    color: #667085;
    font-size: 12px;
}
body.ui-modern .main-footer a { color: #475467; }

/* Collapsed (icon rail, >=768px): same width as the top bar height. */
@media (min-width: 768px) {
    body.ui-modern.sidebar-mini.sidebar-collapse .main-sidebar { width: 56px !important; }
    body.ui-modern.sidebar-mini.sidebar-collapse .content-wrapper,
    body.ui-modern.sidebar-mini.sidebar-collapse .right-side,
    body.ui-modern.sidebar-mini.sidebar-collapse .main-footer { margin-left: 56px !important; }
    body.ui-modern.sidebar-mini.sidebar-collapse .main-header .logo { width: 56px; padding: 0; justify-content: center; }
    body.ui-modern.sidebar-mini.sidebar-collapse .main-header .logo .logo-lg { display: none; }
    body.ui-modern.sidebar-mini.sidebar-collapse .main-header .logo .logo-mini { display: inline-flex; margin: 0; }
    body.ui-modern.sidebar-mini.sidebar-collapse .main-header .navbar { margin-left: 56px; }
    body.ui-modern.sidebar-mini.sidebar-collapse .sidebar-form,
    body.ui-modern.sidebar-mini.sidebar-collapse .sidebar-menu > li.header { display: none; }
    body.ui-modern.sidebar-mini.sidebar-collapse .sidebar-menu { padding: 0 8px; }
    body.ui-modern.sidebar-mini.sidebar-collapse .sidebar-menu > li > a { justify-content: center; padding-left: 0; padding-right: 0; text-align: center; }
    body.ui-modern.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right),
    body.ui-modern.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
        left: 40px;
        width: 220px;
        background: #0f172a;
        border-radius: 8px;
        box-shadow: 0 12px 32px rgba(16,24,40,.35);
    }
    body.ui-modern.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right) { margin-left: 0; padding: 9px 12px; background: #1e293b; color: #ffffff; }
    body.ui-modern.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu { top: 38px; margin-left: 0; padding: 6px; border: 0; }
}
/* Tablet widths: default to more room for content. */
@media (max-width: 991px) and (min-width: 768px) {
    body.ui-modern .content-header,
    body.ui-modern.skin-green .content-header { padding: 12px 16px 0 !important; }
    body.ui-modern .content { padding: 12px 16px 20px !important; }
}
/* <=767px: AdminLTE slides the sidebar in over the content (body.sidebar-open).
   v2 keeps one 56px bar and shows a labelled drawer with a scrim. */
@media (max-width: 767px) {
    body.ui-modern .main-header { display: flex; position: fixed; top: 0; left: 0; right: 0; height: 56px; }
    body.ui-modern .main-header .logo { flex: none; width: auto; padding: 0 0 0 12px; }
    body.ui-modern .main-header .logo .logo-lg { display: none; }
    body.ui-modern .main-header .logo .logo-mini { display: inline-flex; margin: 0; }
    body.ui-modern .main-header .navbar { flex: 1 1 auto; min-width: 0; margin-left: 0; }
    body.ui-modern .main-header .navbar .navbar-custom-menu { float: right; margin: 0; }
    body.ui-modern .main-header .navbar .navbar-nav > li > a { padding: 0 8px; }
    body.ui-modern .main-header .navbar .navbar-nav > li > .btn { margin-right: 8px; }
    body.ui-modern .main-header .navbar .navbar-nav > .user-menu > .dropdown-menu { position: absolute; right: 0; left: auto; }
    body.ui-modern .wrapper { padding-top: 56px; }
    body.ui-modern .main-sidebar,
    body.ui-modern .left-side { width: 272px; max-width: 85vw; transform: translate(-100%, 0); box-shadow: none; }
    body.ui-modern.sidebar-open .main-sidebar,
    body.ui-modern.sidebar-open .left-side { transform: translate(0, 0); box-shadow: 0 12px 32px rgba(16,24,40,.35); }
    body.ui-modern .content-wrapper,
    body.ui-modern .right-side,
    body.ui-modern .main-footer,
    body.ui-modern.sidebar-open .content-wrapper,
    body.ui-modern.sidebar-open .right-side,
    body.ui-modern.sidebar-open .main-footer { margin-left: 0 !important; transform: none; }
    body.ui-modern.sidebar-open:after {
        content: "";
        position: fixed;
        top: 56px;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 805;
        background: rgba(15,23,42,.45);
        pointer-events: none;
    }
    body.ui-modern .sidebar-menu > li > a { padding-top: 11px; padding-bottom: 11px; }
    body.ui-modern .content-header,
    body.ui-modern.skin-green .content-header { padding: 12px 16px 0 !important; }
    body.ui-modern .content-header .pull-right { float: none !important; margin-bottom: 8px; }
    body.ui-modern .content { padding: 12px 16px 20px !important; }
    body.ui-modern .main-footer { padding: 12px 16px; text-align: center; }
    body.ui-modern .login-box { padding: 24px 12px 16px; }
    body.ui-modern .login-box-body { padding: 24px 20px 20px; }
}

/* Login (Account/Login, standalone page with AdminLTE .login-box) */
body.ui-modern.login-page {
    min-height: 100vh;
    height: auto;
    background:
        radial-gradient(1200px 600px at 10% -10%, #dbeafe 0%, rgba(219,234,254,0) 60%),
        radial-gradient(900px 500px at 110% 110%, #e0e7ff 0%, rgba(224,231,255,0) 55%),
        #f5f7fb;
}
body.ui-modern .login-box { width: 100%; max-width: 440px; margin: 0 auto; padding: 48px 16px 24px; }
body.ui-modern .login-logo { margin-bottom: 20px; font-size: 22px; font-weight: 400; text-align: center; }
body.ui-modern .login-logo,
body.ui-modern .login-logo a { color: #101828; }
body.ui-modern .login-logo .logo-lg { display: inline-flex; align-items: center; gap: 10px; }
body.ui-modern .login-box-body {
    padding: 28px 28px 24px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.05);
    color: #344054;
}
body.ui-modern .login-box-msg { padding: 0 0 20px; color: #475467; font-size: 14px; text-align: center; }
/* The form keeps form-horizontal and its col-xs-4/8 rows; labels stack above the fields. */
body.ui-modern .login-box-body .form-horizontal .row > [class*=col-xs-] { width: 100%; float: none; }
body.ui-modern .login-box-body .form-horizontal .control-label { width: auto; padding: 0; text-align: left; }
body.ui-modern .login-box-body .form-horizontal .form-group { margin-left: 0; margin-right: 0; }
body.ui-modern .login-box-body .btn-primary { width: 100%; height: 40px; }
body.ui-modern .login-box-body p { margin: 12px 0 0; font-size: 13px; text-align: center; }
body.ui-modern .login-box-body .field-validation-error,
body.ui-modern .login-box-body .validation-summary-errors { font-size: 13px; }
/* ---------------------------------------------------------------------
   3. Page header
   --------------------------------------------------------------------- */
body.ui-modern .ui-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 24px;
}
body.ui-modern .ui-page-header:before,
body.ui-modern .ui-page-header:after { display: none; }
body.ui-modern .ui-page-heading { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 320px; }
body.ui-modern .ui-page-heading > div { min-width: 0; }
body.ui-modern .ui-page-title { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.3; color: #101828; }
body.ui-modern .ui-page-subtitle { margin: 2px 0 0; color: #475467; font-size: 14px; }
body.ui-modern .ui-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.ui-modern .ui-page-actions > .btn { float: none; margin: 0; }
body.ui-modern .ui-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 4px;
    padding: 0;
    list-style: none;
    color: #667085;
    font-size: 13px;
}
body.ui-modern .ui-breadcrumb a { color: #475467; text-decoration: none; }
body.ui-modern .ui-breadcrumb a:hover { color: #1d4ed8; }
body.ui-modern .ui-breadcrumb .fa { font-size: 11px; color: #98a2b3; }

/* ---------------------------------------------------------------------
   4. Icon chip
   --------------------------------------------------------------------- */
body.ui-modern .ui-icon-chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 16px;
    line-height: 1;
}
body.ui-modern .ui-icon-chip--lg { width: 44px; height: 44px; border-radius: 12px; font-size: 19px; }
body.ui-modern .ui-icon-chip--sm { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
body.ui-modern .ui-icon-chip--primary { background: #eff6ff; color: #1d4ed8; box-shadow: inset 0 0 0 1px #dbeafe; }
body.ui-modern .ui-icon-chip--success { background: #ecfdf3; color: #067647; box-shadow: inset 0 0 0 1px #d1fadf; }
body.ui-modern .ui-icon-chip--warning { background: #fffaeb; color: #b54708; box-shadow: inset 0 0 0 1px #fef0c7; }
body.ui-modern .ui-icon-chip--danger { background: #fef3f2; color: #b42318; box-shadow: inset 0 0 0 1px #fee4e2; }
body.ui-modern .ui-icon-chip--neutral { background: #f2f4f7; color: #475467; box-shadow: inset 0 0 0 1px #eaecf0; }

/* ---------------------------------------------------------------------
   5. Cards (and Bootstrap panels restyled as cards)
   --------------------------------------------------------------------- */
body.ui-modern .panel,
body.ui-modern .ui-card {
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
body.ui-modern .panel > .panel-heading {
    padding: 14px 20px;
    border-bottom: 1px solid #eaecf0;
    border-radius: 11px 11px 0 0;
}
body.ui-modern .panel-default > .panel-heading { background: #ffffff; color: #101828; border-color: #eaecf0; }
body.ui-modern .panel-primary { border-color: #bfdbfe; }
body.ui-modern .panel-primary > .panel-heading { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
body.ui-modern .panel-success, body.ui-modern .panel-green { border-color: #abefc6; }
body.ui-modern .panel-success > .panel-heading,
body.ui-modern .panel-green > .panel-heading { background: #ecfdf3; color: #067647; border-color: #abefc6; }
body.ui-modern .panel-warning, body.ui-modern .panel-yellow { border-color: #fedf89; }
body.ui-modern .panel-warning > .panel-heading,
body.ui-modern .panel-yellow > .panel-heading { background: #fffaeb; color: #93370d; border-color: #fedf89; }
body.ui-modern .panel-danger, body.ui-modern .panel-red { border-color: #fecdca; }
body.ui-modern .panel-danger > .panel-heading,
body.ui-modern .panel-red > .panel-heading { background: #fef3f2; color: #b42318; border-color: #fecdca; }
body.ui-modern .panel-info { border-color: #b2ddff; }
body.ui-modern .panel-info > .panel-heading { background: #eff8ff; color: #175cd3; border-color: #b2ddff; }
body.ui-modern .panel-green a, body.ui-modern .panel-red a, body.ui-modern .panel-yellow a { color: inherit; }
body.ui-modern .panel-heading h3,
body.ui-modern .panel-heading h4,
body.ui-modern .panel-title { margin-top: 2px; margin-bottom: 2px; font-size: 16px; font-weight: 600; line-height: 1.5; color: inherit; }
body.ui-modern .panel-body { padding: 20px; }
body.ui-modern .panel-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #eaecf0;
    border-radius: 0 0 11px 11px;
}
/* MagicGrid pagers use a Bootstrap .container inside panels; let it fit. */
body.ui-modern .panel-footer > .container,
body.ui-modern .magicgrid-footer > .container { width: auto; max-width: 100%; }
body.ui-modern .panel > .table-responsive:last-child,
body.ui-modern .panel > .table:last-child { border-radius: 0 0 11px 11px; }

body.ui-modern .ui-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #eaecf0;
    border-radius: 11px 11px 0 0;
}
body.ui-modern .ui-card-header:before,
body.ui-modern .ui-card-header:after { display: none; }
body.ui-modern .ui-card-heading { flex: 1 1 200px; min-width: 0; }
body.ui-modern .ui-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #101828;
}
body.ui-modern .ui-card-title > h2,
body.ui-modern .ui-card-title > h3 { margin: 0; color: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; }
body.ui-modern .ui-card-subtitle { margin: 2px 0 0; color: #667085; font-size: 13px; line-height: 1.45; }
body.ui-modern .ui-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
body.ui-modern .ui-card-actions > .pull-right,
body.ui-modern .ui-card-actions > .pull-left { float: none !important; }
body.ui-modern .ui-card-body { padding: 20px; }
body.ui-modern .ui-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #eaecf0;
    border-radius: 0 0 11px 11px;
}
body.ui-modern .ui-card-footer:before,
body.ui-modern .ui-card-footer:after { display: none; }
body.ui-modern .ui-card--flush > .table-responsive,
body.ui-modern .ui-card--flush > .ui-table-scroll { margin: 0; border: 0; }
body.ui-modern .ui-card--flush > .table-responsive > .table,
body.ui-modern .ui-card--flush > .ui-table-scroll > .table,
body.ui-modern .ui-card--flush > .table { margin: 0; }
/* Wrapper that should not look like a card (keeps .panel for scripts). */
body.ui-modern .panel.ui-bare,
body.ui-modern .ui-bare { margin: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
body.ui-modern .ui-stack > * + * { margin-top: 20px; }

/* ---------------------------------------------------------------------
   6. Buttons
   --------------------------------------------------------------------- */
body.ui-modern .btn {
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    border-radius: 8px;
    border-width: 1px;
    background-image: none;
    text-shadow: none;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
    transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}
body.ui-modern .btn:active,
body.ui-modern .btn.active { box-shadow: inset 0 1px 2px rgba(16,24,40,.12); }
body.ui-modern .btn-lg, body.ui-modern .ui-btn-lg { padding: 9px 18px; font-size: 15px; line-height: 22px; }
body.ui-modern .btn-sm { padding: 4px 10px; font-size: 13px; line-height: 20px; }
body.ui-modern .btn-xs { padding: 3px 7px; font-size: 12px; line-height: 20px; border-radius: 6px; }
body.ui-modern .btn-block { display: block; width: 100%; }
body.ui-modern .btn:not(.btn-xs):not(.ui-icon-btn) > .fa:first-child { margin-right: 6px; }
body.ui-modern .btn .fa-2x,
body.ui-modern .btn .fa-lg,
body.ui-modern .btn .fa-3x { font-size: 14px; line-height: inherit; vertical-align: baseline; }

body.ui-modern .btn-default,
body.ui-modern .btn-secondary {
    background: #ffffff;
    border-color: #d0d5dd;
    color: #344054;
}
body.ui-modern .btn-default:hover,
body.ui-modern .btn-default:focus,
body.ui-modern .btn-secondary:hover,
body.ui-modern .btn-secondary:focus { background: #f8fafc; border-color: #b9c0cc; color: #101828; }
body.ui-modern .btn-default:active,
body.ui-modern .btn-default.active,
body.ui-modern .open > .dropdown-toggle.btn-default { background: #f2f4f7; border-color: #b9c0cc; color: #101828; }
body.ui-modern .btn-primary { background: #2563eb; border-color: #2563eb; color: #ffffff; }
body.ui-modern .btn-primary:hover,
body.ui-modern .btn-primary:focus { background: #1d4ed8; border-color: #1d4ed8; color: #ffffff; }
body.ui-modern .btn-primary:active,
body.ui-modern .btn-primary.active,
body.ui-modern .open > .dropdown-toggle.btn-primary { background: #1e40af; border-color: #1e40af; color: #ffffff; }
body.ui-modern .btn-success { background: #067647; border-color: #067647; color: #ffffff; }
body.ui-modern .btn-success:hover,
body.ui-modern .btn-success:focus,
body.ui-modern .btn-success:active { background: #05603a; border-color: #05603a; color: #ffffff; }
body.ui-modern .btn-warning { background: #f79009; border-color: #f79009; color: #1d2939; }
body.ui-modern .btn-warning:hover,
body.ui-modern .btn-warning:focus,
body.ui-modern .btn-warning:active { background: #fdb022; border-color: #fdb022; color: #1d2939; }
body.ui-modern .btn-danger { background: #d92d20; border-color: #d92d20; color: #ffffff; }
body.ui-modern .btn-danger:hover,
body.ui-modern .btn-danger:focus,
body.ui-modern .btn-danger:active { background: #b42318; border-color: #b42318; color: #ffffff; }
body.ui-modern .btn-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; box-shadow: none; }
body.ui-modern .btn-info:hover,
body.ui-modern .btn-info:focus,
body.ui-modern .btn-info:active { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
body.ui-modern .btn-link { color: #1d4ed8; box-shadow: none; font-weight: 500; }
body.ui-modern .btn-link:hover,
body.ui-modern .btn-link:focus { color: #1e40af; }
body.ui-modern .btn.disabled,
body.ui-modern .btn[disabled],
body.ui-modern fieldset[disabled] .btn { opacity: .5; box-shadow: none; }
/* MagicGrid exporter (generated: a.btn.btn-warning with fa-save) reads as a secondary action. */
body.ui-modern a.btn[href*="export=true"] {
    background: #ffffff;
    border-color: #d0d5dd;
    color: #344054;
}
body.ui-modern a.btn[href*="export=true"]:hover,
body.ui-modern a.btn[href*="export=true"]:focus { background: #f8fafc; border-color: #b9c0cc; color: #101828; }
body.ui-modern a.btn[href*="export=true"] > .fa-save:before { content: "\f019"; }
body.ui-modern a.btn[href*="export=true"] > .fa { margin-right: 6px; color: #475467; }

body.ui-modern .ui-btn-soft { background: #eff6ff; border-color: #eff6ff; color: #1e40af; box-shadow: none; }
body.ui-modern .ui-btn-soft:hover,
body.ui-modern .ui-btn-soft:focus { background: #dbeafe; border-color: #dbeafe; color: #1e40af; }
body.ui-modern .ui-btn-ghost { background: transparent; border-color: transparent; color: #475467; box-shadow: none; }
body.ui-modern .ui-btn-ghost:hover,
body.ui-modern .ui-btn-ghost:focus { background: #f2f4f7; border-color: transparent; color: #101828; }

body.ui-modern .ui-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #475467;
    font-size: 14px;
    line-height: 1;
    vertical-align: middle;
    box-shadow: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .14s ease, color .14s ease, border-color .14s ease;
}
body.ui-modern .ui-icon-btn > .fa { margin: 0; }
body.ui-modern .ui-icon-btn:hover,
body.ui-modern .ui-icon-btn:focus { background: #f2f4f7; border-color: #e4e7ec; color: #101828; text-decoration: none; }
body.ui-modern .ui-icon-btn--primary:hover,
body.ui-modern .ui-icon-btn--primary:focus { background: #eff6ff; border-color: #dbeafe; color: #1d4ed8; }
body.ui-modern .ui-icon-btn--danger:hover,
body.ui-modern .ui-icon-btn--danger:focus { background: #fef3f2; border-color: #fee4e2; color: #b42318; }
body.ui-modern .ui-icon-btn--md { width: 36px; height: 36px; border-radius: 8px; font-size: 16px; }

/* ---------------------------------------------------------------------
   7. Forms
   --------------------------------------------------------------------- */
body.ui-modern label,
body.ui-modern .control-label {
    margin-bottom: 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}
body.ui-modern .smart-form { line-height: 1.5; }
body.ui-modern fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
body.ui-modern legend {
    margin: 4px 0 16px;
    padding: 0 0 8px;
    border-bottom: 1px solid #eaecf0;
    color: #101828;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}
body.ui-modern .form-control {
    height: 38px;
    padding: 8px 12px;
    border: 1px solid #8a94a6;
    border-radius: 8px;
    background-color: #ffffff;
    color: #101828;
    font-size: 14px;
    line-height: 20px;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
    transition: border-color .14s ease, box-shadow .14s ease;
}
body.ui-modern .form-control:hover { border-color: #667085; }
body.ui-modern .form-control:focus {
    border-color: #2563eb;
    outline: 2px solid transparent;
    box-shadow: 0 0 0 3px rgba(37,99,235,.30);
}
body.ui-modern textarea.form-control,
body.ui-modern select.form-control[multiple],
body.ui-modern select.form-control[size] { height: auto; padding: 10px 12px; }
body.ui-modern textarea.form-control { min-height: 80px; resize: vertical; }
body.ui-modern .form-control.input-sm { height: 30px; padding: 4px 10px; font-size: 13px; border-radius: 6px; }
body.ui-modern .form-control.input-lg { height: 46px; font-size: 16px; }
body.ui-modern .form-control::placeholder { color: #667085; opacity: 1; }
body.ui-modern .form-control[disabled],
body.ui-modern .form-control[readonly],
body.ui-modern fieldset[disabled] .form-control { background: #f2f4f7; border-color: #d0d5dd; color: #475467; box-shadow: none; }
body.ui-modern .has-error .form-control,
body.ui-modern .form-control.input-validation-error { border-color: #d92d20; box-shadow: 0 0 0 3px rgba(217,45,32,.12); }
body.ui-modern .has-error .form-control:focus,
body.ui-modern .form-control.input-validation-error:focus { box-shadow: 0 0 0 3px rgba(217,45,32,.25); }
body.ui-modern .field-validation-error,
body.ui-modern .has-error .help-block,
body.ui-modern .has-error .control-label { color: #b42318; }
body.ui-modern .field-validation-error { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; }
body.ui-modern .has-success .form-control { border-color: #067647; }
body.ui-modern .has-warning .form-control { border-color: #b54708; }
body.ui-modern .help-block { color: #667085; font-size: 12px; }
body.ui-modern .form-group { margin-bottom: 16px; }
body.ui-modern .input-group-addon { background: #f8fafc; color: #475467; border-color: #8a94a6; border-radius: 8px; }
body.ui-modern input[type=checkbox],
body.ui-modern input[type=radio] { width: 16px; height: 16px; margin-top: 2px; accent-color: #2563eb; vertical-align: -3px; }
body.ui-modern .checkbox label,
body.ui-modern .radio label,
body.ui-modern .checkbox-inline,
body.ui-modern .radio-inline { color: #344054; font-weight: 400; }
/* Joined control geometry after the radius override. */
body.ui-modern .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius: 0; }
body.ui-modern .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle),
body.ui-modern .input-group .form-control:first-child,
body.ui-modern .input-group-addon:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
body.ui-modern .btn-group > .btn:last-child:not(:first-child),
body.ui-modern .btn-group > .dropdown-toggle:not(:first-child),
body.ui-modern .input-group .form-control:last-child,
body.ui-modern .input-group-addon:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* Form sections, grid and fields */
body.ui-modern .ui-form-section > .ui-card-body { padding-bottom: 4px; }
body.ui-modern .ui-form-section-header { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
body.ui-modern .ui-form-grid { display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; }
body.ui-modern .ui-form-grid:before,
body.ui-modern .ui-form-grid:after { display: none; }
body.ui-modern .ui-form-grid > [class*="col-"] { float: none; padding-left: 8px; padding-right: 8px; }
:where(body.ui-modern .ui-form-grid > [class*="col-"]) { width: 100%; }
body.ui-modern .ui-field { margin-bottom: 16px; min-width: 0; }
body.ui-modern .ui-field > label,
body.ui-modern .ui-field > .control-label { display: block; }
body.ui-modern .ui-field > p:empty { display: none; }
/* v2.1 (Stage C promotion of P2-ADM-REQ-001 and the P2-CAT-A copy): legacy helper output (Html.labeledtextbox, smartCheckBoxFor, unclassed text inputs and selects) inside a ui-field looks like a .form-control. */
body.ui-modern .ui-field label.label { display: block; margin: 0 0 4px; padding: 0; text-align: left; font-size: 13px; font-weight: 500; color: #475467; }
body.ui-modern .ui-field label.input { display: block; width: 100%; margin: 0; }
body.ui-modern .ui-field label.checkbox { display: flex; align-items: center; gap: 8px; min-height: 38px; margin: 0; padding-left: 12px; }
body.ui-modern .ui-field input[type=text]:not(.form-control):not([class*="select2"]):not([class*="xelect"]),
body.ui-modern .ui-field select:not(.form-control):not([class*="select2"]):not([class*="xelect"]) {
    display: block; width: 100%; height: 38px; padding: 8px 12px;
    border: 1px solid #8a94a6; border-radius: 8px; background-color: #ffffff;
    color: #101828; font-size: 14px; line-height: 20px; box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
body.ui-modern .ui-field input[type=text]:not(.form-control):not([class*="select2"]):not([class*="xelect"]):focus,
body.ui-modern .ui-field select:not(.form-control):not([class*="select2"]):not([class*="xelect"]):focus {
    border-color: #2563eb; outline: 2px solid transparent; box-shadow: 0 0 0 3px rgba(37,99,235,.30);
}
/* v2.2: selects classed "select2" that the plugin never initialises (plain DropDownListFor with class select2, e.g. MenuSistema/Edit) look like a .form-control. An initialised Select2 keeps its own inline display:none and is unaffected. */
body.ui-modern .ui-field select.select2:not(.form-control) { display: block; width: 100%; height: 38px; padding: 8px 12px; border: 1px solid #8a94a6; border-radius: 8px; background-color: #ffffff; color: #101828; font-size: 14px; line-height: 20px; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
body.ui-modern .ui-field select.select2:not(.form-control):focus { border-color: #2563eb; outline: 2px solid transparent; box-shadow: 0 0 0 3px rgba(37,99,235,.30); }
body.ui-modern .ui-required > label:after,
body.ui-modern label.ui-required:after,
body.ui-modern span.ui-required:after { content: " *"; color: #d92d20; font-weight: 600; }
body.ui-modern .ui-form-columns > [class*="col-"] { display: flex; flex-direction: column; }
body.ui-modern .ui-form-columns > [class*="col-"] > .ui-card { flex: 1 1 auto; }
body.ui-modern .ui-help { display: block; margin-top: 4px; color: #667085; font-size: 12px; line-height: 1.45; }
body.ui-modern .ui-check { display: flex; align-items: center; gap: 8px; min-height: 38px; margin: 0; }
body.ui-modern .ui-check label { display: flex; align-items: center; gap: 8px; margin: 0; color: #344054; font-size: 14px; font-weight: 400; cursor: pointer; }
body.ui-modern .ui-check input[type=checkbox] { position: static; margin: 0; }
body.ui-modern .ui-input-icon { position: relative; }
body.ui-modern .ui-input-icon > .fa {
    position: absolute;
    top: 0;
    left: 12px;
    z-index: 3;
    height: 38px;
    line-height: 38px;
    color: #667085;
    font-size: 15px;
    pointer-events: none;
}
body.ui-modern .ui-input-icon > .form-control { padding-left: 38px; }

/* Form action bar */
body.ui-modern .ui-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 4px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid #e4e7ec;
}
body.ui-modern .ui-form-actions:before,
body.ui-modern .ui-form-actions:after { display: none; }
body.ui-modern .ui-form-actions > .btn { float: none; margin: 0; }
body.ui-modern .ui-form-actions-hint { margin-right: auto; color: #667085; font-size: 13px; }
body.ui-modern .ui-form-actions--sticky {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    margin: 0;
    padding: 12px 16px;
    background: rgba(255,255,255,.97);
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16,24,40,.08);
}
body.ui-modern.ui-window .ui-form-actions--sticky { bottom: 8px; }

/* ---------------------------------------------------------------------
   8. Filter panel and toolbar
   --------------------------------------------------------------------- */
body.ui-modern .ui-filter { margin-bottom: 20px; }
body.ui-modern .ui-filter .ui-card-body { padding-bottom: 4px; }
body.ui-modern .ui-filter-actions { justify-content: flex-end; }
body.ui-modern .ui-filter-actions > .btn { float: none; margin: 0; }
body.ui-modern .ui-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.ui-modern .ui-toolbar > .btn,
body.ui-modern .ui-toolbar > .btn-group { float: none; margin: 0; }

/* ---------------------------------------------------------------------
   9. Tables (Bootstrap .table and MagicGrid output)
   --------------------------------------------------------------------- */
body.ui-modern .table { margin-bottom: 0; color: #101828; background: #ffffff; }
body.ui-modern .table > thead > tr > th,
body.ui-modern .magic-grid-header > th {
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 0;
    border-bottom: 1px solid #e4e7ec;
    color: #475467;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    line-height: 18px;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}
body.ui-modern .table > thead > tr > th a,
body.ui-modern .magic-grid-header > th a { color: inherit; text-decoration: none; }
body.ui-modern .table > thead > tr > th a:hover,
body.ui-modern .magic-grid-header > th a:hover { color: #101828; }
body.ui-modern .table > tbody > tr > td,
body.ui-modern .table > tbody > tr > th,
body.ui-modern .table > tfoot > tr > td,
body.ui-modern .magic-grid-body-td {
    padding: 10px 16px;
    border-top: 1px solid #eaecf0;
    vertical-align: middle;
    line-height: 22px;
}
body.ui-modern .table > tbody > tr:first-child > td { border-top: 0; }
body.ui-modern .table-condensed > thead > tr > th,
body.ui-modern .table-condensed > tbody > tr > td { padding: 6px 10px; }
body.ui-modern .table > tbody > tr:not(.danger):not(.success):not(.warning):not(.info):not(.active):not(.row-selected):hover > td { background-color: #f8fafc; }
body.ui-modern .table-striped > tbody > tr:nth-of-type(odd) { background-color: #fcfcfd; }
body.ui-modern .table-bordered,
body.ui-modern .table-bordered > thead > tr > th,
body.ui-modern .table-bordered > tbody > tr > td { border-color: #eaecf0; }
body.ui-modern .table > tbody > tr.danger > td { background: #fef3f2; }
body.ui-modern .table > tbody > tr.success > td { background: #ecfdf3; }
body.ui-modern .table > tbody > tr.warning > td { background: #fffaeb; }
body.ui-modern .table > tbody > tr.info > td,
body.ui-modern .table > tbody > tr.active > td,
body.ui-modern .table > tbody > tr.row-selected > td { background: #eff6ff; }
body.ui-modern .magic-grid-footer-td { background: #f8fafc; font-weight: 600; }
/* Align the first/last cell with card padding. */
body.ui-modern .panel > .table-responsive > .table > * > tr > :first-child,
body.ui-modern .panel > .table > * > tr > :first-child,
body.ui-modern .ui-card--flush .table > * > tr > :first-child { padding-left: 20px; }
body.ui-modern .panel > .table-responsive > .table > * > tr > :last-child,
body.ui-modern .panel > .table > * > tr > :last-child,
body.ui-modern .ui-card--flush .table > * > tr > :last-child { padding-right: 20px; }
body.ui-modern .table-responsive { border: 0; }
body.ui-modern .ui-table-actions { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
body.ui-modern .ui-table-scroll { max-width: 100%; overflow-x: auto; }
body.ui-modern .ui-num { text-align: right; font-variant-numeric: tabular-nums; }
body.ui-modern [magicgrid-group-drag][dropped] { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; border-radius: 999px; padding: 2px 10px; }

/* Pager */
body.ui-modern .pagination { margin: 0; }
body.ui-modern .pagination > li > a,
body.ui-modern .pagination > li > span,
body.ui-modern .pagination > li:first-child > a,
body.ui-modern .pagination > li:last-child > a,
body.ui-modern .pagination > li:first-child > span,
body.ui-modern .pagination > li:last-child > span {
    min-width: 32px;
    height: 32px;
    margin: 0 2px;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #475467;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    text-align: center;
}
body.ui-modern .pagination > li > a:hover,
body.ui-modern .pagination > li > a:focus { background: #f2f4f7; border-color: #e4e7ec; color: #101828; }
body.ui-modern .pagination > .active > a,
body.ui-modern .pagination > .active > span,
body.ui-modern .pagination > .active > a:hover,
body.ui-modern .pagination > .active > a:focus { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; font-weight: 600; }
body.ui-modern .pagination > .disabled > a,
body.ui-modern .pagination > .disabled > span { color: #98a2b3; background: transparent; }
body.ui-modern .ui-pager { justify-content: space-between; }
body.ui-modern .ui-pager .pagination { display: flex; flex-wrap: wrap; gap: 2px 0; float: none !important; }
body.ui-modern .ui-pager-info .pagination > li > a,
body.ui-modern .ui-pager-info .pagination > li > span {
    margin: 0;
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: #475467;
    font-weight: 500;
    cursor: default;
}
body.ui-modern .ui-pager-info .container { width: auto; padding: 0; margin: 0; text-align: left !important; }
/* MagicGrid total records rendered as a pill (ul.pagination > li > a without href). */
body.ui-modern .ui-count { display: inline-flex; }
body.ui-modern .ui-count .pagination { display: inline-flex; float: none !important; margin: 0; }
body.ui-modern .ui-count .pagination > li > a,
body.ui-modern .ui-count .pagination > li > span {
    height: auto;
    min-width: 0;
    margin: 0;
    padding: 1px 10px;
    border: 1px solid #e4e7ec;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    cursor: default;
}

/* ---------------------------------------------------------------------
   10. Status pills / badges / labels
   --------------------------------------------------------------------- */
body.ui-modern .badge,
body.ui-modern .ui-badge {
    display: inline-block;
    min-width: 24px;
    padding: 1px 9px;
    border: 1px solid #e4e7ec;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
body.ui-modern .ui-badge--neutral { background: #f2f4f7; border-color: #e4e7ec; color: #344054; }
body.ui-modern .ui-badge--primary { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
body.ui-modern .ui-badge--success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
body.ui-modern .ui-badge--warning { background: #fffaeb; border-color: #fedf89; color: #93370d; }
body.ui-modern .ui-badge--danger { background: #fef3f2; border-color: #fecdca; color: #b42318; }
body.ui-modern .ui-badge--dot:before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 1px 0; border-radius: 999px; background: currentColor; vertical-align: middle; }
body.ui-modern .label { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
body.ui-modern .label-default { background: #f2f4f7; color: #344054; }
body.ui-modern .label-primary { background: #eff6ff; color: #1e40af; }
body.ui-modern .label-success { background: #ecfdf3; color: #067647; }
body.ui-modern .label-warning { background: #fffaeb; color: #93370d; }
body.ui-modern .label-danger { background: #fef3f2; color: #b42318; }
body.ui-modern .label-info { background: #eff8ff; color: #175cd3; }

/* ---------------------------------------------------------------------
   11. Callouts (ui-callout, Bootstrap .alert, validation summary)
   --------------------------------------------------------------------- */
body.ui-modern .ui-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #b2ddff;
    border-left-width: 4px;
    border-radius: 8px;
    background: #eff8ff;
    color: #175cd3;
}
body.ui-modern .ui-callout-icon { flex: none; margin-top: 2px; font-size: 17px; line-height: 1; }
body.ui-modern .ui-callout-title { margin: 0 0 2px; color: inherit; font-size: 14px; font-weight: 600; }
body.ui-modern .ui-callout-body { color: #344054; }
body.ui-modern .ui-callout-body > :last-child { margin-bottom: 0; }
body.ui-modern .ui-callout--info { background: #eff8ff; border-color: #b2ddff; color: #175cd3; }
body.ui-modern .ui-callout--success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
body.ui-modern .ui-callout--warning { background: #fffaeb; border-color: #fedf89; color: #93370d; }
body.ui-modern .ui-callout--danger { background: #fef3f2; border-color: #fecdca; color: #b42318; }

body.ui-modern .alert,
body.ui-modern .validation-summary-errors {
    position: relative;
    margin: 0 0 20px;
    padding: 13px 16px 13px 44px;
    border: 1px solid #b2ddff;
    border-left-width: 4px;
    border-radius: 8px;
    background: #eff8ff;
    color: #175cd3;
    font-weight: 500;
}
body.ui-modern .alert:before,
body.ui-modern .validation-summary-errors:before {
    position: absolute;
    top: 14px;
    left: 16px;
    font: normal normal normal 17px/1 FontAwesome;
    content: "\f05a";
}
body.ui-modern .alert-success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
body.ui-modern .alert-success:before { content: "\f058"; }
body.ui-modern .alert-warning { background: #fffaeb; border-color: #fedf89; color: #93370d; }
body.ui-modern .alert-warning:before { content: "\f071"; }
body.ui-modern .alert-danger,
body.ui-modern .validation-summary-errors { background: #fef3f2; border-color: #fecdca; color: #b42318; }
body.ui-modern .alert-danger:before,
body.ui-modern .validation-summary-errors:before { content: "\f057"; }
body.ui-modern .alert-info { background: #eff8ff; border-color: #b2ddff; color: #175cd3; }
body.ui-modern .alert .alert-link { color: inherit; text-decoration: underline; }
body.ui-modern .alert .close { top: 0; right: -4px; }
body.ui-modern .validation-summary-errors > ul { margin: 0; padding-left: 18px; color: #7a271a; font-weight: 400; }
body.ui-modern .validation-summary-errors > ul:before {
    content: "Revisá los datos ingresados";
    display: block;
    margin: 0 0 4px -18px;
    color: #b42318;
    font-weight: 600;
}
/* An empty, valid summary (Bootstrap alert class) must stay invisible. */
body.ui-modern .validation-summary-valid.alert { display: none !important; }

/* ---------------------------------------------------------------------
   12. Stat card, description list, empty state
   --------------------------------------------------------------------- */
body.ui-modern .ui-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    margin-bottom: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
body.ui-modern .ui-stat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.ui-modern .ui-stat-label { color: #475467; font-size: 13px; font-weight: 500; }
body.ui-modern .ui-stat-value { color: #101828; font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
body.ui-modern .ui-stat-footer { margin-top: auto; padding-top: 10px; border-top: 1px solid #eaecf0; color: #667085; font-size: 12px; }
body.ui-modern .ui-stat-footer a { font-weight: 500; text-decoration: none; }
body.ui-modern .ui-dl {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px 24px;
    margin: 0;
}
body.ui-modern .ui-dl dt { color: #667085; font-size: 12px; font-weight: 500; }
body.ui-modern .ui-dl dd { margin: 2px 0 0; color: #101828; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
body.ui-modern .ui-empty { padding: 40px 20px; text-align: center; }
body.ui-modern .ui-empty .ui-icon-chip { margin-bottom: 12px; }
body.ui-modern .ui-empty-title { margin: 0 0 4px; color: #101828; font-size: 16px; font-weight: 600; }
body.ui-modern .ui-empty-text { max-width: 420px; margin: 0 auto; color: #475467; }
body.ui-modern .ui-empty .btn { margin-top: 16px; }
body.ui-modern .ui-message-card { max-width: 560px; margin: 40px auto; padding: 32px; text-align: center; }
body.ui-modern .ui-message-card .ui-icon-chip { margin-bottom: 16px; }
body.ui-modern .ui-message-card h1 { margin: 0 0 6px; font-size: 22px; }
body.ui-modern .ui-message-card p { margin: 0; color: #475467; }

/* ---------------------------------------------------------------------
   13. Tabs, dropdowns, list groups, wells, breadcrumbs, progress
   --------------------------------------------------------------------- */
body.ui-modern .nav-tabs { border-bottom: 1px solid #e4e7ec; }
body.ui-modern .nav-tabs > li { margin-bottom: -1px; }
body.ui-modern .nav-tabs > li > a {
    margin-right: 4px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #475467;
    font-weight: 500;
}
body.ui-modern .nav-tabs > li > a:hover,
body.ui-modern .nav-tabs > li > a:focus { background: transparent; border-bottom-color: #d0d5dd; color: #101828; }
body.ui-modern .nav-tabs > li.active > a,
body.ui-modern .nav-tabs > li.active > a:hover,
body.ui-modern .nav-tabs > li.active > a:focus { background: transparent; border: 0; border-bottom: 2px solid #2563eb; color: #1d4ed8; font-weight: 600; }
body.ui-modern .tab-content > .tab-pane { padding-top: 20px; }
body.ui-modern .nav-pills > li > a { border-radius: 8px; color: #475467; font-weight: 500; }
body.ui-modern .nav-pills > li > a:hover { background: #f2f4f7; color: #101828; }
body.ui-modern .nav-pills > li.active > a,
body.ui-modern .nav-pills > li.active > a:hover,
body.ui-modern .nav-pills > li.active > a:focus { background: #eff6ff; color: #1e40af; }
body.ui-modern .dropdown-menu {
    padding: 4px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(16,24,40,.08);
}
body.ui-modern .dropdown-menu > li > a { padding: 7px 12px; border-radius: 6px; color: #101828; }
body.ui-modern .dropdown-menu > li > a:hover,
body.ui-modern .dropdown-menu > li > a:focus { background: #f2f4f7; color: #101828; }
body.ui-modern .dropdown-menu > .active > a,
body.ui-modern .dropdown-menu > .active > a:hover { background: #eff6ff; color: #1e40af; }
body.ui-modern .dropdown-menu > .disabled > a { color: #98a2b3; }
body.ui-modern .list-group-item { border-color: #eaecf0; }
body.ui-modern .list-group-item:first-child { border-radius: 8px 8px 0 0; }
body.ui-modern .list-group-item:last-child { border-radius: 0 0 8px 8px; }
body.ui-modern .list-group-item.active { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
body.ui-modern .well { background: #f8fafc; border: 1px solid #e4e7ec; border-radius: 12px; box-shadow: none; }
body.ui-modern .breadcrumb { padding: 0; margin-bottom: 8px; background: transparent; font-size: 13px; }
body.ui-modern .progress { height: 10px; margin-bottom: 8px; background: #eaecf0; border-radius: 999px; box-shadow: none; }
body.ui-modern .progress-bar { background-color: #2563eb; box-shadow: none; }
body.ui-modern .progress-bar-success { background-color: #067647; }
body.ui-modern .progress-bar-warning { background-color: #f79009; }
body.ui-modern .progress-bar-danger { background-color: #d92d20; }

/* ---------------------------------------------------------------------
   14. Modal and MagicWindow
   v1.1: Bootstrap modals (z 1050) opened under the fixed header (z 2000).
   :where() keeps Bootstrap-level specificity so page-raised modals
   (Dashboard/Cubos 99999) still win; xelect drop is lifted above modals.
   --------------------------------------------------------------------- */
:where(body.ui-modern.ui-shell) .modal-backdrop { z-index: 2040; }
:where(body.ui-modern.ui-shell) .modal { z-index: 2050; }
body.ui-modern #xelect-result-container { z-index: 2060; }
body.ui-modern .modal-backdrop.in { opacity: .45; }
body.ui-modern .modal-backdrop { background: #0f172a; }
body.ui-modern .modal-content {
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(16,24,40,.18);
    overflow: hidden;
}
body.ui-modern .modal-header { padding: 16px 20px; border-bottom: 1px solid #eaecf0; background: #ffffff; }
body.ui-modern .modal-title { font-size: 16px; font-weight: 600; line-height: 1.5; }
body.ui-modern .modal-body { padding: 20px; }
body.ui-modern .modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #eaecf0;
    background: #f8fafc;
}
body.ui-modern .modal-footer:before,
body.ui-modern .modal-footer:after { display: none; }
body.ui-modern .modal-footer .btn + .btn { margin-left: 0; }
body.ui-modern .close { color: #475467; font-size: 22px; font-weight: 400; opacity: .8; text-shadow: none; }
body.ui-modern .close:hover,
body.ui-modern .close:focus { color: #101828; opacity: 1; }
body.ui-modern .magicwin-win {
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(16,24,40,.18);
    overflow: hidden;
}
body.ui-modern .magicwin-win-title { background: #1e293b; color: #f8fafc; }
body.ui-modern .magicwin-win-title-span { color: #f8fafc; font-size: 12px; font-weight: 600; }
body.ui-modern .magicwin-win-content { background: #f5f7fb; border-color: #e4e7ec; }
body.ui-modern .magicwin-win-title-btn:focus { outline: 2px solid #93c5fd; outline-offset: 1px; }

/* ---------------------------------------------------------------------
   15. Widgets: Select2 3.5, xelect, jQuery UI datepicker, tri-state toggles
   No position, width or display overrides on plugin-built elements.
   --------------------------------------------------------------------- */
body.ui-modern .select2-container .select2-choice {
    height: 38px !important;
    padding: 0 0 0 12px;
    border: 1px solid #8a94a6;
    border-radius: 8px;
    background: #ffffff;
    background-image: none;
    color: #101828;
    font-size: 14px;
    line-height: 36px !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
body.ui-modern .select2-container .select2-choice:hover { border-color: #667085; }
body.ui-modern .select2-container .select2-choice > .select2-chosen { margin-right: 52px; }
body.ui-modern .select2-container .select2-choice .select2-arrow {
    width: 32px;
    border: 0;
    border-radius: 0 8px 8px 0;
    background: transparent;
    background-image: none;
}
body.ui-modern .select2-container .select2-choice .select2-arrow b { background: none !important; }
body.ui-modern .select2-container .select2-choice .select2-arrow b:after {
    content: "\f107";
    display: block;
    color: #667085;
    font: normal normal normal 16px/36px FontAwesome;
    text-align: center;
}
body.ui-modern .select2-container .select2-choice abbr { top: 12px; right: 34px; }
body.ui-modern .select2-container .select2-choice.select2-default,
body.ui-modern .select2-container .select2-default .select2-chosen { color: #667085 !important; }
body.ui-modern .select2-container-active .select2-choice,
body.ui-modern .select2-container-active .select2-choices,
body.ui-modern .select2-dropdown-open .select2-choice {
    border-color: #2563eb;
    outline: 2px solid transparent;
    box-shadow: 0 0 0 3px rgba(37,99,235,.30);
}
body.ui-modern .select2-dropdown-open .select2-choice { background: #ffffff; border-radius: 8px 8px 0 0; }
body.ui-modern .select2-dropdown-open.select2-drop-above .select2-choice { border-radius: 0 0 8px 8px; background-image: none; }
body.ui-modern .select2-container-multi .select2-choices {
    min-height: 38px;
    padding: 3px 6px;
    border: 1px solid #8a94a6;
    border-radius: 8px;
    background: #ffffff;
    background-image: none;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
body.ui-modern .select2-container-multi .select2-choices .select2-search-choice {
    margin: 3px 4px 3px 0;
    padding: 3px 8px 3px 20px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    background: #eff6ff;
    background-image: none;
    color: #1e40af;
    box-shadow: none;
}
body.ui-modern .select2-drop {
    border: 1px solid #2563eb;
    border-radius: 0 0 8px 8px;
    background: #ffffff;
    color: #101828;
    box-shadow: 0 4px 12px rgba(16,24,40,.08);
}
body.ui-modern .select2-drop.select2-drop-above { border-radius: 8px 8px 0 0; }
body.ui-modern .select2-search { padding: 6px 6px 0; }
body.ui-modern .select2-search input,
body.ui-modern .xelect-search > input {
    min-height: 32px;
    border: 1px solid #8a94a6;
    border-radius: 6px;
    color: #101828;
}
body.ui-modern .select2-results { padding: 4px; margin: 4px 0; }
body.ui-modern .select2-results .select2-result-label { padding: 6px 8px; border-radius: 6px; }
body.ui-modern .select2-results .select2-highlighted { background: #eff6ff; color: #1e40af; border-radius: 6px; }
body.ui-modern .select2-results .select2-no-results,
body.ui-modern .select2-results .select2-searching,
body.ui-modern .select2-results .select2-selection-limit { background: transparent; color: #667085; padding: 6px 8px; }
body.ui-modern .select2-container.select2-container-disabled .select2-choice,
body.ui-modern .select2-container-multi.select2-container-disabled .select2-choices { background: #f2f4f7; border-color: #d0d5dd; color: #475467; box-shadow: none; }
body.ui-modern .select2.input-validation-error a,
body.ui-modern .input-validation-error-for-select2 { border-color: #d92d20; box-shadow: 0 0 0 3px rgba(217,45,32,.12); }
body.ui-modern .xelect-single,
body.ui-modern .xelect-multi {
    min-height: 38px;
    border-color: #8a94a6;
    border-radius: 8px;
    background: #ffffff;
    color: #101828;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
body.ui-modern .xelect-multi-focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.30); outline: 2px solid transparent; }
body.ui-modern #xelect-result-container { color: #101828; background: #ffffff; border-radius: 0 0 8px 8px; box-shadow: 0 4px 12px rgba(16,24,40,.08); }
body.ui-modern .ui-datepicker {
    padding: 8px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #ffffff;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(16,24,40,.08);
}
body.ui-modern .ui-datepicker .ui-datepicker-header { background: #ffffff; border: 0; border-bottom: 1px solid #eaecf0; border-radius: 0; color: #101828; font-weight: 600; }
body.ui-modern .ui-datepicker th { color: #667085; font-size: 12px; font-weight: 600; }
body.ui-modern .ui-datepicker .ui-state-default { background: #ffffff; border: 1px solid transparent; border-radius: 6px; color: #344054; text-align: center; }
body.ui-modern .ui-datepicker .ui-state-hover { background: #f2f4f7; }
body.ui-modern .ui-datepicker .ui-state-highlight { border-color: #bfdbfe; color: #1e40af; }
body.ui-modern .ui-datepicker .ui-state-active { background: #2563eb; border-color: #2563eb; color: #ffffff; }
body.ui-modern .checkOnNullOff { background: #f2f4f7; border: 1px solid #d0d5dd; border-radius: 8px; box-shadow: none; }
body.ui-modern .checkOnNullOff span { color: #475467; }
body.ui-modern .checkOnNullOff.yes span.yes { background: #ecfdf3; color: #067647; box-shadow: inset 0 0 0 1px #abefc6; }
body.ui-modern .checkOnNullOff.no span.no { background: #fef3f2; color: #b42318; box-shadow: inset 0 0 0 1px #fecdca; }
body.ui-modern .checkOnNullOffContainer:focus-within { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 8px; }
body.ui-modern .checkOnOff { background: #eaecf0; }
body.ui-modern .checkOnOff:before { color: #067647; }

/* ---------------------------------------------------------------------
   16. Responsive
   --------------------------------------------------------------------- */
@media screen and (max-width: 991px) {
    body.ui-modern .ui-topbar-user .ui-topbar-user-name { display: none; }
}
@media screen and (max-width: 767px) {
    body.ui-modern .ui-brand-product { display: none; }
    body.ui-modern .ui-topbar-user { display: none; }
    body.ui-modern .ui-page-title { font-size: 20px; }
    body.ui-modern .ui-page-heading .ui-icon-chip--lg { width: 40px; height: 40px; font-size: 17px; }
    body.ui-modern .ui-page-actions { width: 100%; }
    body.ui-modern .ui-page-actions > .btn { flex: 1 1 auto; text-align: center; }
    body.ui-modern .ui-pager { justify-content: center; }
    body.ui-modern .ui-form-actions-hint { display: none; }
    body.ui-modern .ui-form-actions > .btn { flex: 1 1 0; text-align: center; }
    body.ui-modern .ui-filter-actions > .btn { flex: 1 1 0; }
}
@media screen and (max-width: 700px) {
    body.ui-modern .ui-card-header,
    body.ui-modern .ui-card-body,
    body.ui-modern .ui-card-footer,
    body.ui-modern .panel-body,
    body.ui-modern .panel > .panel-heading,
    body.ui-modern .panel-footer { padding-left: 16px; padding-right: 16px; }
    body.ui-modern .ui-card-body,
    body.ui-modern .panel-body { padding-top: 16px; }
    body.ui-modern .panel > .table-responsive > .table > * > tr > :first-child,
    body.ui-modern .ui-card--flush .table > * > tr > :first-child { padding-left: 16px; }
    body.ui-modern .ui-auth-card { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    body.ui-modern *, body.ui-modern *:before, body.ui-modern *:after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------------------------------------------------------------------
   17. Print: no shell, no shadows, cards become bordered blocks.
   Bootstrap visibility helpers (.hidden-print) remain authoritative.
   --------------------------------------------------------------------- */
@media print {
    body.ui-modern { background: #ffffff; padding: 0; }
    body.ui-modern .main-header,
    body.ui-modern .main-sidebar,
    body.ui-modern .main-footer,
    body.ui-modern .content-header { display: none; }
    body.ui-modern .wrapper { padding-top: 0; }
    body.ui-modern .content-wrapper,
    body.ui-modern .content { margin: 0 !important; padding: 0; min-height: 0 !important; background: #ffffff; }
    body.ui-modern .panel,
    body.ui-modern .ui-card,
    body.ui-modern .ui-stat,
    body.ui-modern .modal-content { box-shadow: none; border-color: #d0d5dd; break-inside: avoid; }
    body.ui-modern .ui-page-actions,
    body.ui-modern .ui-form-actions { display: none; }
    body.ui-modern .ui-form-actions--sticky { position: static; box-shadow: none; }
    body.ui-modern .ui-table-scroll,
    body.ui-modern .table-responsive { overflow: visible; }
}

/* ---------------------------------------------------------------------
   18. v2.4 additions (2026-10-26)
   --------------------------------------------------------------------- */
/* Results card around MagicGrid's all-in-one @mg.GetGrid() output: the generated
   footer (pager, page-size dropdown, "Page x of y") becomes the card footer.
   magicgrid.css forces footer padding with !important, hence the !important here. */
body.ui-modern .ui-card--flush > .magicgrid { margin: 0; }
body.ui-modern .ui-card--flush > .magicgrid .table-responsive { margin: 0; border: 0; }
body.ui-modern .ui-card--flush > .magicgrid .magicgrid-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 12px 20px !important;
    background: #f8fafc;
    border-top: 1px solid #eaecf0;
    border-radius: 0 0 11px 11px;
}
body.ui-modern .ui-card--flush > .magicgrid .magicgrid-footer:before,
body.ui-modern .ui-card--flush > .magicgrid .magicgrid-footer:after { display: none; }
body.ui-modern .ui-card--flush > .magicgrid .magicgrid-footer > .pull-left,
body.ui-modern .ui-card--flush > .magicgrid .magicgrid-footer > .pull-right { float: none !important; }
body.ui-modern .ui-card--flush > .magicgrid .magicgrid-footer > .pagination { display: flex; flex-wrap: wrap; gap: 2px 0; }
body.ui-modern .ui-card--flush > .magicgrid .magicgrid-footer > .container { flex: 1 1 auto; width: auto; margin: 0; padding: 0 8px; text-align: center; }
body.ui-modern .ui-card--flush > .magicgrid .magicgrid-footer > .pull-right { order: 3; } /* page-size dropdown at the far right (not a form field) */
body.ui-modern .ui-card--flush > .magicgrid .magicgrid-footer > .container .pagination > li > a {
    margin: 0;
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: #475467;
    font-weight: 500;
    cursor: default;
}

/* Filter bar: the page's first card holds the title and the page actions; the filter
   form sits in a collapsed body (#filterPanel, toggled by the page's own handler). */
body.ui-modern .ui-filterbar > .ui-card-header { border-bottom: 0; border-radius: 11px; }
body.ui-modern .ui-filterbar .ui-card-heading > .ui-card-title { font-size: 18px; line-height: 1.4; }
body.ui-modern .ui-filterbar .ui-card-actions > .btn { float: none; margin: 0; }
body.ui-modern .ui-filterbar-body { border-top: 1px solid #eaecf0; }
body.ui-modern .ui-filterbar-body .ui-card-body { padding-bottom: 4px; }

/* Promoted from module CSS (identical module copies may remain). */
body.ui-modern .ui-stat-icon { flex: none; }
body.ui-modern .ui-field-list { columns: 2 220px; column-gap: 24px; margin: 8px 0 0; padding-left: 20px; }
body.ui-modern .ui-field-list li { break-inside: avoid; margin-bottom: 2px; }
body.ui-modern .ui-field input[type=file] { display: block; width: 100%; max-width: 560px; padding: 8px; background: #f8fafc; border: 1px dashed #8a94a6; border-radius: 8px; color: #475467; font-size: 14px; }

@media screen and (max-width: 767px) {
    body.ui-modern .ui-filterbar .ui-card-actions { width: 100%; margin-left: 0; }
    body.ui-modern .ui-filterbar .ui-card-actions > .btn { flex: 1 1 auto; text-align: center; }
    body.ui-modern .ui-card--flush > .magicgrid .magicgrid-footer { justify-content: center; }
}
@media screen and (max-width: 700px) {
    body.ui-modern .ui-card--flush > .magicgrid .magicgrid-footer { padding: 12px 16px !important; }
}
@media print {
    body.ui-modern .ui-filterbar .ui-card-actions,
    body.ui-modern .ui-filterbar-body { display: none !important; }
}

/* v2.5: filter bars whose toggle is [data-action=search] (app.js toggles the panel's [data-search],
   e.g. Remito's form) start closed; jQuery's toggle() overrides this with an inline display. */
body.ui-modern .ui-filterbar > [data-search] { display: none; border-top: 1px solid #eaecf0; }
body.ui-modern .ui-filterbar > [data-search] .ui-card-body { padding-bottom: 4px; }
@media print {
    body.ui-modern .ui-filterbar > [data-search] { display: none !important; }
}

/* v2.5: collapsible card on native <details open> (no script). The flex header sits inside <summary>
   (flex directly on <summary> is unreliable in older Safari). Keep it open by default so charts draw at full width. */
body.ui-modern details.ui-collapsible > summary.ui-collapsible-summary { display: block; list-style: none; cursor: pointer; }
body.ui-modern details.ui-collapsible > summary.ui-collapsible-summary::-webkit-details-marker { display: none; }
body.ui-modern details.ui-collapsible > summary.ui-collapsible-summary::marker { content: ""; }
body.ui-modern details.ui-collapsible > summary:focus { outline: none; }
body.ui-modern details.ui-collapsible > summary:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; border-radius: 11px; }
body.ui-modern .ui-collapsible-icon { flex: none; margin-left: auto; color: #667085; font-size: 13px; transition: transform .14s ease; }
body.ui-modern details.ui-collapsible:not([open]) .ui-collapsible-icon { transform: rotate(-90deg); }
body.ui-modern details.ui-collapsible:not([open]) > summary > .ui-card-header { border-bottom: 0; border-radius: 11px; }
body.ui-modern details.ui-collapsible > summary:hover .ui-collapsible-icon { color: #101828; }

/* v2.6: sticky action bar keeps the 20px card gap when it docks at the end of the form (the next card
   no longer touches it) and carries a 12px canvas band, so scrolled content does not show behind or
   under the floating bar. Owner-approved value change (was: margin 0, raised shadow only). */
body.ui-modern .ui-form-actions--sticky { margin-bottom: 20px; box-shadow: 0 4px 12px rgba(16,24,40,.08), 0 0 0 12px #f5f7fb; }
@media print {
    body.ui-modern .ui-form-actions--sticky { box-shadow: none; }
}

/* ---------------------------------------------------------------------
   19. SudamericaInspection additions (AdminLTE 2 specifics)
   --------------------------------------------------------------------- */
/* AdminLTE .box: every colour variant gets the neutral card look; classes stay (app.js hooks). */
body.ui-modern .box {
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-top: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
body.ui-modern .box[class*="box-"] { border-top-color: #e4e7ec; }
body.ui-modern .box > .box-header { padding: 14px 20px; color: #101828; border-radius: 11px 11px 0 0; }
body.ui-modern .box > .box-header.with-border { border-bottom: 1px solid #eaecf0; }
body.ui-modern .box > .box-header .box-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; }
body.ui-modern .box > .box-header .box-tools { top: 8px; right: 12px; }
body.ui-modern .box.box-solid[class] > .box-header { background: #ffffff !important; color: #101828 !important; }
body.ui-modern .box.box-solid[class] > .box-header .btn-default { background: #ffffff; border-color: #d0d5dd; color: #344054; }
body.ui-modern .box.box-solid[class] > .box-header .btn-default:hover { background: #f2f4f7; border-color: #98a2b3; color: #101828; }
body.ui-modern .box.box-solid[class] > .box-header .btn-primary { background: #2563eb; border-color: #2563eb; color: #ffffff; }
body.ui-modern .box.box-solid[class] > .box-header .btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
body.ui-modern .box.box-solid[class] { border: 1px solid #e4e7ec; }
body.ui-modern .box > .box-body { padding: 20px; border-radius: 0 0 12px 12px; }
body.ui-modern .box > .box-body.no-padding { padding: 0; }
body.ui-modern .box > .box-footer { padding: 12px 20px; background: #f8fafc; border-top: 1px solid #eaecf0; border-radius: 0 0 11px 11px; }
body.ui-modern .box > .overlay,
body.ui-modern .box > .loading-img { border-radius: 12px; }
body.ui-modern .small-box { border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
body.ui-modern .info-box { border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.05); }

/* Modals: AdminLTE's .modal-primary painted the whole dialog blue with !important. */
body.ui-modern .modal-primary .modal-body,
body.ui-modern .modal-primary .modal-header,
body.ui-modern .modal-primary .modal-footer { color: #101828 !important; }
body.ui-modern .modal-primary .modal-body { background-color: #ffffff !important; }
body.ui-modern .modal-primary .modal-header { background-color: #ffffff !important; border-color: #eaecf0; }
body.ui-modern .modal-primary .modal-footer { background-color: #f8fafc !important; border-color: #eaecf0; }
/* Size: 640px by default (was Bootstrap's 600 / inline widths); content that needs room opts in with .ui-modal--lg. */
@media (min-width: 768px) {
    body.ui-modern .modal-dialog { width: 640px; max-width: calc(100vw - 32px); margin: 40px auto; }
    body.ui-modern .modal-dialog:has(.ui-modal--lg) { width: 960px; }
    body.ui-modern .modal-dialog.modal-lg { width: 960px; }
}
@media (max-width: 767px) {
    body.ui-modern .modal-dialog { width: auto; margin: 8px; }
}
body.ui-modern .modal-content-extra:empty { display: none; }

/* Confirm / message overlays (#magic-confirm, #magic-message): inline-styled dark bars become a dialog.
   Inline styles are plain (no !important), so !important here wins; ids, handlers and children are untouched. */
body.ui-modern #magic-confirm,
body.ui-modern #magic-message { background: rgba(15,23,42,.45) !important; z-index: 2070 !important; }
body.ui-modern #magic-confirm > div,
body.ui-modern #magic-message > div {
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    width: 440px;
    max-width: calc(100vw - 32px);
    height: auto !important;
    margin: 0 !important;
    padding: 24px 24px 20px;
    transform: translate(-50%, -50%);
    background: #ffffff !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(16,24,40,.18);
    text-align: center;
    z-index: 2071 !important;
}
body.ui-modern #magic-confirm h3,
body.ui-modern #magic-message h3 { margin: 0 0 16px; color: #101828 !important; font-size: 16px; font-weight: 600; line-height: 1.5; }
body.ui-modern #magic-confirm .container,
body.ui-modern #magic-message .container { width: auto; padding: 0; }
body.ui-modern #magic-confirm hr { display: none; }
body.ui-modern #magic-confirm .container:last-child,
body.ui-modern #magic-message .container:last-child { display: flex; justify-content: center; gap: 12px; }
body.ui-modern #magic-confirm .btn,
body.ui-modern #magic-message .btn { min-width: 100px; margin: 0 !important; }

/* AdminLTE .callout: solid coloured blocks (white text !important) become tinted callouts with a left accent. */
body.ui-modern .callout {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #e4e7ec;
    border-left-width: 4px;
    border-radius: 8px;
}
body.ui-modern .callout h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: inherit; }
body.ui-modern .callout p { margin: 0; }
body.ui-modern .callout.callout-info { background: #eff8ff !important; border-color: #b2ddff !important; border-left-color: #2e90fa !important; color: #175cd3 !important; }
body.ui-modern .callout.callout-warning { background: #fffaeb !important; border-color: #fedf89 !important; border-left-color: #f79009 !important; color: #93370d !important; }
body.ui-modern .callout.callout-danger { background: #fef3f2 !important; border-color: #fecdca !important; border-left-color: #f04438 !important; color: #b42318 !important; }
body.ui-modern .callout.callout-success { background: #ecfdf3 !important; border-color: #abefc6 !important; border-left-color: #12b76a !important; color: #067647 !important; }
body.ui-modern .callout a { color: inherit; text-decoration: underline; }
body.ui-modern .callout .btn,
body.ui-modern .callout .label { text-decoration: none; }

/* Legacy form rows (.editor-label / .editor-field) read like .ui-field until a screen is migrated. */
body.ui-modern .box .btn-box-tool,
body.ui-modern .box.box-solid[class] > .box-header .btn-box-tool { padding: 5px 10px; background: #ffffff; border: 1px solid #d0d5dd; border-radius: 8px; color: #344054; font-size: 13px; }
body.ui-modern .box .btn-box-tool:hover { background: #f2f4f7; color: #101828; }
body.ui-modern .editor-label { margin: 0 0 6px; }
body.ui-modern .editor-label label { margin: 0; color: #344054; font-size: 13px; font-weight: 600; }
body.ui-modern .editor-field { margin: 0 0 16px; }
body.ui-modern .editor-field .field-validation-error { display: block; margin-top: 4px; }
/* Box tools inside a card header sit in the flex row, not absolutely positioned. */
body.ui-modern .box > .box-header.ui-card-header { display: flex; }
body.ui-modern .box > .box-header.ui-card-header > .box-tools { position: static; margin: 0 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; }
body.ui-modern .box > .box-header.ui-card-header:before,
body.ui-modern .box > .box-header.ui-card-header:after { display: none; }

/* Xelect: its own focus colour is !important (#3c8dbc). */
body.ui-modern .xelect-single:focus,
body.ui-modern .xelect-multi-focus { border-color: #2563eb !important; }
body.ui-modern .xelect-single { background-image: none; box-shadow: none; border-color: #8a94a6; border-radius: 8px; height: 36px; line-height: 34px; }
body.ui-modern .xelect-multi { background-image: none; border-color: #8a94a6; border-radius: 8px; }
body.ui-modern .xelect-multi > .xelect-choice { background-image: none; background-color: #eff6ff; border-color: #bfdbfe; color: #1e40af; box-shadow: none; }
body.ui-modern .xelect-container { font-size: 14px; }

/* CKEditor 4 (CDN skin "moono-lisa"): card edges, not a heavy grey frame. */
body.ui-modern .cke_chrome { border: 1px solid #8a94a6 !important; border-radius: 8px; box-shadow: none !important; overflow: hidden; }
body.ui-modern .cke_top { background: #f8fafc !important; border-bottom: 1px solid #eaecf0 !important; }
body.ui-modern .cke_bottom { background: #f8fafc !important; border-top: 1px solid #eaecf0 !important; }

/* FullCalendar 2/3 */
body.ui-modern .fc { font-size: 13px; }
body.ui-modern .fc-toolbar { margin-bottom: 12px; }
body.ui-modern .fc-toolbar h2 { font-size: 18px; }
body.ui-modern .fc .fc-button {
    height: 34px;
    padding: 0 12px;
    background: #ffffff;
    background-image: none;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    color: #344054;
    text-shadow: none;
    box-shadow: none;
}
body.ui-modern .fc .fc-button:hover { background: #f2f4f7; }
body.ui-modern .fc .fc-state-active,
body.ui-modern .fc .fc-state-down { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
body.ui-modern .fc .fc-state-disabled { opacity: .5; }
body.ui-modern .fc-unthemed th,
body.ui-modern .fc-unthemed td,
body.ui-modern .fc-unthemed .fc-divider,
body.ui-modern .fc-unthemed .fc-row,
body.ui-modern .fc-unthemed .fc-content,
body.ui-modern .fc-unthemed .fc-popover { border-color: #eaecf0; }
body.ui-modern .fc-unthemed .fc-today { background: #eff6ff; }
body.ui-modern .fc-event { border-radius: 6px; }

/* D-C: on phones a grid scrolls sideways inside .table-responsive; a CSS-only shadow shows there is more. */
@media (max-width: 767px) {
    body.ui-modern .table-responsive {
        border: 0;
        background:
            linear-gradient(to right, #ffffff 30%, rgba(255,255,255,0)) left center / 24px 100% no-repeat local,
            linear-gradient(to left, #ffffff 30%, rgba(255,255,255,0)) right center / 24px 100% no-repeat local,
            radial-gradient(farthest-side at 0 50%, rgba(16,24,40,.18), rgba(16,24,40,0)) left center / 10px 100% no-repeat scroll,
            radial-gradient(farthest-side at 100% 50%, rgba(16,24,40,.18), rgba(16,24,40,0)) right center / 10px 100% no-repeat scroll;
        -webkit-overflow-scrolling: touch;
    }
}

/* Home (D-E): shortcut tiles and stat cards. */
body.ui-modern .ui-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 0 0 24px; }
body.ui-modern .ui-shortcut {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
    color: #101828;
    font-weight: 600;
    text-decoration: none;
}
body.ui-modern .ui-shortcut:hover,
body.ui-modern .ui-shortcut:focus { border-color: #bfdbfe; box-shadow: 0 4px 12px rgba(16,24,40,.08); color: #1d4ed8; text-decoration: none; }
body.ui-modern .ui-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 0 0 24px; }
body.ui-modern .ui-stat-grid > .ui-stat { margin-bottom: 0; }

/* Buttons inside callouts keep their own colours (callout text colour must not leak into them). */
body.ui-modern .callout a.btn { color: #ffffff !important; }
body.ui-modern .callout a.btn-default { color: #344054 !important; }

/* Legacy headers (box-title with a bare icon) get the icon-chip look; "Limpiar" reset buttons read as secondary. */
body.ui-modern .box-header.ui-card-header > .box-title > i.fa:first-child,
body.ui-modern .box-header.ui-card-header > .box-title > i.icon:first-child { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-right: 10px; border-radius: 8px; background: #eff6ff; color: #2563eb; font-size: 15px; vertical-align: middle; }
body.ui-modern input[type="reset"].btn-warning { background: #ffffff; border: 1px solid #d0d5dd; color: #344054; }
body.ui-modern input[type="reset"].btn-warning:hover { background: #f2f4f7; }

/* ---------------------------------------------------------------------
   20. v2.7 polish: fixed header, calm palette, alerts/callouts, modal spacing
   Palette rule: slate chrome + one blue accent. Red/amber/green only for real states, always as soft tints.
   --------------------------------------------------------------------- */
/* Fixed top bar at every width (the sidebar was already fixed). */
body.ui-modern .main-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; }
body.ui-modern .wrapper { padding-top: 56px; }
body.ui-modern .content-header.ui-page-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 16px 15px 0; }
body.ui-modern .content-header.ui-page-actions > div { float: none !important; }
body.ui-modern .content-header .breadcrumb { display: none !important; }

/* Modal: the form card inside the dialog must not add its own margin/border below the footer. */
body.ui-modern .modal-content > .box,
body.ui-modern .modal-content > form.box { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
body.ui-modern .modal-content > .box > .box-footer { border-radius: 0; }

/* Results card under the filter card. */
body.ui-modern .ui-results { margin-top: 0; }
body.ui-modern .ui-results > .box-body { padding: 0; }
body.ui-modern .ui-results #grid-container { min-height: 48px; }

/* Labels: AdminLTE forces solid fills with !important; use soft tints. */
body.ui-modern .label { border: 1px solid transparent; font-weight: 600; }
body.ui-modern .label.label-default,
body.ui-modern .label.label-primary,
body.ui-modern .label.label-info { background-color: #eff4ff !important; color: #1d4ed8 !important; border-color: #d1e0ff; }
body.ui-modern .label.label-default { background-color: #f2f4f7 !important; color: #344054 !important; border-color: #e4e7ec; }
body.ui-modern .label.label-success { background-color: #ecfdf3 !important; color: #067647 !important; border-color: #abefc6; }
body.ui-modern .label.label-warning { background-color: #fffaeb !important; color: #93370d !important; border-color: #fedf89; }
body.ui-modern .label.label-danger { background-color: #fef3f2 !important; color: #b42318 !important; border-color: #fecdca; }
body.ui-modern .badge.bg-yellow,
body.ui-modern .badge.bg-yellow-active,
body.ui-modern .badge.bg-green,
body.ui-modern .badge.bg-red,
body.ui-modern .badge.bg-aqua,
body.ui-modern .badge.bg-light-blue { background-color: #f2f4f7 !important; color: #344054 !important; border: 1px solid #e4e7ec; }

/* Rows: the pill carries the status; only errors keep a thin accent. */
body.ui-modern .table > tbody > tr.warning > td,
body.ui-modern .table > tbody > tr.success > td,
body.ui-modern .table > tbody > tr.info > td { background: transparent; }
body.ui-modern .table > tbody > tr.danger > td { background: #fffbfa; }
body.ui-modern .table > tbody > tr.danger > td:first-child { box-shadow: inset 3px 0 0 #f04438; }

/* Buttons: affirmative = primary blue; warning/info = neutral; danger = outlined. */
body.ui-modern .btn-success { background: #2563eb; border-color: #2563eb; color: #ffffff; }
body.ui-modern .btn-success:hover,
body.ui-modern .btn-success:focus { background: #1d4ed8; border-color: #1d4ed8; color: #ffffff; }
body.ui-modern .btn-warning,
body.ui-modern .btn-info { background: #ffffff; border: 1px solid #d0d5dd; color: #344054; }
body.ui-modern .btn-warning:hover,
body.ui-modern .btn-warning:focus,
body.ui-modern .btn-info:hover,
body.ui-modern .btn-info:focus { background: #f2f4f7; border-color: #98a2b3; color: #101828; }
body.ui-modern .btn-danger { background: #ffffff; border: 1px solid #fda29b; color: #b42318; }
body.ui-modern .btn-danger:hover,
body.ui-modern .btn-danger:focus { background: #fef3f2; border-color: #f04438; color: #b42318; }
body.ui-modern .modal-footer .btn-danger,
body.ui-modern #magic-confirm .btn-danger { background: #d92d20; border-color: #d92d20; color: #ffffff; }
body.ui-modern .callout a.btn-success,
body.ui-modern .callout a.btn-danger { color: #ffffff !important; }
body.ui-modern .callout a.btn-danger { color: #b42318 !important; }

/* Callouts and alerts: one layout, soft tint, no left bar. */
body.ui-modern .callout,
body.ui-modern .alert {
    position: relative;
    margin: 0 0 16px;
    padding: 12px 16px 12px 44px;
    border: 1px solid #e4e7ec;
    border-left-width: 1px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}
body.ui-modern .callout:before,
body.ui-modern .alert:before {
    content: "\f05a";
    position: absolute; left: 16px; top: 12px;
    font-family: FontAwesome; font-size: 16px; line-height: 1.5;
}
body.ui-modern .callout.callout-warning:before,
body.ui-modern .alert-warning:before { content: "\f071"; }
body.ui-modern .callout.callout-danger:before,
body.ui-modern .alert-danger:before { content: "\f06a"; }
body.ui-modern .callout.callout-success:before,
body.ui-modern .alert-success:before { content: "\f058"; }
body.ui-modern .callout h4,
body.ui-modern .alert h4 { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: inherit; }
body.ui-modern .callout p,
body.ui-modern .alert p { margin: 0 0 4px; }
body.ui-modern .callout > :last-child,
body.ui-modern .alert > :last-child { margin-bottom: 0; }
body.ui-modern .alert-dismissable,
body.ui-modern .alert-dismissible { padding-right: 40px; }
body.ui-modern .alert .close { top: 8px; right: 12px; color: inherit; opacity: .55; text-shadow: none; }
body.ui-modern .alert .close:hover { opacity: 1; }
body.ui-modern .callout.callout-info,
body.ui-modern .alert-info { background: #f5f8ff !important; border-color: #d1e0ff !important; color: #1d4ed8 !important; }
body.ui-modern .callout.callout-warning,
body.ui-modern .alert-warning { background: #fffcf5 !important; border-color: #fedf89 !important; color: #93370d !important; }
body.ui-modern .callout.callout-danger,
body.ui-modern .alert-danger { background: #fffbfa !important; border-color: #fecdca !important; color: #b42318 !important; }
body.ui-modern .callout.callout-success,
body.ui-modern .alert-success { background: #f6fef9 !important; border-color: #abefc6 !important; color: #067647 !important; }
body.ui-modern .validation-summary-valid { display: none; }
body.ui-modern .validation-summary-errors ul { margin: 0; padding-left: 18px; }

/* Collapsible long text (Presupuesto observaciones). */
body.ui-modern details.ui-obs { margin: 12px 0 16px; border: 1px solid #e4e7ec; border-radius: 10px; background: #f8fafc; }
body.ui-modern details.ui-obs > summary { padding: 10px 16px; cursor: pointer; font-weight: 600; color: #344054; list-style: none; }
body.ui-modern details.ui-obs > summary::-webkit-details-marker { display: none; }
body.ui-modern details.ui-obs > summary:before { content: "\f054"; font-family: FontAwesome; font-size: 11px; margin-right: 10px; display: inline-block; transition: transform .15s; }
body.ui-modern details.ui-obs[open] > summary:before { transform: rotate(90deg); }
body.ui-modern details.ui-obs > .ui-obs-body { padding: 4px 16px 14px; color: #344054; max-height: 320px; overflow: auto; }

/* ---------------------------------------------------------------------
   21. v2.8 one-card list pages (owner decision 2026-11-01, replaces the separate
   results card): title + actions, collapsed filter and results share one card.
   --------------------------------------------------------------------- */
body.ui-modern .ui-listcard > .ui-card-header { border-radius: 11px 11px 0 0; }
body.ui-modern .ui-listcard > .ui-listcard-grid { min-height: 48px; border-top: 1px solid #eaecf0; }
body.ui-modern .ui-listcard > .ui-listcard-grid > .magicgrid,
body.ui-modern .ui-listcard > .ui-listcard-grid > .table-responsive { margin: 0; border: 0; }
/* Grid partials that bring their own panel (Usuario, Perfil) lose its frame inside the list card. */
body.ui-modern .ui-listcard > .ui-listcard-grid > .panel { margin: 0; border: 0; border-radius: 0 0 11px 11px; box-shadow: none; }
/* Filter body that is always open while its form toggles itself (Wiki). */
body.ui-modern .ui-filterbar-body--self { padding: 0; border-top: 0; }
body.ui-modern .ui-filterbar-body--self > form { padding: 16px 20px; border-top: 1px solid #eaecf0; }

/* Icon button whose label comes from a helper (Html.Modal("Editar", "fa-pencil", …)): the text stays as the
   accessible name but is not painted, so the cell matches the other icon-only row actions. */
body.ui-modern .ui-icon-btn--text-hidden { font-size: 0; }
body.ui-modern .ui-icon-btn--text-hidden > .fa { font-size: 14px; }

/* Legacy .grid page wrapper (Site.css: 3px teal frame, green card header) on Certificado, Perfil and Actividad.
   .grid stays in the markup (app.js closest('.grid') hook); only its old chrome is removed so the card reads like R1b. */
body.ui-modern .grid { border: 0; }
body.ui-modern .grid .box .box-header { background-color: transparent; }

/* ---------------------------------------------------------------------
   22. v2.11 (Axsis UI kit, 2026-11-24): buttons in solid card headers, .alert-error
   Found while building the kit style guide; it affects every app on AdminLTE 2.3,
   SudamericaInspection v2.10 included. Additive only.
   --------------------------------------------------------------------- */
/* AdminLTE has `.box.box-solid>.box-header>.box-tools .btn{border:0;box-shadow:none}` and
   `.box.box-solid.box-<colour>>.box-header a, ... .btn{color:#fff}`. Since the design system paints every
   card header white, secondary buttons in a solid card header lost their border (Buscar / Volver read as
   plain text, unlike the same buttons in a non-solid card) and outlined buttons were white on white
   (an Entidad/Edit "Deshabilitar" btn-danger was invisible). Give them back the standard button look. */
body.ui-modern .box.box-solid[class] > .box-header > .box-tools .btn { border-width: 1px; border-style: solid; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
body.ui-modern .box.box-solid[class] > .box-header .btn-default,
body.ui-modern .box.box-solid[class] > .box-header .btn-warning,
body.ui-modern .box.box-solid[class] > .box-header .btn-info { background: #ffffff; border-color: #d0d5dd; color: #344054; }
body.ui-modern .box.box-solid[class] > .box-header .btn-default:hover,
body.ui-modern .box.box-solid[class] > .box-header .btn-warning:hover,
body.ui-modern .box.box-solid[class] > .box-header .btn-info:hover { background: #f2f4f7; border-color: #98a2b3; color: #101828; }
body.ui-modern .box.box-solid[class] > .box-header .btn-success { background: #2563eb; border-color: #2563eb; color: #ffffff; }
body.ui-modern .box.box-solid[class] > .box-header .btn-success:hover { background: #1d4ed8; border-color: #1d4ed8; color: #ffffff; }
body.ui-modern .box.box-solid[class] > .box-header .btn-danger { background: #ffffff; border-color: #fda29b; color: #b42318; }
body.ui-modern .box.box-solid[class] > .box-header .btn-danger:hover { background: #fef3f2; border-color: #f04438; color: #b42318; }
/* Plain links and icon buttons in a solid header were white too. */
body.ui-modern .box.box-solid[class] > .box-header a:not(.btn):not(.ui-icon-btn) { color: #1d4ed8; }
body.ui-modern .box.box-solid[class] > .box-header a.ui-icon-btn { color: #475467; }
/* ...but a dropdown opened from a solid header keeps the standard menu look (section 13 colours). Without
   this its items took the link blue above; on v2.10 they were white on white (SudamericaInspection
   Set/Index "Busquedas Propias"). The :not() pair keeps this rule above the link rule. */
body.ui-modern .box.box-solid[class] > .box-header .dropdown-menu > li > a:not(.btn):not(.ui-icon-btn) { color: #101828; }
body.ui-modern .box.box-solid[class] > .box-header .dropdown-menu > li > a:not(.btn):not(.ui-icon-btn):hover,
body.ui-modern .box.box-solid[class] > .box-header .dropdown-menu > li > a:not(.btn):not(.ui-icon-btn):focus { background: #f2f4f7; color: #101828; }
body.ui-modern .box.box-solid[class] > .box-header .dropdown-menu > .active > a:not(.btn):not(.ui-icon-btn) { background: #eff6ff; color: #1e40af; }
body.ui-modern .box.box-solid[class] > .box-header .dropdown-menu > .disabled > a:not(.btn):not(.ui-icon-btn) { color: #98a2b3; }

/* `.alert-error` (Bootstrap 2 name, still passed to Html.ValidationSummary in some views) kept AdminLTE's
   solid red (!important). Same soft danger look and icon as .alert-danger. */
body.ui-modern .alert-error { background: #fffbfa !important; border-color: #fecdca !important; color: #b42318 !important; }
body.ui-modern .alert-error:before { content: "\f06a"; }

/* ---------------------------------------------------------------------
   23. v2.12 (Axsis UI kit, 2026-11-24): soft / ghost button modifiers keep their look
   Section 6 documents .ui-btn-soft / .ui-btn-ghost as overriding a colour class on the same element. Section 20
   recolours .btn-success/-warning/-info/-danger later at the same specificity, so `btn btn-success ui-btn-soft`
   (Catalogados Pedido/_Grid "Ver Remito") turned solid blue. Same values as section 6, one class more. Additive only.
   --------------------------------------------------------------------- */
body.ui-modern .btn.ui-btn-soft { background: #eff6ff; border-color: #eff6ff; color: #1e40af; box-shadow: none; }
body.ui-modern .btn.ui-btn-soft:hover,
body.ui-modern .btn.ui-btn-soft:focus { background: #dbeafe; border-color: #dbeafe; color: #1e40af; }
body.ui-modern .btn.ui-btn-ghost { background: transparent; border-color: transparent; color: #475467; box-shadow: none; }
body.ui-modern .btn.ui-btn-ghost:hover,
body.ui-modern .btn.ui-btn-ghost:focus { background: #f2f4f7; border-color: transparent; color: #101828; }

/* ---------------------------------------------------------------------
   24. v2.13 (Axsis UI kit, 2026-11-25): legacy AdminLTE, Bootstrap 3 and MagicGrid fixes
   Found in TRACKER Stage A (trk-shell.css, rollout QA-LOG #7) and checked against SudamericaInspection, BIACCO,
   ARTSPOT and Catalogados. Each rule only undoes a legacy rule or an inline style, so it changes nothing where that
   cause is absent. Additive only.
   --------------------------------------------------------------------- */
/* Headings: AdminLTE 2.3 sets h1-h6 / .h1-.h6 to 'Source Sans Pro', loaded by the @import on its first line. In an
   optimized ~/Content/css bundle that @import is mid-file, so browsers ignore it and headings fell back to the generic
   sans-serif (Arial on Windows) next to Segoe UI body text; unbundled, it fetches a web font. Headings use the body
   stack (02: no web fonts), as Bootstrap's own `font-family: inherit` does where AdminLTE is not loaded (Catalogados). */
body.ui-modern h1, body.ui-modern h2, body.ui-modern h3, body.ui-modern h4, body.ui-modern h5, body.ui-modern h6,
body.ui-modern .h1, body.ui-modern .h2, body.ui-modern .h3, body.ui-modern .h4, body.ui-modern .h5, body.ui-modern .h6 { font-family: inherit; }

/* .hidden-xs: the AdminLTE apps' Site.css has `.hidden-xs { display: inline !important }` at every width, so
   Bootstrap's hidden-xs hid nothing on phones (top-bar user name, footer version). Restore Bootstrap's contract. */
@media (max-width: 767px) {
    body.ui-modern .hidden-xs { display: none !important; }
}

/* Modal footers: AdminLTE's .btn-outline (white text and border, made for its coloured .modal-primary) is invisible
   on the design system's white modal. The legacy Edit modals use a bare `btn btn-outline` pair: cancel/close reads
   as secondary (section 6 .btn-default values), the submit button as primary. A colour class on the same button
   keeps its own look. Selected by type: no markup change. */
body.ui-modern .modal-footer .btn-outline:not(.btn-primary):not(.btn-success):not(.btn-info):not(.btn-warning):not(.btn-danger) { background: #ffffff; border-color: #d0d5dd; color: #344054; }
body.ui-modern .modal-footer .btn-outline:not(.btn-primary):not(.btn-success):not(.btn-info):not(.btn-warning):not(.btn-danger):hover,
body.ui-modern .modal-footer .btn-outline:not(.btn-primary):not(.btn-success):not(.btn-info):not(.btn-warning):not(.btn-danger):focus { background: #f8fafc; border-color: #b9c0cc; color: #101828; }
body.ui-modern .modal-footer .btn-outline[type=submit]:not(.btn-primary):not(.btn-success):not(.btn-info):not(.btn-warning):not(.btn-danger) { background: #2563eb; border-color: #2563eb; color: #ffffff; }
body.ui-modern .modal-footer .btn-outline[type=submit]:not(.btn-primary):not(.btn-success):not(.btn-info):not(.btn-warning):not(.btn-danger):hover,
body.ui-modern .modal-footer .btn-outline[type=submit]:not(.btn-primary):not(.btn-success):not(.btn-info):not(.btn-warning):not(.btn-danger):focus { background: #1d4ed8; border-color: #1d4ed8; color: #ffffff; }

/* MagicGrid group rows: Magic.Grid writes style="background:#CECECE" on td.magicgrid-group-header for each value of a
   `groupable:` column the user groups by. The neutral tint of 02 (#f2f4f7 / #344054), one step darker than the header. */
body.ui-modern .table > tbody > tr > td.magicgrid-group-header { background: #f2f4f7 !important; color: #344054; font-weight: 600; }

/* Print: Bootstrap 3 prints every link's URL after it (a[href]:after), which floods printed grids and row actions
   with /Controller/Action?... text. */
@media print {
    body.ui-modern a[href]:after { content: none; }
}
