/* ==========================================================================
   MLPS · Modern UI
   Rediseño visual claro y profesional. No modifica lógica de negocio.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --mlps-bg: #f4f7fb;
    --mlps-surface: #ffffff;
    --mlps-surface-2: #f8fafc;
    --mlps-text: #0f172a;
    --mlps-muted: #64748b;
    --mlps-muted-2: #94a3b8;
    --mlps-border: #e7edf5;
    --mlps-primary: #4f46e5;
    --mlps-primary-2: #6366f1;
    --mlps-primary-soft: #eef2ff;
    --mlps-success: #059669;
    --mlps-success-soft: #ecfdf5;
    --mlps-danger: #dc2626;
    --mlps-danger-soft: #fef2f2;
    --mlps-warning: #d97706;
    --mlps-warning-soft: #fffbeb;
    --mlps-info: #0284c7;
    --mlps-radius: 18px;
    --mlps-radius-sm: 12px;
    --mlps-shadow: 0 12px 32px rgba(15, 23, 42, .06);
    --mlps-shadow-lg: 0 24px 60px rgba(15, 23, 42, .12);
    --mlps-sidebar: 268px;
    --mlps-topbar: 76px;
}

html {
    font-size: 15px;
}

body.modern-ui,
body.login-page {
    background: var(--mlps-bg);
    color: var(--mlps-text);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.modern-ui a {
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

body.modern-ui #layout-wrapper {
    min-height: 100vh;
}

body.modern-ui .vertical-menu {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--mlps-sidebar);
    height: 100vh;
    background: var(--mlps-surface);
    border-right: 1px solid var(--mlps-border);
    box-shadow: none;
    z-index: 1040;
    transition: width .2s ease, transform .2s ease;
}

body.modern-ui .vertical-menu .simplebar-content-wrapper,
body.modern-ui .vertical-menu .simplebar-content {
    height: 100%;
}

body.modern-ui .main-content {
    margin-left: var(--mlps-sidebar);
    min-height: 100vh;
    transition: margin-left .2s ease;
}

body.modern-ui #page-topbar {
    position: fixed;
    top: 0;
    left: var(--mlps-sidebar);
    right: 0;
    height: var(--mlps-topbar);
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid var(--mlps-border);
    box-shadow: none;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1030;
    transition: left .2s ease;
}

body.modern-ui .navbar-header {
    height: var(--mlps-topbar);
    padding: 0 28px;
}

body.modern-ui .page-content {
    padding: calc(var(--mlps-topbar) + 26px) 28px 26px;
}

body.modern-ui .container-fluid {
    max-width: 1480px;
    padding-left: 0;
    padding-right: 0;
}

body.modern-ui .footer {
    padding: 18px 28px 26px;
    color: var(--mlps-muted);
    background: transparent;
    font-size: 12.5px;
    border-top: 0;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.mlps-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px 14px 16px;
}

.mlps-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 10px 20px;
    color: var(--mlps-text);
}

.mlps-brand:hover {
    color: var(--mlps-text);
}

.mlps-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--mlps-primary), var(--mlps-primary-2));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -.04em;
    flex: 0 0 42px;
    box-shadow: 0 8px 18px rgba(79, 70, 229, .28);
    overflow: hidden;
}

.mlps-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 4px;
}

.mlps-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.mlps-brand-text strong {
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.mlps-brand-text span {
    font-size: 11px;
    color: var(--mlps-muted);
    font-weight: 500;
    white-space: nowrap;
}

.mlps-role-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 10px 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--mlps-primary-soft);
    color: var(--mlps-primary);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .02em;
    width: fit-content;
    white-space: nowrap;
}

.mlps-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 2px 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mlps-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body.modern-ui .vertical-menu,
body.modern-ui .vertical-menu #sidebar-menu,
body.modern-ui .vertical-menu .simplebar-content-wrapper,
body.modern-ui .vertical-menu .simplebar-content {
    min-height: 0;
}

.mlps-nav-section {
    padding: 16px 12px 7px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--mlps-muted-2);
}

.mlps-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 11px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.mlps-nav a span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mlps-nav a i {
    font-size: 18px;
    color: #94a3b8;
    flex: 0 0 20px;
    transition: color .15s ease;
}

.mlps-nav a:hover {
    background: #f5f7ff;
    color: var(--mlps-primary);
}

.mlps-nav a:hover i {
    color: var(--mlps-primary);
}

.mlps-nav a.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, .13), rgba(99, 102, 241, .05));
    color: var(--mlps-primary);
    box-shadow: inset 3px 0 0 var(--mlps-primary);
}

.mlps-nav a.active i {
    color: var(--mlps-primary);
}

.mlps-sidebar-footer {
    margin-top: 12px;
    padding: 14px 8px 0;
    border-top: 1px solid var(--mlps-border);
}

.mlps-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    background: var(--mlps-surface-2);
}

.mlps-sidebar-user .mlps-avatar {
    width: 34px;
    height: 34px;
    font-size: 11px;
}

.mlps-sidebar-user-info {
    min-width: 0;
    line-height: 1.25;
}

.mlps-sidebar-user-info strong {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mlps-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mlps-sidebar-user-info span {
    display: block;
    font-size: 10.5px;
    color: var(--mlps-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */

