/* ==========================================================================
   CrushMate - Midnight Executive mobile experience (applies at <= 767px only)

   Loaded last by MainMasterPage.master and by Default.aspx. Desktop and tablet
   keep the standard AdminLTE look: everything visual in this file sits inside
   the max-width:767px media query. The bottom bar / sheets markup lives in the
   master page and is driven by Javascript/MobileNav.js.

   Sections
     1. Tokens and desktop defaults        6. Tables and entry grids
     2. Base                               7. Dashboard
     3. Top bar                            8. Modals, notifications, pickers
     4. Midnight menu drawer               9. Bottom bar and sheets
     5. Page shell, cards and forms       10. Sign-in page, print, motion
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
    --cm-navy: #071326;
    --cm-navy-2: #0f2547;
    --cm-navy-3: #183a6e;
    --cm-blue: #2563eb;
    --cm-blue-deep: #1d4ed8;
    --cm-blue-glow: #4f8df9;
    --cm-blue-soft: #eef4ff;
    --cm-cyan: #38bdf8;
    --cm-bg: #eef2f7;
    --cm-card: #ffffff;
    --cm-surface-subtle: #f7f9fc;
    --cm-line: #e4eaf3;
    --cm-field: #cfd8e6;
    --cm-text: #0b1528;
    --cm-text-2: #46556c;
    --cm-muted: #76859b;
    --cm-success: #059669;
    --cm-success-soft: #ecfdf5;
    --cm-amber: #d97706;
    --cm-amber-soft: #fffbeb;
    --cm-danger: #dc2626;
    --cm-danger-soft: #fef2f2;
    --cm-radius: 18px;
    --cm-radius-sm: 12px;
    --cm-shadow: 0 1px 2px rgba(7, 19, 38, .04), 0 8px 24px rgba(7, 19, 38, .06), 0 0 0 1px rgba(7, 19, 38, .04);
    --cm-shadow-lg: 0 22px 56px rgba(7, 19, 38, .26);
    --cm-ease: cubic-bezier(.32, .72, 0, 1);
    --cm-head-h: 58px;
    --cm-bar-h: 66px;
    --cm-safe-t: env(safe-area-inset-top, 0px);
    --cm-safe-b: env(safe-area-inset-bottom, 0px);
    --cm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* The phone-only chrome does not exist on larger screens. */
.cm-tabbar,
.cm-sheet,
.cm-sheet-backdrop,
.cm-drawer-backdrop,
.cm-dash-hero,
.cm-dash-sec-label {
    display: none;
}

/* Mobile form wrappers are completely transparent to desktop layout. */
.cm-f {
    display: contents;
}

