:root {
    --mtip-red: #c93446;
    --mtip-red-dark: #b52a3b;
    --mtip-pink: #f4d9de;
    --mtip-pink-strong: #f0cdd3;
    --mtip-border: #dee2e6;
    --mtip-text: #202124;
    --mtip-muted: #5f6368;
    --crm-red: var(--mtip-red);
    --crm-red-dark: var(--mtip-red-dark);
    --lte-sidebar-width: 260px;
}

html,
body {
    color: var(--mtip-text);
    font-family: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
    letter-spacing: 0;
}

body {
    background: #f8f9fb;
}

.app-main {
    background: #f8f9fb;
    min-height: 100vh;
}

.app-content {
    padding-top: 1.25rem;
}

.app-header {
    border-bottom: 1px solid var(--mtip-border);
    box-shadow: 0 1px 2px rgba(60, 64, 67, .12);
    min-height: 61px;
}

.app-header .nav-link,
.nav-logout {
    color: #444;
    font-size: 1rem;
}

.app-navbar-title {
    color: var(--mtip-text) !important;
    font-weight: 600;
    max-width: 52vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-logout {
    padding: .375rem .5rem;
    text-decoration: none;
}

.app-header .nav-link:hover,
.nav-logout:hover {
    color: var(--mtip-red);
}

.app-sidebar,
.mtip-sidebar {
    background: var(--mtip-pink) !important;
    color: var(--mtip-text);
}

.sidebar-brand {
    border-color: rgba(255, 255, 255, .14);
    height: 61px;
}

.app-sidebar .brand-link,
.mtip-sidebar .brand-link {
    color: var(--mtip-red);
    text-decoration: none;
}

.app-sidebar .brand-link,
.app-sidebar .nav-link,
.app-sidebar .fw-semibold,
.app-sidebar small {
    color: var(--mtip-text) !important;
}

.app-sidebar .brand-text,
.mtip-sidebar .brand-text {
    color: var(--mtip-red) !important;
    font-size: 24px;
    font-weight: 600 !important;
}

.app-sidebar .sidebar-menu .nav-link,
.mtip-sidebar .sidebar-menu .nav-link {
    border-radius: 0;
    color: var(--mtip-text);
    margin: .15rem 0;
    padding: .7rem 1rem;
}

.app-sidebar .sidebar-menu .nav-link:hover,
.mtip-sidebar .sidebar-menu .nav-link:hover {
    background: var(--mtip-pink-strong);
    color: var(--mtip-red-dark) !important;
}

.sidebar-menu .nav-link.active,
.mtip-sidebar .sidebar-menu .nav-link.active {
    background: var(--mtip-pink-strong) !important;
    color: var(--mtip-red-dark) !important;
}

.app-sidebar .nav-icon,
.mtip-sidebar .nav-icon {
    color: inherit;
}

.app-content-header h1 {
    color: var(--mtip-text);
    font-size: 1.35rem;
    font-weight: 600;
}

.app-footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    color: var(--mtip-muted);
}