.mlps-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    height: var(--mlps-topbar);
}

.mlps-topbar-left,
.mlps-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mlps-topbar-title {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.mlps-topbar-title strong {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--mlps-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mlps-topbar-title span {
    font-size: 11.5px;
    color: var(--mlps-muted);
    font-weight: 500;
}

.mlps-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--mlps-border);
    border-radius: 12px;
    background: #fff;
    color: var(--mlps-text);
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.mlps-topbar-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--mlps-border);
    background: #fff;
    color: #334155;
    font-size: 12.5px;
    font-weight: 700;
    transition: all .15s ease;
}

.mlps-topbar-action:hover {
    border-color: #c7d2fe;
    color: var(--mlps-primary);
    background: #f8faff;
}

.mlps-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -.02em;
    flex: 0 0 40px;
    overflow: hidden;
}

.mlps-user-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 4px 4px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--mlps-text);
}

.mlps-user-button:hover {
    background: #f8fafc;
    border-color: var(--mlps-border);
}

.mlps-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.mlps-user-meta strong {
    font-size: 12px;
    font-weight: 700;
}

.mlps-user-meta span {
    font-size: 10.5px;
    color: var(--mlps-muted);
}

body.modern-ui .dropdown-menu {
    border: 1px solid var(--mlps-border);
    border-radius: 14px;
    box-shadow: var(--mlps-shadow-lg);
    padding: 6px;
    font-size: 13px;
}

body.modern-ui .dropdown-item {
    border-radius: 9px;
    padding: 9px 11px;
    font-weight: 600;
    color: #334155;
}

body.modern-ui .dropdown-item:hover {
    background: var(--mlps-primary-soft);
    color: var(--mlps-primary);
}

/* --------------------------------------------------------------------------
   Typography and page headers
   -------------------------------------------------------------------------- */

body.modern-ui h1,
body.modern-ui h2,
body.modern-ui h3,
body.modern-ui h4,
body.modern-ui h5,
body.modern-ui h6 {
    color: var(--mlps-text);
    font-weight: 800;
    letter-spacing: -.02em;
}

body.modern-ui .page-title-box {
    margin-bottom: 18px;
}

body.modern-ui .page-title-box h4 {
    font-size: 22px;
    margin: 0;
}

body.modern-ui .breadcrumb {
    margin: 0;
    font-size: 12px;
}

body.modern-ui .breadcrumb-item a {
    color: var(--mlps-muted);
}

body.modern-ui .breadcrumb-item.active {
    color: var(--mlps-primary);
    font-weight: 700;
}