@media (max-width: 767px) {

    /* 2. Base -------------------------------------------------------------- */
    html {
        -webkit-text-size-adjust: 100%;
    }

    body {
        font-family: var(--cm-font);
        color: var(--cm-text);
        background: var(--cm-bg);
        -webkit-font-smoothing: antialiased;
        -webkit-tap-highlight-color: transparent;
    }

    h1, h2, h3, h4, h5, h6,
    .btn, .form-control, .main-header .logo {
        font-family: var(--cm-font);
    }

    input[type="number"],
    .txtnumber,
    .table td,
    .info-box-number,
    #lblGrandTotal {
        font-variant-numeric: tabular-nums;
    }

    body.cm-lock {
        overflow: hidden;
    }

    /* The page-load spinner would sit on top of the account button; the progress line stays. */
    .pace .pace-activity {
        display: none;
    }

    /* 3. Top bar ----------------------------------------------------------- */
    body:not(.embedded-txn) .main-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
        display: flex;
        align-items: center;
        height: calc(var(--cm-head-h) + var(--cm-safe-t));
        max-height: none;
        padding-top: var(--cm-safe-t);
        border-bottom: 1px solid rgba(255, 255, 255, .09);
        background: linear-gradient(125deg, var(--cm-navy) 0%, var(--cm-navy-2) 58%, var(--cm-navy-3) 100%);
        box-shadow: 0 8px 26px rgba(7, 19, 38, .28);
    }

    .main-header .logo,
    .skin-blue-light .main-header .logo,
    .skin-blue-light .main-header .logo:hover {
        display: flex;
        align-items: center;
        flex: none;
        float: none;
        width: auto;
        height: var(--cm-head-h);
        padding: 0 6px 0 14px;
        border: 0;
        background: transparent;
        color: #fff;
        font-size: 18.5px;
        line-height: 1;
        letter-spacing: -.3px;
        text-align: left;
    }

    /* The "CM" mini logo becomes the executive brand mark. */
    .main-header .logo .logo-mini {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        margin: 0 10px 0 0 !important;
        border: 1px solid rgba(255, 255, 255, .24);
        border-radius: 11px;
        background: linear-gradient(145deg, var(--cm-blue-glow), var(--cm-blue-deep));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .36), 0 6px 14px rgba(37, 99, 235, .45);
        font-size: 12.5px !important;
        font-weight: 800;
        letter-spacing: .4px;
    }

    .main-header .logo .logo-mini b {
        font-weight: 800;
    }

    .main-header .logo .logo-lg {
        display: block !important;
        font-weight: 800;
        letter-spacing: -.35px;
    }

    .main-header .navbar,
    .skin-blue-light .main-header .navbar {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex: 1 1 auto;
        float: none;
        width: auto;
        min-width: 0;
        min-height: var(--cm-head-h);
        margin: 0 !important;
        padding-right: 10px;
        border: 0;
        background: transparent;
    }

    /* The menu is opened from the bottom bar on phones. */
    .main-header .sidebar-toggle,
    .main-header .navbar-nav > li.messages-menu {
        display: none !important;
    }

    .main-header .navbar-custom-menu {
        float: none;
    }

    .main-header .navbar-custom-menu > .navbar-nav {
        display: flex;
        align-items: center;
        gap: 6px;
        float: none;
        margin: 0;
    }

    .main-header .navbar-custom-menu > .navbar-nav > li {
        float: none;
        position: static;
    }

    .main-header .navbar-custom-menu > .navbar-nav > li:not(.license-menu) > a,
    .skin-blue-light .main-header .navbar .nav > li:not(.license-menu) > a {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, .1);
        border-radius: 12px;
        background: rgba(255, 255, 255, .07);
        color: #e2eeff;
        font-size: 16px;
        line-height: 1;
        transition: background-color .15s ease, transform .15s ease;
    }

    .skin-blue-light .main-header .navbar .nav > li:not(.license-menu) > a:active,
    .skin-blue-light .main-header .navbar .nav > li.open:not(.license-menu) > a {
        background: rgba(255, 255, 255, .18);
        color: #fff;
        transform: scale(.95);
    }

    /* Executive license pill in mobile navbar */
    .skin-blue-light .main-header .navbar .nav > li.license-menu > a,
    .license-status-badge {
        margin: 0 !important;
        padding: 5px 10px !important;
        border: 1px solid rgba(255, 255, 255, .22) !important;
        border-radius: 999px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        letter-spacing: .2px !important;
        box-shadow: 0 4px 12px rgba(7, 19, 38, .28) !important;
    }

    .main-header .navbar-nav > li > a > .label {
        position: absolute;
        top: -3px;
        right: -3px;
        min-width: 17px;
        padding: 3px 4px;
        border: 2px solid var(--cm-navy-2);
        border-radius: 999px;
        font-size: 9.5px;
        font-weight: 700;
        line-height: 1;
    }

    .main-header .navbar-nav > li > a > .label:empty {
        display: none;
    }

    /* Notification and account menus drop as executive floating cards. */
    .main-header .navbar-custom-menu > .navbar-nav > li > .dropdown-menu {
        position: fixed;
        top: calc(var(--cm-head-h) + var(--cm-safe-t) + 10px);
        left: 12px;
        right: 12px;
        width: auto !important;
        max-height: calc(100vh - var(--cm-head-h) - var(--cm-bar-h) - 60px);
        margin: 0;
        padding: 0;
        overflow: auto;
        border: 1px solid var(--cm-line);
        border-radius: 20px;
        background: #fff;
        box-shadow: var(--cm-shadow-lg);
    }

    .navbar-nav > .notifications-menu > .dropdown-menu > li .menu {
        max-height: 50vh;
    }

    .navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a {
        padding: 14px 16px;
        white-space: normal;
        font-size: 14px;
        color: var(--cm-text);
        border-bottom: 1px solid var(--cm-line);
    }

    .navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .fa {
        width: 24px;
        color: var(--cm-blue) !important;
    }

    .navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a {
        padding: 14px !important;
        font-weight: 700;
        color: var(--cm-blue) !important;
        background: #fff !important;
    }

    .navbar-nav > .user-menu > .dropdown-menu > li.user-header {
        height: auto;
        padding: 22px 16px 18px;
        background: linear-gradient(135deg, var(--cm-navy) 0%, var(--cm-navy-2) 65%, var(--cm-navy-3) 100%) !important;
    }

    .navbar-nav > .user-menu > .dropdown-menu > li.user-header > img {
        width: 64px;
        height: 64px;
        border: 2px solid rgba(255, 255, 255, .32);
        box-shadow: 0 8px 20px rgba(7, 19, 38, .35);
    }

    .navbar-nav > .user-menu > .dropdown-menu > li.user-header > p {
        margin-top: 10px;
        font-size: 16px;
        font-weight: 700;
        color: #fff;
    }

    .navbar-nav > .user-menu > .dropdown-menu > .user-footer {
        display: flex;
        gap: 10px;
        padding: 12px;
        background: #fff;
    }

    .navbar-nav > .user-menu > .dropdown-menu > .user-footer::before,
    .navbar-nav > .user-menu > .dropdown-menu > .user-footer::after {
        display: none;
    }

    .navbar-nav > .user-menu > .dropdown-menu > .user-footer > div {
        flex: 1;
        float: none !important;
    }

    .navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn {
        display: block;
        min-height: 44px;
        padding: 11px 12px;
        border: 1px solid var(--cm-line);
        border-radius: var(--cm-radius-sm);
        background: var(--cm-surface-subtle);
        color: var(--cm-text) !important;
        font-weight: 600;
    }

    /* 4. Midnight menu drawer ---------------------------------------------- */
    body:not(.embedded-txn) .main-sidebar,
    body:not(.embedded-txn).sidebar-collapse .main-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1045;
        width: 86vw;
        max-width: 332px;
        height: auto !important;
        min-height: 0;
        padding: 0 0 calc(var(--cm-safe-b) + 20px);
        overflow-x: hidden;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        border: 0;
        border-right: 1px solid rgba(255, 255, 255, .08);
        border-radius: 0 24px 24px 0;
        background: linear-gradient(180deg, var(--cm-navy) 0%, #0b1c38 55%, #0f2547 100%) !important;
        transform: translate3d(-105%, 0, 0);
        transition: transform .34s var(--cm-ease);
    }

    body:not(.embedded-txn).sidebar-open .main-sidebar {
        transform: translate3d(0, 0, 0);
        box-shadow: 0 24px 72px rgba(4, 11, 24, .58);
    }

    /* The page stays put; the drawer slides over it. */
    .sidebar-open .content-wrapper,
    .sidebar-open .right-side,
    .sidebar-open .main-footer {
        transform: none;
    }

    .cm-drawer-backdrop {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1040;
        background: rgba(4, 11, 24, .62);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .28s ease;
    }

    body.sidebar-open .cm-drawer-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .main-sidebar .sidebar {
        height: auto;
        padding-bottom: 0;
        background: transparent;
    }

    .main-sidebar .user-panel {
        display: flex;
        align-items: center;
        padding: calc(var(--cm-safe-t) + 22px) 18px 20px;
        overflow: hidden;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        background: linear-gradient(135deg, rgba(37, 99, 235, .18) 0%, rgba(15, 37, 71, .35) 100%);
    }

    .main-sidebar .user-panel::before,
    .main-sidebar .user-panel::after {
        display: none;
    }

    .main-sidebar .user-panel > .image {
        float: none !important;
        flex: none;
    }

    .main-sidebar .user-panel > .image > img {
        width: 48px;
        max-width: 48px;
        height: 48px;
        border: 2px solid rgba(96, 165, 250, .45);
        box-shadow: 0 6px 16px rgba(4, 11, 24, .4);
    }

    .main-sidebar .user-panel > .info,
    .skin-blue-light .main-sidebar .user-panel > .info {
        position: static;
        float: none !important;
        min-width: 0;
        padding: 0 0 0 12px;
        color: #fff;
        line-height: 1.3;
    }

    .main-sidebar .user-panel > .info > p {
        margin: 0 0 3px;
        overflow: hidden;
        font-size: 16px;
        font-weight: 700;
        text-overflow: ellipsis;
        color: #fff;
    }

    .main-sidebar .user-panel > .info > a,
    .skin-blue-light .main-sidebar .user-panel > .info > a {
        padding: 0;
        font-size: 12px;
        color: rgba(203, 213, 225, .82);
    }

    .main-sidebar .sidebar-menu {
        padding: 10px 10px 0;
        overflow: visible;
        white-space: normal;
        background: transparent;
    }

    .main-sidebar .sidebar-menu > li.header,
    .skin-blue-light .sidebar-menu > li.header {
        padding: 12px 12px 8px;
        background: transparent !important;
        color: rgba(148, 163, 184, .75);
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 1.1px;
    }

    .main-sidebar .sidebar-menu li > a,
    .skin-blue-light .sidebar-menu > li > a {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 9px 12px;
        margin-bottom: 2px;
        border: 0;
        border-radius: 13px;
        background: transparent;
        color: #dbe6f7;
        font-size: 14.5px;
        font-weight: 600;
        white-space: normal;
        transition: background-color .16s ease, color .16s ease;
    }

    .main-sidebar .sidebar-menu li > a > .fa,
    .main-sidebar .sidebar-menu li > a > .glyphicon {
        flex: none;
        width: 34px;
        height: 34px;
        margin-right: 12px;
        border-radius: 10px;
        background: rgba(255, 255, 255, .07);
        color: #93c5fd;
        font-size: 14.5px;
        line-height: 34px;
        text-align: center;
        top: 0;
    }

    .main-sidebar .sidebar-menu li > a > .pull-right-container {
        position: static;
        margin: 0 0 0 auto;
        padding-left: 8px;
    }

    .main-sidebar .sidebar-menu li > a > .pull-right-container > .fa-angle-left {
        width: auto;
        height: auto;
        margin: 0;
        padding: 0;
        background: transparent;
        color: rgba(148, 163, 184, .7);
        font-size: 17px;
        line-height: 1;
    }

    .skin-blue-light .sidebar-menu > li:hover > a,
    .skin-blue-light .sidebar-menu > li.active > a,
    .skin-blue-light .sidebar-menu > li.menu-open > a {
        background: rgba(37, 99, 235, .24) !important;
        color: #fff !important;
    }

    .skin-blue-light .sidebar-menu > li.active > a > .fa,
    .skin-blue-light .sidebar-menu > li.active > a > .glyphicon,
    .skin-blue-light .sidebar-menu > li.menu-open > a > .fa,
    .skin-blue-light .sidebar-menu > li.menu-open > a > .glyphicon {
        background: linear-gradient(145deg, var(--cm-blue-glow), var(--cm-blue-deep));
        color: #fff;
        box-shadow: 0 4px 12px rgba(37, 99, 235, .42);
    }

    .main-sidebar .sidebar-menu .treeview-menu,
    .skin-blue-light .sidebar-menu > li > .treeview-menu {
        margin: 2px 0 8px 18px;
        padding: 2px 0 2px 10px;
        border-left: 1.5px solid rgba(148, 163, 184, .2);
        background: transparent !important;
    }

    .main-sidebar .sidebar-menu .treeview-menu > li > a,
    .skin-blue-light .sidebar-menu .treeview-menu > li > a {
        min-height: 43px;
        padding: 8px 10px;
        border-radius: 10px;
        color: #b7c8e0;
        font-size: 14px;
        font-weight: 500;
    }

    .main-sidebar .sidebar-menu .treeview-menu > li > a > .fa,
    .main-sidebar .sidebar-menu .treeview-menu > li > a > .glyphicon {
        width: 22px;
        height: auto;
        margin-right: 10px;
        background: transparent;
        color: #64748b;
        font-size: 13.5px;
        line-height: 1;
    }

    .skin-blue-light .sidebar-menu .treeview-menu > li.active > a,
    .skin-blue-light .sidebar-menu .treeview-menu > li > a:hover {
        background: rgba(255, 255, 255, .08) !important;
        color: #fff !important;
    }

    .skin-blue-light .sidebar-menu .treeview-menu > li.active > a > .fa,
    .skin-blue-light .sidebar-menu .treeview-menu > li.active > a > .glyphicon {
        color: var(--cm-cyan);
    }

    .main-sidebar .sidebar-menu > li > #lnkSignout {
        margin-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, .08);
        padding-top: 12px;
        border-radius: 13px;
        color: #fda4af;
    }

    .main-sidebar .sidebar-menu > li > #lnkSignout > .fa {
        background: rgba(244, 63, 94, .18);
        color: #fb7185;
    }

    /* 5. Page shell, cards and forms ---------------------------------------- */
    body:not(.embedded-txn) .wrapper {
        overflow: visible;
        background: var(--cm-bg);
    }

    body:not(.embedded-txn) .wrapper > .content-wrapper {
        min-height: 100vh !important;
        margin-left: 0 !important;
        padding-top: calc(var(--cm-head-h) + var(--cm-safe-t));
        padding-bottom: calc(var(--cm-bar-h) + var(--cm-safe-b) + 32px);
        background: radial-gradient(120% 240px at 50% 0%, rgba(37, 99, 235, .06) 0%, rgba(238, 242, 247, 0) 100%), var(--cm-bg);
    }

    /* Every page nests its own .content-wrapper inside the master's: flatten the inner one. */
    .content-wrapper .content-wrapper {
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent;
    }

    .wrapper > .content-wrapper > .content-header {
        padding: 0;
    }

    /* The master's own .content only holds dialogs. */
    .wrapper > .content-wrapper > .content {
        min-height: 0;
        padding: 0;
    }

    .content-wrapper .content-wrapper > .content-header {
        padding: 18px 16px 8px;
    }

    .content-header > h1 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0;
        color: var(--cm-text);
        font-size: 22px;
        font-weight: 800;
        letter-spacing: -.5px;
        line-height: 1.2;
    }

    .content-header > h1 > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        margin-left: auto;
        border: 1px solid var(--cm-line);
        border-radius: 11px;
        background: #fff;
        box-shadow: 0 2px 6px rgba(7, 19, 38, .05);
        font-size: 14px;
        color: var(--cm-blue);
    }

    .content-wrapper .content-wrapper > .content {
        min-height: 0;
        padding: 10px 12px 14px;
        border: 0;
    }

    .content-wrapper .content-wrapper > .content > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    /* Executive Cards */
    .content-wrapper .box {
        margin-bottom: 14px;
        border: 0;
        border-radius: var(--cm-radius);
        background: var(--cm-card);
        box-shadow: var(--cm-shadow);
    }

    .content-wrapper .box > .box-header {
        padding: 14px 15px 12px;
        border-bottom: 1px solid var(--cm-line);
        border-radius: var(--cm-radius) var(--cm-radius) 0 0;
        background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
    }

    .content-wrapper .box > .box-header.with-border {
        border-bottom: 1px solid var(--cm-line);
    }

    .content-wrapper .box > .box-header > .col-md-2 {
        float: left;
        width: auto;
        min-height: 38px;
        padding: 0 12px 0 0;
    }

    /* B2B / B2CS style switches drop below the title row. */
    .content-wrapper .box > .box-header > .switch {
        clear: both;
        float: none;
        width: auto;
        padding: 10px 0 0;
    }

    .content-wrapper .box > .box-header > .switch > input + label {
        margin-left: 0;
    }

    .content-wrapper .box > .box-header > .box-tools {
        top: 12px;
        right: 14px;
    }

    .content-wrapper .box-header .box-title {
        color: var(--cm-text);
        font-size: 15.5px;
        font-weight: 700;
        line-height: 36px;
        letter-spacing: -.2px;
        vertical-align: middle;
    }

    .content-wrapper .box-header > div > i.glyphicon,
    .content-wrapper .box-header > div > i.fa {
        width: 32px;
        height: 32px;
        margin-right: 9px;
        border-radius: 10px;
        background: var(--cm-blue-soft);
        color: var(--cm-blue);
        font-size: 13px;
        line-height: 32px;
        text-align: center;
        vertical-align: middle;
        top: 0;
    }

    /* Create / Clear / List segmented switcher */
    .content-wrapper .box-header .btn-group {
        display: inline-flex;
        padding: 3px;
        border: 1px solid var(--cm-line);
        border-radius: 12px;
        background: #eef2f8;
    }

    .content-wrapper .box-header .btn-group > .btn {
        float: none;
        width: 42px;
        height: 34px;
        min-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 9px !important;
        background: transparent;
        box-shadow: none;
        font-size: 13.5px;
    }

    .content-wrapper .box-header .btn-group > .btn > i {
        color: #5b6b82 !important;
    }

    .content-wrapper .box-header .btn-group > .btn.active {
        background: #fff;
        box-shadow: 0 1px 3px rgba(7, 19, 38, .1), 0 3px 8px rgba(7, 19, 38, .08);
    }

    .content-wrapper .box-header .btn-group > .btn.active > i {
        color: var(--cm-blue) !important;
    }

    .content-wrapper .box-body {
        padding: 10px 12px 13px;
    }

    .content-wrapper .box-body > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    /* Flatten the nested column gutters so fields use the full card width. */
    .content-wrapper .box-body [class*="col-"] [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    /* Section separators drawn with an inline shadow become quiet hairlines. */
    .content-wrapper .box-body > [style*="box-shadow"] {
        box-shadow: none !important;
        padding-bottom: 10px !important;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--cm-line);
    }

    .content-wrapper .box-footer {
        padding: 11px 12px 13px;
        border-top: 1px solid var(--cm-line);
        border-radius: 0 0 var(--cm-radius) var(--cm-radius);
        background: #fafcff;
    }

    .content-wrapper .box-footer > [class*="col-"] {
        padding: 0;
    }

    /* Compact executive form fields (tuned for crisp 2-3 column mobile rows) */
    .content-wrapper label,
    .modal label {
        margin: 8px 0 3px;
        color: var(--cm-text-2);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .15px;
        line-height: 1.25;
    }

    .content-wrapper .form-group,
    .modal .form-group {
        margin-bottom: 8px;
    }

    .content-wrapper .form-control,
    .modal .form-control {
        height: 36px;
        padding: 6px 9px;
        border: 1px solid var(--cm-field);
        border-radius: 9px;
        background-color: var(--cm-surface-subtle);
        box-shadow: none;
        color: var(--cm-text);
        font-size: 13.5px;
        line-height: 1.3;
        transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
        -webkit-appearance: none;
        appearance: none;
    }

    .content-wrapper .form-control:focus,
    .modal .form-control:focus {
        border-color: var(--cm-blue);
        background-color: #fff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
    }

    .content-wrapper .form-control[readonly],
    .content-wrapper .form-control[disabled],
    .modal .form-control[readonly],
    .modal .form-control[disabled] {
        background-color: #edf1f7;
        color: var(--cm-text-2);
    }

    .content-wrapper textarea.form-control,
    .modal textarea.form-control {
        height: auto;
        min-height: 60px;
        padding: 7px 9px;
        line-height: 1.35;
    }

    .content-wrapper select.form-control,
    .modal select.form-control {
        padding-right: 26px;
        background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
        background-position: calc(100% - 14px) 15px, calc(100% - 9px) 15px;
        background-size: 4.5px 4.5px, 4.5px 4.5px;
        background-repeat: no-repeat;
    }

    .content-wrapper .form-control.cmndropdown,
    .modal .form-control.cmndropdown {
        padding-right: 28px;
        background-position: right 8px center;
    }

    /* Half-width & inline-offset desktop fields fill their mobile cell cleanly. */
    .content-wrapper .form-control[style*="width: 50%"],
    .content-wrapper .form-control[style*="width:50%"],
    .content-wrapper .form-control[style*="width:98%"] {
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* Calendar glyph that sits on top of a compact date field */
    .content-wrapper .textdatetimepicker,
    .modal .textdatetimepicker {
        margin-top: -25px;
        margin-left: 8px;
        color: var(--cm-muted);
        font-size: 12px;
    }

    /* A tap on the glyph should land on the field underneath it. */
    .content-wrapper span.textdatetimepicker,
    .modal span.textdatetimepicker {
        pointer-events: none;
    }

    /* "Clear dates" cross, placed with desktop pixel offsets inline: pin it to the field's right edge. */
    .content-wrapper a.textdatetimepicker {
        position: static !important;
        float: right;
        width: 28px;
        height: 28px;
        margin: -32px 4px 0 0;
        border-radius: 8px;
        font-size: 13px;
        line-height: 28px;
        text-align: center;
    }

    .content-wrapper input.form-control.date,
    .modal input.form-control.date {
        padding-left: 25px !important;
        padding-right: 6px;
        text-indent: 0 !important;
        font-size: 12.5px;
    }

    /* Totals: inputs styled inline as plain numbers */
    .content-wrapper input.form-control[style*="border: none"] {
        height: 34px;
        border-radius: 0;
        font-weight: 600;
    }

    .content-wrapper input.form-control[style*="border: none"]:not([readonly]) {
        border-bottom: 1px solid var(--cm-field) !important;
    }

    /* Columns stop floating on a phone but their children may still float: contain them. */
    .content-wrapper .box-body [class*="col-md-"]::after,
    .content-wrapper .box-body [class*="col-lg-"]::after {
        content: "";
        display: table;
        clear: both;
    }

    /* Universal 2- and 3-column mobile form grid (marked by MobileNav.js) */
    .cm-f {
        display: block;
    }

    .cm-empty-col {
        display: none !important;
    }

    .cm-row-flex {
        display: flex !important;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 8px 8px;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .cm-row-flex::before,
    .cm-row-flex::after {
        display: none !important;
    }

    .cm-row-flex > * {
        float: none !important;
        min-width: 0;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .cm-row-flex > .cm-c6 {
        flex: 1 1 100%;
        width: 100% !important;
    }

    .cm-row-flex > .cm-c2 {
        flex: 1 1 calc(50% - 4px);
        width: auto !important;
        min-width: 128px;
    }

    .cm-row-flex > .cm-c3 {
        flex: 1 1 calc(33.333% - 6px);
        width: auto !important;
        min-width: 88px;
    }

    .cm-row-flex > .cm-c-btn {
        flex: 0 0 42px;
        width: 42px !important;
        min-width: 42px;
    }

    .cm-row-flex > .cm-c-btn > label:first-child {
        display: none;
    }

    .cm-row-flex > .cm-c-btn > .btn,
    .cm-row-flex > .cm-c-btn button.form-control {
        width: 42px !important;
        height: 36px;
        min-height: 36px;
        margin-top: 0 !important;
        padding: 0;
        border: 0;
        border-radius: 9px;
        background: linear-gradient(180deg, #3272f2 0%, var(--cm-blue-deep) 100%);
        box-shadow: 0 4px 10px rgba(37, 99, 235, .26);
        color: #fff;
    }

    .cm-row-flex > .cm-c-btn > .btn > i,
    .cm-row-flex > .cm-c-btn button.form-control > i {
        color: #fff !important;
        font-size: 13.5px;
    }

    .cm-row-flex > .cm-c-btn button#btnSearch.form-control::after {
        display: none;
    }

    .cm-row-flex > * > label,
    .cm-row-flex > * > .form-group > label {
        display: inline-block;
        max-width: 100%;
        margin: 0 0 3px !important;
        overflow: hidden;
        vertical-align: bottom;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* When required "*" sits as a sibling <small> after <label>, keep both inline */
    .cm-row-flex > * > label:has(+ small),
    .cm-row-flex > * > .form-group > label:has(+ small) {
        max-width: calc(100% - 12px);
    }

    .cm-row-flex .form-group {
        margin-bottom: 0 !important;
    }

    /* Inline input + compact action button (Vehicle +, Ledger +, Pass No + Load) */
    .cm-inline-addon {
        display: flex !important;
        align-items: flex-end;
        gap: 6px;
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .cm-inline-addon::before,
    .cm-inline-addon::after {
        display: none !important;
    }

    .cm-inline-addon > .cm-addon-input {
        flex: 1 1 auto;
        float: none !important;
        width: auto !important;
        min-width: 0;
        padding: 0 !important;
    }

    .cm-inline-addon > .cm-addon-btn {
        flex: 0 0 auto;
        float: none !important;
        width: auto !important;
        padding: 0 !important;
    }

    .cm-inline-addon > .cm-addon-btn > label:first-child {
        display: none;
    }

    .cm-inline-addon > .cm-addon-btn .btn {
        height: 36px;
        min-height: 36px;
        min-width: 36px;
        padding: 0 10px;
        border-radius: 9px;
        font-size: 12.5px;
        line-height: 34px;
        white-space: nowrap;
    }

    /* Compact toggle switch rows (Maintenance checks, Complaints) */
    .cm-toggle-row {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 7px 11px;
        margin: 0 !important;
        border: 1px solid var(--cm-line);
        border-radius: 11px;
        background: var(--cm-surface-subtle);
    }

    .cm-toggle-row::before,
    .cm-toggle-row::after {
        display: none !important;
    }

    .cm-toggle-row > label,
    .cm-toggle-row > h4 {
        flex: 1 1 auto;
        float: none !important;
        width: auto !important;
        margin: 0 !important;
        font-size: 13px;
        font-weight: 700;
        color: var(--cm-text);
    }

    .cm-toggle-row > .switch {
        flex: none;
        float: none !important;
        width: auto !important;
        padding: 0 !important;
    }

    /* Label / value pairs (bill totals) sit compactly side by side */
    .content-wrapper .box-body .col-md-6 > .col-md-3 {
        float: left;
        width: 50%;
        min-height: 36px;
    }

    .content-wrapper .box-body .col-md-6 > .col-md-3 > span {
        display: inline-block;
        padding-top: 7px;
        color: var(--cm-text-2);
        font-size: 12.5px;
    }

    #lblGrandTotal {
        display: inline-block;
        padding-top: 2px;
        color: var(--cm-text);
        font-size: 19px !important;
        font-weight: 800 !important;
        letter-spacing: -.3px;
    }

    /* Buttons */
    .content-wrapper .btn,
    .modal .btn {
        min-height: 36px;
        border-radius: 10px;
        font-size: 13.5px;
        font-weight: 600;
    }

    .content-wrapper .btn.btn-xs,
    .modal .btn.btn-xs {
        min-height: 30px;
        padding: 4px 10px;
        border-radius: 8px;
        font-size: 12px;
    }

    .content-wrapper .btn.button,
    .content-wrapper .btn.btn-primary,
    .modal .btn.btn-primary {
        min-height: 42px;
        border: 0;
        background: linear-gradient(180deg, #3272f2 0%, var(--cm-blue-deep) 100%);
        box-shadow: 0 6px 16px rgba(37, 99, 235, .26), inset 0 1px 0 rgba(255, 255, 255, .2);
        color: #fff;
        font-size: 14.5px;
        letter-spacing: .1px;
    }

    .content-wrapper .btn.button:active,
    .content-wrapper .btn.btn-primary:active,
    .modal .btn.btn-primary:active {
        transform: translateY(1px);
        box-shadow: 0 3px 8px rgba(37, 99, 235, .3);
    }

    .content-wrapper .btn.btn-default,
    .modal .btn.btn-default {
        border-color: var(--cm-field);
        background: #fff;
        color: var(--cm-text);
    }

    /* Search buttons built as form controls */
    .content-wrapper button.btn.form-control {
        border-color: transparent;
        background: var(--cm-blue-soft);
        color: var(--cm-blue-deep);
        font-size: 14px;
        font-weight: 600;
    }

    .content-wrapper button.btn.form-control > i {
        color: var(--cm-blue-deep) !important;
    }

    /* Filter rows fallback for any non-cm-row-flex report bar */
    .content-wrapper .box-body .nopadding[style*="margin-right"] {
        margin-right: 0 !important;
    }

    .content-wrapper .box-body .nopadding:not(.cm-row-flex):has(> .nopadding[style*="margin-right"]),
    .content-wrapper .box-body .nopadding:not(.cm-row-flex):has(> .col-md-5.nopadding) {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 8px;
    }

    .content-wrapper .box-body .nopadding:not(.cm-row-flex):has(> .nopadding[style*="margin-right"])::before,
    .content-wrapper .box-body .nopadding:not(.cm-row-flex):has(> .nopadding[style*="margin-right"])::after,
    .content-wrapper .box-body .nopadding:not(.cm-row-flex):has(> .col-md-5.nopadding)::before,
    .content-wrapper .box-body .nopadding:not(.cm-row-flex):has(> .col-md-5.nopadding)::after {
        display: none;
    }

    .content-wrapper .box-body .nopadding:not(.cm-row-flex):has(> .nopadding[style*="margin-right"]) > [class*="col-"],
    .content-wrapper .box-body .nopadding:not(.cm-row-flex):has(> .col-md-5.nopadding) > [class*="col-"] {
        flex: 1 1 100%;
        float: none;
        width: auto !important;
        min-width: 0;
    }

    .content-wrapper .box-body .nopadding:not(.cm-row-flex):has(> .nopadding[style*="margin-right"]) > .nopadding[style*="margin-right"],
    .content-wrapper .box-body .nopadding:not(.cm-row-flex):has(> .col-md-5.nopadding) > .col-md-5 {
        flex: 1 1 calc(50% - 4px);
    }

    .content-wrapper .box-body .nopadding:not(.cm-row-flex) > .col-md-1 > label:first-child {
        display: none;
    }

    .content-wrapper .box-body .nopadding:not(.cm-row-flex) > .col-md-1 > .btn {
        margin-top: 8px;
    }

    .content-wrapper .box-body .nopadding[style*="margin-right"] > .form-group {
        margin-bottom: 0;
    }

    /* Icon-only search buttons get a word only when full-width (not inside compact .cm-c-btn). */
    .content-wrapper .nopadding:not(.cm-row-flex) button#btnSearch.form-control::after {
        content: "Search";
        margin-left: 8px;
    }

    #divAddRow {
        min-height: 34px;
        margin: 8px 0 10px !important;
        padding: 7px 12px;
        border-radius: 10px;
        background: var(--cm-blue-soft);
        color: var(--cm-blue-deep);
        font-size: 13px;
        font-weight: 600;
    }

    #divAddRow > i {
        margin-right: 6px;
    }

    /* Tabs used by settings-style pages */
    ul.tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px;
        border-radius: 12px;
        background: #eef1f6;
        white-space: nowrap;
    }

    ul.tabs::-webkit-scrollbar {
        display: none;
    }

    ul.tabs li {
        flex: none;
        padding: 8px 13px;
        border-radius: 9px;
        color: var(--cm-text-2);
        font-size: 13px;
        font-weight: 600;
    }

    ul.tabs li.current {
        background: #fff;
        color: var(--cm-blue-deep);
        box-shadow: 0 1px 2px rgba(15, 23, 42, .1), 0 3px 8px rgba(15, 23, 42, .08);
    }

    .tab-content,
    .tab-content1,
    .tab-content2 {
        min-height: 0 !important;
        padding: 10px 0 0;
        box-shadow: none;
    }

    .content-wrapper .nav-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
    }

    .content-wrapper .nav-tabs > li {
        flex: none;
        float: none;
    }

    /* Select2 (compact to match 36px inputs in 2-3 column rows) */
    .content-wrapper select:not(.ddlgrid) + .select2-container,
    .modal select:not(.ddlgrid) + .select2-container {
        width: 100% !important;
    }

    .content-wrapper select:not(.ddlgrid) + .select2-container .select2-selection--single,
    .modal select:not(.ddlgrid) + .select2-container .select2-selection--single {
        height: 36px !important;
        border-color: var(--cm-field) !important;
        border-radius: 9px !important;
        background-color: var(--cm-surface-subtle);
    }

    .content-wrapper select:not(.ddlgrid) + .select2-container .select2-selection--single .select2-selection__rendered,
    .modal select:not(.ddlgrid) + .select2-container .select2-selection--single .select2-selection__rendered {
        padding: 0 24px 0 9px !important;
        font-size: 13px !important;
        line-height: 34px !important;
        color: var(--cm-text) !important;
    }

    .content-wrapper select:not(.ddlgrid) + .select2-container .select2-selection--single .select2-selection__arrow,
    .modal select:not(.ddlgrid) + .select2-container .select2-selection--single .select2-selection__arrow {
        height: 34px !important;
        right: 4px !important;
        border: 0 !important;
    }

    .select2-container--open .select2-dropdown {
        overflow: hidden;
        border-radius: 11px !important;
        box-shadow: 0 18px 44px rgba(11, 29, 53, .2);
    }

    .select2-container .select2-search--dropdown .select2-search__field {
        height: 36px;
        padding: 6px 10px;
        border-radius: 8px !important;
        font-size: 13.5px;
    }

    .select2-container .select2-results__option {
        padding: 9px 12px;
        font-size: 13.5px;
    }

    /* 6. Tables and entry grids ---------------------------------------------- */
    .content-wrapper table tr,
    .modal table tr {
        border-bottom: 1px solid var(--cm-line) !important;
    }

    .content-wrapper .table,
    .modal .table {
        margin-bottom: 0;
        border-color: var(--cm-line);
        font-size: 14px;
    }

    .content-wrapper .table > thead > tr > th,
    .modal .table > thead > tr > th {
        padding: 11px 12px;
        border-color: var(--cm-line);
        border-bottom-width: 1px;
        background: #f6f8fb;
        color: #5b6779;
        font-size: 11.5px;
        font-weight: 700;
        letter-spacing: .5px;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .content-wrapper .table > tbody > tr > td,
    .content-wrapper .table > tfoot > tr > td,
    .content-wrapper .table > tfoot > tr > th,
    .modal .table > tbody > tr > td {
        padding: 12px;
        border-color: var(--cm-line);
        vertical-align: middle;
    }

    .content-wrapper .table-striped > tbody > tr:nth-of-type(odd) {
        background-color: #fafbfd;
    }

    /* Wide tables scroll inside their card instead of stretching the page. The list tools
       (export, search, paging) stay pinned while the table itself moves sideways. */
    .content-wrapper div.dataTables_wrapper {
        max-width: calc(100% + 8px);
        margin: 0 -4px;
        padding: 0 4px 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-wrapper div.dataTables_wrapper > .dt-buttons,
    .content-wrapper div.dataTables_wrapper > .dataTables_filter,
    .content-wrapper div.dataTables_wrapper > .dataTables_length,
    .content-wrapper div.dataTables_wrapper > .dataTables_info,
    .content-wrapper div.dataTables_wrapper > .dataTables_paginate {
        position: sticky;
        left: 0;
    }

    .content-wrapper div.dataTables_wrapper > .row > .col-sm-12,
    .content-wrapper .dataTables_scrollBody,
    .cm-table-scroll,
    .content-wrapper .report-results,
    .modal .table-responsive {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-wrapper div.dataTables_wrapper > .row {
        margin-left: 0;
        margin-right: 0;
    }

    .content-wrapper div.dataTables_wrapper > .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    .content-wrapper .table-responsive {
        margin-bottom: 0;
        border: 0;
    }

    .cm-table-scroll {
        border: 1px solid var(--cm-line);
        border-radius: var(--cm-radius-sm);
    }

    /* List toolbar: export buttons and search box */
    .content-wrapper div.dt-buttons {
        display: flex;
        float: none;
        gap: 8px;
        width: 100%;
        margin: 4px 0 10px;
    }

    .content-wrapper div.dt-buttons > .btn {
        flex: 1 1 0;
        float: none;
        min-height: 40px;
        margin: 0 !important;
        border: 1px solid var(--cm-field);
        border-radius: 11px !important;
        background: #fff;
        color: var(--cm-text);
        font-size: 13.5px;
    }

    .content-wrapper div.dataTables_wrapper div.dataTables_filter {
        float: none;
        margin: 0 0 12px;
        text-align: left;
    }

    .content-wrapper div.dataTables_wrapper div.dataTables_filter label {
        display: block;
        width: 100%;
        margin: 0;
    }

    .content-wrapper div.dataTables_wrapper div.dataTables_filter input {
        display: block;
        width: 100% !important;
        height: 36px;
        margin: 4px 0 0 !important;
        padding: 6px 11px;
        border: 1px solid var(--cm-field);
        border-radius: 9px;
        font-size: 13.5px;
    }

    .content-wrapper div.dataTables_wrapper div.dataTables_info {
        padding: 12px 0 4px;
        color: var(--cm-muted);
        font-size: 12.5px;
        white-space: normal;
        text-align: left;
    }

    .content-wrapper div.dataTables_wrapper div.dataTables_paginate {
        margin-top: 6px;
        text-align: left;
    }

    .content-wrapper .pagination > li > a,
    .content-wrapper .pagination > li > span {
        min-width: 40px;
        padding: 9px 12px;
        text-align: center;
    }

    .content-wrapper .pagination > li:first-child > a {
        border-radius: 10px 0 0 10px;
    }

    .content-wrapper .pagination > li:last-child > a {
        border-radius: 0 10px 10px 0;
    }

    /* Row actions get a finger-sized target */
    .content-wrapper td .fa.edit,
    .content-wrapper td .fa.delete,
    .content-wrapper td .glyphicon-trash,
    .content-wrapper td .fa.print {
        display: inline-block;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: var(--cm-blue-soft);
        color: var(--cm-blue-deep);
        font-size: 15px;
        line-height: 36px;
        text-align: center;
        cursor: pointer;
    }

    .content-wrapper td .fa.delete,
    .content-wrapper td .glyphicon-trash {
        background: #fee2e2;
        color: var(--cm-danger);
    }

    /* Entry grids (invoice lines, production rows): compact cells with clean horizontal scroll */
    .content-wrapper table .form-control.txtgrid,
    .content-wrapper table .form-control.ddlgrid {
        min-width: 74px;
        height: 34px;
        padding: 5px 8px;
        border: 1px solid transparent;
        border-radius: 8px;
        background-color: #f4f6fa;
        font-size: 13px;
    }

    .content-wrapper table .form-control.ddlgrid {
        min-width: 145px;
    }

    .content-wrapper table td:first-child > .form-control.txtgrid {
        min-width: 34px;
        padding-left: 4px;
        padding-right: 4px;
        background-color: transparent !important;
        text-align: center;
    }

    .content-wrapper table .form-control.txtgrid:focus,
    .content-wrapper table .form-control.ddlgrid:focus {
        border: 1px solid var(--cm-blue) !important;
        background-color: #fff;
    }

    .content-wrapper table .form-control.txtgrid[readonly] {
        background-color: transparent;
        font-weight: 600;
    }

    .content-wrapper table select.ddlgrid.cmnSelect2Shim + .select2-container {
        min-width: 145px;
    }

    .content-wrapper table select.ddlgrid.cmnSelect2Shim + .select2-container .select2-selection--single {
        height: 34px !important;
        border-radius: 8px !important;
    }

    .content-wrapper table select.ddlgrid.cmnSelect2Shim + .select2-container .select2-selection--single .select2-selection__rendered {
        font-size: 13px !important;
        line-height: 32px !important;
    }

    .content-wrapper table td > div > small {
        display: block;
        padding: 4px 2px 0;
        font-size: 11.5px;
    }

    .content-wrapper table td > div > small.stock-hint {
        display: inline-block;
        margin-top: 4px;
        padding: 2px 8px;
        border-radius: 999px;
        background: var(--cm-surface-subtle);
        border: 1px solid var(--cm-line);
        color: var(--cm-text-2);
        font-weight: 600;
        font-variant-numeric: tabular-nums;
    }

    /* Production Raw Material Wastage callout card */
    .content-wrapper #divWastage {
        margin-top: 16px !important;
        padding: 14px !important;
        border: 1px solid #fde68a;
        border-radius: 16px;
        background: linear-gradient(180deg, #fffdf5 0%, var(--cm-amber-soft) 100%);
    }

    .content-wrapper #divWastage > label {
        display: flex;
        align-items: center;
        margin: 0 0 10px;
        color: #92400e;
        font-size: 12.5px;
        font-weight: 800;
        letter-spacing: .3px;
        text-transform: uppercase;
    }

    .content-wrapper #divWastage #tblWastage {
        overflow: hidden;
        border-radius: 12px;
        background: #fff;
        border: 1px solid #fde68a;
    }

    .content-wrapper #divWastage #tblWastage > thead > tr > th {
        background: #fef3c7;
        color: #92400e;
        border-color: #fde68a;
    }

    /* 7. Dashboard ----------------------------------------------------------- */
    body.cm-dashboard .content-wrapper .content-wrapper > .content-header {
        display: none;
    }

    body.cm-dashboard .content-wrapper .content-wrapper > .content {
        padding: 12px 12px 18px;
    }

    /* Midnight Executive Hero Summary Card */
    .cm-dash-hero {
        position: relative;
        display: block;
        margin-bottom: 18px;
        padding: 18px 16px 16px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, .12);
        border-radius: 22px;
        background:
            radial-gradient(90% 90% at 96% 4%, rgba(56, 189, 248, .22) 0%, rgba(56, 189, 248, 0) 62%),
            radial-gradient(80% 80% at 6% 100%, rgba(37, 99, 235, .28) 0%, rgba(37, 99, 235, 0) 65%),
            linear-gradient(145deg, var(--cm-navy) 0%, var(--cm-navy-2) 56%, var(--cm-navy-3) 100%);
        box-shadow: 0 16px 38px rgba(7, 19, 38, .26), inset 0 1px 0 rgba(255, 255, 255, .16);
        color: #fff;
    }

    .cm-hero-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
    }

    .cm-hero-meta {
        min-width: 0;
        flex: 1 1 auto;
    }

    .cm-hero-kicker {
        display: block;
        overflow: hidden;
        color: #7dd3fc;
        font-size: 10.5px;
        font-weight: 800;
        letter-spacing: 1px;
        text-transform: uppercase;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cm-hero-title {
        margin: 4px 0 3px;
        overflow: hidden;
        color: #fff;
        font-size: 19.5px;
        font-weight: 800;
        letter-spacing: -.4px;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cm-hero-date {
        display: block;
        color: rgba(203, 213, 225, .78);
        font-size: 12px;
        font-weight: 500;
    }

    .cm-hero-refresh {
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 12px;
        background: rgba(255, 255, 255, .09);
        color: #e2eeff;
        font-size: 15px;
        cursor: pointer;
        transition: background-color .15s ease, transform .15s ease;
    }

    .cm-hero-refresh:active {
        background: rgba(255, 255, 255, .2);
        transform: scale(.93);
    }

    .cm-hero-refresh.is-spinning i {
        animation: cmHeroSpin .65s linear infinite;
    }

    @keyframes cmHeroSpin {
        to { transform: rotate(360deg); }
    }

    .cm-hero-kpis {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .cm-kpi {
        min-width: 0;
        padding: 10px 10px 9px;
        border: 1px solid rgba(255, 255, 255, .11);
        border-radius: 14px;
        background: rgba(255, 255, 255, .07);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }

    .cm-kpi-lbl {
        display: flex;
        align-items: center;
        gap: 5px;
        color: rgba(203, 213, 225, .82);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .5px;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .cm-kpi-dot {
        flex: none;
        width: 6px;
        height: 6px;
        border-radius: 50%;
    }

    .cm-kpi-blue .cm-kpi-dot { background: #60a5fa; box-shadow: 0 0 8px rgba(96, 165, 250, .8); }
    .cm-kpi-green .cm-kpi-dot { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, .8); }
    .cm-kpi-violet .cm-kpi-dot { background: #a78bfa; box-shadow: 0 0 8px rgba(167, 139, 250, .8); }

    .cm-kpi-val {
        display: block;
        margin-top: 5px;
        overflow: hidden;
        color: #fff;
        font-size: 17px;
        font-weight: 800;
        letter-spacing: -.3px;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }

    /* Section labels */
    .cm-dash-sec-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 4px 2px 10px;
    }

    .cm-dash-sec-label > span {
        color: var(--cm-text-2);
        font-size: 11.5px;
        font-weight: 800;
        letter-spacing: .85px;
        text-transform: uppercase;
    }

    .cm-dash-sec-label > em {
        color: var(--cm-muted);
        font-style: normal;
        font-size: 11.5px;
        font-weight: 600;
    }

    .content-wrapper .content > .row {
        margin-left: -6px;
        margin-right: -6px;
    }

    .content-wrapper .content > .row > [class*="col-"] {
        padding-left: 6px;
        padding-right: 6px;
    }

    /* Luxury White Bento Shortcut Grid (2 crisp equal columns) */
    .content-wrapper .content > .row.cm-dash-tiles {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 0 0 18px !important;
    }

    .content-wrapper .content > .row.cm-dash-tiles::before,
    .content-wrapper .content > .row.cm-dash-tiles::after {
        display: none !important;
    }

    .content-wrapper .content > .row.cm-dash-tiles > [class*="col-"] {
        float: none !important;
        width: auto !important;
        min-width: 0;
        padding: 0 !important;
    }

    /* Fallback for non-dashboard pages using .small-box */
    .content-wrapper .row:not(.cm-dash-tiles) > .col-md-3.col-sm-6.col-xs-12 {
        float: left;
        width: 50%;
    }

    .content-wrapper .small-box {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        min-height: 112px;
        height: 100%;
        margin-bottom: 0;
        padding: 58px 14px 14px;
        overflow: hidden;
        border: 1px solid rgba(7, 19, 38, .06);
        border-radius: 18px;
        background: #ffffff !important;
        color: var(--cm-text) !important;
        text-align: left !important;
        box-shadow: 0 1px 2px rgba(7, 19, 38, .03), 0 6px 18px rgba(7, 19, 38, .05);
        transition: transform .16s var(--cm-ease), box-shadow .16s ease, border-color .16s ease;
    }

    /* Subtle spotlight on primary Sales Invoice tile */
    .content-wrapper .SalesInvoice .small-box {
        border-color: rgba(37, 99, 235, .2);
        background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%) !important;
    }

    /* Subtle top-right chevron cue */
    .content-wrapper .small-box::after {
        content: "\203A";
        position: absolute;
        top: 13px;
        right: 14px;
        color: #b8c4d6;
        font-size: 20px;
        font-weight: 500;
        line-height: 1;
        pointer-events: none;
    }

    .content-wrapper .small-box:hover {
        color: var(--cm-text) !important;
    }

    .content-wrapper .small-box:active {
        transform: scale(.965);
        border-color: rgba(37, 99, 235, .28);
        box-shadow: 0 2px 8px rgba(7, 19, 38, .08);
    }

    .content-wrapper .small-box > .inner {
        position: relative;
        z-index: 1;
        padding: 0 !important;
    }

    .content-wrapper .small-box h3 {
        margin: 0 0 2px !important;
        color: var(--cm-text) !important;
        font-size: 14.5px !important;
        font-weight: 800 !important;
        letter-spacing: -.25px;
        line-height: 1.2;
        white-space: normal;
    }

    .content-wrapper .small-box h4 {
        margin: 0 !important;
        color: var(--cm-muted) !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        letter-spacing: 0;
        line-height: 1.25;
        opacity: 1 !important;
    }

    /* Reposition watermark icon into a refined top-left squircle capsule */
    .content-wrapper .small-box .icon,
    .content-wrapper .small-box:hover .icon {
        position: absolute;
        top: 13px;
        left: 13px;
        right: auto;
        bottom: auto;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 16.5px !important;
        line-height: 1;
        transition: none;
    }

    /* Semantic jewel-tinted icon capsules */
    .content-wrapper .small-box.bg-blue .icon { background: #eaf1ff; color: #1d4ed8; }
    .content-wrapper .small-box.bg-green .icon { background: #e3f8ee; color: #047857; }
    .content-wrapper .small-box.bg-yellow .icon { background: #fef3d6; color: #b45309; }
    .content-wrapper .small-box.bg-aqua .icon { background: #e0f4fe; color: #0369a1; }
    .content-wrapper .small-box.bg-purple .icon { background: #ede9fe; color: #4f46e5; }
    .content-wrapper .small-box.bg-red .icon { background: #ffe4e8; color: #be123c; }
    .content-wrapper .small-box.bg-orange .icon { background: #ffedd5; color: #c2410c; }

    /* The whole tile is the link. */
    .content-wrapper .small-box > .small-box-footer,
    .content-wrapper .small-box > .small-box-footer:hover,
    .content-wrapper .small-box > .small-box-footer:focus {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 2;
        padding: 0;
        background: transparent !important;
        font-size: 0;
        color: transparent !important;
    }

    /* Clean chart cards on Dashboard */
    body.cm-dashboard .box.box-primary > .box-header.with-border {
        padding: 14px 12px 12px;
        border-bottom: 0;
        border-radius: var(--cm-radius);
        background: #fff;
    }

    /* Crisp Executive white metric cards for 7-day Production / Sales / Fuel KPIs */
    .content-wrapper .box > .info-box {
        display: flex;
        align-items: center;
        min-height: 82px;
        margin: 12px 14px !important;
        padding: 12px 14px;
        overflow: hidden;
        border: 1px solid var(--cm-line);
        border-radius: 16px;
        background: var(--cm-surface-subtle) !important;
        color: var(--cm-text) !important;
        box-shadow: none;
    }

    .content-wrapper .box > .info-box:first-child {
        margin-top: 14px !important;
    }

    .content-wrapper .box > .info-box:last-child {
        margin-bottom: 14px !important;
    }

    .content-wrapper .box > .info-box .info-box-icon {
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
        float: none;
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 20px;
        line-height: 1;
        color: #fff !important;
        box-shadow: 0 6px 14px rgba(7, 19, 38, .16);
    }

    .content-wrapper .box > .info-box.bg-blue .info-box-icon { background: linear-gradient(145deg, #3b82f6, #1d4ed8) !important; }
    .content-wrapper .box > .info-box.bg-green .info-box-icon { background: linear-gradient(145deg, #10b981, #047857) !important; }
    .content-wrapper .box > .info-box.bg-purple .info-box-icon { background: linear-gradient(145deg, #6366f1, #4338ca) !important; }
    .content-wrapper .box > .info-box.bg-aqua .info-box-icon { background: linear-gradient(145deg, #06b6d4, #0369a1) !important; }

    .content-wrapper .box > .info-box .info-box-content {
        flex: 1 1 auto;
        min-width: 0;
        margin-left: 14px;
        padding: 0;
    }

    .content-wrapper .box > .info-box .info-box-text {
        color: var(--cm-muted) !important;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .5px;
        text-transform: uppercase;
    }

    .content-wrapper .box > .info-box .info-box-number {
        margin-top: 2px;
        color: var(--cm-text) !important;
        font-size: 20px;
        font-weight: 800;
        letter-spacing: -.4px;
        line-height: 1.2;
    }

    .content-wrapper .box > .info-box .progress {
        height: 5px;
        margin: 7px 0 5px;
        border-radius: 999px;
        background: #e2e8f0 !important;
        overflow: hidden;
    }

    .content-wrapper .box > .info-box.bg-blue .progress-bar { background: linear-gradient(90deg, #3b82f6, #1d4ed8) !important; }
    .content-wrapper .box > .info-box.bg-green .progress-bar { background: linear-gradient(90deg, #10b981, #059669) !important; }
    .content-wrapper .box > .info-box.bg-purple .progress-bar { background: linear-gradient(90deg, #6366f1, #4f46e5) !important; }
    .content-wrapper .box > .info-box.bg-aqua .progress-bar { background: linear-gradient(90deg, #06b6d4, #0284c7) !important; }

    .content-wrapper .box > .info-box .progress-description {
        color: var(--cm-text-2) !important;
        font-size: 11.5px;
        font-weight: 500;
    }

    .content-wrapper .box canvas {
        max-width: 100%;
    }

    /* 8. Modals, notifications, pickers ---------------------------------------- */
    .modal {
        -webkit-overflow-scrolling: touch;
    }

    .modal .modal-dialog {
        width: auto;
        margin: 14px 12px;
    }

    .modal .modal-dialog.modal-sm {
        margin: 20vh 22px 0;
    }

    /* The permit / weight dialogs are pushed down with an inline top for desktop. */
    .modal[style*="top: 380px"] {
        top: 0 !important;
    }

    .modal[style*="top: 380px"] .modal-content {
        padding: 6px 16px 16px;
    }

    .modal[style*="top: 380px"] .modal-content > input {
        display: block;
        width: 100% !important;
        height: 46px !important;
        margin: 0 !important;
        padding: 10px 14px;
        border: 1px solid var(--cm-field);
        border-radius: var(--cm-radius-sm);
        font-size: 16px;
    }

    .modal[style*="top: 380px"] .modal-content > label {
        display: block;
        margin: 12px 0 6px !important;
    }

    .modal .modal-content {
        overflow: hidden;
        border: 0;
        border-radius: 22px;
        box-shadow: 0 28px 80px rgba(8, 18, 34, .4);
    }

    .modal .modal-header {
        padding: 16px 18px;
        border-bottom: 1px solid var(--cm-line);
    }

    .modal .modal-title {
        color: var(--cm-text);
        font-size: 17px;
        font-weight: 700;
        letter-spacing: -.1px;
    }

    .modal .modal-title > .fa {
        margin-right: 8px;
        color: var(--cm-blue);
    }

    .modal h5.modal-title {
        font-size: 15px;
        font-weight: 500;
        line-height: 1.45;
    }

    .modal .modal-header .close {
        width: 36px;
        height: 36px;
        margin: -6px -8px 0 8px;
        border-radius: 50%;
        background: #f1f4f9;
        opacity: 1;
        color: #475569;
        font-size: 22px;
        line-height: 34px;
        text-shadow: none;
    }

    .modal .modal-body {
        padding: 16px 18px;
    }

    .modal .modal-body::after {
        content: "";
        display: table;
        clear: both;
    }

    .modal .modal-body [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    .modal .modal-footer {
        display: flex;
        gap: 10px;
        padding: 12px 16px 16px;
        border-top: 1px solid var(--cm-line);
    }

    .modal .modal-footer::before,
    .modal .modal-footer::after {
        display: none;
    }

    .modal .modal-footer > .btn {
        flex: 1 1 0;
        min-height: 46px;
        margin: 0 !important;
    }

    .modal .modal-footer > .btn[data-dismiss="modal"]:not(:only-child) {
        border: 0;
        background: #eef1f6;
        box-shadow: none;
        color: var(--cm-text);
    }

    /* Report drill-down dialogs go edge to edge. */
    .report-modal .modal-dialog {
        width: 100%;
        height: 100%;
        margin: 0;
    }

    .report-modal .modal-content {
        display: flex;
        flex-direction: column;
        height: 100%;
        border-radius: 0;
    }

    .report-modal .modal-header {
        flex: none;
        padding: calc(var(--cm-safe-t) + 14px) 16px 14px;
        border-bottom: 0;
        background: linear-gradient(115deg, var(--cm-navy), var(--cm-navy-2));
    }

    .report-modal .modal-header .close {
        background: rgba(255, 255, 255, .14);
        color: #fff;
    }

    .report-modal .modal-header .btn {
        min-height: 36px;
        padding: 8px 12px;
    }

    .report-modal .modal-title,
    .report-modal .modal-title > .fa {
        color: #fff;
    }

    .report-modal .modal-body,
    #txnEditModal .modal-body,
    #stockLedgerModal .modal-body {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        max-height: none;
    }

    #txnEditModal .modal-body,
    #stockLedgerModal .modal-body {
        display: flex;
    }

    #txnEditFrame,
    #stockLedgerFrame {
        flex: 1 1 auto;
        height: auto;
    }

    /* Notifications clear the top bar and the bottom bar. */
    #noty_layout__topRight,
    #noty_layout__topCenter,
    #noty_layout__top,
    #noty_layout__topLeft {
        top: calc(var(--cm-head-h) + var(--cm-safe-t) + 10px);
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        -webkit-transform: none;
        transform: none;
    }

    #noty_layout__bottomCenter,
    #noty_layout__bottom,
    #noty_layout__bottomRight,
    #noty_layout__bottomLeft {
        bottom: calc(var(--cm-bar-h) + var(--cm-safe-b) + 14px);
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        -webkit-transform: none;
        transform: none;
    }

    .noty_bar {
        overflow: hidden;
        border-radius: 14px !important;
        box-shadow: 0 16px 40px rgba(11, 29, 53, .22) !important;
    }

    .noty_body {
        padding: 14px 16px !important;
        font-size: 14.5px !important;
        line-height: 1.4;
    }

    .noty_buttons {
        padding: 10px 12px 12px !important;
    }

    .noty_buttons .btn {
        min-height: 42px;
        min-width: 86px;
        border-radius: 11px;
        font-weight: 600;
    }

    .report-loading-pill {
        top: calc(var(--cm-head-h) + var(--cm-safe-t) + 12px);
        max-width: calc(100vw - 24px);
    }

    .daterangepicker {
        border: 0;
        border-radius: 16px;
        box-shadow: 0 20px 50px rgba(11, 29, 53, .25);
    }

    .daterangepicker td,
    .daterangepicker th {
        min-width: 36px;
        height: 34px;
    }

    .txnRowMenu {
        min-width: 190px;
        border-radius: 14px;
    }

    .txnRowMenu > li > a {
        padding: 13px 16px;
        font-size: 15px;
    }

    /* 9. Bottom bar and sheets -------------------------------------------------- */
    .cm-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1035;
        display: flex;
        align-items: stretch;
        height: calc(var(--cm-bar-h) + var(--cm-safe-b));
        padding: 0 6px var(--cm-safe-b);
        border-top: 1px solid rgba(7, 19, 38, .08);
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -10px 32px rgba(7, 19, 38, .1);
        transition: transform .3s var(--cm-ease);
    }

    @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
        .cm-tabbar {
            background: rgba(255, 255, 255, .88);
            -webkit-backdrop-filter: saturate(200%) blur(24px);
            backdrop-filter: saturate(200%) blur(24px);
        }
    }

    /* Out of the way while the on-screen keyboard is up, in embedded pages and behind the lock screen. */
    body.cm-kb .cm-tabbar {
        transform: translate3d(0, 110%, 0);
    }

    .cm-embed .cm-tabbar,
    body.embedded-txn .cm-tabbar,
    .cm-embed .cm-sheet,
    .cm-embed .cm-sheet-backdrop {
        display: none !important;
    }

    .cm-tab {
        position: relative;
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 0;
        margin: 0;
        padding: 6px 0 0;
        border: 0;
        outline: 0;
        background: none;
        color: var(--cm-muted);
        font-family: var(--cm-font);
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: .2px;
        line-height: 1;
        text-decoration: none !important;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
        user-select: none;
    }

    .cm-tab:hover,
    .cm-tab:focus {
        color: var(--cm-muted);
    }

    .cm-tab-ico {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 30px;
        margin-bottom: 5px;
        border-radius: 15px;
        transition: background-color .2s ease, transform .15s ease;
    }

    .cm-tab svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.85;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .cm-tab:active .cm-tab-ico {
        transform: scale(.9);
    }

    .cm-tab.is-active,
    .cm-tab.is-active:hover,
    .cm-tab.is-active:focus {
        color: var(--cm-blue-deep);
    }

    .cm-tab.is-active .cm-tab-ico {
        background: var(--cm-blue-soft);
        box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .14);
    }

    .cm-tab.is-active svg {
        stroke-width: 2.15;
    }

    .cm-tab:focus-visible .cm-tab-ico {
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .3);
    }

    /* Centre executive action */
    .cm-tab-fab {
        padding-top: 0;
        color: var(--cm-text-2);
    }

    .cm-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        margin: -26px 0 5px;
        border: 4px solid #fff;
        border-radius: 50%;
        background: linear-gradient(145deg, var(--cm-blue-glow) 0%, var(--cm-blue-deep) 70%, #15399c 100%);
        box-shadow: 0 10px 24px rgba(29, 78, 216, .46), 0 0 0 1px rgba(37, 99, 235, .16), inset 0 1px 0 rgba(255, 255, 255, .34);
        color: #fff;
        transition: transform .3s var(--cm-ease), box-shadow .2s ease;
    }

    .cm-fab svg {
        width: 24px;
        height: 24px;
        stroke-width: 2.4;
    }

    .cm-tab-fab:active .cm-fab {
        transform: scale(.93);
    }

    .cm-tab-fab.is-open .cm-fab {
        transform: rotate(45deg);
        background: linear-gradient(145deg, var(--cm-navy-2), var(--cm-navy));
        box-shadow: 0 8px 18px rgba(7, 19, 38, .38);
    }

    /* Sheets */
    .cm-sheet-backdrop {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1032;
        background: rgba(4, 11, 24, .58);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .28s ease;
    }

    .cm-sheet-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .cm-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(var(--cm-bar-h) + var(--cm-safe-b));
        z-index: 1033;
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - var(--cm-bar-h) - var(--cm-safe-b) - var(--cm-head-h) - 24px);
        border-top: 1px solid rgba(255, 255, 255, .8);
        border-radius: 26px 26px 0 0;
        background: #fff;
        box-shadow: 0 -20px 56px rgba(4, 11, 24, .28);
        transform: translate3d(0, 110%, 0);
        visibility: hidden;
        transition: transform .38s var(--cm-ease), visibility 0s linear .38s;
        will-change: transform;
    }

    .cm-sheet.is-open {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        transition: transform .38s var(--cm-ease), visibility 0s;
    }

    .cm-sheet.is-dragging {
        transition: none;
    }

    .cm-sheet-grip {
        flex: none;
        padding: 10px 0 4px;
        touch-action: none;
    }

    .cm-sheet-grip::before {
        content: "";
        display: block;
        width: 42px;
        height: 4px;
        margin: 0 auto;
        border-radius: 4px;
        background: #cbd5e1;
    }

    .cm-sheet-head {
        display: flex;
        flex: none;
        align-items: center;
        justify-content: space-between;
        padding: 8px 18px 14px;
        border-bottom: 1px solid var(--cm-line);
        touch-action: none;
    }

    .cm-sheet-head h2 {
        margin: 0;
        color: var(--cm-text);
        font-size: 19px;
        font-weight: 800;
        letter-spacing: -.35px;
    }

    .cm-sheet-head p {
        margin: 3px 0 0;
        color: var(--cm-muted);
        font-size: 12.5px;
    }

    .cm-sheet-close {
        flex: none;
        width: 36px;
        height: 36px;
        padding: 0;
        border: 1px solid var(--cm-line);
        border-radius: 50%;
        background: var(--cm-surface-subtle);
        color: var(--cm-text-2);
        cursor: pointer;
    }

    .cm-sheet-close svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.4;
        stroke-linecap: round;
        vertical-align: middle;
    }

    .cm-sheet-body {
        flex: 1 1 auto;
        min-height: 0;
        padding: 6px 12px 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .cm-sheet-group {
        margin: 12px 6px 8px;
        color: var(--cm-muted);
        font-size: 10.5px;
        font-weight: 800;
        letter-spacing: 1px;
        text-transform: uppercase;
    }

    .cm-grid {
        display: flex;
        flex-wrap: wrap;
    }

    .cm-action {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 25%;
        padding: 8px 2px 10px;
        border-radius: 16px;
        color: var(--cm-text) !important;
        font-size: 11.5px;
        font-weight: 600;
        line-height: 1.25;
        text-align: center;
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent;
        transition: background-color .15s ease, transform .15s ease;
    }

    .cm-action:active {
        background: var(--cm-surface-subtle);
        transform: scale(.95);
    }

    .cm-action.is-current .cm-chip {
        box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cm-blue);
    }

    .cm-chip {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        margin-bottom: 8px;
        border: 1px solid rgba(7, 19, 38, .06);
        border-radius: 16px;
        box-shadow: 0 3px 10px rgba(7, 19, 38, .05);
        font-size: 19px;
    }

    .cm-c-blue { background: #e8f0ff; color: #1d4ed8; }
    .cm-c-green { background: #e0f7ed; color: #047857; }
    .cm-c-amber { background: #fef3d6; color: #b45309; }
    .cm-c-rose { background: #ffe5e9; color: #be123c; }
    .cm-c-violet { background: #eee8ff; color: #4f46e5; }
    .cm-c-teal { background: #dbf5f9; color: #0369a1; }
    .cm-c-slate { background: #eaf0f7; color: #334155; }

    /* 10. Sign-in page ------------------------------------------------------------ */
    .container-login100 {
        min-height: 100vh;
        padding: calc(var(--cm-safe-t) + 24px) 18px calc(var(--cm-safe-b) + 24px);
        background:
            radial-gradient(90% 55% at 88% 4%, rgba(56, 189, 248, .22) 0%, rgba(56, 189, 248, 0) 60%),
            radial-gradient(100% 60% at 10% 95%, rgba(37, 99, 235, .28) 0%, rgba(37, 99, 235, 0) 60%),
            linear-gradient(160deg, var(--cm-navy) 0%, var(--cm-navy-2) 55%, var(--cm-navy-3) 100%);
    }

    .wrap-login100 {
        width: 100%;
        max-width: 420px;
        padding: 34px 22px 28px;
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: 26px;
        background: #fff;
        box-shadow: 0 32px 84px rgba(3, 9, 20, .55), 0 0 0 1px rgba(255, 255, 255, .08);
    }

    .login100-form {
        width: 100%;
    }

    .login100-form > .col-md-12 {
        margin-bottom: 4px !important;
        padding: 0;
        font-family: var(--cm-font) !important;
    }

    .login100-form h1 {
        margin: 0;
        color: var(--cm-text);
        font-family: var(--cm-font);
        font-size: 29px;
        font-weight: 800;
        letter-spacing: -.8px;
    }

    .login100-form h1::before {
        content: "CM";
        display: block;
        width: 62px;
        height: 62px;
        margin: 0 auto 16px;
        border: 1px solid rgba(255, 255, 255, .28);
        border-radius: 19px;
        background: linear-gradient(145deg, var(--cm-blue-glow), var(--cm-blue-deep) 72%, #15399c);
        box-shadow: 0 16px 32px rgba(29, 78, 216, .42), inset 0 1px 0 rgba(255, 255, 255, .36);
        color: #fff;
        font-size: 20px;
        font-weight: 800;
        letter-spacing: .5px;
        line-height: 60px;
    }

    .login100-form-title {
        padding-bottom: 24px;
        color: var(--cm-muted);
        font-family: var(--cm-font);
        font-size: 14.5px;
        font-weight: 500;
    }

    .login100-form-title::after {
        content: " to your workspace";
    }

    .wrap-input100 {
        margin-bottom: 12px;
    }

    .wrap-input100 .input100 {
        height: 54px;
        padding: 0 16px 0 50px;
        border: 1px solid var(--cm-field);
        border-radius: 15px;
        background: var(--cm-surface-subtle);
        color: var(--cm-text);
        font-family: var(--cm-font);
        font-size: 16px;
        font-weight: 500;
    }

    .wrap-input100 .input100:focus {
        border-color: var(--cm-blue);
        background: #fff;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, .14);
    }

    .wrap-input100 .focus-input100 {
        display: none;
    }

    .wrap-input100 .symbol-input100 {
        padding-left: 20px;
        color: var(--cm-muted);
    }

    .container-login100-form-btn {
        padding-top: 10px;
    }

    .login100-form-btn,
    .login100-form-btn:hover {
        height: 54px;
        border-radius: 15px;
        background: linear-gradient(180deg, #3272f2 0%, var(--cm-blue-deep) 100%);
        box-shadow: 0 12px 26px rgba(29, 78, 216, .36), inset 0 1px 0 rgba(255, 255, 255, .24);
        font-family: var(--cm-font);
        font-size: 16px;
        font-weight: 700;
        letter-spacing: .2px;
        text-transform: none;
    }

    .login100-form .p-t-136 {
        padding-top: 0;
    }
}

/* Small phones */
@media (max-width: 359px) {
    .main-header .logo .logo-lg {
        display: none !important;
    }

    .cm-row-flex > .cm-c2 {
        min-width: 112px;
    }

    .cm-row-flex > .cm-c3 {
        min-width: 80px;
    }

    .cm-tab {
        font-size: 10px;
    }

    .cm-tab-ico {
        width: 48px;
    }

    .cm-action {
        font-size: 11.5px;
    }

    .cm-chip {
        width: 48px;
        height: 48px;
    }
}

@media print {
    .cm-tabbar,
    .cm-sheet,
    .cm-sheet-backdrop,
    .cm-drawer-backdrop {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cm-tabbar,
    .cm-sheet,
    .cm-sheet-backdrop,
    .cm-drawer-backdrop,
    .cm-fab,
    .cm-tab-ico,
    .main-sidebar {
        transition: none !important;
    }
}