.card,
.box,
.info-box {
    border-radius: 6px;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

.app-content .card,
.card.card-outline.card-danger,
.box {
    border-top: 3px solid var(--mtip-red);
}

.card-header,
.box-header {
    background: #fff;
    border-bottom: 1px solid var(--mtip-border);
}

.card-body,
.box-body {
    overflow-x: auto;
}

.box {
    background: #fff;
    border: 1px solid #dfe3e7;
    border-top: 3px solid var(--mtip-red);
    margin-bottom: 1rem;
}

.box-header {
    padding: .85rem 1rem;
}

.box-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.box-body {
    padding: 1rem;
}

.btn {
    border-radius: 6px;
    white-space: nowrap;
}

.btn-sm {
    font-size: .9rem;
    min-height: 36px;
    padding: .4rem .8rem;
}

.btn-primary,
.btn-danger {
    background: var(--mtip-red);
    border-color: var(--mtip-red);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-danger:hover,
.btn-danger:focus {
    background: var(--mtip-red-dark);
    border-color: var(--mtip-red-dark);
}

.btn-outline-danger {
    border-color: var(--mtip-red);
    color: var(--mtip-red);
}

.btn-outline-danger:hover {
    background: var(--mtip-red);
    border-color: var(--mtip-red);
}

.btn-icon,
.icon-action {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 36px;
    padding: .4rem;
}

.icon-action {
    height: 34px;
    margin-inline: 2px;
    min-width: 34px;
    padding: 0;
}

.text-action {
    gap: .45rem;
    height: auto;
    min-width: auto;
    padding: .45rem .85rem;
}

.row-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: .35rem;
    white-space: nowrap;
}

.table > thead > tr > th {
    background: #f8f9fa;
    white-space: nowrap;
}

.table-responsive {
    min-height: 120px;
}

.form-label {
    font-weight: 500;
}

.select2-container {
    width: 100% !important;
}

.select2-container--open {
    z-index: 2000;
}

.modal .select2-container {
    z-index: 1065;
}

.modal-backdrop {
    background: rgba(255, 255, 255, .68);
    backdrop-filter: none;
}

.modal-backdrop.show {
    opacity: 1;
}

.modal-content {
    box-shadow: 0 .35rem .9rem rgba(33, 37, 41, .16);
}

.modal-header {
    background: var(--mtip-red);
    color: #fff;
    min-height: 42px;
    padding: .4rem .75rem;
}

.modal-header .modal-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.modal-header .btn-close {
    filter: invert(1);
    height: .8rem;
    width: .8rem;
}

.modal.fade .modal-dialog,
.modal.show .modal-dialog {
    transform: none;
    transition: none;
}

.fade,
.collapsing,
.tooltip {
    transition: none !important;
}

.select2-container--open .select2-dropdown {
    animation: none;
}

.swal2-container.swal2-backdrop-show {
    background: rgba(255, 255, 255, .68) !important;
    backdrop-filter: none;
}

.swal2-show,
.swal2-hide {
    animation-duration: .01s !important;
}

.dataTables_wrapper .row:first-child,
.dataTables_wrapper .row:last-child {
    margin-left: 0;
    margin-right: 0;
}

.dt-container .dt-search input,
.dt-container .dt-length select {
    margin: 0 .25rem;
}

.dt-container .dt-layout-start:has(.dt-info) {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .9rem;
}

.mtip-dt-length-before-info {
    align-items: center;
    display: inline-flex;
}

.small-box .small-box-icon {
    opacity: .25;
}

.mtip-dashboard-page {
    box-sizing: border-box;
    color: #241f24;
    height: 100%;
    margin: 0;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
}

.mtip-dashboard-page *,
.mtip-dashboard-page *::before,
.mtip-dashboard-page *::after {
    box-sizing: border-box;
}

.mtip-dashboard-page::before {
    /*    background:
            radial-gradient(circle at 8% 12%, rgba(255, 92, 110, .32), transparent 28%),
            radial-gradient(circle at 90% 8%, rgba(255, 255, 255, .95), transparent 26%),
            radial-gradient(circle at 76% 88%, rgba(224, 49, 69, .20), transparent 30%),
            linear-gradient(135deg, #fff7f7 0%, #fde8e8 42%, #f5f6fb 100%);*/
    content: "";
    inset: 0;
    position: absolute;
}

.mtip-dashboard-page > * {
    position: relative;
    z-index: 1;
}

.mtip-dashboard-body {
    overflow: hidden;
}

.mtip-dashboard-body .app-wrapper {
    max-height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.mtip-dashboard-body .app-main {
    min-height: 0;
    overflow: hidden !important;
}

.mtip-dashboard-body .app-content {
    height: calc(100vh - 61px);
    min-height: 0;
    overflow: hidden !important;
    padding: 0 !important;
}

.mtip-dashboard-body .app-content > .container-fluid {
    --bs-gutter-x: 0;
    height: 100%;
    max-width: none;
    min-height: 0;
    overflow: hidden;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.mtip-dashboard-body .app-footer {
    display: none;
}

.mtip-dashboard-topbar {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: 0 auto 22px;
    max-width: 1280px;
}

.mtip-dashboard-brand {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.mtip-dashboard-brand strong,
.mtip-dashboard-brand span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mtip-dashboard-brand strong {
    font-size: 22px;
    font-weight: 800;
}

.mtip-dashboard-brand span {
    color: #667085;
    font-size: 14px;
}

.mtip-dashboard-logo {
    background:
        radial-gradient(circle at 30% 22%, #ffb0ba, transparent 34%),
        linear-gradient(135deg, #ff4d63, #d9233b);
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(220, 38, 60, .32);
    color: #fff;
    display: grid;
    flex: 0 0 46px;
    height: 46px;
    place-items: center;
    width: 46px;
}

.mtip-dashboard-search {
    align-items: center;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 12px 28px rgba(120, 20, 35, .08);
    display: flex;
    gap: 10px;
    margin: 0;
    min-width: 280px;
    padding: 12px 16px;
}

.mtip-dashboard-search i {
    color: var(--mtip-red);
}

.mtip-dashboard-search input {
    background: transparent;
    border: 0;
    font-size: 14px;
    min-width: 0;
    outline: 0;
    width: 100%;
}

.mtip-dashboard-shell {
    backdrop-filter: blur(22px);
    /*    background:
        radial-gradient(circle at 10% 10%, rgba(255, 120, 120, .42), transparent 28%),
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .9), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, .68), rgba(255, 235, 238, .66));*/

/*    background: linear-gradient(135deg, rgba(255, 255, 255, .36), rgba(255, 232, 232, .10)), url("/img/mtip-login-port-bg.png") center / cover no-repeat;*/
    border-radius: 0;
    box-sizing: border-box;
    box-shadow: 0 26px 70px rgba(180, 30, 45, .16);
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    max-width: none;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    width: 100%;
}

.mtip-dashboard-shell::before {
/*    background-image:
        linear-gradient(rgba(255, 255, 255, .55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .55) 1px, transparent 1px);*/
    background-size: 42px 42px;
    content: "";
    inset: 0;
    opacity: .32;
    pointer-events: none;
    position: absolute;
}

.mtip-dashboard-shell::after {
    background: radial-gradient(circle, rgba(224, 49, 69, .32), rgba(255, 255, 255, 0) 68%);
    border-radius: 50%;
    content: "";
    height: 240px;
    pointer-events: none;
    position: absolute;
    right: -70px;
    top: -80px;
    width: 240px;
}

.mtip-dashboard-shell > * {
    position: relative;
    z-index: 1;
}

.mtip-dashboard-hero {
    align-items: flex-end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
    min-width: 0;
}

.mtip-dashboard-hero > div {
    min-width: 0;
}

.mtip-dashboard-eyebrow {
    color: var(--mtip-red);
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .09em;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.mtip-dashboard-hero h1 {
    color: #241f24;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 900;
    line-height: 1.05;
    margin: 0;
}

.mtip-dashboard-hero p {
    color: #667085;
    font-size: 16px;
    margin: 10px 0 0;
}

.mtip-dashboard-pill {
    align-items: center;
    background: rgba(255, 255, 255, .6);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 999px;
    box-shadow: 0 12px 26px rgba(120, 20, 35, .08);
    color: var(--mtip-red-dark);
    display: inline-flex;
    flex: 0 1 auto;
    font-weight: 700;
    gap: 8px;
    padding: 10px 14px;
    white-space: nowrap;
}

.mtip-dashboard-stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
    min-width: 0;
}

.mtip-dashboard-stat {
    align-items: center;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, .48);
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .84), 0 12px 26px rgba(120, 20, 35, .08);
    display: flex;
    gap: 14px;
    min-width: 0;
    padding: 14px 16px;
}

.mtip-dashboard-stat > span {
    background: rgba(255, 255, 255, .72);
    border-radius: 14px;
    color: var(--mtip-red);
    display: grid;
    flex: 0 0 44px;
    height: 44px;
    place-items: center;
    width: 44px;
}

.mtip-dashboard-stat small {
    color: #667085;
    display: block;
    font-size: 13px;
}

.mtip-dashboard-stat strong {
    color: #241f24;
    display: block;
    font-size: 25px;
    font-weight: 900;
    line-height: 1.1;
}

.mtip-app-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(var(--mtip-app-columns, 4), minmax(0, 1fr));
    min-width: 0;
}

.mtip-app-grid--cols-1 {
    --mtip-app-columns: 1;
}

.mtip-app-grid--cols-2 {
    --mtip-app-columns: 2;
}

.mtip-app-grid--cols-3 {
    --mtip-app-columns: 3;
}

.mtip-app-grid--cols-4 {
    --mtip-app-columns: 4;
}

.mtip-app-card,
.app-launch-card {
    align-items: flex-start;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, .58);
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 16px 38px rgba(120, 20, 35, .12);
    color: inherit;
    display: flex;
    gap: 16px;
    min-height: 152px;
    min-width: 0;
    padding: 20px;
    position: relative;
    text-decoration: none !important;
    transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.mtip-app-card:hover,
.mtip-app-card:focus,
.app-launch-card:hover,
.app-launch-card:focus {
    background: rgba(255, 255, 255, .80);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 26px 58px rgba(220, 38, 60, .24);
    color: inherit;
    transform: translateY(-7px);
}

.mtip-app-icon {
    background:
        radial-gradient(circle at 30% 20%, #ff9ca8, transparent 34%),
        linear-gradient(135deg, #ff4d63, #d9233b);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(220, 38, 60, .34);
    color: #fff;
    display: grid;
    flex: 0 0 58px;
    font-size: 26px;
    height: 58px;
    place-items: center;
    width: 58px;
}

.mtip-app-content {
    min-width: 0;
    overflow-wrap: anywhere;
    padding-right: 34px;
}

.mtip-app-card h4,
.app-launch-card h4,
.app-launch-card h5 {
    color: var(--mtip-red);
    font-size: clamp(18px, 1.45vw, 22px);
    font-weight: 900;
    margin: 5px 0 10px;
    overflow-wrap: anywhere;
}

.mtip-app-card p,
.app-launch-card p {
    color: #667085;
    font-size: clamp(14px, 1vw, 15.5px);
    line-height: 1.45;
    margin: 0;
    max-width: 420px;
    overflow-wrap: anywhere;
}

.mtip-app-open {
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 50%;
    bottom: 20px;
    box-shadow: 0 9px 22px rgba(120, 20, 35, .13);
    color: var(--mtip-red);
    display: grid;
    height: 38px;
    place-items: center;
    position: absolute;
    right: 20px;
    transition: transform .2s ease, background-color .2s ease, color .2s ease;
    width: 38px;
}

.mtip-app-card:hover .mtip-app-open,
.mtip-app-card:focus .mtip-app-open {
    background: linear-gradient(135deg, #ff4d63, #d9233b);
    color: #fff;
    transform: rotate(-35deg) scale(1.08);
}

.mtip-dashboard-empty {
    align-items: center;
    color: #667085;
    display: none;
    flex-direction: column;
    gap: 6px;
    min-height: 170px;
    justify-content: center;
    text-align: center;
}

.mtip-dashboard-empty.is-visible {
    display: flex;
}

.mtip-dashboard-empty i {
    color: var(--mtip-red);
    font-size: 32px;
    margin-bottom: 4px;
}

.mtip-dashboard-empty strong {
    color: #241f24;
    font-size: 18px;
}

.login-page {
    min-height: 100vh;
}

.login-box,
.mtip-login-box {
    max-width: calc(100vw - 2rem);
}

@media (max-width: 767.98px) {
    .app-content-header h1 {
        font-size: 1.2rem;
    }

    .mtip-dashboard-page {
        height: calc(100vh - 61px);
        margin: 0;
        padding: 0;
    }

    .mtip-dashboard-topbar,
    .mtip-dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .mtip-dashboard-search {
        min-width: 0;
        width: 100%;
    }

    .mtip-dashboard-shell {
        border-radius: 0;
        padding: 18px;
    }

    .mtip-dashboard-stats,
    .mtip-app-grid {
        grid-template-columns: 1fr;
    }

    .mtip-app-card,
    .app-launch-card {
        gap: 12px;
        min-height: 140px;
        padding: 16px;
    }

    .mtip-app-icon {
        border-radius: 16px;
        flex-basis: 48px;
        font-size: 22px;
        height: 48px;
        width: 48px;
    }

    .mtip-app-content {
        padding-right: 28px;
    }
}

@media (min-width: 768px) and (max-width: 1099.98px) {
    .mtip-app-grid--cols-4 {
        --mtip-app-columns: 2;
    }
}

@media (min-width: 768px) and (max-width: 899.98px) {
    .mtip-app-grid--cols-3 {
        --mtip-app-columns: 2;
    }
}

@media (max-width: 991.98px) {
    .mtip-dashboard-stats {
        grid-template-columns: 1fr;
    }
}