body.modern-ui .text-muted {
    color: var(--mlps-muted) !important;
}

/* --------------------------------------------------------------------------
   Cards, stats and surfaces
   -------------------------------------------------------------------------- */

body.modern-ui .card {
    border: 1px solid var(--mlps-border);
    border-radius: var(--mlps-radius);
    background: var(--mlps-surface);
    box-shadow: var(--mlps-shadow);
}

body.modern-ui .card-body {
    padding: 22px;
}

body.modern-ui .card-header {
    background: transparent;
    border-bottom: 1px solid var(--mlps-border);
    padding: 18px 22px;
}

body.modern-ui .mini-stats-wid .card-body {
    padding: 20px 22px;
}

body.modern-ui .mini-stats-wid p {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mlps-muted) !important;
    margin-bottom: 6px;
}

body.modern-ui .mini-stats-wid h4 {
    font-size: 24px;
    letter-spacing: -.03em;
    margin: 0;
}

body.modern-ui .mini-stat-icon,
body.modern-ui .avatar-sm {
    width: 48px;
    height: 48px;
    border-radius: 14px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mlps-primary-soft) !important;
    color: var(--mlps-primary) !important;
}

body.modern-ui .mini-stat-icon i,
body.modern-ui .avatar-sm i {
    color: inherit !important;
}

body.modern-ui .bg-primary {
    background: var(--mlps-primary) !important;
}

body.modern-ui .bg-success {
    background: var(--mlps-success) !important;
}

body.modern-ui .bg-danger {
    background: var(--mlps-danger) !important;
}

body.modern-ui .bg-warning {
    background: var(--mlps-warning) !important;
}

body.modern-ui .bg-dark {
    background: #0f172a !important;
}

body.modern-ui .bg-soft-primary {
    background: var(--mlps-primary-soft) !important;
    color: var(--mlps-primary) !important;
}

/* --------------------------------------------------------------------------
   Buttons, badges and forms
   -------------------------------------------------------------------------- */

body.modern-ui .btn {
    border-radius: 11px;
    font-size: 12.5px;
    font-weight: 700;
    padding: 9px 15px;
    border-width: 1px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

body.modern-ui .btn:hover {
    transform: translateY(-1px);
}

body.modern-ui .btn-primary {
    background: linear-gradient(135deg, var(--mlps-primary), var(--mlps-primary-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 18px rgba(79, 70, 229, .24);
}

body.modern-ui .btn-primary:hover,
body.modern-ui .btn-primary:focus {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    border-color: transparent;
    color: #fff;
}

body.modern-ui .btn-danger {
    background: var(--mlps-danger);
    border-color: var(--mlps-danger);
    color: #fff;
}

body.modern-ui .btn-outline-info {
    color: var(--mlps-primary);
    border-color: #c7d2fe;
    background: #fff;
}

body.modern-ui .btn-outline-info:hover {
    background: var(--mlps-primary-soft);
    color: var(--mlps-primary);
    border-color: #c7d2fe;
}

body.modern-ui .btn-outline-danger {
    color: var(--mlps-danger);
    border-color: #fecaca;
    background: #fff;
}

body.modern-ui .btn-outline-danger:hover {
    background: var(--mlps-danger-soft);
    color: var(--mlps-danger);
    border-color: #fecaca;
}

body.modern-ui .btn-light {
    background: #fff;
    border-color: var(--mlps-border);
    color: #334155;
}

body.modern-ui .badge {
    border-radius: 999px;
    padding: .42em .72em;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .01em;
}

body.modern-ui .form-label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

body.modern-ui .form-control,
body.modern-ui .form-select {
    min-height: 45px;
    border-radius: 11px;
    border: 1px solid #dbe3ee;
    background-color: #fff;
    font-size: 13px;
    color: var(--mlps-text);
    padding: 9px 13px;
    box-shadow: none;
}

body.modern-ui .form-control:focus,
body.modern-ui .form-select:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}

body.modern-ui textarea.form-control {
    min-height: 110px;
}

body.modern-ui .input-group-text {
    border-radius: 11px;
    border-color: #dbe3ee;
    background: #f8fafc;
    color: var(--mlps-muted);
}

body.modern-ui .form-check-input:checked {
    background-color: var(--mlps-primary);
    border-color: var(--mlps-primary);
}

body.modern-ui .invalid-tooltip,
body.modern-ui .valid-tooltip {
    border-radius: 8px;
    font-size: 10.5px;
}

body.modern-ui .alert {
    border: 0;
    border-radius: 13px;
    font-size: 13px;
    padding: 13px 16px;
}

body.modern-ui .alert-danger {
    background: var(--mlps-danger-soft);
    color: #991b1b;
}

body.modern-ui .alert-success {
    background: var(--mlps-success-soft);
    color: #065f46;
}

body.modern-ui .alert-info {
    background: #eff6ff;
    color: #1d4ed8;
}

body.modern-ui .image_upload_zone {
    border: 1.5px dashed #cbd5e1;
    border-radius: 14px;
    background: #fbfdff;
    transition: border-color .15s ease, background .15s ease;
}

body.modern-ui .image_upload_zone:hover {
    border-color: #a5b4fc;
    background: #f8faff;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

body.modern-ui .table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--mlps-border);
    margin-bottom: 0;
    color: #334155;
    font-size: 12.5px;
    vertical-align: middle;
}

body.modern-ui .table > :not(caption) > * > * {
    padding: 13px 14px;
    border-bottom-width: 1px;
}

body.modern-ui .table thead th {
    background: #f8fafc;
    color: var(--mlps-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid var(--mlps-border);
}

body.modern-ui .table tbody tr {
    transition: background .12s ease;
}

body.modern-ui .table tbody tr:hover {
    background: #f8faff;
}

body.modern-ui .table td {
    border-color: var(--mlps-border);
}

body.modern-ui .table-responsive,
body.modern-ui .dataTables_wrapper {
    border-radius: 14px;
    overflow: hidden;
}

body.modern-ui .dataTables_wrapper .dataTables_filter input,
body.modern-ui .dataTables_wrapper .dataTables_length select {
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 12px;
}

body.modern-ui .dataTables_wrapper .dataTables_filter {
    margin-bottom: 12px;
}

body.modern-ui .dataTables_wrapper .dataTables_info,
body.modern-ui .dataTables_wrapper .dataTables_length,
body.modern-ui .dataTables_wrapper .dataTables_filter {
    font-size: 11.5px;
    color: var(--mlps-muted);
}

body.modern-ui .page-link {
    border: 0;
    border-radius: 9px !important;
    margin: 0 2px;
    color: var(--mlps-muted);
    font-size: 12px;
    font-weight: 700;
    padding: 7px 11px;
}

body.modern-ui .page-item.active .page-link {
    background: var(--mlps-primary);
    color: #fff;
    box-shadow: 0 6px 14px rgba(79, 70, 229, .22);
}

body.modern-ui .page-link:hover {
    background: var(--mlps-primary-soft);
    color: var(--mlps-primary);
}

/* --------------------------------------------------------------------------
   Modals, dropdowns, misc
   -------------------------------------------------------------------------- */

body.modern-ui .modal-content {
    border: 0;
    border-radius: 20px;
    box-shadow: var(--mlps-shadow-lg);
}

body.modern-ui .modal-header,
body.modern-ui .modal-footer {
    border-color: var(--mlps-border);
    padding: 18px 22px;
}

body.modern-ui .modal-body {
    padding: 22px;
}

body.modern-ui .select2-container--default .select2-selection--single {
    height: 45px;
    border: 1px solid #dbe3ee;
    border-radius: 11px;
    padding: 7px 10px;
}

body.modern-ui .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 43px;
}

body.modern-ui .select2-dropdown {
    border-color: #dbe3ee;
    border-radius: 11px;
    overflow: hidden;
}

body.modern-ui .nav-tabs {
    border-color: var(--mlps-border);
}

body.modern-ui .nav-tabs .nav-link {
    border: 0;
    color: var(--mlps-muted);
    font-size: 12.5px;
    font-weight: 700;
    padding: 11px 14px;
}

body.modern-ui .nav-tabs .nav-link.active {
    color: var(--mlps-primary);
    border-bottom: 2px solid var(--mlps-primary);
    background: transparent;
}

body.modern-ui hr {
    border-color: var(--mlps-border);
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Responsive shell
   -------------------------------------------------------------------------- */

@media (min-width: 992px) {
    body.vertical-collpsed .vertical-menu {
        width: 84px !important;
    }

    body.vertical-collpsed .main-content {
        margin-left: 84px;
    }

    body.vertical-collpsed #page-topbar {
        left: 84px;
    }

    body.vertical-collpsed .mlps-brand-text,
    body.vertical-collpsed .mlps-role-pill,
    body.vertical-collpsed .mlps-nav-section,
    body.vertical-collpsed .mlps-nav a span,
    body.vertical-collpsed .mlps-sidebar-user-info {
        display: none;
    }

    body.vertical-collpsed .mlps-brand {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    body.vertical-collpsed .mlps-nav a {
        justify-content: center;
        padding: 9px 8px;
    }

    body.vertical-collpsed .mlps-sidebar-user {
        justify-content: center;
    }

    /* Al pasar el mouse, el riel de iconos se expande sin mover el contenido. */
    body.vertical-collpsed .vertical-menu:hover {
        width: var(--mlps-sidebar) !important;
        box-shadow: var(--mlps-shadow-lg);
    }

    body.vertical-collpsed .vertical-menu:hover .mlps-brand-text,
    body.vertical-collpsed .vertical-menu:hover .mlps-sidebar-user-info {
        display: flex;
        flex-direction: column;
    }

    body.vertical-collpsed .vertical-menu:hover .mlps-role-pill {
        display: inline-flex;
    }

    body.vertical-collpsed .vertical-menu:hover .mlps-nav-section {
        display: block;
    }

    body.vertical-collpsed .vertical-menu:hover .mlps-nav a span {
        display: inline;
    }

    body.vertical-collpsed .vertical-menu:hover .mlps-brand {
        justify-content: flex-start;
        padding-left: 10px;
        padding-right: 10px;
    }

    body.vertical-collpsed .vertical-menu:hover .mlps-nav a {
        justify-content: flex-start;
        padding: 10px 12px;
    }

    body.vertical-collpsed .vertical-menu:hover .mlps-sidebar-user {
        justify-content: flex-start;
    }
}

@media (max-width: 991.98px) {
    body.modern-ui #page-topbar {
        left: 0;
        padding: 0;
    }

    body.modern-ui .main-content {
        margin-left: 0;
    }

    body.modern-ui .vertical-menu {
        transform: translateX(-100%);
        box-shadow: var(--mlps-shadow-lg);
    }

    body.sidebar-enable .vertical-menu {
        transform: translateX(0);
    }

    body.sidebar-enable::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .35);
        z-index: 1035;
    }

    body.modern-ui .navbar-header {
        padding: 0 16px;
    }

    body.modern-ui .page-content {
        padding: calc(var(--mlps-topbar) + 18px) 16px 20px;
    }

    .mlps-menu-toggle {
        display: inline-flex;
    }

    .mlps-topbar-action span {
        display: none;
    }

    .mlps-user-meta {
        display: none;
    }

    .mlps-topbar-title span {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Dashboard components
   -------------------------------------------------------------------------- */

.mlps-hero {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 28px 30px;
    background:
        radial-gradient(circle at 90% 20%, rgba(255, 255, 255, .18), transparent 28%),
        radial-gradient(circle at 15% 110%, rgba(255, 255, 255, .12), transparent 35%),
        linear-gradient(135deg, #312e81 0%, #4f46e5 48%, #6366f1 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(49, 46, 129, .25);
    margin-bottom: 22px;
}

.mlps-hero h1 {
    color: #fff;
    font-size: clamp(22px, 2.2vw, 30px);
    margin: 0 0 8px;
    letter-spacing: -.035em;
}

.mlps-hero p {
    color: rgba(255, 255, 255, .76);
    margin: 0;
    font-size: 13px;
    max-width: 620px;
}

.mlps-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.mlps-hero .btn {
    border-radius: 11px;
    font-size: 12px;
}

.mlps-hero .btn-light {
    background: #fff;
    color: #3730a3;
    border-color: #fff;
}

.mlps-hero .btn-outline-light {
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
}

.mlps-hero .btn-outline-light:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
}

.mlps-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    margin-bottom: 14px;
    backdrop-filter: blur(6px);
}

.mlps-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.mlps-stat-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--mlps-border);
    border-radius: var(--mlps-radius);
    padding: 20px;
    box-shadow: var(--mlps-shadow);
}

.mlps-stat-card::after {
    content: '';
    position: absolute;
    width: 90px;
    height: 90px;
    right: -28px;
    top: -28px;
    border-radius: 50%;
    background: var(--mlps-primary-soft);
    opacity: .8;
}

.mlps-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mlps-primary-soft);
    color: var(--mlps-primary);
    font-size: 20px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.mlps-stat-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--mlps-muted);
    font-weight: 800;
    margin-bottom: 5px;
}

.mlps-stat-value {
    font-size: 25px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.04em;
    color: var(--mlps-text);
    position: relative;
    z-index: 1;
}

.mlps-stat-note {
    margin-top: 8px;
    font-size: 11px;
    color: var(--mlps-muted);
    font-weight: 500;
}

.mlps-stat-card.is-success .mlps-stat-icon {
    background: var(--mlps-success-soft);
    color: var(--mlps-success);
}

.mlps-stat-card.is-warning .mlps-stat-icon {
    background: var(--mlps-warning-soft);
    color: var(--mlps-warning);
}

.mlps-stat-card.is-danger .mlps-stat-icon {
    background: var(--mlps-danger-soft);
    color: var(--mlps-danger);
}

.mlps-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.mlps-panel {
    background: #fff;
    border: 1px solid var(--mlps-border);
    border-radius: var(--mlps-radius);
    box-shadow: var(--mlps-shadow);
    overflow: hidden;
}

.mlps-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--mlps-border);
}

.mlps-panel-head h2 {
    font-size: 14px;
    margin: 0;
    letter-spacing: -.02em;
}

.mlps-panel-head span {
    font-size: 11px;
    color: var(--mlps-muted);
}

.mlps-panel-body {
    padding: 18px 20px;
}

.mlps-panel-body.p-0 {
    padding: 0;
}

.mlps-panel .table > :not(caption) > * > * {
    padding: 11px 16px;
}

.mlps-empty {
    padding: 38px 20px;
    text-align: center;
    color: var(--mlps-muted);
    font-size: 12.5px;
}

.mlps-empty i {
    display: block;
    font-size: 30px;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.mlps-progress {
    height: 8px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}

.mlps-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--mlps-primary), var(--mlps-primary-2));
}

.mlps-progress.is-success > span {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.mlps-progress.is-warning > span {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.mlps-progress.is-danger > span {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.mlps-kv {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed #edf1f7;
    font-size: 12px;
}

.mlps-kv:last-child {
    border-bottom: 0;
}

.mlps-kv span:first-child {
    color: var(--mlps-muted);
    font-weight: 500;
}

.mlps-kv strong {
    font-size: 12.5px;
    font-weight: 800;
}

.mlps-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.mlps-quick {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--mlps-border);
    border-radius: 12px;
    color: #334155;
    font-size: 11.5px;
    font-weight: 700;
    background: #fff;
    transition: all .15s ease;
}

.mlps-quick i {
    font-size: 17px;
    color: var(--mlps-primary);
}

.mlps-quick:hover {
    background: #f8faff;
    border-color: #c7d2fe;
    color: var(--mlps-primary);
    transform: translateY(-1px);
}

.mlps-search-inline {
    display: flex;
    gap: 9px;
}

.mlps-search-inline .form-control {
    min-height: 44px;
}

@media (max-width: 1199.98px) {
    .mlps-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mlps-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .mlps-stat-grid {
        grid-template-columns: 1fr;
    }

    .mlps-hero {
        padding: 22px;
    }

    .mlps-quick-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */

body.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 15%, rgba(99, 102, 241, .12), transparent 28%),
        radial-gradient(circle at 88% 85%, rgba(14, 165, 233, .10), transparent 28%),
        #f4f7fb;
}

.mlps-login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
    padding: 18px;
    gap: 18px;
}

.mlps-login-brand {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 46px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .16), transparent 30%),
        radial-gradient(circle at 10% 105%, rgba(255, 255, 255, .10), transparent 38%),
        linear-gradient(145deg, #1e1b4b 0%, #312e81 42%, #4f46e5 100%);
    color: #fff;
    box-shadow: 0 24px 70px rgba(30, 27, 75, .28);
}

.mlps-login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 80%);
}

.mlps-login-brand > * {
    position: relative;
    z-index: 1;
}

.mlps-login-brand-top {
    display: flex;
    align-items: center;
    gap: 13px;
}

.mlps-login-brand-top .mlps-brand-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    font-size: 18px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.mlps-login-brand-top strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.mlps-login-brand-top span {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, .65);
}

.mlps-login-copy {
    max-width: 540px;
    margin: 54px 0;
}

.mlps-login-copy h1 {
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.02;
    letter-spacing: -.045em;
    color: #fff;
    margin: 0 0 18px;
}

.mlps-login-copy h1 span {
    color: #a5b4fc;
}

.mlps-login-copy p {
    color: rgba(255, 255, 255, .68);
    font-size: 14px;
    line-height: 1.7;
    max-width: 460px;
    margin: 0;
}

.mlps-login-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 28px;
}

.mlps-login-feature {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(8px);
}

.mlps-login-feature i {
    display: block;
    font-size: 20px;
    color: #c7d2fe;
    margin-bottom: 8px;
}

.mlps-login-feature strong {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.mlps-login-brand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 10.5px;
    color: rgba(255, 255, 255, .48);
}

.mlps-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.mlps-login-card {
    width: 100%;
    max-width: 410px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 24px;
    padding: 38px 34px;
    box-shadow: var(--mlps-shadow-lg);
    backdrop-filter: blur(14px);
}

.mlps-login-card h2 {
    font-size: 24px;
    letter-spacing: -.035em;
    margin: 0 0 6px;
}

.mlps-login-card .subtitle {
    color: var(--mlps-muted);
    font-size: 12.5px;
    margin: 0 0 26px;
}

.mlps-login-card .form-control {
    min-height: 48px;
    background: #fbfdff;
}

.mlps-login-card .btn-primary {
    min-height: 48px;
    font-size: 13px;
}

.mlps-login-card .auth-logo {
    display: none;
}

.mlps-login-card .alert {
    font-size: 12px;
}

.mlps-login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 14px 0 20px;
    font-size: 11.5px;
}

.mlps-login-meta a {
    color: var(--mlps-primary);
    font-weight: 700;
}

.mlps-login-footer {
    margin-top: 26px;
    text-align: center;
    font-size: 10.5px;
    color: var(--mlps-muted);
    line-height: 1.6;
}

@media (max-width: 991.98px) {
    .mlps-login {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .mlps-login-brand {
        min-height: 280px;
        padding: 30px;
    }

    .mlps-login-copy {
        margin: 30px 0 0;
    }

    .mlps-login-copy h1 {
        font-size: 34px;
    }

    .mlps-login-features {
        display: none;
    }

    .mlps-login-brand-footer {
        margin-top: 26px;
    }

    .mlps-login-panel {
        padding: 12px;
    }
}

@media (max-width: 575.98px) {
    .mlps-login-brand {
        display: none;
    }

    .mlps-login {
        display: block;
        padding: 12px;
    }

    .mlps-login-panel {
        min-height: calc(100vh - 24px);
        padding: 0;
    }

    .mlps-login-card {
        padding: 28px 22px;
        border-radius: 20px;
    }
}

/* --------------------------------------------------------------------------
   DataTables / legacy page polish
   -------------------------------------------------------------------------- */

body.modern-ui .page-title-box h4 {
    text-transform: none;
    letter-spacing: -.03em;
    font-size: 21px;
}

body.modern-ui .table-bordered > :not(caption) > * > * {
    border-left: 0;
    border-right: 0;
}

body.modern-ui .table-bordered {
    border: 0;
}

body.modern-ui .dt-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

body.modern-ui .dt-buttons .btn,
body.modern-ui .dt-button {
    border: 1px solid var(--mlps-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #475569 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    padding: 7px 11px !important;
    box-shadow: none !important;
    background-image: none !important;
}

body.modern-ui .dt-buttons .btn:hover,
body.modern-ui .dt-button:hover {
    background: var(--mlps-primary-soft) !important;
    border-color: #c7d2fe !important;
    color: var(--mlps-primary) !important;
}

body.modern-ui .dt-button.buttons-copy,
body.modern-ui .dt-button.buttons-excel,
body.modern-ui .dt-button.buttons-pdf,
body.modern-ui .dt-button.buttons-colvis {
    color: #475569 !important;
}

body.modern-ui .dataTables_wrapper .row:first-child {
    align-items: center;
    margin-bottom: 10px;
}

body.modern-ui .dataTables_wrapper .dataTables_filter label,
body.modern-ui .dataTables_wrapper .dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}

body.modern-ui .dataTables_wrapper .dataTables_filter input {
    margin-left: 0 !important;
    width: 190px;
}

body.modern-ui .dataTables_wrapper .dataTables_paginate {
    margin-top: 14px;
}

body.modern-ui .dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 0 !important;
    border-radius: 9px !important;
    margin: 0 2px;
    padding: 6px 10px !important;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mlps-muted) !important;
    background: transparent !important;
}

body.modern-ui .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.modern-ui .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--mlps-primary) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(79, 70, 229, .22);
}

body.modern-ui .dataTables_wrapper .dataTables_paginate .paginate_button.previous,
body.modern-ui .dataTables_wrapper .dataTables_paginate .paginate_button.next,
body.modern-ui .dataTables_wrapper .dataTables_paginate .paginate_button.previous:hover,
body.modern-ui .dataTables_wrapper .dataTables_paginate .paginate_button.next:hover {
    background: #fff !important;
    color: #475569 !important;
    border: 1px solid var(--mlps-border) !important;
    box-shadow: none !important;
}

body.modern-ui .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.modern-ui .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    border-color: var(--mlps-border) !important;
}

body.modern-ui .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--mlps-primary-soft) !important;
    color: var(--mlps-primary) !important;
}

body.modern-ui .dataTables_wrapper .dataTables_info {
    padding-top: 10px;
}

body.modern-ui .dataTables_wrapper .dt-buttons + .dataTables_filter {
    margin-left: auto;
}

body.modern-ui .mlps-report-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

@media (max-width: 991.98px) {
    body.modern-ui .mlps-report-aside {
        grid-template-columns: 1fr;
    }
}

